Wrap a UV around a procedurally generated box without seams

   1144   3   1
User Avatar
Member
6 posts
Joined: 5月 2023
Offline
I'm a game programmer and fairly new to setting UVs

I'm procedurally generating a building and I want to line up the UV edges on the outward facing walls



Ultimately I want it to look like this:


I'm using square corners now to simplify and will bevel in the future, and the texture tiles infinitely

How can I line up the UV?
User Avatar
Member
493 posts
Joined: 7月 2005
Offline
If you have different lines you can use polypath to make single polyline from it. After this, you can apply resample to create a curveu attribute, which can be use to set one uv-component. Sweep should also work.

here is a example

Attachments:
uv_closed_line.hipnc (183.1 KB)

User Avatar
Member
2625 posts
Joined: 6月 2008
Offline
You could start by basing your UVs on the curve profile of the wall. Then when you sweep a shape along the line, it will inherit the UVs.
Edited by Enivob - 2023年8月9日 15:20:22

Attachments:
Untitled-1.jpg (284.2 KB)
ap_uv_sweep_RECT_080923.hiplc (260.3 KB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
6 posts
Joined: 5月 2023
Offline
Aizatulin
If you have different lines you can use polypath to make single polyline from it. After this, you can apply resample to create a curveu attribute, which can be use to set one uv-component. Sweep should also work.
Thanks for this! I was able to learn from your example and get this working.



Enivob
You could start by basing your UVs on the curve profile of the wall. Then when you sweep a shape along the line, it will inherit the UVs.
Also many thanks for this example. I liked your because it has the top face matching the front faces as well. I'm going to try and reverse the outward facing uv so the letters/numbers read upright, then increasing the scale of 'transform_MAKE_THIN' stretches the curves too much, so I'm going to try and extrude the inner face to increase the size of the top face. If any of that sounds way off, I'm very open to feedback and I'm happy to play with this on my own now that you two have unblocked me on that uv problem.
  • Quick Links