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

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

Ä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

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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Kürzlich hochgeladen (20)

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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

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