Jump to content

How to use VEX coding to achieve the same result as transform function in primitive sop node


asxp3

Recommended Posts

You can use maketransform(): http://www.sidefx.com/docs/houdini/vex/functions/maketransform

Put this in a pointwrangle and make sure to set all scale values to 1.

int trs  = chi('transformation_order');
int xyz  = chi('rotation_order');
vector t = chv('translation');
vector r = chv('rotation');
vector s = chv('scale');
vector p = chv('pivot');

matrix m = maketransform(trs, xyz, t, r, s, p);
@P *= m;

 

  • Like 5
Link to comment
Share on other sites

  • 1 year later...
On 20.8.2017 at 6:20 PM, konstantin magnus said:

You can use maketransform(): http://www.sidefx.com/docs/houdini/vex/functions/maketransform

Put this in a pointwrangle and make sure to set all scale values to 1.


int trs  = chi('transformation_order');
int xyz  = chi('rotation_order');
vector t = chv('translation');
vector r = chv('rotation');
vector s = chv('scale');
vector p = chv('pivot');

matrix m = maketransform(trs, xyz, t, r, s, p);
@P *= m;

 

Thanks konstantin Magnus! This is something I was searching for:-)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...