Greets,
Well I have some exciting news as my next project at Tactel US (I'm a
software architect working on Android projects) is to start a
technology blog/tutorial site for Android. I proposed basing the first
tutorial sections on OpenGL ES and with a section on a Java port of
Quake 1 as there is very little information specifically targeting
Android, OpenGL ES, and 3D engines (let alone for desktop Java on this
topic). With a bit of good fortune this topic was approved and I'll be
providing educational tutorials on core OpenGL ES techniques and
dissect a bit of the Q1 engine and initially provide a port for the
level renderer and model loader. This will provide a kick start for
the native Java Q1 port effort and a foundation to complete the rest
of the port to Android for those inclined to do so.
Here is an overview of the sections. Note Section 3 will draw from
the NeHe tutorials that are pertinent to Q1 tech and may include new
material for Android that is not a part of the NeHe tutorials. Section
4 is on the Q1 engine and will likely contain more sections.
I'd like you guys to review this outline and let me know if there are
additional topics you'd like to see covered that fit into the general
goals of the site.
My plan is to work pretty furiously on this project and launch it by
Google I/O with at least the Q1 level renderer and model loader
completed if possible and all goes well.
Regards,
--Mike
Section 1: General Information
-----------------------------------------------
1. Android Development Setup – This tutorial describes how to set up
the Android developer environment for Eclipse and command line Ant
compilation. Links to relevant information will be provided.
2. AndroidManifest.xml – There are a lot of parameters in
AndroidManifest.xml and some that are quite useful for the life cycle
of an Android activity.
3. Timing and Control – One of the most important aspects of near real
time software development is accurate timing control. This tutorial
will cover the EGR Software / Typhon timing mechanism that will be
reused in all OpenGL examples and the Q1 engine.
4. Setting up Android / OpenGL ES – Describes the base code used to
setup the rendering context that will be used in all OpenGL ES
examples including the Q1 engine.
5. Testing capabilities of the device and OpenGL ES specific support.
6. Input control – Describes framework code that will be used to
gather input control from various sources such as the keyboard,
trackball, and accelerometer. This tutorial also covers how to setup
the standard menu system.
7. An overview of the T-Mobile G1 – Pertinent information on the G1
and HTC Magic (“G2”) will be covered in this tutorial from processor
information to OpenGL performance metrics.
8. Android 1.0 API vs Android 1.5 API – Discuss the differences
between both API versions and any ramifications on supported OpenGL ES
functionality.
9. NIO NIO NIO – Discussed Java NIO and why it is important for OpenGL
rendering and networking. Also discusses performance issues when using
NIO on Android.
Section 2: Math and Algorithms
-----------------------------------------------
1. Vectors / Matrices / Normals – Provides an overview with links to
other online material covering the basics of linear algebra including
vectors and normals and some applied information. Discussion on the
framework code that provides this functionality is discussed.
2. Coordinate systems and units – Discusses the left hand and right
hand coordinate systems and the concept of unit measurement in OpenGL.
3. Faster math shortcuts - Including lookup tables and approximations
for common functions
4. Radix Sort – A fast sorting technique useful for alpha blending
5. BSP Trees – A general introduction to binary space partitioning
trees.
Section 3: OpenGL ES fundamentals & NeHe Tutorial Ports – One demo APK
with all tutorials in finished form available for download
-----------------------------------------------
1. Tutorial 1 – Vertex Arrays & Your First Polygon –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=02
In addition to the basic NeHe lesson OpenGL ES specific information
will be covered including vertex arrays. A discussion on the various
primitive drawing modes.
Deliverables – source code for tutorial 1
2. Tutorial 2 – Adding Color –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=03
Deliverables – source code for tutorial 2
3. Tutorial 3 – Projection, Model View Matrices including orthographic
projection and basic camera functionality
Deliverables – source code for tutorial 3
4. Tutorial 4 – Rotation –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=04
Deliverables – source code for tutorial 4
5. Tutorial 5 – 3D Shapes –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=05
Deliverables – source code for tutorial 5
6. Tutorial 6 – Texture Mapping –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06
Deliverables – source code for tutorial 6
7. Tutorial 7 – Texture Filters, Lighting –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=07
Deliverables – source code for tutorial 7
8. Tutorial 8 – Blending –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=08
Deliverables – source code for tutorial 8
9. Tutorial 9 – Fonts – Provides a discussion on font rendering with
OpenGL ES and creating font textures dynamically from installed
Android fonts.
Deliverables – source code for tutorial 9
10. Tutorial 10 – Masking –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=20
Deliverables – source code for tutorial 10
11. Tutorial 11 – Bump-Mapping, Multi-Texturing & Lightmapping –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=22
In addition to covering the standard NeHe lesson lightmapping will be
discussed as part of multi-texturing.
Deliverables – source code for tutorial 11
12. Tutorial 12 – Alpha Blending / Alpha Testing / Sorting –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=32
Deliverables – source code for tutorial 12
13. Tutorial 13 – Billboarding – Billboarding is one of the most
crucial techniques to use to fake 3D shapes and allow for better
rendering performance. Discusses the different types of billboarding
and the math behind it.
Deliverables – source code for tutorial 13
14. Tutorial 14 – Point Sprites – Covers point sprite functionality
and limitations with the G1.
Deliverables – source code for tutorial 14
15. Tutorial 15 – Particle Engine Using Triangle Strips –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=19
Deliverables – source code for tutorial 15
16. Tutorial 16 – Bounding Geometry / Basic Collision Detection /
Picking –
Deliverables – source code for tutorial 16
This tutorial will cover basic bounding geometry including AABB, OBB,
Sphere, Cylinder, Plane geometry primitives and collision detection
between the various types and finally a picking example.
17. Tutorial 17 – Advanced Picking w/ Touch Screen Interaction – The
orientation of 3D objects on screen are not coordinated with touch
screen interactions. This tutorial discusses how to find the
orientation of a 3D object and adjust picking accordingly.
Deliverables – source code for tutorial 17
18. Tutorial 18 – Frustum Culling – Discusses how to create a frustum
which defines the viewing area. Tricks are necessary to complete this
with Android / G1. Once a frustum is defined the first level of
culling optimization is to remove objects that are not within the
frustum.
19. Tutorial 19 – Vertex Buffer Objects –
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=45
Defines the fastest way to render vertex data.
Deliverables – source code for tutorial 19
20. Tutorial 20 – Time based state management / animation – This
tutorial discusses animation and the importance to base all animation
on time.
Deliverables – source code for tutorial 20
Section 4: Quake 1 Java Source Port – A demo APK will be available on
the market.
-----------------------------------------------
1. Historical background on Quake 1 – Discusses the state of computer
graphics / OpenGL in 1999 when the Q1 source was released.
2. Q1 level loader – Discusses the data structures and loading process
to read in Q1 data
3. Q1 level rendering – Discusses rendering a Q1 level including
applications of frustum culling, state sorting, and other pertinent
optimization techniques including how BSP trees play a major role in
culling out unseen surfaces.
4. Q1 model loading / rendering / animation – Discusses rendering a Q1
model and animation capabilities possible
5. Q1 collision detection – BSP trees are used in both rendering
optimization and collision detection. This tutorial will cover how to
do collision detection with BSP trees and the bounding geometry
primitives
6. Basic player movements – Running, jumping, stair climbing,
strafing in 3D and the necessity to do smoothing of trackball input to
accomplish circle staffing.
Further topics TBD