SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
MOSC 2010

                     TM
        Android
    Applications in 3D
                         Yap Wen Jiun
                            @wenjiun
             Multimedia University Lecturer
            CodeAndroid Malaysia Member


                
Why Android?

       An open, free development platform based on Linux
        and open source
       Growing very fast!
       Provides the Android Market for distribution and
        monetization of your applications and has no approval
        process for application distribution
       Supports OpenGL ES and many more ...




                                  
Why 3D?

       3D is very popular!
       3D is visually more realistics
       3D is a must for 3D visualization such as flight
        simulation
       3D is fun especially for games




                                    
3D Games

             Winds of Steel
    by DeckEleven Entertainment




                                      Speedx 3D
                                      by HyperBees Ltd.



                                   
3D User Interface
    Stock 3D Gallery




                           Earth Live Wallpaper
                           by unixseb


                        
Depth perception
    Depth perception is the visual ability to perceive the
    world in 3D, arises from a variety of depth cues such as:
       Monocular cues
               Perspective
               Occlusion
               Size comparison
            ●   Depth from motion
               Motion parallax
       Binocular cues
            ●   Stereopsis/Binocular disparity
                                        - Wikipedia
3D Rendering
    3D rendering is the 3D computer graphics process of
    automatically converting 3D models into 2D images with
    3D photorealistic effects on a computer.

    OpenGL (Open Graphics Library) is a standard
    specification defining a cross-language, cross-platform
    API for writing applications that renders 2D and 3D
    computer graphics. The interface consists of over 250
    different function calls which can be used to draw
    complex 3D scenes from simple primitives.

                                       - Wikipedia
                                
OpenGL ES
    OpenGL for Embedded Systems is a subset of the
    OpenGL 3D graphics API designed for embedded
    devices, managed by the not-for-profit technology
    consortium, the Khronos Group, Inc.


    1st Generation Android Devices
    → OpenGL ES 1.0 plus various 1.1 extensions
    2nd Generation Android Devices (Android 2.0 & higher)
    → OpenGL ES 2.0, 1.1 + extensions


                                
Learning Android OpenGL ES
    API Demos
    Books - Sample Codes
       http://www.pragprog.com/titles/eband3/hello-android
    Blogs with demo apps
       http://nehe.gamedev.net/ &
        http://code.google.com/p/nehe-android/
       http://code.google.com/p/akjava-android-project/
       http://blogs.sonyericsson.com/developerworld/category
        /tutorials/3d-list/

                                    
Learning Android OpenGL ES




              
Getting 3D Models

   Create directly with OpenGL Codes
   Import external 3D models (OBJ, DAE) with min3D
    http://code.google.com/p/min3d/
           Create in 3D modeling program
            (Blender, SketchUp etc)
           Download free 3D models from Internet
           Scan in physical objects with 3D laser scanning


                                 
Android NDK
    The Android NDK is a companion tool to the Android
    SDK that lets Android application developers build
    performance-critical portions of their apps in native
    code (C, C++).

    The NDK provides stable headers for libc (the C library),
    libm (the Math library), OpenGL ES (3D graphics
    library), the JNI interface.

    Very convenient to developer that already has an
    exisiting native C/C++ OpenGL renderer that has
    thousands of lines of code.

                                
Android NDK



                                                 http://code.google.com/p/kwaak3/




http://code.google.com/p/doom-for-android/




                                              
3D Head Tracking
    By tracking the location of your head and rendering view
    dependent images on the display, this effectively
    transforms the display into a virtual environment which
    has a realistic illusion of depth and space

                                   http://johnnylee.net/projects/wii/




                               
Sensor Tracking
Orientation sensor can try to fake the 3D head tracking


class HeadTracking extends Activity implements
SensorEventListener
SensorManager mgr
Sensor sensor
mgr=(SensorManager)getSystemService(SENSOR_SERVICE)
sensor=mgr.getDefaultSensor(Sensor.TYPE_ORIENTATION)
mgr.registerListener(this, sensor,
SensorManager.SENSOR_DELAY_FASTEST)
......
                              
Face Tracking
    Actual head tracking is possible with front-facing camera


    FaceDetector arrayFaces = null
    FaceDetector.Face getAllFaces[ ] = null
    getAllFaces = new FaceDetector.Face[NUM_FACES]
    arrayFaces = new FaceDetector (sourceImage.getWidth( ),
    sourceImage.getHeight( ), NUM_FACES)
    arrayFaces.findFaces(sourceImage, getAllFaces)



                                  
Augmented Reality
    A live direct or indirect view of a physical real-world
    environment whose elements are augmented by virtual
    computer-generated imagery – Wikipedia




                               
Camera Preview

    class Preview extends SurfaceView implements
    SaurfaceHolder.Callback
    SurfaceHolder mHolder
    mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_
    BUFFERS)
    Camera mCamera
    mCamera = Camera.open( )
    mCamera.setPreviewDisplay(holder)
    mCamera.startPreview( )


                                
Stereoscopic View
    Stereoscopy is the enhancement of the illusion of depth
    in a photograph, movie or other 2D graphics by
    presenting a slightly different image to each eye, and
    thereby adding the dominant stereopsis cues.
       Active LCD shutter
       Circularly polarized projections
       Lenticular autostereoscopic displays
       Anaglyphs




                                    
Red-Cyan Anaglyph
    Graphics are made up of two differently filtered coloured
    graphics, one for each eye, superimposed to produce a
    depth effect – Wikipedia


    gl.glDisable(GL10.GL_DEPTH_TEST)
    gl.glEnable(GL10.GL_BLEND)
    gl.glBlendFunc(GL10.GL_ONE, GL10.GL_ONE)
    gl.glColorMask(true, false, false, true)
    gl.glColorMask(false, true, true, true)

                                  
Endless Possibilities ...

    In the future … anything is possible

            Check out CodeAndroid Malaysia at
                  http://www.codeandroid.my/

                            Thank you!
    Small portions of this presentation are modifications based on work
    created and shared by Google and used according to terms described
    in the Creative Commons 3.0 Attribution License.


                                     

Weitere ähnliche Inhalte

Was ist angesagt?

Augmented Reality Presentation
Augmented Reality PresentationAugmented Reality Presentation
Augmented Reality PresentationSJSU
 
augmented reality paper presentation
augmented reality paper presentationaugmented reality paper presentation
augmented reality paper presentationVaibhav Mehta
 
Market Based Analysis of Virtual Reality Products - IT Strategy
Market Based Analysis of Virtual Reality Products - IT StrategyMarket Based Analysis of Virtual Reality Products - IT Strategy
Market Based Analysis of Virtual Reality Products - IT StrategyMohitMhapuskar
 
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Augmented World Expo 2013 Mobile AR SDK Comparison and TutorialAugmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Augmented World Expo 2013 Mobile AR SDK Comparison and TutorialPatrick O'Shaughnessey
 
AR / VR -- Rise of Technology
AR / VR -- Rise of Technology AR / VR -- Rise of Technology
AR / VR -- Rise of Technology ShaheenTaj10
 
2013 426 Lecture 2: Augmented Reality Technology
2013 426 Lecture 2:  Augmented Reality Technology2013 426 Lecture 2:  Augmented Reality Technology
2013 426 Lecture 2: Augmented Reality TechnologyMark Billinghurst
 
Augmented World Expo 2014 Wearable SDK Overview
Augmented World Expo 2014 Wearable SDK OverviewAugmented World Expo 2014 Wearable SDK Overview
Augmented World Expo 2014 Wearable SDK OverviewPatrick O'Shaughnessey
 
Augmented reality technical presentation
 Augmented reality technical presentation Augmented reality technical presentation
Augmented reality technical presentationsairamgoud16
 
Business Perspective- Augmented Reality
Business Perspective- Augmented RealityBusiness Perspective- Augmented Reality
Business Perspective- Augmented Realityashua12
 
Developing Virtual Reality Application using Google Cardboard
Developing Virtual Reality Application using Google CardboardDeveloping Virtual Reality Application using Google Cardboard
Developing Virtual Reality Application using Google Cardboardapurvmmmec
 
Augmented reality
Augmented realityAugmented reality
Augmented realityRizal Akbar
 
2014 COSC 426 Lecture 2: Augmented Reality Technology
2014 COSC 426 Lecture 2: Augmented Reality Technology2014 COSC 426 Lecture 2: Augmented Reality Technology
2014 COSC 426 Lecture 2: Augmented Reality TechnologyMark Billinghurst
 
Augmented reality ppt
Augmented reality pptAugmented reality ppt
Augmented reality pptSourav Rout
 

Was ist angesagt? (20)

Augmented Reality
Augmented RealityAugmented Reality
Augmented Reality
 
Augmented Reality Presentation
Augmented Reality PresentationAugmented Reality Presentation
Augmented Reality Presentation
 
augmented reality paper presentation
augmented reality paper presentationaugmented reality paper presentation
augmented reality paper presentation
 
Market Based Analysis of Virtual Reality Products - IT Strategy
Market Based Analysis of Virtual Reality Products - IT StrategyMarket Based Analysis of Virtual Reality Products - IT Strategy
Market Based Analysis of Virtual Reality Products - IT Strategy
 
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Augmented World Expo 2013 Mobile AR SDK Comparison and TutorialAugmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
 
AR / VR -- Rise of Technology
AR / VR -- Rise of Technology AR / VR -- Rise of Technology
AR / VR -- Rise of Technology
 
Augmented reality
Augmented realityAugmented reality
Augmented reality
 
2013 426 Lecture 2: Augmented Reality Technology
2013 426 Lecture 2:  Augmented Reality Technology2013 426 Lecture 2:  Augmented Reality Technology
2013 426 Lecture 2: Augmented Reality Technology
 
Augmented World Expo 2014 Wearable SDK Overview
Augmented World Expo 2014 Wearable SDK OverviewAugmented World Expo 2014 Wearable SDK Overview
Augmented World Expo 2014 Wearable SDK Overview
 
Augmented Reality
Augmented RealityAugmented Reality
Augmented Reality
 
Augmented reality technical presentation
 Augmented reality technical presentation Augmented reality technical presentation
Augmented reality technical presentation
 
Augmented reality
Augmented realityAugmented reality
Augmented reality
 
Business Perspective- Augmented Reality
Business Perspective- Augmented RealityBusiness Perspective- Augmented Reality
Business Perspective- Augmented Reality
 
Augmented Reality
Augmented RealityAugmented Reality
Augmented Reality
 
Virtual Reality
Virtual RealityVirtual Reality
Virtual Reality
 
Augmented reality
Augmented realityAugmented reality
Augmented reality
 
Developing Virtual Reality Application using Google Cardboard
Developing Virtual Reality Application using Google CardboardDeveloping Virtual Reality Application using Google Cardboard
Developing Virtual Reality Application using Google Cardboard
 
Augmented reality
Augmented realityAugmented reality
Augmented reality
 
2014 COSC 426 Lecture 2: Augmented Reality Technology
2014 COSC 426 Lecture 2: Augmented Reality Technology2014 COSC 426 Lecture 2: Augmented Reality Technology
2014 COSC 426 Lecture 2: Augmented Reality Technology
 
Augmented reality ppt
Augmented reality pptAugmented reality ppt
Augmented reality ppt
 

Ähnlich wie 3D in Android

Displaying 3 d polygon animations
Displaying 3 d polygon animationsDisplaying 3 d polygon animations
Displaying 3 d polygon animationshalo4robo
 
Virtual_Reality_New.pptx
Virtual_Reality_New.pptxVirtual_Reality_New.pptx
Virtual_Reality_New.pptxBapuPradhan1
 
Build Mobile Application In Android
Build Mobile Application In AndroidBuild Mobile Application In Android
Build Mobile Application In Androiddnnddane
 
HCI2015_09.pptx ghdjkl vsggfoojhvbnkiknccg
HCI2015_09.pptx ghdjkl vsggfoojhvbnkiknccgHCI2015_09.pptx ghdjkl vsggfoojhvbnkiknccg
HCI2015_09.pptx ghdjkl vsggfoojhvbnkiknccgroddavijaypatel
 
virtual reality...............................
virtual reality...............................virtual reality...............................
virtual reality...............................MeghaKulkarni27
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminologyJordanianmc
 
Ha4 displaying 3 d polygon animations
Ha4   displaying 3 d polygon animationsHa4   displaying 3 d polygon animations
Ha4 displaying 3 d polygon animationsJordanSmith96
 
CGV Project Report.pdf
CGV Project Report.pdfCGV Project Report.pdf
CGV Project Report.pdfHimaBindhu41
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easyLars Vogel
 
[Project1] Information Virtual Reality [Exam]
[Project1] Information Virtual Reality [Exam][Project1] Information Virtual Reality [Exam]
[Project1] Information Virtual Reality [Exam]Yati Dumrongsukit
 
Google Cardboard Virtual Reality
Google Cardboard Virtual RealityGoogle Cardboard Virtual Reality
Google Cardboard Virtual RealityVicky VikRanth
 
AiRaid: Rise of the Undead
AiRaid: Rise of the UndeadAiRaid: Rise of the Undead
AiRaid: Rise of the Undead3scale.net
 
ARCore Shared 3d Worlds
ARCore Shared 3d WorldsARCore Shared 3d Worlds
ARCore Shared 3d WorldsSergii Kozyrev
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminologyJordanianmc
 
Leonar3do Intro Presenetation
Leonar3do Intro PresenetationLeonar3do Intro Presenetation
Leonar3do Intro PresenetationGergely Köles
 

Ähnlich wie 3D in Android (20)

Displaying 3 d polygon animations
Displaying 3 d polygon animationsDisplaying 3 d polygon animations
Displaying 3 d polygon animations
 
Virtual_Reality_New.pptx
Virtual_Reality_New.pptxVirtual_Reality_New.pptx
Virtual_Reality_New.pptx
 
Build Mobile Application In Android
Build Mobile Application In AndroidBuild Mobile Application In Android
Build Mobile Application In Android
 
3D Landscape on Labs
3D Landscape on Labs3D Landscape on Labs
3D Landscape on Labs
 
3D Article
3D Article3D Article
3D Article
 
HCI2015_09.pptx ghdjkl vsggfoojhvbnkiknccg
HCI2015_09.pptx ghdjkl vsggfoojhvbnkiknccgHCI2015_09.pptx ghdjkl vsggfoojhvbnkiknccg
HCI2015_09.pptx ghdjkl vsggfoojhvbnkiknccg
 
virtual reality...............................
virtual reality...............................virtual reality...............................
virtual reality...............................
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 
Ha4 displaying 3 d polygon animations
Ha4   displaying 3 d polygon animationsHa4   displaying 3 d polygon animations
Ha4 displaying 3 d polygon animations
 
CGV Project Report.pdf
CGV Project Report.pdfCGV Project Report.pdf
CGV Project Report.pdf
 
Ganar el desafio android
Ganar el desafio androidGanar el desafio android
Ganar el desafio android
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easy
 
[Project1] Information Virtual Reality [Exam]
[Project1] Information Virtual Reality [Exam][Project1] Information Virtual Reality [Exam]
[Project1] Information Virtual Reality [Exam]
 
Google Cardboard Virtual Reality
Google Cardboard Virtual RealityGoogle Cardboard Virtual Reality
Google Cardboard Virtual Reality
 
AR - 001.pptx
AR - 001.pptxAR - 001.pptx
AR - 001.pptx
 
3D Technology
3D Technology 3D Technology
3D Technology
 
AiRaid: Rise of the Undead
AiRaid: Rise of the UndeadAiRaid: Rise of the Undead
AiRaid: Rise of the Undead
 
ARCore Shared 3d Worlds
ARCore Shared 3d WorldsARCore Shared 3d Worlds
ARCore Shared 3d Worlds
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 
Leonar3do Intro Presenetation
Leonar3do Intro PresenetationLeonar3do Intro Presenetation
Leonar3do Intro Presenetation
 

3D in Android

  • 1. MOSC 2010 TM Android Applications in 3D Yap Wen Jiun @wenjiun Multimedia University Lecturer CodeAndroid Malaysia Member    
  • 2. Why Android?  An open, free development platform based on Linux and open source  Growing very fast!  Provides the Android Market for distribution and monetization of your applications and has no approval process for application distribution  Supports OpenGL ES and many more ...    
  • 3. Why 3D?  3D is very popular!  3D is visually more realistics  3D is a must for 3D visualization such as flight simulation  3D is fun especially for games    
  • 4. 3D Games Winds of Steel by DeckEleven Entertainment Speedx 3D by HyperBees Ltd.    
  • 5. 3D User Interface Stock 3D Gallery Earth Live Wallpaper by unixseb    
  • 6. Depth perception Depth perception is the visual ability to perceive the world in 3D, arises from a variety of depth cues such as:  Monocular cues  Perspective  Occlusion  Size comparison ● Depth from motion  Motion parallax  Binocular cues ● Stereopsis/Binocular disparity     - Wikipedia
  • 7. 3D Rendering 3D rendering is the 3D computer graphics process of automatically converting 3D models into 2D images with 3D photorealistic effects on a computer. OpenGL (Open Graphics Library) is a standard specification defining a cross-language, cross-platform API for writing applications that renders 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex 3D scenes from simple primitives. - Wikipedia    
  • 8. OpenGL ES OpenGL for Embedded Systems is a subset of the OpenGL 3D graphics API designed for embedded devices, managed by the not-for-profit technology consortium, the Khronos Group, Inc. 1st Generation Android Devices → OpenGL ES 1.0 plus various 1.1 extensions 2nd Generation Android Devices (Android 2.0 & higher) → OpenGL ES 2.0, 1.1 + extensions    
  • 9. Learning Android OpenGL ES API Demos Books - Sample Codes  http://www.pragprog.com/titles/eband3/hello-android Blogs with demo apps  http://nehe.gamedev.net/ & http://code.google.com/p/nehe-android/  http://code.google.com/p/akjava-android-project/  http://blogs.sonyericsson.com/developerworld/category /tutorials/3d-list/    
  • 11. Getting 3D Models  Create directly with OpenGL Codes  Import external 3D models (OBJ, DAE) with min3D http://code.google.com/p/min3d/  Create in 3D modeling program (Blender, SketchUp etc)  Download free 3D models from Internet  Scan in physical objects with 3D laser scanning    
  • 12. Android NDK The Android NDK is a companion tool to the Android SDK that lets Android application developers build performance-critical portions of their apps in native code (C, C++). The NDK provides stable headers for libc (the C library), libm (the Math library), OpenGL ES (3D graphics library), the JNI interface. Very convenient to developer that already has an exisiting native C/C++ OpenGL renderer that has thousands of lines of code.    
  • 13. Android NDK http://code.google.com/p/kwaak3/ http://code.google.com/p/doom-for-android/    
  • 14. 3D Head Tracking By tracking the location of your head and rendering view dependent images on the display, this effectively transforms the display into a virtual environment which has a realistic illusion of depth and space http://johnnylee.net/projects/wii/    
  • 15. Sensor Tracking Orientation sensor can try to fake the 3D head tracking class HeadTracking extends Activity implements SensorEventListener SensorManager mgr Sensor sensor mgr=(SensorManager)getSystemService(SENSOR_SERVICE) sensor=mgr.getDefaultSensor(Sensor.TYPE_ORIENTATION) mgr.registerListener(this, sensor, SensorManager.SENSOR_DELAY_FASTEST) ......    
  • 16. Face Tracking Actual head tracking is possible with front-facing camera FaceDetector arrayFaces = null FaceDetector.Face getAllFaces[ ] = null getAllFaces = new FaceDetector.Face[NUM_FACES] arrayFaces = new FaceDetector (sourceImage.getWidth( ), sourceImage.getHeight( ), NUM_FACES) arrayFaces.findFaces(sourceImage, getAllFaces)    
  • 17. Augmented Reality A live direct or indirect view of a physical real-world environment whose elements are augmented by virtual computer-generated imagery – Wikipedia    
  • 18. Camera Preview class Preview extends SurfaceView implements SaurfaceHolder.Callback SurfaceHolder mHolder mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_ BUFFERS) Camera mCamera mCamera = Camera.open( ) mCamera.setPreviewDisplay(holder) mCamera.startPreview( )    
  • 19. Stereoscopic View Stereoscopy is the enhancement of the illusion of depth in a photograph, movie or other 2D graphics by presenting a slightly different image to each eye, and thereby adding the dominant stereopsis cues.  Active LCD shutter  Circularly polarized projections  Lenticular autostereoscopic displays  Anaglyphs    
  • 20. Red-Cyan Anaglyph Graphics are made up of two differently filtered coloured graphics, one for each eye, superimposed to produce a depth effect – Wikipedia gl.glDisable(GL10.GL_DEPTH_TEST) gl.glEnable(GL10.GL_BLEND) gl.glBlendFunc(GL10.GL_ONE, GL10.GL_ONE) gl.glColorMask(true, false, false, true) gl.glColorMask(false, true, true, true)    
  • 21. Endless Possibilities ... In the future … anything is possible Check out CodeAndroid Malaysia at http://www.codeandroid.my/ Thank you! Small portions of this presentation are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.