0
Under review

Tessellation Cracks Along UVs

Virtus H 7 years ago updated 7 years ago 10

Demonstration of the problem: Image


-Vertices are not split in modelling program(Blender).

-Model Exported with smoothed normals and tangents via FBX.

-Only occurs along UV lines.

-Happens with included ShaderForge tessellation shader as well.


I'm hoping this is some simple mistake on my part, but I haven't found anything.

I can actually see through your mesh, so the cracks are almost certainly in the vertices. Could check your shader to ensure that "Tessalation" is turned off, that's really the only thing in shader forge that could alter the position of the vertices.


If Tesselation is off in the shader, then I would check your export and import settings, and also there is a sneaky setting under Edit->Project Settings->Player->Optimizations that can mess with mesh imports, so check that too. If all else fails, I would find an asset like Mesh Toolkit or Mesh Maker to manually fix it in Unity after importing it. Or, write your own script to loop through all the verts, measure their distance from each other, and merge any that are too close together... to try to close up all the gaps along the seam.

You misunderstand, this only occurs with tessellation. My mesh has no split vertices by design, and tessellating/displacing the model inside Blender produces no cracks. It may be an import issue, I'll look at that sneaky setting.

Then I bet your mesh is split into multiple parts. It's not a single, solid mesh. What I would do is get some kind of mesh editor like mesh toolkit or some other one, that will allow you to merge duplicate verts. Because I would bet that along those seams, there are several vertices in every location... verticies on top of each other. One vert will go to the part of the mesh on one side of the seam, and the other vert will go to the part of the mesh on the other side of the seam. And then during tesselation, those verts get moved around which opens up the seam. If blender has an option to merge duplicate verts, use that option. Or... Unity might automatically be creating duplicate verts, I donno. But it sounds like you are wanting to merge those duplicate verts, and there are tools such as mesh toolkit or mesh maker, that can merge duplicate verts. Or you can write your own script to do it, if you are good at that. Good luck. :)

Inside Blender, it's 1 mesh, vertex normals are correct along all UV seams. I still need to goof around with all the import options one more time. Then again, the seams(marked edges, not geometry splitting) used to unwrap the model may be marking the model to be split either by the exporter or the importer without my knowledge. Thank you for the many suggestions.

Under review

It could be because the UV coords are used to calculate all the tessellation parameters, which then could lead to seams

Would it be possible for you to make a node that detects UV edges/boundaries?


A quick fix would be to limit displacement on UV edges, so cracks don't develop. If seams are placed intelligently, this method would work fine.


Otherwise, I'll be adding a masking channel to my displacement map in order to close the cracks. This is obviously not the best way to fix this problem.

Nothing I tried worked. Importer settings had no effect. Neither did unmarking the UV seams.


Joachim, just let me know if you need any of my files.

If you do have duplicate verts along the seams, then you should have more vertices than you would expect, if you were to count them. To count them, you can select the mesh file in the project window, and then expand the preview box located at the very bottom of the inspector window, and it will show you a little preview of the mesh, along with some text that should tell you exactly how many vertices are on your mesh. If it shows that you have more vertices than you expect, then you'll know there must be extra vertices along those seams.


You're right! Inside Blender it has ~1600 verts. But in Unity it has 1817. If I split the seams in Blender, the vert count becomes 1811.


So how do I stop Unity from splitting my mesh?


Edit: Importing the FBX back into Blender yields 1630 verts, so it's definitely Unity's importer that's splitting it.


Edit2: http://answers.unity3d.com/questions/377297/import-fbx-model-without-splitting-seam-vertices.html

Sorry, I have no idea, I haven't worked with blender or fbx much.