Sandbox
@CK42BB/procedural-clouds-threejs

Claude Code skill for Three.js procedural clouds

This skill teaches Claude Code how to generate cloud scenes in Three.js across three rendering paths: WebGPU raymarching, mesh clusters, and billboard sprites. It also includes cloud-type profiles, lighting guidance, and shader references for building believable skies in different browser capabilities.

46 stars6 forksUpdated 7mo ago
Who it's for

Builders who use Claude Code and Three.js to make cloud scenes.

What it delivers

You can ask Claude Code to build convincing clouds without rewriting the rendering and lighting setup each time.

What it does

Volumetric raymarching

Uses Beer-Lambert absorption, Henyey-Greenstein phase functions, and light marching for self-shadowed volume clouds.

Mesh cluster clouds

Provides instanced soft-particle sphere clouds with profiles tuned to each cloud type.

Billboard clouds

Uses camera-facing sprites with procedural noise textures for mobile and distant backgrounds.

Cloud genera presets

Covers all 10 cloud genera, including cumulus, stratus, cirrus, cumulonimbus, and related layered types.

Lighting and color

Includes silver linings, subsurface scattering, powder edges, and time-of-day palettes from dawn to night.

God ray post-processing

Adds radial blur light shafts for scenes with strong sunlight.

GPU noise generation

Uses WGSL compute noise for tiling Perlin and Worley textures.

Animated drift

Adds wind-driven movement, formation, and dissipation for changing skies.

How to get it

  1. 1Run
    claude install-skill path/to/procedural-clouds

README

Procedural Clouds — Claude Code Three.js Skill

A Claude Code skill for generating beautiful procedural clouds in Three.js, emphasizing artistic quality across all major cloud types with WebGPU raymarching and WebGL fallbacks.

Part of the Teaching Three.js skill series.

What This Skill Does

When installed, this skill teaches Claude Code how to generate procedural cloudscapes including:

  • Volumetric raymarching with Beer-Lambert absorption, Henyey-Greenstein phase functions, and light marching for self-shadowing
  • Mesh cluster clouds — instanced soft-particle spheres with cloud-type-specific profiles
  • Billboard clouds — camera-facing sprites with procedural noise textures for mobile/background use
  • All 10 cloud genera — cumulus, stratus, cirrus, cumulonimbus, stratocumulus, altocumulus, altostratus, nimbostratus, cirrostratus, cirrocumulus
  • Physically-inspired lighting — silver linings, subsurface scattering, two-lobe phase functions, Beer-powder bright edges
  • Time-of-day coloring — dawn, golden hour, sunset, twilight, and night palettes
  • God ray post-processing — radial blur for volumetric light shafts
  • WGSL 3D noise compute — GPU-generated tiling Perlin + Worley noise textures
  • Animated drift — wind-driven movement, formation, and dissipation

Installation

Claude Code (CLI)

claude install-skill path/to/procedural-clouds

Or copy the procedural-clouds/ folder into your Claude Code skills directory.

Manual Usage

FilePurpose
SKILL.mdMain skill — three rendering paths, lighting model, presets, scene assembly
references/cloud-shaders.mdComplete GLSL/WGSL shaders for volumetric, mesh, billboard, god rays
references/cloud-types.mdAll 10 cloud genera with density parameters, lighting, and artistic direction

Quick Start Prompts

"Create a sky with beautiful cumulus clouds and golden hour lighting"

"Build volumetric raymarched clouds with silver linings and god rays"

"Generate a dramatic cumulonimbus storm cloud with dark base and bright anvil top"

"Create a sunset scene with stratocumulus clouds lit from below in gold and purple"

"Build a peaceful cirrus sky with delicate ice crystal wisps at high altitude"

"Create a layered sky with cirrus above altocumulus above scattered cumulus"

Requirements

  • Three.js r170+ for WebGPU support and TSL node materials
  • WebGPU browser (Chrome 121+, Edge 121+) for volumetric raymarching and compute noise
  • WebGL2 fallback (mesh/billboard paths) works in all modern browsers

Skill Architecture

procedural-clouds/
├── SKILL.md                          # Core skill (read first)
├── README.md                         # This file
└── references/
    ├── cloud-shaders.md              # GLSL, WGSL, and TSL shader code
    └── cloud-types.md                # 10 genera profiles with artistic notes

Key Concepts

Three Rendering Paths

PathQualityCostBest For
Volumetric RaymarchingHighestHighDesktop hero scenes, WebGPU
Mesh ClusterGoodMediumGeneral use, WebGL2
Billboard SpritesAcceptableLowMobile, distant backgrounds

Lighting Is Everything

Cloud beauty comes from light interaction, not shape alone. The skill implements:

  • Henyey-Greenstein phase — two-lobe forward + back scattering
  • Beer-Lambert + powder — bright thin edges, dark thick centers
  • Silver linings — dramatic rim glow when sun is behind clouds
  • Self-shadowing — inner light march creates natural dark bases
  • Time-of-day palettes — from peach dawn to purple twilight

Cloud Genera at a Glance

CloudAltitudeKey Visual
CumulusLowCotton ball, flat base
StratusLowGrey blanket
StratocumulusLowLumpy blanket with gaps
CumulonimbusAllTowering storm anvil
AltocumulusMidMackerel sky pattern
AltostratusMidThin veil, watery sun
NimbostratusMidDark rain sheet
CirrusHighWispy ice streaks
CirrostratusHighMilky haze with halos
CirrocumulusHighTiny fish-scale ripples

Series: Teaching Three.js

Independent skills that compose for complete environments:

License

MIT — use freely in your projects.

Files in the repo

Repository payload6 top-level entries
  • cloud-shaders.md
  • cloud-types.md
  • LICENSE
  • procedural-clouds.skill
  • README.md
  • SKILL.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k