Sand AISand AI MAGI-2MAGI-2 is now on SandBase: 1080p video with native audioTry it now

blender-weather-states: weather states and game hand-off

Weather as code. Each state is a function in a STATES table that changes lights, materials and the sky and nothing else: no render, no camera move, particles switchable off. The same functions drive the film and the game hand-off.

Examples · 3

Five Skills for your Agent. Take the whole pipeline, or one stage: the models, the walking people, the weathers, or the finished film. All five carry the same streetkit, byte for byte.

How it works

  1. 01

    Check the scene and its weathers

    Blender Weather States works on a street project whose models come from sandbase-3d-assets, with optional Mixamo clips. Run python3 scripts/street.py check first: it imports the scene without rendering, builds every weather with particles off, and fails on leftover particles or unnamed objects. It runs on your own machine with Blender 4.2+ on a GPU, Python 3.10+ with Pillow, and ffmpeg.

  2. 02

    Render stills, animation and patches

    Tune a look with a still such as python3 scripts/street.py still --state snow --frame 121 --samples 32 --pct 50, adding -- key=value overrides. The anim command renders 240 frames per weather and resumes after an interruption. The patch command re-renders one region given by --box, and encode turns a frame folder into an MP4 for checking.

  3. 03

    Write the game hand-off

    The handoff command, for example --out handoff --version v1, writes look.json with the grades, camera.json, actors.json listing who moves in which weather, a reference frame per weather and a bake-safe versioned .blend with bake_safe.json. Check the result by comparing the reference frames with the film: on the published street they match within 0.41 percent mean luminance.

FAQ

Which weathers does Blender Weather States include?

Blender Weather States includes six states in its STATES table: dusk, night, storm, snow, a noon day and morning fog. Each state is an importable function that changes lights, materials and sky only, with particles switchable off and any hidden or added objects named. references/weather.md lists what each state changes and explains how to add another weather.

Does Blender Weather States cost anything to run?

No. Blender Weather States makes no SandBase calls and needs no key, because every step is a local Blender, Python or ffmpeg job. The real cost is render time: snow and storm take about twice as long as dusk, since they carry 60,000 flakes and 70,000 drops. Render one animation at a time.

Can a game reuse Blender Weather States without copying code?

Yes. A game imports scene.py, calls build_scene(state, particles=False) and reads look.json for the grade, then draws its own particles. The Blender Weather States functions never render, move the camera or change frames, and the check command enforces the render rule. The hand-off folder also carries camera.json and actors.json for the game side.

Which GPUs does Blender Weather States support?

Blender Weather States renders with Cycles on Metal, OptiX, CUDA, HIP or oneAPI, and the CYCLES_DEVICE variable forces one device. Never mix CPU and GPU devices within one animation: their tiles resolve coplanar faces differently, which makes the frames flicker. Blender 4.2 or later is required for every command, including check.

What does bake_safe change in Blender Weather States?

Blender Weather States flips only open sheets whose normals point down and away from the camera, and turns wires into meshes, so a game bake does not come out black. On the published street that meant 11 flipped sheets and 14 converted wires. Check bake_safe.json again after changing geometry, because new sheets are not covered by the old record.

Where do Blender Weather States reference frames come from?

Blender Weather States renders frame 121, five seconds in, of every weather with the full grade at 32 samples from the film camera. Those frames ship in the hand-off folder so a game team can compare its own output against the film, one weather at a time.