Jump to content

Texture Interference / Layering Meshes


Recommended Posts

I have a question about overlapping meshes in Blender (and then to Unity and KSP). I'm overlapping to add decoration to larger, tiled faces. Specifically, I'm creating buildings for the KerbTown plug-in / Kerbin City. Here's an example where I've overlaid a plane with a door texture on top of a wall that uses a tiled texture (ignore the fact that the door is upside down :-) ):

HyPM6El.png

Here's the same situation in another part of the scene where the textures are interfering with one another:

LYlzlUH.png

I run into two situations with this modeling. Either the meshes are too close together and I get interference from some perspective or distance (rounding in rendering) or I move the overlaid mesh far enough away that there is no texture interference, but it is clear when you get close that there is a gap between the two meshes.

Is there a minimum distance of separation to avoid texture interference? (or is there not because the rounding errors vary with distance?)

Is the only way to avoid this to make a "cut out" in the underlying mesh and then fit the overlaid mesh in the resulting "hole?"

Is there a completely different technique someone could point out to me?

Thanks!

Link to comment
Share on other sites

I've experienced similar things. Some things I've done which have improved my results: separate the meshes by a short distance (a few cm in Blender) ... or ... experiment with different shaders in Unity ... or ... flip the normals of a problem mesh. There are probably other things but this is what I've experienced. As to cutting meshes, I've not needed to do that, although I've joined meshes. Good luck!

Link to comment
Share on other sites

I did some research and found the answer to my question. The problem I tried to describe is commonly called "z-fighting." You can google that term to read more. Basically, when two meshes are co-planar, the render engine doesn't know which mesh to draw, so it picks one. If it picks a different one every few render cycles, you get flickering. "Co-planar" is hard to nail down in a game like KSP because you can zoom anywhere from right against a texture to kilometers away. What was not co-planar within a few meters becomes co-planar at distance, because the range of numbers is limited and becomes coarser. The only solution in this situation is to remove the mesh you don't want to render. So, I'll have some geometry editing to do...

Link to comment
Share on other sites

Actually, another thing I've done is ADD yet another mesh. (It was for translucency effects.) But sumghai has a good suggestion. One way to offset the planarity is to ever so slightly rotate one of the meshes. I've not needed to do that but its good to know just in case.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...