I am trying to create road white border lines visible here:
So far I modified the original Street_Modern_Standard.cga in the Lanes method, adding the "AsphaltPainted" with small 0.05 width:
split(v,uvSpace,0){ _sidelineWidth : AsphaltPainted("White")
| NbrOfRightLanes-_centerlineWidth/2 - _sidelineWidth: Lanes(case rightHandTraffic: StopEnd else: StopBegin) # in case of right-hand traffic, these lanes are in the direction of the graph segment
| ~_centerlineWidth : CenterLine
| nLanesLeft-_centerlineWidth/2 - _sidelineWidth : translateUV(0,0,-geometry.vMax) scaleUV(0,-1,-1) # mirror the uv coords
Lanes(case rightHandTraffic: StopBegin else: StopEnd)
| _sidelineWidth : AsphaltPainted("White")}
The problem is with the texture being cut when two roads with different widths are joining with Joint. On one side white line is being cut, as the UV mapping seems to be outside the mesh:
Is there anything I can do to fix this? I am currently using CityEngine 2021.0.7316.
Solved! Go to Solution.
Hi @AdamChełstowski,
I don't see a way to fix this on the street level, because in this case one of the UV tiles will always be cut:
What you could do instead is to create a seperate cga file for the sidelines which you then assign to the sidewalks:
On the node I suggest to increase the curb radius & precision to get a smoother line
Hope this helps!
Cheers
Jonas
Hi @AdamChełstowski,
I don't see a way to fix this on the street level, because in this case one of the UV tiles will always be cut:
What you could do instead is to create a seperate cga file for the sidelines which you then assign to the sidewalks:
On the node I suggest to increase the curb radius & precision to get a smoother line
Hope this helps!
Cheers
Jonas
Isn't there a way to map the UVs such that one can pick the edge/side of the texture that clips (by using some form of edge index or similar)? I'd imagine different use cases where such would be useful.