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.

Note that all the stencils used are stored in the stencil layer 16.

Variants

Easy Outline for Godot supports 5 types of stencil outlines:

Cover

Visible visible if not occluded, like a regular mesh.

Cover

Hidden only occluded parts are visible.

Cover

Full always visible.

Cover

Silhouette colored mask only visible if occluded.

Cover

Silhouette & Full combination of everything

You can also customize the look of the outline! Customizing Outlines

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.

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.

Unpacking the node

Cache outlines

Creating an outline runtime is expensive because a new mesh is generated!

Binding Skeletons

Last updated