.DAE Trees Not Rendering Correctly
by Joshua Horns · in Torque 3D Professional · 05/06/2009 (5:09 am) · 33 replies
****Update... I made my own tree model with similar complexity and it didn't have the artifacts. It's odd that the problem doesn't manifest itself in other viewers but I'll chalk this one up to me and bad geometry.
This is just a proof of concept tree so it doesn't look that great... I'm just happy it works.

****One more set of trees. I will say it's not exactly drag and drop easy to use collada but it does work really well once I edit the file produced by xsi.
****EndUpdate
I am using some tree files which I bought and converted from .obj to .dae files using XSI 7.
When I add them to my scene in Torque3D The trees come in fine (geometry) but the model is completely gray and no materials or leaves are rendered.
I cross-checked that the export was fine by importing the .dae into XSI and doing a render preview (the exact same file I am using with T3D). When I do that all of the materials etc are there.
After taking a second look at the render in T3D it looks like the geometry is messed up. What version of collada is required? For the life of me, I haven't been able to get a DAE to load correctly.
**I just used SwirlX3D (free collada viewer) and the geometry looks fine in that program. At this point I am convinced something's weird with the collada importer in the engine.
**To be honest it looks like the engine is importing as triangle strips because pieces of geometry are connected that should not be. That's just an off the wall guess though, based my own mistakes in the past while rendering primitives for school projects.
**I did use the triangulate method when exporting - fyi.
Windows Vista Ultimate x64
ATI 4870x2
Core i7
This is just a proof of concept tree so it doesn't look that great... I'm just happy it works.

****One more set of trees. I will say it's not exactly drag and drop easy to use collada but it does work really well once I edit the file produced by xsi.
****EndUpdateI am using some tree files which I bought and converted from .obj to .dae files using XSI 7.
When I add them to my scene in Torque3D The trees come in fine (geometry) but the model is completely gray and no materials or leaves are rendered.
I cross-checked that the export was fine by importing the .dae into XSI and doing a render preview (the exact same file I am using with T3D). When I do that all of the materials etc are there.
After taking a second look at the render in T3D it looks like the geometry is messed up. What version of collada is required? For the life of me, I haven't been able to get a DAE to load correctly.
**I just used SwirlX3D (free collada viewer) and the geometry looks fine in that program. At this point I am convinced something's weird with the collada importer in the engine.
**To be honest it looks like the engine is importing as triangle strips because pieces of geometry are connected that should not be. That's just an off the wall guess though, based my own mistakes in the past while rendering primitives for school projects.
**I did use the triangulate method when exporting - fyi.
Windows Vista Ultimate x64
ATI 4870x2
Core i7
About the author
#22
Perhaps post a screenshot of export options you are using might help as opposed to saying "but it works here".
05/07/2009 (8:03 am)
Just out of curiosity what type of export options are you using out of XSI? Collada in T3D only handles triangulated gemoetry (it should be an export options) and when the data isnt exported in this way, you do end up with visual wierdness. Perhaps post a screenshot of export options you are using might help as opposed to saying "but it works here".
#23
I will definetly take that screenshot when I get home. I will also take this opportunity to quote myself from the posts above.
From the OP
I'll also consolidate some facts from above to make it easier to see what I've tried.
Exporter tools
- Crosswalk in XSI 7
- Autodesk Collada Exporter in 3DSMax 2009
Viewing Tools
- XSI 7 (Clean Geometry)
- 3DS Max (Clean Geometry)
- SwirlX3D (Clean Geometry)
- T3D (Unidentified Issue w/ Geometry)
Here is the file "Sweet Birch", which is a free download (I chose the .obj):
www.xfrogdownloads.com/greenwebNew/products/Version2/press.htm
I hope it's a mistake on my part. It could even be a problem with the original model. I'll keep trying to eliminate things. If it is a problem with the model it doesn't show up in any of the other viewers, though. When I get home I might delete all the bilboards from the tree in xsi to verify beyond wireframe / shaded mode that the artifacts are not present at all.
Screenshots of the exporters to come.
05/07/2009 (8:35 am)
@loganI will definetly take that screenshot when I get home. I will also take this opportunity to quote myself from the posts above.
From the OP
Quote:**I did use the triangulate method when exporting - fyi.
I'll also consolidate some facts from above to make it easier to see what I've tried.
Exporter tools
- Crosswalk in XSI 7
- Autodesk Collada Exporter in 3DSMax 2009
Viewing Tools
- XSI 7 (Clean Geometry)
- 3DS Max (Clean Geometry)
- SwirlX3D (Clean Geometry)
- T3D (Unidentified Issue w/ Geometry)
Here is the file "Sweet Birch", which is a free download (I chose the .obj):
www.xfrogdownloads.com/greenwebNew/products/Version2/press.htm
I hope it's a mistake on my part. It could even be a problem with the original model. I'll keep trying to eliminate things. If it is a problem with the model it doesn't show up in any of the other viewers, though. When I get home I might delete all the bilboards from the tree in xsi to verify beyond wireframe / shaded mode that the artifacts are not present at all.
Screenshots of the exporters to come.
#26
05/07/2009 (4:40 pm)
Both yield the same exact artifacts.
#27
05/07/2009 (4:59 pm)
Both yield the same exact artifacts.
#28
05/08/2009 (7:39 pm)
Update... I made my own tree model with similar complexity and it didn't have the artifacts. It's odd that the problem doesn't manifest itself in other viewers but I'll chalk this one up to me and bad geometry.
#29
05/08/2009 (8:00 pm)
@Joshua - Keep that model around... Chris that did the Collada support needs to take a look at it.
#30
When I turned off this auto-stripping, the artifacts disappeared.
05/11/2009 (3:00 am)
Just to close the loop on this one => it looks like a problem in the Torque3D code that generates triangle strips. Both DTS and collada geometry is automagically converted to triangle strips on loading, the only difference being that most DTS exporters export strips already, so the geometry doesn't need to be modified by Torque.When I turned off this auto-stripping, the artifacts disappeared.
#31
Josh
05/11/2009 (3:47 am)
Oh, thank you. That's good to know. What do I need to search for in the build to toggle that flag?Josh
#32
05/11/2009 (3:33 pm)
In tsMesh.cpp, look for TSMesh::smUseTriangles and TSMesh::smUseOneStrip. These control how triangles are auto-converted on loading.
#33
Will
04/08/2014 (1:40 pm)
Hey Blood Knight do you have a working link to those test files? Would be interested in checking them out if you or anyone else might have a working link they would be kind enough to share. Thanks!Will

Torque 3D Owner Joshua Horns
The model is all triangles.
It works in two collada viewers outside torque.
It works in Mudbox when imported as an obj.
I'll try stripping out things from the files and leaving only geometry.