View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Experienced Modder Experienced ModderMember since: 01.12.2007, 20:29Posts: 521Location: Germany Likes: 3
 

 Post Topic: Write Vertex animation
PostPosted 18.11.2008, 19:30 
There is this option in CryEngine2 Exporter from Max.

Write Vertex animation

It could be great for objects with vertex animation - like cloth or even skin. You could export complex cloth simulation to Crysis. All kinds of special purpose animations . Or even a complex character already animated in Max.

First I thought it's deactivated or something but a file exported with that option checked is much larger. So the exporter does export the vertex animation. How can we play that in Crysis ?



  Experienced Modder Experienced ModderMember since: 01.12.2007, 20:29Posts: 521Location: Germany Likes: 3
 

 Post Topic:
PostPosted 26.11.2008, 15:59 
Well, I don't know if we will get an answer for the "write vertex animation" but I think Crytek did this with the CryRiggingTools.ms. There is a function "Bake to Bones" . When you press the button Bake Deformation to Bones - a script will analyze your deforming animation in your mesh and will make bones and a skin modifier. Each bone is connected to a vertex.

They did this with parachute, flags, maybe MineRope , and for the vessel explosion.

All good and nice so far. But the problem is - when I press the "Bake Deformation to Bones" button the script gives me the message : no vertices selected. Even if I have vertices selected. I analyzed the script and I think that maybe there's a mistake in it.

There are a few lines - but I will give one example.
selectedVerts.count returns an error . But $.selectedVerts.count correctly returns the number of vertices selected. I tried though to correct the script by placing $. in a few places but it gives me other errors. I'm no Max scripter.

The author used I think Max 8 SP3 - Maybe that could be ? Maybe in Max 8 SP3 they change a few things in max script ? Can someone test that script in Max 8 SP 3 or higher ?


  Skilled Modder Skilled ModderMember since: 03.08.2007, 05:16Posts: 608Location: Austin, Texas Likes: 11
 

 Post Topic:
PostPosted 26.11.2008, 18:55 
Write Vertex animation is currently unsupported and not being developed any further at this time. If you'd like to do cloth simulations etc... there are other techniques to use, such as bake to bones, but at this point i wouldn't dig into the vertex animation script as it is very old and outdated.


Image
Want to learn the CryENGINE3? Purchase the CryENGINE3 CookBook! https://www.packtpub.com/cryengine-3-cookbook/book
User avatar   24/7 Modder 24/7 ModderMember since: 16.12.2007, 16:07Posts: 4713Location: Finland Likes: 12
 

 Post Topic:
PostPosted 26.11.2008, 19:45 
criminal.. how come you are in nova scotia and work for crytek??

does crytek have an office in canada?


http://www.TriangulateMesh.com
Quote:
(10:36:53 PM) puppy: crymono?
(10:37:00 PM) puppy: is that some sort of illness
  Skilled Modder Skilled ModderMember since: 03.08.2007, 05:16Posts: 608Location: Austin, Texas Likes: 11
 

 Post Topic:
PostPosted 27.11.2008, 11:28 
Quote:
Originally posted by Olli.
criminal.. how come you are in nova scotia and work for crytek??

does crytek have an office in canada?
\

HAHA that's funny, no I am currently in Frankfurt but originally from Nova Scotia. Maybe i should change that today :)


Image
Want to learn the CryENGINE3? Purchase the CryENGINE3 CookBook! https://www.packtpub.com/cryengine-3-cookbook/book
  Experienced Modder Experienced ModderMember since: 01.12.2007, 20:29Posts: 521Location: Germany Likes: 3
 

 Post Topic:
PostPosted 05.12.2008, 13:11 
Ok I spent days trying to have some sort of vertex animation.
We have 2 or 3 options and each one is limited. You can "glue" a bone to each vertex and export that - You are limited to only approx 200 bones . I use that in the cloth video animation

And the second option would be with morph targets. Unfortunately there's only one place where you can play that. In Character Editor window you check the option "Linear Morph Sequence" and by moving that slider - you have full vertex animation. If we could use that anywhere else - in game. That would be perfect.

- I will upload here later some 3d crysis models with vertex animation

Cloth video in Crysis - exported from 3ds max :

http://www.youtube.com/watch?v=RYxCrv6xpNw


User avatar   Trainee TraineeMember since: 30.12.2007, 13:55Posts: 163Location: France/Belgium Likes: 0
 

 Post Topic:
PostPosted 05.12.2008, 13:23 
is there a way also to use the spring effect like the flex modifier?


  Experienced Modder Experienced ModderMember since: 01.12.2007, 20:29Posts: 521Location: Germany Likes: 3
 

 Post Topic:
PostPosted 06.12.2008, 06:18 
Yes, all kind of vertex animation export are possible. Meaning all modifier effects also.
But it's not so simple. You have to bake the animation using a "bake to vertex" script which will place a bone (box) on every vertex.
Then you apply a skin modifier, pick the objects created before - and export to Crysis. The video shown was made using this method.


  Experienced Modder Experienced ModderMember since: 01.12.2007, 20:29Posts: 521Location: Germany Likes: 3
 

 Post Topic:
PostPosted 11.12.2008, 02:17 
Since I received a few PM about vertex animation and that cloth video I decided to upload here a CHR object with 928 verts you can animate yourself the object simply going to Character Editor importing that object then check the "Linear Morph Sequence" and then as you play the slider - the animation will play. Maybe someone will figure it out how do we play that in Editor and Game.

I remind you this is one method of having vertex animation. The advantage is - you can have pretty complex object. As far as I saw, the FPS was all the time to maximum 999 . So maybe there's no heavy processing time involved.

I could write a short tutorial on how to do that with 3ds max. I will also reply later to all the PM.
Attachments:

cloth-morph-928verts.zip
[1.46 MiB]
Downloaded 274 times


User avatar   Uber Modder Uber ModderMember since: 16.12.2007, 06:20Posts: 1918Location: Florida, USA Likes: 0
 

 Post Topic:
PostPosted 11.12.2008, 02:25 
To play an animation ingame, use the Animation: PlayAnimation node in flowgraphs. It works on characters and regular objects.


Image
  Experienced Modder Experienced ModderMember since: 01.12.2007, 20:29Posts: 521Location: Germany Likes: 3
 

 Post Topic:
PostPosted 11.12.2008, 02:27 
This is vertex animation. As in Cloth or maybe even liquid. It's done with morph targets - just like the facial animations. Only here it is used for playing a continuous cloth animation. It won't play in Editor or Game only with special tricks or by setting up the morph targets in Facial Editor - but it's not smooth.

EDIT : I was requested by PM to send the scene with the cloth - and from another user a regular scene with just a box and a plane as a cloth sim. SInce the attachments limit in PM is 20 KB I placed those files here.

a short info for each file (I used 3ds max 8) :

cloth-sim-w-boxes.rar : first I simulated a plane with Cloth . Then I placed a box at each vertex. I baked the boxes animations, applied a skin and chose the boxes as bones. Since the sandbox takes I think maximum approx 170 bones I split the plane cloth in two. And then saved as CHR obj and CAF anim

cloth-sim.rar - and cloth-sim-higher-quality.part#.rar - just a simple box and plane with cloth
Attachments:

cloth-sim-higher-quality.part2.rar
[1.29 MiB]
Downloaded 261 times
cloth-sim-higher-quality.part1.rar
[1.71 MiB]
Downloaded 261 times
cloth-sim.rar
[630.95 KiB]
Downloaded 199 times

cloth-sim-w-boxes.rar
[1012.57 KiB]
Downloaded 193 times




Last edited by sebastian___ on 15.12.2008, 20:52, edited 1 time in total.
User avatar   Experienced Modder Experienced ModderMember since: 16.12.2008, 07:00Posts: 400Location: CA Likes: 1
 

 Post Topic:
PostPosted 17.12.2008, 11:28 
Thanks sebastian! This is exactly what i need for my Machinima. Will send you a PM later on.


Greetz, Frag...


Scientists say the universe is made up of Protons, Neutrons and Electrons. They forgot to mention Morons.
  Trainee TraineeMember since: 16.07.2008, 11:09Posts: 150Location: Germany Likes: 1
 

 Post Topic:
PostPosted 13.03.2009, 17:45 
hi,

i have a little problem with vertex animation. i created a flag with cloth and wind animation in Max, so far so well. but how can i `bake´ the boxes to the vertex, to export my animation?

thx for help

´excuse my bad English´
  Uber Modder Uber ModderMember since: 20.11.2007, 08:55Posts: 1025 Likes: 0
 

 Post Topic:
PostPosted 17.03.2009, 01:07 
+1 ^^ , I have never baked verts before so how do you do this?


  Experienced Modder Experienced ModderMember since: 01.12.2007, 20:29Posts: 521Location: Germany Likes: 3
 

 Post Topic:
PostPosted 18.03.2009, 12:17 
OK. So the workflow is like this :

You select your flag , and there's a script in CryTools which will "glue" a box on each vertex. As far as I know that script is broken I never managed to get it to work so I made another script.

After this you will have a ton of boxes (they can be made little) attached to each vertex of your flag.

Then with another script you bake their animation . And now when you hit play the boxes will move following the cloth animation even if you delete the original cloth.

Then you take your cloth - delete the original Cloth modifier - so now your cloth will not move . It's just a geometry standing there. Apply a skin modifier on top - and select all the boxes as the bones. Hit play. If your animation plays well - you can export now your animation (like you would export a character with skin and bones).

Limitations : There's a limit on how much bones you can have. I think maybe 200 .

That means - either your flag should max 200 vertices - either your remove some of the boxes - like each second box - or something.

If this tutorial was not clear feel free to ask some more.