Updated milkshape exporter
by Chris Robertson · in Torque Game Engine · 05/05/2004 (12:56 pm) · 24 replies
I have been working for a little while on updating the current milkshape exporter to use the new dtsSDKPlus. The new SDK provides features like alpha sorting, triangle stripper, visibility channels, triggers and much more. Right now I can export a model with multiple meshes and materials and view it correctly in the show tool. LOD, mesh sorting and stripping seem to be working ok.
I am about to tackle animation exporting, but could use a few pointers from anyone familiar with the 3dsmax exporter (especially the source code). In particular, I need to know what the max node structure is for an animated model. Milkshape does not use 'nodes', so I have to fake it. At the moment, my node tree looks something like this:
Does this look right? Where do bones fit into this structure? How are non-animated bones like the 'cam' or 'eye' node handled?
Cheers,
Chris
I am about to tackle animation exporting, but could use a few pointers from anyone familiar with the 3dsmax exporter (especially the source code). In particular, I need to know what the max node structure is for an animated model. Milkshape does not use 'nodes', so I have to fake it. At the moment, my node tree looks something like this:
ROOT |-dummy | |-valid lod markers | |-dummy | |-main meshes | |-lower lod meshes |-bounds mesh
Does this look right? Where do bones fit into this structure? How are non-animated bones like the 'cam' or 'eye' node handled?
Cheers,
Chris
#22
I found a slight caveat in the workings of the linking to the default DSQ's and the exporter, perhaps; My first testing consisted of a segmented mesh character, one mesh for every bone[I called him boxy-boy when we started porting...eons ago, Mr. Box, must be his dad!], like a Character Studio or Puppeteer Biped. After exporting, the shape didn't validate correctly to the sequences and I got a static shape in -showTool and a hard crash when the mission loaded the player[ie, no animations loaded]. I went back in Milkshape3D and had to regroup my many groupings into one single Mesh and then exported. The resulting shape attached correctly and I acheived perfect ground plane placement(feet exactly on the ground, NO FLOATING!)...
the workers are taking a small break now...more later
...that 'driver' Rex, breaks over and more to add: only that the Node alignments were perfect. Our CTF avatar mounted exactly as before, and the vehicle mounting was also exactly the same as my existing test avatar.:) I'm wondering if a SMD of the skeleton in a SKIN pose could be used to get the mesh into it's all-important ROOT postition. Do the animate to pose-export as OBJ trick...?!? Might help, it's a hard pose to build a mesh to; wish Milkfarm had the Frame0 as a reference.
NOTE TO ALL: Chris Robertson has brought the Milkshape program to New Heights of utilization for scores of developers. Milkshape can now produce content on a superior level, rivaling the very best in 3D software. Was that a shudder or a tremble I just heard? :)
Here's a snapshot of my test avatar[534Faces], mounted on a vehicle[gatlingun,1158Faces:weapon/vehicle/2wheels] and has a GoldRush{copyright(c) 2004, InspiredGames.net, all rights reserved} avatar mounted to the player. Sorry for the darkness...
07/26/2004 (10:23 am)
Note for Chris, from the workers in the Pits of Rhi...I found a slight caveat in the workings of the linking to the default DSQ's and the exporter, perhaps; My first testing consisted of a segmented mesh character, one mesh for every bone[I called him boxy-boy when we started porting...eons ago, Mr. Box, must be his dad!], like a Character Studio or Puppeteer Biped. After exporting, the shape didn't validate correctly to the sequences and I got a static shape in -showTool and a hard crash when the mission loaded the player[ie, no animations loaded]. I went back in Milkshape3D and had to regroup my many groupings into one single Mesh and then exported. The resulting shape attached correctly and I acheived perfect ground plane placement(feet exactly on the ground, NO FLOATING!)...
the workers are taking a small break now...more later
...that 'driver' Rex, breaks over and more to add: only that the Node alignments were perfect. Our CTF avatar mounted exactly as before, and the vehicle mounting was also exactly the same as my existing test avatar.:) I'm wondering if a SMD of the skeleton in a SKIN pose could be used to get the mesh into it's all-important ROOT postition. Do the animate to pose-export as OBJ trick...?!? Might help, it's a hard pose to build a mesh to; wish Milkfarm had the Frame0 as a reference.
NOTE TO ALL: Chris Robertson has brought the Milkshape program to New Heights of utilization for scores of developers. Milkshape can now produce content on a superior level, rivaling the very best in 3D software. Was that a shudder or a tremble I just heard? :)
Here's a snapshot of my test avatar[534Faces], mounted on a vehicle[gatlingun,1158Faces:weapon/vehicle/2wheels] and has a GoldRush{copyright(c) 2004, InspiredGames.net, all rights reserved} avatar mounted to the player. Sorry for the darkness...
#23
Yes, I should have mentioned that. Any mesh whose vertices are all attached to only a single bone is a rigid mesh. Any mesh whose vertices are attached to more than one bone is a 'skin'. Models must be skinned meshes to make use of the DSQ animations.
Agreed. I was thinking about adding a configuration option to the exporter like, "Use frame 1 as reference frame" or something. Not sure if that would be feasible though, as all the mesh/vertex information is stored relative to the actual bone position/rotation.
07/26/2004 (12:29 pm)
Hi Rex,Quote:I found a slight caveat in the workings of the linking to the default DSQ's and the exporter, perhaps
Yes, I should have mentioned that. Any mesh whose vertices are all attached to only a single bone is a rigid mesh. Any mesh whose vertices are attached to more than one bone is a 'skin'. Models must be skinned meshes to make use of the DSQ animations.
Quote:it's a hard pose to build a mesh to
Agreed. I was thinking about adding a configuration option to the exporter like, "Use frame 1 as reference frame" or something. Not sure if that would be feasible though, as all the mesh/vertex information is stored relative to the actual bone position/rotation.
#24
07/27/2004 (9:52 am)
Quote:Just let me know how to get it checked in :)Info on submitting patches can be found here. If you'd prefer to wait until you get a new major release before submitting the patch, I can link to a resource page from the docs and the exporter matrix that you could keep updated.
Torque Owner Christopher J. White