Arnold for Houdini Forum
Rendering with Arnold in Houdini and Solaris using the HtoA plug-in.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to rotate UV projection with matrix

Message 1 of 4
500 Views, 3 Replies

How to rotate UV projection with matrix

Hi, I am trying to project an image taken from a chrome ball onto geo to turn it into a mesh light. I have read the docs but do not understand how to rotate the ball by degrees in the projection of X, Y and Z to line the image up with the geo Which values are which in the matrix shown in the docs? Any help would be great.

Message 2 of 4
in reply to: MarkWallman_

The Arnold and OSL matrix is a 4x4 matrix.

You read it like a book, from left to right.
You can interpritate it as 4 vec4 structs.


Although they are infact just floats all together sitting on a string.

If you read downwards its

So typical rotation would look something like...

matrix ( cos(a), sin(a), 0, 0,

-sin(a), cos(a), 0 ,0,



So you just fill in the 2 first slots in the first to lines so to speak.

And you use the 2 math nodes cos and sin for the float value you are going to use as the driver for spinning it around on the U and V space. Dont forget to add a negative node for the second sin function.

With cos and sin you level out the fact that we sample a point on a circle which has exponential factors attached to it as we get closer to either 0 or 1 on both axis. And so the result will then be that if you pipe a linear increasing float value through "a" the rotation will be steady and linear.
Now you can spin it around any axis you want.

Message 3 of 4
in reply to: MarkWallman_

Hi. Thanks for that. Crickey, the Maya equivilant is just a 3d texture I can translate and rotate in the 3d viewport to line it up. I will give it a go but i suspect it is not going to be very easy to line it up in htoa. It feels this workflow needs to be simplified. Have a good one. Best mark

Message 4 of 4
in reply to: MarkWallman_

Just ran into this, so noting it incase anyone else runs into it. You can connect a matrix transform node to a UVproject node in Houdini and it will give you standard transform controls for your projections. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report