SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Designing an Objective-C
 Framework about 3D
       (to Rule Them All)



        Raphael Sebbe
       Twitter: @rsebbe
We all Enjoy Cocoa
Because it’s Smart & Elegant
Developers are Users
Keep that in mind when designing a framework
The Wonderful World of 3D

 OpenGL               Pixar’s PRMan
           Direct X                   POV
  Ogre                  3Delight
            Quesa                     Pixie
                        Aqsis
  OSG
            VL                     Lucille
                       DotC
  OpenSG
                                   LuxRender
                 Mental Ray
      3DKit
What

• A framework for building 3D apps / games,
  for Mac & iOS
• Common foundation for 3D
• Specialized to talk to various libs / tools
• Good Cocoa citizen
Conceptualizing (a bit)

                App                         •   Computer Graphics
                                                Math
     Ceed3DGL   Ceed3DRenderMan       ...
                                            •   3D Data
                                                Representation(s)
                    Ceed3D

                                            •   Object Graph(s)

                                            •
GL       CeedMath            Foundation
                                                Rendering Interfaces
Focus on Frameworks
C3Node                 C3Scene        C3Renderer

  C3Object                                 C3RenderManRenderer

         C3ProceduralObject                        C3PixarRenderer

              C3Sphere                             C3AqsisRenderer

                 ...
                                              C3GLRenderer           C3GLView
         C3GeometricObject

              C3Mesh
                                 C3Geometry                          C3Buffer
                 ...
                                     C3ParametricGeometry
              C3Light
                                       C3MeshGeometry
             C3Camera
                                      C3StreamGeometry

 C3Material                          C3SubdivisionGeometry
Objects Talk Together
Value   Sphere A
1.7      Radius

                         Cube B
             Transform
                          Parent Transform

        Cube C
                                Transform
          Size
Objects Talk Together
Value   Sphere A
1.7      Radius

                          Cube B
             Transform
                           Parent Transform

        Cube C
                                 Transform
          Size




          Style Group 1    Style Group 2
Coping with Diversity
• Objective-C is high level
• Sometimes, subclassing is your enemy
• And then, categories are your friend

• Renderer interface & file read/write’s as
  categories of existing classes
Category Use

Ceed3D.framework             C3Sphere       C3Mesh
Ceed3DGL.framework          +GL          +GL
Ceed3DRenderMan.framework   +RenderMan   +RenderMan
                            +POV         +Obj
                                         +3ds
                                         +Collada
                                         + ...
Focus on OpenGL
• Modern OpenGL only (no legacy calls)
• Support for OpenGL ES
• Sophisticated Shader Definition
Focus on OpenGL
• Modern OpenGL only (no legacy calls)
• Support for OpenGL ES
• Sophisticated Shader Definition
         Ceed3DGL     •   Thin Objective-C layer for
                          OpenGL
CeedGL




            Ceed3D    •   Encapsulates GL objects
                          (texture, buffer, framebuffer, program,
                          shader...)

GL         CeedMath   •   Defines Draw Commands
Cocoa Interactions
•   KVO / KVC: easy access to object inputs/outputs

•   Core Image: CIImage used as textures, CIFilter as post
    process lters on rendered image

•   Quartz: NSBezierPath used as geometry source, incl. glyphs

•   Quartz Composer: Ceed3D should be able to render as a
    QCPlugin, QC outputs usable as Ceed3D textures

•   Grand Central Dispatch: Parallelism for computations

•   OpenCL: Geometry filters
Examples
!   sphere = [C3Sphere sphere];
!   sphere.radius = 0.15;
!   sphere.translation.z = 0.3;
!
!   C3GenericMaterial *material = [C3GenericMaterial genericMaterial];
!   material.diffuseColor = [C3Color redColor];
!   material.environmentImage = [C3Image imageWithContentsOfFile:
!   !   [[NSBundle mainBundle] pathForResource:@"skydome_1024" ofType:@"jpg"]];
!   sphere.defaultMaterial = material;
!
!   [scene addNode:sphere];



!
!   NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:rect
!   !   xRadius:0.1 yRadius:0.1];
!   [path appendBezierPath:[[NSBezierPath bezierPathWithOvalInRect:
!   !   NSInsetRect(rect, 0.15, 0.15)] bezierPathByReversingPath]];
!
!   id options = [NSDictionary dictionaryWithObjectsAndKeys:C3DOUBLE(0.02),
!   !   kC3MeshOptionAdaptiveSubdivisionDistance, nil];
!
!   C3MeshGeometry *geom = [C3MeshGeometry meshGeometryWithBezierPath:path
!   !   options:options];
!   C3Mesh *mesh = [C3Mesh mesh]; [mesh insertObject:geom inGeometriesAtIndex:0];
!   [scene addNode:mesh];
Examples
!   glRenderer = [C3GLRenderer new];
!   glRenderer.scene = scene;!
!   glView.viewer.camera = camera;
!   glRenderer.viewers = [NSArray arrayWithObject:glView.viewer];

!   pixarRenderer = [C3PixarRenderer new];
!   pixarRenderer.outputDirectoryPath = @"~/Render/Ceed3D-pixar";
!   pixarRenderer.scene = scene;

!   aqsisRenderer = [C3AqsisRenderer new];
!   aqsisRenderer.outputDirectoryPath = @"~/Render/Ceed3D-aqsis";
!   aqsisRenderer.scene = scene;

    // ....

    [glRenderer render];
Demo
Demo




mesh = [C3Mesh meshWithAttributedString:@"" options:nil];
Availability

• Work in progress
• Low-level, stable parts will be released as
  open source soon
• We want to release more later...
• Stay tuned!
Thank you!

 Raphael Sebbe
Twitter: @rsebbe

Weitere ähnliche Inhalte

Andere mochten auch

iOS 7 URL Session & Motion FX APIs
iOS 7 URL Session & Motion FX APIsiOS 7 URL Session & Motion FX APIs
iOS 7 URL Session & Motion FX APIsrsebbe
 
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT Images
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT ImagesComputer-aided Diagnosis of Pulmonary Embolism in Opacified CT Images
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT Imagesrsebbe
 
Managing And Optimizing Memory Usage
Managing And Optimizing Memory UsageManaging And Optimizing Memory Usage
Managing And Optimizing Memory UsageJohn Wilker
 
Advanced Imaging on iOS
Advanced Imaging on iOSAdvanced Imaging on iOS
Advanced Imaging on iOSrsebbe
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Codersebbe
 
Blocks & GCD
Blocks & GCDBlocks & GCD
Blocks & GCDrsebbe
 
CeedMath & CeedGL, Let's talk 3D...
CeedMath & CeedGL, Let's talk 3D...CeedMath & CeedGL, Let's talk 3D...
CeedMath & CeedGL, Let's talk 3D...rsebbe
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyondrsebbe
 

Andere mochten auch (10)

iOS 7 URL Session & Motion FX APIs
iOS 7 URL Session & Motion FX APIsiOS 7 URL Session & Motion FX APIs
iOS 7 URL Session & Motion FX APIs
 
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT Images
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT ImagesComputer-aided Diagnosis of Pulmonary Embolism in Opacified CT Images
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT Images
 
Talking trash
Talking trashTalking trash
Talking trash
 
Managing And Optimizing Memory Usage
Managing And Optimizing Memory UsageManaging And Optimizing Memory Usage
Managing And Optimizing Memory Usage
 
Core Image
Core ImageCore Image
Core Image
 
Advanced Imaging on iOS
Advanced Imaging on iOSAdvanced Imaging on iOS
Advanced Imaging on iOS
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
 
Blocks & GCD
Blocks & GCDBlocks & GCD
Blocks & GCD
 
CeedMath & CeedGL, Let's talk 3D...
CeedMath & CeedGL, Let's talk 3D...CeedMath & CeedGL, Let's talk 3D...
CeedMath & CeedGL, Let's talk 3D...
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyond
 

Ähnlich wie Designing an Objective-C Framework about 3D

IDC 2010 Conference Presentation
IDC 2010 Conference PresentationIDC 2010 Conference Presentation
IDC 2010 Conference PresentationGonçalo Amador
 
2011.05.27 ACC 기술세미나 : Adobe Flash Builder 4.5를 환경에서 Molehill 3D를 이용한 개발 소개
2011.05.27 ACC 기술세미나 : Adobe Flash Builder 4.5를 환경에서 Molehill 3D를 이용한 개발 소개2011.05.27 ACC 기술세미나 : Adobe Flash Builder 4.5를 환경에서 Molehill 3D를 이용한 개발 소개
2011.05.27 ACC 기술세미나 : Adobe Flash Builder 4.5를 환경에서 Molehill 3D를 이용한 개발 소개Yongho Ji
 
아이폰강의(7) pdf
아이폰강의(7) pdf아이폰강의(7) pdf
아이폰강의(7) pdfsunwooindia
 
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Lviv Startup Club
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and MoreMark Kilgard
 
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid LijewskiBeMyApp
 
Graphics Libraries
Graphics LibrariesGraphics Libraries
Graphics LibrariesPrachi Mishra
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APITomi Aarnio
 
CS 354 Procedural Methods
CS 354 Procedural MethodsCS 354 Procedural Methods
CS 354 Procedural MethodsMark Kilgard
 
Cocos2d 소개 - Korea Linux Forum 2014
Cocos2d 소개 - Korea Linux Forum 2014Cocos2d 소개 - Korea Linux Forum 2014
Cocos2d 소개 - Korea Linux Forum 2014Changwon National University
 
Computer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming IComputer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming I💻 Anton Gerdelan
 
openGL basics for sample program (1).ppt
openGL basics for sample program (1).pptopenGL basics for sample program (1).ppt
openGL basics for sample program (1).pptHIMANKMISHRA2
 
openGL basics for sample program.ppt
openGL basics for sample program.pptopenGL basics for sample program.ppt
openGL basics for sample program.pptHIMANKMISHRA2
 
CS 354 Project 2 and Compression
CS 354 Project 2 and CompressionCS 354 Project 2 and Compression
CS 354 Project 2 and CompressionMark Kilgard
 
Pixel shaders
Pixel shadersPixel shaders
Pixel shadersbuds nan kis
 
CS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingCS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingMark Kilgard
 
Open gl
Open glOpen gl
Open glEU Edge
 

Ähnlich wie Designing an Objective-C Framework about 3D (20)

IDC 2010 Conference Presentation
IDC 2010 Conference PresentationIDC 2010 Conference Presentation
IDC 2010 Conference Presentation
 
2011.05.27 ACC 기술세미나 : Adobe Flash Builder 4.5를 환경에서 Molehill 3D를 이용한 개발 소개
2011.05.27 ACC 기술세미나 : Adobe Flash Builder 4.5를 환경에서 Molehill 3D를 이용한 개발 소개2011.05.27 ACC 기술세미나 : Adobe Flash Builder 4.5를 환경에서 Molehill 3D를 이용한 개발 소개
2011.05.27 ACC 기술세미나 : Adobe Flash Builder 4.5를 환경에서 Molehill 3D를 이용한 개발 소개
 
아이폰강의(7) pdf
아이폰강의(7) pdf아이폰강의(7) pdf
아이폰강의(7) pdf
 
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
 
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
 
Graphics Libraries
Graphics LibrariesGraphics Libraries
Graphics Libraries
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics API
 
CS 354 Procedural Methods
CS 354 Procedural MethodsCS 354 Procedural Methods
CS 354 Procedural Methods
 
Cocos2d 소개 - Korea Linux Forum 2014
Cocos2d 소개 - Korea Linux Forum 2014Cocos2d 소개 - Korea Linux Forum 2014
Cocos2d 소개 - Korea Linux Forum 2014
 
Computer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming IComputer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming I
 
openGL basics for sample program (1).ppt
openGL basics for sample program (1).pptopenGL basics for sample program (1).ppt
openGL basics for sample program (1).ppt
 
openGL basics for sample program.ppt
openGL basics for sample program.pptopenGL basics for sample program.ppt
openGL basics for sample program.ppt
 
CS 354 Project 2 and Compression
CS 354 Project 2 and CompressionCS 354 Project 2 and Compression
CS 354 Project 2 and Compression
 
Pixel shaders
Pixel shadersPixel shaders
Pixel shaders
 
Cocos2d programming
Cocos2d programmingCocos2d programming
Cocos2d programming
 
Cocos2d game programming 2
Cocos2d game programming 2Cocos2d game programming 2
Cocos2d game programming 2
 
CS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingCS 354 Ray Casting & Tracing
CS 354 Ray Casting & Tracing
 
Open gl
Open glOpen gl
Open gl
 
CGLabLec6.pptx
CGLabLec6.pptxCGLabLec6.pptx
CGLabLec6.pptx
 

KĂźrzlich hochgeladen

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vĂĄzquez
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

KĂźrzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Designing an Objective-C Framework about 3D

  • 1.
  • 2. Designing an Objective-C Framework about 3D (to Rule Them All) Raphael Sebbe Twitter: @rsebbe
  • 3.
  • 4. We all Enjoy Cocoa
  • 5.
  • 7.
  • 8. Developers are Users Keep that in mind when designing a framework
  • 9. The Wonderful World of 3D OpenGL Pixar’s PRMan Direct X POV Ogre 3Delight Quesa Pixie Aqsis OSG VL Lucille DotC OpenSG LuxRender Mental Ray 3DKit
  • 10. What • A framework for building 3D apps / games, for Mac & iOS • Common foundation for 3D • Specialized to talk to various libs / tools • Good Cocoa citizen
  • 11. Conceptualizing (a bit) App • Computer Graphics Math Ceed3DGL Ceed3DRenderMan ... • 3D Data Representation(s) Ceed3D • Object Graph(s) • GL CeedMath Foundation Rendering Interfaces
  • 12. Focus on Frameworks C3Node C3Scene C3Renderer C3Object C3RenderManRenderer C3ProceduralObject C3PixarRenderer C3Sphere C3AqsisRenderer ... C3GLRenderer C3GLView C3GeometricObject C3Mesh C3Geometry C3Buffer ... C3ParametricGeometry C3Light C3MeshGeometry C3Camera C3StreamGeometry C3Material C3SubdivisionGeometry
  • 13. Objects Talk Together Value Sphere A 1.7 Radius Cube B Transform Parent Transform Cube C Transform Size
  • 14. Objects Talk Together Value Sphere A 1.7 Radius Cube B Transform Parent Transform Cube C Transform Size Style Group 1 Style Group 2
  • 15. Coping with Diversity • Objective-C is high level • Sometimes, subclassing is your enemy • And then, categories are your friend • Renderer interface & le read/write’s as categories of existing classes
  • 16. Category Use Ceed3D.framework C3Sphere C3Mesh Ceed3DGL.framework +GL +GL Ceed3DRenderMan.framework +RenderMan +RenderMan +POV +Obj +3ds +Collada + ...
  • 17. Focus on OpenGL • Modern OpenGL only (no legacy calls) • Support for OpenGL ES • Sophisticated Shader Denition
  • 18. Focus on OpenGL • Modern OpenGL only (no legacy calls) • Support for OpenGL ES • Sophisticated Shader Denition Ceed3DGL • Thin Objective-C layer for OpenGL CeedGL Ceed3D • Encapsulates GL objects (texture, buffer, framebuffer, program, shader...) GL CeedMath • Denes Draw Commands
  • 19. Cocoa Interactions • KVO / KVC: easy access to object inputs/outputs • Core Image: CIImage used as textures, CIFilter as post process lters on rendered image • Quartz: NSBezierPath used as geometry source, incl. glyphs • Quartz Composer: Ceed3D should be able to render as a QCPlugin, QC outputs usable as Ceed3D textures • Grand Central Dispatch: Parallelism for computations • OpenCL: Geometry lters
  • 20. Examples ! sphere = [C3Sphere sphere]; ! sphere.radius = 0.15; ! sphere.translation.z = 0.3; ! ! C3GenericMaterial *material = [C3GenericMaterial genericMaterial]; ! material.diffuseColor = [C3Color redColor]; ! material.environmentImage = [C3Image imageWithContentsOfFile: ! ! [[NSBundle mainBundle] pathForResource:@"skydome_1024" ofType:@"jpg"]]; ! sphere.defaultMaterial = material; ! ! [scene addNode:sphere]; ! ! NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:rect ! ! xRadius:0.1 yRadius:0.1]; ! [path appendBezierPath:[[NSBezierPath bezierPathWithOvalInRect: ! ! NSInsetRect(rect, 0.15, 0.15)] bezierPathByReversingPath]]; ! ! id options = [NSDictionary dictionaryWithObjectsAndKeys:C3DOUBLE(0.02), ! ! kC3MeshOptionAdaptiveSubdivisionDistance, nil]; ! ! C3MeshGeometry *geom = [C3MeshGeometry meshGeometryWithBezierPath:path ! ! options:options]; ! C3Mesh *mesh = [C3Mesh mesh]; [mesh insertObject:geom inGeometriesAtIndex:0]; ! [scene addNode:mesh];
  • 21. Examples ! glRenderer = [C3GLRenderer new]; ! glRenderer.scene = scene;! ! glView.viewer.camera = camera; ! glRenderer.viewers = [NSArray arrayWithObject:glView.viewer]; ! pixarRenderer = [C3PixarRenderer new]; ! pixarRenderer.outputDirectoryPath = @"~/Render/Ceed3D-pixar"; ! pixarRenderer.scene = scene; ! aqsisRenderer = [C3AqsisRenderer new]; ! aqsisRenderer.outputDirectoryPath = @"~/Render/Ceed3D-aqsis"; ! aqsisRenderer.scene = scene; // .... [glRenderer render];
  • 22. Demo
  • 23. Demo mesh = [C3Mesh meshWithAttributedString:@"" options:nil];
  • 24. Availability • Work in progress • Low-level, stable parts will be released as open source soon • We want to release more later... • Stay tuned!
  • 25. Thank you! Raphael Sebbe Twitter: @rsebbe