Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld db2c16ac-a…

p_snow

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

byzero-proxy @ DESKTOP-DB3UJOJ·posted 3mo ago
What it does

p_snow

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

TODO: describe this module.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

preseed/parts/p_snow.module — SNOWLINE: a skier drops into an alpine valley and carves it. Every turn cuts a trench into the snow and throws the displaced snow up into a bank beside it, and the trail stays cut for the whole run. The skier is SIMULATED, not placed. A body integrates under gravity in contact with one surface function — piste, kickers, rail — so it accelerates down the fall line, leans as hard as the turn it is actually holding, rides up a take-off and flies off the lip because the surface stopped rising, and absorbs the landing. Nothing it can hit is a special case, and nothing it can hit is passed through. Because the skier is simulated, the camera cannot be a precomputed path: it is a set of stations in the BODY's own frame, evaluated against the live body and damped, so a shot holds its composition wherever the run actually went.

baseCarve(z: number) → number

The line the skier is trying to hold, as a function of z alone — the body chases it with its edges rather than being placed on it, so the run is whatever the physics could actually hold.

argtypedescription
znumber

targetX(z: number) → number

argtypedescription
znumber

pisteOnly(z: number) → number

argtypedescription
znumber

buildPark(place: ?, spec: ?) → void

The park built from a set of placements. An entry that is nil is a feature not placed yet, and it is simply not on the mountain — which is what lets the solver below run the mountain as it stands at each stage.

argtypedescription
place?
spec?

surfaceFor(kickers: ?, rail: ?) → void

The one surface everything on this mountain stands on and the body collides with: the piste, plus whatever the park puts on top of it.

argtypedescription
kickers?
rail?

crossingX(surface: ?, z: number) → number

WHERE THE BODY ACTUALLY GOES, not where it is aiming. The body chases its line with its edges, and the steering lag means it passes any given z about a metre off the line — measured, not guessed. Placing a rail on the LINE therefore places it a metre from the skier, who clips its edge for one frame and hops. Widening the catch to cover that only turns a miss into a scuff. So the park is placed on the path the body takes. Not the path down BARE piste: a feature deflects everything below it, so a placement solved against an empty mountain is right for the first feature and drifts by a metre by the second. A feature only ever perturbs the run DOWNSTREAM of itself, which is what makes this solvable in run order — each feature is placed where the body arrives with every feature ABOVE it already standing, and a few passes settle the one loop that remains, a kicker's own ramp deflecting the approach to its own lip. Where the body is when it crosses `z`, run from the top against `surface`.

argtypedescription
surface?
znumber

pathThrough(surface: ?, z0: number, z1: number) → void

The line the body takes across a stretch of the run, sampled every half metre.

argtypedescription
surface?
z0number
z1number

fitRail(surface: ?, fz: number, length: number, search: number) → void

WHERE ALONG THE RUN a straight rail stands is what decides whether the skier rides it. The body crosses the fall line at a couple of metres a second and a rail is a few centimetres of steel: over most of a turn the line sweeps clean across the steel and the skier is shoved off the edge it climbed. There is one stretch of every turn where the line is momentarily straight down the hill, and that is the only place a rail down the fall line lies under the skier for its whole length. It is found from the line rather than guessed: the window of `length` metres, within `search` of where the rail was authored, across which the line moves least.

argtypedescription
surface?
fznumber
lengthnumber
searchnumber

solvePark(spec: ?) → void

argtypedescription
spec?

stationAt(t: number) → void

argtypedescription
tnumber

spawnModel(ctx: ?, name: string, geom: ?, mat: ?, parent: string?) → void

argtypedescription
ctx?
namestring
geom?
mat?
parentstring?

applyLook( ) → void

The alpine day this run is lit by. It is scene-wide state — the sky entity, the key, the ambient, the clear colour — so it belongs to `enter` and not to `build`: the director may build a part up to a second before its cut, under the outgoing part's fade, and a daylight sky installed there would land on the part still on screen.

build(ctx: ?) → void

argtypedescription
ctx?

claimProbes(ids: ?) → void

REFLECTION PROBES ALONG THE RUN. Snow is not matte: it is a field of ice facets under an open sky, and most of what it returns is the sky itself. Without a probe every surface here reads its indirect specular from nothing, which is why the piste and the park features came back looking like painted plaster — the glint has something to catch, but the broad sheen underneath it has nothing. Three down the fall line rather than one, because the run is long and the valley closes in at the top: a single probe taken at the start reflects open sky onto snow that is by then under a shoulder of the mountain. They overlap, and the renderer blends by proximity. `probeId` makes each a PREBAKE — the cube is baked once and loaded on every run after. Probes are registered by `probeId`, and a probe already standing under that id is a leftover from a previous entry: the slot table holds eight, so a part re-entered a few times exhausts it and a LATER part silently gets no probe at all. Claiming the ids means an entry always starts from none of its own.

argtypedescription
ids?

plant(ctx: ?) → void

argtypedescription
ctx?

enter(ctx: ?) → void

argtypedescription
ctx?

findSkinned(root: ?) → void

argtypedescription
root?

walk(e: ?, depth: ?) → void

argtypedescription
e?
depth?

hideBuiltBody(skier: ?) → void

argtypedescription
skier?

walk(e: ?, depth: ?) → void

argtypedescription
e?
depth?

onRail(b: ?) → void

argtypedescription
b?

trickClip(b: ?) → void

argtypedescription
b?

driveTrickClip(ctx: ?, b: ?) → void

argtypedescription
ctx?
b?

mountKit(ctx: ?, b: ?) → void

argtypedescription
ctx?
b?

ensureRig(ctx: ?, dt: ?) → void

argtypedescription
ctx?
dt?

collect(e: ?, depth: ?) → void

argtypedescription
e?
depth?

driveCamera(ctx: ?, t: number, dt: number) → void

argtypedescription
ctx?
tnumber
dtnumber

update(ctx: ?, t: number, dt: number) → void

argtypedescription
ctx?
tnumber
dtnumber

exit(_ctx: ?) → void

argtypedescription
_ctx?

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

Showing up to 3 levels deep. Open a part to see what it holds further down.

67+items
▣
module · born here
❒asset
# park <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 1↑ born
·
animation · born here
❒asset
▲ 0↑ born
▣
module · born here
❒asset
# fx A module script.
▲ 0↑ born
✦
shader · born here
❒asset
# dof <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this shader provides and who consumes it, then delete both comment lines. --> TODO: describe this shader.
▲ 0↑ born
▣
module · born here
❒asset
# trail <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
✦
shader · born here
❒asset
# motion_blur <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this shader provides and who consumes it, then delete both comment lines. --> TODO: describe this shader.
▲ 0↑ born
✦
shader · born here
❒asset
# lens_fx <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this shader provides and who consumes it, then delete both comment lines. --> TODO: describe this shader.
▲ 0↑ born
✦
shader · born here
❒asset
# prop_vertexcolor Shader ported from the Mow Rush world for the preseed demo.
▲ 0↑ born
▣
module · born here
❒asset
# meshbuild <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
◐
material · born here
❒asset
# snow_field The snow of the ski run: bright, blue in shade, denser where a ski has pressed it, and flecked with the glints that fire when the sun and the eye line up on a crystal facet. It shades whatever geometry it is given, so the carved track it draws comes from the mesh `snow_carve` displaces rather than from anything in this material.
▲ 0↑ born
·
computeshader · born here
❒asset
# emission_raymarch Marches an emissive 3D volume into a 2D storage target, one invocation per pixel. The volume's RGB is emission and its alpha is density; the output is premultiplied `vec4(scatter, 1 - transmittance)`, which the demo's composite post-process blends over the scene. The frame's depth blit clips each ray at opaque geometry within `occluder_range`, so a surface in front of the volume hides it. `preseed/volume.module` owns this shader: it allocates the `U` uniform run, packs the camera's inverse view-projection and the volume's world AABB into it, and dispatches once per volume per frame.
▲ 0↑ born
✦
shader · born here
❒asset
# vol_composite Post-process pass that puts the demo's emissive volumes on screen. `preseed.volume` raymarches every part's 3D volume into one shared render target, binds that target to the `vol_rt` texture property each frame, and this pass alpha-blends it over the scene colour: `scene.rgb * (1 - v.a) + v.rgb`. It runs at priority 5, ahead of the grade chain, so the rays feed bloom and tonemap.
▲ 0↑ born
▣
module · born here
❒asset
# volume A module script.
▲ 0↑ born
·
computeshader · born here
❒asset
# snow_land Fills a height buffer with the mountain the ski run descends. The shape is composed, not sampled. A massif of overlapping summit bells carries the mass, a general tilt drops the ground away toward the valley, ridged noise stands aretes up wherever the massif is high, and fine FBM roughens the whole surface. The piste is part of the same function: a corridor down the fall line takes the smooth field alone, level across its width and rolling gently along it, blended back into the mountain over a margin. Dispatch it 2D over the grid, `ceil(grid / 8)` groups on each axis. ## Buffers | binding | name | role | |---------|------|------| | 0 | `land` | the height buffer written, row-major, `grid * grid` floats | | 1 | `ctrl` | the parameters below | ## `ctrl` | slot | meaning | |------|---------| | 0 | grid size | | 1 | extent in metres, centred on the origin | | 2 | seed | | 3 | valley floor height | | 4 | massif height | | 5 | ridge amplitude | | 6 | detail amplitude | | 7 | tilt: the drop across the extent | | 8 | piste half width | | 9 | piste blend margin | | 10 | piste roll amplitude | | 11 | piste roll length | | 12 | piste dish: the rise at the corridor edge |
▲ 0↑ born
▣
module · born here
❒asset
# mountain <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
▣
module · born here
❒asset
# shots A module script.
▲ 0↑ born
▣
module · born here
❒asset
# scenery <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
▣
module · born here
❒asset
# skierparts <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
▣
module · born here
❒asset
# skier <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
▣
module · born here
❒asset
# skierbody <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
·
computeshader · born here
❒asset
# snow_stamp Cuts ski strokes into a persistent snow deformation field. One thread per field cell: it adds this frame's strokes to the standing deformation in `acc` — a trough under the edge and a bank of thrown snow alongside it. Because `acc` persists between dispatches, the trail is the sum of every stroke ever cut rather than only the current one, which is what lets a run be carved live instead of authored in advance. `ctrl` opens with grid size, field extent in metres, stroke count and a spare, then carries the strokes: segment start `x, z`, segment end `x, z`, half width, depth, berm gain, and hardness. Dispatch one workgroup per 8x8 block of cells. The field is laid out to match the terrain's vertex grid one cell per vertex, so `snow_carve` can lift vertex `i` by `acc[i]` with no resampling.
▲ 0↑ born
▣
module · born here
❒asset
# snow <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
backing path · preseed/parts/p_snow.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.