[LibGDX] Creating 2D Animations with Blender

So I’ve decided to use Skeletal animation techniques for a game. My artists use a plethora of different tools(GIMP, Paint.NET, Photoshop) to create sprites.

We then tear apart the sprites, create bone structures in Blender in a pseudo 2D environment(Basically just ignoring the z-axis), and animate them. We import the images using the “Import Image as Planes” add-on within Blender.

Now here is my question, how would I go about importing these into LibGDX. I know that LibGDX has tools for importing Blender models and animations, but I’m not sure if these will work with a 2D animation from it.

So is there some way to import these into LibGDX already, or will I need to manually export bone structures and animations to something like XML and read it in myself?

I’m not very familiar with blender and I cannot really answer your question. But have you thought about using spine2d? Maybe this could be an alternative to blender.

http://esotericsoftware.com/

Spine is made exactly for this and it also provides a runtime for libgdx (and many other game libraries), which lets you integrate your spine animations with some lines of code into your project. It costs a bit (not sure what you pay now), but it’s definitely worth it, if you plan to do much animated content.

First thing, if your artist is not familiar with blender then I’d just use spine2d, anyway back to your question…

Yes blender will work for 2D animation, just create the 2D animation and export to .fbx then you can convert to .g3db. Then you can load it.

you can check out http://blog.xoppa.com/ for more info. He does 2D animation in blender so that could be useful.

Just use Spine. http://esotericsoftware.com/

Unfortunately I’m not able to use Spine. We’re using only open source software for most of our projects.

I’ve looked into Blender, and it seems that importing models and rendering them with ModelInstance and ModelBatch like normal, with just a Z-value of zero then using an OrthographicCamera instead of Perspective will work perfectly fine.

Runtimes are open source tought. Why such restriction for used tools?

We want to have it be very moddable by a community. So we want all of the tools we use to be available to them. If we used Spine our animation technique wouldn’t be freely available to everyone, with Blender, it is.

I’ve used Spine before and I do agree that it’s wonderful, however it’s not open source or free.

This technique also does have some advantages, we can create 3D models of everything, then render them as 2D, which would allow us to easily show them from a different perspective without drawing another Sprite, and it would allow us to easily mix 3D and 2D elements into the same environment.

Modding support make sense. In our up coming game Hardland we also allow modding and we use blender based art pipeline for same reasons.

Modding support with Spine is fine, everyone just needs to buy Spine! :wink: :smiley:

Is your game 2D? I’m working on my system for rendering Blender models and stuff in 2D. I’ve got the animation and everything going good with it. However I’m having a few troubles rendering them. I’m not quite sure how to load in a .obj or .fbx if it’s converted and render it in 2D with an OrthographicCamera. Something is always messed up with it.

Does anyone else have any experience with this?