Shadowflamez@Posted: Tue Aug 05, 2008 1:47 pm :
I'm trying to export a max file into doom 3 md5 format and everytime this message appears when the process begins:

http://www.screenshots.cc/view.php?file ... indow1.jpg
http://www.screenshots.cc/images/643_window2.jpg

and then... nothing happens the exported files are 0 bytes.

It's something about material id I can't understand it. :)

I'm using 3ds max 9 and the export/import plugs from your community.

The file is a modified from me marine model that I have imported from the game engine.I haven't change bones position only the mesh of the model at the end of the hand.I'm using 3 sub materials - one for the gun, one for the body and one for gloves that I have just added.

I'm using this plug in for the first time so I don't understand anything of this "code".So what I suppose to do to fix it? :?
I have the same problems whit other models.

Thanks.



6th Venom@Posted: Tue Aug 05, 2008 5:04 pm :
Shadowflamez wrote:
I'm using 3 sub materials

It's certainly because some of your model's parts are still referencing to some later sub materials, try to select faces by materials, and test 4, 5, 6, etc.

Max loops submaterials, but the script don't.

:wink:



Shadowflamez@Posted: Wed Aug 06, 2008 11:28 am :
viewtopic.php?f=3&t=1914

Looks like there is new plugin that support submaterials but... i can't load the link.... :?



der_ton@Posted: Thu Aug 07, 2008 12:07 am :
Which link do you mean? The current ones work, and the other one says "OUTDATED" in big letters. Which means it is old info, not to confuse with "updated".

Thanks for posting screenshots of the errors, but on the second one the highlighted line is not the one where the error occured. If you can tell me the exact line that would help.

I'd say there is some instability in the exporter regarding submaterials that I should look into sooner or later, but it is not an unresolvable issue with the current version of the script, I hope :) . If you know how to work with submaterials in 3dsmax (assign submaterials to triangles, or select triangles by their submaterial id, that kind of stuff), and you clean up your mesh so that no triangles use material ids that are beyond the range of actual existing submaterials then you should be good to go.



Shadowflamez@Posted: Thu Aug 07, 2008 8:16 am :
Actually the error appears in early window (sorry for the mistake) and says "Call needs function or class,got $()" and that concern to the highlighted line - "md5 = md5mesh()", maybe "()" must be some kind of number i don't know.

I think I know how to use submaterials - I'm detaching all of the meshes that I want to apply a different material then I'm attaching it to one mesh again whit "Match material to material ID's". The result must be one mesh whit submaterials if that is right.I use polygon sublevel to operate... the triangles (face) selection is more... difficult to me (there is two faces in one polygon often.)So I'm selecting whit polygon sublevel for example the hand or the gun... detaching it... coloring it and then attaching it back again to the body in the way I have pointed.

I also do a unwarp UVW to the mesh so the material can be properly assigned to the new mesh(in our case the gloves that I have added to the model).

About the link...

Quote:
Read the readme please, and don´t expect it to work if you had some exotic way of animating or organizing your animated character. The animation of the skin-modifier (for skeletal animation) is exported, nothing else. Most importantly, your character has to consist of ONE object only (if you have several objects, use the "attach" function in 3dsmax, your objects will be merged and the resulting object will have a multi/submaterial, which is exactly what my exporter handles).


I was thinking that the link beneath "OUTDATED INFO" is better because you say that it handles submaterials.Exporter that I'm using it right now can't handles it by my opinion.So I was thinking that you have resolve the problem but maybe I have false belief.:) If they lead to the same file and the exporter can handle submaterials.

So what can I do about my problem? :)



obihb@Posted: Thu Aug 07, 2008 9:49 am :
If I were you I would not just trust Max to magically assign the correct face id's. Just for using the model inside Max it would be just fine but for exporting to the game it might not be. You really need to just go in on the sub level and check those face id's and make sure you do not exceed the material's id's. Make 100% sure face id 1 = material id 1 etc. Because if you had 3 material id's then face id 4 would = material id 1 as well, which is just fine inside of Max but not so for exporting it.

If you just imported the Marine model and I'm guessing it's the player model, then you would by default have much more than 3 materials on that model. If I remember correctly it has about 7 or so materials assigned to it. So you should really just double check those faces manually.



6th Venom@Posted: Thu Aug 07, 2008 10:13 am :
How you makes things confuse me...

How i would go:
-Select your model.
-Open the Material Editor, select an empty slot, press the "Get Material" button, choose "Browse From => Selected", double click the Multi/Sub-Object material.
(that's the one applied to your model, and maybe still the one applied on the imported model)
Note that here you got a multimaterial with X submaterials. [example: 5]

-In an Edit poly modifier, select a polygon sublevel, then go to polygon properties, check the "clear selection" box, and enter a number near "Select ID" (start with last X submaterial +1)[example: 6]

-If you got some polygons selected, that's a part of the problem, cause as you noticed, there are only 5 submaterials...
so apply the right material by entering another submaterial with the "Set ID" polygon properties.
(that's how you should apply your submaterials rather than detach elements, apply material, re-attach, etc...)

Repeat the last operation with higher submaterials' ID to erase all the wrong references.

EDIT: obihb beat me! :D



Shadowflamez@Posted: Thu Aug 07, 2008 11:37 am :
Yeah... I forgot that the old materials are still used. :D

In the way you saying this sounds logical and the exporter must go on but... it's displaying the same error.It's displaying the same error even when I import for example the d3xp_spplayer md5 from the game, then get it's material from the selected model and exported back again without do any changes in materials on the model.I just made a test to see what will happening.In this case the model must be whit correct number of id's and anything else because it's used in the game once whit the same path that I must use in my custom model (correct id's number).I have check the number of faces too.The body have material id 1 when I type 1 in "Select ID" the body becomes selected... same whit the other parts. :?

The exporter just displaying this error on anything that I'm trying to export even on the original non modified models from doom.



der_ton@Posted: Thu Aug 07, 2008 12:33 pm :
Sounds like your script window was hit by a keystroke and now there is an error in there. You should close and not save that script window, and extract the script from the archive again. I encountered these glitches a couple of times, too.



Shadowflamez@Posted: Thu Aug 07, 2008 1:33 pm :
I'm extracting it... same problem.



der_ton@Posted: Thu Aug 07, 2008 2:52 pm :
Are you closing the script rollout window every time after you used it? You should do that, because if you don't the variables will not get reset. This error doesn't look like it has anything to do with the submaterial issue.



Shadowflamez@Posted: Thu Aug 07, 2008 4:06 pm :
Mmmm.... that's another think. :) I'm closing now the rollout window after import the file.Then I save it and load the rollout window again whit "run max script" function on the menu.This time works perfect. :D

Thank you very much!

We have done much work today :?:)



Shadowflamez@Posted: Wed Sep 03, 2008 4:09 pm :
I have made a model whit 7 sub materials.Each material is blinn whit only one map (diffuse map) and....

still receiving this error :

Code:
Unknown property: "diffusemap" is undefined
.

viewtopic.php?f=3&t=1914&p=52484&hilit=diffusemap+undefined#p52484

Here one guy write about the same problem but I didn't find the clearance.

I don't have opacity maps ... or bump maps only diffuse maps one per material.

What I'm doing wrong? :)



Shadowflamez@Posted: Thu Sep 04, 2008 9:51 am :
Ok I fix that.But now the forms of my model are changed in doom 3 editor.I have imported the original Hellknight model and I make some changes on it.Look what are happened.

Image

That's how it look like in 3d max.

Image

That's how it look like in doom 3 engine.

Everything is perfect in 3d max - the animation the shapes.But in doom 3... the thinks are little different :D.

Also I'm receiving this error from the editor when I import it in.

Image

The model (the big box ) is not recognized from the editor even when all textures are correctly assigned.There is no errors in the console of the editor.

I'm using a simple "def" code only to test the model and the animations before complete the character.

Code:
model Hellbaron {
       mesh                    models/Hellbaron/Hellbaron.md5mesh
       
       anim  Walk              models/Hellbaron/Walk.md5anim
     



}

entityDef monsters_Hellbaron {
   



        "inherit"                       "func_animate"
        "model"                         "Hellbaron"
}       


Thanks preliminarily.:)



Ivan_the_B@Posted: Thu Sep 04, 2008 11:25 am :
I cannot help you, but the "big box" is showed only because there is no default anim specified in your def.
Add to the entityDef the key/val
"anim" "Walk"

Cannot say more, sry.



Shadowflamez@Posted: Thu Sep 04, 2008 2:44 pm :
After a lot of inspection.I have found the reason.And the reason is that.... all bones from the torso to the neck just squeezing the mesh....Kill me I don't know why.Perhaps fake bones.



Shadowflamez@Posted: Thu Sep 04, 2008 3:18 pm :
Ok here is the clearance - If sometimes whit some reason you animation is faked.But the model looks good in the animation process but not in other programs for example like doom 3 or z brush.Just use Reset Xform from the Utilites menu on the bones.That will fix the rotation but you must reassing them to the mesh whit the skin modifier again.It's very unpleasantly
especially when you are almost close to the last animation track.But you must fix it one by one to the end. :D



Shadowflamez@Posted: Tue Aug 05, 2008 1:47 pm :
I'm trying to export a max file into doom 3 md5 format and everytime this message appears when the process begins:

http://www.screenshots.cc/view.php?file ... indow1.jpg
http://www.screenshots.cc/images/643_window2.jpg

and then... nothing happens the exported files are 0 bytes.

It's something about material id I can't understand it. :)

I'm using 3ds max 9 and the export/import plugs from your community.

The file is a modified from me marine model that I have imported from the game engine.I haven't change bones position only the mesh of the model at the end of the hand.I'm using 3 sub materials - one for the gun, one for the body and one for gloves that I have just added.

I'm using this plug in for the first time so I don't understand anything of this "code".So what I suppose to do to fix it? :?
I have the same problems whit other models.

Thanks.



6th Venom@Posted: Tue Aug 05, 2008 5:04 pm :
Shadowflamez wrote:
I'm using 3 sub materials

It's certainly because some of your model's parts are still referencing to some later sub materials, try to select faces by materials, and test 4, 5, 6, etc.

Max loops submaterials, but the script don't.

:wink:



Shadowflamez@Posted: Wed Aug 06, 2008 11:28 am :
viewtopic.php?f=3&t=1914

Looks like there is new plugin that support submaterials but... i can't load the link.... :?



der_ton@Posted: Thu Aug 07, 2008 12:07 am :
Which link do you mean? The current ones work, and the other one says "OUTDATED" in big letters. Which means it is old info, not to confuse with "updated".

Thanks for posting screenshots of the errors, but on the second one the highlighted line is not the one where the error occured. If you can tell me the exact line that would help.

I'd say there is some instability in the exporter regarding submaterials that I should look into sooner or later, but it is not an unresolvable issue with the current version of the script, I hope :) . If you know how to work with submaterials in 3dsmax (assign submaterials to triangles, or select triangles by their submaterial id, that kind of stuff), and you clean up your mesh so that no triangles use material ids that are beyond the range of actual existing submaterials then you should be good to go.



Shadowflamez@Posted: Thu Aug 07, 2008 8:16 am :
Actually the error appears in early window (sorry for the mistake) and says "Call needs function or class,got $()" and that concern to the highlighted line - "md5 = md5mesh()", maybe "()" must be some kind of number i don't know.

I think I know how to use submaterials - I'm detaching all of the meshes that I want to apply a different material then I'm attaching it to one mesh again whit "Match material to material ID's". The result must be one mesh whit submaterials if that is right.I use polygon sublevel to operate... the triangles (face) selection is more... difficult to me (there is two faces in one polygon often.)So I'm selecting whit polygon sublevel for example the hand or the gun... detaching it... coloring it and then attaching it back again to the body in the way I have pointed.

I also do a unwarp UVW to the mesh so the material can be properly assigned to the new mesh(in our case the gloves that I have added to the model).

About the link...

Quote:
Read the readme please, and don´t expect it to work if you had some exotic way of animating or organizing your animated character. The animation of the skin-modifier (for skeletal animation) is exported, nothing else. Most importantly, your character has to consist of ONE object only (if you have several objects, use the "attach" function in 3dsmax, your objects will be merged and the resulting object will have a multi/submaterial, which is exactly what my exporter handles).


I was thinking that the link beneath "OUTDATED INFO" is better because you say that it handles submaterials.Exporter that I'm using it right now can't handles it by my opinion.So I was thinking that you have resolve the problem but maybe I have false belief.:) If they lead to the same file and the exporter can handle submaterials.

So what can I do about my problem? :)



obihb@Posted: Thu Aug 07, 2008 9:49 am :
If I were you I would not just trust Max to magically assign the correct face id's. Just for using the model inside Max it would be just fine but for exporting to the game it might not be. You really need to just go in on the sub level and check those face id's and make sure you do not exceed the material's id's. Make 100% sure face id 1 = material id 1 etc. Because if you had 3 material id's then face id 4 would = material id 1 as well, which is just fine inside of Max but not so for exporting it.

If you just imported the Marine model and I'm guessing it's the player model, then you would by default have much more than 3 materials on that model. If I remember correctly it has about 7 or so materials assigned to it. So you should really just double check those faces manually.



6th Venom@Posted: Thu Aug 07, 2008 10:13 am :
How you makes things confuse me...

How i would go:
-Select your model.
-Open the Material Editor, select an empty slot, press the "Get Material" button, choose "Browse From => Selected", double click the Multi/Sub-Object material.
(that's the one applied to your model, and maybe still the one applied on the imported model)
Note that here you got a multimaterial with X submaterials. [example: 5]

-In an Edit poly modifier, select a polygon sublevel, then go to polygon properties, check the "clear selection" box, and enter a number near "Select ID" (start with last X submaterial +1)[example: 6]

-If you got some polygons selected, that's a part of the problem, cause as you noticed, there are only 5 submaterials...
so apply the right material by entering another submaterial with the "Set ID" polygon properties.
(that's how you should apply your submaterials rather than detach elements, apply material, re-attach, etc...)

Repeat the last operation with higher submaterials' ID to erase all the wrong references.

EDIT: obihb beat me! :D



Shadowflamez@Posted: Thu Aug 07, 2008 11:37 am :
Yeah... I forgot that the old materials are still used. :D

In the way you saying this sounds logical and the exporter must go on but... it's displaying the same error.It's displaying the same error even when I import for example the d3xp_spplayer md5 from the game, then get it's material from the selected model and exported back again without do any changes in materials on the model.I just made a test to see what will happening.In this case the model must be whit correct number of id's and anything else because it's used in the game once whit the same path that I must use in my custom model (correct id's number).I have check the number of faces too.The body have material id 1 when I type 1 in "Select ID" the body becomes selected... same whit the other parts. :?

The exporter just displaying this error on anything that I'm trying to export even on the original non modified models from doom.



der_ton@Posted: Thu Aug 07, 2008 12:33 pm :
Sounds like your script window was hit by a keystroke and now there is an error in there. You should close and not save that script window, and extract the script from the archive again. I encountered these glitches a couple of times, too.



Shadowflamez@Posted: Thu Aug 07, 2008 1:33 pm :
I'm extracting it... same problem.



der_ton@Posted: Thu Aug 07, 2008 2:52 pm :
Are you closing the script rollout window every time after you used it? You should do that, because if you don't the variables will not get reset. This error doesn't look like it has anything to do with the submaterial issue.



Shadowflamez@Posted: Thu Aug 07, 2008 4:06 pm :
Mmmm.... that's another think. :) I'm closing now the rollout window after import the file.Then I save it and load the rollout window again whit "run max script" function on the menu.This time works perfect. :D

Thank you very much!

We have done much work today :?:)



Shadowflamez@Posted: Wed Sep 03, 2008 4:09 pm :
I have made a model whit 7 sub materials.Each material is blinn whit only one map (diffuse map) and....

still receiving this error :

Code:
Unknown property: "diffusemap" is undefined
.

viewtopic.php?f=3&t=1914&p=52484&hilit=diffusemap+undefined#p52484

Here one guy write about the same problem but I didn't find the clearance.

I don't have opacity maps ... or bump maps only diffuse maps one per material.

What I'm doing wrong? :)



Shadowflamez@Posted: Thu Sep 04, 2008 9:51 am :
Ok I fix that.But now the forms of my model are changed in doom 3 editor.I have imported the original Hellknight model and I make some changes on it.Look what are happened.

Image

That's how it look like in 3d max.

Image

That's how it look like in doom 3 engine.

Everything is perfect in 3d max - the animation the shapes.But in doom 3... the thinks are little different :D.

Also I'm receiving this error from the editor when I import it in.

Image

The model (the big box ) is not recognized from the editor even when all textures are correctly assigned.There is no errors in the console of the editor.

I'm using a simple "def" code only to test the model and the animations before complete the character.

Code:
model Hellbaron {
       mesh                    models/Hellbaron/Hellbaron.md5mesh
       
       anim  Walk              models/Hellbaron/Walk.md5anim
     



}

entityDef monsters_Hellbaron {
   



        "inherit"                       "func_animate"
        "model"                         "Hellbaron"
}       


Thanks preliminarily.:)



Ivan_the_B@Posted: Thu Sep 04, 2008 11:25 am :
I cannot help you, but the "big box" is showed only because there is no default anim specified in your def.
Add to the entityDef the key/val
"anim" "Walk"

Cannot say more, sry.



Shadowflamez@Posted: Thu Sep 04, 2008 2:44 pm :
After a lot of inspection.I have found the reason.And the reason is that.... all bones from the torso to the neck just squeezing the mesh....Kill me I don't know why.Perhaps fake bones.



Shadowflamez@Posted: Thu Sep 04, 2008 3:18 pm :
Ok here is the clearance - If sometimes whit some reason you animation is faked.But the model looks good in the animation process but not in other programs for example like doom 3 or z brush.Just use Reset Xform from the Utilites menu on the bones.That will fix the rotation but you must reassing them to the mesh whit the skin modifier again.It's very unpleasantly
especially when you are almost close to the last animation track.But you must fix it one by one to the end. :D