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
Rajesh Yadav
 
PPT
Making Augmented Reality Applications with Android NDK
Evren Coşkun
 
PDF
Mobile Augmented Reality Development tools
Thiwanka Makumburage
 
PDF
Augmented Reality Development Tools
Tharindu Kumara
 
PPTX
Augmented reality
Abhisek Padhi
 
PDF
Mobile Augmented Reality Development Tools
Upekha Vandebona
 
PDF
2013 Lecture 8: Mobile AR
Mark Billinghurst
 
PDF
426 lecture2: AR Technology
Mark Billinghurst
 
Virtual Reality & Augmented Reality
Rajesh Yadav
 
Making Augmented Reality Applications with Android NDK
Evren Coşkun
 
Mobile Augmented Reality Development tools
Thiwanka Makumburage
 
Augmented Reality Development Tools
Tharindu Kumara
 
Augmented reality
Abhisek Padhi
 
Mobile Augmented Reality Development Tools
Upekha Vandebona
 
2013 Lecture 8: Mobile AR
Mark Billinghurst
 
426 lecture2: AR Technology
Mark Billinghurst
 

What's hot (20)

PPTX
Augmented Reality
Akash J Nair
 
PPS
Augmented Reality Presentation
SJSU
 
DOC
augmented reality paper presentation
Vaibhav Mehta
 
PPTX
Market Based Analysis of Virtual Reality Products - IT Strategy
MohitMhapuskar
 
PPTX
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Patrick O'Shaughnessey
 
PDF
AR / VR -- Rise of Technology
ShaheenTaj10
 
PPTX
Augmented reality
Sakshi Chawla
 
PDF
2013 426 Lecture 2: Augmented Reality Technology
Mark Billinghurst
 
PPTX
Augmented World Expo 2014 Wearable SDK Overview
Patrick O'Shaughnessey
 
PPTX
Augmented Reality
MeghanaVeronica
 
PPTX
Augmented reality technical presentation
sairamgoud16
 
PPTX
Augmented reality
Nikhil Katte
 
PPTX
Business Perspective- Augmented Reality
ashua12
 
PPTX
Augmented Reality
Apurva Hyanki
 
PPTX
Virtual Reality
Viral Patel
 
PPTX
Augmented reality
Gaurav borra
 
PPTX
Developing Virtual Reality Application using Google Cardboard
apurvmmmec
 
PPTX
Augmented reality
Rizal Akbar
 
PDF
2014 COSC 426 Lecture 2: Augmented Reality Technology
Mark Billinghurst
 
PPTX
Augmented reality ppt
Sourav Rout
 
Augmented Reality
Akash J Nair
 
Augmented Reality Presentation
SJSU
 
augmented reality paper presentation
Vaibhav Mehta
 
Market Based Analysis of Virtual Reality Products - IT Strategy
MohitMhapuskar
 
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Patrick O'Shaughnessey
 
AR / VR -- Rise of Technology
ShaheenTaj10
 
Augmented reality
Sakshi Chawla
 
2013 426 Lecture 2: Augmented Reality Technology
Mark Billinghurst
 
Augmented World Expo 2014 Wearable SDK Overview
Patrick O'Shaughnessey
 
Augmented Reality
MeghanaVeronica
 
Augmented reality technical presentation
sairamgoud16
 
Augmented reality
Nikhil Katte
 
Business Perspective- Augmented Reality
ashua12
 
Augmented Reality
Apurva Hyanki
 
Virtual Reality
Viral Patel
 
Augmented reality
Gaurav borra
 
Developing Virtual Reality Application using Google Cardboard
apurvmmmec
 
Augmented reality
Rizal Akbar
 
2014 COSC 426 Lecture 2: Augmented Reality Technology
Mark Billinghurst
 
Augmented reality ppt
Sourav Rout
 
Ad

Similar to 3D in Android (20)

PDF
Ujug07presentation
Bill Adams
 
PDF
Java me 08-mobile3d
Hemanth Raju
 
PPT
3D Visualization on iOS
Triassic Solutions Pvt. Ltd.
 
PDF
Tools for developing Android Games
Platty Soft
 
PDF
Low Level Graphics & OpenGL
Dominic Farolino
 
DOCX
Displaying 3 d polygon animations
halo4robo
 
PPTX
Java ME - 08 - Mobile 3D Graphics
Andreas Jakl
 
PDF
OpenGL ES and Mobile GPU
Jiansong Chen
 
DOCX
3D Article
samgh1995
 
PPTX
Beginning android games
Mario Zechner
 
DOCX
Ha4 displaying 3 d polygon animations
JordanSmith96
 
PDF
Cardboard VR: Building Low Cost VR Experiences
Mark Billinghurst
 
PDF
Developing AR and VR Experiences with Unity
Mark Billinghurst
 
PPTX
FGS 2011: Flash+ A Whole New Dimension for Games
mochimedia
 
PDF
Building VR Applications For Google Cardboard
Mark Billinghurst
 
PDF
Getting Started with 3D Game Development on Nokia Series 40 Asha Phones
Microsoft Mobile Developer
 
PPT
Advanced Game Development with the Mobile 3D Graphics API
Tomi Aarnio
 
PDF
Away3d workshop slides
Jens Brynildsen
 
PPTX
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
Prabindh Sundareson
 
PDF
Web3D - Semantic standards, WebGL, HCI
Victor Porof
 
Ujug07presentation
Bill Adams
 
Java me 08-mobile3d
Hemanth Raju
 
3D Visualization on iOS
Triassic Solutions Pvt. Ltd.
 
Tools for developing Android Games
Platty Soft
 
Low Level Graphics & OpenGL
Dominic Farolino
 
Displaying 3 d polygon animations
halo4robo
 
Java ME - 08 - Mobile 3D Graphics
Andreas Jakl
 
OpenGL ES and Mobile GPU
Jiansong Chen
 
3D Article
samgh1995
 
Beginning android games
Mario Zechner
 
Ha4 displaying 3 d polygon animations
JordanSmith96
 
Cardboard VR: Building Low Cost VR Experiences
Mark Billinghurst
 
Developing AR and VR Experiences with Unity
Mark Billinghurst
 
FGS 2011: Flash+ A Whole New Dimension for Games
mochimedia
 
Building VR Applications For Google Cardboard
Mark Billinghurst
 
Getting Started with 3D Game Development on Nokia Series 40 Asha Phones
Microsoft Mobile Developer
 
Advanced Game Development with the Mobile 3D Graphics API
Tomi Aarnio
 
Away3d workshop slides
Jens Brynildsen
 
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
Prabindh Sundareson
 
Web3D - Semantic standards, WebGL, HCI
Victor Porof
 
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.