zenarion@Posted: Mon Oct 09, 2006 7:12 am    Post subject: : Yeah i solved it.
But i had to use der_ton's exporter for this one.
Damnit, now to make all the AFs Crying or Very sad



BeRSeRKeR@Posted: Mon Aug 23, 2004 3:46 am    Post subject: Another MD5 Exporter for MAX/gmax: So I've finally take the time to finish my MD5 exporter. I haven't had too much time to test it but I tried to import some Doom III models (imp and fatty) into MAX and then re-export them with my exporter and the results seem to be correct. BTW, I have only tested the exporter in MAX6.

The worst of this exporter is that takes up too much time for meshes with a medium/high poly count. That's because, to avoid duplicated vertices, I have to, for each face index, loop through the final list of vertices and compare vertex & texture coordinates for each vertex in the list.

Another thing that bugs me is that, when I animate a bone using a LookAt controller (the bone is linked to a node who indicates the bone the direction to look at), the exporter doesn't detect the transform for that bone so no animated components for this bone are exported.

Anyway, hope you find it useful. There is a help file (in spanish and "english" Smile) into the zip file explaining all about the exporter.

I want to thank bozo for the MD5 specs and der_ton for his MD5 viewer. That way I were able to test my exporter fast and easily. Smile

Download MD5Export for MAX (outdated)
Download MD5Export for gmax (outdated)


UPDATE (08/16/05): new version of the MAX/GMAX MD5 exporters!. Now you can use any node as a bone in the skin modifier (MAX standard bones, CAT, biped, etc) among other improvements.

MD5.MAX.Exporter.For.Skin.Modifier
MD5.GMAX.Exporter.For.Skin.Modifier

Enjoy!.


Last edited by BeRSeRKeR on Tue Aug 16, 2005 7:48 am; edited 6 times in total



der_ton@Posted: Mon Aug 23, 2004 11:00 am    Post subject: : Nice job!

From one single test I noticed there is something wrong with the model's orientation, but apart from that it worked.

I took a look at the code, and some of that looks familiar, but that's probably because some stuff has to be done the same way. But if you took some inspiration from my exporter, credits would be nice (no hard feelings if I'm wrong. Anyway, if my exporter wouldn't exist, I'm sure you would have been able to do yours just as well. Don't get me wrong here. Smile )
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



BeRSeRKeR@Posted: Mon Aug 23, 2004 2:35 pm    Post subject: :
der_ton wrote:
Nice job!

Thanks! Smile

der_ton wrote:
From one single test I noticed there is something wrong with the model's orientation, but apart from that it worked.

I'll take a look at it.

der_ton wrote:
I took a look at the code, and some of that looks familiar, but that's probably because some stuff has to be done the same way. But if you took some inspiration from my exporter, credits would be nice

I have to admit that I took a look at your exporter when I came to a point the bone orientations were not correctly. I found the solution in the:

if (q.w < 0) do ....switch the sign of the quat components

and that was before I read the post of bozo where he exposed this solution so I guess I should credit you. And well, if you see something more, similar to your code let me know, please. Besides that, I don't remember more things.

I have credited people in the help file, you included but only for the md5 viewer so I will credit you for your exporter. I'm not here to make enemies. Wink

Said that. I want to comment something about your code. You have a function that converts a left handed matrix to a right handed one. I thought that MAX stored rotations in a right handed way. So is that for something special or to assure that the matrices are correct?. I say that because I don't convert the matrices to right handed and all seems to work. But who know, always exists a case that destroys all your theories. Laughing

One thing more. Your exporter takes less time to export the geometry than mine. As I said before, that's because, to avoid duplicated vertices, I have to, for each face index, loop through the final list of vertices and compare vertex and texture coordinates for each vertex in the list. Do you do something like that or do you export duplicated vertices?.

That's all for now. And sorry for any inconvenience.

Greetings.



bozo@Posted: Mon Aug 23, 2004 2:51 pm    Post subject: : @BeRSeRKeR

Quote:
You have a function that converts a left handed matrix to a right handed one.


i think, when you create bones via mirror them, than this mirrored bones have this left-handed matrixes and the code fix this

some times ago i only made a quick test of this and it seems to do the work properly



BeRSeRKeR@Posted: Mon Aug 23, 2004 2:58 pm    Post subject: : Forgot to mention that to get the rotation and position of the bones, I was using the "rotation" and "pos" members of the node class but it didn't work in all cases. I always thought that the "transform" member was the result of doing:

mat = node.rotation as Matrix3
mat.row4 = node.pos

but ok, seems not to be the same. So this part is another thing I saw in your code.

Anyway I have updated the exporter and I have credited you for your exporter. Also, I have put a reference to you and bozo in the MD5AnimExporter.ms file.

Greets.



BeRSeRKeR@Posted: Mon Aug 23, 2004 3:02 pm    Post subject: :
bozo wrote:
i think, when you create bones via mirror them, than this mirrored bones have this left-handed matrixes and the code fix this some times ago i only made a quick test of this and it seems to do the work properly

The truth is that I haven't rigged a mesh in my life so things like mirroring bones escapes from my understanding. Smile

I will change that.

Thanks.



bozo@Posted: Mon Aug 23, 2004 3:09 pm    Post subject: : you are not alone Wink

i am a coder and do only some really simple modeling stuff for testing-only

btw. nice work Smile



der_ton@Posted: Mon Aug 23, 2004 3:33 pm    Post subject: : Berserker, I'm totally ok with all of that. Smile

The thing with the mirrored bones matrices resulting in lefthanded bones came up with a model that 7318 did once. If you scale a bone negatively, then the transform matrix becomes lefthanded.
That is also related to the fact that the "transform" property is not necessarily the same as the combined "pos * quat as matrix". That is also mentioned in the maxscript documentation:
Quote:
Take care when mixing rotation derived from these matrices and rotation used in rotation-related functions or from rotation properties.


About the duplicate vertices, I don't check for that, nope. But I'm not sure if that's necessary. Maybe that's related to another difference in our exporters. Yours collapses each mesh to use one material (even if it uses submaterials), while mine splits it into md5 submeshes according to the used submaterials. I think your way of creating submeshes is to export multiple mesh objects from 3dmax.

BTW, I encountered a real problem with exporting via maxscript, it affects both our exporters. The 6 digit precision of float output is not enough, my camera importer/exporter is done but the problem is really evident there, because the quaternions need better precision.
The problem can also be seen when you export a mesh (with your or my exporter) and import it with my importer again, then there are some slight deviations. I'll think about a custom print function for floats. I don't know of a way to tell Maxscript to use better precision for the built-in print float.
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



BeRSeRKeR@Posted: Mon Aug 23, 2004 3:54 pm    Post subject: :
der_ton wrote:
Berserker, I'm totally ok with all of that. Smile

Nice. Smile

der_ton wrote:
The thing with the mirrored bones matrices resulting in lefthanded bones came up with a model that 7318 did once. If you scale a bone negatively, then the transform matrix becomes lefthanded.
That is also related to the fact that the "transform" property is not necessarily the same as the combined "pos * quat as matrix".

Thanks for the explanation. I have implemented your right handed funcion and now, when using mirrored bones, the orientation is ok but the faces affected by these bones are reversed!. I'll have to take a look on it.


der_ton wrote:
I think your way of creating submeshes is to export multiple mesh objects from 3dmax.

Exactly. With my exporter, only one material can be assigned to one mesh so if you want to export multiple meshes with different materials assigned, also, you have to have multiple meshes in MAX.

der_ton wrote:
I'll think about a custom print function for floats. I don't know of a way to tell Maxscript to use better precision for the built-in print float.

Yeah, that's a real problem. I have implemented a function that reduces the decimal count of a number down to 5 but as you said, seems not to be sufficient.

Greets.



BeRSeRKeR@Posted: Mon Aug 23, 2004 6:14 pm    Post subject: : I have updated the exporter so now takes into account left/right handed matrices. Seems to work ok but I have found a case where the faces affected by the "left-handed bones" are reversed so you can see the "inner" of the mesh. Thanks to der_ton a bozo for help me. That's a great forum where coexists great artists and great coders too! Wink

Download (same URL as above)

So now I have some stuff in mind. I'm thinking of supports biped bones and give the option to export "physiqued" meshes. My first attempt to write a MD5 exporter (when the leaked alpha came up) was using physique to export skinned meshes so if I have time enough, I could try this.

Of course, I have to add support for md5camera too! Smile

Greets.



BeRSeRKeR@Posted: Mon Aug 23, 2004 7:30 pm    Post subject: : I have a question regarding md5camera file format.

Here is a snip of data:

Code:
cuts {
   96
   148
   198
   290
   324
}

camera {
   ( 1781.0610351563 293.2318115234 70.8310394287 ) ( 0.09791141 -0.0939290896 -0.714956522 ) 72.1649246216
   ....
}


Seems to be clear that first triplet is the camera position, the second is the camera orientation and finally the camera fov (correct me if I'm wrong, please).

But now the cuts stuff. I think is a way to specify different "camera takes" so, in the example above, one take would be from 0 to 98, another from 99 to 148, and so on. Is this correct?.

Thanks.



der_ton@Posted: Mon Aug 23, 2004 7:40 pm    Post subject: : Yep. Actually, the only reason why that's in there is because the engine has to know when NOT to interpolate between two keyframes.
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



BeRSeRKeR@Posted: Mon Aug 23, 2004 7:54 pm    Post subject: :
der_ton wrote:
Actually, the only reason why that's in there is because the engine has to know when NOT to interpolate between two keyframes.

Yes. Makes sense.

Thanks much.



der_ton@Posted: Wed Aug 25, 2004 12:43 am    Post subject: : The precision issue I was talking about was not the reason why I had these big deviations, that was a typo in a formula I had in there. The problem was not in the v.91 and is ofcourse not in v.92 of the script. I don't know if the 6 digit precision of maxscript's float printing is enough, so I wrote this:
Code:
fn printfloat flt =
--maxscript doesn't provide a way to format float output that I know of. It seems that Doom3 does not understand the <x>e<y> notation of floats
--if you plan to use this in your scripts, note that this function doesn't check against a large number passed in
(
   --if (abs flt)>10.0 then return flt -- this could be used to gain some speed.
   --else
   local numdigits = 10
   (
      str = ""
      if flt<0 then str += "-"
      flt2 = abs flt
      str += ((flt2 as integer) as string)
      flt2 -= (flt2 as integer)
      str +="."
      for i=1 to numdigits do
      (
         flt2 *=10.0
         str += ((flt2 as integer) as string)
         flt2 -= (flt2 as integer)
      )
      return str
   )
)

Feel free to use if you think it is necessary.

BTW, in my new version of the scripts, I added the function for reading the animationRange interval to preset the input values in the GUI, I've seen that your script does that and it's ofcourse a useful detail. Smile
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



BeRSeRKeR@Posted: Wed Aug 25, 2004 12:52 am    Post subject: :
der_ton wrote:
Feel free to use if you think it is necessary.

Thanks for share. I will take a look on it.

der_ton wrote:
BTW, in my new version of the scripts, I added the function for reading the animationRange interval to preset the input values in the GUI, I've seen that your script does that and it's ofcourse a useful detail. Smile

Yes. It's a good thing. Now I'm trying to design a good way to expose the camera cuts to the user. I'm trying to do it the more easy as possible.

Thanks.



Aphax@Posted: Wed Aug 25, 2004 5:30 am    Post subject: : You know, you guys seem to put quite an amount of effort into your exporting tools, but from what I understand they basically do the same. Why not colaberate and work on a single, powerful, exporter? Very Happy I'm sorry if this is a really bad suggestion and you guys rather work on your own thing, but I figured having two geniusses working on the same tool would make it even better Wink


der_ton@Posted: Wed Aug 25, 2004 9:30 am    Post subject: : I think it's not a bad thing that there are two different exporters available. Berserker's exporter works a bit differently, requiring to have each object to use a standard material, but being able to export multiple objects, while my exporter exports only one object, but it can have several textures via multi/submaterials (but I might change that).
Working on the same stuff as a team introduces communication overhead and problems with keeping track of versions.

As long as we allow each other to use the code freely and help each other out by discussion on the forum, I think we have a pretty efficient way of handling it.
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



obihb@Posted: Wed Aug 25, 2004 11:04 am    Post subject: :
Quote:
.... but it can have several textures via multi/submaterials (but I might change that).

Please don't get rid of that!.. Smile If that's what you mean by changing it.



der_ton@Posted: Wed Aug 25, 2004 11:49 am    Post subject: : No I won't get rid of that. Smile
My importer imports in the same format, so that's gonna be left in forever. But I might add the option to select more than one object for export, like Berserker's exporter does (note that I had that in the todo list from the first release of my exporter, though).
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



BeRSeRKeR@Posted: Wed Aug 25, 2004 7:09 pm    Post subject: :
Aphax wrote:
I'm sorry if this is a really bad suggestion and you guys rather work on your own thing, but I figured having two geniusses working on the same tool would make it even better Wink

Not a bad idea at all. Anyway we are sharing code so that's a form of collaboration and a way to speed up the development. And of course, I think we, coders, are a bit reticent to work in group. Each one has his/her code style, his/her obsessions, etc. Smile

And comming back to the exporter, I have found a "bug" in MAX. Actually I don't know if it's a bug or a windows limitation. When you call the function getSaveFileName with a long extension (more than 8 chars), MAX throws an unhandled exception. You can try that executing this in "MAXScript Listener":

Code:
getSaveFileName caption:"Save MD5Camera" types:"Doom III MD5Camera (*.md5camera)|*.md5camera"


A save dialog will be shown where you have to specify the file location and name. So if you don't add the ".md5camera" extension manually to the name of the file, the exception will be thrown.

I have seen that der_ton add automatically a file name and the extension but does exist another way around this?

When I solve this problem I'll release the new version with md5camera support.

Greets.



BeRSeRKeR@Posted: Mon Aug 23, 2004 3:46 am    Post subject: Another MD5 Exporter for MAX/gmax: So I've finally take the time to finish my MD5 exporter. I haven't had too much time to test it but I tried to import some Doom III models (imp and fatty) into MAX and then re-export them with my exporter and the results seem to be correct. BTW, I have only tested the exporter in MAX6.

The worst of this exporter is that takes up too much time for meshes with a medium/high poly count. That's because, to avoid duplicated vertices, I have to, for each face index, loop through the final list of vertices and compare vertex & texture coordinates for each vertex in the list.

Another thing that bugs me is that, when I animate a bone using a LookAt controller (the bone is linked to a node who indicates the bone the direction to look at), the exporter doesn't detect the transform for that bone so no animated components for this bone are exported.

Anyway, hope you find it useful. There is a help file (in spanish and "english" Smile) into the zip file explaining all about the exporter.

I want to thank bozo for the MD5 specs and der_ton for his MD5 viewer. That way I were able to test my exporter fast and easily. Smile

Download MD5Export for MAX (outdated)
Download MD5Export for gmax (outdated)


UPDATE (08/16/05): new version of the MAX/GMAX MD5 exporters!. Now you can use any node as a bone in the skin modifier (MAX standard bones, CAT, biped, etc) among other improvements.

MD5.MAX.Exporter.For.Skin.Modifier
MD5.GMAX.Exporter.For.Skin.Modifier

Enjoy!.


Last edited by BeRSeRKeR on Tue Aug 16, 2005 7:48 am; edited 6 times in total



der_ton@Posted: Mon Aug 23, 2004 11:00 am    Post subject: : Nice job!

From one single test I noticed there is something wrong with the model's orientation, but apart from that it worked.

I took a look at the code, and some of that looks familiar, but that's probably because some stuff has to be done the same way. But if you took some inspiration from my exporter, credits would be nice (no hard feelings if I'm wrong. Anyway, if my exporter wouldn't exist, I'm sure you would have been able to do yours just as well. Don't get me wrong here. Smile )
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



BeRSeRKeR@Posted: Mon Aug 23, 2004 2:35 pm    Post subject: :
der_ton wrote:
Nice job!

Thanks! Smile

der_ton wrote:
From one single test I noticed there is something wrong with the model's orientation, but apart from that it worked.

I'll take a look at it.

der_ton wrote:
I took a look at the code, and some of that looks familiar, but that's probably because some stuff has to be done the same way. But if you took some inspiration from my exporter, credits would be nice

I have to admit that I took a look at your exporter when I came to a point the bone orientations were not correctly. I found the solution in the:

if (q.w < 0) do ....switch the sign of the quat components

and that was before I read the post of bozo where he exposed this solution so I guess I should credit you. And well, if you see something more, similar to your code let me know, please. Besides that, I don't remember more things.

I have credited people in the help file, you included but only for the md5 viewer so I will credit you for your exporter. I'm not here to make enemies. Wink

Said that. I want to comment something about your code. You have a function that converts a left handed matrix to a right handed one. I thought that MAX stored rotations in a right handed way. So is that for something special or to assure that the matrices are correct?. I say that because I don't convert the matrices to right handed and all seems to work. But who know, always exists a case that destroys all your theories. Laughing

One thing more. Your exporter takes less time to export the geometry than mine. As I said before, that's because, to avoid duplicated vertices, I have to, for each face index, loop through the final list of vertices and compare vertex and texture coordinates for each vertex in the list. Do you do something like that or do you export duplicated vertices?.

That's all for now. And sorry for any inconvenience.

Greetings.



bozo@Posted: Mon Aug 23, 2004 2:51 pm    Post subject: : @BeRSeRKeR

Quote:
You have a function that converts a left handed matrix to a right handed one.


i think, when you create bones via mirror them, than this mirrored bones have this left-handed matrixes and the code fix this

some times ago i only made a quick test of this and it seems to do the work properly



BeRSeRKeR@Posted: Mon Aug 23, 2004 2:58 pm    Post subject: : Forgot to mention that to get the rotation and position of the bones, I was using the "rotation" and "pos" members of the node class but it didn't work in all cases. I always thought that the "transform" member was the result of doing:

mat = node.rotation as Matrix3
mat.row4 = node.pos

but ok, seems not to be the same. So this part is another thing I saw in your code.

Anyway I have updated the exporter and I have credited you for your exporter. Also, I have put a reference to you and bozo in the MD5AnimExporter.ms file.

Greets.



BeRSeRKeR@Posted: Mon Aug 23, 2004 3:02 pm    Post subject: :
bozo wrote:
i think, when you create bones via mirror them, than this mirrored bones have this left-handed matrixes and the code fix this some times ago i only made a quick test of this and it seems to do the work properly

The truth is that I haven't rigged a mesh in my life so things like mirroring bones escapes from my understanding. Smile

I will change that.

Thanks.



bozo@Posted: Mon Aug 23, 2004 3:09 pm    Post subject: : you are not alone Wink

i am a coder and do only some really simple modeling stuff for testing-only

btw. nice work Smile



der_ton@Posted: Mon Aug 23, 2004 3:33 pm    Post subject: : Berserker, I'm totally ok with all of that. Smile

The thing with the mirrored bones matrices resulting in lefthanded bones came up with a model that 7318 did once. If you scale a bone negatively, then the transform matrix becomes lefthanded.
That is also related to the fact that the "transform" property is not necessarily the same as the combined "pos * quat as matrix". That is also mentioned in the maxscript documentation:
Quote:
Take care when mixing rotation derived from these matrices and rotation used in rotation-related functions or from rotation properties.


About the duplicate vertices, I don't check for that, nope. But I'm not sure if that's necessary. Maybe that's related to another difference in our exporters. Yours collapses each mesh to use one material (even if it uses submaterials), while mine splits it into md5 submeshes according to the used submaterials. I think your way of creating submeshes is to export multiple mesh objects from 3dmax.

BTW, I encountered a real problem with exporting via maxscript, it affects both our exporters. The 6 digit precision of float output is not enough, my camera importer/exporter is done but the problem is really evident there, because the quaternions need better precision.
The problem can also be seen when you export a mesh (with your or my exporter) and import it with my importer again, then there are some slight deviations. I'll think about a custom print function for floats. I don't know of a way to tell Maxscript to use better precision for the built-in print float.
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



BeRSeRKeR@Posted: Mon Aug 23, 2004 3:54 pm    Post subject: :
der_ton wrote:
Berserker, I'm totally ok with all of that. Smile

Nice. Smile

der_ton wrote:
The thing with the mirrored bones matrices resulting in lefthanded bones came up with a model that 7318 did once. If you scale a bone negatively, then the transform matrix becomes lefthanded.
That is also related to the fact that the "transform" property is not necessarily the same as the combined "pos * quat as matrix".

Thanks for the explanation. I have implemented your right handed funcion and now, when using mirrored bones, the orientation is ok but the faces affected by these bones are reversed!. I'll have to take a look on it.


der_ton wrote:
I think your way of creating submeshes is to export multiple mesh objects from 3dmax.

Exactly. With my exporter, only one material can be assigned to one mesh so if you want to export multiple meshes with different materials assigned, also, you have to have multiple meshes in MAX.

der_ton wrote:
I'll think about a custom print function for floats. I don't know of a way to tell Maxscript to use better precision for the built-in print float.

Yeah, that's a real problem. I have implemented a function that reduces the decimal count of a number down to 5 but as you said, seems not to be sufficient.

Greets.



BeRSeRKeR@Posted: Mon Aug 23, 2004 6:14 pm    Post subject: : I have updated the exporter so now takes into account left/right handed matrices. Seems to work ok but I have found a case where the faces affected by the "left-handed bones" are reversed so you can see the "inner" of the mesh. Thanks to der_ton a bozo for help me. That's a great forum where coexists great artists and great coders too! Wink

Download (same URL as above)

So now I have some stuff in mind. I'm thinking of supports biped bones and give the option to export "physiqued" meshes. My first attempt to write a MD5 exporter (when the leaked alpha came up) was using physique to export skinned meshes so if I have time enough, I could try this.

Of course, I have to add support for md5camera too! Smile

Greets.



BeRSeRKeR@Posted: Mon Aug 23, 2004 7:30 pm    Post subject: : I have a question regarding md5camera file format.

Here is a snip of data:

Code:
cuts {
   96
   148
   198
   290
   324
}

camera {
   ( 1781.0610351563 293.2318115234 70.8310394287 ) ( 0.09791141 -0.0939290896 -0.714956522 ) 72.1649246216
   ....
}


Seems to be clear that first triplet is the camera position, the second is the camera orientation and finally the camera fov (correct me if I'm wrong, please).

But now the cuts stuff. I think is a way to specify different "camera takes" so, in the example above, one take would be from 0 to 98, another from 99 to 148, and so on. Is this correct?.

Thanks.



der_ton@Posted: Mon Aug 23, 2004 7:40 pm    Post subject: : Yep. Actually, the only reason why that's in there is because the engine has to know when NOT to interpolate between two keyframes.
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



BeRSeRKeR@Posted: Mon Aug 23, 2004 7:54 pm    Post subject: :
der_ton wrote:
Actually, the only reason why that's in there is because the engine has to know when NOT to interpolate between two keyframes.

Yes. Makes sense.

Thanks much.



der_ton@Posted: Wed Aug 25, 2004 12:43 am    Post subject: : The precision issue I was talking about was not the reason why I had these big deviations, that was a typo in a formula I had in there. The problem was not in the v.91 and is ofcourse not in v.92 of the script. I don't know if the 6 digit precision of maxscript's float printing is enough, so I wrote this:
Code:
fn printfloat flt =
--maxscript doesn't provide a way to format float output that I know of. It seems that Doom3 does not understand the <x>e<y> notation of floats
--if you plan to use this in your scripts, note that this function doesn't check against a large number passed in
(
   --if (abs flt)>10.0 then return flt -- this could be used to gain some speed.
   --else
   local numdigits = 10
   (
      str = ""
      if flt<0 then str += "-"
      flt2 = abs flt
      str += ((flt2 as integer) as string)
      flt2 -= (flt2 as integer)
      str +="."
      for i=1 to numdigits do
      (
         flt2 *=10.0
         str += ((flt2 as integer) as string)
         flt2 -= (flt2 as integer)
      )
      return str
   )
)

Feel free to use if you think it is necessary.

BTW, in my new version of the scripts, I added the function for reading the animationRange interval to preset the input values in the GUI, I've seen that your script does that and it's ofcourse a useful detail. Smile
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



BeRSeRKeR@Posted: Wed Aug 25, 2004 12:52 am    Post subject: :
der_ton wrote:
Feel free to use if you think it is necessary.

Thanks for share. I will take a look on it.

der_ton wrote:
BTW, in my new version of the scripts, I added the function for reading the animationRange interval to preset the input values in the GUI, I've seen that your script does that and it's ofcourse a useful detail. Smile

Yes. It's a good thing. Now I'm trying to design a good way to expose the camera cuts to the user. I'm trying to do it the more easy as possible.

Thanks.



Aphax@Posted: Wed Aug 25, 2004 5:30 am    Post subject: : You know, you guys seem to put quite an amount of effort into your exporting tools, but from what I understand they basically do the same. Why not colaberate and work on a single, powerful, exporter? Very Happy I'm sorry if this is a really bad suggestion and you guys rather work on your own thing, but I figured having two geniusses working on the same tool would make it even better Wink


der_ton@Posted: Wed Aug 25, 2004 9:30 am    Post subject: : I think it's not a bad thing that there are two different exporters available. Berserker's exporter works a bit differently, requiring to have each object to use a standard material, but being able to export multiple objects, while my exporter exports only one object, but it can have several textures via multi/submaterials (but I might change that).
Working on the same stuff as a team introduces communication overhead and problems with keeping track of versions.

As long as we allow each other to use the code freely and help each other out by discussion on the forum, I think we have a pretty efficient way of handling it.
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



obihb@Posted: Wed Aug 25, 2004 11:04 am    Post subject: :
Quote:
.... but it can have several textures via multi/submaterials (but I might change that).

Please don't get rid of that!.. Smile If that's what you mean by changing it.



der_ton@Posted: Wed Aug 25, 2004 11:49 am    Post subject: : No I won't get rid of that. Smile
My importer imports in the same format, so that's gonna be left in forever. But I might add the option to select more than one object for export, like Berserker's exporter does (note that I had that in the todo list from the first release of my exporter, though).
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



BeRSeRKeR@Posted: Wed Aug 25, 2004 7:09 pm    Post subject: :
Aphax wrote:
I'm sorry if this is a really bad suggestion and you guys rather work on your own thing, but I figured having two geniusses working on the same tool would make it even better Wink

Not a bad idea at all. Anyway we are sharing code so that's a form of collaboration and a way to speed up the development. And of course, I think we, coders, are a bit reticent to work in group. Each one has his/her code style, his/her obsessions, etc. Smile

And comming back to the exporter, I have found a "bug" in MAX. Actually I don't know if it's a bug or a windows limitation. When you call the function getSaveFileName with a long extension (more than 8 chars), MAX throws an unhandled exception. You can try that executing this in "MAXScript Listener":

Code:
getSaveFileName caption:"Save MD5Camera" types:"Doom III MD5Camera (*.md5camera)|*.md5camera"


A save dialog will be shown where you have to specify the file location and name. So if you don't add the ".md5camera" extension manually to the name of the file, the exception will be thrown.

I have seen that der_ton add automatically a file name and the extension but does exist another way around this?

When I solve this problem I'll release the new version with md5camera support.

Greets.



Banzai@Posted: Wed Jun 08, 2005 7:58 am    Post subject: Error: -- Unkown property: "name" undefined:
evilartist/pickle_yeah/Killinplayer wrote:
Whenever I try to export, It shows an error message:

-- Unknown property: "name" in undefined



Hi Guyz,

I'm really a newbie about Modelling 4 Games and i use the gmax-MD5-Exporter today the first time.

I've the same Error, but now I know how to solve ;o)

You MUST have a UVW-Map (or another Mapping-Info and Material I think) join to your Mesh. Then the gmax-Exporter works fine!


Banz


PS: Excuse my bad english, I'm a old german man and it's hard to learn another language.



Banzai@Posted: Wed Jun 08, 2005 8:08 am    Post subject: BeRsErKeR gmax-Exporter: Me again...

one thing i didn't knew at this time:

WHERE export the Script the meshes/anims????? It's a long way, to scan > 80GB Harddisks....

Can someone help?

Banz



der_ton@Posted: Wed Jun 08, 2005 9:28 am    Post subject: : It outputs to the MaxScript listener window (open it in the menu or with F12 if I remember correctly)
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



Banzai@Posted: Wed Jun 08, 2005 11:31 am    Post subject: : OK, thx 4 answer, i see....

but there is no 'Save As...'-Dialog implemented and Ctrl-A (or Mouse_Drag or anythingelse) select only 1/20 of the whole text.

I don't think it's a good editor (or my system malfunctional?)....

Think, I must find out a way, to Save this #@€~*# to file....


Thx a lot

Banz
_________________
I spiik english werry well, bröck'lersweis und gaornet schnell....



der_ton@Posted: Wed Jun 08, 2005 3:14 pm    Post subject: : Did you read the exporter's readme, or this thread? It will clear things up I'm sure...
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



Banzai@Posted: Wed Jun 08, 2005 10:14 pm    Post subject: : Yes, i read this thread and i read the exporter manual, but can't find anything tells me how to save the Listener-Output to a file in a simple way (Did I write, that my english is very bad?).

BeRSeRKeR wrote:
GMax has some limitations. One of them is that you can select only 10K characters at a time in the MAXScript Listener window. However, there are some tools to avoid this limitation. Of course, doing this you will be breaking the gmax EULA.


It's pretty good, that there are tools to manipulate this limitations, but i don't know some.... Why don't exists a normal SaveAs-Funktion (I know nothing about Maxscript, so please excuse this Lamer-Question), or is there a conflict with EULA too?

BeRSeRKeR did a great job in this script and i hope, nobody spend to much time for answering me.

Banz
_________________
I spiik english werry well, bröck'lersweis und gaornet schnell....



doomkid3000@Posted: Thu Jun 09, 2005 8:22 pm    Post subject: : i have just the thing for you guys, GMaxSLGRAB is a little utility for the Gmax Listener Window, that saves all text and then lets you save it to any file format, example .md5anim im very happy with this little utility, it has save me loads of times having to drag my dam mouse over the listener window for animations, here's the link

http://www.icecreamhasnobones.org/GMaxThing/GMaxSLGRAB.zip

ENJOY Smile

here's were i found it
http://cloud.prohosting.com/talone/gmax/render.html



Banzai@Posted: Thu Jun 09, 2005 10:35 pm    Post subject: : Many many Thanks for this information... it's hard to find such things...

Many thanks also to der_ton, BeRSeRkER any anyother guyz, who have done a good job with this forum...


Banz
_________________
I spiik english werry well, bröck'lersweis und gaornet schnell....



BeRSeRKeR@Posted: Fri Aug 12, 2005 7:55 pm    Post subject: : Hello everybody.

I'm so sorry for not answer your questions before.

Well, the MD5 exporter for Character Studio seems to have some problems with some types of weights, so (sometimes) the mesh deforms incorrectly. That's the reason I have not release this exporter yet.

Yesterday I was doing some changes in the exporter (the skin modifier version) because one of the artists uses CAT as animation system and the previous version of my exporter only supported MAX bones. So the new version supports (in theory) any node you use as a bone with the skin modifier (standard MAX bones, CAT, biped I guess, etc).

You can download the new version for the skin modifier here. Hope it works... Very Happy

Here's a list of (important) things to do:

  • Reduce the amount of time needed to export the mesh.
  • A progress bar.

I expect to release the gmax version soon.

Greets.



BeRSeRKeR@Posted: Sat Aug 13, 2005 12:59 am    Post subject: : Hi again. Smile

I have updated the MAX exporter and redone the GMAX version. Hope it still works after all the changes I've done!. Very Happy

Downloads:

MD5.MAX.Exporter.For.Skin.Modifier
MD5.GMAX.Exporter.For.Skin.Modifier

It works the same way than before (the UI is the same), the changes only affect the source code.

Greets.

WARNING: note that the links to the new exporters are different than the previous versions!.
_________________
Excuse my bad english. Smile



BeRSeRKeR@Posted: Sat Aug 13, 2005 4:12 am    Post subject: : By the way, I've received some messages asking for the MD5 exporter for Character Studio. As I stated before, this exporter has some problems with the weights and I don't know if I'll give it a chance so...

Fortunately, there's another option for the people that still want to make use of Character Studio and be able to export to MD5. You can download an utility plugin from sparks.discreet.com named phy2skin that converts a "physiqued" mesh to a skinned mesh. I have uploaded this plugin to my ftp so you don't need to register in sparks. You can download it here.

Once you convert the physique mesh to skin, you can export your model with one of the MD5 exporters available for the skin modifier.

Hope you'll find this interesting.
_________________
Excuse my bad english. Smile



evilartist@Posted: Sat Aug 13, 2005 4:39 am    Post subject: : Very useful, Berserker!

Are you going to make other new exporters for gmax? .ASE? .LWO? OBJ.? Those would also be quite useful.
_________________
<Enter retarded, poorly thought-up sig here.>



iceheart@Posted: Sat Aug 13, 2005 4:58 am    Post subject: : Speaking of that, does anyone know of a LWO importer/exporter for MAX 7?
_________________
Staff
www.modwiki.net - wiki resource for all Doom 3 engine-based games.



BeRSeRKeR@Posted: Sat Aug 13, 2005 5:39 am    Post subject: :
evilartist wrote:
Are you going to make other new exporters for gmax? .ASE? .LWO? OBJ.? Those would also be quite useful.

Exists an obj exporter for gmax. You can download it here. I haven't tried it though.

Greets.
_________________
Excuse my bad english. Smile



evilartist@Posted: Sat Aug 13, 2005 5:58 pm    Post subject: :
BeRSeRKeR wrote:
evilartist wrote:
Are you going to make other new exporters for gmax? .ASE? .LWO? OBJ.? Those would also be quite useful.

Exists an obj exporter for gmax. You can download it here. I haven't tried it though.

Greets.


Sorry. My bad. I meant an OBJ importer.
_________________
<Enter retarded, poorly thought-up sig here.>



BeRSeRKeR@Posted: Sat Aug 13, 2005 11:54 pm    Post subject: : Here you have some importers/exporters for gmax. I think the obj importer has some problems but the 3ds importer seems to work ok (only tested with a simple cube Smile).

Greets.
_________________
Excuse my bad english. Smile



evilartist@Posted: Sun Aug 14, 2005 1:37 am    Post subject: : Damn, I wish those sites would appear first on my searches. Mad

Yeah, there's a problem with the OBJ importer. The OBJ won't show, but thanks anyways.
_________________
<Enter retarded, poorly thought-up sig here.>



RedWolf@Posted: Wed Aug 17, 2005 10:35 pm    Post subject: : Quick Question, does this exporter work with gmax 1.2? Or, does anyone else have a problem that clicking on "add" does nothing, even though you can hit H and select the nodes?

thx Smile

EDIT:
I with draw my question, (don't want to affend anyone) I'f I come up with the answer I'll post it for someone else...

(Perhaps this is a stupid question, I have no idea what I'm with GMAX, but managed to get the animations to work correctly for my replaced gun, but it won't export Sad ) That's ok, Ill try and see if I can repeat what I did over there in blender, and see if it will export...
_________________
RedWolf
"Now go vote and participate in your own oppression." -dataangel
The Anti-Lie



BeRSeRKeR@Posted: Fri Aug 19, 2005 6:34 am    Post subject: : Yes, it works with gmax 1.2. I have tested the Add button right now and works ok. Take into account that the add button only supports geometry class nodes and nodes that have not been already selected.

Greets.

EDIT: by the way, the Add button doesn't add the selected node (maybe I should do it that way). When you press the Add button, you have to click on the right node.
_________________
Excuse my bad english. Smile



RedWolf@Posted: Sat Aug 20, 2005 11:54 pm    Post subject: : Thx, Berserker.

I'm not sure why, maybe it's not geometry based. (Like I said, I know little about this stuff. - The mesh is an imported one, deleted the weapon, and replaced with one that I have successfully gotten into the game before It is triangle based if thats what geometry based means?)

When I press the "add" button it does nothing, Also, I've tried both selecting and deselecting the nodes, and no matter what is there the add button does nothing. (Whether it is selected or not the add button does nothing - there is no list to select from if I hit H there is though...) Also, the other add button does work, though you have to click in the corners.

Also all the other buttons work ok...

It's probably my setup or something. Thx anyway...

Anyway, it was just a 5 min test object thats not even textured or anything to see If I could get it to replace an existing weapon...

If you import a md5mesh, and animation, is there something that would need to be done, to get it to export correctly?
_________________
RedWolf
"Now go vote and participate in your own oppression." -dataangel
The Anti-Lie



BeRSeRKeR@Posted: Sun Aug 21, 2005 1:34 am    Post subject: : With valid geometry I mean editable poly or editable mesh. I have captured a little video where I demostrate how it works the "Add" button. Is that the way you do it?. Is really weird that something so simple doesn't work.

Greets.
_________________
Excuse my bad english. Smile



RedWolf@Posted: Mon Aug 22, 2005 9:49 am    Post subject: : Thanks again for your help, and the vid. Nothing happens when I click the "add" button, no matter how I try to do it.

Are there any situations where the ADD button won't even work. (It looks like it becomes orange-ish, it doesn't do that or anything)

Like I said the other buttons work, though I have to click in the botom left corner of the camera add button....

Trying to narrow down the prob, if you have a new file open, with nothing is the "add" button clickable? If it is, then It's not my mesh(s) and it's some other problem a setting or who knows... If the add botton isn't supposed to do anything unless there is a valid mesh, then I need to figure out why it isn't valid....


Thanks
_________________
RedWolf
"Now go vote and participate in your own oppression." -dataangel
The Anti-Lie



kapta@Posted: Thu Oct 06, 2005 2:38 pm    Post subject: small problem: i'm also trying to use this exporter but doesn't work, i am using 3ds max 7 as above the add button doesn't work either, donno if this is a specific issue to 3ds max 7 or something else!


iceheart@Posted: Thu Oct 06, 2005 3:46 pm    Post subject: : Nope, I am using max 7 and the add button works fine for me.
_________________
Staff
www.modwiki.net - wiki resource for all Doom 3 engine-based games.



kapta@Posted: Thu Oct 06, 2005 10:57 pm    Post subject: : not sure then why the add button doesn't work, if it works for you should work here then too, i'm on windows 2000 and have a nvida graphics card!

also here a screenshot of it


if you look carefully it could be that the add/remove buttons are appearing behind the "node to export" box making them unclickable!



RedWolf@Posted: Fri Oct 07, 2005 2:58 am    Post subject: : Still haven't had any luck here, but I'm using gmax on XP with ATI card. I don't suppose someone could post a valid mesh we could test? (one proven to export) this way we could tell if its the mesh, or what?

Mine looks the same as the screen except it's the gmax exporter that has the little gmax logo on it. The about says it's for gmax 1.0 though....


thx.
_________________
RedWolf
"Now go vote and participate in your own oppression." -dataangel
The Anti-Lie



obihb@Posted: Fri Oct 07, 2005 10:44 am    Post subject: : I don't know anything about this exporter but from that screen shot it seems to me that Windows is set up to use large fonts. This has an affect on spacing. You can see how some of the text goes off the window, into the side. This could be why the buttons are being shifted up.


kapta@Posted: Fri Oct 07, 2005 3:07 pm    Post subject: :
obihb wrote:
I don't know anything about this exporter but from that screen shot it seems to me that Windows is set up to use large fonts. This has an affect on spacing. You can see how some of the text goes off the window, into the side. This could be why the buttons are being shifted up.


that did the trick, switching to small fonts fixed the problem and now the add button works, hope this is fixed in the next release!



der_ton@Posted: Fri Oct 07, 2005 6:44 pm    Post subject: :
kapta wrote:
that did the trick, switching to small fonts fixed the problem and now the add button works, hope this is fixed in the next release!

Using nonstandard large fonts is dangerous, I wouldn't say it's the program's fault. Window layouts are bound to get messed up with your settings.
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



RedWolf@Posted: Sun Oct 09, 2005 1:32 am    Post subject: : Fixed mine too, thx!

Hmm, large fonts, go figure! (of all the things that could go wrong) Smile
Welp, I feel stupid, I should have looked closer at the button!

Thx again...
_________________
RedWolf
"Now go vote and participate in your own oppression." -dataangel
The Anti-Lie



BeRSeRKeR@Posted: Fri Oct 28, 2005 3:05 pm    Post subject: : So the problem was the system font size?... Smile

By the way I may released a small update solving some issues with the bone hierarchy.

Greets.

PD: BTW, I'm sorry for not give more attention to the forum. I'm a bit bussy right now. I'm developing a 3D engine with a friend of mine. You can check some videos here. The last one is "The Date".
_________________
Excuse my bad english. Smile



kat@Posted: Fri Oct 28, 2005 4:15 pm    Post subject: :
BeRSeRKeR wrote:
..PD: BTW, I'm sorry for not give more attention to the forum. I'm a bit bussy right now. I'm developing a 3D engine with a friend of mine. You can check some videos here. The last one is "The Date".
That's not bad, I had to watch it a couple of time to see exactly what was going on with the flames (which looked really good btw) and the shadow 'jitter' which is good to see implimented. Nice job to the team.
_________________
Co-Admin - Modelling and modding tutorials and tips



RedWolf@Posted: Wed Nov 02, 2005 1:50 am    Post subject: : Thanks again for trying to help Berzerker, and your importer works perfectly! (Had nothing to do with the importer) (Of course thx to Der_ton and obihb.)
_________________
RedWolf
"Now go vote and participate in your own oppression." -dataangel
The Anti-Lie



pkovacs@Posted: Thu Sep 21, 2006 9:01 am    Post subject: Unable to export my model: Hi,

I was trying to export an animated dinosaur model to MD5. I've tried BeRSeRKeR's MD5Exporter (from http://www.arrakis.es/~jonathan01/d3w/MD5Exporter.zip), and it fails in the following line:
Code:
local nBones = skinOps.getVertexWeightCount skin vTri[i]

with the error: "Runtime error: Exceeded the vertex countSkin:Skin"
I've tried searching the forum and google for this error, but couldn't find any useful information.

The contents of the Listener window is:
Code:
-- Error occurred in i loop; filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mzptmp25\MD5MeshExporter.ms; position: 9258
--  Frame:
--   invert: [-75.8407,-144.023,-30.7395]
--   nBones: undefined
--   firstMatch: 390
--   i: 2
--   inTVert: [0.254781,0.56059]
--   outVert: (sVertex oldIndex:undefined newIndex:undefined coord:undefined texCoord:undefined weightIndex:undefined weightCount:undefined)
--   called in nFace loop; filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mzptmp25\MD5MeshExporter.ms; position: 10854
--  Frame:
--   nFace: 716
--   matID: 1
--   vertices: #((sVertex oldIndex:undefined newIndex:1 coord:[-78.9299,-125.229,-41.8769] texCoord:[0.199796,0.535254] weightIndex:1 weightCount:1), (sVertex oldIndex:undefined newIndex:2 coord:[-79.081,-126.037,-42.409] texCoord:[0.201427,0.530609] weightIndex:2 weightCount:1), (sVertex oldIndex:undefined newIndex:3 coord:[-79.6067,-125.659,-41.7115] texCoord:[0.201427,0.535254] weightIndex:3 weightCount:1), (sVertex oldIndex:undefined newIndex:4 coord:[-79.0862,-125.304,-40.3571] texCoord:[0.201427,0.543699] weightIndex:4 weightCount:1), (sVertex oldIndex:undefined newIndex:5 coord:[-79.4012,-127.377,-42.0897] texCoord:[0.205238,0.529712] weightIndex:5 weightCount:1), (sVertex oldIndex:undefined newIndex:6 coord:[-80.0197,-126.927,-41.257] texCoord:[0.205238,0.535254] weightIndex:6 weightCount:1), (sVertex oldIndex:undefined newIndex:7 coord:[-79.5565,-126.559,-39.9059] texCoord:[0.205238,0.543699] weightIndex:7 weightCount:1), (sVertex oldIndex:undefined newIndex:8 coord:[-79.0372,-125.298,-40.3077] texCoord:[0.201427,0.543996] weightIndex:8 weightCount:1), (sVertex oldIndex:undefined newIndex:9 coord:[-79.3514,-126.536,-39.6987] texCoord:[0.205238,0.544944] weightIndex:9 weightCount:1), (sVertex oldIndex:undefined newIndex:10 coord:[-79.6293,-128.071,-40.8627] texCoord:[0.208196,0.535254] weightIndex:10 weightCount:1), (sVertex oldIndex:undefined newIndex:11 coord:[-79.4175,-126.857,-39.8041] texCoord:[0.205984,0.543699] weightIndex:11 weightCount:1), (sVertex oldIndex:undefined newIndex:12 coord:[-82.2777,-138.482,-35.6559] texCoord:[0.240339,0.543699] weightIndex:12 weightCount:1), (sVertex oldIndex:undefined newIndex:13 coord:[-82.5414,-139.726,-35.9402] texCoord:[0.243348,0.539565] weightIndex:13 weightCount:1), (sVertex oldIndex:undefined newIndex:14 coord:[-83.0501,-139.381,-35.3219] texCoord:[0.243348,0.543699] weightIndex:14 weightCount:1), (sVertex oldIndex:undefined newIndex:15 coord:[-83.0585,-138.905,-33.9974] texCoord:[0.243348,0.552145] weightIndex:15 weightCount:1), (sVertex oldIndex:undefined newIndex:16 coord:[-82.3039,-138.234,-34.2512] texCoord:[0.240987,0.552145] weightIndex:16 weightCount:1), (sVertex oldIndex:undefined newIndex:17 coord:[-82.86,-141.052,-35.5996] texCoord:[0.247159,0.538773] weightIndex:17 weightCount:1), (sVertex oldIndex:undefined newIndex:18 coord:[-83.5864,-140.614,-34.8699] texCoord:[0.247159,0.543699] weightIndex:18 weightCount:1), (sVertex oldIndex:undefined newIndex:19 coord:[-83.8117,-140.088,-33.5567] texCoord:[0.247159,0.552145] weightIndex:19 weightCount:1), (sVertex oldIndex:undefined newIndex:20 coord:[-83.3588,-139.708,-32.1986] texCoord:[0.247159,0.56059] weightIndex:20 weightCount:1), ...)
--   weights: #((sWeight jointIndex:56 weight:1.0 coordIndex:1 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:2 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:3 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:4 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:5 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:6 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:7 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:8 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:9 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:10 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:11 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:12 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:13 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:14 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:15 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:16 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:17 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:18 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:19 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:20 coord:undefined), ...)
--   vTri: [388,465,386]
--   faces: #([1,2,3], [1,3,4], [3,2,5], [5,6,3], [6,7,3], [7,4,3], [8,4,7], [8,7,9], [6,5,10], [6,10,11], [6,11,7], [7,11,9], [12,13,14], [15,16,12], [12,14,15], [14,13,17], [17,18,14], [18,19,14], [19,15,14], [20,15,19], ...)
--   outFace: [389,0,0]
--   tTri: [388,465,386]
--   nSubMesh: 1
--   called in node loop; filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mzptmp25\MD5MeshExporter.ms; position: 10933
--  Frame:
--   mesh: TriMesh
--   node: $META
--   subMeshes: #((sSubMesh matID:1 Shader:"DINOMAT" vertices:#((sVertex oldIndex:undefined newIndex:1 coord:[-78.9299,-125.229,-41.8769] texCoord:[0.199796,0.535254] weightIndex:1 weightCount:1), (sVertex oldIndex:undefined newIndex:2 coord:[-79.081,-126.037,-42.409] texCoord:[0.201427,0.530609] weightIndex:2 weightCount:1), (sVertex oldIndex:undefined newIndex:3 coord:[-79.6067,-125.659,-41.7115] texCoord:[0.201427,0.535254] weightIndex:3 weightCount:1), (sVertex oldIndex:undefined newIndex:4 coord:[-79.0862,-125.304,-40.3571] texCoord:[0.201427,0.543699] weightIndex:4 weightCount:1), (sVertex oldIndex:undefined newIndex:5 coord:[-79.4012,-127.377,-42.0897] texCoord:[0.205238,0.529712] weightIndex:5 weightCount:1), (sVertex oldIndex:undefined newIndex:6 coord:[-80.0197,-126.927,-41.257] texCoord:[0.205238,0.535254] weightIndex:6 weightCount:1), (sVertex oldIndex:undefined newIndex:7 coord:[-79.5565,-126.559,-39.9059] texCoord:[0.205238,0.543699] weightIndex:7 weightCount:1), (sVertex oldIndex:undefined newIndex:8 coord:[-79.0372,-125.298,-40.3077] texCoord:[0.201427,0.543996] weightIndex:8 weightCount:1), (sVertex oldIndex:undefined newIndex:9 coord:[-79.3514,-126.536,-39.6987] texCoord:[0.205238,0.544944] weightIndex:9 weightCount:1), (sVertex oldIndex:undefined newIndex:10 coord:[-79.6293,-128.071,-40.8627] texCoord:[0.208196,0.535254] weightIndex:10 weightCount:1), (sVertex oldIndex:undefined newIndex:11 coord:[-79.4175,-126.857,-39.8041] texCoord:[0.205984,0.543699] weightIndex:11 weightCount:1), (sVertex oldIndex:undefined newIndex:12 coord:[-82.2777,-138.482,-35.6559] texCoord:[0.240339,0.543699] weightIndex:12 weightCount:1), (sVertex oldIndex:undefined newIndex:13 coord:[-82.5414,-139.726,-35.9402] texCoord:[0.243348,0.539565] weightIndex:13 weightCount:1), (sVertex oldIndex:undefined newIndex:14 coord:[-83.0501,-139.381,-35.3219] texCoord:[0.243348,0.543699] weightIndex:14 weightCount:1), (sVertex oldIndex:undefined newIndex:15 coord:[-83.0585,-138.905,-33.9974] texCoord:[0.243348,0.552145] weightIndex:15 weightCount:1), (sVertex oldIndex:undefined newIndex:16 coord:[-82.3039,-138.234,-34.2512] texCoord:[0.240987,0.552145] weightIndex:16 weightCount:1), (sVertex oldIndex:undefined newIndex:17 coord:[-82.86,-141.052,-35.5996] texCoord:[0.247159,0.538773] weightIndex:17 weightCount:1), (sVertex oldIndex:undefined newIndex:18 coord:[-83.5864,-140.614,-34.8699] texCoord:[0.247159,0.543699] weightIndex:18 weightCount:1), (sVertex oldIndex:undefined newIndex:19 coord:[-83.8117,-140.088,-33.5567] texCoord:[0.247159,0.552145] weightIndex:19 weightCount:1), (sVertex oldIndex:undefined newIndex:20 coord:[-83.3588,-139.708,-32.1986] texCoord:[0.247159,0.56059] weightIndex:20 weightCount:1), ...) faces:#([1,2,3], [1,3,4], [3,2,5], [5,6,3], [6,7,3], [7,4,3], [8,4,7], [8,7,9], [6,5,10], [6,10,11], [6,11,7], [7,11,9], [12,13,14], [15,16,12], [12,14,15], [14,13,17], [17,18,14], [18,19,14], [19,15,14], [20,15,19], ...) weights:#((sWeight jointIndex:56 weight:1.0 coordIndex:1 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:2 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:3 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:4 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:5 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:6 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:7 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:8 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:9 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:10 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:11 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:12 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:13 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:14 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:15 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:16 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:17 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:18 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:19 coord:undefined), (sWeight jointIndex:56 weight:1.0 coordIndex:20 coord:undefined), ...)), (sSubMesh matID:2 Shader:"Material #16" vertices:#() faces:#() weights:#()), (sSubMesh matID:3 Shader:"Material #52" vertices:#() faces:#() weights:#()), (sSubMesh matID:4 Shader:"Material #53" vertices:#() faces:#() weights:#()))
--   msg: undefined
--   Skin: Skin:Skin
--   called in doExport(); filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mzptmp25\MD5MeshExporter.ms; position: 12326
--  Frame:
--   nodeList: #($META)
--   joints: #((sJoint name:"Bone10" parentName:undefined parentIndex:0 bindMat:(matrix3 [0.221091,0.54614,0.0829128] [-0.0654888,-0.062763,0.588045] [0.548502,-0.227633,0.0367895] [-75.8366,-232.381,-3.25691]) invBindMat:(matrix3 [0.624508,-0.184984,1.54933] [1.54266,-0.177284,-0.642985] [0.2342,1.66103,0.103918] [406.608,-49.8162,-31.5828])), (sJoint name:"Bone88" parentName:"Bone10" parentIndex:1 bindMat:(matrix3 [0.12647,0.217606,-0.539145] [0.192809,0.504833,0.248985] [0.548502,-0.227632,0.0367897] [-90.7721,-214.237,-9.29881]) invBindMat:(matrix3 [0.357236,0.54462,1.54933] [0.614663,1.42598,-0.642986] [-1.5229,0.703299,0.103918] [149.949,361.473,3.85146])), (sJoint name:"Bone87" parentName:"Bone88" parentIndex:2 bindMat:(matrix3 [-0.109294,-0.340241,-0.475727] [0.203039,0.431792,-0.355466] [0.548504,-0.227633,0.0367897] [-79.6138,-195.038,-56.8666]) invBindMat:(matrix3 [-0.308719,0.573516,1.54933] [-0.961064,1.21966,-0.642983] [-1.34376,-1.00407,0.103918] [-288.438,226.442,3.85143])), (sJoint name:"Bone35" parentName:"Bone87" parentIndex:3 bindMat:(matrix3 [-0.0941631,0.559463,-0.179331] [0.348701,0.19939,0.438947] [0.472828,-0.0356315,-0.35943] [-88.6142,-222.008,-94.563]) invBindMat:(matrix3 [-0.265976,0.984965,1.33557] [1.58029,0.563212,-0.100645] [-0.506549,1.23988,-1.01527] [279.368,329.567,4.29751e-005])), (sJoint name:"Bone77" parentName:"Bone35" parentIndex:4 bindMat:(matrix3 [-0.055696,0.581567,-0.112712] [-0.0107439,0.112199,0.584225] [0.592291,0.0567229,1.24675e-006] [-92.3389,-198.985,-101.862]) invBindMat:(matrix3 [-0.157321,-0.0303547,1.67302] [1.64272,0.316922,0.160222] [-0.318374,1.65025,-3.49884e-006] [279.92,228.357,186.366])), (sJoint name:"Bone84" parentName:"Bone77" parentIndex:5 bindMat:(matrix3 [0.144472,0.574089,-0.0597981] [-0.0115671,0.064511,0.591377] [0.577079,-0.14243,0.0268268] [-86.3829,-196.668,-102.406]) invBindMat:(matrix3 [0.408083,-0.0326801,1.63005] [1.6216,0.182221,-0.402315] [-0.168912,1.67045,0.07577] [336.871,204.078,69.445])), (sJoint name:"Bone85" parentName:"Bone84" parentIndex:6 bindMat:(matrix3 [0.144872,0.570107,-0.0895265] [-0.00430198,0.0933682,0.587612] [0.577078,-0.142426,0.026857] [-85.2074,-192.001,-102.889]) invBindMat:(matrix3 [0.409215,-0.0121551,1.63005] [1.61036,0.263736,-0.402304] [-0.252881,1.65981,0.0758576] [318.04,220.378,69.4541])), (sJoint name:"Bone86" parentName:"Bone85" parentIndex:7 bindMat:(matrix3 [0.144925,0.565699,-0.114046] [0.00176632,0.117152,0.583349] [0.577078,-0.142426,0.0268569] [-83.8697,-186.738,-103.719]) invBindMat:(matrix3 [0.409365,0.00498593,1.63005] [1.59791,0.330917,-0.402304] [-0.322141,1.64777,0.0758576] [299.31,233.117,69.4542])), (sJoint name:"Bone83" parentName:"Bone77" parentIndex:5 bindMat:(matrix3 [-0.264838,0.529526,-0.0590708] [-0.000504675,0.0657154,0.591358] [0.53281,0.263268,-0.0287988] [-97.3402,-197.797,-102.395]) invBindMat:(matrix3 [-0.748076,-0.00143255,1.505] [1.49572,0.185623,0.743641] [-0.166853,1.67039,-0.0813537] [205.948,207.617,285.257])), (sJoint name:"Bone82" parentName:"Bone83" parentIndex:9 bindMat:(matrix3 [-0.264477,0.52554,-0.088798] [-0.0138217,0.0923317,0.587629] [0.53281,0.263263,-0.0288324] [-99.4943,-193.493,-102.873]) invBindMat:(matrix3 [-0.747054,-0.039045,1.505] [1.48447,0.260809,0.743629] [-0.25082,1.65986,-0.0814439] [187.104,217.333,285.248])), (sJoint name:"Bone81" parentName:"Bone82" parentIndex:10 bindMat:(matrix3 [-0.263667,0.521215,-0.113319] [-0.024881,0.114251,0.583396] [0.53281,0.263263,-0.0288324] [-101.936,-188.641,-103.695]) invBindMat:(matrix3 [-0.744765,-0.0702835,1.505] [1.47225,0.322722,0.74363] [-0.320084,1.6479,-0.081444] [168.617,224.594,285.248])), (sJoint name:"Bone78" parentName:"Bone77" parentIndex:5 bindMat:(matrix3 [-0.0563897,0.58881,-0.0644069] [-0.00613909,0.0641126,0.591503] [0.592291,0.0567221,2.95327e-007] [-92.856,-193.585,-102.908]) invBindMat:(matrix3 [-0.159279,-0.0173442,1.67302] [1.66319,0.181099,0.160223] [-0.181925,1.6708,-2.51206e-006] [288.456,205.387,186.366])), (sJoint name:"Bone79" parentName:"Bone78" parentIndex:12 bindMat:(matrix3 [-0.056008,0.58483,-0.0941404] [-0.00897368,0.0937107,0.587504] [0.592291,0.0567216,4.16646e-007] [-93.3144,-188.798,-103.43]) invBindMat:(matrix3 [-0.158201,-0.0253509,1.67302] [1.65194,0.264704,0.160221] [-0.265912,1.65951,-2.25699e-006] [269.618,219.252,186.366])), (sJoint name:"Bone80" parentName:"Bone79" parentIndex:13 bindMat:(matrix3 [-0.0555834,0.580395,-0.118652] [-0.0113104,0.11811,0.583049] [0.592291,0.0567218,3.44771e-007] [-93.8315,-183.399,-104.302]) invBindMat:(matrix3 [-0.157001,-0.0319511,1.67302] [1.63941,0.333624,0.160221] [-0.335148,1.64692,-2.17283e-006] [250.978,229.965,186.366])), (sJoint name:"Bone25" parentName:"Bone10" parentIndex:1 bindMat:(matrix3 [0.12647,0.217606,-0.539145] [0.192809,0.504832,0.248985] [0.548502,-0.227632,0.0367897] [-50.0461,-231.138,-6.5672]) invBindMat:(matrix3 [0.357236,0.544621,1.54933] [0.614663,1.42598,-0.642986] [-1.5229,0.703299,0.103918] [149.949,361.474,-70.398])), (sJoint name:"Bone26" parentName:"Bone25" parentIndex:15 bindMat:(matrix3 [-0.109294,-0.340241,-0.475727] [0.203039,0.431792,-0.355466] [0.548504,-0.227633,0.0367897] [-38.8879,-211.939,-54.135]) invBindMat:(matrix3 [-0.308719,0.573516,1.54933] [-0.961065,1.21966,-0.642983] [-1.34376,-1.00407,0.103918] [-288.438,226.442,-70.3978])), (sJoint name:"Bone13" parentName:"Bone26" parentIndex:16 bindMat:(matrix3 [-0.0812697,-0.503064,-0.30716] [0.159666,0.279683,-0.500307] [0.567388,-0.150761,0.0967933] [-47.9201,-239.09,-91.4962]) invBindMat:(matrix3 [-0.22956,0.451001,1.60267] [-1.42098,0.790014,-0.425848] [-0.867622,-1.41321,0.273409] [-430.128,81.1935,-4.71753e-006])), (sJoint name:"Bone21" parentName:"Bone13" parentIndex:17 bindMat:(matrix3 [-0.177246,0.484527,-0.296382] [-0.101821,0.278343,0.515927] [0.558787,0.20441,0] [-51.309,-260.067,-104.304]) invBindMat:(matrix3 [-0.500656,-0.28761,1.57838] [1.36862,0.786227,0.577388] [-0.83718,1.45733,0] [242.924,341.721,231.144])), (sJoint name:"Bone22" parentName:"Bone21" parentIndex:18 bindMat:(matrix3 [-0.185,0.505727,-0.253061] [-0.086937,0.237658,0.538502] [0.558787,0.20441,0] [-52.9546,-255.568,-107.056]) invBindMat:(matrix3 [-0.522563,-0.245571,1.57838] [1.42851,0.671306,0.577385] [-0.71481,1.52109,-1.59018e-006] [260.884,321.403,231.144])), (sJoint name:"Bone23" parentName:"Bone22" parentIndex:19 bindMat:(matrix3 [-0.180398,0.493146,-0.279801] [-0.0961236,0.262771,0.525105] [0.558787,0.20441,0] [-54.4596,-251.454,-109.115]) invBindMat:(matrix3 [-0.509564,-0.27152,1.57838] [1.39297,0.742242,0.577386] [-0.790343,1.48325,-1.92392e-006] [236.279,333.697,231.144])), ...)
--   filename: "D:\Munka\MD5\exporter\MD5Exporter\dino.md5mesh"
--   fp: <File:D:\Munka\MD5\exporter\MD5Exporter\dino.md5mesh>
--   msg: undefined
--   called in btnExport.pressed(); filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mzptmp25\MD5Exporter.ms; position: 7124
--  Frame:
--   End: undefined
--   nodeList: #($META)
--   meshFileName: "D:\Munka\MD5\exporter\MD5Exporter\dino.md5mesh"
--   animFileName: undefined
--   bUpdate: false
--   md5Exp: (MD5MeshExporter )
--   bOk: false
--   start: undefined
--   nBaseFrame: undefined
--   animRange: undefined
>> MAXScript Rollout Handler Exception: -- Runtime error: Exceeded the vertex countSkin:Skin <<


Then, I've tried MD5.MAX.Exporter.For.Skin.Modifier (from http://www.arrakis.es/~jonathan01/d3w/MD5.MAX.Exporter.For.Skin.Modifier.zip),
This one fails at this line:
Code:
if ((findBoneByName boneList b.name) != 0) or (b == rootBone) do


The contents of the Listener window is:
Code:
-- Error occurred in sortBones(); filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mzptmp26\helper_funcs_skin.ms; position: 544
--  Frame:
--   b: undefined
--   called in init(); filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mzptmp26\helper_funcs_skin.ms; position: 2018
--  Frame:
--   nodeList: #($META)
--   called in doExport(); filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mzptmp26\MD5MeshExporter.ms; position: 4729
--  Frame:
--   nodeList: #($META)
--   joints: #()
--   filename: "D:\Munka\MD5\exporter\MD5.MAX.Exporter.For.Skin.Modifier\dino.md5mesh"
--   skinHelp: (skinHelper rootBone:undefined sortedBoneList:#() boneList:#($Bone10, $Bone01, $Bone02, $Bone03, $Bone04, $Bone05, $Bone06, $Bone07, $Bone08, $Bone09, $Bone70, $Bone48, $Bone49, $Bone50, $Bone51, $Bone52, $Bone53, $Bone54, $Bone55, $Bone56, ...) tab:0)
--   fp: <File:D:\Munka\MD5\exporter\MD5.MAX.Exporter.For.Skin.Modifier\dino.md5mesh>
--   msg: undefined
--   called in btnExport.pressed(); filename: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mzptmp26\MD5Exporter.ms; position: 6959
--  Frame:
--   End: undefined
--   nodeList: #($META)
--   meshFileName: "D:\Munka\MD5\exporter\MD5.MAX.Exporter.For.Skin.Modifier\dino.md5mesh"
--   animFileName: undefined
--   bUpdate: false
--   md5Exp: (MD5MeshExporter )
--   bOk: false
--   start: undefined
--   nBaseFrame: undefined
--   animRange: undefined
>> MAXScript Rollout Handler Exception: -- Unknown property: "name" in undefined <<


I don't really know what is the problem with the model. The only modifier on the stack is the Skin modifier, I've added enough submaterials (this was the first problem, but I've overcame it).

I'm using 3dsmax 8 SP3 on WinXP x64.
The model I've tried to export can be downloaded here:
http://holoiroda.com/2Forum_Dino.zip

BTW, where can I find a list of the features that are supported / unsupported by the exporter? The readme does not contain much information about this, some bits of information can be found in this forum, but I was unable to find a comprehensive list of the things I'm allowed or not allowed to do if I ever want to export my model to MD5.

I would be very grateful if someone could help me with these issues.

Best regards,
Peter



kat@Posted: Thu Sep 21, 2006 2:45 pm    Post subject: : Has the dino got a skeleton? (stupid question I know) It looks like there's a lot of 'undefined' errors there so something isn't linked up properly. It's also possible that Max 8 has something changed or tweaked that's breaking the script. If you have access to Max 5, 6 or 7 try the exporter in that (although you might get a broken model becuase Max isn't that great loading new into old).
_________________
Co-Admin - Modelling and modding tutorials and tips



pkovacs@Posted: Thu Sep 21, 2006 2:50 pm    Post subject: : Hi, and thanks for your reply!

yes, it has lost of bones which animate it. Unfortunately, I cannot load the model to an older max..

Maybe I should move to the thread of der_ton's MD5 exporter, because with that, at least 'something' gets exported (after some modifications), but it's still far from correct. Only the eyes of the dino are exported, strange, huh?

Ami I right these exporters don't really like material definitions without textures?

Peter



kat@Posted: Thu Sep 21, 2006 3:02 pm    Post subject: : Yes, generally speaking they're looking for textures rather than materials becasue it those that get written into the texture path slots in the MD5. Make sure your bones follow a proper hierachy; "origin" should be the 1st bone to which everything else is connected in the skeleton. For example.;

origin > body > hips > leg > lowerleg > foot > toes
_________________
Co-Admin - Modelling and modding tutorials and tips



der_ton@Posted: Sun Sep 24, 2006 9:46 am    Post subject: :
pkovacs wrote:
Maybe I should move to the thread of der_ton's MD5 exporter, because with that, at least 'something' gets exported (after some modifications), but it's still far from correct. Only the eyes of the dino are exported, strange, huh?

Is the whole model one single object? My exporter only exports one object (the selected one). You'll have to merge the meshes into a single one. This is also covered in the readme file BTW.
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



zenarion@Posted: Sun Oct 08, 2006 8:48 pm    Post subject: Re: Error: -- Unkown property: "name" undefined:
Banzai wrote:
evilartist/pickle_yeah/Killinplayer wrote:
Whenever I try to export, It shows an error message:

-- Unknown property: "name" in undefined



Hi Guyz,

I'm really a newbie about Modelling 4 Games and i use the gmax-MD5-Exporter today the first time.

I've the same Error, but now I know how to solve ;o)

You MUST have a UVW-Map (or another Mapping-Info and Material I think) join to your Mesh. Then the gmax-Exporter works fine!

A what now? I have this:


So ive got a Skin modifyer, and an Unwrap UVW. Still the exporter gives me this:


Can somebody clear this up for me? Or should i switch to Maya from 3dsmax?



6th Venom@Posted: Sun Oct 08, 2006 9:18 pm    Post subject: : you got to UVW your model BEFORE skin it (swap stacks), collapse it TO editable poly... for poly, i really don't know if it work cause i always convert in mesh at end, so try like that, and if i don't work, convert it to mesh.
_________________
I just wanna make something not made...



zenarion@Posted: Mon Oct 09, 2006 7:12 am    Post subject: : Yeah i solved it.
But i had to use der_ton's exporter for this one.
Damnit, now to make all the AFs Crying or Very sad



BeRSeRKeR@Posted: Mon Aug 23, 2004 3:46 am :
So I've finally take the time to finish my MD5 exporter. I haven't had too much time to test it but I tried to import some Doom III models (imp and fatty) into MAX and then re-export them with my exporter and the results seem to be correct. BTW, I have only tested the exporter in MAX6.

The worst of this exporter is that takes up too much time for meshes with a medium/high poly count. That's because, to avoid duplicated vertices, I have to, for each face index, loop through the final list of vertices and compare vertex & texture coordinates for each vertex in the list.

Another thing that bugs me is that, when I animate a bone using a LookAt controller (the bone is linked to a node who indicates the bone the direction to look at), the exporter doesn't detect the transform for that bone so no animated components for this bone are exported.

Anyway, hope you find it useful. There is a help file (in spanish and "english" :)) into the zip file explaining all about the exporter.

I want to thank bozo for the MD5 specs and der_ton for his MD5 viewer. That way I were able to test my exporter fast and easily. :)

Download MD5Export for MAX (outdated)
Download MD5Export for gmax (outdated)


UPDATE (08/16/05): new version of the MAX/GMAX MD5 exporters!. Now you can use any node as a bone in the skin modifier (MAX standard bones, CAT, biped, etc) among other improvements.

MD5.MAX.Exporter.For.Skin.Modifier
MD5.GMAX.Exporter.For.Skin.Modifier

Enjoy!.



der_ton@Posted: Mon Aug 23, 2004 11:00 am :
Nice job!

From one single test I noticed there is something wrong with the model's orientation, but apart from that it worked.

I took a look at the code, and some of that looks familiar, but that's probably because some stuff has to be done the same way. But if you took some inspiration from my exporter, credits would be nice (no hard feelings if I'm wrong. Anyway, if my exporter wouldn't exist, I'm sure you would have been able to do yours just as well. Don't get me wrong here. :) )



BeRSeRKeR@Posted: Mon Aug 23, 2004 2:35 pm :
der_ton wrote:
Nice job!

Thanks! :)

der_ton wrote:
From one single test I noticed there is something wrong with the model's orientation, but apart from that it worked.

I'll take a look at it.

der_ton wrote:
I took a look at the code, and some of that looks familiar, but that's probably because some stuff has to be done the same way. But if you took some inspiration from my exporter, credits would be nice

I have to admit that I took a look at your exporter when I came to a point the bone orientations were not correctly. I found the solution in the:

if (q.w < 0) do ....switch the sign of the quat components

and that was before I read the post of bozo where he exposed this solution so I guess I should credit you. And well, if you see something more, similar to your code let me know, please. Besides that, I don't remember more things.

I have credited people in the help file, you included but only for the md5 viewer so I will credit you for your exporter. I'm not here to make enemies. ;)

Said that. I want to comment something about your code. You have a function that converts a left handed matrix to a right handed one. I thought that MAX stored rotations in a right handed way. So is that for something special or to assure that the matrices are correct?. I say that because I don't convert the matrices to right handed and all seems to work. But who know, always exists a case that destroys all your theories. :lol:

One thing more. Your exporter takes less time to export the geometry than mine. As I said before, that's because, to avoid duplicated vertices, I have to, for each face index, loop through the final list of vertices and compare vertex and texture coordinates for each vertex in the list. Do you do something like that or do you export duplicated vertices?.

That's all for now. And sorry for any inconvenience.

Greetings.



bozo@Posted: Mon Aug 23, 2004 2:51 pm :
@BeRSeRKeR

Quote:
You have a function that converts a left handed matrix to a right handed one.


i think, when you create bones via mirror them, than this mirrored bones have this left-handed matrixes and the code fix this

some times ago i only made a quick test of this and it seems to do the work properly



BeRSeRKeR@Posted: Mon Aug 23, 2004 2:58 pm :
Forgot to mention that to get the rotation and position of the bones, I was using the "rotation" and "pos" members of the node class but it didn't work in all cases. I always thought that the "transform" member was the result of doing:

mat = node.rotation as Matrix3
mat.row4 = node.pos

but ok, seems not to be the same. So this part is another thing I saw in your code.

Anyway I have updated the exporter and I have credited you for your exporter. Also, I have put a reference to you and bozo in the MD5AnimExporter.ms file.

Greets.



BeRSeRKeR@Posted: Mon Aug 23, 2004 3:02 pm :
bozo wrote:
i think, when you create bones via mirror them, than this mirrored bones have this left-handed matrixes and the code fix this some times ago i only made a quick test of this and it seems to do the work properly

The truth is that I haven't rigged a mesh in my life so things like mirroring bones escapes from my understanding. :)

I will change that.

Thanks.



bozo@Posted: Mon Aug 23, 2004 3:09 pm :
you are not alone ;)

i am a coder and do only some really simple modeling stuff for testing-only

btw. nice work :)



der_ton@Posted: Mon Aug 23, 2004 3:33 pm :
Berserker, I'm totally ok with all of that. :)

The thing with the mirrored bones matrices resulting in lefthanded bones came up with a model that 7318 did once. If you scale a bone negatively, then the transform matrix becomes lefthanded.
That is also related to the fact that the "transform" property is not necessarily the same as the combined "pos * quat as matrix". That is also mentioned in the maxscript documentation:
Quote:
Take care when mixing rotation derived from these matrices and rotation used in rotation-related functions or from rotation properties.


About the duplicate vertices, I don't check for that, nope. But I'm not sure if that's necessary. Maybe that's related to another difference in our exporters. Yours collapses each mesh to use one material (even if it uses submaterials), while mine splits it into md5 submeshes according to the used submaterials. I think your way of creating submeshes is to export multiple mesh objects from 3dmax.

BTW, I encountered a real problem with exporting via maxscript, it affects both our exporters. The 6 digit precision of float output is not enough, my camera importer/exporter is done but the problem is really evident there, because the quaternions need better precision.
The problem can also be seen when you export a mesh (with your or my exporter) and import it with my importer again, then there are some slight deviations. I'll think about a custom print function for floats. I don't know of a way to tell Maxscript to use better precision for the built-in print float.



BeRSeRKeR@Posted: Mon Aug 23, 2004 3:54 pm :
der_ton wrote:
Berserker, I'm totally ok with all of that. :)

Nice. :)

der_ton wrote:
The thing with the mirrored bones matrices resulting in lefthanded bones came up with a model that 7318 did once. If you scale a bone negatively, then the transform matrix becomes lefthanded.
That is also related to the fact that the "transform" property is not necessarily the same as the combined "pos * quat as matrix".

Thanks for the explanation. I have implemented your right handed funcion and now, when using mirrored bones, the orientation is ok but the faces affected by these bones are reversed!. I'll have to take a look on it.


der_ton wrote:
I think your way of creating submeshes is to export multiple mesh objects from 3dmax.

Exactly. With my exporter, only one material can be assigned to one mesh so if you want to export multiple meshes with different materials assigned, also, you have to have multiple meshes in MAX.

der_ton wrote:
I'll think about a custom print function for floats. I don't know of a way to tell Maxscript to use better precision for the built-in print float.

Yeah, that's a real problem. I have implemented a function that reduces the decimal count of a number down to 5 but as you said, seems not to be sufficient.

Greets.



BeRSeRKeR@Posted: Mon Aug 23, 2004 6:14 pm :
I have updated the exporter so now takes into account left/right handed matrices. Seems to work ok but I have found a case where the faces affected by the "left-handed bones" are reversed so you can see the "inner" of the mesh. Thanks to der_ton a bozo for help me. That's a great forum where coexists great artists and great coders too! ;)

Download (same URL as above)

So now I have some stuff in mind. I'm thinking of supports biped bones and give the option to export "physiqued" meshes. My first attempt to write a MD5 exporter (when the leaked alpha came up) was using physique to export skinned meshes so if I have time enough, I could try this.

Of course, I have to add support for md5camera too! :)

Greets.



BeRSeRKeR@Posted: Mon Aug 23, 2004 7:30 pm :
I have a question regarding md5camera file format.

Here is a snip of data:

Code:
cuts {
   96
   148
   198
   290
   324
}

camera {
   ( 1781.0610351563 293.2318115234 70.8310394287 ) ( 0.09791141 -0.0939290896 -0.714956522 ) 72.1649246216
   ....
}


Seems to be clear that first triplet is the camera position, the second is the camera orientation and finally the camera fov (correct me if I'm wrong, please).

But now the cuts stuff. I think is a way to specify different "camera takes" so, in the example above, one take would be from 0 to 98, another from 99 to 148, and so on. Is this correct?.

Thanks.



der_ton@Posted: Mon Aug 23, 2004 7:40 pm :
Yep. Actually, the only reason why that's in there is because the engine has to know when NOT to interpolate between two keyframes.



BeRSeRKeR@Posted: Mon Aug 23, 2004 7:54 pm :
der_ton wrote:
Actually, the only reason why that's in there is because the engine has to know when NOT to interpolate between two keyframes.

Yes. Makes sense.

Thanks much.



der_ton@Posted: Wed Aug 25, 2004 12:43 am :
The precision issue I was talking about was not the reason why I had these big deviations, that was a typo in a formula I had in there. The problem was not in the v.91 and is ofcourse not in v.92 of the script. I don't know if the 6 digit precision of maxscript's float printing is enough, so I wrote this:
Code:
fn printfloat flt =
--maxscript doesn't provide a way to format float output that I know of. It seems that Doom3 does not understand the <x>e<y> notation of floats
--if you plan to use this in your scripts, note that this function doesn't check against a large number passed in
(
   --if (abs flt)>10.0 then return flt -- this could be used to gain some speed.
   --else
   local numdigits = 10
   (
      str = ""
      if flt<0 then str += "-"
      flt2 = abs flt
      str += ((flt2 as integer) as string)
      flt2 -= (flt2 as integer)
      str +="."
      for i=1 to numdigits do
      (
         flt2 *=10.0
         str += ((flt2 as integer) as string)
         flt2 -= (flt2 as integer)
      )
      return str
   )
)

Feel free to use if you think it is necessary.

BTW, in my new version of the scripts, I added the function for reading the animationRange interval to preset the input values in the GUI, I've seen that your script does that and it's ofcourse a useful detail. :)



BeRSeRKeR@Posted: Wed Aug 25, 2004 12:52 am :
der_ton wrote:
Feel free to use if you think it is necessary.

Thanks for share. I will take a look on it.

der_ton wrote:
BTW, in my new version of the scripts, I added the function for reading the animationRange interval to preset the input values in the GUI, I've seen that your script does that and it's ofcourse a useful detail. :)

Yes. It's a good thing. Now I'm trying to design a good way to expose the camera cuts to the user. I'm trying to do it the more easy as possible.

Thanks.



Aphax@Posted: Wed Aug 25, 2004 5:30 am :
You know, you guys seem to put quite an amount of effort into your exporting tools, but from what I understand they basically do the same. Why not colaberate and work on a single, powerful, exporter? :D I'm sorry if this is a really bad suggestion and you guys rather work on your own thing, but I figured having two geniusses working on the same tool would make it even better :wink:



der_ton@Posted: Wed Aug 25, 2004 9:30 am :
I think it's not a bad thing that there are two different exporters available. Berserker's exporter works a bit differently, requiring to have each object to use a standard material, but being able to export multiple objects, while my exporter exports only one object, but it can have several textures via multi/submaterials (but I might change that).
Working on the same stuff as a team introduces communication overhead and problems with keeping track of versions.

As long as we allow each other to use the code freely and help each other out by discussion on the forum, I think we have a pretty efficient way of handling it.



obihb@Posted: Wed Aug 25, 2004 11:04 am :
Quote:
.... but it can have several textures via multi/submaterials (but I might change that).

Please don't get rid of that!.. :) If that's what you mean by changing it.



der_ton@Posted: Wed Aug 25, 2004 11:49 am :
No I won't get rid of that. :)
My importer imports in the same format, so that's gonna be left in forever. But I might add the option to select more than one object for export, like Berserker's exporter does (note that I had that in the todo list from the first release of my exporter, though).



BeRSeRKeR@Posted: Wed Aug 25, 2004 7:09 pm :
Aphax wrote:
I'm sorry if this is a really bad suggestion and you guys rather work on your own thing, but I figured having two geniusses working on the same tool would make it even better :wink:

Not a bad idea at all. Anyway we are sharing code so that's a form of collaboration and a way to speed up the development. And of course, I think we, coders, are a bit reticent to work in group. Each one has his/her code style, his/her obsessions, etc. :)

And comming back to the exporter, I have found a "bug" in MAX. Actually I don't know if it's a bug or a windows limitation. When you call the function getSaveFileName with a long extension (more than 8 chars), MAX throws an unhandled exception. You can try that executing this in "MAXScript Listener":

Code:
getSaveFileName caption:"Save MD5Camera" types:"Doom III MD5Camera (*.md5camera)|*.md5camera"


A save dialog will be shown where you have to specify the file location and name. So if you don't add the ".md5camera" extension manually to the name of the file, the exception will be thrown.

I have seen that der_ton add automatically a file name and the extension but does exist another way around this?

When I solve this problem I'll release the new version with md5camera support.

Greets.