Nodes get wrong position on import Collada [Solved]
by Nils Eikelenboom · in Torque 3D Professional · 04/11/2013 (4:51 am) · 5 replies
T3D 1.2 / Win 7 64bit
When I open Collada files with the shape editor I notice that the NULL nodes for shapes do not have the 0 0 0 position they should have. Everything (shape, bounds, col, etc.) has the position of 0 0 0 in the (open)Collada file and in most cases I have no problems with it. However am I trying to fix an old issue with the bending of tree trunks by the forestwindemitter, and I believe this is related to that (that node is the rotation pivot?)

^
The image shows the NULL node on the wrong position (-0.3 1.5 5.2), while the parent 'BirchYoung256' still has the original position of 0 0 0.
Anyone knows how to get that node back to zero but not moving the whole shape with it?
When I open Collada files with the shape editor I notice that the NULL nodes for shapes do not have the 0 0 0 position they should have. Everything (shape, bounds, col, etc.) has the position of 0 0 0 in the (open)Collada file and in most cases I have no problems with it. However am I trying to fix an old issue with the bending of tree trunks by the forestwindemitter, and I believe this is related to that (that node is the rotation pivot?)

^
The image shows the NULL node on the wrong position (-0.3 1.5 5.2), while the parent 'BirchYoung256' still has the original position of 0 0 0.
Anyone knows how to get that node back to zero but not moving the whole shape with it?
#2
But your method is better in this case, because you fix the normals with that at the same time, which is very important for trees, because of the wind animation system.
04/11/2013 (6:20 am)
You always should start at 0 0 0, in blender it is called the origin of a mesh, you can change that with a click on transform origin.But your method is better in this case, because you fix the normals with that at the same time, which is very important for trees, because of the wind animation system.
#3
It should also be better to have one single element by merging some vertices of the branches with the trunk; the wind effect will then less likely seperate the branches from the trunk when moving in the wind. But that's on the to-do list for now :)
04/11/2013 (6:55 am)
In max you normally move the pivot of the object (mesh) to 0 0 0 if it isn't on the right position and then it's fixed in most cases... Next time I'll attach all other elements to the first one (with already a pivot at 0); for example attaching the branches to a tree trunk and not the other way around.It should also be better to have one single element by merging some vertices of the branches with the trunk; the wind effect will then less likely seperate the branches from the trunk when moving in the wind. But that's on the to-do list for now :)
#4
04/11/2013 (7:15 am)
No need to merge the vertices, this is done with vertex paint, leave the vertices that are "connected" with the trunk black/no color, so the engine will not animate them.
#5
For most of my trees, I also modeled the more thinner branches for that purpose. I made the mistake to place the plane elements with a 90 degree on the braches; while I should have done it with a 45 degree; so you can merge 1 vertex from the plane element with one of the tip of the branch. That will create one fixed mesh from trunk to the leaves; resulting in a more accurate animation I guess :)
edit: it seems you can't use the degree symbol properly: °
04/11/2013 (7:51 am)
It's getting a bit off topic; but if you correctly attach the whole thing into one single mesh you can vertex paint (not blue) the braches as well, as they also should move with the wind. For most of my trees, I also modeled the more thinner branches for that purpose. I made the mistake to place the plane elements with a 90 degree on the braches; while I should have done it with a 45 degree; so you can merge 1 vertex from the plane element with one of the tip of the branch. That will create one fixed mesh from trunk to the leaves; resulting in a more accurate animation I guess :)
edit: it seems you can't use the degree symbol properly: °
Torque Owner Nils Eikelenboom
Studio DimSum
After bothering so long I found the solution minutes after posting this. If you attach meshes together in the 3d app the pivot of the starting mesh becomes the pivot for the NULL node. Create a new mesh at 0 0 0(plane or something) and attach the whole thing to that. Problem solved!