How to Reverse corrective Blendshape?

   4640   10   2
User Avatar
Member
42 posts
Joined: Dec. 2016
Offline
Hi, Does anyone know how to do reverse blendshape? im not saying about the negative value.

I am using zbrush to sculpt the corrective shape on pose space. Then import as obj into houdini as blendshape. But how can I go to bind pose and still have the “corrected delta” to transform with the bones? the terms is usually call ‘reverse’ or ‘invert’ blendshape. Please see the image for clearer explanation.

The third image is what i want to to achieve.
(it was created in maya with a script http://www.chadvernon.com/blog/resources/cvshapeinverter [chadvernon.com] )

Thanks in advance

Attachments:
reverseBlendshape.jpg (341.7 KB)

User Avatar
Member
8053 posts
Joined: July 2005
Online
Use the -d option on the sopcreateedit [sidefx.com] hscript command.
User Avatar
Member
42 posts
Joined: Dec. 2016
Offline
edward
Use the -d option on the sopcreateedit [sidefx.com] hscript command.

Thanks. I am new to houdini and now searching for how to use hscript and will try this script.
User Avatar
Member
8053 posts
Joined: July 2005
Online
From the main menu, do Windows > Hscript Textport. Type in the appropriate command there with paths to your nodes.
User Avatar
Member
42 posts
Joined: Dec. 2016
Offline
edward
From the main menu, do Windows > Hscript Textport. Type in the appropriate command there with paths to your nodes.

Thanks it works!

Now i have another question. How can I generate sopcreateedit for every frame?(400frames) base on current deform?

what is the formula behind sopcreateedit? perhaps i can replicate it through pointvop?
Edited by ruudygh - Jan. 25, 2017 23:09:13
User Avatar
Member
8053 posts
Joined: July 2005
Online
Probably use a script that changes the frame and run the command for each one of them. Why do you want to do that though? You might as well just playback a geometry sequence of the final result and use that instead of deform.
User Avatar
Member
42 posts
Joined: Dec. 2016
Offline
edward
Probably use a script that changes the frame and run the command for each one of them. Why do you want to do that though? You might as well just playback a geometry sequence of the final result and use that instead of deform.
the reason is that im creating animation between maya dynamic, daz studio and ue4, hard to explain though.

Can I replicate sopcreateedit through pointvop?
User Avatar
Member
42 posts
Joined: Dec. 2016
Offline
edward
Probably use a script that changes the frame and run the command for each one of them. Why do you want to do that though? You might as well just playback a geometry sequence of the final result and use that instead of deform.
ruudygh
edward
Probably use a script that changes the frame and run the command for each one of them. Why do you want to do that though? You might as well just playback a geometry sequence of the final result and use that instead of deform.
the reason is that im creating animation between maya dynamic, daz studio and ue4, hard to explain though.

Can I replicate sopcreateedit through pointvop?

Nevermind though. I used excel to generate hscript for this workflow purpose:
fcur 1
sopcreateedit -d diff1 sop1 sop2
fcur 2
sopcreateedit -d diff2 sop1 sop2
fcur 3
sopcreateedit -d diff3 sop1 sop2
fcur 4
sopcreateedit -d diff4 sop1 sop2

problem solved for now. thanks.
User Avatar
Member
9247 posts
Joined: July 2007
Offline
can you provide meshes for your problem? it's much easier to work with something than have to make some for the sake of an example
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
8053 posts
Joined: July 2005
Online
ruudygh
Can I replicate sopcreateedit through pointvop?

It's doable in theory but it's complicated because you need to use the Capture Attribute Unpack SOP and then basically redo what a Deform SOP would except invert the matrix that applies the deformation before multiplying it with the target position to compute the original position.

For the scripting, I would have just used python to do a loop … something like:
for frame in xrange(1,200):
    hou.setFrame(frame)
    hou.hscript("sopcreateedit -d diff%d sop1 sop2" % frame)
User Avatar
Member
42 posts
Joined: Dec. 2016
Offline
edward
ruudygh
Can I replicate sopcreateedit through pointvop?

It's doable in theory but it's complicated because you need to use the Capture Attribute Unpack SOP and then basically redo what a Deform SOP would except invert the matrix that applies the deformation before multiplying it with the target position to compute the original position.

For the scripting, I would have just used python to do a loop … something like:
for frame in xrange(1,200):
    hou.setFrame(frame)
    hou.hscript("sopcreateedit -d diff%d sop1 sop2" % frame)
Sounds too complicated for a beginner like me. Will try it one day when I am expert

And thanks for the python script. Never thought that hscript can be mix with python.
  • Quick Links