Transparency Clipping (Sort Order)

Table of Contents

Link, Like, Share.

In situations where layers of transparency are stacked so one or more surface is positioned behind another, issues may arise as a consequence of Blender not being able to properly determine each elements sort order with respect to others in a scene and how they should be drawn on screen. In Blender this issue can generally be addressed using “Sort Elements“.

Important: transparent surfaces being incorrectly rendered is not a Blender specific problem but rather one that’s consequential to the way graphics processing handles transparency more broadly.

Sort Order

Under normal circumstances sort order as a process is not an issue because surfaces that cannot be seen are culled (removed) from view. Ordinarily transparency isn’t an issue either so long as anterior surfaces are fully opaque (solid). When this is not the case, typically where additional layers of transparency can be seen through others, a conflict arises in which surfaces, or whole meshes, appear inverted or inside out; window surface ‘B’ for example, being visible through window surface ‘A’ may result in the ‘B’ appearing in front of the ‘A’ (undesired) instead of the other way around (desired).

Design note: ‘sort order‘ is sometimes referred to interchangeably as ‘surface sorting‘, ‘alpha sort‘, ‘depth sort‘, ‘draw order‘, ‘render order‘, ‘render sort‘ and others depending on the exact context of the problem. As an issue meshes may appear inside-out, back-to-front, flicker back on forth, visual artifacts that are similar to, but not be confused with, z-fighting (surface proximity sorting error) or other similar surface sort-order issues.

Sort order 'clipping' issues
Sort order issues tends to show as clipping where surfaces appear to show through, or over others, that should be in front and blocking those behind (indicated above – Eevee).

Transparency correctly rendered in Cycles
An approximation of what should be shown when stacked transparency is properly rendered – sort order clipped areas are drawn correctly, front to back (Cycles).

Sort Elements

To manually correct surface sort order, first switch to Edit Mode then select an individual face or group of faces depending of the desired outcome. Next, from the Mesh menu, select Sort Elements… then the option that will determine the appropriate sort order or the selection, e.g. Mesh » Sort Elements » Selected. Deselect and repeat the selection/assignment process in reverse to set the render order – surfaces to the rear should be set last.

Design note: when using Sort Elements…;
1) despite being correctly applied clipping may persist.
2) surface selection order is not always obvious so some trial and error should be expected.
3) manually adjusting surface order may not be supported outside Blender.
4) sort order clipping occurs regardless as to how transparency is defined, by bitmap or procedurally.
5) clipping is Render Engine and Viewport Shading dependent, appearing in some but not others.

Important: the orientation of objects within a scene affects how sort order behaves – as objects are moved or move, the relationship between surfaces changes, so whilst the rendering hierarchy may be correct when looking at a scene front-on it might not be when viewed from the side, obliquely, and so on. For content rendered in real time (game engines) this can make fixing the problem entirely, tricky.

Object/surface orientation affects clipping
The orientation of objects and surfaces relative to each other affects how transparency is rendered so whilst addressing sort order from one orientation or perspective it may not work from others.

Manually correcting sort order
Sort Order fixed
Manually setting the sort order of a selection (image top – Eevee) – this may or may not need to be done to all surfaces and not just those exhibiting issues, which for complex objects may require some thought to properly determine the correct, reverse, order of selection and property setting to diminish clipping (trouble spots indicated – image bottom – Eevee).


Link, Like, Share.