検索 - User list
Full Version: Rotating USD UVs with VEX/VOP ?
Root » Solaris and Karma » Rotating USD UVs with VEX/VOP ?
OllieS7
Hi there.

I wish to edit (rotate) UVs on a specific prim within a USD layer reference in Solaris. I tried the TransformUV LOP, however the rotation seems to be only available in object space - I really want to be able to rotate in the UV/map space. Is there a way to achieve this?

Additionally, adding a TransformUV after the Reference node stops all prims from making it to my next node (CopyToPoints) - what's the right way to address this?

Alternatively, can anyone point me to a VEX example for modifying USD data (such as ST attributes) inline?

Thanks!
jens_martensson
Hi
The idea here is to move uv's to origin, so its assuming no UDIM's
But this will rotate the uv's by 90 degrees

// move original uv's (st) to origin
vector2 uv = u@primvars:st - 0.5;
matrix UV = ident();

//rotate 90 degrees
rotate(UV,radians(90),{0,0,1});

//rotate the uvs with matrix multi 
uv *= matrix2(UV);

//assign to uv's again
u@primvars:st = uv + 0.5;

Hope that helps
Cheers
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB