Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when working with 3D-specific systems — materials, lighting, shadows, environment, global illumination, fog, LOD, occlusion culling, and decals in Godot 4.3+
.claude/skills/jame581-3d-essentials/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 159% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 97% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 114% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 122% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 71% | 0% |
All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.
> Related skills: player-controller for CharacterBody3D movement, physics-system for 3D collision shapes and raycasting, camera-system for Camera3D follow and transitions, shader-basics for spatial shaders and post-processing, godot-optimization for 3D performance tuning, animation-system for AnimationTree and 3D animation blending.
Godot uses a right-handed coordinate system with metric units (1 unit = 1 meter):
| Axis | Direction | Color | |------|-----------|--------| | X | Right | Red | | Y | Up | Green | | Z | Out of screen (+Z toward viewer) | Blue |
> Cameras and lights point along -Z by default. When a character "faces forward," they look along -Z.
| Node | Purpose | |--------------------|-------------------------------------------------| | Node3D | Base transform node — position, rotation, scale | | MeshInstance3D | Displays a mesh with a material | | Camera3D | Required to render 3D — perspective or orthogonal | | DirectionalLight3D | Sun/moon — parallel rays, cheapest light | | OmniLight3D | Point light — emits in all directions | | SpotLight3D | Cone light — flashlights, spotlights | | WorldEnvironment | Sky, fog, tonemap, post-processing | | Decal | Projected texture onto surfaces | | GPUParticles3D | GPU-driven particle effects | | CSGBox3D etc. | Constructive Solid Geometry — prototyping | | GridMap | 3D tile-based level building |
> Godot 4.7+: GridMap exposes its internal octants for spatial queries (cell_octant_size, get_used_octants(), get_octants_in_bounds() and friends) so you can scope work to a region instead of walking every cell. CSGShape3D gains autosmooth / smoothing_angle for automatic face smoothing. Full method table and semantics: references/godot-4.7-additions.md
World (Node3D)
├── Camera3D
├── DirectionalLight3D
├── WorldEnvironment
├── MeshInstance3D (floor)
└── MeshInstance3D (player model)| Material | Use For | Notes | |----------------------|---------------------------------------------|--------------------------------| | StandardMaterial3D | Most 3D objects — PBR workflow | No code; Inspector-driven | | ORMMaterial3D | Same as Standard but with packed ORM texture | Occlusion+Roughness+Metallic in one texture | | ShaderMaterial | Custom effects — toon, water, dissolve | Requires spatial shader code |
The PBR core: albedo_color / albedo_texture (base color), metallic (0 dielectric → 1 metal), roughness (0 mirror → 1 matte), normal_map (surface detail), ao_texture (ambient occlusion). Add emission + emission_energy_multiplier for self-illumination, heightmap_texture for parallax, rim / clearcoat for material flair.
Prefer Alpha Scissor (fast, shadowed cutouts) or Alpha Hash (dithered — hair) over plain Alpha (slow, no shadows); Depth Pre-Pass suits mostly-opaque meshes with transparent edges.
> See references/materials-and-lighting-recipes.md for the comparison table.
Create a StandardMaterial3D at runtime, assign to mesh.material_override, and drive emissive flashes via Tween. Use .duplicate() to make per-instance copies so changing one mesh's material doesn't affect others.
> See references/materials-and-lighting-recipes.md for the full GDScript and C# recipes (basic material setup, emissive flash, per-instance duplicate, dynamic OmniLight3D explosion).
| Light | Shape | Shadows | Cost | Max Visible | |---------------------|---------------|---------|---------|----------------------| | DirectionalLight3D | Parallel rays | PSSM | Cheapest | 8 (Forward+) | | OmniLight3D | Sphere | Cube/Dual Paraboloid | Medium | 512 clustered | | `SpotLight3D` | Cone | Single texture | Cheap | 512 clustered | | AreaLight3D (4.7+) | Rectangle | PCSS soft | Most expensive | — |
Forward+ shares 512 clustered element slots among omni lights, spot lights, decals, and reflection probes.
Key knobs: light_color, light_energy (HDR — values >1 are valid), shadow_enabled (big perf hit), directional_shadow_mode, directional_shadow_max_distance (lower = sharper shadows).
> See references/materials-and-lighting-recipes.md for the properties table and the GDScript + C# sun setup snippet.
AreaLight3D emits light from a rectangle along the node's -Z — neon tubes, screens, softbox panels — with PCSS soft shadows driven by light_size. Key properties: area_size = Vector2(1, 1) (meters), area_range = 5.0, area_attenuation = 1.0 (2.0 = physically accurate inverse square), area_normalize_energy = true (resizing keeps total output stable), optional area_texture for textured emission (Forward+/Mobile only). Mobile support is limited and Compatibility cannot cast area-light shadows; in Forward+, a single visible area light adds clustered-lighting cost to all rendered objects — reserve for cinematics or high-end targets.
> See references/materials-and-lighting-recipes.md for the full property table and the GDScript + C# setup recipe.
Spawn an OmniLight3D at runtime, drive its energy with a tween, queue-free on completion. Common for explosions, muzzle flashes, magic effects.
> See references/materials-and-lighting-recipes.md for the full GDScript and C# recipe.
Prefer shadow_normal_bias over shadow_bias against acne; keep directional_shadow_max_distance at the minimum needed (50–100 m typical). Bake modes: Disabled (fully real-time, default), Static (fully baked, no runtime cost), Dynamic (indirect baked, direct real-time).
> See references/materials-and-lighting-recipes.md for the shadow-tuning table and the bake-modes table.
Configure global rendering — sky background, tonemapping, glow, SSR, SSAO/SSIL/SDFGI, depth-of-field — through a WorldEnvironment node holding an Environment resource. Pick a tonemap (Linear, Reinhard, Filmic, ACES, or AgX) on the Environment resource. Forward+ enables SSAO, SSIL, SSR, and SDFGI; mobile/compatibility renderers omit these.
> See references/environment-and-post.md for the full setup recipes (sky options, tonemap modes, all post-processing effects, the 4.6+ glow-before-tonemapping pipeline change, AgX tonemap_white / tonemap_contrast controls, and the 4.6+ SSR quality upgrade).
> Godot 4.7+: display/window/hdr/request_hdr_output (default false, promoted to a basic project setting) requests HDR display output for the main window and editor where supported, auto-switching between HDR and SDR as screens or system settings change; it forces Viewport.use_hdr_2d on for the main viewport (other SubViewports must enable it themselves). Read only at startup — toggle Window.hdr_output_requested at runtime.
> ⚠️ Changed in Godot 4.7: The rendering/reflections/sky_reflections/roughness_layers default changed from 7 to 8, altering sky-reflection roughness mip distribution for projects that left it at the default. Set it back to 7 to keep the 4.6 output. See the 4.7 migration guide.
Five GI options trade quality for cost: none (ambient only) → ReflectionProbe (localized) → LightmapGI (best quality, baked) → VoxelGI (small/medium dynamic) → SDFGI (large open-world). VoxelGI/SDFGI/LightmapGI require Forward+. The 4.5+ subsections below (Specular Occlusion, Bent Normal Maps) stay inline because they apply across GI methods.
> See references/global-illumination.md for the methods comparison table, ReflectionProbe scene + code recipe, LightmapGI bake workflow, and SDFGI configuration.
Godot 4.5+ automatically computes specular occlusion from the ambient light probe when LightmapGI, VoxelGI, or SDFGI is active. Prevents unrealistically bright speculars in areas that receive little indirect light (under eaves, inside crevices, in corners). No API change — re-bake after upgrading to see the improvement on metallic / low-roughness surfaces. ReflectionProbe alone does not provide specular occlusion.
Bent normal maps encode the mean unoccluded direction from each texel — the average direction toward open sky across the hemisphere. When assigned to the Bent Normal slot on StandardMaterial3D, Godot uses this information to improve indirect lighting directionality and specular occlusion accuracy. The result is more realistic ambient lighting on complex surfaces like cloth, carved stone, or organic shapes.
Inspector setup: In StandardMaterial3D, enable Bent Normal → assign your tangent-space bent normal texture (baked from Marmoset, Substance, or xNormal).
> Most visible on: materials that combine low roughness or high metallic values with baked GI (LightmapGI / VoxelGI / SDFGI). On fully rough dielectric surfaces the benefit is subtler. Use on hero assets; skip on background geometry.
> See references/materials-and-lighting-recipes.md for the runtime-assignment GDScript + C# code path (the Inspector setup above is the typical case).
Three layers: depth/height fog set on WorldEnvironment.environment (cheap, all renderers), volumetric fog (Forward+ only — godrays through depth), and FogVolume nodes for localized fog effects (interior rooms, pits, atmospheric volumes).
> See references/fog-recipes.md for the full GDScript and C# recipes — depth/height fog setup, volumetric fog parameters and performance notes, and FogVolume placement.
> ⚠️ Changed in Godot 4.7: Volumetric fog is now blended using transmittance instead of opacity, so existing volumetric fog can look different after upgrading. Enable the project setting rendering/environment/fog/use_legacy_blending (default false) to restore the previous behavior. See GH-119414.
Decal nodes project a texture onto whatever surfaces fall within their bounding box — bullet holes, blood splatter, ground details, signage. All renderers support decals; performance scales with overdraw and decal count.
> See references/decals.md for the scene setup, runtime spawning recipe (GDScript + C#), and the per-renderer decal limits.
Four tools: automatic mesh LOD (set on import or per MeshInstance3D), manual VisibilityRange for staged swaps, occlusion culling via OccluderInstance3D, and MultiMeshInstance3D for thousands of identical meshes in one draw call.
> See references/lod-and-culling.md for setup recipes for each tool plus the MultiMesh runtime population example.
Pick the renderer before you build the look: Forward+ (desktop default) is the only one with SDFGI and volumetric fog, Mobile trades those for performance on tile-based GPUs, and Compatibility (GLES3-class) drops most advanced lighting entirely. Advice that assumes SDFGI silently fails on the other two.
Full feature-by-renderer table and selection guidance: references/renderer-comparison.md
Quick symptom → cause → fix table covering black scenes, dark objects without ambient light, shadow acne and peter-panning, popping shadows, flat materials, invisible decals, transparency sorting artifacts, SDFGI light leaking, missing volumetric fog, and invisible MultiMesh instances.
> See references/common-pitfalls.md for the full table.
shadow_normal_bias tuned to prevent acnedirectional_shadow_max_distance is set to the minimum needed (50–100m typical)tonemap_white and tonemap_contrast are adjusted when using AgX tonemapper for precise look control (Godot 4.6+)roughness_layers default changed)| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 15,855 | 17,624 | +11% | 1 | 1 | 0% | 2,688 | 6,962 | +159% | 0 | 0 | — |
case-02 | pass→pass | 17,600 | 15,256 | -13% | 1 | 1 | 0% | 3,240 | 6,694 | +107% | 0 | 0 | — |
case-03 | fail→pass | 17,281 | 11,204 | -35% | 1 | 1 | 0% | 3,224 | 6,353 | +97% | 0 | 0 | — |
case-04 | fail→pass | 16,759 | 13,736 | -18% | 1 | 1 | 0% | 3,180 | 6,821 | +114% | 0 | 0 | — |
case-05 | fail→pass | 18,183 | 12,778 | -30% | 1 | 1 | 0% | 2,836 | 6,308 | +122% | 0 | 0 | — |
case-06 | fail→pass | 15,475 | 4,538 | -71% | 1 | 1 | 0% | 2,626 | 4,480 | +71% | 0 | 0 | — |
case-07 | fail→pass | 10,025 | 2,441 | -76% | 1 | 1 | 0% | 1,769 | 4,230 | +139% | 0 | 0 | — |
case-08 | pass→pass | 12,139 | 12,833 | +6% | 1 | 1 | 0% | 2,051 | 5,815 | +184% | 0 | 0 | — |
case-09 | pass→pass | 13,718 | 10,647 | -22% | 1 | 1 | 0% | 2,701 | 5,749 | +113% | 0 | 0 | — |
case-10 | pass→pass | 10,658 | 9,173 | -14% | 1 | 1 | 0% | 2,273 | 5,612 | +147% | 0 | 0 | — |
case-11 | pass→pass | 7,093 | 8,295 | +17% | 1 | 1 | 0% | 1,231 | 5,294 | +330% | 0 | 0 | — |
case-12 | fail→pass | 9,028 | 4,329 | -52% | 1 | 1 | 0% | 1,425 | 4,591 | +222% | 0 | 0 | — |
case-22 | pass→pass | 12,471 | 18,103 | +45% | 1 | 1 | 0% | 2,302 | 7,546 | +228% | 0 | 0 | — |
case-13 | pass→pass | 13,309 | 13,328 | +0% | 1 | 1 | 0% | 2,417 | 6,356 | +163% | 0 | 0 | — |
case-14 | fail→pass | 13,699 | 7,869 | -43% | 1 | 1 | 0% | 2,225 | 5,135 | +131% | 0 | 0 | — |
case-15 | fail→pass | 12,264 | 6,023 | -51% | 1 | 1 | 0% | 2,030 | 4,886 | +141% | 0 | 0 | — |
case-16 | fail→pass | 16,214 | 11,669 | -28% | 1 | 1 | 0% | 2,651 | 5,873 | +122% | 0 | 0 | — |
case-17 | pass→pass | 4,683 | 5,726 | +22% | 1 | 1 | 0% | 825 | 4,784 | +480% | 0 | 0 | — |
case-18 | pass→pass | 6,587 | 6,601 | +0% | 1 | 1 | 0% | 1,061 | 4,970 | +368% | 0 | 0 | — |
case-19 | pass→pass | 14,534 | 16,172 | +11% | 1 | 1 | 0% | 2,457 | 6,706 | +173% | 0 | 0 | — |
case-20 | pass→pass | 12,835 | 11,151 | -13% | 1 | 1 | 0% | 2,374 | 5,879 | +148% | 0 | 0 | — |
case-21 | pass→pass | 12,257 | 12,352 | +1% | 1 | 1 | 0% | 2,345 | 6,248 | +166% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +45 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.