pshipkov Show full post »
djx
Turns out there is a simple workaround: turn off autoKeyframe (or wait for SP2)


Quote 0 0
indrema
Sorry guys I need some help to make Mush bake work.
1) I've opened mush example
2) select geo
3) copy first peter script in Python tab
4) run by pressing CTRL + Enter
I try to use the Sam script too but not work anyway... How I do wrong?
I' on Maya 2016. TNX!
Quote 0 0
pshipkov
SOuP now comes with nice tools with GUI for this kind of stuff.
Under the "wrench" button there is a tool called "bake deformations to fk skeleton".
Use that.
Quote 0 0
indrema
Double post
Quote 0 0
indrema
Double post
Quote 0 0
indrema
TNX for reply! It's work.
I've found a little problem on the related Command line:

Code:
 bakeDefsToFkSkel_SOuP().main(joint, nodes=None, maxInfluences=8, useRootJoint=True) 

In the code variable "joint" is not defined, here the fix:
Code:
 joint = cmds.ls(sl=1) bakeDefsToFkSkel_SOuP().main(joint[0], nodes=None, maxInfluences=8, useRootJoint=True) 

Hope this can help someone.

Quote 0 0
Zeedorf
Hi Peter and SOuP-ers

I found that would be nice to have an option for the bake arbitrary deformations tool. It places the joints kind of a random pattern to bake the deformation. I predict that there are situations (see below) where manually placed joints would produce better result or at least more useful for further keyframe animation.

JointArrangement_Auto.png 

JointArrangement_Manual.png 

So the tool could have an option take list of joints instead of generating them.
(joint per vertex would be another extra option)

Quote 0 0
pshipkov
Great idea.
Will add an option to use procedurally generated joints, custom ones or combination of both.
Quote 0 0
mickeal_alex
This tool is amazing, exactly what i was looking for, remembered seeing a tool that bakes deformers to joints using skinning for game engines( like the one we use at work that is very limited) made by NaughyDog and just when i thought maybe there is something in soup like that....BAM, just incredible Peter, you plugin is a lifesaver.
 One small thing i wanted to add, something very small you might consider adding to this amazing script, i was simulating an ncloth flag and i had a huge timerange and when i hit bake it went on and on, hit Escape and nothing happened , maybe add a time range like the one the guys at NaughtyDog made but other than that 10 out of 10 from me.
Cheers
Quote 0 0
pshipkov
Makes sense. Will do.
Quote 0 0
ralphymeijer
This is really cool to get the skinning 80 percent there with the delta mush and then bake it to skin weights.

I'm wondering, and maybe I'm missing something, how would this work when you have for example a rig where the skinning joints are not all in a fk joint hierarchy. This does not work straight out of the box with the current script right? One solution could be to temporarily unparent the skinning joints and parent them under a root joint, run the bake script and then reparent them. I think this could work fine however maybe I'm missing a more suitable workflow?

Cheers,

Ralph
Quote 0 0
pshipkov
For this you should use the "bake deformations to fk skeleton".
But the joints that deformer the geometry have to be free and in a consistent fk skeleton.
Quote 0 0
ralphymeijer
Thanks Peter,

Yeah that's what I thought. So now I wrote a little script that places all the skinning joints under a temporary root joint, runs the bake and then reparents them under their original parent. It seems to work except from the baking commandline. Probably doing something wrong. 

Code:

sel = pm.selected()
pm.select(cl=True)
rootJoint = pm.joint(n='tempRoot')

parents = []
joints = []
for s in sel[:-1]:
    parent = s.getParent()
    parents.append(parent)
    joints.append(s)
    
    pm.parent(s,rootJoint)
    
object = sel[-1].listRelatives(s=True)[0]
pm.select(sel[-1])
bakeDefsToFkSkel_SOuP().bake(rootJoint,nodes=None, maxInfluences=8, useRootJoint=True)
for jnt, parent in zip(joints, parents):
    pm.parent(jnt,parent)
pm.delete(rootJoint)


it throws an error saying:
Code:

// Error: Object tempRoot is invalid
# Traceback (most recent call last):
#   File "<maya console>", line 23, in <module>
#   File "<maya console>", line 2478, in bake
# TypeError: Object tempRoot is invalid //


Any idea what I'm doing wrong? It seems to work when I use the SOUP ui.

Thanks again!
Quote 0 0
ralphymeijer
Ok sorry I was using pymel. With cmds it's working. Feel a bit dumb now...
Quote 0 0
pshipkov
No worries. Glad you figured it out.
Quote 0 0

Add a Website Forum to your website.