Hello All,
I am new here and am really happy to know there is a forum solely for videogame 3d artist/animators/designers.
I am working on an animation project.I am a 2d animator that recently switched to 3d animation but I have long since been familiar with modeliing,uvmapping,rigging and texturing.
I have a model with long hair and a cape and I am really thinking of doing the bones/dynamic ik spline way by using Maya hair to drive the bones that will then deform the hair and cape but my problem is how to prevent the cape or hair from entering the character's mesh.I have studied cutscenes and gameplay of games like heavenly sword, and FFXIII and I noticed that bones were used but they don't go through the character when they move about.
Also saw this:
[ame]
http://www.youtube.com/watch?v=vrx1NQJP70U[/ame]
Is there some sort of script or constraint being used to keep the deformed mesh from penetrating into the character as the hair solver collisions works with the hair curve and not the cape or hair geo?
I don't wanna use ncloth cause of the heavy simulation and repeated tweaking.With 3 or 4 curves,running simulation will be far more lighter.
Will appreciate replies from anyone familiar with this aspect.Thanks.
Replies
You also have to be careful when watching cut scenes that it isn't pre-rendered and you think its happening in the engine.
One solution for the heavy simulation time, is to run cloth on a simple object and then skin your final mesh to that object in some way. In max we place points on the simplified cloth object, then snap bones to those points. That way you can capture a sim like quality but you can animate the bones to get the cloth back into a root pose or fix an area the sim behaves poorly on. For the most part the sim takes care of the collision and once its set up its fairly easy to work with.
Of course that all depends on the engine, how it handles bones, if you can use floating bones, bla bla bla.
A few games like Alan Wake and LA Noir had specific cloth simulations built into their engines and handled them in different ways.
http://www.gamasutra.com/view/feature/4383/the_secrets_of_cloth_simulation_in_.php?print=1
I have not done a whole lot of hair and capes myself as I am not an animator, but from my experience working on games, I think the best way to keep it from clipping into things is to set up collision boxes around the character or other objects.
How this is handled I believe has a lot to do with what engine you are using. Some engines may have their collision solutions while others may need you to create them in your 3d package and export them as separate objects.
I could be wrong on this but I believe that is how it works. Some of the other animators, such as Mark aka Vig, may have a better insight into how this work.
edit : lol mark beat me to the post.
The video in the first post is mine, and I would like to explain how it`s made.
I hope you excuse my English, I`ll try to explain with simple words.
- Case:: to make illusion of cloth without simulations. Yes, we can use PhysX cloth, but it is heavy, especially for MMO game with lot of players and NPC`s. So, I search a solution to make good cloth motion only with standard Bones (in 3DSMAX 9).
- Problem: If I make standard bone rig of this "skirt" (yes, this is a mackintosh, but technically this is "skirt", because only the bottom part moves), with standart controllers, will be a lot of work to animate every of ~15-20 bones. And second - this is secondary animation, and every time you change the human motion (fix something) you need to adjust and skirt animation, by hand ! So - without automatisation this is lot of hard work !
- Brief decision: Very simple ! I make real cloth simulation in my MAX, loop it, and constrain my Bones to vertices of simulated mesh. So, skirt Bones are driven by some hidden simulated mesh, but the real model is skinned to these Bones and with some skinning work it moves exactly like a simulation. When export animation to the engine, the exporter just sample bone motion, no matter how they are constrained.
---- This is brief explanation, "ideology".
If someone interests in details, I can describe \technically this was a little challenge), but let this be in another post, because it took lot of time to me to write in English - I use diction and check every word, and this is boring... Sorry!
Imagine how heavy it will be to run simulation for these animation sequences.Thats why I am opting for dynamic ik splines.I have tried using wire deformers for the cape and hair but that means I would have to animate it manually and that would take time.My major problem is collisions.
I saw the making of heavenly sword video and they used bones for the hair and it was done in motionbuilder.
Also saw this in the Hair Technique wiki on polycount:
This image is from square enix.It shows how Lightning's hair was rigged for animation.My guess is that they rigged her hair and cape and used dynamic ik spline to simulate the movements.What blows me away is the cape in the game,it moves realistically and still stays in place.
BTW,Are there tutorial videos that show how to use this methods you have mentioned?
[ame]
Advantage of this method is simplicity and speed, which is priority for making game rigs (and this pictures is exactly game rig, i think). Disadvantage is low-quality motion. Quality, which is well enough for game, is not enough for cinematic.
I should make this with cloth simulation of some proxy-mesh. Common error in simulations is to make sim with high-poly model. This is no need !
Make some low-poly variant for every strand of hair, just a few polys, with REGULAR topology (this is important, because in real model faces are with different size and this slow down the simulation). Make such "proxy" low - model for the head (deflector in simulation) and simulate only these proxy objects. This is fast and easy. If you are satisfied in simulation, then SkinWrap (Wrap Deformer in Maya) real model to these "proxies".
http://www.polycount.com/forum/showpost.php?p=1021761&postcount=17
Mark,seems like you are a pro in this aspect.If its not too much trouble,you should do a tutorial video detailing this technique and send to all these tutorial websites with link to your original website.You are very talented.
Tutorial videos are self explanatory.If possible,in Maya.It will go a long way in helping us,newbies.
So I should create a high cloth simulation of the cape and create like three bones on the cloth and bake the simulation to the bones and then use the bones to drive the new cape and hide the initial simulated cloth or delete it?
Demiurg
I think I am gonna try it,using a low res mesh of the cape and use it as a warp deformer to drive the high res one.Thanks.
Just wish Maya hair had better geo collisions like ncloth.All you have are collision spheres.I am thinking of using Maya dynamic curve to simulate the cloth and make the cloth ncloth and turn off everything except the collisions.The curve will drive the cape movements and the ncloth solver handles collisions.That will reduce the heavy simulations.
- @ Mark Dygert - really good explanation! I use the same way, with only difference I use Bones, not Dummys, and create automatically these Points and attach them to selected vertices via macroscript. I would like to make add to your great tutorial with this macroscript:
http://dox.bg/files/dw?a=33e28953bd
-- save it to your "..\enu\UI\macroscripts" - directory and search it in category "Masthead Tools".
Script work ONLY with Edit Mesh (sorry for that, but Attachment Constraint uses mesh-faces, not Poly-faces), so you need to add one "Mesh Select" modifier if you work with Poly.
If I remember correctly, they were rigging the cape with bones, then use cloth simulations on the cape so it'd move accordingly to it's mass&stuff, and then they'd project the key of the cloth simulation onto the rigged cape
@Demiurg : Your video seems awfully like the hair rigging used on Star Ocean : The last hope, It'd behave the same way. Pretty cool and easy way to animate some hair (ponytail and such) for them to move accordingly to the character's animation :
http://youtu.be/aweFsvzjkLc
(Sorry for the title of the video, it's the best one I could find in which you see her hair...even though it's focused on her butt)
Or maybe that's just done with physics~
Anyway as it has been said before, it mostly depends on the game engine
@e-freak
For cutscenes,but I am trying to keep things light on simulations and textures.So its gonna look like in game cutscenes.I will probably use After effects to composite the scenes and add effects to make it look lifelike or realistic like a prerendered animation sequence.
The point of the simulation is just for giving a realistic look to it, but nothing keeps you from modifying afterward and so on. (Especially if you baked some capes and clothes and they keeps getting into the character's mesh, then you can correct it so it won't)
Hopes' that helps
Guys,I wanna ask:
In rigging using Maya,is it possible to tweak the vertices in a particular possition for say the shoulder and then move the bones to another position and tweak the vertices so when you move the shoulder between those two positions the vertices stay within those two places.This is possible in Mudbox.
In Maya,you have to paint skin weights.I am having MEGA-LUTIVE problem with the shoulder area of my model and I used this method:I used the no 2.method whenever I try to carry the arms up like hanging from a pole with the model,the underarm bulges out.I have tried to paint the weights towards the chest bones so it goes in but nope.Can't we just tweak points instead like in Mudbox when you move the part of the mesh in as you use the pose tools on your model??
In MAX we have modifier "Skin Morph" who do this - when bones moved to definite position, then vertices moved to definite morph target. You can do the same in Maya, with few Blend Shapes, connected to Utility Nodes via Connection Editor, or Set Driven Key (sorry, I`m not a Maya user).
About the topology - I work with first type, but I made a stretchy bones for more important muscles (pseudo muscle simulation). Even if the character is not so muscular, these bones just keep volumes of muscles (shoulders - deltoid muscles).
In the skin modifier max also has, joint angle deformer, Bulge Angle Deformer and morph angle deformer. These do pretty much what skin morph does but work inside of skin instead of on top of it so they're a little faster and each does slightly different effects. They are all pretty straight forward to use like skin morph, pose your joint at the start pose, pose it at the end, arrange the verts to look good and off you go.
I think in Maya they are called "corrective blendshapes" and you have to hook them up like Demiurg described. You can do it manually like that in max using either wire parameters or reaction manager (the direct equivalent to driven keys) but you really don't need to.
There are probably some tools to make them as quickly and easily as in max with skin morph or the joint angle deformers in skin. So you should probably poke around creative crash or some dedicated rigging/skinning tools.
Shoulders are always a nightmare so don't feel bad, they give everyone a bad time. As for the topoplogy they both seem fine I've worked with both set ups. You might run into a problem in the shoulder blades because its a little sparse on geometry back there but it depends on the game, the character and the type of rigging allowed. Games get a bad rap for having bad weighting and horrible low joint counts but that's what you get when your team wants to spend its tech budget on making sure you can see your reflection on a candy wrapper as it floats on a beautiful water shader...
Also remember that when you lift the arms above the head it's important to also lift the clavicle (shoulder bone) it can also help greatly if the clav is setup to roll as well as pivot. And like monster pointed out a twist bone can also help with the candy wrapper effect.
@Demiurg & Dygert,I googled corrective blendshapes.Its kinda technical but I think this is the right way to go.I don't think Maya has all this tools you mentioned since I think Maya is tailored towards movies.
Since I am working on a cutscene,I am gonna try it out.
@monster
Thank goodness,I am not working on a game but isn't blendshapes used for facial animation in games??
Just found out about changing the deformation order by putting the tweak at the top of your skin cluster in the input window,you can then directly modify the vertices of the mesh,so I am thinking,move the joint to extreme positions,make the vertices right and save as a blendshape so,voila animation begins.Seems like a lot of blendshapes though.
Found a space deformation script,will check it out.
The twist bones are still a valid option for cinematic work, and can make creating the corrective blendshapes easier.
Blend shapes and Morph Targets are used in game, but they are usually driven by preset animation data and not by dynamic joint movement.
UPDATE:
I tried the corrective blendshape with the model,encountered a lot of problems,then I realized the target model must be in the bindpose for it to work without problems.So I tweaked the shoulder area of the target model while observing how the tweak affects the rigged model in various positions.The shoulder looks good now on the rigged model at different positions including upwards(didn't use driven keys cause shoulder has like 4 different rotations). I am using IK for the shoulder to the hand.Should I remove the ik and animate the shoulder with FK?
Another problem is I can't paint skin weights on my rigged model anymore after this.Was I suppose to complete painting the skin weights for all the body parts first before using corrective blendshapes?
I am kinda getting frustrated.In 2d animation,all I needed to do was draw and colour my frames but I know I have to be patient and see this through cause when everything is set,animation is very easy and there is no need to draw hundred frames for a camera shot.Imagine drawing each frame for a 15 mins animation and detailing it with colour at 24 fps.
[ame]
The script used here is called Hyper real corrective shape script by Eric Miller.
Demiurg,so you don't use corrective blendshapes for your rigging?I have been running into problems with my blendshaping.Getting dependency graph errors.Did you smooth bind it or use rigid binding?
I am gonna try your style.I saw this video:
http://vimeo.com/20228514
In the footage,It seems every vertices has stretch bones attached to them.Seems like a lot of work but the results are really good.
I wonder how the character in Uncharted was rigged.His arm moving upwards doesn't show any bad deformations.Wonder what I am doing wrong.
Does anyone know how stretchy bones can be created in Maya?
EDIT:No worries,will do the research on my own,probably asking too much unnecessary questions.
Thanks for the help.