Monday, June 30, 2014

Tool idea correcting scale when exporting ZBrush blendshape to Maya

Hi,

I was running into a scaling issue when i was exporting sculpted mesh in ZBrush back into Maya.  So i'm thinking of writing a tool that given the Maya default shape and the default shape exported from ZBrush and the ZBrush sculpted blendshapes; it will resize all the ZBrush meshes so they match the Maya's default mesh.

Basically the idea is to figure out the offset of the ZBrush default mesh from the Maya mesh, then add this offset onto all the ZBrush meshes so their scales would match the Maya's default mesh.

i'm not sure if this method would work but maybe i could feed
the zbrush default into the maya default creating a new mesh "meshCombine".

then maybe feed zbrush default mesh into meshCombine but putting -1 on the zbrush default mesh giving a new mesh "mayaOffset". that is (zbrush default + "mayaOffset" = maya default)

then i think can feed each of the Zbrush sculpted blendshapes and the "mayaOffset" mesh into a new default maya mesh (both set to 1) and i think the resulting mesh is a sculpted blendshape but with okay scale.

Maybe this is helpful

cheers,
Nate

on a side tip:
deleting a connection and reading out the script editor is a great way to find what plug is involved in hooking up some piece of a rig in Maya. (then can just undo to recover where were previously, maybe would want to back up scene just in case though).   I did this type of thing to see how to substitute a new shape node into an existing blendnode in place of an older one while keeping animation already made.   sometimes there maybe lots of connections so doing a hypergraph connections with node selected can see whether lots of things involved.