Working with Gradients
Gradients are everywhere in Genesis — cel ramps, iridescence palettes, height gradients on cliffs, fog color over distance. Authoring them well is the difference between flat-looking stylization and a painterly read. This recipe shows how to build them and where each one lives.
What you’ll build
A skin cel ramp for a character, an iridescent palette for an insect shell, and an inline height gradient on a cliff — three gradient workflows from one tool.
Requirements
- The Ramp Creator (ships with Genesis).
- A Genesis material to apply the ramp to.
Steps
1. Open the Ramp Creator
Tools > Genesis > Ramp Creator. The window opens with a default two-stop ramp.
2. Author a skin cel ramp
Drop a third stop at 0.5. Set the three colors:
- 0.0 — cool purple shadow
RGB(0.30, 0.28, 0.42) - 0.5 — warm peach mid
RGB(0.95, 0.78, 0.68) - 1.0 — bright skin
RGB(1.0, 0.92, 0.84)
Save as RAMP_Skin.png at 256x4.
3. Apply to cel shading
Material Lighting → Cel Shading → Ramp. Assign RAMP_Skin.
4. Iridescent gradient
Open the Ramp Creator again, Mode → Iridescence. Author a rainbow stack (red → yellow → green → cyan → blue → magenta → red). Save as RAMP_Iridescence.png.
5. Height gradient on a cliff
For environments, gradients are inline (not a texture). Advanced → Height Gradient. Bottom Color = mossy green, Top Color = bare rock, Blend Width 4m.
material.SetColor("_HeightGradBottom", new Color(0.20f, 0.30f, 0.18f));
material.SetColor("_HeightGradTop", new Color(0.55f, 0.52f, 0.48f));
material.SetFloat("_HeightGradBlend", 4f);6. Fog gradient
If you have the Stylized Fog module installed, the fog volume accepts a gradient swatch directly. Pick warm at the horizon, cool at the zenith, deep blue at distance.
Ramp textures must be mip-off, clamp, bilinear, sRGB on, 256x4. The Ramp Creator enforces this. If you author your own externally, set the import flags manually or you will see banding.
Iridescence ramps must wrap smoothly from end to start. If the last stop does not match the first, you will see a hard seam where the surface loops around.
Variations
- Sunset sky gradient: orange at horizon, pink mid, indigo top. Apply via Unlit + UV-Y.
- HP bar gradient: red → yellow → green ramp sampled by HP value in UV1.x.
- Underwater fog: blue → black ramp via Stylized Fog distance.