Starting out big.

I've been working as a technical modeller for two months now, after a four year game design education. Speed and low polycount is crucial so, shortcuts are the key.

I've come across one problem, i wish to solve with scripting.

Converting animation constraints, ie look-at-constraint to keyframes.

This is because our in-house exporter and simulator can't handle dummies or that kind of thing.

The way i've been doing it is manually copying and pasting every rotation coordinate for 100 frames. It needs to end! rawr.


Tanke's picture

Thanks for the help and

Thanks for the help and suggestions guys, I will look more into it when I get time.

For now I found a script that does what i need; Mesh_Baker. Seems like the best way to do it, although i will look into scripting one myself, to learn.

KaSa's method seems very promising and I will test it out later today.

As for keyframes, there is no limit, i can have as many keyframes as i like without boggling down our simulator.

The most important thing is the accuracy, it needs to be precise down to a 0,001 unit on all frames, being Oil related machinery.

Thanks again for the help guys!

KaSa's picture

If you just need a less

If you just need a less painful way to do it, you can open the Motion panel and go to Trajectories. From there you can set your animation range and number of samples and then press Collapse. It will assign a default controller to the object and set keys at the interval you specify. Sometimes a bit of cleanup is necessary afterward, but in general it works pretty well. It works on multiple objects, too.


The above suggestion is the

The above suggestion is the winner but I am going to throw this out there any way. If we use expose transform to expose the rotation of the look at constrained node in relation to a misc ref node most likely aligned to same axis as object, we can then wire a seperate object to that the local euler expose transform of the Expose transform helper. Next we make use of an interesting thing that happens when you press disconnect in the wire dialogue. It creates keyframes for the object which contain the rotation movement of the look at constrained object. This technique is inferior to the above in several ways not the least of which it requires you to create equivalent objects for all of your constrained objects. Also it creates keys at every frame which you may or may not want.