GithubHelp home page GithubHelp logo

gltf_compression_test's Introduction

MeshOptimization

Setup and Development

Download Node.js. Run this following commands:

# Install dependencies (only for first time)
npm i

# Serve at localhost:8080
npm run dev

# Build for production in the dist/ directory
npm run build

MeshOptimization

meshoptimizer (gltfpack)

  1. Install gltfpack with npm i -g gltfpack

  2. Compress gltf output from Houdini from the commandline

# Simple optimization (Keep mesh name and material name)
gltfpack -i output.glb -o output_pack.glb -kn -km

# With Compression (Requires meshopt decoder to load optimized mesh)
gltfpack -i output.glb -o output_pack_c.glb -c -kn -km

# With even more Compression (The output can also be gzipped for extra compression on delivery)
gltfpack i- output.glb -o output_pack_cc.glb -cc  -kn -km

# Or just use the script
bin/pack_gltf output.glb

draco

  1. Install gltf-pipeline with npm i -g gltf-pipeline

  2. Compress

gltf-pipeline -i output.glb -o output_drc.glb -d

# Or use the script for automatic renaming
bin/to_drc output.glb

Compression Methods Comparison

name method size load time
rop_gltf_crag_mat.glb raw 4.2M 321ms
rop_gltf_crag_mat_pack.glb gltfpack (no option) 3.1M 270ms
rop_gltf_crag_mat_pack_c.glb gltfpack (c option) 806K 140ms
rop_gltf_crag_mat_pack_cc.glb gltfpack (cc option) 704K 140ms
rop_gltf_crag_mat_drc_glb draco (via gltf-pipeline) 241K 470ms

gltf_compression_test's People

Contributors

daisea3e1203 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.