android 3d by ivan trajkovic and dotti colvin
TRANSCRIPT
![Page 1: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/1.jpg)
ByIvan Trajkovic
andDotti Colvin
ANDROID 3D
![Page 2: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/2.jpg)
WHY ALL THIS
• Bridge the gap between animators and developers
• Have us recognize the importance of mutual
initiative• Inspire new partnerships and ideas
INSIPIRE EACH OTHER!
![Page 3: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/3.jpg)
INDEX
• Android Platform• Open GL• Android 3D Game Engines• 3D Workshop
![Page 4: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/4.jpg)
ANDROID HISTORY
• What is Android ?• Brief History
• Android Inc. founded in 2003 in Palo Alto, CA, USA• Andy Rubin (co-founder of Danger)• Rich Miner (co-founder of Wildfire Communications,
Inc.)• Nick Sears (once VP at T-Mobile)• Chris White (headed design and interface
development at WebTV)
![Page 5: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/5.jpg)
ANDROID HISTORY
• Google acquired Android Inc. in August 2005• Open Handset Alliance on November 5, 2007
• The Goal is to develop open standards for mobile devices.
• Android was BORN
![Page 6: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/6.jpg)
ANDROID ARHITECTURE
![Page 7: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/7.jpg)
OPEN GL
• What is Open GL?• Brief History
• developed by Silicon Graphics Inc. (SGI) in 1992• managed by the non-profit technology consortium
Khronos Group
![Page 8: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/8.jpg)
OPEN GL ES
• OpenGL ES is a subset of the OpenGL• Brief History
• Open GL ES 1.0 is drawn up against the OpenGL 1.3 specification
• Open GL ES 1.1 is defined relative to the OpenGL 1.5 specification
• Open GL ES 2.0 is defined relative to the OpenGL 2.0 specification
![Page 9: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/9.jpg)
OPEN GL ES
• OpenGL 1.0 – 2.0 (Desktop)• Large and impractical for embedded devices• Customers are porting apps from these versions to OMAP
• OpenGL ES 1.1• Embedded version for fixed-function shading hardware• Subset of desktop OpenGL• Standard created by the Khronos Group Industry consortium in 2003• Rapidly became the dominant standard for embedded 3D• Also popular for scalable 2D applications
• OpenGL ES 2.0• Replaces 2 major sections of the 3D pipeline with shader programs• Vertex Shader – Distort, morph and/or animate vertex positions• Fragment Shader – Calculate pixel colors for shadows and/or reflections• Smaller, more memory efficient OpenGL library and less texture maps• Shaders are programmed with new GLSL ES Language• Programmable cores already dominate 3D graphics on the desktop• Will become dominate in embedded devices as well
![Page 10: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/10.jpg)
OPEN GL ES
Open Gl ES 1.0 Open Gl ES 1.1 Open Gl ES 2.0
• Official 3D graphics API of the operating systems Android and Symbian• PlayStation 3
•Android 1.6•iOS for iPad, iPhone, and iPod Touch•BlackBerry 5.0 operating system series, however, only BlackBerry Storm 2, BlackBerry Curve 8530 and later models have the needed hardware•Supported for Palm webOS, using the Plug-in Development Kit•Supported by the Nintendo 3DS
•iPad, iPhone 3GS or later, and iPod Touch 3rd generation and later•Android platform since Android 2.2•Android platform NDK since Android 2.0•BlackBerry PlayBook•Chosen for WebGL: OpenGL for web browsers•Supported by various Samsung mobile phones, including the Galaxy S and Wave
![Page 11: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/11.jpg)
ANDROID 3D GAME ENGINES
• jMonkey• jPCT-AE port of jPCT to Android• Unity3D
![Page 12: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/12.jpg)
JMONKEY HISTORY
• jMonkeyEngine 0.1 - 2.0• 2003 Initial work Mark Powell (aka MojoMonkey)• 2004 January, Mark was joined by Joshua Slack• 2008 August 15,
Joshua Slack announces to step back from active development of the jMonkeyEngine.
• jMonkeyEngine 3.0• 2009, June 24 The project sees a new beginning• 2010, May 17 The first Alpha of jME 3 is released• 2011, February 14 Android Support Confirmed for jME3
![Page 13: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/13.jpg)
JMONKEY GAMES
• Nord, a browser-based MMO on Facebook• http://www.nordgame.com/
• Grappling Hook, a first-person action & puzzle • http://ghook.speedrungames.com/
• Open Wonderland, a toolkit for creating collaborative 3D virtual worlds• http://en.wikipedia.org/wiki/Open_Wonderland
![Page 14: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/14.jpg)
PREPARING THE ENVIRONMENT
1. Download and install Java JDKhttp://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Download Eclipsehttp://www.eclipse.org/downloads/
3. Download Subclipse (SVN client for Eclipse)a) Eclipse Help Install new software
http://subclipse.tigris.org/update_1.6.x4. Download jMonkeySDK via Eclipse
a) Eclipse New project Svnhttp://jmonkeyengine.googlecode.com/svn/trunk/
5. Download Apache-Ant and install ithttp://ant.apache.org/bindownload.cgia) Installation instructions: http://ant.apache.org/manual/index.html
6. Download and install Android SDKhttp://developer.android.com/sdk/index.html
7. Download and install jMonkey development environmenthttp://jmonkeyengine.org/downloads/
8. Run “ant” in the folder where jME is located
![Page 15: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/15.jpg)
JMONKEY ENGINE
![Page 16: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/16.jpg)
JMONKEY ENGINE – 3D WORKFLOW
![Page 17: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/17.jpg)
JMONKEY ENGINE – 3D WORKFLOW
![Page 18: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/18.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Low Poly Quad model - 686 quads / 1372 tris
![Page 19: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/19.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Smoothed Quad model - 10,976 quads
16 times as many quads by smoothing by 2 subdivisions.
How?
x1
x2
![Page 20: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/20.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Triangulated Model - 1372 tris (twice quads)
![Page 21: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/21.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Low Poly Quad model - 686 quads / 1372 tris
![Page 22: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/22.jpg)
JMONKEY ENGINE – 3D WORKFLOW
http://jmonkeyengine.org/downloads/
![Page 23: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/23.jpg)
JMONKEY ENGINE – 3D WORKFLOW
• After installing JME it didn’t work. Gah!
• It complained of not having NetBeans ??
• Be patient Dotti ... with smile everything is possible :)
You will probably need to download java SDK from address: http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
After that you need to add JAVA_HOME environment variable for your system.Here some links for this step:
http://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows
http://ist.berkeley.edu/as-ag/technology/howto/install-java-sdk-win.html
![Page 24: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/24.jpg)
JMONKEY ENGINE – 3D WORKFLOW
• After installing JME it didn’t work. Gah!
• It complained of not having NetBeans ??
• Be patient Dotti ... with smile everything is possible :)
You will probably need to download java SDK from address: http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
![Page 25: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/25.jpg)
JMONKEY ENGINE – 3D WORKFLOW
• This is where the fun starts…
![Page 26: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/26.jpg)
JMONKEY ENGINE – 3D WORKFLOW
After that you need to add JAVA_HOME environment variable for your system.Here some links for this step:
http://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows
http://ist.berkeley.edu/as-ag/technology/howto/install-java-sdk-win.html
![Page 27: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/27.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Watch out for spaces in the path!
![Page 28: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/28.jpg)
JMONKEY ENGINE – 3D WORKFLOW
But alas, JME is still unhappy – - possible other system preferences on my machine - I decide to move on…
I check the tutorials on the JME site to see how I need to export my Maya files to get them into JME.
http://jmonkeyengine.org/wiki/doku.php/jme3#tutorials_for_beginners
![Page 29: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/29.jpg)
JMONKEY ENGINE – 3D WORKFLOW
![Page 30: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/30.jpg)
JMONKEY ENGINE – 3D WORKFLOW
jME likes files in XML format for animated scenes so for this I need the OGRE XML Exporter Plugin
Then convert the XML files to j3o format in jME for use in jME… more installation fun…
![Page 31: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/31.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
www.orgemax.com
![Page 32: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/32.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
![Page 33: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/33.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
![Page 34: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/34.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
ERROR!!!
![Page 35: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/35.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
ERROR!!!
![Page 36: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/36.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
Copy the MLL plug-in file and paste it into the plug-in folder in your Maya directory
![Page 37: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/37.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
Program Files / Autodesk / Maya#### /bin /plug-ins
![Page 38: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/38.jpg)
JMONKEY ENGINE – 3D WORKFLOWGetting the required OGRE plugin for Maya
Restart Maya….Pray a little…
![Page 39: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/39.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
Yey!
![Page 40: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/40.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
![Page 41: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/41.jpg)
JMONKEY ENGINE – 3D WORKFLOWGetting the required OGRE plugin for Maya
http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_asset
The settings?...
![Page 42: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/42.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
![Page 43: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/43.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
![Page 44: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/44.jpg)
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
Errors on import to jME – this is why it needs to be optimized and converted to j3o format for use in JME or it produces runtime errors…
… over to the Devs!!
![Page 45: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/45.jpg)
BACK TO DEVS…
• Material image size• Ogre export file names
• Different way to import the bear– Mesh (test)– J3o (production)
![Page 46: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/46.jpg)
JPCT-AE
• Free• Small• Fast• Easy to learn
http://www.jpct.net/jpct-ae/
![Page 47: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/47.jpg)
3D WORKFLOW - JPCT-AE
• jPCT likes OBJ and MTL files
• OBJ are model files so to import an animation into jPCT we need to export an OBJ /MTL sequence from Maya.
![Page 48: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/48.jpg)
3D WORKFLOW - JPCT-AEhttp://www.creativecrash.com/maya/downloads/scripts-plugins/utility-external/export/c/obj-sequence-exporter
![Page 49: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/49.jpg)
3D WORKFLOW - JPCT-AE
Copy the script file into Documents / Maya / 2010 /scripts
![Page 50: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/50.jpg)
3D WORKFLOW - JPCT-AE
Load the script in the script editor in Maya
![Page 51: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/51.jpg)
3D WORKFLOW - JPCT-AE
Load the script in the script editor in Maya
![Page 52: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/52.jpg)
3D WORKFLOW - JPCT-AE
Execute using enter on numerical keypad / choose path / hit Export it!
![Page 53: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/53.jpg)
3D WORKFLOW - JPCT-AE
This is what you get. Sequence of OBJ and MTL files.
![Page 54: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/54.jpg)
BACK TO DEVS…
InputStream objBear = am.open("bear.obj");InputStream mtlBear = am.open("bear.mtl");Object3D[] objs = Loader.loadOBJ(objBear, mtlBear, 4f);
![Page 55: Android 3D by Ivan Trajkovic and Dotti Colvin](https://reader036.vdocuments.us/reader036/viewer/2022062405/55549b5cb4c905fd608b46ab/html5/thumbnails/55.jpg)
THANK YOU
www.dotspot.co.uk www.enginee.rs