SlideShare ist ein Scribd-Unternehmen logo
1 von 15
OPEN FRAMEWORKS +
                            KINECT PART III

                               @GAFFTA




Thursday, March 14, 13
3D and Open Frameworks




    Cameras

    3D Math Classes

    OpenGL Wrappers




Thursday, March 14, 13
Vector Classes



    ofVec2f , ofVec3f , ofVec4f
    align()
    cross()
    distance()
    rotate()
    perpendicular()
    dot()


    vectors are used to store dimensional data such as position, direction, length
    ( or magnitude )




Thursday, March 14, 13
Quaternion Classes




    ofQuaternion


    With 3D rotation becomes more complicated rotating in X ,Y , and Z in
    different orders will result in different perceived rotations. Quaternions are
    used to calculate “moves” between rotations for consistency.




Thursday, March 14, 13
Matrices Classes



    ofMatrix3x3 , ofMatrix4x4
    getRotate( )
    getEuler( )
    inverse( )
    makeRotate( )


    Matrices are often used to calculate 3d transformation data on a set of data
    to move things between coordinate spaces. Luckily of wraps a lot of this
    lower level functionality so these classes are more behind the scenes classes
    until you want to get really low level.




Thursday, March 14, 13
3D Math




    ofWrapDegrees()
    ofRadToDeg( )
    ofNoise( )
    ofInsidePoly()
    ofRandom( )


    Open Frameworks does a really good job of wrapping simple math functions
    that are often used when working with polygons angles and generative art




Thursday, March 14, 13
Cameras
    Cameras is a great way to control how a 3D rendered scene looks. Cameras
    are the “eyes” of the window. The camera position has a large effect on
    rendered effects such as lights and shading.




                                   *HTTP://WWW.OPENFRAMEWORKS.CC/DOCUMENTATION/3D/OFCAMERA.HTML




      ofCamera - base camera class. Camera rendering is controlled similar to an ofFbo
      with ofCamera::begin() and ofCamera::end( )

      ofEasyCam - extends ofCamera and adds a little extra functionality including
      mouse dragging functionality.


Thursday, March 14, 13
OpenGL
    OpenGL is an API for interactive directly with the GPU which is much more adept at
    handling parallel processing than the CPU. OpenGL is a very deep and extensive topic but
    the basics are wrapped well in Open Frameworks

    ofMesh - An ofMesh represents a set of vertices in 3D spaces, and normals at those points,
    colors at those points, and texture coordinates at those points. Each of these different
    properties is stored in a vector.Vertices are passed to your graphics card and your graphics
    card fill in the spaces in between them in a processing usually called the rendering pipeline.
    The rendering pipeline goes more or less like this:




                                       *HTTP://WWW.OPENFRAMEWORKS.CC/DOCUMENTATION/3D/OFMESH.HTML


Thursday, March 14, 13
OpenGL
    ofNode - basic “3d” object class with position , rotation , and orientation. It also has some
    hand functions like : lookAt( ) which orients an ofNode object to any other ofNode object


    ofShader - shaders are small programs written in GLSL that allow for really intensive
    rendering computation. They are often split into two parts : the Vertex shader which
    works with vertices , and the Fragment shader which works with pixels. Shaders are a
    very deep topic but OF makes it easy to :


    load a shader from an external text file
    pass any data into the shader
    begin() and end() rendering.


    ofTexture - allows pixel data to be rendered on 3d vertices

    ofMaterial - contains properties for how textures are rendered such as shininess and color
    along with specular color



Thursday, March 14, 13
Kinect Point Cloud
    The kinect interprets the scene in 3D so it’s easy to work with the raw data. All you have
    have to do in OF is add it to an ofMesh and point an ofCamera at it.




Thursday, March 14, 13
ofxKinect + ofxUI + Point Cloud

Thursday, March 14, 13
Splicing the Point Cloud

Thursday, March 14, 13
Masking a Fragment Shader

Thursday, March 14, 13
Cube Point Cloud

Thursday, March 14, 13
Apply Vertex + Fragment Shader

Thursday, March 14, 13

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (13)

Dijkastra’s algorithm
Dijkastra’s algorithmDijkastra’s algorithm
Dijkastra’s algorithm
 
Tensorflow IoT - 1 Wk coding challenge
Tensorflow IoT - 1 Wk coding challengeTensorflow IoT - 1 Wk coding challenge
Tensorflow IoT - 1 Wk coding challenge
 
Transfer learning for IoT
Transfer learning for IoTTransfer learning for IoT
Transfer learning for IoT
 
cs247 slides
cs247 slidescs247 slides
cs247 slides
 
Transformer Zoo (a deeper dive)
Transformer Zoo (a deeper dive)Transformer Zoo (a deeper dive)
Transformer Zoo (a deeper dive)
 
A Beginner's Guide to Monocular Depth Estimation
A Beginner's Guide to Monocular Depth EstimationA Beginner's Guide to Monocular Depth Estimation
A Beginner's Guide to Monocular Depth Estimation
 
Bryan Thompson, Chief Scientist and Founder at SYSTAP, LLC at MLconf NYC
Bryan Thompson, Chief Scientist and Founder at SYSTAP, LLC at MLconf NYCBryan Thompson, Chief Scientist and Founder at SYSTAP, LLC at MLconf NYC
Bryan Thompson, Chief Scientist and Founder at SYSTAP, LLC at MLconf NYC
 
Image Classification using deep learning
Image Classification using deep learning Image Classification using deep learning
Image Classification using deep learning
 
Tensorflow for IoT
Tensorflow for IoTTensorflow for IoT
Tensorflow for IoT
 
Skeltrack: A Free Software library for skeleton tracking (GUADEC 2012)
Skeltrack: A Free Software library for skeleton tracking (GUADEC 2012)Skeltrack: A Free Software library for skeleton tracking (GUADEC 2012)
Skeltrack: A Free Software library for skeleton tracking (GUADEC 2012)
 
Skeltrack: A Free Software library for skeleton tracking (LinuxTag 2012)
Skeltrack: A Free Software library for skeleton tracking (LinuxTag 2012)Skeltrack: A Free Software library for skeleton tracking (LinuxTag 2012)
Skeltrack: A Free Software library for skeleton tracking (LinuxTag 2012)
 
Praseed Pai
Praseed PaiPraseed Pai
Praseed Pai
 
KC Skeletalmesh - Features of first two graphics engines
KC Skeletalmesh - Features of first two graphics enginesKC Skeletalmesh - Features of first two graphics engines
KC Skeletalmesh - Features of first two graphics engines
 

Ähnlich wie Hacking the Kinect with GAFFTA Day 3

From Sense to Print: Towards Automatic 3D Printing from 3D Sensing Devices
From Sense to Print: Towards Automatic 3D Printing from 3D Sensing DevicesFrom Sense to Print: Towards Automatic 3D Printing from 3D Sensing Devices
From Sense to Print: Towards Automatic 3D Printing from 3D Sensing Devices
toukaigi
 
Game Engine Overview
Game Engine OverviewGame Engine Overview
Game Engine Overview
Sharad Mitra
 
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The BasicsHA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
hamza_123456
 
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The BasicsHA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
hamza_123456
 
Immersive 3 d visualization of remote sensing data
Immersive 3 d visualization of remote sensing dataImmersive 3 d visualization of remote sensing data
Immersive 3 d visualization of remote sensing data
sipij
 
detailed experience
detailed experiencedetailed experience
detailed experience
Bryan Yan
 
Task 2 displaying 3 d polygon animation
Task 2 displaying 3 d polygon animationTask 2 displaying 3 d polygon animation
Task 2 displaying 3 d polygon animation
Rexeh1245
 

Ähnlich wie Hacking the Kinect with GAFFTA Day 3 (20)

ShaderX³: Geometry Manipulation - Morphing between two different objects
ShaderX³: Geometry Manipulation - Morphing between two different objectsShaderX³: Geometry Manipulation - Morphing between two different objects
ShaderX³: Geometry Manipulation - Morphing between two different objects
 
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
 
Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]
 
Computer Graphics Power Point using Open GL and C Programming
Computer Graphics Power Point using Open GL and C ProgrammingComputer Graphics Power Point using Open GL and C Programming
Computer Graphics Power Point using Open GL and C Programming
 
From Sense to Print: Towards Automatic 3D Printing from 3D Sensing Devices
From Sense to Print: Towards Automatic 3D Printing from 3D Sensing DevicesFrom Sense to Print: Towards Automatic 3D Printing from 3D Sensing Devices
From Sense to Print: Towards Automatic 3D Printing from 3D Sensing Devices
 
3 d video streaming for virtual exploration of planet surface
3 d video streaming for virtual exploration of planet surface3 d video streaming for virtual exploration of planet surface
3 d video streaming for virtual exploration of planet surface
 
Portfolio
PortfolioPortfolio
Portfolio
 
livingin3d
livingin3dlivingin3d
livingin3d
 
Game Engine Overview
Game Engine OverviewGame Engine Overview
Game Engine Overview
 
Java fx 3d
Java fx 3dJava fx 3d
Java fx 3d
 
3D - The Basics
3D - The Basics 3D - The Basics
3D - The Basics
 
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The BasicsHA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
 
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The BasicsHA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
HA5 – COMPUTER ARTS BLOG ARTICLE – 3D: The Basics
 
Immersive 3 d visualization of remote sensing data
Immersive 3 d visualization of remote sensing dataImmersive 3 d visualization of remote sensing data
Immersive 3 d visualization of remote sensing data
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
 
detailed experience
detailed experiencedetailed experience
detailed experience
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipelining
 
Task 2 displaying 3 d polygon animation
Task 2 displaying 3 d polygon animationTask 2 displaying 3 d polygon animation
Task 2 displaying 3 d polygon animation
 
Basics
BasicsBasics
Basics
 
A step towards interactive displays of digital elevation models
A step towards interactive displays of digital elevation modelsA step towards interactive displays of digital elevation models
A step towards interactive displays of digital elevation models
 

Kürzlich hochgeladen

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
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
Victor Rentea
 

Kürzlich hochgeladen (20)

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
 
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 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
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
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
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...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Hacking the Kinect with GAFFTA Day 3

  • 1. OPEN FRAMEWORKS + KINECT PART III @GAFFTA Thursday, March 14, 13
  • 2. 3D and Open Frameworks Cameras 3D Math Classes OpenGL Wrappers Thursday, March 14, 13
  • 3. Vector Classes ofVec2f , ofVec3f , ofVec4f align() cross() distance() rotate() perpendicular() dot() vectors are used to store dimensional data such as position, direction, length ( or magnitude ) Thursday, March 14, 13
  • 4. Quaternion Classes ofQuaternion With 3D rotation becomes more complicated rotating in X ,Y , and Z in different orders will result in different perceived rotations. Quaternions are used to calculate “moves” between rotations for consistency. Thursday, March 14, 13
  • 5. Matrices Classes ofMatrix3x3 , ofMatrix4x4 getRotate( ) getEuler( ) inverse( ) makeRotate( ) Matrices are often used to calculate 3d transformation data on a set of data to move things between coordinate spaces. Luckily of wraps a lot of this lower level functionality so these classes are more behind the scenes classes until you want to get really low level. Thursday, March 14, 13
  • 6. 3D Math ofWrapDegrees() ofRadToDeg( ) ofNoise( ) ofInsidePoly() ofRandom( ) Open Frameworks does a really good job of wrapping simple math functions that are often used when working with polygons angles and generative art Thursday, March 14, 13
  • 7. Cameras Cameras is a great way to control how a 3D rendered scene looks. Cameras are the “eyes” of the window. The camera position has a large effect on rendered effects such as lights and shading. *HTTP://WWW.OPENFRAMEWORKS.CC/DOCUMENTATION/3D/OFCAMERA.HTML ofCamera - base camera class. Camera rendering is controlled similar to an ofFbo with ofCamera::begin() and ofCamera::end( ) ofEasyCam - extends ofCamera and adds a little extra functionality including mouse dragging functionality. Thursday, March 14, 13
  • 8. OpenGL OpenGL is an API for interactive directly with the GPU which is much more adept at handling parallel processing than the CPU. OpenGL is a very deep and extensive topic but the basics are wrapped well in Open Frameworks ofMesh - An ofMesh represents a set of vertices in 3D spaces, and normals at those points, colors at those points, and texture coordinates at those points. Each of these different properties is stored in a vector.Vertices are passed to your graphics card and your graphics card fill in the spaces in between them in a processing usually called the rendering pipeline. The rendering pipeline goes more or less like this: *HTTP://WWW.OPENFRAMEWORKS.CC/DOCUMENTATION/3D/OFMESH.HTML Thursday, March 14, 13
  • 9. OpenGL ofNode - basic “3d” object class with position , rotation , and orientation. It also has some hand functions like : lookAt( ) which orients an ofNode object to any other ofNode object ofShader - shaders are small programs written in GLSL that allow for really intensive rendering computation. They are often split into two parts : the Vertex shader which works with vertices , and the Fragment shader which works with pixels. Shaders are a very deep topic but OF makes it easy to : load a shader from an external text file pass any data into the shader begin() and end() rendering. ofTexture - allows pixel data to be rendered on 3d vertices ofMaterial - contains properties for how textures are rendered such as shininess and color along with specular color Thursday, March 14, 13
  • 10. Kinect Point Cloud The kinect interprets the scene in 3D so it’s easy to work with the raw data. All you have have to do in OF is add it to an ofMesh and point an ofCamera at it. Thursday, March 14, 13
  • 11. ofxKinect + ofxUI + Point Cloud Thursday, March 14, 13
  • 12. Splicing the Point Cloud Thursday, March 14, 13
  • 13. Masking a Fragment Shader Thursday, March 14, 13
  • 15. Apply Vertex + Fragment Shader Thursday, March 14, 13