Torque3D's Import System
by raa brubb · in Torque 3D Professional · 05/05/2014 (2:39 pm) · 75 replies
Hey all,
I've been doing some research about OpenGL, Assimp, and other things. I would like to implement Assimp (even though that would be a while from now) into Torque3D. My only concern was how does Torque3D's import system work? Does it only support DTS and import DAEs by conversion.
I had previously brought up this idea in the forums, but I seriously think it should be implemented into Torque3D 4.0. I'm not pushing anything, but this would seriously fix the problem with importing. The only importing supported by Torque3D is DAE and FBX (using a community add-on). This could be fixed using Assimp. Not to mention Assimp has an open source viewer as well. What do you think? Could this be easily implemented or totally impossible?
I've been doing some research about OpenGL, Assimp, and other things. I would like to implement Assimp (even though that would be a while from now) into Torque3D. My only concern was how does Torque3D's import system work? Does it only support DTS and import DAEs by conversion.
I had previously brought up this idea in the forums, but I seriously think it should be implemented into Torque3D 4.0. I'm not pushing anything, but this would seriously fix the problem with importing. The only importing supported by Torque3D is DAE and FBX (using a community add-on). This could be fixed using Assimp. Not to mention Assimp has an open source viewer as well. What do you think? Could this be easily implemented or totally impossible?
About the author
#62
05/27/2014 (8:52 pm)
LOL, thanks for the effort!
#63
Honestly formats like obj,3ds etc shouldn't be used in any serious projects and if your modelling team can't supply models in collada/fbx format, well......Just my two cents anyway.
06/02/2014 (4:24 pm)
Totally not trying to put down other people's work but i honestly don't see the need to be able to import formats like obj and anything else that assimp offers. I definitely could see a good use for an official FBX importer along side the existing collada one. Honestly formats like obj,3ds etc shouldn't be used in any serious projects and if your modelling team can't supply models in collada/fbx format, well......Just my two cents anyway.
#64
06/02/2014 (11:34 pm)
The modelling team living in my head has serious difficulties providing anything other than a .blend file, so I'm really looking forward to getting this working :P. I think more options is always good. And this is the lowest-impedance method to get an FBX importer!
#65
06/02/2014 (11:56 pm)
lol yeah to get programmer art into the engine yeah it will be easier. I don't know,it's just more bloat and yet another dependency. Since assimp handles collada too, will assimp be used for everything?
#66
I'm pretty neutral on it. Collada only is pretty damn limiting but I've also had no problem with collada thus far ( though lots of people complain ). In the end, more formats = more better?
@ Everyone
I've been trying to find time to work on this but it keeps getting put off. I managed to put together a commit with some work done on it. There's some models that are just not turning out very well in the engine, but all the example models that come with assimp load fine. When I disable options or try different methods I end up breaking models that worked fine before. I've added an import options dialog similar to the collada import one:

Not sure where to go from here. I'll take another look at the mesh loading to see if I can spot where I might be handling it wrong but the code is so simple that a mistake should have broke all models, not just some models. And yet, all my test models look great in the assimp viewer >.<
06/04/2014 (5:42 pm)
@ Timmy I'm pretty neutral on it. Collada only is pretty damn limiting but I've also had no problem with collada thus far ( though lots of people complain ). In the end, more formats = more better?
@ Everyone
I've been trying to find time to work on this but it keeps getting put off. I managed to put together a commit with some work done on it. There's some models that are just not turning out very well in the engine, but all the example models that come with assimp load fine. When I disable options or try different methods I end up breaking models that worked fine before. I've added an import options dialog similar to the collada import one:

Not sure where to go from here. I'll take another look at the mesh loading to see if I can spot where I might be handling it wrong but the code is so simple that a mistake should have broke all models, not just some models. And yet, all my test models look great in the assimp viewer >.<
#67
06/05/2014 (9:50 pm)
Hmm... so it works fine on Assimp viewer, but wrong in T3D?
#68
Andrew: sent you some pull requests ;P.
06/14/2014 (11:54 pm)
Timmy, another reason not to worry is that all the shape assets will be re-exported as -cached.dts files anyway. So for a shipping build you'd disable both Assimp and Collada for a lean binary, and just rely on loading DTS files. But during development, why not let you use any workflow you please?Andrew: sent you some pull requests ;P.
#69
06/15/2014 (10:05 pm)
@Daniel: Good point ;-)
#70
And would solve the (many) needs of people to load models for testing and prototyping ... just a thought.
07/08/2014 (2:19 pm)
Why even have it as part of T3D ? seems if it was a stand alone tool, that opened any of these supported file types ... then saved it as a cached DTS file and the necessary materials ... would eliminate the need to compile it into T3D at all.And would solve the (many) needs of people to load models for testing and prototyping ... just a thought.
#71
For - more streamlined than an external tool; just double-click the file in the library and it's imported.
07/08/2014 (3:19 pm)
Against - another dependency.For - more streamlined than an external tool; just double-click the file in the library and it's imported.
#72
While I do like the idea of having external applications tailored to specific purposes... I think it may add more maintenance burden. See the project manager.
07/09/2014 (1:06 am)
Speed of development, I guess. I think it's nice to have as short a pipeline as possible between content creation and getting it in-game. T3D's live reload stuff is great for that - having to go through an external app would add another big step into the process.While I do like the idea of having external applications tailored to specific purposes... I think it may add more maintenance burden. See the project manager.
#73
It's highly upsetting to have purchased models, complete with LOD's and animations, that you can't use with your engine of choice due to its import limitations. No matter how I convert these .fbx files they won't work properly with the animations in Torque.
I've learned a great deal about Torque's LOD meshes on import by studying the soldier_rigged.dae file. It all makes pefect sense, but if a model and its animation data happens to be exported using Unwrap3D the resulting .DAE information is utterly useless for Torque.
07/09/2014 (6:43 pm)
I, for one, can say that if there is any way to import .fbx directly into Torque I'm all for it. I recently received a set of models from another studio which ultimately is unusable for me with Torque because of the import limitations.It's highly upsetting to have purchased models, complete with LOD's and animations, that you can't use with your engine of choice due to its import limitations. No matter how I convert these .fbx files they won't work properly with the animations in Torque.
I've learned a great deal about Torque's LOD meshes on import by studying the soldier_rigged.dae file. It all makes pefect sense, but if a model and its animation data happens to be exported using Unwrap3D the resulting .DAE information is utterly useless for Torque.
#74
I'm with you on this one, though - T3D would benefit greatly from FBX import.
A note on the FBX SDK
07/09/2014 (9:51 pm)
Hey Jesse - did you try Autodesk's FBX Converter? I've had success with static models, haven't tried animated models yet though....I'm with you on this one, though - T3D would benefit greatly from FBX import.
A note on the FBX SDK
Quote:Taken from a forum post on Autodesk's forums. So it should be safe to add an importer written with the SDK as an optional add-in but I don't think we want it rolled in with the Torque source anywhere - thoughts?
The intent of the license is this. You can build applications that read, write, manipulate FBX data. You can distribute these products as you see fit. However in the 2009.1 release we add this clause.
2.4 You shall place the following statement in the copyright area of (i) the on-line documentation regarding the Developed Software, (ii) the End-User License and/or terms of use for the Developed Software, (iii) the ‘About Box’ or similar notice page of the Developed Software and (iv) any other document related to Developed Software that contains copyright information:
"This software contains Autodesk® FBX® code developed by Autodesk, Inc. Copyright 2008 Autodesk, Inc. All rights, reserved. Such code is provided "as is" and Autodesk, Inc. disclaims any and all warranties, whether express or implied, including without limitation the implied warranties of merchantability, fitness for a particular purpose or non-infringement of third party rights. In no event shall Autodesk, Inc. be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of such code."
In the prohibited section the restriction is that you cannot repackage and distribute the SDK without our written consent. You cannot claim the SDK to be your own, that is what that clause prevents.
Mark Davies
#75
www.garagegames.com/community/forums/viewthread/136464/1#comment-859461
...with a mini-tutorial :D
As a matter of fact I have used Autodesk's FBX Converter. A fantastic program, although with these particular files I haven't had any success. I'm using Blender, and Blender can import .fbx data but not with animations. Using a plugin, I'm able to import .fbx data and also its weight/bone structure information (very useful in certain cases!). In this case, I can use Autodesk's FBX Converter to convert the .fbx files to .DAE and then just import the .DAE to Blender. But these particular files, having been exported with Unwrap3D, cause Blender or Torque 3D to hang on load of the .DAE.
Anyhow, it's just a big mess but hopefully sooner than later a solution may present itself. You know me, I'll not rest until it's uncovered...
07/10/2014 (9:52 am)
@Richard: Maybe a slight necro, but it didn't appear to be fully resolved so I answered your thread:www.garagegames.com/community/forums/viewthread/136464/1#comment-859461
...with a mini-tutorial :D
As a matter of fact I have used Autodesk's FBX Converter. A fantastic program, although with these particular files I haven't had any success. I'm using Blender, and Blender can import .fbx data but not with animations. Using a plugin, I'm able to import .fbx data and also its weight/bone structure information (very useful in certain cases!). In this case, I can use Autodesk's FBX Converter to convert the .fbx files to .DAE and then just import the .DAE to Blender. But these particular files, having been exported with Unwrap3D, cause Blender or Torque 3D to hang on load of the .DAE.
Anyhow, it's just a big mess but hopefully sooner than later a solution may present itself. You know me, I'll not rest until it's uncovered...
Andrew Mac
I'm still working on it. Rome wasn't built in a day.