PDA

View Full Version : IK'd bones animation - baking?


gordonbaty
12-03-2005, 06:58 PM
I can't work this out... I've got a character with bones and IK to help with posing it. All I want to do is to put the character model in a simple pose and export it to W3D, but every time I do an export Layout crashes straight away. I'm pretty sure my weight maps are all good (thank you, petterms!) so I my best guess is the IK. But I can't work out how to bake the bone positions so that I can strip out the IK (assuming that's my solution). Can anyone help? So far I've found motion baking in the dope track and motion options window but I can't get either to work for me. Can anyone help??

mdoyle
12-06-2005, 12:05 PM
It really depends on your ik setup. Basically if you have any goal targets on your models or rig then u can almost forget about it. if you don't have goal targets to pose your character then yes bake your motions with motion baker or some other plugin you can find on flay and it should export. If the there is only one weight map per bone and no points share a weight map you should be ok.

The problem with lightwave just now is that if you use goal targets in your rig, lightwave doesn't really see a bone rotating so it can't bake the rotation of the bone and therefore when you delete the goals your character won't animate right. Someone wrote me a plugin a while ago to get round this but I have not done a new character in shockwave that needs this in a while (mostly doing scenes just now) but will see if I can find it again. The other work around is just to hand animte each bone. I have tried loads of combinations to get round the goal target btu the only one that worked was this goal orientation lscript that I had. Will try and find it.

gordonbaty
12-06-2005, 02:38 PM
Ah, OK, that's exactly my problem. I noticed that stripping out the goals stopped LW from crashing on export, but I couldn't figure out how to do it without losing the animation. I can't believe you can't bake the bone positions...oh well.

I guess when you talk about positioning each bone by hand you mean without any IK... which isn't an appealing prospect. I really want to avoid that if at all possible - if you could find that LScript I'll be eternally grateful! If not, do you have any suggestions on who could put one together for me?

mdoyle
12-07-2005, 04:07 AM
I have loads of plugins sitting here, Can't remember which one it is, Do you have an example scene file that already has been weighted properly and I will get it baked for u and see if I can get in touch with the original writer to ask about letting it go. But in the mean time I can set it up for u??

mdoyle
12-07-2005, 04:23 AM
Oh just remembered. In the mean time u can do it another way but its really a pain in the neck to do. If u have 2 copies of the the animation. Have one which its rigged and then use a some follower plugins to copy the animations of the first one it will work. I managed to get this working at the time but I can't remember which follower or motion plugins it was cos I really spent about 2 weeks trying to get this right and it never really did. Will let u know about the other plugin as soon as possible. WIll fix any scenes u have in the mean time if u want

gordonbaty
12-07-2005, 02:19 PM
Thanks for offering, I really appreciate it. I'm trying to establish my workflow at the moment to produce a lot of animations and I'm working with an in-progress model so it's probably not worth fixing it just now in case the bones aren't what I use for the final. The follower thing sounds like it's worth a try, I've not really used plugins before but I guess I need to learn up on it.

mdoyle
12-08-2005, 04:20 AM
The follower thing does work but its a pain. It means u need to have 2 rigs and then every time u want to export the final one u need to bake and delete the other. And well the setup is a pain at first, but I suppose once u create it once and hide then u r cool. Will let u know how I get on with the plugin.

Good luck

gordonbaty
12-08-2005, 11:08 AM
I think I may have found the follower plugin - well not exactly because the website no longer exists. I've found references to MotionMap.p by Colin Cohen (eg, on http://www.thomas4d.com/html/free_plugin_list.html)

Would that be it?

mdoyle
12-08-2005, 11:47 AM
Nope, never used that. Sounds like it could have been a nice plugin. I can't remember what I messed about with now. It was so long and becasue I got an alternative I never thought of trying to remember what it was. Sorry. But will keep u posted

gordonbaty
12-08-2005, 11:21 PM
I found a plugin on a Japanese site (lucky Google search) that seems to do the job:

http://www.dstorm.co.jp/products/plugin_j/motion.htm#BakeIKtoKey

It does actually bake the bone positions so that they remain after you strip out the IK!

Next problem: the animation looks nothing like what I set up in LW! Seems to be the case even if I don't use IK from the start *sigh*...

mdoyle
12-09-2005, 04:07 AM
Did you try that on goal targets with ik for arms and legs? I think I found that before and it didn't work for me. Will give it a go and try it out and let u know.

mdoyle
12-09-2005, 04:16 AM
Ok it did work. Maybe it was that one after all. But I am sure I had to use a match goal orientation to work instead of the goal target because it didn't work every time or it depended on how the targets etc were parented. Will look into it properly over the next wee while. I am going back to animating a set of arms for a game type thing so will give it a go then.

At least u have it working now :D

gordonbaty
12-09-2005, 08:49 AM
:thumbsup: Yup, got *that* issue out of the way for now. I think I found every plugin website in existence too...

Thanks for the help, it probably won't be long before I'm throwing up the Help sign again!!

Gordon

SplineGod
12-10-2005, 05:08 AM
Lightwaves motion baker will bake out IK onto the bone. DStorms will bake IK also. In both cases you can remove the IK after baking. If you use IKBooster you dont need to bake because the IK data is already baked into the bones. You could also use parttime IK in LW where you basically use the IK to help with posting but keyframes are on the bones. Colin Cohen also has a couple of plugins called IKKey and FKGoal which is another form of parttime IK.
For the problem with match goal thre is a 3rd party match goal plugin that does bake. Check on Flay.com

gordonbaty
12-10-2005, 01:46 PM
Thanks SplineGod, I actually have looked everywhere for Colin Cohen's plugins as they look very useful - but his site is down and there doesn't appear to be anywhere else to get them

I'll try out IK booster - I never suspected it would bake the bones, after the trouble I've had with normal IK

SplineGod
12-10-2005, 04:58 PM
As I said before, You CAN bake IK by using LWs built in motion baker plugins.
You can also bake IK using DStorms free IKBaker plugin.
IKBoost doesnt bake in the normal sense because it uses parttime IK so the motions are placed onto the bones instead of on Goal objects.
The first two things I mentioned are the easiest to try :)

MentalFish
12-11-2005, 06:14 PM
I have just had the same situation myself, and found this:

All bone transformations must be baked (as allready stated). I try to keep keyframes at an equal interval, and then create a keyframe on the topmost bone and all its children, and then remove all IK target models. They (the targets) seem to mess up the scene on export and should be removed before exporting.

I am working on a biped rig that does not use IK, but pre-defined sliders with constraints within themselves instead of inside the bones' constraint settings.

I'll post it as soon as it is post-worthy :)

gordonbaty
12-11-2005, 09:32 PM
I'd be very interested to see your rig, as I was watching your tutorials again last night, looking for something I might be missing! I also went over the Max rigging tutorial on Macromedia's site and tried to translate it to Lightwave-ese. Not sure how much all my research really helped, but I did have a eureka when my animations actually exported right! This time my rig was a very strict hierarchy and every bone was touching it's parent. I think it still needs a little work and I want to try these hold bones to get better deformation...

One strange thing though - when I quit and reloaded the scene, the deformations would only appear when 'use weight maps only' were turned OFF. I thought from stuff I've read that they had to be turned ON... ???

gordonbaty
12-11-2005, 10:39 PM
Correction... you when I reload the scene I have to turn 'use weight maps only' off - and then ON again. Otherwise the deformation is there but wrong. Well at least that makes a little more sense.

mdoyle
12-12-2005, 04:24 AM
As I said before, You CAN bake IK by using LWs built in motion baker plugins.
You can also bake IK using DStorms free IKBaker plugin.
IKBoost doesnt bake in the normal sense because it uses parttime IK so the motions are placed onto the bones instead of on Goal objects.
The first two things I mentioned are the easiest to try :)

I found that it was very difficuilt to bake an IK rig in lightwave with motion baker if you are using goal targets within the rig. For example if I had a left hand bone that which was the target of a null to move a wrist bone in the arm once, baked and the goal targeted was deleted then the motion for the ik would be lost as the actual bones did not have a real HPB value as it was matching the goal target.

The work around was with the bake IK to key and match goal orientation plugin. Is there something I am missing here splinegod which can be fixed? I got it working. I managed to get Jean-Philippe Savariault rig working with these plugins. This is the kind of example rig I am talking about in regards to goal targets.

http://www.puffandlarkin.com/lightwave/tutorials/character_rigging/

This rig managed to export fine to shockwave 3d and it is a vey easy righ to use for an non experienced animator to get animations working in shockwave especially since the shockwave engine is very limited in what u can do anyway

mdoyle
12-12-2005, 04:26 AM
oh and here is the link to march goal plugin

http://www.animationsnippets.com/plugins/

SplineGod
12-12-2005, 05:10 AM
Youre talking about two different things; IK and Match Goal Orientation. The IK should bake fine using motion baker or Dstorms IK Baker plugin. I would use IKBaker because it just alot easier. Match Goal wont bake which requires that 3rd party match goal plugin.
Heres something else you can try:
Instead of using match goal orientation use Orient Contraints. That will give you the same result as match goal except that it will bake by using motion baker. :)

mdoyle
12-12-2005, 05:13 AM
Might give that a go then. Never really used orient constraints as I am not a great animator myself and have just dod bits here and there. Am looking to get into properly so thanks for info. Will have a look and see if I can find it

jasonwestmas
12-13-2005, 04:38 PM
Orient Constraint, where is that? I can't find it anywhere. Or is it a plugin on flay?

SplineGod
12-13-2005, 04:42 PM
Its built into LW in the motion panel. :)

jasonwestmas
12-13-2005, 05:19 PM
It's called Simple Orient Constraint. I was looking under the 'O's :foreheads

Dodgy
12-14-2005, 05:41 AM
The best way is using the BakeIKtoKey plugin. You do have to remember it only affects items which have IK set as the controller for some of their channels, so if you're using Simple Orient Constraint on the foot, (to get match goal orientation functionality and still be able to bake it) you have to set the foot's channel controllers to IK. You also have to bear in mind it'll change those channels back to FK when it's done, so backup your carefully set up scene first :)

You can use Motion baker instead, applying it to each bone and setting it to use original channels and only set it to bake the channels which use IK. This is nice because it updates key frames as you scroll through them if you make changes to the motion later on, but is much more manual to set up and turn on and off and key reduce. So BakeIktoKeys is better if you remember to keep a scene backup.

You can them follow that with KeyStrainer (http://www.tmproductions.com/FrameSets/FS-Products.html) and set it to smart freeze and it'll reduce the number of keys in those motions.

Great combo for game artists :)

MentalFish
02-03-2006, 05:58 PM
Here is the rig as promised. The reason for having the bones set up this way, is that when a model is parented to the bones' position and rotation, you will have more control over what is going on. I am also planning a ragdoll system for a rig like this, and then I definately need a model with "predictable" bones tranformations.

http://petter.ms/forum/w3d_rig.png

Download the rig here:
http://petter.ms/lw2sw/w3d_rig.zip

gordonbaty
02-04-2006, 10:13 PM
Wow, this is very interesting. I thought the bones had to be connected, as in a conventional bones skeletion, for it to work in W3D format. Why did you choose this way to place the bones? Is it so you can easily use the rig with multiple models? I see that you just have to have the bones positioned on the joints, which might make it easier. Or is it simply that you like to see the bones more clearly? Thanks for sharing - I've found your posts extremely helpful with my learning curve on W3D.

Gordon

MentalFish
02-05-2006, 07:53 AM
Glad to be of help, I dont gain anything by keeping it to myself :) "sharing knowledge gooood"

Yes, that is the essence of why I chose to do it this way. The only thing I have to do now, after creating dozens of animations and exporting them individually as animations, is to export the models at the neutral pose and apply the animation from previous W3D exports through code. Since the animations are all based on rotation only, it does not matter if the animated character is 1/10th of the size (or different proportions) than the original. But if you are making a troll, i guess would might want to custom make some animations for it, as it is walking quite differently than the average human. Before this will work 100% I have to take this rig one step further, and add a "toes" bone on each side, and these bones will be the ones deciding the up/down movement of the character. That means I will remove the up down movement from the root bone in the animation, and steer the up down movement based on the position the toes bone have to the ground.

Check out the "toon" line around the character, its basically a smooth scaled version of the same model with its polygons inverted and black surface :)

Oh and on the issue of connected bones, they are really just bones pointing at each other with the rest length long enough so they look connected. These bones have the exact same parenting, but no "pointing" at eachother. But I must admit, it looks nicer when they are connected :)

gordonbaty
02-05-2006, 11:33 AM
Ha ha! Awesome. :-)
I couldn't figure out how you got the toon line. Very very nice. Isn't there a toon shader in Shockwave? I haven't tried it.

In case you hadn't guessed, I'm working on a figure for shockwave myself. It's quite experimental at this point (and I'm too embarrassed to post it) and I'm only just learning lightwave and shockwave for the first time, but once it works a little better I'll share. I'm aiming for something a little more detailed, with fingers and facial expressions. 100% weight maps aren't really ideal but I seem to be able to get some pretty good results.

MentalFish
02-05-2006, 07:00 PM
Yes there is a toon shader in ShockWave, but it only provides a 1 pixel wide outline, which is no good.

In terms of facial expressions, I was thinking of adding a jawbone, for some mouth movement, but nothing more. If I want some interactive 3D with facial expressions, I guess I will have to use PIM :)