Log inGet started
World

Procgen Effects Showcase

Branchmain
Branchesmain
Commit99ff90d12c

README.md

rk_smoke

Billowing smoke or steam puff: an alpha-blended, camera-facing card (zero_billboard). A soft body is broken up by two layers of four-octave value noise, so overlapping puffs merge into one rolling mass. Each card is rotated by its random value and turns slowly over life. The density's gradient gives a lumpy normal, lit by the sun direction projected into the card's plane and un-rotated so the light stays fixed on screen. The lighting uses fixed values: a cool sky fill (0.20, 0.22, 0.28) plus the sun's normalised colour, scaled by sun_gain and brightness, with thick middles shadowed by their own mass. A warm exhaust underglow (3.0, 1.05, 0.28), scaled by the lane's heat and glow_gain, is strongest on the underside and where the puff is thin. The alpha is the density times the lane opacity and opacity, faded against the scene behind it over depth_fade and faded in over ground_fade above world height 0.

The launch graph (launch/launch.procGraph) draws two outputs with it, transparent: smokeCards, the smoke born where the exhaust hits the ground, pushed out of the trench mouths and trailing the climbing vehicle (sun_gain 0.8, depth_fade 2.5, ground_fade 0.6, heat 1.0 at birth falling to 0 by half its life), and steamCards, the white deluge steam during the countdown (sun_gain 0.8, glow_gain 0.8, depth_fade 2.0, ground_fade 0.5, heat 0.7 falling to 0 by 0.4 of its life). In the Procgen Effects Showcase world, the fx_launch scene plays the graph.

The shader includes @builtin::shaderModules.billboard and zero::scene_depth.

Properties

PropertyTypeDefaultMeaning
opacityfloat1.0Multiplies the alpha (minimum 0).
sun_gainfloat1.0Multiplies the sun term (minimum 0).
glow_gainfloat1.0Multiplies the exhaust underglow (minimum 0).
depth_fadefloat1.5Distance over which the puff fades into the scene behind it (minimum 0).
ground_fadefloat0.35World height over which the puff fades in above height 0 (minimum 0.01).
brightnessfloat1.0Multiplies the lit colour (minimum 0).
vertexBoundsDilationfloat15How far the vertex hook moves a vertex past the mesh, in world units: the culling bounds grow by it so a moved vertex stays inside them.

Lanes

LaneCarries
data0.rgbTint.
data0.aOpacity; also scales the underglow.
data1.xLife, 0 to 1: the card's slow turn.
data1.yRandom 0 to 1: rotation and noise offset.
data1.zHeat 0 to 1: how much exhaust light the puff catches.