Game Development Community

A backwards Dae file...

by foribiteu · in Collada Test · 02/16/2012 (11:28 pm) · 10 replies

I just got some mounts for my game here:
www.3drt.com

I was soo excited, I quickly fired up Torque 3d and start to work hooking the wolf up to Universal AI Starter (Shame less plug for the program I love it). Not knowing much about Dae files it took me a while to figure out how to do the animations in T3D, but soon I had it in the game. I set back to admire my work it look sooo wonderful standing there, until I had it follow me. To my surprise it came at me rump first!

What I am wondering is there a very simple way to turn it around? Just thought I would ask before I started ripping my hair out trying to do it my self... LoL

#1
02/29/2012 (5:41 am)
Open the file in Blender or something and turn the model around 180 degrees? That's my best guess.. I'm nowhere near an artist.
#2
03/06/2012 (10:49 pm)
That is what I thought but I am not an artist to and so far I have had no idea what I am doing... it is not like the animations or wrong or any thing, it looks normal in game. It just when I load it up with Universal AI Starter Kit it takes off butt first. I was hoping there was something I could just set in the .cs file to crank the puppy around. LOL..
#3
03/09/2012 (8:24 am)
Just a thought, your Y axis maybe backward, Torque has to have the Y Axis pointing into the screen, Philip maybe right about it being backward!

It's strange to think but if the axis are 180 deg from what Torque expects then your model will load into the game backward and you have to Rotate it around to fix it, no problem for Static items like a box, but for animated movable objects like cars or people if you tell Torque to move it forward, it moves the objects axis in the positive Y direction, if your model was exported facing the -Y axis then it would run/move backward because model coordinates and World coordinates are not matching up.

I think you should try to rotate it 180 deg on the Y axis (not ON the Y that would flip it upside down!), you would rotate on the Z axis to make it face the correct Y axis. Z is up/down like a pole threw your model so it would be the rotating axis for a ground plan model.

I would love to know what modeling package you used and how you got your animations exported to Torque. I am starting a Video Tutorial site dedicated to Learning Torque.

(If my info is incorrect or wrong PLEASE correct me!)

Thanks!
Mike
#4
03/09/2012 (9:43 am)
Sounds like you hit the problem on the head. Now to find an easy way to fix it is another story, LOL. Right now our game is in the (for the lack of a better word) in the proto typing phase. So we did not make these models these are pre-made caned models. My normal move would be o well use another place holder for now until we work out the modeling work flow, how ever these are mounts and we do not have other mounts that we can use for now. What I was hoping there was, a simple one line that we could add to the mounts.cs file to rotate the thing around or just plug it in to X program, do this, save.

If there is not a simple fix we may have to move the modeling work full up.
#5
03/12/2012 (12:22 pm)
you maybe able not sure not an expert, but you maybe able to edit the models DAE file, it's just XML code and word can open it.

Give me an hour to see if I can edit the DAE code to rotate the model in it. (I am NOT familiar with Collada but I'll try to do it!) LOL.

Mike
#6
03/12/2012 (1:45 pm)
Well I tried, LOL, but I couldn't fix the problem.
I was able to flip the Torque Solder DAE model in Blender 180 deg so
now when loaded he is facing the wrong way like your Models do, but when I tried to play animations he In-Plodded on himself into a ball of arms and legs! Yuck, nice death scene though.

After looking and thinking it was the animations that killed him, see the model exported OK! The bad side the animations where created with the "Correct" model and now they no longer match the X,Y,Z Axis exported with them, to the Backward Model so it tries to play the animation but the vertexes crumble into a ball and he just lays there and twitches, like I said cool death animation but not useful for you!

You would have to take the models Collada/DAE file,
(copy file to safe place first never edit originals!)
import it to Blender, rotate it on Z axis 180 deg to flip it, then export as Collada file with same name if wanted, THEN make NEW
animation files or attach files to the new model in something like Plastic? Not sure if it adds animations but anyways that is what you would have to do to correctly associated the animations to the Proper Axis in the Model. Make sure to delete the Camera and Light from Blender Scene first before Import so as not to add useless junk to your export.


Work, I know but sorry I don't know anyway to do it.???

Hope I helped some,

Mike
#7
03/12/2012 (1:53 pm)
Oh BTW can you tell me one or two of the models you got so I could check them out?

Mike
#8
04/27/2013 (8:13 am)
just open up the model in the shape editor and rotate the base node 180 in while in the rest rest/ambient position.
#9
04/30/2013 (8:17 pm)
^The above 'may' not work depending on how the animations are setup with the model. If you run into that problem try the below:

You can do this in the Shape editor within the engine:

+) Open your model in the Shape editor
+) Make sure 'Show Nodes' is enabled
+) Create a New Node
+) Click on the the other Node(s) in the model
+) Set the Parent Node to your New Node
+) Click on your New Node and rotate as needed
+) Save the model

You should be good to go.
#10
03/25/2015 (4:15 pm)
I am actually kind of amazed that T3D can do this :O)

Awesome to know if any mistakes are made in the future :O)