Skip to content

Latest commit

 

History

History
173 lines (93 loc) · 4.08 KB

archiving-as-gltf.md

File metadata and controls

173 lines (93 loc) · 4.08 KB

Archiving as glTF 2.0

tags: cv

{%hackmd @xr/dark %}

Required

Blender 3.3.0 https://www.blender.org/download/

Collection

Column 1 Column 2


Process trial 1 (jin)

:::warning I did things wrong the first time starting with the glTF files, keeping the documentation here for learning / showing process. :::

Before

I first started with glTF 2.0 files of the districts that were exported out of Unity with the Plattar UnityGLTF plugin back in 2019.

There are two atlas textures, one default and another for when a person chose to invert the colors for the blocks. The 12-13-2019 glTF exports do not seem to have information on which one is for which so for now I'm using the default Atlas.

Atlas 1 (default) Atlas 2 (Inverted)

Glass tiles

Getting glass to look beautiful in the web can be tricky. The blender glTF exporter recently got updates in version 3.3 to support KHR_materials_volume extension, see docs.

Can tweak the glass on the Sketchfab preview too: https://help.sketchfab.com/hc/en-us/articles/202602073-Transparency

Here's how one district looks in hyperfy: https://hyperfy.io/thecenter


Optimization

I was able to compress a 3D model from

1.44 GB down to 18.3 MB

with 0 visual quality loss

150mb 1.7M tri model down to 3.3mb via Draco compression using http://gltf.report and can still gzip 30% to 2.1mb. Meshopt only went to 25mb and broke collision

https://twitter.com/dankvr/status/1583596977312641024

Only major complaints I heard about Draco is that the decoder is 100kb, which is no biggie since the difference with gltfpack / meshopt for converted voxels is substantial.

https://twitter.com/cryptovoxels/status/1580641383815053312 ephtracy/voxel-model#56


Wearables

Compressed

Software used:

svox-tools, 7zip for gzip, 7-Zip-Zstd for brotli method, and gltf.report for Draco / Meshopt

  • 2.vox: 56.5 KB
  • 2.svox: 9.57 KB
    • 2.svox.gz: 383 bytes
    • 2.svox.7z: 452 bytes
  • 2.glb: 149 KB
    • 2.glb.gz: 16.8 KB
    • 2.7z 13.6 KB
    • 2-draco.glb: 8.04 KB
      • 2-draco.glb.gz: 7.32 KB
      • 2-draco.7z: 7.36 KB
    • 2-meshopt.glb: 40.0 KB
      • 2-meshopt.glb.gz: 17.7 KB
      • 2-meshopt.7z: 17.0 KB

Ash tests

  1. gltfpack -cc -noq -tc -si 0.1 = 281mb and 38s decoding time (1.7G gpu / 30 draws)

  1. draco pulled from (1) = 27mb and 28s decoding time (looks the same) (1.7G gpu / 30 draws)

Notes


12-17-22 Dataset

Glass material

Before After

Blender nodes

Import new district

Import

select glass / atlas, reassign original material

Merged vs Unmerged vertices

Testing glTF import with merge vertices on / off