Game Development Community

New to Blender. Help a guy out?

by Bryce · in Artist Corner · 01/25/2012 (2:46 pm) · 26 replies

Evenin', folks.

Starting working with Torque 3D has required me to adapt to a few things, one of which being to give up my familiarity with Constructor and start building with something Collada-friendly. I went with the free choice, Blender 2.6.1. I'm a bit cloudy as to how to properly set up with Blender to build for Torque, it seems like the GarageGames developers only care about 3DS Max at the moment.

So anyway, if someone can lay out the basics for me, I would be forever grateful:

1) Where are the options for exporting to Collada? Specifying animation properties (cyclic, start, end, etc.) and such.

2) Do I need any specific add-ons to work with Torque and Blender 2.6? For example, should I be using a different Collada exporter?

3) Am I using the right version of Blender? Or should I be using something older?

Cheers,
-Bryce
Page «Previous 1 2
#1
01/26/2012 (11:24 am)
1. There are not export options other than you need to bake your IK outputs ("Bake Action"), is only one animation thread so everything needs to be in one animation, and that Action must be the selected action during export.
2. No addons everything is in Blender. The exporter is also very advanced I think it supports Collada 1.5 or higher.
3. 2.61 is working for me. The other viable option is 2.49 with James Uruquat exporter to DTS.

If you get stuck just post more here. I can send you a blend file if it helps. I use the "bake action" command to bake IKs and constraints into the one animation I export. Once you bake your animation into an Action then you may have to manually turn off (deselect the eye on the modifier) the constraint before exporting with the Collada exporter. I had been getting strange results without doing that. I may have to tweak my own script for Blender to handle this for me if it gets too annoying.

Here is a link for some of this:
wiki.blender.org/index.php/User:Phabtar/Full_COLLADA_Animation_Support_for_Blend...

Watch the "clear constraints" setting when baking animations. It can completely kill your constraints. I am not sure you really need to do that. Also, this command is hard to find and the reason may be that it is buggy so YMMV. However, it does work, but may not be as neat as the old exporter to DTS.
#2
01/26/2012 (11:41 am)
The heirarchy setup is the same as in other programs, but uses empties as nodes.

base01
   collision-1
   detail16
   detail96
   start01
      colMesh-1
      shape96
         mesh96
      shape16
         mesh16
bounds
   boundscube

Remember it is VERY important that your objects and meshes are at xyz 0, 0, 0 or you'll get things flipped around when you export. Something which initially baffled me for ages.

Personally I use an ancient Blender 2.44 with DTS exporter 0.964 still, and only use DAE exports for PureLight.
#3
01/26/2012 (12:09 pm)
I hope I'm not hijacking this thread, but one quick follow up question for Steve. When you say that you only export dae for PureLight, what is your workflow. Do you bring the lightmapped objects back to blender and export as dts or do you go directly from PureLight to Torque?
#4
01/26/2012 (1:12 pm)
@Martin
Blender -> PureLight -> Torque ... and then ShapeEditor if I need to script meshes together for LOD.

Here's an old blog I did mentioning my workflow for creating buildings as stand-alone models (eg: I use over and over again in a level as instances) linky

I've also built entire levels in Blender in sections, sent to PL in sections, exported sections to Torque. Here's an old video of a massive level entirely built in Blender and tonemapped in PL, there's no real lighting in this vid. linky

edit:
Also the real reason that I've never updated my version of Blender is because after 2.44 they changed the animation system and I didn't to relearn it. The DTS exporter was never finalized and still has a few issues that have to be worked around but I decided to stick with the devil I know.
#5
01/26/2012 (5:34 pm)
@Steve,
I don't use empties for anything. It seems the importer T3D collada picks up the nodes just fine and they get exported by 2.61 just fine. I also do not use the hierarchy.

My hierarchy is as follows:
ABip01 - armature object
    Armature - data for the actual bones is under this armature object
    Meshes - one or more for diff LODs (just parent the mesh to the main armature object
Bounds - not parented

All of my eye, cam, mount, etc nodes are just bones that are not connected if they are independent of the animations or connected if they are to be influenced by the bone structure. I do think it is flexible enough to use regular empties for nodes as well. I just don't have to. Also, do NOT use empties for controlling IK or providing constraints. It will hose your bone structure if you do. It will let you do it, but the docs for 2.61 say not to use anything but bones for the targets. I found out after I had hosed my rig and had to go back a few versions of my blend file. Yeah, keep multiple versions!

edit:
@Steve,
You are right to wait until the new versions settled down and got finalized. I remember 2.49 being very reliable and a lot easier to use than the 2.61 work flow. So sticking with 2.44 is not a bad choice and probably saved you a lot of frustration over the years!
#6
01/27/2012 (3:01 am)
Okay, in 2.61, before you export you must disable constraints like TrackTo before exporting your cooked animation. I don't know why, but it seems to take the constraint into account. I don't know if other constraints are affected. I have a constraint on my mount0 and mount1 bone to a Copy Rotation constraint to match the rotation of my IK control bones, but it does not seem to hurt the export. Well, it kind of does. If you specifically bake in that bone then you will need to disable the constraint. If you don't bake in that bone it will be okay and need the contraint. I am not exactly sure what Blender or T3D is doing with the constraint at export or import, but I think it would be better in the long run to bake in everything, and then disable constraints, except IK. I am thinking about building a script button that does this. I already have a custom "Bake Action" button.
#7
01/29/2012 (7:50 pm)
Ah, thanks for the information! Much appreciated.

One last question. I've learned how to bake lightmaps into an image and save that image as an overlay texture for the object. I've recently learned that the lightmap needs to be in a "second UV channel" for it to be properly exported with the model into Torque. Any pointers as to go about doing such a task? I'm not finding any options with the default Collada exporter, only a window to choose where to save the model.
#8
01/29/2012 (8:58 pm)
I don't think any textures get exported. They get put into an image file if you created a new one. The image file is in a dialog for text files and images. There is a way to select the different files. From there you can save those to disk as separate files. I created a bunch of uv maps, procedural images, and the like in Blender. Then I had to save the file it produced. Collada does not contain the images, they are only referenced.
#9
01/29/2012 (9:21 pm)
Both my main texture and lightmap image are saved into the model's folder, but when placed into Torque, there are no textures; it's simply shaded grey. Do I need to set up the node structure to get Torque to recognize the textures? I can't tell what I'm missing here.
#10
01/29/2012 (9:33 pm)
Okay I hear you. Go to the material editor:
docs.garagegames.com/torque-3d/official/content/documentation/World%20Editor/Edi...

This will create a cs file that links the material to the shape and loads it into memory.

Edit:
When you are viewing your object in game you can get to this as a part of the shape stuff like animations. Does that make sense?
#11
01/29/2012 (9:37 pm)
docs.garagegames.com/torque-3d/official/content/documentation/World%20Editor/Editors/images/edit_node_properties.pngMaybe this will help. See that tab that says "Mat"?
#12
01/31/2012 (12:33 am)
Did this info get you up and going? If you want I could post a model I am working on. It is definitely not perfect by any means. Also, I am working on a script to disable specific constraints on export. I almost have it working, but the collada export operator is giving me fits. I actually crashed blender!
#13
01/31/2012 (7:17 am)
I thought I already commented here a couple nights ago, guess it didn't go through. Yes, it worked for me, thank you! Had to put the lightmap texture under "Tone Map" in the material settings from the shape editor.

#15
01/31/2012 (11:34 am)
Alright, almost excellent!

Issue: When my model has more than one material (e.g. brick wall, stone floor), each with different UV maps within blender, applying the same lightmap is not yeilding the same results. Is there something I'm doing wrong here? I don't have to make a separate lightmap for each material used in my model, do I?
#16
01/31/2012 (1:05 pm)
Disregard that, looks like I was supposed to have 2 UV maps only. One for diffuse, and the second for the lightmap.

Success. Thanks Frank!

img834.imageshack.us/img834/8363/screenshot00800001.png
#17
01/31/2012 (10:32 pm)
That looks really good. When I get time I will try and update stuff from this thread into the new T3D stuff on TDN. That way we can build a resource to answer these kinds of questions.
#18
02/01/2012 (12:34 am)
This is great - I've just started using Blender again, and have been asking myself the same questions. One that hasn't been addressed here - how do we make DSQ files? I'm going to have a lot of differerent characters using the same skeleton, so it'd be nice to just let them use the same set of DSQs for animations, but I haven't found a way to go from Blender to DSQ.

Bryce: looking great! I'm glad to know we can make use of a second UV channel. Aso, welcome to the free side ;P.
#19
02/01/2012 (12:55 am)
You had to ask the question. I happen to have asked this question already!

I have a feeling this thread is only going to get better as we keep asking these questions!
#20
02/01/2012 (6:34 am)
So from what I gather from the other thread, you'd create some sort of skeleton DAE, which contains your rig and animations, and then create all your other meshes using the same rig... then in the shape editor, add the skeleton's animations to the rest of your meshes? (Forgive me - I'm new to the T3D art pipeline and especially the shape editor!)
Page «Previous 1 2