Implements Stage 7 three-layer coupled atmospheric particle dynamics (motion-blurred trajectories, upward-normal collision splashes, and puddle-isolated radial wave ripples) and Stage 8 non-destructive Blender 5.x HDR compositing (AgX, thresholded Fog Glow, S-curve, optical distortion, and monochromatic sensor grain). Use when executing Stages 7 or 8 of strata, adding rain or weather FX and puddle ripples in Blender, or building a Blender 5.x post-processing compositor graph.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Strata Compositing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/naddrzz-strata-compositing)
---
name: strata-compositing
description: "Implements Stage 7 three-layer coupled atmospheric particle dynamics (motion-blurred trajectories, upward-normal collision splashes, and puddle-isolated radial wave ripples) and Stage 8 non-destructive Blender 5.x HDR compositing (AgX, thresholded Fog Glow, S-curve, optical distortion, and monochromatic sensor grain). Use when executing Stages 7 or 8 of strata, adding rain or weather FX and puddle ripples in Blender, or building a Blender 5.x post-processing compositor graph."
---
# Strata Stages 7 and 8: Coupled dynamic FX and HDR compositing
Airborne weather spawned without ground interaction looks pasted onto the lens, and raw path-traced pixels without optical glare or grain read as synthetic. Stage 7 couples falling particles to upward surface normals and puddle masks; Stage 8 grades the linear HDR buffer non-destructively while keeping every 3D object, material, and light frozen.
---
## Stage 7: Coupled particle dynamics and surface interaction (`Dynamic FX`)
Never spawn rain, snow, or embers as a standalone emitter. Build **all three coupled physical sub-layers** together so air and ground agree optically:
### 1. Sub-layer A: primary trajectories and optical shutter streaks
1. **Bound the emitter to `emitter_proxy`** inside collection `07_FX`, covering the camera frustum out to `1.2 * hero_distance`. Distant background rain merges into Stage 6 fog; simulating drops 80 m away wastes memory on sub-pixel noise.
2. **Match streak generation to the render mode:**
- **Animated sequence or `CYCLES` velocity blur:** Configure `ParticleSettings` with negative pre-roll (`frame_start = -30`, evaluate at `frame_current = 24`) and terminal velocity `(-0.6, 0.2, -8.5)` m/s alongside `scene.render.use_motion_blur = True` (`motion_blur_shutter = 0.35`). Rendering at `frame_current = 1` without pre-roll traps all particles at the ceiling.
- **Deterministic single-frame still (`BLENDER_EEVEE` or `GeometryNodes`):** Instance thin refractive capsules (`radius = 0.0009 m`, physical shutter length $L = \|\mathbf{v}\| \cdot (\text{shutter} / \text{fps}) \approx 8.5 \times (0.35 / 24) = 0.124\text{ m}$) aligned with wind-tilted velocity vector $\hat{\mathbf{v}}$. Assign `MAT_FX_RainDrop` (`Base Color = (0.95, 0.97, 1.0)`, `Roughness = 0.02`, `IOR = 1.333`, `Transmission Weight = 1.0`, `Alpha = 0.28`) and **set `rain_obj.visible_shadow = False`**. Millimeter-wide drops cast no visible ground shadow in real life, whereas tracing shadow rays through thousands of refractive drops inside Stage 6 fog produces caustic fireflies.
### 2. Sub-layer B: upward-normal sky-exposed impact splashes
Rain splashes do not occur on vertical walls, ceilings, or dry ground beneath roof overhangs. Gate splash instancing (`2-6 mm` droplet crowns in `GeometryNodes`) behind two geometric checks:
1. **Upward normal threshold:** $\mathbf{N}_{\text{world}} \cdot (0, 0, 1) > 0.75$ (rejects facades and steep slopes).
2. **Vertical sky raycast:** Raycast along `(0, 0, +1)` against `01_Architecture` (`GeometryNodeRaycast`) and delete candidate points where `Is Hit == True` (rejects porches, eaves, and sheltered alcoves).
### 3. Sub-layer C: puddle-isolated concentric ripple normals
Inject expanding ring waves into `ground_plane` **only inside Stage 4's `OUT_PuddleMask`**:
1. Look up `OUT_PuddleMask` and `STAGE4_PuddleNormalMix` inside `ground_plane`'s shader tree. Never wire ripples across the whole ground mesh; concentric rings on dry or damp concrete read as embossed plastic.
2. Add 2 to 3 staggered `ShaderNodeTexVoronoi` nodes (`voronoi_dimensions = '3D'`, `feature = 'F1'`, `Scale = 6.0-11.0`) driven by `Object` coordinates. Convert `Distance` $r$ into damped radial wave height:
$$h(r) = \sin(42.0 \cdot r - \phi) \cdot e^{-5.5 r} \cdot \text{clamp}(1 - r / 0.85, 0, 1)$$
3. Multiply $h(r)$ by `OUT_PuddleMask`, wire into a dedicated `ShaderNodeBump` (`Distance = 0.0012` m, `Strength = 0.35`, `Normal` = `(0.0, 0.0, 1.0)`), and connect its `Normal` output into `VECTOR` slot `B` (`inputs[5]`) of `STAGE4_PuddleNormalMix`. Dry and damp concrete remain untouched while mirror puddles ripple around droplet hits.
**Stage 7 gate:** Run `stage_gate_audit.py` (`TARGET_STAGE = 7`), render `stage_07_fx.png`, and confirm backlit rain streaks, zero splashes under overhangs, and concentric ripples confined inside puddles.
---
## Stage 8: Linear HDR compositing and tone mapping (`Post-Processing`)
Stage 8 freezes **all 3D scene datablocks** (meshes, materials, lights, volumes, particles). Every operation runs on the linear HDR render pass and display transform.
### 1. `AgX` view transform
Configure color management before tuning bloom or curves:
- `scene.view_settings.view_transform = 'AgX'` (`AgX` desaturates intense colored practicals gracefully toward white like cinema stock; legacy `'Standard'` clips RGB channels independently into harsh neon cyan or yellow).
- `scene.view_settings.look = 'AgX - Medium High Contrast'` (or `'None'` when driving full custom contrast in `CompositorNodeCurveRGB`).
### 2. Blender 5.x `compositor_effects` node pipeline
> **Blender 5.x API rule:** `scene.node_tree` and `CompositorNodeComposite` were removed in Blender 5.0, and `scene.compositing_node_group` is deprecated in Blender 5.3+ in favor of `scene.compositor_effects`. Build a `CompositorNodeTree` via `bpy.data.node_groups.new("Stage8_PostFX", "CompositorNodeTree")`, add an output socket `interface.new_socket("Image", in_out="OUTPUT", socket_type="NodeSocketColor")`, attach it via `scene.compositor_effects.new("Stage8_PostFX").node_group = tree` (falling back to `scene.compositing_node_group = tree` on Blender 5.0-5.2), and finish at `NodeGroupOutput`. Also use `CompositorNodeImageCoordinates` (`outputs["Pixel"]`) for grain because `ShaderNodeTexCoord` is rejected inside `CompositorNodeTree`.
Wire five non-destructive stages in linear-to-output order:
```python
import bpy
scene = bpy.context.scene
scene.render.use_compositing = True
tree = bpy.data.node_groups.new("Stage8_PostFX", "CompositorNodeTree")
tree.interface.new_socket("Image", in_out="OUTPUT", socket_type="NodeSocketColor")
if hasattr(scene, "compositor_effects"):
eff = scene.compositor_effects.new("Stage8_PostFX")
eff.node_group = tree
else:
scene.compositing_node_group = tree
nodes, links = tree.nodes, tree.links
# 1. Linear HDR Render Layers
rl = nodes.new("CompositorNodeRLayers")
# 2. Thresholded HDR Fog Glow (socket inputs in Blender 5.x)
glare = nodes.new("CompositorNodeGlare")
glare.inputs["Type"].default_value = "Fog Glow"
glare.inputs["Quality"].default_value = "High"
glare.inputs["Threshold"].default_value = 1.25 # Only >1.0 HDR lights and wet glints bloom
glare.inputs["Strength"].default_value = 0.22
glare.inputs["Size"].default_value = 0.55
# 3. Toe/shoulder S-curve
curves = nodes.new("CompositorNodeCurveRGB")
c_map = curves.mapping.curves[3] # Combined C channel
c_map.points.new(0.20, 0.175) # Shadow anchor
c_map.points.new(0.80, 0.825) # Highlight rolloff
curves.mapping.update()
# 4. Subtle optical lens distortion and dispersion (Fit=True prevents black corners)
lens = nodes.new("CompositorNodeLensdist")
lens.inputs["Distortion"].default_value = -0.008
lens.inputs["Dispersion"].default_value = 0.003
lens.inputs["Fit"].default_value = True
# 5. Monochromatic per-pixel sensor grain
coords = nodes.new("CompositorNodeImageCoordinates")
wn = nodes.new("ShaderNodeTexWhiteNoise")
grain_mix = nodes.new("ShaderNodeMix")
grain_mix.data_type = "RGBA"
grain_mix.blend_type = "OVERLAY"
grain_mix.inputs[0].default_value = 0.018
out = nodes.new("NodeGroupOutput")
links.new(rl.outputs["Image"], glare.inputs["Image"])
links.new(glare.outputs["Image"], curves.inputs["Image"])
links.new(curves.outputs["Image"], lens.inputs["Image"])
links.new(coords.outputs["Pixel"], wn.inputs["Vector"])
links.new(lens.outputs["Image"], grain_mix.inputs[6]) # RGBA slot A
links.new(wn.outputs["Value"], grain_mix.inputs[7]) # Scalar Value -> monochromatic RGBA slot B
links.new(grain_mix.outputs[2], out.inputs["Image"]) # RGBA Result -> Group Output
```
Connect scalar `wn.outputs["Value"]` rather than `wn.outputs["Color"]`. `Color` generates independent random R, G, and B noise that looks like magenta-green webcam chroma noise in shadows. Scalar `Value` broadcasts equal luminance jitter across all three channels, matching film/CMOS grain and breaking 8-bit banding inside Stage 6 fog gradients.
**Stage 8 final gate:** Run `stage_gate_audit.py` (`TARGET_STAGE = 8`), render `stage_08_final.png`, and inspect the output for soft halation around luminaires and wet speculars, clean corners (`Fit = True`), zero RGB confetti, and intact shadow detail.