SlideShare una empresa de Scribd logo
1 de 25
Descargar para leer sin conexión
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 filters 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

Más contenido relacionado

Destacado

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
 

Destacado (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
 

Similar a 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
 
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
 
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
 
CS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingCS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingMark Kilgard
 

Similar a 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
 

Último

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
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...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

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 & file 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 Definition
  • 18. 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
  • 19. Cocoa Interactions • KVO / KVC: easy access to object inputs/outputs • Core Image: CIImage used as textures, CIFilter as post process filters 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
  • 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