Stencil Mask
A stencil mask is created by duplicating the mesh, inverting the normals and scaling it up. This allow us to add an outline to a single 3D object at the cost of vertex duplication.

Duplicating geometry may impact your game's performances, so keep in mind that you should always use few outlines in a scene.
Variants
Easy Outline for Godot supports 5 types of stencil outlines:

Visible visible if not occluded, like a regular mesh.

Hidden only occluded parts are visible.

Full always visible.

Silhouette colored mask only visible if occluded.

Silhouette & Full combination of everything
Best Practices
Organizing your scene
To allow consistent outlines and avoiding mesh splitting, a smoothed mesh is generated and added as child of each MeshInstance3D under your selection.
Select only what you need
Easy Outline allow you to add outline to all the MeshInstance3D under the node you selected. Doing so links all these outlines together as a single combined outline.
To make sure the outline works as intended, select only the nodes that need the outline.
Unpack scenes
Given the way Godot works if you apply an outline to an instance of a packed scene in Editor, after closing the scene the outline will be discarded.
This is fine if you plan to apply outline only runtime. But if you need consistency, you should unpack the node containing the meshes.

Cache outlines
Creating an outline runtime is expensive because a new mesh is generated!
This is fine if you plan to use only simple geometry, but as a rule of thumb you should always add the outline in editor and only edit its properties runtime.
Binding Skeletons
Easy outline automatically bind outlines to a parent Skeleton3D.


Last updated