Jan 2003
1 / 10
Jan 2003
Nov 2021

i have animated an object translation with geometry constrinat to a sphere so that it move on a sphere 's surface.
if I try to delete the sphere, the translation becomes stragint lines.
if i try to EDIT->keys->bake simulation before i delete the sphere, it bakes keys into everyframe, but after I delete the sphere, it results in same straight line motion

any way to do this?

and also for other kinds of constraint baking?

  • created

    Jan '03
  • last reply

    Nov '21
  • 9

    replies

  • 7.3k

    views

  • 5

    users

Yeah constraints arent simulations they are normal dag solvers. but there are ways to bake this too... only its not very smart unless you plan to export the data!

so how?

my situation is after i animate it using gemetry constaint
the subsequent animation wouldn't need the gemetry constriant otherwise it can't animate correctly

OK its fine...you have geometry constrained the object to another object...so just highlight all the translation and rotation attributes in the channel box of the object you wish to bake. Then go to edit>edit keys>bake simulation>OTPIONS. In there flick on "from channel box" and hit apply. Now that will by default bake every frame and will keep the object animated on the surface of the target surface constraint. If you want it to bake les frames, set its samples to more than 1. e.i. 2.0 will record every 2nd frame. Be warned however, it is dependant on fcurve interpolation. SO, if you give it samples of 5 or 10, then between say, frame 1 and 10, the ball will not completely remain true to the surface that it was constrained to as the fcurves will interpolate differently then the keyframes would have been set saving every frame...so you might even get just a straight line. In which case, play with the fcurve until it looks right.

the problem is after baking i have to unconstrint or delete the constrining gemetry and leave only the animated object
when i do that, the baked animation becomes straight line again...

any way to do that?

I don't use geometry constraints much... but I think I may see what's happening here. It sounds like the bake script is checking the object before it is snapped into place by the geometry constraint. Therefore even after you bake the channels, they are still recorded as a straight line motion, only held in place by the geo constraint.

What you can probably do, is duplicate your constrained object, and -point- constrain it to the one which is geometry constrained. Bake the channels on the point constrained object, and then delete all constraints. Hopefully, you will now have your channels properly written out on the second object, and you can copy them back to the original.

-- edit: I just checked my approach and it works

I don't know why the geometry constraint doesn't bake properly on its own... I think it may have to do with the way geometry constraints work. See, unlike most other constraints, geometry constraints do not own the transformation channels of the object; they allow the object to move, and then modify that motion on a per-frame basis. But by the same token, for a geometry constraint to work, it has to be applied as the very last stage internally. I think Alias was following this logic and tagged the geometry constraint code onto the very end of Maya's per-frame operations... but perhaps they forgot to move their bake checks down in the list to compensate. By using a point constraint as a second level of operations, you create a graph dependency on the geometry constraint, which forces it to evaluate before the point constraint and therefore the point constrained object can record the motion properly....

At least that's my best guess as to what's going on.

wierd that should happen...I just tried it on mine and I can remove the constraints fine after baking without it screwin up. But anyways, you found the solution, so thats good.

I was checking it on an old 4.0 installation.

Perhaps it was changed in 4.5?

18 years later

Suggested Topics

Want to read more? Browse other topics in Maya or view latest topics.