For starters, I’m typing this on our family’s new MacBook. Well, it’s not new, my brother upgraded and was generous enough to pass it down to me, but my wife’s PC is about 5 years old, and this MacBook could easily replace it.
Besides that, I’m feeling like I’ve done all that I really need to with Blender for now, and I’m trying to make my push back into Android dev. Hell, now that I have a Mac, I might even take a shot at both Android and iPhone… who knows? Anyway, I’m working on some of the meat, so you could say, and things are going well. Here’s where I’m at so far:
1. Modeling in Blender is going very well. I’ve learned far beyond what I need for Android and plan to revisit Blender now and again for sure, especially to play with LuxRender.
2. Blender exports to OBJ, but there was one primary issue. OpenGL ES 1.0 only allows triangles. When converting Quads to Triangles, the Normals (the vectors that control the way light is reflected) are somewhat messed up, causing diagonal streaks across what should have been flat quad surfaces. What I ended up doing, was writing a quick C command line app that would take 2 OBJ files, one as modeled and one triangulated, and use all of the correct normals from the first file in the triangulated one.
3. The other issue with OpenGL ES that was new to me, was that it did not use glBegin and glEnd as a way to list vertices. Instead, entire arrays of vertices, normals, colors and or texture coordinates are given to ArrayElement functions. You can also shorten the amount of memory used by creating indices for sets of vertices that share a normal and texture coordinate, which thankfully with smooth surfaces is quite a few of them. This lead me to write a second command line app to take the final OBJ file and output binary files containing each of these arrays.
4. With those binary files, I’ve been able to add them as assets to the Android package, open and read them in and create the necessary game arrays and then finally draw them on screen, complete with texture.
TODO:
1. Review and complete a method to load files from the package from within JNI code.
2. Plan out how to take model pieces (like wall segments) and load them out based on some kind of level map.
3. Fix the normals where the things like wall segments meet.