Consistent seams between what should be mathematically perfect modular pieces

Hi there! I’m having a heck of a time building and laying out modular environment pieces. I’ve created objects in blender that have their verticies manually typed in at exact coordinates. I’ve got the objects in unity positioned precisely. logically speaking, there should be no seam what so ever, and if I reproduce the setup in blender, for example, there is no seam. However, in Unity, there’s a very, very tiny seam. The objects have no weird transforms, nor are they under any parent that has weird transforms.

as you can see, the seam shows up with just the smallest little traces.

if you zoom in really, really, really close, you can see that sure enough, there’s a gap:

in the past, what I do is take the model and extend the geometry over its footprint by just a tiny amount, but honestly this is absurd. what the hell is going on? this should be impossible, and it happens all the time.

Edit - one more thing - manually using vertex snapping will fix this issue, but that’s not an option, because I’m using a procedural tool to lay out objects. when I use vertex snapping, the values it moves the object to should be incorrect. for example, in blender, I’m sure my objects are exactly 3.5 meters wide. when I place them in unity, I can confirm that they are 3.5 meters apart, but they have a seam.

Probably a subpixel precision artifact, just like what you get when you tile 2D sprites evenly without accounting for pixel-precision placement.

Are your objects placed at unusual coordinates like x=0.999998 or similar? Try aligning them on integer coordinates to see if the issue goes away. If not, perhaps the vertices in the model aren’t positioned precisely but have coordinates like 1.7999999. Sometimes the fix is simply to extend the objects minimally so there is an overlap but not so much that you get visible z fighting.

For a test, instantiate cubes at the same locations and scale them to the same size as your models and check if they also show this issue. If not, the issue is more likely with the mesh itself and needs to be fixed in Blender. Otherwise it’s more likely a subpixel position / floating point inaccuracy issue.

Thanks CodeSmile! I found the damn issue. your thoughts helped me search in the right place. Not sure why I never thought to try it with the default unity plane. derp.

Anyway - it looks like there’s an import issue in Unity when reading .blend files (which I have to use for reasons, don’t get me started) - despite my transforms being frozen properly before export, objects are coming into unity with a very slight rotation error - like .005 degrees, something like that. I didn’t notice this because some objects (most? looks like half) import fine, properly transformed to -90 degrees on whatever axis. Not sure why I didn’t notice this when starting to address this issue - I suppose my brain decided it was position related and just ignored the rotation value :smile:

Anyway, hopefully this thread helps some future dummy. CHECK THE ROTATION IDIOT (just kidding love u bro.)

1 Like