SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
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

Mais conteúdo relacionado

Destaque

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
 

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

Semelhante 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
 

Semelhante 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

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Último (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 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