# Bake constrainted motion?

**URL:** https://forum.highend3d.com/t/bake-constrainted-motion/19102
**Category:** Maya
**Tags:** animation
**Created:** [January 20, 2003, 10:59am UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102 "2003-01-20T10:59:15Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![kamsvag](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kamsvag/32/386_2.png) [@kamsvag](https://forum.highend3d.com/u/kamsvag)
#### Post date: [January 20, 2003, 10:59am UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102/1 "2003-01-20T10:59:15Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [January 20, 2003, 11:56am UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102/2 "2003-01-20T11:56:02Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![kamsvag](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kamsvag/32/386_2.png) [@kamsvag](https://forum.highend3d.com/u/kamsvag)
#### Post date: [January 20, 2003, 1:30pm UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102/3 "2003-01-20T13:30:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mantrid](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/m/a87d85/32.png) [@mantrid](https://forum.highend3d.com/u/mantrid)
#### Post date: [January 20, 2003, 8:05pm UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102/4 "2003-01-20T20:05:22Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kamsvag](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kamsvag/32/386_2.png) [@kamsvag](https://forum.highend3d.com/u/kamsvag)
#### Post date: [January 21, 2003, 1:00am UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102/5 "2003-01-21T01:00:02Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![nonquad](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/n/eb9ed0/32.png) [@nonquad](https://forum.highend3d.com/u/nonquad)
#### Post date: [January 21, 2003, 3:08am UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102/6 "2003-01-21T03:08:04Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kamsvag](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kamsvag/32/386_2.png) [@kamsvag](https://forum.highend3d.com/u/kamsvag)
#### Post date: [January 21, 2003, 3:51am UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102/7 "2003-01-21T03:51:03Z")

</div>

YEAH it works thanks!!!!!!

---

<div class="post-metadata">

### Author: ![mantrid](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/m/a87d85/32.png) [@mantrid](https://forum.highend3d.com/u/mantrid)
#### Post date: [January 21, 2003, 6:53pm UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102/8 "2003-01-21T18:53:37Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![nonquad](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/n/eb9ed0/32.png) [@nonquad](https://forum.highend3d.com/u/nonquad)
#### Post date: [January 21, 2003, 9:17pm UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102/9 "2003-01-21T21:17:49Z")

</div>

I was checking it on an old 4.0 installation.

Perhaps it was changed in 4.5?

---

<div class="post-metadata">

### Author: ![alaa\_hesham\_soliman](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@alaa\_hesham\_soliman](https://forum.highend3d.com/u/alaa_hesham_soliman)
#### Post date: [November 18, 2021, 9:55am UTC](https://forum.highend3d.com/t/bake-constrainted-motion/19102/10 "2021-11-18T09:55:58Z")

</div>

Can not thank you enough . Your answer is beneficial till 2021 . May god bless your life .
