Skills

3d Sky Rays

Add sun shafts and crepuscular rays to a Three.js or equivalent 3D scene, using scene...

Install

npx skills add MengTo/Skills --skill 3d-sky-rays -g -a claude-code -y
Repository
MengTo/Skills7.2k
Category
Media
Updated
3d ago
License
MIT
Context cost
Lightabout 1,147 tokens
Runs scripts
No, instructions only

What it does

Add sun shafts and crepuscular rays to a Three.js or equivalent 3D scene, using scene occlusion, a projected sun position, controlled foreground spill, and scalable post-processing. Use for rays of light from the sky, sunlight through trees or roofs, and golden-hour architectural scenes.

3D Sky Rays

Make the light appear to travel through gaps in the scene. Roof edges and foliage should shape the shafts as the camera moves.

Fit the existing renderer

Inspect the renderer version, render targets, alpha usage, depth path, tone mapping, and post-processing order. Keep the existing WebGL or WebGPU backend. The shader recipe below describes a WebGL screen-space effect; implement the equivalent in the project's node/render pipeline when using WebGPU.

Use one normalized world-space direction pointing toward the sun for the sky, ray source, and directional lighting. If the art direction deliberately offsets the visible sun from the lighting sun, document and control that offset in one place.

Build an occlusion-aware ray pass

Read the whole SKILL.md on GitHub

More in Media