collada to webgl - khronos group maya blender modo cinema4d xsi unity editor packaging ios, andoid,...

24
COLLADA to WebGL Experimenting using COLLADA to bring content from Unity to WebGL using Turbulenz and Fl4re exporter Rémi Arnaud [email protected]

Upload: dokhanh

Post on 12-May-2018

230 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

COLLADA to WebGL

Experimenting using COLLADA to bring content from Unity to WebGL using Turbulenz and Fl4re exporter

Rémi Arnaud

[email protected]

Page 2: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Content creation

game 3D model

Images

Animations

Physics

Audio

Script

Page 3: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Content ‘Pipeline’

Packaging

Optimization

Physics

Textures, Shaders

Animations

Modeler

Object files

Animation files + skins/bones

Shader files + psd

Physics files

Binary files

package file

Multiple indexes, Quads

Clips, bézier, complex Transformation graph

Vertex / Fragment shaders

Convex Mesh, collliders

Single index, triangles DXTs, simplified scene

Compressed folder

Page 4: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

COLLADA – intermediate format

Packaging

Optimization

Physics

Textures, Shaders

Animations

Modeler

COLLADA

COLLADA

COLLADA

COLLADA

COLLADA

package file

Multiple indexes, Quads

Clips, bézier, complex Transformation graph

Vertex / Fragment shaders

Convex Mesh, collliders

Single index, triangles DXTs, compressed anims

Compressed folder

Page 5: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

COLLADA Refinery (2007)

https://collada.org/mediawiki/index.php/COLLADA_Refinery

COLLADA Refinery 2.0.3 conditionners Axisconverter Compress Transforms Stipper Image conversion Axis transform Coherencytest ** Use this !! Copyrighter Deindexer Triangulate Vertex cache optimization Optimizer Packager

Page 6: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

COLLADA interchange?

Packaging

Optimization A

Physics A

Textures, Shaders A

Animations A

Modeler A

Packaging

Optimization B

Physics B

Textures, Shaders B

Animations B

Modeler B

Page 7: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

COLLADA interchange?

Packaging

Optimization A

Physics A

Textures, Shaders A

Animations A

Modeler A

Packaging

Optimization B

Physics B

Textures, Shaders B

Animations B

Modeler B

COLLADA

COLLADA

COLLADA

COLLADA

COLLADA

Page 8: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

COLLADA interchange?

Packaging

Optimization A

Physics A

Textures, Shaders A

Animations A

Modeler A

Packaging

Optimization B

Physics B

Textures, Shaders B

Animations B

Modeler B

Page 9: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

COLLADA loader?

Packaging

Optimization A

Physics A

Textures, Shaders A

Animations A

Modeler A

Page 10: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

COLLADA loader?

Packaging

Optimization A

Physics A

Textures, Shaders A

Animations A

Modeler A My modeler COLLADA

Page 11: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

COLLADA loader?

Packaging

Optimization A

Physics A

Textures, Shaders A

Animations A

Modeler A

My game

Polygons multiple indexes image format mesh optimization, split complex transform hierarchy no shader programs no collision volumes verbose text (xml) parsing

Page 12: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

COLLADA – more tools available?

Packaging

WebGL packaging

Optimization

Simplygon Okino Atangeo MeshLab

Physics

Bullet PhysX Havok

Textures, Shaders

Photoshop FX Composer Render Monkey

Animations

Poser DAZ Mixamo

Modeler

Max Maya Blender Modo Cinema4D XSI

Page 13: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Unity Editor

Packaging

IOS, Andoid, PC, Web (plugin), Flash

Optimization

Built-in

Physics

PhysX

Textures, Shaders

Shader Factory

Animations

Mecanim

Modeler

Max Maya Blender Modo Cinema4D XSI

Fbx or simple COLLADA (e.g. no physics, morphing, shaders..)

http://unity3d.com/ Unity Engine

Content pipeline

Page 14: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Turbulenz SDK (WebGL)

Packaging

json2tar , mapping.json, cgfx2json

Optimization

dae2json

Physics

Bullet PhysX Havok

Textures, Shaders

Photoshop FX Composer Render Monkey

Animations

Poser DAZ Mixamo

Modeler

Max Maya Blender Modo Cinema4D XSI

http://biz.turbulenz.com/developers

Imports COLLADA with physics

WebGL Turbulenz engine

Page 15: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Unity Editor -> WebGL Turbulenz using COLLADA !

Mo

del

er

Max

Maya

Blender

Edit

or

Unity

Exp

ort

er

COLLADA

Co

nve

rter

dae2json

web

G L

en

gin

e

Turbulenz

http://u3d.as/content/fl4re/collada-dae-exporter-for-unity/3cC

Page 16: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

WIP: Unity Editor -> WebGL using COLLADA and glTF

Mo

del

er

Max

Maya

Blender

Edit

or Unity

Exp

ort

er

COLLADA

con

vert

er

COLLADA2GLTF

Web

GL Turbulenz

Threejs

...

https://github.com/KhronosGroup/glTF

Page 17: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

WIP: Unity Editor -> WebGL using COLLADA , glTF and REST3D

Mo

del

er

Max

Maya

Blender

Edit

or

Unity Ex

po

rter

COLLADA

con

vert

er

glTF

Web

GL Turbulenz

Threejs

...

http://rest3d.org

REST3D REST3D

Page 18: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Exporter UI

Page 19: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Animated Skinned mesh

Unity

Preview Yes!! (would love to select clip in preview)

Turbulenz Yes!! (Picky on hierarchy, weapons attachment not by default in viewer app)

Page 20: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Physics ?

Unity - Need to have camera and light to see physics In ‘run’ mode

Preview - No physics

Turbulenz Yes!! (some limitations getting resolved)

Page 21: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Lightmap (glow) ?

Unity

Preview

Turbulenz - Need user provided

shader mapping

Page 22: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

animations?

Unity - SpiderRobots are ‘prefabs’ Sharing the same animations-

Preview - Works only if animations are shared!

Turbulenz Yes!! - A few animations are wrong

Page 23: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Summary

• Unity -> COLLADA -> Turbulenz

– COLLADA fulfill its promises:

• game developer can combine tools from different vendors

– Turbulenz does a great job importing COLLADA

• Remaining issues are being worked on

– glTF / REST3D

• Those technologies will make it even easier and more efficient to bring COLLADA to WebGL apps

Page 24: COLLADA to webGL - Khronos Group Maya Blender Modo Cinema4D XSI Unity Editor Packaging IOS, Andoid, PC, Web (plugin), Flash Optimization Built-in Physics PhysX Textures, Shaders Shader

Thank you

• Links http://biz.turbulenz.com/developers

https://collada.org/mediawiki/index.php/COLLADA_Refinery

http://unity3d.com/unity/download/

http://u3d.as/content/fl4re/collada-dae-exporter-for-unity/3cC

https://github.com/KhronosGroup/glTF

http://rest3d.org

• Questions?

remi (at) acm (dot) com