Select to view content in your preferred language

Dirt map on street network

707
2
06-21-2018 11:22 AM
AbeleGiandoso
Frequent Contributor

Hi. 

Is there a way to apply a dirt map to a street segment rule on a different UV set (1) than the color Map (0)? Like it's usually done with buildings facades in the cityengine tutorials. 

I'm trying to have a tiling cobblestone pattern function as the colormap multiplied by a dirtmap scaled much larger so to hide the seams (projected from the scope.xz and tiled max (scope.sx, scope.sz))

I read that the streets have 3 UV sets only and they work differently from the 5 sets of the blocks. Is this procedure still a possibility given this difference?

Thanks

A.

Tags (4)
0 Kudos
2 Replies
CherylLau
Esri Regular Contributor

No, sorry, there isn't a way to have a colormap on uv set 0 and have a dirtmap which is scaled larger than the colormap.  However, there is a way to get a colormap and a dirtmap on a street where both use the UVs of uv set 0.  With this solution, you'll have to repeat the dirtmap as frequently as the colormap.

The street shapes, by default, have uv sets 1 and 2 defined as distance fields from the start/end of the street, as defined in the doc here:

Street and intersection shape UV—Help | ArcGIS 

However, if you want to override this behavoir, you can delete the UVs on uv set 1 or 2.  Then, since the UVs are not defined, the UVs of uv set 0 will be used.  This way, you can set a dirtmap (or bumpmap).  This does not copy the UVs of uv set 0 to uv set 2.  The UVs of uv set 2 will not exist.  This means, you cannot use them for splits, and you cannot use them as the distance field from the start/end of the street.  For example, the standard street rule in ESRI.lib uses distance fields in uv sets 1 and 2.

In this code, the colormap and the dirtmap use the UVs from uv-set 0.

Street -->
     set(material.colormap, "builtin:uvtest.png")
     deleteUV(2)
     set(material.dirtmap, "/ESRI.lib/assets/General/Dirtmap/dirtmap_1.jpg")
‍‍‍‍
AbeleGiandoso
Frequent Contributor

Very clear Cheryl! Thanks a ton!

Could be useful to have a separate UV set for dirt, just as a suggestion 

0 Kudos