Close Show/hide page

{zero point nine} personal experiments, etc.

Announcing "min3D", a 3D framework for Android

Why yes, that is the Earth revolving around the planet Jupiter

This post announces a 3D framework/library-in-progress I've been writing for Android, written in Java with OpenGL ES. Between the names min3d, modest3d, and llama3d, I've gone with "min3d" for being the least self-deprecating while still conveying an appropriate level of expectation that I'm comfortable with.

My aim was to make a library that required no extra massaging of model data on its way to being used by OpenGL. To that end, data can be created and manipulated directly on the ByteBuffers that are used by OpenGL, without the need for any intermediating (ie, redundant) data structures. And hopefully wrapped in such a way that's still relatively easy to use.

But this approach also imposes some important restrictions. The maximum number of vertices and faces of an Object3d is fixed after instantiation, and the dynamic addition/removal of vertex or face elements is currently not supported. If/when implemented, these operations will have to be much more costly than, say, with a linked list. But unavoidable, as far as I can tell.

Here's what's currently implemented through the API (all conventional stuff...)

  • Vertex index lists
  • Per-vertex colors
  • Vertex normals
  • Texture mapping
  • Light source (just the one, for now)
  • Camera class, with view frustrum settings
  • Object scale, euler rotation, and translation properties as expected
  • Object children that inherit parent's transform properties
  • Ability to render a subset of an object's list of faces
  • Triangle or point rendermodes (just the two, for now)
  • A few canned object primitives

Code examples showing how to actually use "min3d" in its current form can be found through the project home page on Google Code by checking out the source with SVN, and going through the sampleProjects/ directory.

In the immediate future, I'd like to be able to at least add a light manager and a 3d-file format importer, and definitely test and debug more thoroughly.

View or post a comment