collada/gltf bof - khronos group · collada/gltf bof siggraph 2013 ... smith micro software july 24...
Post on 22-Jun-2018
215 Views
Preview:
TRANSCRIPT
© Copyright Khronos Group 2013 - Page 1
COLLADA/glTF BOF
SIGGRAPH 2013
© Copyright Khronos Group 2013 - Page 2
3D Needs a Transmission Format! • Compression and streaming of 3D assets becoming essential
- Mobile and connected devices need access to increasingly large asset databases
• 3D is the last media type to define a compressed format
- 3D is more complex – diverse asset types and use cases
• Needs to be royalty-free
- Avoid an ‘internet video codec war’ scenario
• Eventually enable hardware implementations of successful codecs
- High-performance and low power – but pragmatic adoption strategy is key
Audio Video Images 3D
MP3 H.264 JPEG ? !
An effective and widely adopted codec ignites previously
unimagined opportunities for a media type
© Copyright Khronos Group 2013 - Page 3
glTF Goals • Binary file format for efficient transmission for 3D assets
- Reduce network bandwidth and minimize client processing overhead
• Run-time neutral - DO NOT IMPLY OR MANDATE ANY RUN-TIME BEHAVIOR
- Can be used by any app or run-time – usually WebGL accelerated
• Scalable to handle compression and streaming
- Though baseline format does not include compression
• ‘Direct load efficiency’ for WebGL
- Little or NO processing to drop glTF data into WebGL client
• Carry conditioned data from any authoring format
- Prototyping and optimizing efficient handling of COLLADA assets
A standards-based
content pipeline for
rich native and Web 3D
applications Playback Authoring
© Copyright Khronos Group 2013 - Page 4
COLLADA and glTF Ecosystem
Tool Interop
Three.js glTF Importer. Rest3D initiative
COLLADA2GLTF
Translator
OpenCOLLADA
Importer/Exporter
and COLLADA
Conformance Tests
On GitHUB
Pervasive WebGL deployment
Other
authoring
formats
Web-based Tools
© Copyright Khronos Group 2013 - Page 5
Our Speakers Today! • Update on the COLLADA and glTF Ecosystem
- Neil Trevett, Khronos President, VP Mobile Content NVIDIA
• OpenCOLLADA update
- Uli Klumpp, Smith Micro
• COLLADA and JavaFX 3D
- John Yoon, Oracle
• COLLADA and AutomationML
- Fabrice Robinet, COLLADA Working Group Chair
• glTF
- Fabrice Robinet, COLLADA Working Group Chair
• Integrating glTF and Three.js
- Fabrice Robinet, COLLADA Working Group Chair
• glTF in Cesium
- Patrick Cozzi, Analytical Graphics Inc. and University of Pennsylvania
• Rest 3D
- Remi Arnaud, AMD
© Copyright Khronos Group 2013 - Page 6
OpenCOLLADA Update
Uli Klumpp Sr. Director Engineering, Productivity & Graphics
Smith Micro Software July 24 2013
© Copyright Khronos Group 2013 - Page 7
OpenCOLLADA Overview • High-quality, full functionality COLLADA importer/exporter library, plugins and
converter
- Released as open source on https://github.com/KhronosGroup/OpenCOLLADA
- Available free-of-charge for developers and tools vendors to integrate
COLLADAFramework
COLLADAMax COLLADAMaya COLLADA2glTF* Your project
here
*Repo: https://github.com/KhronosGroup/glTF
© Copyright Khronos Group 2013 - Page 8
OpenCOLLADA Update • NetAllied has completed engineering
project to address known issues
• 3ds Max and Maya plugins now
- Available for 2013 versions*
- Conformance tested with CTS
• Fishing Cactus
- Contributing company, now code reviewer
• Great community involvement lately, but we want more!
• *Binaries:
https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools
© Copyright Khronos Group 2013 - Page 9
AutomationML & COLLADA
Steffen Lips / NetAllied. slips@netallied.de
© Copyright Khronos Group 2013 - Page 10
What is ? • In factory automation, engineering is cost driver #1
• Many gaps and breaks in tool chains lead to using the “paper interface”
• AutomationML becomes the “Glue for Seamless Automation Engineering”
through
- Interoperability between software tools
- in all engineering phases,
- seamless and scalable,
- as open and standardized data format.
© Copyright Khronos Group 2013 - Page 11
• AutomationML uses COLLADA for modeling geometric and kinematic data.
AutomationML Engineering data
CAEX IEC 62424 Top level format
Plant topology information
• Plants
• Cells
• Components
• Attributes
• Interfaces
• Relations
• References
COLLADA
Geometry Kinematics
PLCopen XML
Behaviour Sequencing
Object A
Object A 1
Object A 2
Init Init
Step 1
End
Further XML Standard format
Further aspects of engineering information
Object A n
…
© Copyright Khronos Group 2013 - Page 12
A Station in Different Tools
Delmia V5
JT2Go
3DPDF
Sketchup
© Copyright Khronos Group 2013 - Page 13
Update • Common
- New work group: Modeling of communication networks
• User support
- Conferences for users & implementers every year
- Publishing of implementation guidelines
• Marketing
- Congress „Digital Factory“, Berlin
- Fair “SPS/IPC Drives”, Nuremberg
- Article sequence in „SPS-Magazin“ (professional journal for automation)
• Standardization process
- AutomationML part 1 (topology) -> IEC FDIS (Final Draft International Standard)
- AutomationML part 2 (roles) -> IEC CDV (Committee Draft for Voting)
- AutomationML part 3 (geometry & kinematic) -> will be submitted in 2013/2014
© Copyright Khronos Group 2013 - Page 14 © Copyright Khronos Group 2013 | Page
graphics library Transmission Format
Fabrice Robinet COLLADA Working Group Chair
© Copyright Khronos Group 2013 - Page 15
Overview • Status
• Motivations
• Design principles
• glTF pipeline
• Scope
• glTF... side effects ?
• Demos
© Copyright Khronos Group 2013 - Page 16
Status • COLLADA Working group initiative
• Work in progress - Not a ratified specification yet
• Code work and SPEC work at the same time
• SPEC currently catching up with the converter that implements the latest
decisions based on editor and community feedback
• Community feedback welcomed on GitHub
© Copyright Khronos Group 2013 - Page 17
Motivations • Bridge the gap between 3D formats and GL based APIs.
• Reduce duplicated effort in content pipeline.
• A common format for contents providers.
© Copyright Khronos Group 2013 - Page 18
Design principles • Streamline rendering: size, speed and ease of implementation
• Offload processing from runtime.
• Maps well to GL APIs and Typed Arrays.
• Neutral, specify higher level only when necessary.
© Copyright Khronos Group 2013 - Page 19
OpenCOLLADA Compression
COLLADA2GLTF C++ Library
Rapidjson
COLLADA2GLTF command line tool
Rest3D transactions & access to 3D assets
COLLADA2GLTF Delivery Author Interchange API
Maya
Blender
..
glTF
OpenGL ES
WebGL
OpenGL
Converter
glTF Pipeline - overview
COLLADA
© Copyright Khronos Group 2013 - Page 20
glTF Pipeline - COLLADA2GLTF • Mandatory transformations
- Triangulate
- Unify indices
- Split meshes
- Generate shaders
- Axis up conversion
• Planned optimizations & transformations
- Minify shaders
- Flatten hierarchy & combine meshes
- Convert images
- Compress meshes
- Interleave vertices
- ... Suggestions welcomed !
© Copyright Khronos Group 2013 - Page 21
Scope • 1.0
- Node hierarchy
- Cameras
- Lights
- Key-framed animations
- Skinning
- Morphing
- Medias (images & videos)
• Mesh compression as extensions
• Multi-pass considered
© Copyright Khronos Group 2013 - Page 22
Open3DGC • Open3DGC Binary is an implementation of the MPEG-SC3DMC (Scalable
Compression 3D Mesh Compression)
• K. Mammou, T. Zaharia, F. Prêteux, “TFAN: A low complexity 3D mesh
compression algorithm” Computer Animation and Virtual Worlds, Vol. 20(2-3),
pp. 343–354, 2009
• 2 modes: binary and ascii.
- Open3DGC Binary exploits an adaptive arithmetic-based encoding to exploit
statistical properties of the encoded data
- Open3DGC ASCII exploits a 7-bit ASCII encoding adapted for GZip compression
- Open3DGC ASCII is a slightly modified version of SC3DMC to exploit GZip
compression
© Copyright Khronos Group 2013 - Page 23
Compression • Tested 2 compression libraries:
- Open3DGC: https://github.com/amd/rest3d/tree/master/server/o3dgc
- webgl-loader: https://code.google.com/p/webgl-loader/
© Copyright Khronos Group 2013 - Page 24 © Copyright Khronos Group 2013 | Page
Model
COLLADA glTF glTF+Open3DGC
ascii
glTF+Open3DGC
binary
XML
gzip
raw gzip raw gzip raw •raw bin
•gzip JSON
• bin:102k
• JSON:11k
• bin:81k
• JSON:2kb
• ascii:29k
• JSON:11k
• ascii:19k
• JSON:2k
• bin:18k
• JSON:11k
• bin:18k
• JSON:2k
336k 106k 113k 83k 40k 21k 29k 20k
• bin:9220k
• JSON:75k
• bin:3220k
• JSON:5k
• ascii:3080k
• JSON:151k
• ascii:1510k
• JSON:11k
• bin: 1622k
• JSON:151k
• bin: 1622k
• JSON:11k
19767k 3417k 9295k 3225k 3231k 1521k 1773k 1633k
• bin:25224k
• JSON:183k
• bin:5738k
• JSON:8k
• ascii:7793k
• JSON:587k
• ascii:1433k
• JSON:29k
• bin:3205k
• JSON:589k
• bin:3205k
• JSON:29k
56763k 7378k 25407k 5746k 8380k 1462k 3794k 3234k
• bin:329k
• JSON:255k
• bin:99k
• JSON:10k
• ascii:122k
• JSON:267k
• ascii:61k
• JSON:11k
• bin:71k
• JSON:267k
• bin:71k
• JSON:11k
794k 133k 584k 109k 389k 77k 338k 88k
© Copyright Khronos Group 2013 - Page 25
Compression: results overview
Data from rest3d SIGGRAPH 2013 BOF presentation, Khaled Mammou/Remi Arnaud
© Copyright Khronos Group 2013 - Page 26
Open3DGC compression • First integration within “collada2gltf” available on GitHub.
- naive integration to be improved (leading to better compression)
• Encoder/Decoder in C++
• Just to get it working quickly, converted code using Emscripten to JavaScript
• Decoding performance to be evaluated in JS
© Copyright Khronos Group 2013 - Page 27
“webgl-loader” compression • First integration within “collada2gltf” available on GitHub.
- naive integration to be improved (leading to better compression).
• Encoder in C++/Decoder in JS
• Fast decoding
Model COLLADA glTF+webgl-loader glTF+Open3DGC ascii glTF+Open3DGC binary
XML
gzip
raw gzip raw gzip raw •raw bin
•gzip JSON
• utf8:42k
• JSON:12k
• utf8:34k
•JSON:2kb
• ascii:29k
• JSON:11k
• ascii:19k
• JSON:2k
• bin:18k
• JSON:11k
• bin:18k
• JSON:2k
336k 106k 54k 36k 40k 21k 29k 20k
•utf8:8747k
• JSON:753k
•utf8:1325k
• JSON:29k
• ascii:7793k
• JSON:587k
• ascii:1433k
• JSON:29k
• bin:3205k
• JSON:589k
• bin:3205k
• JSON:29k
56763k 7378k 9500k 1354k 8380k 1462k 3794k 3234k
© Copyright Khronos Group 2013 - Page 28
Compression: next steps • Fix integration issues: currently both Open3DGC and webgl-loader do not handle
shared vertex buffer by multiple index buffers. Needed some vertex duplication
to work-around this
• Benchmark for decoding performance and memory footprint.
• Compress animations, bones indices and weight
© Copyright Khronos Group 2013 - Page 29 © Copyright Khronos Group 2013 | Page
glTF side effects... ? • Package not only “models” but whatever you need a declarative way
• For instance, the viewer uses glTF “techniques” to:
- draw the background gradient
- setup the specific image based picking shaders
© Copyright Khronos Group 2013 - Page 30 © Copyright Khronos Group 2013 | Page
Demos • Montage Model Viewer
• MegaCity & Video demo
• Skinning
© Copyright Khronos Group 2013 - Page 31 © Copyright Khronos Group 2013 | Page
Thank you - See you on GitHub ! • Specification
- https://github.com/KhronosGroup/glTF/blob/master/specification/README.md
• Converter
- https://github.com/KhronosGroup/glTF/converter
• montagejs viewer
- https://github.com/fabrobinet/glTF-webgl-viewer
© Copyright Khronos Group 2013 - Page 32 © Copyright Khronos Group 2013 | Page
A glTF Loader for Three.js
Tony Parisi ViZi
July 24, 2013
© Copyright Khronos Group 2013 - Page 33
Motivation • Three.js is the most popular WebGL Development Library
- Easy WebGL development using high-level scene graph API
- High-performance and feature rich
- Powers most of the popular WebGL applications and demo sites
- Dozens of active contributors; 6000+ commits, 2500+ forks, 12,000 favorites
- https://github.com/mrdoob/three.js/
• The content pipeline for Three.js is haphazard
- Simple popular formats supported (.OBJ, .STL) but those have limited feature set
(no cameras, lights, scenes, animations…)
- COLLADA is closest, but the Three.js loader is old, incomplete and buggy
- Three.js has defined its own file format, but the feature set is ad-hoc and non-
standard
- … as a result, developers are continually building custom pipelines and cobbling
formats; programmers are hand-coding layouts, lighting and animations.
- This is not a recipe for scaling up WebGL deployment!
© Copyright Khronos Group 2013 - Page 34
A glTF Loader for Three.js • glTF is an ideal candidate for a complete, open, industry-standard modern
format for use with Three.js
- Implements most features required by modern 3D applications: scenes; cameras;
lights; animations (articulated, skinned, morphs); shaders; multi-pass techniques.
- JSON- plus binary-based approach is very web-friendly
- More compact representation promises much faster load speed and smaller
memory footprint than XML-based COLLADA
- COLLADA2GLTF converter provides ready-to-go path for existing tools that export
COLLADA
With this solution in place, Three.js developers can get back to writing code
instead of wrangling pipelines… and leave the art to the artists!
© Copyright Khronos Group 2013 - Page 35
The Project • Currently a branch of the glTF project on Github
- https://github.com/KhronosGroup/glTF
- Branch ‘threejsloader’
• Designed to be compatible with other Three.js example loaders such as OBJ and
COLLADA
- e.g. http://threejs.org/examples/webgl_loader_collada.html
- No external dependencies other than official glTF parser (webgl-tf-loader.js)
• Demo version at SIGGRAPH
• Expect completion of initial
implementation in August
• After completion, will submit a Github pull
- request for inclusion with
Three.js distribution
© Copyright Khronos Group 2013 - Page 36
Status • Most glTF features are already supported
- Triangle Meshes
- Materials – diffuse, specular, emissive, ambient, textures, environment maps
- Cameras – perspective and orthographic
- Lights – ambient, spot, point, directional
- Matrix transforms
- Scene structure
- Animation - Key frame/articulated only
- Shaders - Uses “common profile” techniques - common lighting models such as Phong and
Lambert, and their parameters, are mapped to existing Three.js material types
• TBD features
- Arbitrary GLSL shaders (via Three.js ShaderMaterial)
- Skinned animations and morphs
© Copyright Khronos Group 2013 - Page 37
glTF in Cesium
http://cesium.agi.com/
top related