Game Development Community

dev|Pro Game Development Curriculum

Dynasoul[03]: Blender 3D -> Torque 3D

by Dynasoul · 05/14/2014 (11:49 pm) · 8 comments

Hey guys it's us again! Today we'll be talking about how Nocturne Rain is progressing and in particular how we went about passing an important milestone in this game creation process: Transferring a fully rigged, animated, UV Textured, and clothed model from Blender 3D into Torque 3D.

Our story continues from our last post, in which we talked about the importance of concept art and its role in helping solidify your ideas for future reference as well as to use as a base to improve upon. How can you improve on something without standing on the shoulders of those who came before you? How can you improve your art or your designs if you don't have a base to work off of?

Concepts lay the groundwork for success by allowing you to see what needs fixing. In our last post you may had noticed we had two characters modeled. We have been rigging these two characters and have completed the prototype of the male playable character.

s27.postimg.org/9kg05p78z/Blogpost_3image1.png

As you can see we also modeled a quick t-shirt and and a pair of pants so that our friend here isn't exposing himself to the world; for now at least.

i.imgur.com/LTMJbQH.png?1
this was a hilarious accident we stumbled upon while we were learning to model and texture clothing! Hahaha

After rigging this character we worked on animating a simple breathing cycle. Then we needed to figure out the proper workflow for exporting this rigged and animated model in a format that Torque 3D can interpret. Ever since T3D became open source there was a transition towards using the collada format, indicated by an exported model with the extension '.dae' which stands for Digital Asset Exchange. This file format uses xml to describe the model and the model's properties. You can actually open a .dae with your text editor of choice and see a human readable representation of the model!
Coincidentally Blender 3D had a recent overhaul to the Collada exporter that seems to have fixed many of the issues plaguing B3D users trying to export to T3D. It turns out that we had to do one last step before exporting the model and that was to setup the proper hierarchy in blender's outliner, or as its referred to in the game engine, nodes.

We have yet to build a complete reference for ourselves over what all the nodes mean, perhaps someone here can point us in the right direction?
At the most I have cobbled together some info on getting a collision bounds working fine but the LOD "level of detail" stuff is still something we have to figure out.

s8.postimg.org/x2ypvp5t1/blogpost_3image2.png

Notice how it is ordered. At the top of the hierarchy you find 'base01'. This first section allows us to add some properties that define how the object is interpreted in T3D. In order to create this we just create an 'Empty' in Blender and name it to 'base01'.
I wonder if there is an updated list somewhere of all the possible properties. It seems like no matter what you're exporting you should always name the root of the hierarchy 'base01' as its what T3D looks for first to determine whether to import the model using its detailed naming conventions or to load the model in a more generic fashion leaving the properties to be defined manually in-engine by the developer.

The second section is name 'start01', this is where you put the actual objects and armatures. Notice how the armature is not parented to the main model it's deforming, it is separate, but still effects the character's vertices. We also see the shirt and pants.

We would like more information on the layouts, I'll add the info into the post with credit. Don't know if there's a situation where there is a 'start02'.

To export we simply select 'base01' in the hierarchy and go to file > export and select collada. On the bottom left are the export options. Make sure 'export selection only' and children is selected, this way it exports everything under 'base01' without exporting other things like cameras, lights, and B3D specific objects. Also make sure to export UV textures and armatures.

You would export this to your project's folder under 'core > art' it will then be shown in T3D's file selector as shown here:

s28.postimg.org/o6hl7l07h/Blogpost_3stepbystepcolladaexport.png

A menu pops up, at the moment we're ignoring the options and just hitting okay after confirming the info and, that everything looks alright with the animation frames and models.

And viola!

https://lh4.googleusercontent.com/4aR0WaRPKhCgoewH6snP8iZshqjc_W6-D03pb15uDA=w600-h337-no

That will be all for now, thank you for reading!
Adios, until next time!

@Dynasoul

#1
05/15/2014 (6:18 am)
I like the picture with the XXXL shirt :) good blog!
#2
05/15/2014 (6:56 am)
Thanks for the detailed rundown - this has been missing for a long time!
#3
05/15/2014 (7:31 am)
Great blog. Fantastic to hear you're getting on and getting stuff done. Inspires me to try once more to get a character into the engine!
#4
05/15/2014 (12:24 pm)
Just make LOD meshes and name it body200 body150 body100 (you can use name of your choice) and so on. Then use the shape editor in T3D to set the LOD.
#5
05/15/2014 (3:26 pm)
And just in case it's useful to anyone, here's my old workflow on Blender DAE to Torque3D.

farm4.static.flickr.com/3262/3972904908_781d062598_o.png
#6
05/15/2014 (5:32 pm)
@D Fasel, Nice! We were laughing for a good while after my girlfriend showed it to me. She had modeled it on its own blend file and when she imported it on his body it perfectly overtook his entire body with his head popping through. That expression! Also thank you for the LOD info, this will help us immensely in the future.

@Richard Ranft, We found your post while searching Google on how to use Blender with Torque and are glad that our post can clarify to some extent what you were wondering.

@Daniel Buckmaster, We're happy to have inspired you to create characters once more!

@Steve Acaster, Thank you for the image, we will save this and use it as our reference for organizing the nodes. What is the difference between shape96 and detail96? What does the number at the end represent, including detail16. Thanks!
#7
05/15/2014 (6:45 pm)
@steve
Why you have "shape 16" not under start01 where it belongs and what you need 4 collisionmeshes for? And bounds I also never used so far. And the "01" behind base and start is also not necessary.
#8
06/21/2014 (2:39 pm)
Dynasoul, The numbers 16 and 96 in Steve's image are the Level of Detail for those respective meshes, they can be modified at any time through Torque's shape editor in case the values are off.