Problems exporting a turret from max...
by Jack Stone · in Artist Corner · 06/07/2006 (1:45 pm) · 2 replies
Hi,
I have Paul Dana's turret resource working in my game, and I have just recently started to make my own turrets for it. (I had just been using the generic one).
I have been using bones for my codeTarget and codeWeapon nodes, instead of dummies, because when I use dummies get a fatal error from TSE, something about a TS::static object.
I can get the turret exported ok with bones, and it works when mounted to a vehicle, but I cant actually stand on it and mount it, presumably because theres no collision mesh.
The problem is, I cant create a collision mesh for it. I created a col-1 and a collision-1 (tried a bone and a dummy) in the usual way, but when I try to export I get an application error and max crashes.
I have found that if I remove all my bones from the start01 node it works, but once I link codeTurret to start01 and have a collision-1 there, I get a program error.
I found some sample hierarchies from max on the forums, and as far as I can tell everything is fine on my end. As I said, when I mount the turret onto a vehicle it rotates, and I can fire from it perfectly.
I just cant attach a collision mesh to it.
I'd appreciate any advice from anyone else whos got working turrets in their games, or maybe a sample max file I could look at?
Thanks a lot,
JS
Edit:
This is as much of my dump file as would export:
Config file not found.
First pass: collect useful nodes...
Processing Node base2 with parent Scene Root
Found subtree starting at Node "base2"
Processing Node start2 with parent base2
Processing Node codeTurret with parent start2
Processing Node rotateZaxis2 with parent codeTurret
Processing Node codeWeapon with parent rotateZaxis2
Processing Node mount0 with parent codeWeapon
Processing Node mount1 with parent mount0
Processing Node xaxis2 with parent codeWeapon
Processing Node bounds2 with parent start2
Bounding box found
Processing Node col-1 with parent start2
Processing Node detail2 with parent base2
Processing Node collision-1 with parent base2
Second pass: put shape structure together...
Adding detail named "detail2" of size 2 to subtree "base2".
Adding detail named "collision-1" of size -1 to subtree "base2".
Adding node "base2" with parent "base2" to subtree rooted on max-node "base2".
Adding node "start2" with parent "base2" to subtree rooted on max-node "base2".
Adding node "codeTurret" with parent "start2" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "codeTurret".
Adding mesh of size -1 to object "codeTurret".
Object offset transform:
scale: x=0.16676, y=0.16676, z=0.16676
stretch rotation: x=0.00000, y=0.00000, z=0.00000, w=1.00000
translation: x=-0.00000, y=-0.00000, z=0.00000
actual rotation: x=0.00000, y=-0.00000, z=0.00000, w=1.00000
Adding node "rotateZaxis2" with parent "codeTurret" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "rotateZaxis".
Adding mesh of size 2 to object "rotateZaxis".
Object offset transform:
scale: x=0.16676, y=0.16676, z=0.16676
stretch rotation: x=0.00000, y=0.00000, z=0.00000, w=1.00000
translation: x=0.00000, y=0.00000, z=0.00000
actual rotation: x=-0.00000, y=0.00000, z=-0.00000, w=1.00000
Adding node "codeWeapon" with parent "rotateZaxis2" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "codeWeapon".
Adding mesh of size -1 to object "codeWeapon".
Object offset transform:
scale: x=0.16676, y=0.16676, z=0.16676
stretch rotation: x=-0.00432, y=0.00000, z=0.00003, w=0.99999
translation: x=-0.00000, y=-0.00000, z=-0.00000
actual rotation: x=-0.00000, y=-0.00000, z=0.00000, w=1.00000
Adding node "mount0" with parent "codeWeapon" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "mount".
Adding mesh of size 0 to object "mount".
Object offset transform:
scale: x=0.18780, y=0.18780, z=0.18780
stretch rotation: x=-0.02243, y=0.00879, z=-0.01727, w=0.99956
translation: x=-0.00000, y=0.00000, z=0.00000
actual rotation: x=-0.00000, y=0.00000, z=-0.00000, w=1.00000
Adding node "mount1" with parent "mount0" to subtree rooted on max-node "base2".
Attaching object to node.
Adding mesh of size 1 to object "mount".
Object offset transform:
scale: x=0.24588, y=0.24588, z=0.24588
stretch rotation: x=-0.00884, y=0.00155, z=-0.25753, w=0.96623
translation: x=-0.00000, y=0.00000, z=0.00000
actual rotation: x=0.00000, y=0.00000, z=-0.00000, w=1.00000
Adding node "xaxis2" with parent "codeWeapon" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "xaxis".
Adding mesh of size 2 to object "xaxis".
Object offset transform:
scale: x=0.16676, y=0.16676, z=0.16676
stretch rotation: x=-0.04671, y=0.00000, z=0.03311, w=0.99836
translation: x=0.00000, y=-0.00000, z=-0.00000
actual rotation: x=0.00000, y=0.00000, z=-0.00000, w=1.00000
Adding node "col-1" with parent "start2" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "col".
Adding mesh of size -1 to object "col".
Object offset transform:
scale: x=1.00000, y=1.00000, z=2.19046
stretch rotation: x=0.00000, y=-0.00000, z=0.00000, w=1.00000
translation: x=-0.00000, y=0.00000, z=0.00000
actual rotation: x=0.00000, y=-0.00000, z=0.00000, w=1.00000
Third pass: Collapsing unneeded nodes...
Removing node "base2"
Removing node "start2"
Add default object states...
Adding object state to 1 detail level(s) of mesh "codeTurret".
Adding frame.
Object is visible.
14 faces, 42 verts, 42 tverts before cropping textures and joining verts
---------------------------------
Adding object state to 1 detail level(s) of mesh "rotateZaxis".
Adding frame.
Object is visible.
12 faces, 36 verts, 36 tverts before cropping textures and joining verts
---------------------------------
Adding object state to 1 detail level(s) of mesh "codeWeapon".
Adding frame.
Object is visible.
14 faces, 42 verts, 42 tverts before cropping textures and joining verts
---------------------------------
Adding object state to 1 detail level(s) of mesh "xaxis".
Adding frame.
Object is visible.
12 faces, 36 verts, 36 tverts before cropping textures and joining verts
---------------------------------
Adding object state to 1 detail level(s) of mesh "col".
Adding frame.
Object is visible.
12 faces, 36 verts, 36 tverts before cropping textures and joining verts
---------------------------------
Add default node states...
Adding node rotation at time 0 for node "codeTurret".
rotation: x=0.00000, y=0.00000, z=-0.70708, w=0.70708
---------------------------------
Adding node translation at time 0 for node "codeTurret".
translation: x=-2.27631, y=-4.35360, z=2.28805
---------------------------------
Adding node rotation at time 0 for node "rotateZaxis2".
rotation: x=0.49998, y=-0.49998, z=0.49998, w=0.49998
---------------------------------
Adding node translation at time 0 for node "rotateZaxis2".
translation: x=-0.66229, y=-0.19376, z=0.06317
---------------------------------
Adding node rotation at time 0 for node "codeWeapon".
rotation: x=0.49998, y=-0.49998, z=0.49998, w=-0.49998
---------------------------------
I have Paul Dana's turret resource working in my game, and I have just recently started to make my own turrets for it. (I had just been using the generic one).
I have been using bones for my codeTarget and codeWeapon nodes, instead of dummies, because when I use dummies get a fatal error from TSE, something about a TS::static object.
I can get the turret exported ok with bones, and it works when mounted to a vehicle, but I cant actually stand on it and mount it, presumably because theres no collision mesh.
The problem is, I cant create a collision mesh for it. I created a col-1 and a collision-1 (tried a bone and a dummy) in the usual way, but when I try to export I get an application error and max crashes.
I have found that if I remove all my bones from the start01 node it works, but once I link codeTurret to start01 and have a collision-1 there, I get a program error.
I found some sample hierarchies from max on the forums, and as far as I can tell everything is fine on my end. As I said, when I mount the turret onto a vehicle it rotates, and I can fire from it perfectly.
I just cant attach a collision mesh to it.
I'd appreciate any advice from anyone else whos got working turrets in their games, or maybe a sample max file I could look at?
Thanks a lot,
JS
Edit:
This is as much of my dump file as would export:
Config file not found.
First pass: collect useful nodes...
Processing Node base2 with parent Scene Root
Found subtree starting at Node "base2"
Processing Node start2 with parent base2
Processing Node codeTurret with parent start2
Processing Node rotateZaxis2 with parent codeTurret
Processing Node codeWeapon with parent rotateZaxis2
Processing Node mount0 with parent codeWeapon
Processing Node mount1 with parent mount0
Processing Node xaxis2 with parent codeWeapon
Processing Node bounds2 with parent start2
Bounding box found
Processing Node col-1 with parent start2
Processing Node detail2 with parent base2
Processing Node collision-1 with parent base2
Second pass: put shape structure together...
Adding detail named "detail2" of size 2 to subtree "base2".
Adding detail named "collision-1" of size -1 to subtree "base2".
Adding node "base2" with parent "base2" to subtree rooted on max-node "base2".
Adding node "start2" with parent "base2" to subtree rooted on max-node "base2".
Adding node "codeTurret" with parent "start2" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "codeTurret".
Adding mesh of size -1 to object "codeTurret".
Object offset transform:
scale: x=0.16676, y=0.16676, z=0.16676
stretch rotation: x=0.00000, y=0.00000, z=0.00000, w=1.00000
translation: x=-0.00000, y=-0.00000, z=0.00000
actual rotation: x=0.00000, y=-0.00000, z=0.00000, w=1.00000
Adding node "rotateZaxis2" with parent "codeTurret" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "rotateZaxis".
Adding mesh of size 2 to object "rotateZaxis".
Object offset transform:
scale: x=0.16676, y=0.16676, z=0.16676
stretch rotation: x=0.00000, y=0.00000, z=0.00000, w=1.00000
translation: x=0.00000, y=0.00000, z=0.00000
actual rotation: x=-0.00000, y=0.00000, z=-0.00000, w=1.00000
Adding node "codeWeapon" with parent "rotateZaxis2" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "codeWeapon".
Adding mesh of size -1 to object "codeWeapon".
Object offset transform:
scale: x=0.16676, y=0.16676, z=0.16676
stretch rotation: x=-0.00432, y=0.00000, z=0.00003, w=0.99999
translation: x=-0.00000, y=-0.00000, z=-0.00000
actual rotation: x=-0.00000, y=-0.00000, z=0.00000, w=1.00000
Adding node "mount0" with parent "codeWeapon" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "mount".
Adding mesh of size 0 to object "mount".
Object offset transform:
scale: x=0.18780, y=0.18780, z=0.18780
stretch rotation: x=-0.02243, y=0.00879, z=-0.01727, w=0.99956
translation: x=-0.00000, y=0.00000, z=0.00000
actual rotation: x=-0.00000, y=0.00000, z=-0.00000, w=1.00000
Adding node "mount1" with parent "mount0" to subtree rooted on max-node "base2".
Attaching object to node.
Adding mesh of size 1 to object "mount".
Object offset transform:
scale: x=0.24588, y=0.24588, z=0.24588
stretch rotation: x=-0.00884, y=0.00155, z=-0.25753, w=0.96623
translation: x=-0.00000, y=0.00000, z=0.00000
actual rotation: x=0.00000, y=0.00000, z=-0.00000, w=1.00000
Adding node "xaxis2" with parent "codeWeapon" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "xaxis".
Adding mesh of size 2 to object "xaxis".
Object offset transform:
scale: x=0.16676, y=0.16676, z=0.16676
stretch rotation: x=-0.04671, y=0.00000, z=0.03311, w=0.99836
translation: x=0.00000, y=-0.00000, z=-0.00000
actual rotation: x=0.00000, y=0.00000, z=-0.00000, w=1.00000
Adding node "col-1" with parent "start2" to subtree rooted on max-node "base2".
Attaching object to node.
Adding object named "col".
Adding mesh of size -1 to object "col".
Object offset transform:
scale: x=1.00000, y=1.00000, z=2.19046
stretch rotation: x=0.00000, y=-0.00000, z=0.00000, w=1.00000
translation: x=-0.00000, y=0.00000, z=0.00000
actual rotation: x=0.00000, y=-0.00000, z=0.00000, w=1.00000
Third pass: Collapsing unneeded nodes...
Removing node "base2"
Removing node "start2"
Add default object states...
Adding object state to 1 detail level(s) of mesh "codeTurret".
Adding frame.
Object is visible.
14 faces, 42 verts, 42 tverts before cropping textures and joining verts
---------------------------------
Adding object state to 1 detail level(s) of mesh "rotateZaxis".
Adding frame.
Object is visible.
12 faces, 36 verts, 36 tverts before cropping textures and joining verts
---------------------------------
Adding object state to 1 detail level(s) of mesh "codeWeapon".
Adding frame.
Object is visible.
14 faces, 42 verts, 42 tverts before cropping textures and joining verts
---------------------------------
Adding object state to 1 detail level(s) of mesh "xaxis".
Adding frame.
Object is visible.
12 faces, 36 verts, 36 tverts before cropping textures and joining verts
---------------------------------
Adding object state to 1 detail level(s) of mesh "col".
Adding frame.
Object is visible.
12 faces, 36 verts, 36 tverts before cropping textures and joining verts
---------------------------------
Add default node states...
Adding node rotation at time 0 for node "codeTurret".
rotation: x=0.00000, y=0.00000, z=-0.70708, w=0.70708
---------------------------------
Adding node translation at time 0 for node "codeTurret".
translation: x=-2.27631, y=-4.35360, z=2.28805
---------------------------------
Adding node rotation at time 0 for node "rotateZaxis2".
rotation: x=0.49998, y=-0.49998, z=0.49998, w=0.49998
---------------------------------
Adding node translation at time 0 for node "rotateZaxis2".
translation: x=-0.66229, y=-0.19376, z=0.06317
---------------------------------
Adding node rotation at time 0 for node "codeWeapon".
rotation: x=0.49998, y=-0.49998, z=0.49998, w=-0.49998
---------------------------------
#2
JS
06/08/2006 (5:21 pm)
Ok I got this working eventually. I was using bones as nodes when I hould have been using dummies, and I had to uncheck "collsapse transforms" to get them to work.JS
Torque 3D Owner Jack Stone
translation: x=-0.32009, y=0.06316, z=6.91584
---------------------------------
Adding node rotation at time 0 for node "mount0".
rotation: x=-0.75948, y=-0.65047, z=0.00198, w=0.00232
---------------------------------
Adding node translation at time 0 for node "mount0".
translation: x=1.21228, y=-7.38619, z=1.64461
---------------------------------
Adding node rotation at time 0 for node "mount1".
rotation: x=0.00000, y=0.00000, z=-0.97876, w=0.20487
---------------------------------
Adding node translation at time 0 for node "mount1".
translation: x=9.74513, y=-4.16789, z=0.00000
---------------------------------
Adding node rotation at time 0 for node "xaxis2".
rotation: x=0.00000, y=0.00000, z=0.70708, w=0.70708
---------------------------------
Adding node translation at time 0 for node "xaxis2".
translation: x=1.22078, y=-3.47175, z=-0.92968
---------------------------------
Adding node rotation at time 0 for node "col-1".
rotation: x=-0.49843, y=-0.50151, z=-0.50154, w=-0.49843
---------------------------------
Adding node translation at time 0 for node "col-1".
translation: x=0.47446, y=-5.40687, z=2.46002
---------------------------------
Adding 0 sequences...
Optimizing meshes...
Optimizing mesh "codeTurret" detail level -1.
42 verts before joining verts
32 verts after joining verts
14 faces before stripping
Using quick and dirty stripping method.
9 strips with average length 3.56 (range 3 to 4) and 0 reversals
Results in 32 cache misses
Optimizing mesh "rotateZaxis" detail level 2.
36 verts before joining verts
24 verts after joining verts
12 faces before stripping
Using quick and dirty stripping method.
6 strips with average length 4.00 (range 4 to 4)