Building a Game with SceneKit

Similar documents
Working with Metal Overview

What s New in SpriteKit

SceneKit in Swift Playgrounds

SceneKit: What s New Session 604

What s New in SpriteKit

Working With Metal Advanced

Graphics and Animation

More frames per second. Alex Kan and Jean-François Roy GPU Software

Integrating Apps and Content with AR Quick Look

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

From Art to Engine with Model I/O

Quick Interaction Techniques for watchos

Bringing AAA graphics to mobile platforms. Niklas Smedberg Senior Engine Programmer, Epic Games

What s New in Xcode App Signing

Easy Decal Version Easy Decal. Operation Manual. &u - Assets

Optimizing and Profiling Unity Games for Mobile Platforms. Angelo Theodorou Senior Software Engineer, MPG Gamelab 2014, 25 th -27 th June

What s New in Metal, Part 2

NVIDIA Tools for Artists

The Application Stage. The Game Loop, Resource Management and Renderer Design

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer

Introducing On Demand Resources

Introducing the Photos Frameworks

What s New in CloudKit

Introducing Metal 2. Graphics and Games #WWDC17. Michal Valient, GPU Software Engineer Richard Schreyer, GPU Software Engineer

Pump Up Your Pipeline

Streaming Massive Environments From Zero to 200MPH

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Game Development for

Building Visually Rich User Experiences

Metal for Ray Tracing Acceleration

PowerVR Performance Recommendations The Golden Rules. October 2015

Metal for OpenGL Developers

NVIDIA Developer Toolkit. March 2005

PowerVR Performance Recommendations. The Golden Rules

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer

The Shadow Rendering Technique Based on Local Cubemaps

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

An Introduction to Maya. Maya. Used in industrial design, CAD, computer games and motion picture effects. The ambition is what get

New UIKit Support for International User Interfaces

Visual Effects-After Effects

NVIDIA Parallel Nsight. Jeff Kiel

Actions and Graphs in Blender - Week 8

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology

Creating Great App Previews

PowerVR Hardware. Architecture Overview for Developers

Cross Platform Nearby Networking

Adding Advanced Shader Features and Handling Fragmentation

Graphics Processing Unit Architecture (GPU Arch)

Copyright Khronos Group Page 1

Z-Buffer hold pixel's distance from camera. Z buffer

Using and Extending the Xcode Source Editor

PowerVR Series5. Architecture Guide for Developers

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

The Vegetation of Horizon Zero Dawn. Gilbert Sanders Principal Artist, Guerrilla Games

CIS 581 Interactive Computer Graphics

Managing Documents In Your ios Apps

Best practices for effective OpenGL programming. Dan Omachi OpenGL Development Engineer

CS 354R: Computer Game Technology

Programming Graphics Hardware

What s New in Core Image

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

John Hsu Nate Koenig ROSCon 2012

Octree-Based Sparse Voxelization for Real-Time Global Illumination. Cyril Crassin NVIDIA Research

CHAPTER 1 Graphics Systems and Models 3

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

Animation Essentially a question of flipping between many still images, fast enough

Accessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility

What s New in Energy Debugging

Understanding M3G 2.0 and its Effect on Producing Exceptional 3D Java-Based Graphics. Sean Ellis Consultant Graphics Engineer ARM, Maidenhead

Designing Great Apple Watch Experiences

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

MAXIS-mizing Darkspore*: A Case Study of Graphic Analysis and Optimizations in Maxis Deferred Renderer

Creating Games with the Open-Source Multithreaded Game Engine (MT Game) Doug Twilleager Deron Johnson Sun Microsystems

Kenneth Dyke Sr. Engineer, Graphics and Compute Architecture

3D Rendering Pipeline

MIXED REALITY (AR & VR) WITH UNITY 3D (Microsoft HoloLens)

Broken Age's Approach to Scalability. Oliver Franzke Lead Programmer, Double Fine Productions

Com S 336 Final Project Ideas

Applications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research

Real-Time Rendering of a Scene With Many Pedestrians

SHADERX 7 : ADVANCED RENDERING TECHNIQUES

Creating Extensions for ios and OS X, Part Two

Next Generation OpenGL Neil Trevett Khronos President NVIDIA VP Mobile Copyright Khronos Group Page 1

Profiling and Debugging Games on Mobile Platforms

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

CS GAME PROGRAMMING Question bank

Designing the look and feel for Smoke and Neon powers The creation of a new toolset and pipeline for I:SS Pros and cons from our new workflow and

WHAT S NEW IN V-RAY NEXT FOR SKETCHUP. February 2019

Blender - Python API #1

Applications of Explicit Early-Z Culling

ADVANCED RENDERING EFFECTS USING OPENCL TM AND APU Session Olivier Zegdoun AMD Sr. Software Engineer

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML

V-RAY 3.6 FOR RHINO KEY FEATURES. January 2018

What s New in ARKit 2

Introducing the Modern WebKit API

RSX Best Practices. Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

Data Delivery with Drag and Drop

Adopting Advanced Features of the New UI

Transcription:

Graphics and Games #WWDC14 Building a Game with SceneKit Session 610 Amaury Balliet Software Engineer 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Related Sessions SceneKit basics WWDC 2013 "What's new in SceneKit"! WWDC 2014 "What's new in SceneKit" "What's new in SpriteKit"

Outline Where to start How to give life to the scene How we made the Bananas demo How to get great performance How you can build your own tools

Starting a Game Displaying a 3D scene

Displaying a 3D Scene Interface Builder

Displaying a 3D Scene Interface Builder

Displaying a 3D Scene Interface Builder

Displaying a 3D Scene Interface Builder

Displaying a 3D Scene Interface Builder

Xcode Template Unified template for games SceneKit SpriteKit GLES

Managing Assets SceneKit asset catalog game.scnassets

Managing Assets SceneKit asset catalog Preserved file hierarchy Organize models, textures, particles, etc Automatic optimizations

Managing Assets SceneKit asset catalog

Managing Assets SceneKit asset catalog

Managing Assets SceneKit asset catalog ios OS X Up axis conversion Geometry interleaving PVRTC textures

Workflow Working with artists Artists Developers

Workflow Working with artists Artists Developers

Editing Assets Scene editor

Editing Assets Scene editor

Editing Assets Scene editor Direct manipulation

Editing Assets Scene editor Direct manipulation Node hierarchy

Editing Assets Scene editor Direct manipulation Node hierarchy

Editing Assets Scene editor Direct manipulation Node hierarchy and entities

Editing Assets Scene editor Direct manipulation Node hierarchy and entities Node properties

Editing Assets Scene editor Direct manipulation Node hierarchy and entities Node properties

Editing Assets Scene editor Direct manipulation Node hierarchy and entities Node properties Node attributes

Editing Assets Scene editor Direct manipulation Node hierarchy and entities Node properties Node attributes Materials

Editing Assets Particle system editor Direct Preview manipulation and edit Node Particle hierarchy system properties and entities Node properties Node attributes Materials

Editing Assets Particle system editor Direct Preview manipulation and edit Node Particle hierarchy system properties and entities

Editing Assets Particle system editor Direct Preview manipulation and edit Node Particle hierarchy system properties and entities

Editing Assets Particle system editor Direct Preview manipulation and edit Node Particle hierarchy system properties and entities

Case Study Bananas

Bananas Sample code Illustrates Animation Lighting and shadows Physics Particles Advanced rendering

Demo Bananas

Bananas Code base All Objective-C code Runs on ios and OS X ~2700 lines of code

Level Design

Level Design

Level Design

Level Design Statistics Features Details Lights Lights per object Polygons Polygons per frame Draw calls Textures 10 lights in the world 3 lights (1 omni and 2 directional) 200k polygons in the world 80k at most 50 at most 68M

Assets Hierarchy Asset catalogs ~25 3D documents Animations Models Textures Particle systems game.scnassets

Managing Assets Combining assets + Scene A Scene B

Managing Assets Combining assets // Load two scenes SCNScene *mainscene = [SCNScene scenenamed:@"level.dae"]; SCNScene *characterscene = [SCNScene scenenamed:@"monkey.dae"];

Managing Assets Combining assets // Load two scenes SCNScene *mainscene = [SCNScene scenenamed:@"level.dae"]; SCNScene *characterscene = [SCNScene scenenamed:@"monkey.dae"];! // Merge them [mainscene.rootnode addchildnode:characterscene.rootnode];

Managing Assets Combining assets // Load two scenes SCNScene *mainscene = [SCNScene scenenamed:@"level.dae"]; SCNScene *characterscene = [SCNScene scenenamed:@"monkey.dae"];! // Not allowed [mainscene.rootnode addchildnode:characterscene.rootnode];

Managing Assets Combining assets // Load two scenes SCNScene *mainscene = [SCNScene scenenamed:@"level.dae"]; SCNScene *characterscene = [SCNScene scenenamed:@"monkey.dae"];! // Get the monkey SCNNode *monkey = [characterscene.rootnode childnodewithname:@"monkey" recursively:yes];! // Add a monkey to the level [mainscene.rootnode addchildnode:monkey];

Managing Assets Combining assets // Load two scenes SCNScene *mainscene = [SCNScene scenenamed:@"level.dae"]; SCNScene *characterscene = [SCNScene scenenamed:@"monkey.dae"];! // Get the monkey SCNNode *monkey = [characterscene.rootnode childnodewithname:@"monkey" recursively:yes];! // Add a monkey to the level [mainscene.rootnode addchildnode:monkey];! // Add another monkey to the level [mainscene.rootnode addchildnode:[monkey clone]];

Controls ios Support for game controllers Custom D-pad gesture recognizer Three buttons - Jump - Left, right (with long press state)

Controls OS X Support for game controllers Keyboard events Jump Left, right (with long press state)

Behaviors Animating characters skinned-character.dae

Behaviors Animating characters skinned-character.dae run.dae jump.dae idle.dae

Behaviors Animating characters // Load an animation CAAnimation *anim = [scenesource entrywithidentifier:animationname withclass:[caanimation class]];

Behaviors Animating characters // Load an animation CAAnimation *anim = [scenesource entrywithidentifier:animationname withclass:[caanimation class]];! // Play it [character addanimation:anim forkey:@"run"];

Behaviors Moving characters

Behaviors Moving characters

Behaviors Moving characters

Behaviors Moving the camera c(1.0) c(0.0)

Behaviors Moving the camera

Behaviors Moving the camera

Collision Detection Stay on the path Avoid coconuts Collect bananas Jump over lava

Collision Detection SCNPhysicsWorld // Be notified through delegation - (void)physicsworld:(scnphysicsworld *)world didbegincontact:(scnphysicscontact *)contact;! // Or explicitly perform ray tests - (NSArray *)raytestwithsegmentfrompoint:(scnvector3)origin topoint:(scnvector3)dest options:(nsdictionary *)options;

Behaviors Animating items // Animate a banana [abanana runaction: [SCNAction repeatactionforever: [SCNAction rotatebyx:0.0 y:2.0 * M_PI z:0.0 duration:2.0]]];

Lighting

Lighting Ambient

Lighting Ambient

Lighting Ambient

Lighting Ambient

Lighting Ambient

Shadows Static shadows

Shadows Static shadows

Shadows Static shadows Baked into textures Don't adapt to changes! material.multiply.contents = shadowmap;

Shadows Static shadows Baked into textures Don't adapt to changes! material.multiply.contents = shadowmap;

Shadows Dynamic shadows

Shadows Dynamic shadows

Shadows Dynamic shadows Shadow maps Real-time shadows Suitable for animated objects

Shadows Dynamic shadows Shadow maps Real-time shadows Suitable for animated objects! // Make a light cast shadows light.castsshadow = YES;

Shadows Mixing techniques // Make the light cast shadows alight.castsshadow = YES; // Exclude nodes that use baked shadows anode.castsshadow = NO;! // We can also use bit masks (with kmainlightmask & ksecondarylightmask = 0) alight.categorybitmask = kmainlightmask; anode.categorybitmask = ksecondarylightmask;

Shadows Mixing techniques // Make the light cast shadows alight.castsshadow = YES; // Exclude nodes that use baked shadows anode.castsshadow = NO;! // We can also use bit masks (with kmainlightmask & ksecondarylightmask = 0) alight.categorybitmask = kmainlightmask; anode.categorybitmask = ksecondarylightmask;

Shadows Mixing techniques // Make the light cast shadows alight.castsshadow = YES; // Exclude nodes that use baked shadows anode.castsshadow = NO;! // We can also use bit masks (with kmainlightmask & ksecondarylightmask = 0) alight.categorybitmask = kmainlightmask; anode.categorybitmask = ksecondarylightmask;

Shadows Mixing techniques // Make the light cast shadows alight.castsshadow = YES; // Exclude nodes that use baked shadows anode.castsshadow = NO;! // We can also use bit masks (with kmainlightmask & ksecondarylightmask = 0) alight.categorybitmask = kmainlightmask; anode.categorybitmask = ksecondarylightmask;

Shadows Mixing techniques // Make the light cast shadows alight.castsshadow = YES; // Exclude nodes that use baked shadows anode.castsshadow = NO;! // We can also use bit masks (with kmainlightmask & ksecondarylightmask = 0) alight.categorybitmask = kmainlightmask; anode.categorybitmask = ksecondarylightmask;

Shadows Dynamic shadows Shadow maps Real-time shadows Suitable for animated objects

Shadows Projected shadows

Shadows Projected shadows

Shadows Projected shadows Simplified shadows Suitable for animated objects

Shadows Projected shadows // Use modulated mode light.shadowmode = SCNShadowModeModulated;! // Configure the projected shadow light.gobo.contents = ashadowimage;! // Use bit masks to specify receivers light.categorybitmask = kprojectorlightmask; floor.categorybitmask = kprojectorlightmask;

Particles SCNParticleSystem Used for torches and dust

Particles SCNParticleSystem // Load a particle system SCNParticleSystem *particlesystem = [SCNParticleSystem particlesystemnamed:@"dust.scnp indirectory:@"art.scnassets/particles"];! // Attach to a node [character addparticlesystem:particlesystem];

Particles SCNParticleSystem // Load a particle system SCNParticleSystem *particlesystem = [SCNParticleSystem particlesystemnamed:@"dust.scnp indirectory:@"art.scnassets/particles"];! // Attach to a node [character addparticlesystem:particlesystem];! // Control emission particlesystem.birthrate = shouldemit? abirthrate : 0;

Visual Improvements Shader modifiers Geometry animation Vines Texture animation Lava Volcano

Visual Improvements Shader modifiers NSString *modifier = @"_geometry.texcoords[0] += vec2( sin(_geometry.position.z + u_time) * 0.01, -0.05 * u_time );";! lavanode.geometry.shadermodifiers = @{ SCNShaderModifierEntryPointGeometry : modifier};

Visual Improvements Postprocessing SCNTechnique Color effects Image deformation UIWindow SCNView Highly customizable

Visual Improvements Postprocessing

Visual Improvements SpriteKit overlays ios and OS X SKScene Score Timer UIWindow SCNView SKScene Title screen

Visual Improvements SpriteKit overlays

Sound SpriteKit API! [SKAction playsoundfilenamed:@"jump.caf" waitforcompletion:no];

Performance Optimization Thomas Goossens Software Engineer

Performance Statistics Xcode report

Performance Statistics Xcode report

Performance Statistics Xcode report Each frame SceneKit applies constraints and renders the scene -update: -didsimulatephysics: SceneKit evaluates animations SceneKit simulates physics -didapplyanimations:

Performance Statistics Xcode report Reports CPU usage Target 16 ms per frame! Graphics OpenG! Frame Time 16.7 ms Animations 3 % Physics 4 % Constraints 0 % Particles 4 % Particles 0 % Rendering 7 % OpenGL Commands 14 % Idle 68 % 228 MB TEXTURES

Performance Statistics Xcode report Reports CPU usage Target 16 ms per frame! Graphics OpenG! Frame Time 16.7 ms Animations 3 % Physics 4 % Constraints 0 % Particles 4 % Particles 0 % Rendering 7 % OpenGL Commands 14 % Idle 68 % 228 MB TEXTURES

Performance Statistics In-view statistics ascnview.showsstatistics = YES;

Performance Statistics In-view statistics ascnview.showsstatistics = YES;

Analyzing Performance Statistics Bottleneck CPU or GPU?

Analyzing Performance Statistics Bottleneck CPU or GPU?

Troubleshooting Bottleneck CPU Less physic bodies Less animations Less actions Graphics OpenG Less particles Frame Time Simpler game logic 16.7 ms Animations 3 % Physics 4 % Constraints 0 % Particles 4 % Particles 0 % Rendering 7 % OpenGL Commands 14 % Idle 68 % 228 MB TEXTURES

Troubleshooting Bottleneck CPU Less physic bodies Less animations Less actions Graphics OpenG Less particles Frame Time Simpler game logic 16.7 ms Animations 3 % Physics 4 % Constraints 0 % Particles 4 % Particles 0 % Rendering 7 % OpenGL Commands 14 % Idle 68 % 228 MB TEXTURES

Troubleshooting Bottleneck CPU Less draw calls Graphics OpenG Frame Time 16.7 ms Animations 3 % Physics 4 % Constraints 0 % Particles 4 % Particles 0 % Rendering 7 % OpenGL Commands 14 % Idle 68 % 228 MB TEXTURES

Draw Calls Number of draw calls is critical CPU Impact

Draw Calls 42

Draw Calls 42

Draw Calls

Draw Calls

Flattening Flatten to reduce the number of draw calls

Flattening Flatten directly in 3D tools (recommended) Flatten programmatically! // Flatten a node tree SCNNode *flattenednode = [node flattenedclone];!

Flattening Don t flatten too much Verify total number of polygons per frame Verify number of influencing lights!

Flattening Flattening and culling in Bananas

Flattening Flattening and culling in Bananas

Troubleshooting Bottleneck GPU Tiler Renderer/device

Troubleshooting Bottleneck GPU Tiler Renderer/device

Troubleshooting Bottleneck Renderer/device Fill rate limited Fragment shaders limited 100 % RENDERER ` 100 % DEVICE

Fill Rate

Fill Rate Contents scale factor 1x, 2x, intermediate

Fill Rate Contents scale factor 1x, 2x, intermediate Reduce screen space postprocesses Deferred shadows, depth of field, reflective floor Custom techniques

Fill Rate Contents scale factor 1x, 2x, intermediate Reduce screen space postprocesses Deferred shadows, depth of field, reflective floor Custom techniques Anti-aliasing //msaa 4x ascnview.antialiasingmode = SCNAntialiasingModeMultisampling4X; //no antialiasing ascnview.antialiasingmode = SCNAntialiasingModeNone;

Lighting Dynamic vs. static Dynamic Lighting Static Lighting Quality Good Best Performance Costly Fast Work with animations

Lighting Area of influence alight.attenuationenddistance = 100.0;

Lighting Area of influence alight.attenuationenddistance = 100.0; 1 0 0 1

Lighting Influencing lights Number of influencing lights per object is what matters

Lighting Influencing lights Number of influencing lights per object is what matters 0 1 1 2 2 1 0 1

Lighting Banana Omni lights located far apart Objects lit by 1 omni light at maximum

Lighting Banana Omni lights located far apart Objects lit by 1 omni light at maximum

Lighting Optimizing shadows Dynamic Static

Lighting Optimizing shadows Dynamic Static

Shadows Dynamic shadow modes Forward Projected API SCNShadowModeForward SCNShadowModeModulated + gobo image Performance impact High Low Quality Best Low

Shadows Optimizing shadows // Set the size of the shadow map alight.shadowmapsize = CGSizeMake(512, 512);

Shadows Optimizing shadows // Set the size of the shadow map alight.shadowmapsize = CGSizeMake(512, 512);

Shadows Optimizing shadows // Configure the number of sample in the shadow map alight.shadowsamplecount = 1.0; 1x 8x

Shadows Optimizing shadows // Configure the number of sample in the shadow map alight.shadowsamplecount = 1.0; 1x 8x

Texturing Avoid unnecessarily large textures Pack textures into texture atlases

Texturing Mipmapping Advantages Can improve performance significantly Reduce aliasing/moiré effect Drawbacks Higher load time ~30% more memory! // Turn on mipmapping amaterial.diffuse.mipfilter = SCNFilterModeLinear;

Polygon Rate

Polygon Rate

Polygon Rate

Polygon Rate

Polygon Rate

Polygon Rate

Levels of Detail Reduce polygon count per frame! SCNLevelOfDetail *lod1 = [SCNLevelOfDetail levelofdetailwithgeometry:ageometry worldspacedistance:adistance]; geometry.levelofdetail = @[lod1, lod2,...]; lod1 lod2 lod3

Levels of Detail Reduce polygon count per frame! SCNLevelOfDetail *lod1 = [SCNLevelOfDetail levelofdetailwithgeometry:ageometry worldspacedistance:adistance]; geometry.levelofdetail = @[lod1, lod2,...];

Troubleshooting Summary Identify bottlenecks CPU Tiler Renderer or device

Troubleshooting Bottleneck CPU Reduce draw calls by flattening Less physic bodies Less animations Less actions

Troubleshooting Bottleneck Tiler Levels of detail Split scenes in chunks

Troubleshooting Bottleneck Renderer or device Simpler materials Less/simpler lights Smaller textures, mipmapping Downscaled contents size Less postprocess No multisampling

Performance Notes

Sharing // Duplicate a node SCNNode *nodeb = [nodea copy];! Node AB Geometry A Material A

Sharing // Duplicate a node SCNNode *nodeb = [nodea copy];! Node A Node B Geometry A Material A

Sharing // Duplicate a node SCNNode *nodeb = [nodea copy];! Node A Node B Geometry A Material A

Sharing // Duplicate a node SCNNode *nodeb = [nodea copy];! Node A Node B Geometry A Material A

Sharing // Duplicate a node SCNNode *nodeb = [nodea copy];! // Un-share the geometry (cheap) nodeb.geometry = [nodea.geometry copy]; Node A Geometry A Node B Geometry B Material A

Sharing // Duplicate a node SCNNode *nodeb = [nodea copy];! // Un-share the geometry (cheap) nodeb.geometry = [nodea.geometry copy];! // Un-share the material nodeb.geometry.firstmaterial = [nodea.geometry.firstmaterial copy]; Node A Geometry A Node B Geometry B Material A Material B

Sharing // Duplicate a node SCNNode *nodeb = [nodea copy];! // Un-share the geometry (cheap) nodeb.geometry = [nodea.geometry copy];! // Un-share the material nodeb.geometry.firstmaterial = [nodea.geometry.firstmaterial copy]; Node A Geometry A Node B Geometry B Material A Material B

Preloading Supported by SCNView, SCNLayer and SCNRenderer! - (void)prepareobjects:(nsarray *)objects withcompletionhandler:(bool (^)(BOOL success))completionhandler;

Preloading Object Resources SCNMaterial Textures SCNGeometry Geometry buffers and materials SCNNode Node tree and geometries SCNScene Node tree and shaders (lighting)

Creating Custom Tools

Archiving Adopted by SCNScene, SCNNode, SCNGeometry, SCNMaterial, etc. Conform to NSSecureCoding! // Archive a scene NSData *archivedscene = [NSKeyedArchiver archiveddatawithrootobject:scene];! // Unarchive a scene SCNScene *scene = [NSKeyedUnarchiver unarchiveobjectwithdata:archivedscene];

Exporting Export to Collada Import back in 3D software Only a subset of SceneKit can be exported! - (BOOL)writeToURL:(NSURL *)url options:(nsdictionary *)options delegate:(id <SCNSceneExportDelegate>)delegate progresshandler:(scnsceneexportprogresshandler)progresshandler;

Archiving vs. Exporting Archiving Collada export Loadable on ios Can be read by DCC tools Scene graph (nodes, geometry, materials ) Animations Actions Physics Particles Custom shaders

Archiving vs. Exporting Archiving Collada export Loadable on ios Through Xcode Can be read by DCC tools Scene graph (nodes, geometry, materials ) Animations Actions Physics Particles Custom shaders

Archiving vs. Exporting Archiving Collada export Loadable on ios Through Xcode Can be read by DCC tools Scene graph (nodes, geometry, materials ) Animations Actions Physics Particles Custom shaders

Archiving vs. Exporting Archiving Collada export Loadable on ios Through Xcode Can be read by DCC tools Scene graph (nodes, geometry, materials ) Animations Actions Physics Particles Custom shaders

Archiving vs. Exporting Archiving Collada export Loadable on ios Through Xcode Can be read by DCC tools Scene graph (nodes, geometry, materials ) Animations Actions Physics Particles Custom shaders

Scripting JavaScript bridge SceneKit is fully scriptable! void SCNExportJavaScriptModule(JSContext *context);

Code Samples Sample code Bananas Checkout the three other code samples

More Information Allan Schaffer Graphics and Game Technologies Evangelist aschaffer@apple.com Filip Iliescu Graphics and Game Technologies Evangelist filiescu@apple.com Documentation SceneKit Framework Reference http://developer.apple.com Apple Developer Forums http://devforums.apple.com

Related Sessions What s New in SpriteKit Pacific Heights Wednesday 2:00PM What s New in SceneKit Pacific Heights Thursday 10:15AM

Labs SceneKit Lab Graphics and Games Lab A Thursday 12:45PM