Android 3D by Ivan Trajkovic and Dotti Colvin
-
Upload
swengineers -
Category
Technology
-
view
2.115 -
download
0
Transcript of Android 3D by Ivan Trajkovic and Dotti Colvin
ByIvan Trajkovic
andDotti Colvin
ANDROID 3D
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!
INDEX
• Android Platform• Open GL• Android 3D Game Engines• 3D Workshop
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)
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
ANDROID ARHITECTURE
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
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
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
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
ANDROID 3D GAME ENGINES
• jMonkey• jPCT-AE port of jPCT to Android• Unity3D
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
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
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
JMONKEY ENGINE
JMONKEY ENGINE – 3D WORKFLOW
JMONKEY ENGINE – 3D WORKFLOW
JMONKEY ENGINE – 3D WORKFLOW
Low Poly Quad model - 686 quads / 1372 tris
JMONKEY ENGINE – 3D WORKFLOW
Smoothed Quad model - 10,976 quads
16 times as many quads by smoothing by 2 subdivisions.
How?
x1
x2
JMONKEY ENGINE – 3D WORKFLOW
Triangulated Model - 1372 tris (twice quads)
JMONKEY ENGINE – 3D WORKFLOW
Low Poly Quad model - 686 quads / 1372 tris
JMONKEY ENGINE – 3D WORKFLOW
http://jmonkeyengine.org/downloads/
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
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
JMONKEY ENGINE – 3D WORKFLOW
• This is where the fun starts…
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
JMONKEY ENGINE – 3D WORKFLOW
Watch out for spaces in the path!
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
JMONKEY ENGINE – 3D WORKFLOW
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…
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
www.orgemax.com
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
ERROR!!!
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
ERROR!!!
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
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
Program Files / Autodesk / Maya#### /bin /plug-ins
JMONKEY ENGINE – 3D WORKFLOWGetting the required OGRE plugin for Maya
Restart Maya….Pray a little…
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
Yey!
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
JMONKEY ENGINE – 3D WORKFLOWGetting the required OGRE plugin for Maya
http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_asset
The settings?...
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
JMONKEY ENGINE – 3D WORKFLOW
Getting the required OGRE plugin for Maya
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!!
BACK TO DEVS…
• Material image size• Ogre export file names
• Different way to import the bear– Mesh (test)– J3o (production)
JPCT-AE
• Free• Small• Fast• Easy to learn
http://www.jpct.net/jpct-ae/
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.
3D WORKFLOW - JPCT-AEhttp://www.creativecrash.com/maya/downloads/scripts-plugins/utility-external/export/c/obj-sequence-exporter
3D WORKFLOW - JPCT-AE
Copy the script file into Documents / Maya / 2010 /scripts
3D WORKFLOW - JPCT-AE
Load the script in the script editor in Maya
3D WORKFLOW - JPCT-AE
Load the script in the script editor in Maya
3D WORKFLOW - JPCT-AE
Execute using enter on numerical keypad / choose path / hit Export it!
3D WORKFLOW - JPCT-AE
This is what you get. Sequence of OBJ and MTL files.
BACK TO DEVS…
InputStream objBear = am.open("bear.obj");InputStream mtlBear = am.open("bear.mtl");Object3D[] objs = Loader.loadOBJ(objBear, mtlBear, 4f);
THANK YOU
www.dotspot.co.uk www.enginee.rs