Open kianzarrin opened 4 years ago
My improved road textures:
Cgameworld wrote: https://github.com/kianzarrin/HideTMPECrosswalks/issues/1#issuecomment-569488906
Awesome to see the progress of this project The scaling mismatch of the node textures could be due to the uv map on the node meshes being different, depending on the road. Try copying the uv map from another road’s node You can also try grabbing the uv coordinates of the mesh with this PrefabCollection
.FindLoaded(road).m_nodes[0].m_mesh.uv The mesh uv coordinates could be grabbed from each side of the road at the curb and a scale factor calculated based on that?
@Cgameworld I checked meshes using mod tools. I compared "6L plain road" VS "6L grass road" because the plain road has mismatch problem and the grass road does not.
there is no difference in the uv
of the nodes and segments. the same is true with all other parameters of the Mesh. The only thing that grabbed my attention are the vertices.
"6L grass road" VS "6L plain road" :
But then again the vertices of the "6L plain road" are the same between node and segment meshes. So this is a dead end!
EDIT: sorry the original message was not readable so I almost edited the whole message!
In the picture bellow 4L road has smooth segment to junction transition but there is a APR texture missmatch for the 6L road.
After doing a few experiments it appears that only plain roads(no aymmetry/decoration/medians) have this problem.
sometimes CS stretches node texture WRT the segment texture before rendering them. In such circumstances blending in the segment texture to node texture can result into texture mismatch.
So far I look for grass/trees in the name of the road to determine if it has decoration and look for a lane with
laneType == None
to find medians. If so I shrink segment textures by 91%.Problem
I do not know what exactly to look for (is there a field or a flag I need to check) to distinguish such roads from one another and I do not know how much is the scaling factor.
Need
Further notes
In the images bellow I put the segment texture underthe generated (by blending) node APR texture for 4L and 6L road:
related: https://github.com/kianzarrin/HideTMPECrosswalks/issues/1#issuecomment-568302473