Transform sop: possibility to use pointcolor as 'mask'?

   2091   2   0
User Avatar
Member
81 posts
Joined: Feb. 2014
Offline
Hi all

Some sops have the ability to use point color ('$CR' for example), as per point ‘weight’ or scale.
I can't find a way to do this with the Transform-node.
Being able to use this would result in a sort of paintable mask for the transform.

Is there someone who could tell me if this is possible or if there is a much more convenient/efficient/natural way to do this?

Thanks
User Avatar
Member
9 posts
Joined: Dec. 2008
Offline
If you just wanted a blendshape-style mix based on color, you could paint your weights, perform the transform to put the entire mesh into the fully-transformed target position, and then wire this into a Wrangle with the un-transformed mesh plugged into the second input. The Wrangle's VEX code would just be this:
v@P = lerp( point(@OpInput2,"P",i@ptnum), v@P, v@Cd.r );

If you wanted to have blended rotations, you would have to do things slightly differently, perhaps by specifying a rotation, converting to a quaternion, interpolating using the slerp() function, and then rotating the point by the resulting quaternion. Depending on your overall goal, that might be overkill, though.

-James
Edited by kappy - Nov. 4, 2016 14:47:28
User Avatar
Member
81 posts
Joined: Feb. 2014
Offline
Hi James

Thank you very much for your answer. This works like a charm and gives me as a bonus an extra entry in the vex realm. Rotation is not an issue (on the moment). I use it as another method of softtransform for modeling.

Michiel
  • Quick Links