What do you do when you can't use ngons?

I have a wall that is made up of multiple polygons. For simplicity’s sake, let’s say it’s a wall made of of two rectangles in the same plane, and they touch along one edge. They can’t be connected at the two vertices at the edge, because one part of the wall is not as tall as the next. As it is, this is creating a problem where they meet, where you can see through them, along one pixel, sometimes. Modeling with an ngon would be a good solution, because the taller rectangle could contain an extra vert on the side in question. However, I use Blender, and Blender doesn’t do ngons yet. Should I just make an extra triangle in the wall, or do you have a better solution? (I’m pretty sure that dragging one rectangle over will be just as bad or worse, due to z-fighting.)


210556--7735--$prooblem_328.png

You just need to triangulate the geometry:

210595--7737--$untitled_1_277.jpg

Okay fine! Simple case fail! :o

Here’s what the geometry really looks like:

210651--7742--$prooblem_328_367.png

if triangulation was a simple problem, it wouldn’t be a topic of scientific interest :slight_smile:

easiest what you can do is actually generate the triangulation by assuming that the n-gon is a triangle strip and just insert the triangles by the corresponding n-gon vertex numbers.

also I don’t see how the added stuff in your new image has any impact at all. its not part of the ngon, so not part of the actual problem set to solve :slight_smile:

I don’t believe that is true.

210712--7745--$postits_122.jpg

1 Like

both is a legal triangulated ngons.
And both solve part of the problem.
Because I doubt that your “right” solution solves the problem for a cam looking from the corner at the “outer end point” of your wall.

Also using ngon in blender wouldn’t solve anything as it must be a triangle in the end again or will be ignored. So in the end its the same.
Are you sure that the vertices in the corner are numerically identical?

The solutions you’ve drawn out on paper should work, as long as it’s a single object. I’d suggest doing a “Remove Doubles” function in Blender… my guess is that you have two points in a few places where you think you have only one, and the gap is showing up between the polygons.

(You may need to set the Remove Doubles limit to be more than 0.001…)

No, that’s not the problem. I don’t even think it’s due to floating-point imprecision, because it’s not a line of pixels from the background - it alternates between the object itself and the background. I guess it’s just bad practice not to connect polygons via vertices, if they are in a plane. Oh well.

This is definitely not just a Unity or Blender problem. I’ve seen it in lots of other games that have tiled geometry. The caves and dungeons in Oblivion had the same issue showing up occasionally.

In Max I would make the model out of a single object,
drawing out the needed shape with a spline object, extruding to the height of the lowest wall, slicing the top face where I needed the meeting wall, insetting the area to create the outer walls, extruding downward to the height for the floor, selecting the top faces of the edges of the higher walls and extruding that to it’s needed height.

212090--7800--$double_wall1_196.jpg