Home Website Youtube GitHub

Spring baking in mgear

Hiya,
Sorry for the stupid question
I’m having trouble with springs in mgear, I’d like to bake them, and I’ve added them to the synoptic (by going to the group ‘rig’ that’s generated from a build, and adding biped,baker in the extra attributes so that the baker appears in the synoptic, however when i click bake, nothing happens, in the script editor i get

Using root: rig_grp

Traceback (most recent call last):

File “C:\Users\andru\Documents\maya\modules\scripts\mgear\synoptic\widgets.py”, line 64, in mousePressEvent

utils.bakeSprings(model)

File “C:\Users\andru\Documents\maya\modules\scripts\mgear\core\utils.py”, line 208, in wrap

raise e

TypeError: ‘NoneType’ object is not iterable

I can just select the plot group and bake them using keys>bake selected, but then those objects don’t seem to work as springs any more, meaning no more revisions.
Is there a new method for dealing with springs ?

thanks!
Andrew

Sorry- I should also mention that If i use the bake spring nodes command in the rigbits menu I get a similar error

Error: TypeError: file C:\Users\andru\Documents\maya\modules\scripts\mgear\core\utils.py line 208: ‘NoneType’ object is not iterable

thanks
Andrew

Hmmm, maybe answered my own question, Our naming convention at work is to change rig to rig_grp,
this is what seems to break the connection to the baker- N’er mind fine people!

thanks
Andrew

I am still a little confused though- once you’ve baked nothing happens, there is a pair blend that’s set to the value in the spring intensity, so if you drop spring intensity down to zero on the springs control ui parent, the baked animation will then take over, but at 100% intensity, i can break that connection and set it how I’d like, or dial it in- inverse to the original value, but this seems like I’m doing it wrong- what’s the proper workflow for using springs ? if anyone could quickly describe the process i would be eternally grateful

thanks
Andrew

I don’t think there is much to it when it comes to springs. Once I’m happy with the animation I’ll bake the springs and then set their intensity to 0. Then I move all the keys in rig_PLOT_grp to an animation layer to blend in their intensity or smooth them out, do offsets, make loops, etc.

Yep, thanks Noll, yeh I do seem to have issues if the spring is set to lower than 1 then baking seems to cause some weird movement, but that’s a good technique, animation layer and blend to taste.
thanks!
Andrew

hehe I am glad I found that thread :wink:

The spring system was a nice surprise when I started using mGear but now I am wondering how it works.

From reading the posts above, I am guessing all work is done using the _cns nodes located in the *:rig_PLOT_grp (XSI naming?).

A value of 1 sets it to enable and 0 to disabled and to tweak the weight of the object and the behavior of the spring is to :

  • bake the spring system on an animation layer
  • set the C0 spring aim to a weight of 0 to disable the spring and use the baked values
  • tweak the weight of the animation layer to reduce the effect of the overlap
  • bake

Am I understanding correctly or there is an other way to work?

I also saw some old threads mentioning the use of the Synoptic but I have the feeling it is deprecated right?

Thanks