Driving blendshape with $CR

   5780   8   2
User Avatar
Member
1265 posts
Joined: March 2014
Offline
I'm playing with setting up blend shapes, and driving it with null controller boxes.
It works fine, but I want to split right and left by using a red color value in the blend expression. What ever I try fails, and I feel really stupid at this stage.

The expression so far (fit01(ch(“../../control/tx”),0,2)) and I want to multiply it by the red color channel, but Nooooo. It does not work. What am I doing wrong?

Attachments:
shape_RED.png (273.7 KB)

Werner Ziemerink
Head of 3D
www.luma.co.za
User Avatar
Member
918 posts
Joined: March 2014
Offline
Hi Werner,

I'm not sure this can be done in the blend node. Since the value from tx is a float just as the blend node slider this simply works. But the color is an attribute per point, hence not a single float value, but as many values as points on the geometry.

From my limited understanding, I don't think you can fit it into the blend node this way.

I admit, I don't fully understand why you want to control this by color instead of another shape feeding into the blend node. Can you explain further?

Cheers,
Andy
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
a point SOP can move points of one geometry to that of another based on colour…
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
1265 posts
Joined: March 2014
Offline
Thanks for the replies

Let me explain a bit more. I'm trying to find an easier way to bring in multiple shapes (maybe from zbrush) where both left and right was sculpted with symmetry on, instead of having twice the amount of shapes to cater for left and right side separately.

What I'm trying to achieve, is splitting the left and right side of my model using the red color channel, before it hits the BlendShape SOP.

I'm starting to think that I might just use an AttribVop to set up my own shape blending.
Werner Ziemerink
Head of 3D
www.luma.co.za
User Avatar
Member
918 posts
Joined: March 2014
Offline
Yeah, arctor has a point (no pun intended). Use the point SOP to separate the symmetry based on color and set up all your shapes nicely prior to the blend SOP.

Use the point SOP with this expression on the position parameter:
x = if($CR > 0,$TX,$TX2)
y = if($CR > 0,$TY,$TY2)
z = if($CR > 0,$TZ,$TZ2)
and feed your non-deformed shape into the point SOPs second input.

edit: I corrected the z entry.
Edited by - March 11, 2015 15:11:33
User Avatar
Member
1265 posts
Joined: March 2014
Offline
Thanks.

I see where this is going, but I'm getting strange results. The shape split works, but the object goes flat.

I need to investigate some more.

Attachments:
Shape_Split_red.hipnc (64.0 KB)

Werner Ziemerink
Head of 3D
www.luma.co.za
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
try this

Attachments:
shape_split_red_394.hipnc (69.3 KB)

Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
1265 posts
Joined: March 2014
Offline
never mind…I changed the Z channel to if($CR > 0,$TZ,$TZ2)

Now it works…Thanks Andy
Werner Ziemerink
Head of 3D
www.luma.co.za
User Avatar
Member
918 posts
Joined: March 2014
Offline
I'm sorry I had a copy and paste error. I'll update/edit the post.
  • Quick Links