Shade under-island engines so they read as in shadow#24
Conversation
The lift/turbo propeller engines and the heavy rocket engine hang in the island's shadow, but their Lambert materials still caught full ambient + sky light, so they read far too bright (freshly-minted) against the dark underside. Add a tunable UNDER_ISLAND_ENGINE_SHADE (~0.6x) that multiplies the lift engine palette toward black via a new engineBuildMaterial helper, and darken the rocket-only steel materials to match. Gives the under-island hardware a used/aged, properly-occluded look. The glowing rocket nozzle (rocketHeat) is left intact.
✅ Deploy Preview for tiny-world-builder ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR implements a comprehensive under-island material shading system by introducing a reusable ChangesUnder-Island Material Shading
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Engines were still too bright: drop UNDER_ISLAND_ENGINE_SHADE 0.6 -> 0.45 (and the rocket-only steel materials to match). Also shade the other hardware that floats beneath the island. Add a cached shadeLambertMaterial() helper and a UNDER_ISLAND_DRESSING_SHADE, then darken the utility underside (pipes/trays/boxes/clamps/cables) and the hanging edge-dressing cubes so they read as occluded rather than sunlit. The utility underside is built into a detached group and shaded in one pass; static-mesh merging still works (it traverses recursively and bakes world transforms). The sunlit grass lip and shared top-surface materials are left untouched.
There was a problem hiding this comment.
Pull request overview
This PR darkens under-island hardware (engines + hanging “dressing” like pipes/trays/boxes) so it reads as being in the island’s shadow, addressing overly-bright Lambert materials under the island.
Changes:
- Added a tunable under-island engine shade factor and routed lift-engine palette materials through a shaded material factory.
- Darkened rocket-engine steel materials to visually match the under-island engine shading.
- Added a cached
shadeLambertMaterialhelper and applied it to under-island dressing (edge drops + utility underside group).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| engine/world/13-distant-dressing-ghost.js | Applies a constant shade factor to under-island dressing materials (edge drops + utility underside group). |
| engine/world/09b-voxel-build-factories.js | Introduces under-island engine shade constant + helpers, and routes lift-engine palette materials through the shaded pipeline. |
| engine/world/03-geometry-materials.js | Adds cached shadeLambertMaterial helper and darkens rocket steel materials to match under-island shading. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // every engine palette colour toward black to fake the ambient occlusion the | ||
| // geometry above would cast — a "used-universe" shaded look. 1 = untouched, | ||
| // lower = darker. Tune here to taste. | ||
| const UNDER_ISLAND_ENGINE_SHADE = 0.45; |
| // Darkened (~0.45x) so the heavy/rocket engine reads as shaded under the | ||
| // island instead of brightly lit — parity with the lift engine's under-island | ||
| // shade (engine/world/09b UNDER_ISLAND_ENGINE_SHADE). Rocket-only materials. | ||
| rocketSteel: new THREE.MeshLambertMaterial({ color: 0x35383c, side: THREE.FrontSide }), | ||
| rocketSteelD: new THREE.MeshLambertMaterial({ color: 0x15181b, side: THREE.FrontSide }), |
Problem
The lift/turbo propeller engines and the heavy rocket engine hang in the island's shadow, but their
MeshLambertMaterials still caught full ambient + sky light. The result: the under-island hardware reads far too bright — freshly-minted rather than weathered and in-shadow — against the dark underside (see attached screenshot).Fix
A "used-universe" shade that fakes the ambient occlusion the island above would cast:
engine/world/09b-voxel-build-factories.js— new tunableUNDER_ISLAND_ENGINE_SHADE(~0.6×) plusshadeEngineHex/engineBuildMaterialhelpers. The lift engine's 8-colour palette now routes throughengineBuildMaterial, so every voxel is darkened toward black. Darkened colours cache under their own key, so engines still merge by material (no perf regression).engine/world/03-geometry-materials.js— the rocket-onlyrocketSteel/rocketSteelDmaterials are darkened ~0.6× to match. The glowing nozzle (rocketHeat) is intentionally left intact.Tune the look by adjusting the single
UNDER_ISLAND_ENGINE_SHADEconstant (1 = untouched, lower = darker).Verification
npm run check✅ (i18n + duplicate-declaration scan)npm run smoke✅https://claude.ai/code/session_01SYYysXAcC88KuMgvhb2noh
Generated by Claude Code
Summary by CodeRabbit