rainer.b

World-Aligned Road Texturing

Discussion created by rainer.b on Jan 18, 2019
Latest reply on May 3, 2019 by CLau-esristaff

Hello, 

I'm working on a road rule file that does texturing based on the world position of the shape in order to minimize texture discontinuities. I'm using the GetMapData function to retrieve the road layout and. However, the world-space uvs do not line up for multiple street shapes and are shifted in curved shapes. 

The following code is used: 

RoadAsphalt -->
   setupProjection(0, world.xz, 4, 4)
   projectUV(0)

   translateUV(0, -OffsetX/4, -OffsetZ/4)
   scaleUV(0,1,-1)

   texture("builtin:uvtest.png")X.

 

OffsetX/Y/Z is the centroid of the scene (without it single-precision uvs have trouble)

 

Does anyone have an idea on how to get continous UVs over multiple shapes?

 

Cheers, 

Bernhard

Outcomes