Brace yourselfs, new 3D API incoming

Xoppa, Bach and I have been working on a new 3D API, with short breaks (cause iOS…). We are now in full swing of finishing that puppy. You can follow the progress in this thread. Lots of design discussions have been had, we are trying to make the API as simple to use as SpriteBatch, while giving you as much flexibility as possible. Here’s a taste of what it looks like working with this thing at the moment:

You can find the full thingy on the new3dapi branch. I spare you the details for now, once we merged with master i’ll give you a full wiki article on all things 3D. Here’s a quick rundown of the features we are aiming for:

  • flexibility and small API über-alles
  • OpenGL ES 2.0 only for now, the API is flexible enough for you to write a GLES 1.x shader should you need that
  • Format support: FBX converter, based on Gameplay SDK. Spits out custom format more suitable for runtime consumption. Provides us with the best coverage of modelling apps. Bach’s been slaving away on this in January and its pretty much complete, save for some modelling app specific issues.
  • Modelling app support: the FBX converter is a standalone app, that’s really simple to wrap as a plugin for modelling apps. We’ll initially provide an addon for Blender, but will also try to get Maya, Softimage and 3DSMax going. Writting a plugin yourself by wrapping the converter should be extremely simple as well, much more so than writting a full-blown plugin.
  • Models, Instances and ModelBatch: models are the templates holding meshes, node hierarchy and materials. The Model is the one responsible for disposing meshes/textures, in a single place, which makes asset managment really easy. A model is analogues to a TextureAtlas/Texture/TextureRegion when working with SpriteBatch. You don’t directly render/animate a model, but create instances from the model, which share the meshes and textures. This allows you to modify materials and the node hierarchy of an instance without destroying the originals in the model. Think of instances as Sprites in the 2D analogy, you can modify it without touching the texture it may share with other sprites. Finally the ModelBatch (name change pending) allows you to render instances (it’s more flexible than that, but more on that another time).
  • Animation: skeletal animation (GPU only) and keyframed animation (ala MD2, GPU only)
  • Materials: flexible, and customizable. We try to support as many material attributes out of the box as possible.
  • Shaders: we’ll provide an über-shader that includes lighting, skinning and keyframe interpolation. You can plug in your own shading easily.

The goal of the API is to be as flexible as possible. We will likely not provide everything but the kitchen sink out of the box, but continuously add new features over time. Our biggest concern has been to make this as flexible as possible, while retaining a minimal API that’s easy to use and extend. I think we achieved that goal. What’s left to be done:

  • AssetManager support (really simple due to our data model)
  • Update current tests and demos, especially gdx-invaders. The bullet tests already use the new API on the branch
  • More comprehensive default shader
  • Node based animation
  • Skinning
  • Keyframed animation
  • Optimizations
  • Documentation

That may look like a lot, but the API design is actually what takes the most time. That’s pretty much done now, safe for some minor modifications here and there. The rest should be comparatively “easy” (yeah, i said it…).

The old API will disappear completely when we merge the new3dapi branch with the master branch in a few days

Updates to Box2D Wrapper

I just updated the Box2D wrapper to the latest C++ version. See the CHANGES file for what changed. There’s a new joint which i don’t expose in our JNI wrapper yet, because there’s no equivalent in the GWT emulation (motor joint). There are also new methods in body/join called shiftOrigin which aren’t exposed either yet.

The only breaking change was the addition of a new boolean parameter called wake to all the Body#applyXXX methods. This parameter controls whether the body should be awoken when applying the force/impulse/torque.

Nightlies will be ready in an hour from now. Enjoy.

In other news, as you can see, i can’t really go on a break, for whatever f’ing reason. I’ll try so again next week. The red shirts on the forums and the folks on IRC will be at your service in the meantime, as always.

Google Summer of Code Application Submitted

Just submitted our GSoC application. Here’s our GSoC team:

  • Admins: Badlogic, Nex
  • Mentors: Xoppa, Noblemaster, Nex, Bach, Tamas, Nate, Badlogic
  • Potential Mentors: Arielsan, Ruben, Davedes (guys if you read this get back to me :D))

Our full application form can be found here. We have one more week to modify it before the application period ends. We can also modify our idea list until the end of this week. Any feedback and additional ideas welcome!

Students, if you want to get a headstart, read this. It contains a few simple steps to get you up and running. Feel free to discuss your applications with us before you submit them.