mx_splittb
A convenient utility node that creates a horizontal top/bottom split view on a model's surface, ideal for creating layered effects or making vertical comparisons.
Core Advantages
It encapsulates the common top/bottom splitting logic into a single node, dramatically simplifying the creation of layered materials (like horizons or snow caps) and vertical transition animations, without manual Y-coordinate-based mixing code.
Common Uses
Creating procedural horizons or water surfaces with sky on top and ground below.
Simulating snow on mountaintops based on world height.
Making vertical transition animations where content 'fills' up from the bottom or is 'wiped' down from the top.
How to adjust
Primarily adjusted by controlling the `center` parameter. Animating `center` from 0 to 1 creates a 'fill' or 'curtain drop' transition. Adding a wave function based on the X-coordinate to `center` creates a wavy split line. Using world Y-position for `texcoord` creates a fixed horizontal plane in world space.
Code Examples
1// Define colors for the top (sky) and bottom (grass)
2const topColor = color( '#87CEEB' );
3const bottomColor = color( '#7CFC00' );
4
5// Define the horizon's position
6const horizonLevel = uniform( 0.5 );
7
8// Shows top color if UV.y >= horizonLevel, otherwise shows bottom color
9const finalColor = mx_splittb( topColor, bottomColor, horizonLevel );