Newbie question - importing own objects in the TorqueWorldEdito
by kklex05 · in Torque Game Engine · 04/27/2008 (5:16 am) · 6 replies
Hey,
I absolutly new within the whole Torque stuff. For a study project I need to build something with Torque and now I'm 4 full days on it and still very confused. My questions are very basic, but I really tried to figure out by myself but without sucess. Maybe you can answer me in some sentenses.
First I would like to bind in a new objects, lets say a simple Sphere, in my already existing world in the Torque World Editor. I saw that 3dimensionals objects are .dts or .map. Am I on the wrong way if I would like to build it with the Torque Constructor?! I didnt find any posibility to export the things in .dts and .map troughts a exception in Torque ("wrong Torque version" - I have a educational version).
So, again, how to bring in my world a selfcreated object?
Second, I would like to move the object in a physically way. (Basically - lets say in falling with a gravitation)
I got it that I have to write a script. But on which position.. and is there any automatically physic?!
I know there are very basic question, but maybe you know a tutorial for these things. The tutorials I made till now, didnt help me to answer the questions...
Thanks
I absolutly new within the whole Torque stuff. For a study project I need to build something with Torque and now I'm 4 full days on it and still very confused. My questions are very basic, but I really tried to figure out by myself but without sucess. Maybe you can answer me in some sentenses.
First I would like to bind in a new objects, lets say a simple Sphere, in my already existing world in the Torque World Editor. I saw that 3dimensionals objects are .dts or .map. Am I on the wrong way if I would like to build it with the Torque Constructor?! I didnt find any posibility to export the things in .dts and .map troughts a exception in Torque ("wrong Torque version" - I have a educational version).
So, again, how to bring in my world a selfcreated object?
Second, I would like to move the object in a physically way. (Basically - lets say in falling with a gravitation)
I got it that I have to write a script. But on which position.. and is there any automatically physic?!
I know there are very basic question, but maybe you know a tutorial for these things. The tutorials I made till now, didnt help me to answer the questions...
Thanks
#2
Very cool. Thanks. Is there any tutorial about the physical effects that I can add?!
04/27/2008 (11:32 am)
I will try it with Blender.. but that is the function of the Torque Constructor?Very cool. Thanks. Is there any tutorial about the physical effects that I can add?!
#3
04/27/2008 (12:17 pm)
With which other tool I could do a dts export? Cause I think Blender is a little confusing. I worked with Maya and Cinema4d... is there also a exportation tool?
#5
there is deffinetly a DTS exporter for Maya. and if you do a site search im sure you can find exporters to applications that aren't listed in the TDN flowchart (i know iv seen a exporter for Hudini for instance).
If you are using a school license of Torque, im sure your teacher can tell you wether or not they have a DTS exporter installed on any of their modeling software.
04/27/2008 (2:41 pm)
Constructor is used to make large static shapes, like buildings etc.there is deffinetly a DTS exporter for Maya. and if you do a site search im sure you can find exporters to applications that aren't listed in the TDN flowchart (i know iv seen a exporter for Hudini for instance).
If you are using a school license of Torque, im sure your teacher can tell you wether or not they have a DTS exporter installed on any of their modeling software.
#6
Also, excellent post, Dan! That's was awesome!
04/27/2008 (4:12 pm)
Just thought I'd note: the Houdini exporter is in beta right now, and the XSI one has been in beta for a while. Not sure where it's going.Also, excellent post, Dan! That's was awesome!
Torque 3D Owner Dan Keller
Default Studio Name
To get it to show up in the editor, just put it in the \data\shapes folder and it will be up under StaticShapes.
To use physics, create a file called rigidShape.cs in the \server\scripts folder. Add this to the file.
datablock RigidShapeData( Boulder ) { category = "RigidShape"; shapeFile = "~/data/shapes/rocks/boulder.dts"; //change this to your shape file emap = true; // Rigid Body mass = 20; massCenter = "0 0 0"; // Center of mass for rigid body massBox = "0 0 0"; // Size of box used for moment of inertia, // if zero it defaults to object bounding box drag = 0.2; // Drag coefficient bodyFriction = 0.2; bodyRestitution = 0.1; minImpactSpeed = 5; // Impacts over this invoke the script callback softImpactSpeed = 5; // Play SoftImpact Sound hardImpactSpeed = 15; // Play HardImpact Sound integration = 7; // Physics integration: TickSec/Rate collisionTol = 0.1; // Collision distance tolerance contactTol = 0.1; // Contact velocity tolerance minRollSpeed = 10; maxDrag = 0.5; minDrag = 0.01; triggerDustHeight = 1; dustHeight = 10; dragForce = 0.05; vertFactor = 0.05; normalForce = 0.05; restorativeForce = 0.05; rollForce = 0.05; pitchForce = 0.05; }; // Hook into the mission editor. function RigidShapeData::create(%data) { // The mission editor invokes this method when it wants to create // an object of the given datablock type. %obj = new RigidShape() { dataBlock = %data; }; return %obj; }Then, in game.cs, after all the other execs, add
exec("./rigidShape.cs");"Boulder" will show up in the mission editor creator under Shapes/RigidShape/.