EdgesRenderer in the corners (Edges Renderer)

I am using mesh.enableEdgesRendering(). With default settings (i.e. no settings).

Everything works very well, but I don’t see edges in the inner corners.

Screenshot example.

What do I need to do to make edges appear in these corners?

1 Like

Could you share a repro ?

1 Like

Sure.
Go into any room and you will see that the inner EdgesRenderer does not render the inner corners.

It seems the walls don’t meet correctly inside the rooms:

I have enabled wireframe rendering, and we don’t see a white line at the jointure, that would be the edge of red triangle / green triangle.

2 Likes

Sorry for taking so long to answer.

Here is a scene with a simple cube. All is well outside. Edges are visible.

If you point the camera inside the cube, the edges on its inner corners are not highlighted. I need to find a way to make these inner corners stand out as well

You can update the zOffset property of the edge renderer material to fix the problem:

1 Like

Yes, it works!

And in the example above, edges also began to appear in some corners.

But now there is noise. When the camera far away, it is. When you get close, it’s not there. With what it can be connected?

Camera far away


Camera close

The zOffset property (with negative values) makes the object appear nearer from you (the offset is an offset in relation to the depth buffer). If the object is just behind another one, it can make the object with the zOffset value appear in front of this object. You can try to use higher value than -10 (try -5 for eg), and also try to put some values in zOffsetUnits, which works with zOffset to offset the values in the depth buffer. Another thing to try is to use smaller/bigger values for edgesWith.

2 Likes

There is always this method.

1 Like