[orchestrator] asset pipeline v2 proof: PBR meshes at 40% the size
The new farm stack changes the economics of every asset in the game. Measured, same machine, same concept: current (flux -> sf3d, albedo only) 1135 KB 27k tris no PBR hunyuan3d_mlx raw 7408 KB 60k tris PBR hunyuan3d_mlx + gltf-transform 418 KB 18k tris PBR <-- ships trellis2_mlx raw 36087 KB 487k tris PBR trellis2_mlx + gltf-transform 4147 KB 273k tris PBR (too heavy) So the optimized Hunyuan path is 2.7x SMALLER than what ships today and adds real metallic-roughness maps. 30 machines would be ~13 MB against today's 31 MB. Enabling change: GLTFLoader.setMeshoptDecoder (three bundles the decoder). EXT_texture_webp + KHR_mesh_quantization are native. Uncompressed GLBs unaffected. Verified in the live showroom: served 428068 bytes, webp textures, 1 PBR-mapped material, zero console errors. mosh-reactor.glb replaced with the pilot output (LoRA-directed concept: rainbow melt in the porthole, recovered anchor slab glowing in the airlock). Also fixed on the farm, not in this repo: the FLUX LoRA library lived in ComfyUI's models/loras, which flux_local does not search, on a queue that load-balances to a second node that had none of them - every LoRA call failed with 'LoRA not found' depending on which machine caught the job. Both nodes now carry the same set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
3fc043e504
commit
84d378a80e
Binary file not shown.
@ -15,6 +15,7 @@
|
||||
*/
|
||||
import * as THREE from 'three';
|
||||
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
||||
import { MeshoptDecoder } from 'three/examples/jsm/libs/meshopt_decoder.module.js';
|
||||
import { RoundedBoxGeometry } from 'three/examples/jsm/geometries/RoundedBoxGeometry.js';
|
||||
import { clone as cloneSkinned } from 'three/examples/jsm/utils/SkeletonUtils.js';
|
||||
import { mergeGeometries } from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
||||
@ -400,7 +401,13 @@ export class AssetRegistry {
|
||||
* GLBs so a real asset gets the same one impossible element the placeholder had. */
|
||||
private accents = new Map<string, number>();
|
||||
private eras = new Map<string, Era>();
|
||||
private loader = new GLTFLoader();
|
||||
/** Orchestrator integration fix (round-7 pilot): the farm's PBR meshes are shipped
|
||||
* through `gltf-transform optimize --compress meshopt --texture-compress webp`, which
|
||||
* cuts a Hunyuan3D asset from 7.6 MB to ~420 KB — smaller than the albedo-only sf3d
|
||||
* assets it replaces, WITH metallic-roughness maps. That needs three extensions:
|
||||
* EXT_texture_webp and KHR_mesh_quantization are native to GLTFLoader; meshopt needs
|
||||
* its decoder handed over. Uncompressed GLBs keep loading unchanged. */
|
||||
private loader = new GLTFLoader().setMeshoptDecoder(MeshoptDecoder);
|
||||
private timer: number | null = null;
|
||||
|
||||
/** Which era a machine is skinned as (derived from tech unlocks; stream by default). */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user