Edge Outline Material Rendering

Hi All

New to three.js development.

Researching materials, I notice there are various questions regarding rendering edges/outlines, unfortunately I can’t seem to find a simple solution.

I would like to get a look on my loaded gLTF models similar to the following example:

lDraw loader example

Any help and advice in this area would be great. Thank you.

Your linked example renders the outline as lines. This approach is a bit specific to LDraw and can’t be used in all other use cases. It actually depends on what edges you want to render. In most cases only the contour of an object should be highlighted but not edges of inner triangles. A typical approach to do so is using post-processing like demonstrated here:

https://threejs.org/examples/webgl_postprocessing_outline

There is also OutlineEffect which is primarily used right now with MeshToonMaterial in order to achieve a cel shading look.

https://threejs.org/examples/webgl_loader_mmd