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


                                     

More Related Content

PPTX
Virtual Reality & Augmented Reality
PPT
Making Augmented Reality Applications with Android NDK
PDF
Mobile Augmented Reality Development tools
PDF
Augmented Reality Development Tools
PPTX
Augmented reality
PDF
Mobile Augmented Reality Development Tools
PDF
2013 Lecture 8: Mobile AR
PDF
426 lecture2: AR Technology
Virtual Reality & Augmented Reality
Making Augmented Reality Applications with Android NDK
Mobile Augmented Reality Development tools
Augmented Reality Development Tools
Augmented reality
Mobile Augmented Reality Development Tools
2013 Lecture 8: Mobile AR
426 lecture2: AR Technology

What's hot (20)

PPTX
Augmented Reality
PPS
Augmented Reality Presentation
DOC
augmented reality paper presentation
PPTX
Market Based Analysis of Virtual Reality Products - IT Strategy
PPTX
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
PDF
AR / VR -- Rise of Technology
PPTX
Augmented reality
PDF
2013 426 Lecture 2: Augmented Reality Technology
PPTX
Augmented World Expo 2014 Wearable SDK Overview
PPTX
Augmented Reality
PPTX
Augmented reality technical presentation
PPTX
Augmented reality
PPTX
Business Perspective- Augmented Reality
PPTX
Augmented Reality
PPTX
Virtual Reality
PPTX
Augmented reality
PPTX
Developing Virtual Reality Application using Google Cardboard
PPTX
Augmented reality
PDF
2014 COSC 426 Lecture 2: Augmented Reality Technology
PPTX
Augmented reality ppt
Augmented Reality
Augmented Reality Presentation
augmented reality paper presentation
Market Based Analysis of Virtual Reality Products - IT Strategy
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
AR / VR -- Rise of Technology
Augmented reality
2013 426 Lecture 2: Augmented Reality Technology
Augmented World Expo 2014 Wearable SDK Overview
Augmented Reality
Augmented reality technical presentation
Augmented reality
Business Perspective- Augmented Reality
Augmented Reality
Virtual Reality
Augmented reality
Developing Virtual Reality Application using Google Cardboard
Augmented reality
2014 COSC 426 Lecture 2: Augmented Reality Technology
Augmented reality ppt
Ad

Similar to 3D in Android (20)

PDF
Ujug07presentation
PDF
Java me 08-mobile3d
PPT
3D Visualization on iOS
PDF
Tools for developing Android Games
PDF
Low Level Graphics & OpenGL
DOCX
Displaying 3 d polygon animations
PPTX
Java ME - 08 - Mobile 3D Graphics
PDF
OpenGL ES and Mobile GPU
DOCX
3D Article
PPTX
Beginning android games
DOCX
Ha4 displaying 3 d polygon animations
PDF
Cardboard VR: Building Low Cost VR Experiences
PDF
Developing AR and VR Experiences with Unity
PPTX
FGS 2011: Flash+ A Whole New Dimension for Games
PDF
Building VR Applications For Google Cardboard
PDF
Getting Started with 3D Game Development on Nokia Series 40 Asha Phones
PPT
Advanced Game Development with the Mobile 3D Graphics API
PDF
Away3d workshop slides
PPTX
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
PDF
Web3D - Semantic standards, WebGL, HCI
Ujug07presentation
Java me 08-mobile3d
3D Visualization on iOS
Tools for developing Android Games
Low Level Graphics & OpenGL
Displaying 3 d polygon animations
Java ME - 08 - Mobile 3D Graphics
OpenGL ES and Mobile GPU
3D Article
Beginning android games
Ha4 displaying 3 d polygon animations
Cardboard VR: Building Low Cost VR Experiences
Developing AR and VR Experiences with Unity
FGS 2011: Flash+ A Whole New Dimension for Games
Building VR Applications For Google Cardboard
Getting Started with 3D Game Development on Nokia Series 40 Asha Phones
Advanced Game Development with the Mobile 3D Graphics API
Away3d workshop slides
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
Web3D - Semantic standards, WebGL, HCI
Ad

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.