/3dcodeverse:c3d-scene-atmospherefrom 3dcodeverse
Builds sky, environment map, clouds, and fog for Three.js scenes. Ensures scene.environment matches the visible sky before first frame, covering PBR lighting, cloud volumes, haze, and the equirect orientation bug that blackens water.
Ships in 3dcodeverse. 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.
Requirement: if any material reflects (metal, glass, water, wet ground), scene.environment
is set before the first frame renders and agrees with the sky the camera sees. The order
you write things in is yours; a reflective surface born before its environment exists
simply mirrors black until it is set.
Interface: a drawable is classified sky when its name matches sky / skydome / skybox /
stars / clouds / sun / moon / atmosphere and spans more than 50 m (or by size alone past
2000 m) — then it inflates neither content_frac nor the overview fit. Whether the brief's
place has a visible sky at all is the brief's (an interior, a cave, deep space).
Strong options: makeSky(scene, { rig }) from lib/sky.js is the shipped dome, lit from the
same sunRig as the scene (it keeps a scene.background already set, else sets its horizon colour). One of your own is a BackSide
sphere (fog: false, depthWrite: false, built with makeShaderMaterial from lib/shader.js
so the tonemap chunks stay) whose fragment colour is a function of the view direction: a
horizon-to-zenith gradient, a sun term around sunDir (a halo and, if the brief's weather
shows it, a disk), and a haze band that pulls the lowest degrees toward the horizon colour.
The curve shapes and the colours are the brief's sky: a low sun widens the halo and warms the
horizon, an overcast sky is one flat gradient, a night sky hashes the direction for stars
and shades a moon.
scene.environmentsunRig returns envTex baked from its own sky — assign it and the requirement is met.
If you bake your own equirect DataTexture, these are bugs when broken:
width / 4; a
64x32 bake gives 16-pixel cube faces — technically valid, visually useless.tex.mapping = THREE.EquirectangularReflectionMapping;
tex.colorSpace = THREE.SRGBColorSpace;DataTexture defaults to flipY = false, so ROW 0 IS STRAIGHT
DOWN. Fill with const v = 1 - y / h; (theta = v * PI from the zenith).
Inverted, the ground half sits where the sky belongs and every reflective
surface mirrors the dark half — the reference harness found this in 4 of 9
delivered scenes; its canal went from near-black to green-with-sun by
flipping that single line.Requirement: if the brief's sky has clouds, they read as soft volumes at the authored
cameras, not as hard-edged cards (judged: hard_edged_particles, materials_shaders_effects).
Strong options: a ray-marched deck lit from sunDir for a sky-filling layer, a volume with
internal light when a cumulus is close enough to need it, or sprite puffs from one shared
radial-gradient canvas in a flattened cluster, bottoms tinted darker, depthWrite: false.
Volumetrics cost frame time; the brief decides whether a cloud earns it.
If the brief's weather has haze or fog: keep it in the sky's hue family and thin enough that
the midground stays readable — the frame gate reads a washed frame as flat_frame (one
luminance band holding > 92 % of an authored frame is an ERROR) and the judge reads no
falloff at all as thin_atmosphere. scene.fog does the simplest version; ground fog is
a height-faded layer of your own, distance haze a view-distance blend toward the horizon
colour. A clear dry day may have almost none. The shader-trap skill covers the fog uniforms
custom shaders must honour.
Render one frame and look at a reflective surface: water or glass mirroring a
BRIGHT sky half means the bake is upright; mirroring darkness at midday means
row 0 went to the zenith. references/exotic-space.md holds the validated
black-hole / nebula / planet notes for space briefs.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gaoypeng/3dcodeverse --plugin 3dcodeverse29 skills in this plugin
/3dcodeverseUse for ANY request to make, measure, judge or improve a 3D thing in code: a model, object or prop, a mechanism or robot with joints, a scene or environment, a shader or OpenGL effect — in Blender bpy, CadQuery, Three.js, URDF, GLSL or moderngl. This is 3D coding with the 3dcodeverse plugin: raw executable 3D code that the 3dcode instruments build, measure, render, gate and score. First step, all in ONE read: this file, skills/3d-lang-<language, hyphenated>/SKILL.md and skills/3dcodeverse/references/plan-<static|articulated|scene|graphics>.md (urdf_blender: also skills/3d-lang-blender/SKILL.md and plan-static.md, which it builds on); no c3d-* skill until a 3dcode finding or score item names its topic./3d-lang-blenderUse when writing, refining or repairing a static_object in Blender bpy (language blender): the files and builder names the lint expects, the Z-up metre frame, naming, the sandbox (allowed imports, forbidden bpy calls), the exact thresholds check-contract / check-connectivity / detail_budget measure, what the GLB exporter keeps, the Blender 5.2.2 API traps, and the 3dcode loop that ships it./3d-lang-cadqueryUse when writing, refining or repairing a static_object in CadQuery (language cadquery): the module-level `result` assembly the wrapper reads, named parts and instances, the Z-up metre frame, the lint's import and call lists, the thresholds check-contract / check-connectivity / detail_budget measure, the OCC kernel facts that fail a build, and the 3dcode loop./3d-lang-glsl-shaderUse when writing, refining or repairing a graphics-track fragment shader (language glsl_shader): the files (one include file per layer, pasted above shader.frag), the uniform block the build prepends (never redeclare it), the two entry points, the gl-frames gate thresholds (NaN, black/blown, static, flicker, low detail) with their score caps, the lint's GLSL 330 rules, the feedback buffer, the judge's named defects, and the 3dcode loop./3d-lang-opengl-pythonUse when writing, refining or repairing a graphics-track moderngl program (language opengl_python): the two entry points setup/render and their exact signatures, the sampled-time trap (render is called at t = 0, 1, 2.5, 4, 6 s, in any order), the final pass into the supplied fbo, the AST lint's import allow-list and forbidden calls, the moderngl facts that decide whether the build runs, the gl-frames gate caps, and the 3dcode loop./3d-lang-scene-blenderUse when writing, refining or repairing a scene in Blender bpy (language scene_blender): the module files and their exact functions (env height_at/build_env, zone build, asset build_<snake>), the ctx every builder receives, the Z-up frame and the Y-up plan conversion, allowed imports and the lint's forbidden table, Blender 5.2 API facts, what Cycles does with what you build, motion as keyframes/drivers, the placement and frame gate thresholds, and the 3dcode loop.Other plugins' skills for the same job