houbaoshu

3D Planet

A planet generated from a single image with Hunyuan 3D. The original model has 1.5 million triangles and weighs 84 MB; a Blender script brings it down to 1.6 MB, and Three.js renders it live in the browser.

planet.glb

Loading the model…

Loading

Drag to rotate, scroll or pinch to zoom; the spin picks up again when you let go. Keyboard: arrow keys rotate, plus and minus zoom, Space pauses or resumes.

  1. 01

    From 1.5 million triangles to 200,000

    Hunyuan 3D generated the model from one image and exported a GLB with 1.5 million triangles. A headless Blender script does the reduction: on import it merges vertices by position, which stitches the faces on either side of each texture seam so decimation cannot tear the seams open, then the Decimate modifier in Collapse mode takes the mesh to 200,000 triangles. The craters and rocks keep their outlines in the geometry; the shape itself is untouched.

  2. 02

    From 84 MB to 1.6 MB

    Three 4096-pixel PNG textures (colour, normals, roughness) made up half of the original file. They are scaled to 2048 pixels with a Lanczos filter and stored as WebP; the mesh is compressed with Draco, with positions quantised to 14 bits. In the browser a WebAssembly decoder unpacks it in a Web Worker, so the page stays responsive.

  3. 03

    The same lighting as Blender’s Material Preview

    All the light comes from one environment map: the forest HDRI that Blender’s Material Preview uses by default (from Poly Haven, CC0), scaled to 512 × 256 and prefiltered into reflections for each roughness. Tone mapping is Khronos PBR Neutral: it holds the highlights down without washing out the purple and yellow of the texture the way a filmic curve would.

  4. 04

    No motion, no frame

    A new frame is drawn only while the planet is turning or the view is changing; pause the spin and the picture holds still, and so does the GPU. The loop stops entirely when the canvas scrolls out of view or the tab goes to the background. The pixel ratio is capped at 2, so high-density phone screens do not draw pixels nobody can see. With “Reduce motion” on, the page does not start spinning by itself.