In this video I will be sharing a quick technique to do some procedural uv's in Houdini. Grab the file: / cgside My procedural Houdini courses: / shop #houdini #procedural Thank you
Here's a more detailed breakdown of the second part of the setup, since I rushed a bit: 1. Create a connectivity on the prims, using uv connectivity; 2. Add a relbbox y mask to later orient the uv shells "up"; 3. Swap uv's to P(promoting to point attr in between) 4. Now we can measure the gradient of the mask y attr, which will create a vector attr along the "orientation" of the shell. 5. In the wrangle we calculate the angle between the x and y components of the gradient. Get the centroid of the uv island. Create a quaternion(could do it with matrices also), passing the angle we just calculated, around the z axis(uv space). Subract the pivot from the uv, qrotate, and finally apply the rotation to the uvs. Hope this helps. Cheers
Hi, really useful info. UV mapping objects from VBDs is always a pain - I usually just use labs auto uv but the orientation is often off. The technique you showed will be very handy. Thanks.
Great tutorial! One challenge I often encounter is orienting UVs for timber planks, especially when working on interior scenes like a room built from wooden boards. Timber grains typically run parallel to the longest side of a surface, and I’ve struggled with procedurally creating UVs that align correctly-particularly when the planks are placed at angles, such as along a pitched roof. Is there a way to procedurally texture timber to address this? It would be great to know if a solution exists!
Hey, it shouldn't be too hard as it's basically a rectangular geo. It would be easy to guess the angle with vex, similar to what I have done here. If you want, send me an example file on patreon, and I'll have a look. Cheers
You could try running a sort by proximity on the prims from the centroid distance. In theory prims 4 and 5 will be the furthest polys , so it should give you the plank cuts, which you could then use to map the gradient.
Here's a more detailed breakdown of the second part of the setup, since I rushed a bit:
1. Create a connectivity on the prims, using uv connectivity;
2. Add a relbbox y mask to later orient the uv shells "up";
3. Swap uv's to P(promoting to point attr in between)
4. Now we can measure the gradient of the mask y attr, which will create a vector attr along the "orientation" of the shell.
5. In the wrangle we calculate the angle between the x and y components of the gradient.
Get the centroid of the uv island.
Create a quaternion(could do it with matrices also), passing the angle we just calculated, around the z axis(uv space).
Subract the pivot from the uv, qrotate, and finally apply the rotation to the uvs.
Hope this helps. Cheers
Hi, really useful info. UV mapping objects from VBDs is always a pain - I usually just use labs auto uv but the orientation is often off. The technique you showed will be very handy. Thanks.
This was all kinds of helpful, thank you!
Good tutorial !! Thanks!!
Amazing tip thank you 😍 Can you elaborate more on the calculating angle vex? it seems very interesting I'm not aware of this technique
Hey, check the pinned comment. Cheers
Thank you! 👍
Great tutorial! One challenge I often encounter is orienting UVs for timber planks, especially when working on interior scenes like a room built from wooden boards. Timber grains typically run parallel to the longest side of a surface, and I’ve struggled with procedurally creating UVs that align correctly-particularly when the planks are placed at angles, such as along a pitched roof.
Is there a way to procedurally texture timber to address this? It would be great to know if a solution exists!
Hey, it shouldn't be too hard as it's basically a rectangular geo. It would be easy to guess the angle with vex, similar to what I have done here. If you want, send me an example file on patreon, and I'll have a look. Cheers
You could try running a sort by proximity on the prims from the centroid distance. In theory prims 4 and 5 will be the furthest polys , so it should give you the plank cuts, which you could then use to map the gradient.