/3d-scenes:threejs-sky-atmosphere-and-hazefrom 3d-scenes
Build sky, atmosphere, and haze in Three.js WebGPU/TSL. Use for authored sky/fog, planetary scattering, depth-aware aerial perspective, or atmosphere-derived sun/sky lighting.
Ships in 3d-scenes. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build every branch around one atmosphere model, one scene-linear HDR path, and one final-output owner.
Choose the least expensive branch that supports the requested observable:
| Need | Branch | Valid claim |
|---|---|---|
| Regional authored sky, distance haze, or height haze | SkyMesh plus TSL fog/haze | Authored appearance in a bounded local frame |
| Real-time planetary sky and aerial perspective | Compact Hillaire-style LUTs | Approximate higher-order transport within measured error |
| Fixed atmosphere with stricter spectral/angular accuracy | Bruneton-style scattering orders or an offline solve | Accuracy demonstrated against the chosen reference |
Use the compact branch for changing cameras and suns. Use the higher-order branch when its regeneration cost and higher-dimensional products fit the actual workload. Keep an offline integrator as reference evidence rather than visible-pixel runtime work.
Complete when: the implementation names one branch, its supported spatial domain, its physical-versus-authored claim, and the error or visual criterion that admits it.
Declare one length unit for radii, positions, and integration steps; store
extinction/scattering coefficients in its reciprocal unit so
beta * ds is dimensionless. Define the body or local frame, origin policy,
altitude model, sun direction convention, spectral/working basis, and whether
the solar source is normal irradiance or finite-disc radiance.
Initialize WebGPURenderer, await renderer.init(), and confirm the native
WebGPU backend before allocating compute/storage products. Use
NoColorSpace for transport data and keep radiance scene-linear until the
host output stage.
For physically dimensioned extinction, LUT radiometry, mapping equations, phase conventions, product dependencies, imported LUT/product compatibility, or the single unit-equivalence fixture, read references/atmosphere-transport.md.
Complete when: every producer and consumer uses the same frame, length conversion, sun convention, and radiometric basis; physically dimensioned extinction also gives the same fixture optical depth on CPU and GPU.
The authored local branch samples its sky and distance/height haze directly from the shared model. It needs host depth only when haze is a separate depth-aware post. For the compact LUT branch, allocate no product merely because the branch was selected. Admit products by consumer:
| Product | Allocate only when |
|---|---|
| Transmittance | an admitted sky, aerial, or lighting path requires it directly or through a dependent product |
| Multiscatter | an admitted sky, aerial, or lighting closure includes higher-order response |
| Irradiance | an admitted diffuse-lighting consumer samples it |
| Sky-view | an admitted visible-sky consumer samples it |
| Aerial RGB inscattering and RGB optical depth | an admitted depth-aware composition consumer samples the paired payload |
A sky-only or lighting-only branch has no aerial allocation or aerial view dependencies.
Give each product its own dependency key and last-update reason. Atmosphere profile and body changes dirty base products. Camera body-relative pose, projection, viewport, and depth mapping dirty aerial products. Camera yaw, projection jitter, and a pure floating-origin translation leave unchanged body-frame LUTs valid.
Write 2D products with StorageTexture and textureStore(); write 3D
products with Storage3DTexture and storageTexture3D(). Set formats,
filters, wrapping, and mip ownership explicitly. Treat
renderer.computeAsync() as submission, not GPU completion; synchronize
readback, reuse, and retirement with an actual completion mechanism.
Complete when: every sampled product names all of its physical and view dependencies, no consumer can observe a newer dependency with an older dependent product, superseded work cannot publish over the current model epoch, every unadmitted product has zero allocation and no dependency state, and unchanged base LUTs survive camera-only changes.
For an in-scene authored branch, attach the SkyMesh and TSL fog/haze to the
host scene and keep their output scene-linear.
For a separate depth-aware haze or LUT aerial branch, reuse the host scene color and depth. Reconstruct the active perspective, reversed, logarithmic, or orthographic depth convention into a metric segment, then intersect that segment with the atmosphere and stop at the first opaque-body entry. Do not resume integration in a far-side shell after the opaque interval. Classify sky through explicit coverage or the declared clear-depth encoding.
For a visible surface in that branch, apply exactly:
C_out = C_scene * T_segment + S_segment
For a sky pixel, sample sky radiance and the calibrated sun/moon disc. Keep
direct lighting, diffuse sky lighting, cloud shadows, opaque visibility, and
camera-segment transport as separate factors. Let either renderOutput() or
RenderPipeline.outputColorTransform own presentation.
For planetary bodies, exterior cameras, ellipsoids, non-perspective depth, or a shell/post handoff, read references/body-depth-and-composition.md.
Complete when: each admitted in-scene branch reaches the host output path
once; each enabled depth-aware branch reconstructs known positions within the
declared tolerance, keeps sky/surface coverage stable, and returns C_scene
under the zero-atmosphere control; tone mapping/output conversion runs once.
When another system consumes atmosphere-derived lighting, expose only the quantities it needs:
Clouds add cloud-only optical depth; geometry adds visibility; water adds its own path extinction. A consumer chooses one atmosphere direct-light form and applies each factor once.
Complete when: a visual-only branch has no unused lighting interface; every admitted lighting consumer can identify quantity, unit, frame, sample age, and included attenuation, and its factor trace proves that atmosphere, cloud, geometry, water, and aerial transport each appear at most once.
Verify the mechanisms that branch actually uses:
Complete when: every enabled branch passes its numeric and visual gates, every diagnostic names the product revision it displays, and repeated resize/tier-switch cycles leave one live generation per retained product.
| Symptom | Inspect |
|---|---|
| Halo appears opposite the sun | phase direction sign |
| Haze changes with world scale | length/coefficient conversion |
| Horizon seam or limb pop | LUT seam, body interval, or owner transition |
| Terrain is darkened twice | direct-light or aerial factor ownership |
| Camera jitter regenerates base LUTs | dependency keys are too broad |
| Off-axis haze is too short | normalized depth was mistaken for ray distance |
This skill owns molecular/aerosol sky transport, atmosphere-derived sun/sky
lighting, and camera-segment aerial perspective. Use
$threejs-volumetric-clouds for weather-shaped cloud density and cloud-only
shadows, $threejs-image-pipeline for shared scene signals and final-output
ownership, $threejs-exposure-color-grading for metering/tone mapping, and
$threejs-procedural-planets for terrain/body detail.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub frzxw/supercharger --plugin 3d-scenes16 skills in this plugin
/3d-scenes-guideStart here for any 3D scene work in Blender or Three.js. Routes a request to the right one of the 15 skills in this plugin and sequences several of them into a workflow, such as a Blender game environment, a Blender blockout that guides an AI video pass, a procedural Three.js town or a rendered Three.js frame. Use when the user asks which 3D skill to use, how to plan a 3D scene, how to go from a brief to a finished Blender or Three.js scene, or what order to build a scene in./blender-blockoutUse when a text brief or a reference image must become a Blender blockout whose playblast guides a render-to-real video pass, such as a video model that takes a reference clip (Seedance) or the Render Video lane of the Scenario Blender Plugin. Covers graybox previs built for a video model, color-coded proxies at metric scale from rough to detailed, density levels from a simple shot to an expert scene with crowds, traffic and many cuts, and character stand-ins chosen per video model./blender-geometry-nodesBlender Geometry Nodes for procedural modeling, scatter systems, vegetation, buildings, pipes, cables, and reusable node groups. Use for procedural asset generation and instancing pipelines via MCP./blender-scene-assemblyLarge scene layout in Blender with collections, linking, overrides, streaming-friendly organization and set assembly via MCP. Use when the user asks to organize a big Blender level or diorama, link or override shared library assets, or tidy an outliner for a team scene, after the greybox layout and before set dressing./blender-set-dressingSet dressing and environmental storytelling placement for interiors and exteriors using prop density, narrative clusters and readability rules via MCP. Use when the user asks to fill a Blender room or street with props, add story clutter, stop a space from looking empty or overstuffed, or dress a layout that is already locked./environment-artExpert knowledge for environment art in games covering modular design, visual hierarchy, color scripting, environmental storytelling, optimization and world-building. Use when the user asks whether a game environment reads clearly, how to build modular kit pieces, how to set color keys and focal points, or how to cut draw calls and memory in a level.