Game Development Community

Collada Wheeledvehicle Max Sample?

by Jorge Luis Gandulfo · in Torque 3D Professional · 11/10/2009 (11:33 am) · 7 replies

Does somebody have a 3D max that can be exported into a working collada vehicle?

I been trying for days now, tested the buggy model and another model i have with no springs or anims to make it simple.

It always crashes because collada don't export the Col-1 Object if its hidden, if i don't make it hidden it still crashes.

I tried all now, readed all the posts about collada vehicle errors, and i don't know what else to try.

Used Open Collada today to test if it would change anything but its still the same.

If i see this models i have in the Shape Editor they look ok and have all the required nodes, hubx, mountx, etc.

In the debug mode the error have to do with the collision object in the PreLoad function of the wheeled vehicle.

If nobody have any sample, is there any tip you can give me to point out what i'm doing wrong?

All the models i tested work great as DTS, but i really need a few more poly in my car object and Dts exporter is a pain and take a lot of time to export.

#3
11/10/2009 (4:28 pm)
Thanks Brian, i will test how to export my car following this as example later tonight.
#4
11/10/2009 (4:34 pm)
Awesome, let me know how it goes!

Also, FYI, I used the latest version of Open Collada when making this: www.opencollada.org/download.html
#5
11/10/2009 (6:24 pm)
Hi Jorge,

1. I recently fixed this crash in T3D trunk (the fix will be included in the next build). Vehicles still require a collision detail, but the engine will generate a console error, and the datablock will fail to preload instead of crashing. Modify the VehicleData::preload method in vehicle.cpp as follows:

bool VehicleData::preload(bool server, String &errorStr)
{
   if (!Parent::preload(server, errorStr))
      return false;

   // Vehicle objects must define a collision detail
   if (!collisionDetails.size() || collisionDetails[0] == -1)
   {
      Con::errorf("VehicleData::preload failed: Vehicle models must define a collision-1 detail");
      return false;
   }


2. The convention for collision details is slightly different for collada. Rename your Col-1 object to Collision-1 and it will be correctly detected by the collada loader as a collision detail.
#6
11/11/2009 (1:38 am)
Thanks a lot Brian, you saved me, the simple model you sent me works great exporting as collada.

Now i have a working car thanks to you, hope this post can helps other too that might be experiencing the same problem.

Thanks Chris i will definitively fix that for my game, this was a major pain to debug and to solve.
#7
11/11/2009 (12:11 pm)
Great to hear Jorge! I'll leave the car link on my site for anyone to use and learn from.