{"action":"created","issue":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/4679","repository_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/4679/labels{/name}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/4679/comments","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/4679/events","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/issues/4679","id":191300510,"number":4679,"title":"Texture compression for 3D Tiles and glTF","user":{"login":"pjcozzi","id":782098,"avatar_url":"https://avatars.githubusercontent.com/u/782098?v=3","gravatar_id":"","url":"https://api.github.com/users/pjcozzi","html_url":"https://github.com/pjcozzi","followers_url":"https://api.github.com/users/pjcozzi/followers","following_url":"https://api.github.com/users/pjcozzi/following{/other_user}","gists_url":"https://api.github.com/users/pjcozzi/gists{/gist_id}","starred_url":"https://api.github.com/users/pjcozzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjcozzi/subscriptions","organizations_url":"https://api.github.com/users/pjcozzi/orgs","repos_url":"https://api.github.com/users/pjcozzi/repos","events_url":"https://api.github.com/users/pjcozzi/events{/privacy}","received_events_url":"https://api.github.com/users/pjcozzi/received_events","type":"User","site_admin":false},"labels":[{"id":653781,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-23T15:17:44Z","updated_at":"2016-12-04T20:04:43Z","closed_at":null,"body":"@bagnell @lilleyse please add comments with your latest notes.\r\n\r\n@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.\r\n\r\n* [ ] Quickly pull together a proof-of-concept pipeline that compresses textures, stores them in a glTF `extras` properties, and loads them in Cesium.\r\n* [ ] 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.\r\n   * WebGL extensions: [S3TC](https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/), [ATC](https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_atc/) (likely not worth it), [PVRTC](https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/), [ETC1](https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc1/), ETC2 (WebGL 2)\r\n   * PlayCanvas [does](https://blog.playcanvas.com/webgl-texture-compression-made-easy/) DXT (desktop), PVRTC (iOS), and ETC1 (Android)\r\n* [ ] Flush out glTF extension spec.  What is the container texture file format?\r\n   * Add compressed textures to spec, https://github.com/KhronosGroup/glTF/issues/59\r\n   * Improving texture support for 1.0.1+, https://github.com/KhronosGroup/glTF/issues/620\r\n   * Evaluating texture storage for different APIs, https://github.com/KhronosGroup/glTF/issues/739\r\n* [ ] Flush out Cesium: 3D Tiles and glTF loader.\r\n* [ ] Flush out glTF-pipeline texture compressor(s) integration (see below).\r\n\r\n**Tools**\r\n\r\n* Texture compression plugin point for glTF-pipeline.  Tools to consider (the first three are likely the strongest):\r\n   * Google’s ETC2Comp.  [code](https://github.com/google/etc2comp), [blog post](https://opensource.googleblog.com/2016/11/etc2comp-fast-texture-compression.html), [more detailed blog post](https://medium.com/@duhroach/building-a-blazing-fast-etc2-compressor-307f3e9aad99#.rrkx8irvn).  Apache 2.0 license.\r\n   * AMD Compressonator. [code](https://github.com/GPUOpen-Tools/Compressonator), [website](http://gpuopen.com/gaming-product/compressonator/).  MIT license.\r\n   * [Transcode](http://www.binomial.info/blog/2016/6/22/introduction-to-gpu-texture-transcoding) JPG-like format to DXT using [Crunch](https://github.com/BinomialLLC/crunch).  ZLIB license.  [JavaScript loading](https://plus.google.com/+BrandonJonesToji/posts/KJ42NGorLTj).  ([used](https://docs.unity3d.com/Manual/webgl-building.html) by Unity)\r\n   * NVIDIA Texture Tools (DXT / BCn Compressor)\r\n   * Imagination’s [PVRTexTool](https://community.imgtec.com/developers/powervr/tools/pvrtextool/).  Not open source?\r\n   * [FasTC](https://github.com/GammaUNC/FasTC).  Apache 2.0 license.\r\n   * [Etcpak](http://richg42.blogspot.com/2016/09/etcpak.html).  Open source, license TBA.\r\n   * Apple’s [texturetool](https://developer.apple.com/library/content/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TextureTool/TextureTool.html#//apple_ref/doc/uid/TP40008793-CH108-SW1).  Not open source?\r\n\r\n**Longer-term**\r\n\r\n* [ ] Tech post for the Cesium blog.\r\n* Compress leaf tile textures?  Different compression rate at different tree levels?\r\n* Use this for Cesium imagery.\r\n* When can we use [GST: GPU-decodable Supercompressed Textures](http://richg42.blogspot.com/2016/10/gst-gpu-decodable-supercompressed.html)?\r\n\r\n\r\n**Misc notes**\r\n\r\n* DXT: 2-10x faster than ASTC. ASTC 4-20x faster than ETC2\r\n* Tegra is only mobile GPU with DXT\r\n* PVRTC/PVRTC2 - PowerVR proprietary - iOS.  Square textures only says the Intel article?!?!?!\r\n* ETC/ETC2 - Khronos ES 2.0 extension - no alpha - better quality than DXT\r\n* ASTC - Khronos ES 3.0 - wide range of compression ratios. adaptive per 128-bit block.  Android Extension Pack.\r\n* zip/lsw - better than jpg?!?!!?\r\n\r\n**Resources**\r\n\r\n* What texture compression formats does my system support? http://toji.github.io/texture-tester/\r\n* [Texture Compression](https://docs.google.com/presentation/d/1qwkxbpGSkFHlrcR3mcc2pHyApKVxny441QYbx4z72NM/edit#slide=id.p) at CppCon\r\n* [Texture formats for 2D games, part 4: Overview](http://joostdevblog.blogspot.nl/2015/12/texture-formats-for-2d-games-part-4.html)\r\n* Old: [Compressed Textures in WebGL](http://blog.tojicode.com/2011/12/compressed-textures-in-webgl.html)\r\n* [Using ASTC Texture Compression for Game Assets](https://developer.nvidia.com/astc-texture-compression-for-game-assets)\r\n* [Android* Texture Compression - a comparison study with code sample](https://software.intel.com/en-us/articles/android-texture-compression-a-comparison-study-with-code-sample?language=de)\r\n* [Efficient Game Textures with Hardware Compression](http://android-developers.blogspot.com/2015/01/efficient-game-textures-with-hardware.html)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/comments/264727133","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/issues/4679#issuecomment-264727133","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/4679","id":264727133,"user":{"login":"pjcozzi","id":782098,"avatar_url":"https://avatars.githubusercontent.com/u/782098?v=3","gravatar_id":"","url":"https://api.github.com/users/pjcozzi","html_url":"https://github.com/pjcozzi","followers_url":"https://api.github.com/users/pjcozzi/followers","following_url":"https://api.github.com/users/pjcozzi/following{/other_user}","gists_url":"https://api.github.com/users/pjcozzi/gists{/gist_id}","starred_url":"https://api.github.com/users/pjcozzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjcozzi/subscriptions","organizations_url":"https://api.github.com/users/pjcozzi/orgs","repos_url":"https://api.github.com/users/pjcozzi/repos","events_url":"https://api.github.com/users/pjcozzi/events{/privacy}","received_events_url":"https://api.github.com/users/pjcozzi/received_events","type":"User","site_admin":false},"created_at":"2016-12-04T20:04:42Z","updated_at":"2016-12-04T20:04:42Z","body":"Initial numbers for a texture from a reality model via @bagnell:\r\n\r\n```\r\nRaw size         3MB    // Also the size in GPU memory without compression\r\nPNG              928KB\r\nJPG              229KB\r\n \r\nFor desktop:\r\nDXT3             1MB    // Size in GPU memory with compression.  Note that DXT3 is RGBA.\r\nDXT3 + gzip      238KB  // Wow – size over the wire is on par with jpg!\r\n \r\nFor iOS:\r\nPVR 4bpp         513KB\r\nPVR 4bpp + gzip  213KB  // On par with jpg\r\nPVR 2bpp         257KB\r\nPVR 2bpp + gzip  114KB  // Better than jpg, but check quality\r\n \r\nFor Android:\r\nETC1             513KB\r\nETC1 + gzip      217KB\r\n```"}}
{"actor":{"display_login":"pjcozzi"}}