Game Development Community

Nodes get thrown away???

by Kevin Rogers · in Artist Corner · 09/12/2005 (1:30 pm) · 10 replies

Previously, I've only modeled static shapes for Torque, so I haven't run into this before. Yesterday, I finally got a vehicle model to a point where I needed to export it and ran into some weirdness. The geometry would export fine (in fact, I was really stoked to see how good it looked in TGE), but it was acting like it was ignoring my _eye node. It was always placing the view under the model (which makes sense if there is no _eye node since it's supposed to default to the bounds location). So, I'm like, "where the heck is my _eye node???" and checked the dump.dmp file to see if I could get a clue. Well, come to find out, the exporter is deciding that there are a bunch of nodes that are "unneeded" and it's throwing them away. (?!)

Here's the part from the dump.dmp file (See the dump.dmp in the next post, since it's quite long):
Third pass:  Collapsing unneeded nodes...

[b]Removing node "base01"
Removing node "start01"
Removing node "mount0"
Removing node "cam"
Removing node "eye"
Removing node "mass"[/b]

When I saw this, I spent at least 45 minutes tweaking things, trying to figure out why it would do this, but with no luck. Then I decided to try some other scene files that I downloaded from the 'net, only to have the exporter throw away the nodes in those as well!
Here's the scene set-up for the model:
Scene Animation
bounds
base01
|- _detail256
|- _collision-1
|- start01
   |- vehicle256
   |- _mount0
   |- _cam
   |- _eye
   |- _mass
   |- col-1

This is a huge issue; obviously I really need these nodes! I hope somebody can tell me what's going on here and point me in the right direction to fix it.

Thanks,
Kevin

#1
09/12/2005 (1:34 pm)
The exporters will throw away any nodes they find "useless", yes.
What you need to do is to use a cfg file, I'm not entirely sure about how this is done in truespace so you'll have to figure this out yourself. In the .cfg file you should at least put something along the lines of this:

AlwaysExport:
mount0
cam
eye
mass
etc, etc, just put whatever nodes you want to export here.
#2
09/12/2005 (1:36 pm)
Here's most of the dump.dmp -- it was still too long. (I highlighted the important bits.):
Torque Game Engine (DTS) Exporter v2.0.0 Build 5
trueSpace v660.11

Preparing to export "X:\_TORQUE_DEV\Game_Design\Models\Game.scl\hover-test.scn" to
"X:\_TORQUE_DEV\Game\SB_Base\DataD\Models\Vehicles\hoverplane.dts"
Setting up for full export (dts) -- turning on optimized meshes

Begin reading config file "X:\_TORQUE_DEV\Game\SB_Base\DataD\Models\Vehicles\hoverplane.cfg".
[b]Always export node: "_eye"
Always export node: "_cam"
Always export node: "_mount*"
Always export node: "_light*"
Always export node: "_contrail*"
Always export node: "_mass"
[/b]Never export node: "_temp*"
Never export node: "light*"
End reading config file.
Preloaded TrueSpace Bones - # bones: 0, # joints: 0
First pass:  enumerate scene...

Processing Node bounds with parent Scene Root
Bounding box found
Processing Node base01 with parent Scene Root
Found subtree starting at Node "base01"
Processing Node detail256 with parent base01
Processing Node collision-1 with parent base01
Processing Node vehicle256 with parent start01
[b]Processing Node mount0 with parent start01
Processing Node cam with parent start01
Processing Node eye with parent start01
Processing Node mass with parent start01
[/b]Processing Node col-1 with parent start01

Second pass:  put shape structure together...

Adding detail named "detail256" of size 256 to subtree "base01".
Adding detail named "collision-1" of size -1 to subtree "base01".
Adding node "base01" with parent "base01" to subtree rooted on node "base01".
Adding node "start01" with parent "base01" to subtree rooted on node "base01".
Adding node "vehicle256" with parent "start01" to subtree rooted on node "base01".
Attaching object to node.
Adding object named "vehicle".
Adding mesh of size 256 to object "vehicle".
[b]Adding node "mount0" with parent "start01" to subtree rooted on node "base01".
Adding node "cam" with parent "start01" to subtree rooted on node "base01".
Adding node "eye" with parent "start01" to subtree rooted on node "base01".
Adding node "mass" with parent "start01" to subtree rooted on node "base01".
[/b]Adding node "col-1" with parent "start01" to subtree rooted on node "base01".
Attaching object to node.
Adding object named "col".
Adding mesh of size -1 to object "col".

[b]Third pass:  Collapsing unneeded nodes...

Removing node "base01"
Removing node "start01"
Removing node "mount0"
Removing node "cam"
Removing node "eye"
Removing node "mass"
[/b]Adding material "unnamed" to bounds
  Flags: SWrap TWrap NeverEnvMap Translucent
  Reflection Map: -1 (0.000000)
  Detail Map: -1 (1.000000)
  Bump Map: -1
Adding material "hoverplane_skin" to vehicle256
  Flags: SWrap TWrap NeverEnvMap
  Reflection Map: -1 (0.000000)
  Detail Map: -1 (1.000000)
  Bump Map: -1
Adding material "unnamed" to col-1
  Flags: SWrap TWrap NeverEnvMap Translucent
  Reflection Map: -1 (0.000000)
  Detail Map: -1 (1.000000)
  Bump Map: -1

Add default object states...
.
.
.
Shape Hierarchy:

   Details:
      detail256, Subtree 0, objectDetail 0, size 256
      collision-1, Subtree 0, objectDetail 1, size -1

   Subtrees:
      Subtree 0
         vehicle256 --> Object vehicle with following details:  256
         col-1 --> Object col with following details:  -1

   Sequences:

   Material list:
   material #0: "hoverplane_skin".
   material #1: "unnamed".  Translucent.
#3
09/12/2005 (1:37 pm)
Thanks, Magnus for the quick reply. However, as you can see from the dump.dmp file, I already thought of that! =)

Kevin
#4
09/12/2005 (1:38 pm)
Quote:Always export node: "_eye"
Shoudn't that be "eye" and not "_eye"?
#5
09/12/2005 (1:46 pm)
Hmmm, quite possibly. The documentation just says you have to put these nodes in the .cfg file, but doesn't say anything about whether the underscore is used or not. I assumed that it would match the naming convention in the gameSpace scene editor (which makes sense, IMO).

Thanks, Magnus, I'll see what removing the underscores does for me!
Kevin
#6
09/12/2005 (1:52 pm)
As I said, I know nothing about gamespace (no need for any weird underscore thing when using 3d studio =). My thinking was just that when it says "Removing node" it doesn't use an underscore, so it makes sense either way I suppose.
#7
09/12/2005 (8:28 pm)
Hey Magnus,
That was it! Took out the underscores and it decided to work. Thanks very much.=)

@Matt Summers: If you're reading this thread... it might make sense to clarify this in the docs. =)
#8
09/13/2005 (8:54 am)
Actually, I guess not, went back and looked at my Resource.zip for the quide and the .cfg I included and it appears I probably ran into the same issue...sorry.

I had documented a few quirks about the exporter and had forgotten about this one, and just now added it, and removed my posting...ahem.

I wish I could somehow negate the unnamed texture listing that appears from the Bounds object within the Scene, generating a warning on any object with one[bounds] when it is inside the engine. I recently went back and slipped a transparent .png with that name[unnamed.png or whatever appears in the console] in my Shapes directory and ended the spamming on the console for my gS shapes, all of them!
#9
09/13/2005 (1:20 pm)
Hi Rex,
Would be cool if you posted your exporter quirks doc. =)

Oh yeah, the unnamed texture thing is rather annoying. Does anyone know a workaround for this?
#10
09/14/2005 (7:12 am)
gS2DTS is all I've found out so far....:). Hope it helps you thru the process.