 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 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;```

• 4

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:-)