PDA

View Full Version : Engine IK's and Blenshape Questions



stuartb
02-21-2010, 04:15 AM
Just starting with the character setup for the UDK. I'm using maya 2010, rigged numerous characters but none for game engines. Have two quick questions about using blendshapes and the editor IK's, any insight on these two areas would be sweet! :D

---

First, the editor IK's. I went through the documentation on how to set them up, no problem there, my question is, how necessary are they? The reason is that I won't be able to create a stretchy arm or leg rig for any of my characters, which is a definite drawback for the type of animations I'll be doing. (won't be able to use the editor IK's since it requires a 2 joint arm system, the reason why the documentation recommends separate ulna twist bones not parented down the chain; stretchy arms require more joints)

Is it a huge loss not to have the editor IK's to fix different blends on the fly? We'll be using melee weapons, so getting nice looking poses with stretchy arms is a big plus, not to mention quick fixing elbow pops.

I really don't know how to decide which would be more beneficial for me in the long run having never used the editor before. Any advice on this matter would be super fantastic!

---

Second, blendshapes in the editor. The documentation was a bit fuzzy on the application of blendshapes, was focused more on how to get them into the editor. Does anyone have experience using blendshapes with UDK to fix deformations/volume loss in typical trouble areas (elbows/shoulders/etc)?

I've always used Pose Base Deformers to fix spotty volume loss with the maya comet scripts. The script handles all the joint orientation blending based off the angle of the cone; really never had to think about it once the blendshapes were created.

My specific question about the UDK is, If I create a blendshape for say, shoulderUP, is it possible to play back that blendshape gradually over a certain time-span of the animation? Also, are blendshapes applied before or after the skeleton deformations (really important)? Or maybe it works entirely different. My main concern is that the UDK blendshapes act like on and off switches, its either applied or it's not, which won't help create really nice deformations.

If anyone has insight on using blendshapes effectively with the UDK, I would super appreciate any tips!

Thanks!
-cheers

Stuartb

Denny
02-21-2010, 05:27 AM
IK: Not really necessary, you can solve the issues in other ways. The stretchy arms are definitely a setback for using IKs, but I believe a middleground could be found if you make the stretchy bones as separate childs just like you do with the wrist bone in a typical setup.

Blendshapes: You use Maya which is going to help you a lot, there's a Maya only feature in regards to UDK which is called Morph Target Tracks. If you have a blendshape in Maya that's driven or keyframed, it will be exported as a morph target track by the same name. The morph target evaluation order I'm uncertain of, but you can mix skeletal animation and morph targets, you just have to make tests and see how you must work with it. Check the tutorial link in my signature and you'll find a video for setting up blend shapes so it works for morph target tracks in UDK.

If you need any more help I'd gladly assist. :)

stuartb
02-21-2010, 06:44 AM
Thanks for the info Denny! Really appreciate it.

Sounds like the IK's aren't too big a deal. If it's just a difference between fixing it in maya real quick and re-exporting, then stretchy arms I think wins the day.

About your middleground idea...



I typically use the standard 3 arm chains for the IK/FK strechy, without matching since I never use it. (skeleton 8jnt chain, 2joint IK guide bones, and the 8jnt chain FK). If I add a 4th set to the rig, second set under the exported clavicle jnt and don't weight it, but parent constrain it to the IK guide bones, could I use that for the IK in the editor?

Hm, not sure if that's clear.

This would be the weighted joint chain from the clavicle:
- bn_L_clavicle
- bn_L_shoulder
- bn_L_humerus_A
- bn_L_humerus_B
- bn_L_humerus_C
- bn_L_elbow
- bn_L_ulna_A
- bn_L_ulna_B
- bn_L_ulna_C
- bn_L_wrist

Then also from the clavicle I would create 3 bones for the editor IK (not weighted to anything, but exported with the skeleton:
- bn_L_clavicle
- bn_L_shoulder_editorIK ---> parentConstraint to bn_L_shoulder_guideIK_ignore
- bn_L_elbow_editorIK ---> parentConstraint to bn_L_elbow_guideIK
- bn_L_wrist_editorIK ---> parentConstraint to bn_L_wrist_guideIK

The guideIK bones obviously aren't in the exported skeleton chain, they're just part of the rig.

Now, if I exported this setup, the editorIK bones would match the key points of the weighted stretchy arm. The question is: once in the editor, can I use them even though they aren't weighted to the mesh. I'm guessing no... but never hurts to ask hehe.

---

Regarding the morph targets, great quick vid on morph targets and the editor. Looks pretty easy. My only question is, how many blend shapes can you apply in the editor to 1 animation? When I use Pose Base Deformations I typically have anywhere between12-30 targets for the entire body. (4 shoulder morphs, 2-3 elbow morphs, etc, same for legs and then mirrowed for the other side) This is probably overkill for game characters, since I use that technique for very high polygon count render meshses.

And finally, how big of a hit do morph targets have on performance. Probably an important thing to consider since people have very different machines.

Thanks a bunch Denny :)
-stuartb

Denny
02-21-2010, 07:00 AM
IKs in the editor works like a typical IK in Maya, if you have joints inbetween they're going to bend along, in Maya you usually have a secondary chain to not bend the ulna/humerus joints which I believe can't be done in Unreal without custom coding. IKs in the editor affects the skinned joints directly, you can use IK bones to guide them, but it's like using an external joint to point constraint the IK handle and pole vector in Maya. I don't know of any constraints in Unreal to be honest, except with Physical Assets.

Morph targets are additive but I don't know the engine limit, you can have pretty many and I believe performance would be your limit.

I'm a bit curious, what is it you're working on? It's not usual to see competent riggers around these parts. ;)

stuartb
02-21-2010, 07:09 AM
I just re-read my post and realized how stupid it was. I was thinking you have to have the humerusA-C and ulnaA-C bones down the arm hierarchy to properly point constrain them between the shoulder/elbow/wrist joints. This isn't the case though. DOH!

Ignore the quoted part of my last post, lol, guess that's what I get for writing it at 4am. Have a clear picture on how to setup stretchy arms and still get access to the editor IK tool.

---

Been working on a mod for the source engine for awhile, but had to use 3dsmax due to export limitations on what we needed. We just recently decided to switch and use the UDK since we are back at the beginning of a development cycle after 2 prior releases, although can't release the name since we haven't announced it yet :P

Me personally, I'm about to graduate from animationmentor.com (online anim school) but have been learning the in's and out's of rigging and mel on the side for the past 2 years. Heard awhile back that to it helps a lot to have rigging knowledge if you want to work for any game studio outside the heavy hitters.

Thanks again for you're insight though Denny! Much appreciated.
-cheers

Denny
02-21-2010, 08:18 AM
The little experience I've had in the industry so far shows that you have two possibilities;

1. You land a job at a big studio, they need specialists so one area of expertise is usually what's necessary.
2. You land a job at a small studio, less manpower needs more versatile skills from each person. I myself have modelled, textured, rigged, animated, made placeholder sounds, level designed a bit, helped optimized our game and the list goes on, although I was hired to just animate.

So it's as you say, it doesn't hurt to know rigging if you plan on joining a smaller studio. :D

p.s. I sent a PM.

hoek
04-12-2010, 09:03 AM
Hi stuartb and denny,

Would you guys help me?

I m stuck with a rig issue.

I have a character in max, rigged and skinned (biped) and I m using 2 twist bones. This bones are child of the UpperArm, well, that's how biped arrange the hierarchy and we can have the right chain in order to use a IKlimb in UDK.

SO, I already finished the Physic Asset and it looks everything is allright.....but, UPS!, twist bones are getting out! What a mess....:confused:

The movements or this twist bones are guide it from the upperArm, and it gets such weird ragdoll when I test it.

I m trying to "weld" the bodies to the foreArm (where this bones should move) but it says: "you can only weld parent/child pairs"

How this twist bones can reach the foreArm in order to watch a correct ragdoll??

Thanks guys!!! :)

Denny
04-12-2010, 09:09 AM
Your arm hierarchy must look like this;

Correct
...|_ ForeArm
......|_ Wrist (twist)
......|_ Hand
.........|_ Finger
.........|_ etc

NOT correct
...|_ ForeArm
......|_ Wrist (twist)
.........|_ Hand
............|_ Finger
............|_ etc

Difference is that the twist bone should not have any children so the IK can work properly.

hoek
04-12-2010, 09:24 AM
Your arm hierarchy must look like this;

Correct
...|_ ForeArm
......|_ Wrist (twist)
......|_ Hand
.........|_ Finger
.........|_ etc

NOT correct
...|_ ForeArm
......|_ Wrist (twist)
.........|_ Hand
............|_ Finger
............|_ etc

Difference is that the twist bone should not have any children so the IK can work properly.

wow! that was a call a FAST answer :)

MMM...I m still confused. THat's what I already have, but look what it the problem denny:


http://www.bambini.cl/twist_physic.jpg

The twist bones doesn't not seem to hold correctly. Help?

hoek
04-12-2010, 12:00 PM
I m sorry Denny. I was afraid to change the hierarchy in max, but I did. I parented those twist bones to the foreArm, exported and integrated again and .......wuala! Everything is working. :)

Thanks a lot! ;)

Hitpawz
04-12-2010, 01:29 PM
You could of ditched the wrist body and linked the hand to the forearm in PHAT too. Actually you want to do that to avoid too many bodies and constraints because too many of those on too many dead characters at once lags out the engine big time.

hoek
04-12-2010, 01:38 PM
Hey, thnks Hitpawz, but again, how can you link differents bodies in differents hierarchies in PHAT?
I know I can weld some to economize, but the original hierarchy rules....so...how?

Braindrain85
05-30-2012, 04:40 PM
Your arm hierarchy must look like this;

Correct
...|_ ForeArm
......|_ Wrist (twist)
......|_ Hand
.........|_ Finger
.........|_ etc

NOT correct
...|_ ForeArm
......|_ Wrist (twist)
.........|_ Hand
............|_ Finger
............|_ etc

Difference is that the twist bone should not have any children so the IK can work properly.


THX very much Denny! You are a true lifesaver!