Problem Exporting with gmax and max2mesh plugin

Tom

New member
Joined
Sep 25, 2008
Messages
11
Reaction score
0
Points
1
Location
Lorient
Hello everyone,

I'm trying to make my first addon, and so far I've managed to build a 3D model of my ship with gmax (v 1.2).

But when I'm trying to export my model to the mesh format with the max2mesh (v1.2) script, I get this error : "Runtime Error : array index must be positive number, got : -1"

I've tried to search on the forum and with google to find a solution but I can't find one !

Have you got any idea ? Do you know another way to export a model with gmax ?
 
Hi, unfortunately I can not directly answer your question, because I did not experience such an error yet. Just a few tips, that might help you sorting things out:

- The most 'popular' error is to have textures on objects which do not have an UV-mapping.
I dont know if you have already applied textures, if yes, check if all affected surfaces have UV maps.

- Do not merge objects with different textures. Max2mesh does not support multi-textures. If you think that might be a cause, delete all textures and see if the export works now.

- If an export fails, the Max2msh script stops. Unfortunately it made a clone of your complete 3D model when it started, so all elements are now doubled. These double elements are normally deleted during the export process, but when the export fails, they remain in the model. This clogs your model with a lot of duplicate elements.

Suggestion:
-> Always save your model before exporting.
Never save your model after a failed export.

If you had this problem already, clean up your model be deleting all the duplicate elements (I know, this is tedious work).

- Try the "Sherlock Holmes approach" by eliminating everything else:
If you cannot detect the reason for the failed export, make a working copy of the model, delete about half of the objects and try the export. If it works now, the error was in one of the deleted objects.

If not, load again the working copy and delete the other half.

Do not save any changes. Open your working copy again, delete less objects and try the export again. Repeat until you find the object that makes troubles. Then you can try rectifying this object, or make a new one without errors :)

Be prepared to spend quite a lot of time in front of your computer screen :)
Never hesitate to delete and make new a substantial amount of your work, if required.

If nothings else helps, send an eMail to Mindblast (the author of Max2msh). His address is in the documentation. Although he is no more actively working on this tool, he helped me a lot when I ran into exporting trouble.
----
I like Gmax very much because it is a free and really powerfull modelling program.
Whish you the best to master it!
 
I dont know how big your model is but I have found that the two biggest problems in exporting out of G-Max or even 3DS Max is:

1-All objects in the model must have a material assigned to them.

2-be wary of invisible or non existent objects in the model.Objects which have an entry in the list but are not really there.Also Isolated vertices without associated polygons.

Check the output of the Listener to see at which point the model Export chokes and what was the last succesful object to be done in the model and then check the next object in the list to see if it has a material assigned or if indeed it even exists in the model.Try hiding the objects in the model one by one and when all are done and the model i no longer visible then drag a select box around the model area to see if there are any invisible objects there and then delete them.Good luck and if you want to send the file I could take a look at it in 3DS and see whats up.
 
Thank you both, I'll try those things today and if I can't figure what is the problem I'll send it to you !
 
Well I've tried some of your solutions and it seems that it was a problem with textures on objects without UVW mapping !

I'll remap my entire model and post it here so you can see the result as soon as I can find some time for myself !
 
Back
Top