3D engine that AI agents drive
JavaScript 3d3d-engineagentic-aiai-agentsblenderclaude-codegame-enginegaussian-splattinggltfjavascriptmcpmcp-servermodel-context-protocolpath-tracerpath-tracingpbrrenderingthreejs-alternativewebgl2webgpu
<!doctype html>
<html lang="en" data-theme="crucible">
<head>
<meta charset="UTF-8" /><script>try{var saved=localStorage.getItem("crucible-color");if(saved==="light"||saved==="dark")document.documentElement.dataset.color=saved}catch(error){}</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="A metal kettle lit by one key light and flat ambient, then by a studio HDRI." />
<link rel="canonical" href="https://crucible.codepawl.com/recipe-hdri-lighting.html" />
<title>HDRI lighting against a flat key light · Crucible</title>
<link rel="icon" href="/favicon.svg?v=2" type="image/svg+xml" /><link rel="icon" href="/favicon.ico?v=2" sizes="48x48" /><link rel="apple-touch-icon" href="/apple-touch-icon.png" />
</head>
<body class="site recipes">
<a class="skip-link" href="#content">Skip to content</a>
<header class="navigation">
<a class="brand" href="/" aria-label="Crucible home">Crucible</a>
<nav aria-label="Library"><a href="/docs.html">Docs</a><a href="/recipes.html" aria-current="page">Recipes</a><a href="/marketplace.html">Marketplace</a><a href="/changelog.html">Changelog</a></nav>
<a class="site-nav-cta" href="https://github.com/codepawl/crucible" aria-label="GitHub"><span class="package-logo package-logo-github" aria-hidden="true"></span><span class="site-nav-cta-label">GitHub</span></a>
</header>
<main id="content">
<p class="recipe-back"><a href="/recipes.html"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m15 6-6 6 6 6"/></svg>Recipes</a></p>
<h1>HDRI lighting against a flat key light</h1>
<div class="recipe-pair"><figure><img src="/recipes/hdri-lighting-before.webp" width="960" height="540" alt="HDRI lighting against a flat key light: Flat key and ambient" /><figcaption>Flat key and ambient</figcaption></figure><figure><img src="/recipes/hdri-lighting-after.webp" width="960" height="540" alt="HDRI lighting against a flat key light: studio-softbox HDRI" /><figcaption>studio-softbox HDRI</figcaption></figure></div>
<div class="recipe-why"><p>Metal shows what is around it. With one light and flat ambient there is nothing to reflect, so steel reads as grey plastic.</p><p>An HDRI gives the metal a room to reflect: soft boxes, a bright window, a dark floor. Set the key light to 0, because the HDRI already carries the light.</p></div>
<section class="recipe-code" aria-labelledby="scene-code-title">
<div class="recipe-code-heading"><h2 id="scene-code-title">Scene code</h2><button type="button" data-copy-code="scene-code">Copy</button></div>
<pre><code id="scene-code">{
"format": "crucible.scene",
"schemaVersion": 1,
"geometries": [
{ "id": "body", "type": "lathe", "segments": 96, "profile": [[0,0],[0.38,0],[0.387,0.003],[0.397,0.005],[0.409,0.01],[0.42,0.02],[0.43,0.04],[0.438,0.07],[0.446,0.109],[0.453,0.154],[0.458,0.201],[0.46,0.25],[0.459,0.302],[0.456,0.358],[0.451,0.416],[0.442,0.471],[0.43,0.52],[0.414,0.564],[0.393,0.604],[0.37,0.64],[0.345,0.672],[0.32,0.7],[0.292,0.722],[0.259,0.739],[0.227,0.752],[0.2,0.762],[0.18,0.77],[0,0.77]] },
{ "id": "lid", "type": "lathe", "segments": 64, "profile": [[0, 0], [0.19, 0], [0.17, 0.03], [0.06, 0.05], [0.05, 0.09], [0.025, 0.12], [0, 0.12]] },
{ "id": "spout", "type": "cylinder", "segments": 32 },
{ "id": "handle", "type": "torus", "tubeRadius": 0.09, "segments": 64, "sides": 16 },
{ "id": "floor", "type": "box", "bevel": 0 }
],
"materials": [
{ "id": "steel", "color": [0.82, 0.83, 0.86], "metallic": 1, "roughness": 0.16 },
{ "id": "grip", "color": [0.03, 0.03, 0.035], "metallic": 0, "roughness": 0.6 },
{ "id": "table", "color": [0.3, 0.26, 0.22], "metallic": 0, "roughness": 0.85 }
],
"nodes": [
{ "id": "table", "geometry": "floor", "material": "table", "translation": [0, -0.05, 0], "scale": [6, 0.1, 4] },
{ "id": "kettle", "translation": [0, 0, 0] },
{ "id": "body", "parent": "kettle", "geometry": "body", "material": "steel" },
{ "id": "lid", "parent": "kettle", "geometry": "lid", "material": "steel", "translation": [0, 0.76, 0] },
{ "id": "spout", "parent": "kettle", "geometry": "spout", "material": "steel", "translation": [0.73, 0.46, 0], "rotation": [0, 0, -0.342, 0.94], "scale": [0.07, 0.55, 0.07] },
{ "id": "handle", "parent": "kettle", "geometry": "handle", "material": "grip", "translation": [-0.66, 0.42, 0], "rotation": [0.7071, 0, 0, 0.7071], "scale": [0.28, 0.28, 0.28] }
],
"camera": { "eye": [1.9, 1.1, 2.6], "target": [0.1, 0.38, 0], "fov": 30 },
"environment": { "world": true, "hdri": "studio-softbox", "environmentIntensity": 0.35, "keyIntensity": 0, "fillIntensity": 0 }
}</code></pre>
</section>
<section class="recipe-code" aria-labelledby="before-code-title">
<div class="recipe-code-heading"><h2 id="before-code-title">Merge into the environment for “Flat key and ambient”</h2><button type="button" data-copy-code="before-code">Copy</button></div>
<pre><code id="before-code">{ "hdri": null, "world": false, "lightDirection": [-0.4, 0.8, 0.5], "keyColor": [1, 0.97, 0.92], "keyIntensity": 2.4, "ambientIntensity": 0.6 }</code></pre>
</section>
<p class="recipe-file"><a href="/recipes/hdri-lighting.json" download>Download hdri-lighting.json</a><span>Paste it into <code>scene_create</code> as <code>recipe</code>.</span></p>
</main>
<footer class="site-footer" aria-label="Site footer">
<p><a class="brand" href="/" aria-label="Crucible home">Crucible</a> by <a href="https://codepawl.com">CodePawl</a></p>
<nav class="footer-links" aria-label="Project links"><a href="https://github.com/codepawl/crucible"><span class="package-logo package-logo-github" aria-hidden="true"></span>GitHub</a><a href="https://www.npmjs.com/package/@codepawlhq/crucible"><span class="package-logo package-logo-npm" aria-hidden="true"></span>npm</a><a href="/changelog.md">Changelog</a><a href="/license.txt">MIT license</a></nav>
</footer>
<script type="module" src="/src/recipes.js"></script>
</body>
</html>