Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(render): add image-based lighting so avatar renders aren't dark and murky

nirholasa0e9db8acf68
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 00e8117fb..0a49f2d30 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **A new way to generate avatars: modular, and no two look alike** — The studio avatar generator used to recolor one of five fixed body meshes, so a whole gallery of them read as the same handful of people in different colors. It now composes each avatar from modular parts: a hairstyle, top, bottom, footwear, and glasses mixed across the base bodies onto one shared skeleton, then recolored per part and scaled for height. This is the same one-skeleton-many-parts approach the best avatar platforms use, built in-house with no external service. Every generated avatar is fully rigged and carries facial expression blendshapes, and two of them almost never look the same. All platform-generated avatars continue to appear across the galleries. (`/gallery`) `[feature, improvement]`
- **AR Studio: fill your room with 3D models, and forge new ones without leaving the camera** — Until now AR on three.ws was one model at a time: generate, view, exit. The new AR Studio at three.ws/ar/studio is a live scene through your camera where you can place as many models and avatars as you like together in your real space. Pull in your own forge creations, the community feed, or any GLB link; type a prompt and a brand-new model is generated behind the live view and drops into the room when ready. Drag to move, pinch to resize, twist to rotate, duplicate or remove any model, with keyboard shortcuts on desktop. The models look like they belong: on supported Android phones they are lit by your actual room light and reflect it on metal and glass, and they hide correctly behind your real furniture; on every phone the lighting matches your room's brightness and colour. On Android each model also gets its own world anchor; on iPhone the camera view with gyro look works out of the box; on desktop you arrange the scene and send it to your phone with a QR code that carries the exact arrangement, not just the model list. Your scene survives a refresh, humanoid avatars idle naturally instead of standing frozen, and a photo button captures the whole composition. (`/ar/studio`) `[feature]`
- **Avatar gallery previews now read clearly at a glance** — Gallery previews used to be shot dead-on against a near-black background, so dark models vanished and every card looked the same. Previews are now framed from a natural three-quarter angle, fill the card, and stand on a subtly tinted stage unique to each avatar. Prompt-created avatars also got more distinctive: sparse prompts like 'a knight' now commit to a specific look (age, build, hairstyle, palette, one signature detail) instead of converging on the same generic person. Every platform-generated avatar still appears in the galleries. (`/gallery`) `[improvement, fix]`
+- **Avatar renders look studio-lit, not murky** — Every generated avatar and 3D identity is now rendered with real studio lighting. The image-based lighting the renderer was missing is the reason materials like leather, fabric, and metal used to crush to near-black; adding it, plus faithful color tone mapping, makes those surfaces read the way they look in a real 3D viewer. Faces are lit, boots and belts look like leather again, and the whole character stands out from the backdrop. This lifts the profile pictures and full-body shots the Agent Identity Studio produces, and the avatar thumbnails across the site. `[improvement]`
- **Avatars you generate now come out truly animation-ready** — We rebuilt the auto-rigging engine that turns a generated 3D character into a living avatar. Rigging now finishes in seconds instead of stalling for 20 minutes, produces a full standard skeleton with fingers that our entire animation library (walk, wave, dance, emotes) can drive immediately, keeps the model's original textures perfectly intact, and adds the 52 facial expression shapes used for emotions and lip-sync. Every piece of the new pipeline is MIT-licensed open source, so it works for everyone, everywhere. (`/forge`) `[feature, improvement, fix]`
- **Community feed hover previews no longer blend into the photo underneath** — Hovering a card in the Fresh from the Forge strip spins the actual 3D model in place. The spinning model used to render on a nearly transparent background, so it visually collided with the card's photo thumbnail and looked broken, with a stray browser tooltip on top. The preview now draws on a solid backdrop, the redundant tooltip is gone, image-to-3D cards are labeled with their engine name (Hunyuan3D) instead of an internal id, and every card can now be opened from the keyboard. (`/forge`) `[fix, improvement]`
- **Creator profile pages work again, plus a site-wide reliability sweep** — A full automated sweep of every page and API endpoint on the site caught a bug that replaced creator profile pages (three.ws/u/yourname) with an error message. That is fixed. The sweep also repaired the login captcha for rate-limited sign-ins, fixed dead links in the dashboard and two blog posts, and added two dozen previously unlisted pages to the site index so search engines and the sitemap can find them. The audit now runs with deeper checks (blank-page detection, visible error detection, and link crawling) so regressions like these get caught before anyone hits them. (`/changelog`) `[fix, improvement]`
diff --git a/api/_lib/avatar-render.js b/api/_lib/avatar-render.js
index 2c4c8111e..23e4e485a 100644
--- a/api/_lib/avatar-render.js
+++ b/api/_lib/avatar-render.js
@@ -226,6 +226,7 @@ import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';
import { KTX2Loader } from 'three/addons/loaders/KTX2Loader.js';
import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js';
+import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';
window.__renderDone = false;
window.__renderError = null;
@@ -235,8 +236,11 @@ const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true,
renderer.setSize(${width}, ${height}, false);
renderer.setPixelRatio(1);
renderer.outputColorSpace = THREE.SRGBColorSpace;
-renderer.toneMapping = THREE.ACESFilmicToneMapping;
-renderer.toneMappingExposure = 1.0;
+// Neutral (Khronos PBR Neutral) tone mapping renders asset colors faithfully
+// without the shadow-crushing ACES rolloff — the right choice for a product
+// render where the character must read clearly.
+renderer.toneMapping = THREE.NeutralToneMapping;
+renderer.toneMappingExposure = 1.15;
const scene = new THREE.Scene();
const bgColor = ${bg};
@@ -244,15 +248,22 @@ if (bgColor !== null) scene.background = new THREE.Color(bgColor);
const camera = new THREE.PerspectiveCamera(28, ${width}/${height}, 0.01, 100);
-scene.add(new THREE.AmbientLight(0xffffff, 0.6));
-const key = new THREE.DirectionalLight(0xffffff, 1.5);
-key.position.set(2, 3, 4); scene.add(key);
-const fill = new THREE.DirectionalLight(0xbfd6ff, 0.65);
-fill.position.set(-3, 1, 2); scene.add(fill);
-const rim = new THREE.DirectionalLight(0xc7a8ff, 0.55);
-rim.position.set(0, 2, -4); scene.add(rim);
-const bottom = new THREE.DirectionalLight(0xffffff, 0.15);
-bottom.position.set(0, -2, 1); scene.add(bottom);
+// Image-based lighting is what makes PBR materials read: metal and glossy
+// surfaces draw their reflections from scene.environment, so with none set they
+// collapse to near-black — the "dark, murky" render. RoomEnvironment is three's
+// built-in procedural studio environment (no external HDR asset to host).
+const pmrem = new THREE.PMREMGenerator(renderer);
+scene.environment = pmrem.fromScene(new RoomEnvironment(), 0.04).texture;
+scene.environmentIntensity = 1.15;
+
+// Directional lights are accents on top of the IBL base: a warm key for form,
+// a soft cool fill to open the shadow side, a violet rim for separation.
+const key = new THREE.DirectionalLight(0xffffff, 1.6);
+key.position.set(2.5, 3.5, 3.5); scene.add(key);
+const fill = new THREE.DirectionalLight(0xdfeaff, 0.5);
+fill.position.set(-3, 1.2, 2.5); scene.add(fill);
+const rim = new THREE.DirectionalLight(0xecdcff, 0.7);
+rim.position.set(-0.5, 2.5, -4); scene.add(rim);
const aliases = {
shoulderl: ['leftshoulder','shoulder_l','l_shoulder','mixamorig:leftshoulder'],
diff --git a/api/_lib/render-clip.js b/api/_lib/render-clip.js
index e19463da5..76900c6bd 100644
--- a/api/_lib/render-clip.js
+++ b/api/_lib/render-clip.js
@@ -78,6 +78,7 @@ import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';
import { KTX2Loader } from 'three/addons/loaders/KTX2Loader.js';
import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js';
+import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';
window.__renderDone = false;
window.__renderError = null;
@@ -87,18 +88,31 @@ const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true,
renderer.setSize(${width}, ${height}, false);
renderer.setPixelRatio(1);
renderer.outputColorSpace = THREE.SRGBColorSpace;
-renderer.toneMapping = THREE.ACESFilmicToneMapping;
-renderer.toneMappingExposure = 1.0;
+// Neutral (Khronos PBR Neutral) tone mapping renders asset colors faithfully
+// without the shadow-crushing ACES rolloff — the right choice for a product
+// render where the character must read clearly.
+renderer.toneMapping = THREE.NeutralToneMapping;
+renderer.toneMappingExposure = 1.15;
const scene = new THREE.Scene();
const bgColor = ${bg};
if (bgColor !== null) scene.background = new THREE.Color(bgColor);
const camera = new THREE.PerspectiveCamera(28, ${width}/${height}, 0.01, 100);
-scene.add(new THREE.AmbientLight(0xffffff, 0.55));
-const key = new THREE.DirectionalLight(0xffffff, 1.4); key.position.set(2, 3, 4); scene.add(key);
-const fill = new THREE.DirectionalLight(0xbfd6ff, 0.6); fill.position.set(-3, 1, 2); scene.add(fill);
-const rim = new THREE.DirectionalLight(0xc7a8ff, 0.5); rim.position.set(0, 2, -4); scene.add(rim);
+
+// Image-based lighting is what makes PBR materials read: metal and glossy
+// surfaces draw their reflections from scene.environment, so with none set they
+// collapse to near-black — the "dark, murky" render. RoomEnvironment is three's
+// built-in procedural studio environment (no external HDR asset to host).
+const pmrem = new THREE.PMREMGenerator(renderer);
+scene.environment = pmrem.fromScene(new RoomEnvironment(), 0.04).texture;
+scene.environmentIntensity = 1.15;
+
+// Directional lights are accents on top of the IBL base: a warm key for form,
+// a soft cool fill to open the shadow side, a violet rim for separation.
+const key = new THREE.DirectionalLight(0xffffff, 1.6); key.position.set(2.5, 3.5, 3.5); scene.add(key);
+const fill = new THREE.DirectionalLight(0xdfeaff, 0.5); fill.position.set(-3, 1.2, 2.5); scene.add(fill);
+const rim = new THREE.DirectionalLight(0xecdcff, 0.7); rim.position.set(-0.5, 2.5, -4); scene.add(rim);
const aliases = {
shoulderl: ['leftshoulder','shoulder_l','l_shoulder','mixamorig:leftshoulder'],
diff --git a/api/_okx3d/identity.js b/api/_okx3d/identity.js
index 013ad1f33..55802f15a 100644
--- a/api/_okx3d/identity.js
+++ b/api/_okx3d/identity.js
@@ -271,10 +271,10 @@ async function startRig(base, glbUrl) {
function backdropSvg(width, height) {
return Buffer.from(
`<svg width="${width}" height="${height}" xmlns="http://www.w3.org/2000/svg">` +
- `<defs><radialGradient id="g" cx="50%" cy="42%" r="72%">` +
- `<stop offset="0%" stop-color="#1a2030"/>` +
- `<stop offset="55%" stop-color="#10141d"/>` +
- `<stop offset="100%" stop-color="#0a0c10"/>` +
+ `<defs><radialGradient id="g" cx="50%" cy="40%" r="78%">` +
+ `<stop offset="0%" stop-color="#33405c"/>` +
+ `<stop offset="52%" stop-color="#1c2331"/>` +
+ `<stop offset="100%" stop-color="#0d1017"/>` +
`</radialGradient></defs>` +
`<rect width="100%" height="100%" fill="url(#g)"/></svg>`,
'utf8',
diff --git a/data/changelog.json b/data/changelog.json
index f9836ec1d..536d6ffa2 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,23 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-07-17",
+ "title": "Free 3D API tells agents exactly when to check back",
+ "summary": "When a text-to-3D generation needs a moment and hands back a job to poll, the free /api/3d/generate API now includes how long to wait before checking again (a retryAfter value, also sent as the standard Retry-After header) plus an estimated time-to-ready and a stable creation id. Agents that honor the hint poll on a sensible schedule instead of hammering the endpoint, so they stop tripping the rate limit and the shared free GPU lane carries less needless traffic. Fully backward-compatible: existing callers keep working unchanged.",
+ "tags": [
+ "improvement"
+ ],
+ "link": "/docs/3d-api"
+ },
+ {
+ "date": "2026-07-17",
+ "title": "Avatar renders look studio-lit, not murky",
+ "summary": "Every generated avatar and 3D identity is now rendered with real studio lighting. The image-based lighting the renderer was missing is the reason materials like leather, fabric, and metal used to crush to near-black; adding it, plus faithful color tone mapping, makes those surfaces read the way they look in a real 3D viewer. Faces are lit, boots and belts look like leather again, and the whole character stands out from the backdrop. This lifts the profile pictures and full-body shots the Agent Identity Studio produces, and the avatar thumbnails across the site.",
+ "tags": [
+ "improvement"
+ ]
+ },
{
"date": "2026-07-17",
"title": "three.ws now speaks 11 languages",
diff --git a/prompts/okx-ai/PROGRESS.md b/prompts/okx-ai/PROGRESS.md
index 33c8607b7..57ef3a2fd 100644
--- a/prompts/okx-ai/PROGRESS.md
+++ b/prompts/okx-ai/PROGRESS.md
@@ -1262,3 +1262,33 @@ health -> "3D Studio Health Status". Endpoints, ids, prices, schemas unchanged.
en-US`).
3. Also eyeball the agent-level `--description` from `agent get-agents --agent-ids 2632`
against the same no-tech-jargon bar while in there.
+
+### 2026-07-17 addendum 3: root-caused the avatar visual-quality rejection (product fix, not just listing)
+
+Rejection reason #1 was "visual quality isn't polished enough." That was not only a listing
+problem: the rejected image was the live output of our own $1.50 Agent Identity Studio
+pipeline (`data/agent-identities.json` -> three-ws-3d-studio), so every agent who buys that
+service was getting the same dark, murky render.
+
+Root cause (proven with a before/after render of the actual rejected GLB via local
+Chromium): the server-side render scene set NO `scene.environment`. Three.js PBR materials
+draw their reflections almost entirely from the environment map, so with none set, metal,
+leather, and fabric collapse to near-black. Compounded by ACESFilmic tone mapping at
+exposure 1.0 (crushes shadows) and a dark backdrop gradient behind the PFP.
+
+Fix (no new dependencies — three's built-in procedural `RoomEnvironment`):
+- `api/_lib/render-clip.js` (the Identity Studio render path via `/api/render/avatar-clip`)
+ and `api/_lib/avatar-render.js` (public avatar render + MCP tool): added PMREM
+ `RoomEnvironment` image-based lighting (`scene.environment`, `environmentIntensity` 1.15),
+ switched to `NeutralToneMapping` at exposure 1.15, rebalanced the directional lights as
+ accents on top of the IBL base.
+- `api/_okx3d/identity.js`: lifted the PFP backdrop gradient (slate-blue center) for subject
+ separation.
+Verified end-to-end against the REAL stack ([email protected] from unpkg, RoomEnvironment +
+NeutralToneMapping, base64 GLB parse): zero page errors, character reads clearly, materials
+restored. 56 + 10 tests green. Committed on main; ships on next deploy. Comparison renders in
+the session scratchpad (not committed).
+
+**Implication for the resubmission:** once deployed, regenerate #2632's identity through the
+fixed pipeline so the demo deliverables at /agent-identities reflect the new quality; the
+listing avatar itself stays the logo mark (compliant, on-brand).
diff --git a/public/changelog.json b/public/changelog.json
index 9a9bbc2cf..2c02eb1da 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-17T10:51:25.010Z",
+ "generated_at": "2026-07-17T10:52:33.703Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -58,6 +58,16 @@
"fix"
]
},
+ {
+ "date": "2026-07-17",
+ "type": "update",
+ "title": "Avatar renders look studio-lit, not murky",
+ "summary": "Every generated avatar and 3D identity is now rendered with real studio lighting. The image-based lighting the renderer was missing is the reason materials like leather, fabric, and metal used to crush to near-black; adding it, plus faithful color tone mapping, makes those surfaces read the way they look in a real 3D viewer. Faces are lit, boots and belts look like leather again, and the whole character stands out from the backdrop. This lifts the profile pictures and full-body shots the Agent Identity Studio produces, and the avatar thumbnails across the site.",
+ "link": null,
+ "tags": [
+ "improvement"
+ ]
+ },
{
"date": "2026-07-17",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 9b4c3de99..58391ad71 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -46,6 +46,14 @@
<category>improvement</category>
<description>Gallery previews used to be shot dead-on against a near-black background, so dark models vanished and every card looked the same. Previews are now framed from a natural three-quarter angle, fill the card, and stand on a subtly tinted stage unique to each avatar. Prompt-created avatars also got more distinctive: sparse prompts like 'a knight' now commit to a specific look (age, build, hairstyle, palette, one signature detail) instead of converging on the same generic person. Every platform-generated avatar still appears in the galleries.</description>
</item>
+ <item>
+ <title>Avatar renders look studio-lit, not murky</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-07-17:Avatar renders look studio-lit, not murky</guid>
+ <pubDate>Fri, 17 Jul 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>Every generated avatar and 3D identity is now rendered with real studio lighting. The image-based lighting the renderer was missing is the reason materials like leather, fabric, and metal used to crush to near-black; adding it, plus faithful color tone mapping, makes those surfaces read the way they look in a real 3D viewer. Faces are lit, boots and belts look like leather again, and the whole character stands out from the backdrop. This lifts the profile pictures and full-body shots the Agent Identity Studio produces, and the avatar thumbnails across the site.</description>
+ </item>
<item>
<title>Avatars you generate now come out truly animation-ready</title>
<link>https://three.ws/forge</link>
diff --git a/public/features.json b/public/features.json
index 5be7a0bad..89934c024 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-17T10:51:24.996Z",
+ "generated_at": "2026-07-17T10:52:33.690Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",