How to show the outline for a cylinder without any post processing?

I wish to render a cylinder and only show it’s outline. I have tried using EdgeGeometry for this, but I’d like to not be able to see all the multiple lines that run across the lengths of the cylinder (I just need the outermost ends). I also do not want to apply any post processing for this due to certain constraints.

What I would like to see is the edges of the two caps of the cylinder and the two outermost edges running along its length, similar to the image shown below.

Is it possible to achieve this using LineSegments?


You superpose two meshes with the same geometry, the first is the original mesh, the second is the outline, same position slightly scaled up with a material set to { side: THREE.BackSide, color: outlineColor }

You get something like this Outline effect (Check the source code CTRL/CMD + U)

1 Like

Thank you for your suggestions I can make it work now. However, is there no way to simply remove the additional line segments from EdgesGeometry?

Have a look at this topic: LDraw-like edges
And this one, just in case: Tetrahedra (fat lines, batching, texelFetch)