Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture compression for 3D Tiles and glTF #4679

Closed
8 tasks done
pjcozzi opened this issue Nov 23, 2016 · 4 comments
Closed
8 tasks done

Texture compression for 3D Tiles and glTF #4679

pjcozzi opened this issue Nov 23, 2016 · 4 comments

Comments

@pjcozzi
Copy link
Contributor

pjcozzi commented Nov 23, 2016

@bagnell @lilleyse please add comments with your latest notes.

@sbtron we will be very happy to collaborate on glTF texture compression (see linked glTF issues below), but probably need a few more weeks of research.

  • Quickly pull together a proof-of-concept pipeline that compresses textures, stores them in a glTF extras properties, and loads them in Cesium. Texture compression #4758
  • Figure what formats to support (we’ll need multiple formats to cover mobile and desktop) and what compression tools work well for our use cases.
    • WebGL extensions: S3TC, ATC (likely not worth it), PVRTC, ETC1, ETC2 (WebGL 2)
    • PlayCanvas does DXT (desktop), PVRTC (iOS), and ETC1 (Android)
  • Flush out glTF extension spec. What is the container texture file format?
  • Flush out Cesium: 3D Tiles and glTF loader.
  • Flush out glTF-pipeline texture compressor(s) integration (see below).
  • Tech post for the Cesium blog.

Tools

Longer-term

Misc notes

  • DXT: 2-10x faster than ASTC. ASTC 4-20x faster than ETC2
  • Tegra is only mobile GPU with DXT
  • PVRTC/PVRTC2 - PowerVR proprietary - iOS. Square textures only says the Intel article?!?!?!
  • ETC/ETC2 - Khronos ES 2.0 extension - no alpha in ETC1 - better quality than DXT
  • ASTC - Khronos ES 3.0 - wide range of compression ratios. adaptive per 128-bit block. Android Extension Pack.
  • zip/lsw - better than jpg?!?!!?

Resources

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Dec 4, 2016

Initial numbers for a texture from a reality model via @bagnell:

Raw size         3MB    // Also the size in GPU memory without compression
PNG              928KB
JPG              229KB
 
For desktop:
DXT3             1MB    // Size in GPU memory with compression.  Note that DXT3 is RGBA.
DXT3 + gzip      238KB  // Wow – size over the wire is on par with jpg!
 
For iOS:
PVR 4bpp         513KB
PVR 4bpp + gzip  213KB  // On par with jpg
PVR 2bpp         257KB
PVR 2bpp + gzip  114KB  // Better than jpg, but check quality
 
For Android:
ETC1             513KB
ETC1 + gzip      217KB

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Dec 28, 2016

There's a JCGT paper on FasTC: http://jcgt.org/published/0003/04/07/

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Jan 3, 2017

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Feb 3, 2017

Fixed in #4758 and CesiumGS/gltf-pipeline#204.

There will be more work for us to expose this through the model converter, do the official glTF spec, and eventually adopt the universal format.

@pjcozzi pjcozzi closed this as completed Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant