User report: marbles rendered as washed-out empty bubbles. Measured the kit (gltf-transform scan): marble-high/low is a PURE glass sphere and the marble-center-* variants hide only a FLAT decal disc at y=0 — the 'opaque core + shell' belief was wrong; there was never anything solid for the transmission glass to refract. marbleCoreMesh(): opaque sphere at 0.79 of the shell radius (the instanced pack's proven proportion), injected into the kit mesh BEFORE the material pass in all three builders (endless hero, buildRacerVisual peers, loop-mode marble) — identity tint, phenotype effects and boost glow reach the core through the existing cloneOne pipeline. Verified on seed #meow peers=9: distinct solid tinted marbles with glass rims.
- commit
- 3d2985bf799b460dabb9052a66977f5ab320bf75
- parent
- a8f0a2eb197c7f19948d06981bad460e1a1e46c7
- author
- Dami <dami.etoile@gmail.com>
| A | shot-current.png | bin | |
| M | src/ | 10 | ++++++++++ |
| M | src/ | 4 | ++++ |
| M | src/ | 23 | +++++++++++++++++++++++ |
Binary file.
@@ -58,6 +58,7 @@ import {
5858 applyTunnelVariants,5959 fresnelShellMaterial,6060 glassShellMaterial,61+ marbleCoreMesh,6162 marbleEnv,6263 } from "./marbleGlass.ts";6364 import {@@ -507,6 +508,11 @@ class Session {
507508 // Half the kit's authored size (user: "shrink the ball 50%") —508509 // matches the physics MARBLE_RADIUS.509510 mesh.scale.setScalar(MARBLE_SCALE);511+ // The kit shell is empty glass — inject the opaque core the glass512+ // refracts (hero: soft white) so the marble reads SOLID, not as a513+ // washed-out bubble (user report). Added before the material pass514+ // so boost glow reaches it.515+ mesh.add(marbleCoreMesh());510516 // Own materials (boost glow writes emissive; shared kit materials511517 // would light every piece using them).512518 mesh.traverse((child: THREE.Object3D) => {@@ -1522,6 +1528,10 @@ class Session {
15221528 this.assets.getPiece(MARBLE_PIECE);15231529 if (mesh) {15241530 mesh.scale.setScalar(MARBLE_SCALE);1531+ // Empty kit shell → inject the opaque core (see marbleCoreMesh);1532+ // the traverse below tints it and applies the phenotype effect1533+ // like any other core material.1534+ mesh.add(marbleCoreMesh());15251535 // Always clone materials (boost glow needs its own emissive even15261536 // on untinted marbles). The phenotype layers MULTIPLY over the15271537 // base look: shell tints the color, the effect reshapes the@@ -8,6 +8,7 @@
88 */99 import * as THREE from "three";1010 import type { Assets } from "./assets.ts";11+import { marbleCoreMesh } from "./marbleGlass.ts";1112 1213 const MARBLE_PIECE = "marble-center-high";1314 const BASE_SPEED = 2.2;@@ -52,6 +53,9 @@ export function createMarble(
5253 if (mesh) {5354 // Half the kit's authored size (user: "shrink the ball 50%").5455 mesh.scale.setScalar(0.5);56+ // The kit shell is empty glass — inject the opaque core so the57+ // marble reads solid (see marbleGlass.marbleCoreMesh).58+ mesh.add(marbleCoreMesh());5559 // Recenter the grounded mesh inside the pivot, then lift the pivot by the5660 // same offset so the sphere's contact point stays at the object's origin.5761 const box = new THREE.Box3().setFromObject(mesh);@@ -71,6 +71,29 @@ export function glassShellMaterial(
7171 });7272 }7373 74+/** Kit marbles are NOT authored core+shell (measured 2026-08-09): the75+ * plain variants are an EMPTY glass sphere and the center variants hide76+ * only a flat decal disc at the base — nothing solid to refract, so at77+ * race distance every marble read as a washed-out bubble (user report).78+ * This injects the missing core: an opaque sphere sized like the79+ * instanced pack's (0.79 of the shell), added to the kit mesh BEFORE the80+ * material pass so identity tint / effects / boost glow all apply to it81+ * through the same pipeline. Kit-mesh space: shell radius ≈0.19782+ * centered at y 0.2. */83+export function marbleCoreMesh(): THREE.Mesh {84+ const geo = new THREE.SphereGeometry(0.155, 20, 14);85+ const mat = new THREE.MeshStandardMaterial({86+ color: 0xdfe6ee,87+ roughness: 0.35,88+ metalness: 0.05,89+ });90+ mat.name = "core";91+ const m = new THREE.Mesh(geo, mat);92+ m.name = "core";93+ m.position.y = 0.2;94+ return m;95+}96+7497 /** Additive fresnel shell for instanced packs: rim-only glass illusion,7598 * order-independent (no sorting artifacts at any N). Declares the7699 * instancing attributes itself (raw ShaderMaterial gets none for free);