Game Development Community

T3D Collision mesh, shaders, animations

by Nicolas Esposito · in Torque 3D Professional · 01/13/2010 (5:13 pm) · 4 replies

Hi all,

I'm doing lots of experiments with T3D, but there are a couple of things that are not so clear...

- I need to have collision for all the meshes ( or almost ) in my scene, I'm using Softimage 2010 and I downloaded the DTS plugin and I followed the tutorial, but I can't import my meshes into T3D, because when I try to export I always get the same error "Error during export, please check the dump file", and even if the "show dump file" is enabled nothing happen...a videotutorial will be a good way to explain it properly :)
So I'm using Collada ( .dae ) to import all my geometry into T3D, but is possible to enable all my meshes as a collision? I mean, one I imported a mesh into T3D is possible to use the same mesh as a collision doing the setup inside T3D?

- I'm a bit confused about the shaders...right now with the material editor I'm able to import diffuse, normal, specular textures, but what if I need to use a certain shader? for example, I would like to use a couple of shaders that I downloaded from the Nvidia website ( plastic, shiny metals and so on ), so what I need to do to use these shaders inside T3D? can I directly apply a shader to a model or what? sorry about this question, but with previous engine I just create a shader ( with diffuse, normals, specular and some effects, like fresnel ) and just drag&drop on my mesh.

- I have a couple of animations to set in my scene, mostly are opening doors/windows. I saw that I can export my animated mesh with Collada, but there is the possibility to do the animation directly inside T3D? and if so, is possible to trigger the animation by clicking on the mesh? I need to script this or is quite simple?

Thanks!

About the author

Formerly a design engineer I'm developing a real-time visualization showroom that can be used in many business area....but still my secret dream is to make videogames!


#1
01/13/2010 (5:41 pm)
First off: a dump file will be placed right next to your project file if an export fails. So, if you fail to export "SimpleBox.obj" or whatever, look next to that file in the folder and it should have a dump.dmp file.

Open it in a text editor to see what's wrong, or post the contents in a thread like this and people can help you figure it out.

You can enable polysoup collision by changing the collision type from "Collision Mesh" to "Actual Mesh" or something like that in the physics tab of the object. I can't remember the actual choices, but there are 3, and it's a drop down box.

Complex shaders need to be manually edited/created in the materials.cs file. I have not done much work with it, but that's all I know right now. you can't create new ones from the editor, I don't think.

In the Shape Editor, you can try to add a new animation (called a "Sequence") for your door. From there you can see the timeline where you can add keys etc. and add a simple animation to it.

I suppose you could do a ray cast from your Eye Node, and if it collides with the door, play the animation.

Again, I don't know the syntax of these things, so you'll have to either do a lot of method dumping (obj.Dump();) or ask people here for specifics.
#2
01/14/2010 (1:03 pm)
I didn't notice the collision tab at all, my fault :(, but the bound option seems to work quite well...

About editing the files...well, I really would like to have something that can be done within the Editor rather than open the material.cs...I saw that for the PostFX Sven Bergström did a really nice GUI to control the fx settings, so is possible to do something like that?
#3
01/14/2010 (6:46 pm)
Well, you would have to WRITE a GUI to avoid writing a material shader. Here's a cat: skin it.
#4
01/18/2010 (1:26 pm)
Mmmhh, looks something quite hard for someone who always work with 3d stuff rather than scripting/coding...well, I hope that in the 1.1 release there will be something more handy than editing manually the material file...

Anyway I was experimenting something with a scene that I previously did in Softimage and exported into pureLIGHT, everything is fine, except that the scale of my meshes are completely wrong...so I select every single mesh and I try to scale everything up....but nothing happen...I mean, I can scale a single object at the time, but it doesn't work with multiple objects...I tried changing from world transform to object transform, but still the same problem...
Any suggestion, or I have to manually scale each object?