Game Development Community

adding node breaks model

by graham mcinnes · in Torque 3D Professional · 04/21/2010 (1:22 am) · 10 replies

3.bp.blogspot.com/_SplDgn8nyYc/S860quvcFrI/AAAAAAAAABY/qJkXIO7KwtI/s1600/prenode1.JPG1.bp.blogspot.com/_SplDgn8nyYc/S860v8E1OKI/AAAAAAAAABg/bgavHN4BDI0/s1600/nodebug1.JPGin torque 3d 1.1 beta 1, but might be in others too
happening in the dts and dae versions of the model.

so this always happened after adding a node to this particular model, doens't matter where...
only seems to be select models (had this problem once before, and this model)
happens with the collada and the dts.
the model is a biped with a skin, in 3dmax, exported via open collada.

would be fine in the shape editor (for a black mash of verticies) but would crash with a
memory access violation in void* dMemcpy, when you load the model again (either in game or shapeeditor).

quitting after saving the broken model would sometimes assert this :
There is a primitive buffer leak, check the log for more details.
referencing : MainLoop -> CanvasRenderControls -> TSShapeInstance_Render -> TSShapeInstance_MeshObjectInstance_render -> TSMesh_CreateVBIB


fixed it in the end by re-exporting the same model with a new node on it,
and now it even lets you add new nodes to the model in the shape editor...

#1
04/29/2010 (11:44 pm)
[ed] fixed the images [/ed]
#2
04/30/2010 (6:45 am)
Being a DAE file, why do not you open a 3D editing program and add the node?
#3
05/04/2010 (4:43 pm)
@graham: Although it is now working for you, I'd be interested in looking at the file that was distorting/crashing when you added a node if you still have it available. Would be nice to know what was going wrong and prevent it happening again.
#4
05/05/2010 (2:28 am)
@alfio :
that is what had to be done in the end, and it did fix the original problem, but adding new nodes then made moving them go off to crazy extremes

@chris :
do you have an email or something i can email it to
(and i will have to ask the original creator for permission first too)
#5
05/05/2010 (3:33 am)
I never tried to import an animated mesh exported in collada format, and add a node inside the T3D. But it seems to be a rigging problem. Adding the node, generate an conflict with the original rigging. If you send me the file to my email, I do a quick check.

saitta DOT alfio AT collateral-studios DOT com
#6
05/05/2010 (3:23 pm)
@graham: email is in my profile, just remove the NULL.
#7
05/21/2010 (12:13 am)
[update] emails sent
#8
05/28/2010 (2:06 pm)
bug logged Key: TQA-164
#9
06/01/2010 (4:23 pm)
Just to close the loop on this issue - I was never able to reproduce it by adding a node to the model, but I did get very similar behaviour when adding a collision mesh.

The trouble (in both cases I believe) is that T3D requires all meshes in the shape to use the same vertex 'format'. That is, the size of the data (position, normal, uv, color etc) for each vertex must be the same for all meshes in the shape. If one mesh has vertex colors, all meshes in the shape must reserve space for vertex colors, even if they don't use them. My understanding is that there are significant performance benefits to doing this.

Anyway, I found a bug in T3D that it was not enforcing this rule about vertex data when adding a mesh to a shape. The fix will be available in the next release (beta2).
#10
06/10/2010 (1:13 pm)
Confirmed as fixed for 1.1 Beta2.