SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

What's hot (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
 

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

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

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+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@
 

Recently uploaded (20)

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
 
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
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
+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 Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.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