Transfer UV to World Space

   1532   4   0
User Avatar
Member
19 posts
Joined: Dec. 2021
Offline
Hi, I was trying to use a mesh of stone like this to replace the selected area of heightfield to create the texture of cliff.


I saw soneone said that they transfer cliff patch p and stone mesh to uvspace and use stone mesh to seamlessly tile the cliff path, is there any code or documentation about how to transfer p to uvspace? Thanks!
Edited by eveying - March 8, 2022 22:01:40

Attachments:
mesh.png (430.9 KB)
cliff tile.png (807.8 KB)
original HeightField.png (691.9 KB)

User Avatar
Member
8583 posts
Joined: July 2007
Offline
assuming your uv attrib is on vertices

1. Vertex Split SOP
- Attributes: uv
- Promote To Point Attribute: On

2. Attribute Swap SOP
- Source: uv
- Destination: P
- Method: Swap (default, it will swap uv and P, so later you can just swap them back if needed)
- Method: Copy (if you want to keep uv values unchanged)
Edited by tamte - March 8, 2022 00:41:08
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
19 posts
Joined: Dec. 2021
Offline
tamte
seamlessly tile
Thank you for your help! And I have another question. Now I successfully transfered both terrain mesh and stone mesh to uv space, and I use a transform node enlarge the terrain mesh. Is there any way I could tile the terrain mesh with stone mesh? (Repalce terrain mesh by stone mesh but keep the shape). Thanks!
Edited by eveying - March 8, 2022 22:02:01

Attachments:
terrain mesh.png (676.2 KB)
stone mesh.png (104.9 KB)

User Avatar
Member
8583 posts
Joined: July 2007
Offline
Maybe check out labs detail mesh?
https://www.sidefx.com/tutorials/game-tools-detail-mesh/ [www.sidefx.com]
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
19 posts
Joined: Dec. 2021
Offline
tamte
Maybe check out labs detail mesh?
https://www.sidefx.com/tutorials/game-tools-detail-mesh/ [www.sidefx.com]

Thanks! Detail Mesh works. However, when I combine cliff mesh and the original heightfield, half of the mesh is under the heightfield (image 1), I have tried to use peak (geometry node), but even with peak mode half the mesh is still under height field. And it also causes some discontinuities between different terrains (image 2). Is there anyway to completely cover all height fields with meshes, and make the edges look seamless?

Attachments:
conbine.png (555.7 KB)
peak.png (440.3 KB)

  • Quick Links