Jump to content
asxp3

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

Recommended Posts

The question is same as the title shows, I tried serval ways in vex, but all fail, so I'm so curious that how to make that happen in vex?

Anyone knows?

Share this post


Link to post
Share on other sites

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 4

Share this post


Link to post
Share on other sites
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:-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×