Spore Creatures
The latest spore patch added a “Cheat” to export creatures to Collada. I started playing around with it.
Export a Creature
To export a creature to collada, you have go into the creature editor and bring up the cheat console. (Strg-Shift-C) and type in colladaexport. The first time you have to accept the EULA. The path for the exported creature is shown in the console.
Importing a static mesh
I started with a creature I had made before. I just exported it and got a 5.3mb colllada file plus a diffuse, normal and specular texture. I now started to import it into the various 3d packages I have access to, but I couldn’t get it into Blender at all. In the Softimage Mod Tool it looked better but just the mesh was imported. It has lost the uv mapping and rigging information, yes the creatures are also rigged, when exported. Which makes it especially interesting.
So now it just tried to export it as .fbx using the 2010.0 FBX Converter. The conversion was successful without any warnings or errors.
So just added it to a xna project and the pipeline imported it. When rendering the model I got this result.
The model is imported correctly, just the texture is missing. SO I had to manually set the diffuse texture and everything looks like it should look.
I tried it with all kind of creatures and everything worked great.
Importing as skinned mesh
As I said before all exported creatures are completely rigged, so I now tried to import and render the meshes as skinned meshes. But as I opened the collada file to see how many bones a creature has, I was a little bit shocked. This mesh had 192 bones.
So I created a new mesh, a lot simpler with just 52 bones. This is ok. My existing skinning solution supported up 80 bones.
I just imported it and everything worked, without any problems. You can see the skinned model below on the left in the bind pose and on the right with a big toes, just one bone scaled up.
More complex creatures
But now back to my previous test creature, which has 192 bones. But this creature isn’t the most complex you can build in spore. After some more testing I had to see that creature can get a lot more than 200 bones. The Question, how should I handle those large number of bones? Implement a mesh splitting algorithm or do the skinning on the CPU?
I decided to choose the CPU way, after I couldn’t find any resources about a mesh splitting algorithm on the web.
I just want to play with the creatures for now, if the performance would be to bad I always could go back and implement skinning on the GPU at a later time.
Current State
I have now implemented skinning on the CPU and I’m able to import and use every creature from the spore universe.
What’s next?
Next step is to implement the creation of animations directly into xna, as I’m not able to get the creatures into any other 3d package I own.
This will be an interesting experiment to get this working.
