It just doesn't fit!!!

Hi guys

I’m busy trying to make a road for my game and I have chopped my road into different small sections e.g straight, t-junction, crossing, circle etc. Now, when I puzzle all of them together, I can see a thin line where the parts join and I just can’t seem to get this right. Here is a screen shot

Thansk in advance

Assuming they’re aligned perfectly, have you tried CombineChildren() on them? That might do some good (or at least reduce the amount of Draw Calls made). =) Good luck!

Try turning off mipmaps for the road texture and see if that removes the lines. If so, you’re getting some sort of texture bleed at lower mipmap levels.

If this is a texture issue vs a geometry alignment or UV issue, you should also try changing the texture mode to Clamp instead of Wrap. It’s difficult to tell from that angled screenshot.

also don’t forget to enable bordermipmap as that effect is a clamping and/or mipmap level difference consequence

Keep in mind that if the neighboring vertices of adjacent road sections don’t match up exactly, you may see rendering artifacts. Also note that if the road sections have a transform other than identity, the vertices may not be exactly where you expect them to be (especially if there’s any rotation involved).

Hi guys, i appreciate this soo much, thanks. Btw, is this the correct way of doing this for a very large area? I’m planning to expand the area later so I need to keep future in mind.

Here is a better screenshot

I don’t know if you’re still looking for help on this, but it looks like there are multiple issues there (geometry, texture coordinates, etc.).

If the goal is to make the roads perfectly seamless, you might have to take another approach (such as generating the meshes procedurally, or ‘stitching’ together adjacent meshes).

Thanks Jesse

if you don’t mind, could you please give me some pointers as I’m not fimiliar with this that you mentioned, thanks a lot.

I don’t know enough about your game to speculate as to what the optimal solution would be, but it seems like what’s needed is a way to ensure that the vertices, normals, and texture coordinates where the road sections meet match up exactly.

There’s really no one answer to the question of how to do that, but if you need further help perhaps you could tell us a little more about the context. Are the road sections prefabs that you just drag into the scene and position accordingly?

Yip, that is what was planning to do. I think the main factor is that my city might grow to be pretty big and one large mesh for the roads is (according to me) out of the question.

It doesn’t have to be one large mesh. But, as mentioned previously, the vertices where road sections join will most likely need to match, and that might be difficult to guarantee if you’re placing the road sections by adjusting the transform of the corresponding game object.

Also, are you sure it’s out of the question? It looks like you’d only need 10 triangles for each section (unless if you skip hidden edges). Or are the sections more highly tessellated than that? If not, it seems you’d need an average of, say, 4 or 5 triangles per section (assuming hidden edges are skipped), and even with a few hundred sections that’s still only a few thousand triangles. You could also combine sections forming long stretches of road, cutting down the triangle count further. And finally, it doesn’t have to be all or nothing; you could group sections together until some limit was reached, and then start a new group.

However you go about it it’s probably going to take some work, but if you want perfectly seamless roads with no artifacts, it seems to me that some sort of ‘stitching’ or procedural mesh generation might be needed. (But, I’m just speculating.)

Thanks

This is great help. I will give this a shot and provide feedback if others need this too.

Yeah well just go to the -six times nothing- web site, and pick up the road/path tool, and you should be okay + its free! + tutorials!

The road/path tool should be found here. http://sixtimesnothing.com/tools-and-resources/

Hope this helps.
~K

If the above link doesn’t work, try http://sixtimesnothing.com/ , click on “Tools and Recourses” and you’ll’’ find it there.
~K