EGG Exporter in Maxscript

Heya

I had my share of problems with the official 3d studio max Egg-exporter, so after checking out the syntax, i thought i’d give it a try making my own exporter. Voilá, here it is. The exporter is in a very alpha stage, but it’s sorta stable, so for small projects it should suffice. I tested it only under 3dsmax 2009 and i have the feeling it won’t work in lower version, use at own risk!

Short docu:

EGG-File: The filename. You can past in a filepath. (TODO: needs security query, might crash if given awkward filenames)
Export EGG as: Asks for a filename and exports an EGG of the selected geometry.
Export EGG: Exports selected geometry in current filepath.
Export Materials: adds the material definitions to the EGG-file.
Export Textures: ditto for textures.
Filenames with path: Sets wether Filenames incorporate the full path or not.
Absolute Coordinates: Not doing anything so far. (TODO)
Preview EGG: Launches the Viewer after successful export.
EGG Viewer: The filepath to the panda-viewer.
Export with Definition: Export object and store Filename in User Properties.
Export All Defined: Exports all objects with User Propertie Filename. (Useful for full level exports. Careful: This is not well tested yet… :frowning: )

EGG-Exporter Download

The focus is more on material/texture support aswell as scriptability, as these are handled rather lousy by the current exporter. Values from materials are exported as precise as possible, including uv-wrapping. It also exports multimaterial objects (with a little drawback, that it breaks them up in several objects with one material each).

The hook is: My exporter only exports static geometry. No skin weights, no animation, no modifiers (modifiers will be temporarily applied before export). Only plain geometry. The project is merely meant as an alternative, not as a replacement of the offical exporter. I would suggest it is best used for background geometry (like f. e. level geometry), as these are usually not animated.

EDIT:
Updated a little bug when exporting a collection of single objects.

Here my test example in 3D Studio Max 2009:

And in the panda3d viewer:


How about exporting multiple UV sets and dummies?
Exporting NURBS or splines to use as mopaths could also be useful.

Multiple UVs is now on my list. I’m stunned i didn’t come up with that myself…

Splines for motionpaths is covered by the default exporter quite well, if you animate that with a bone (=>path controler for position, lookat controler for rotation). You should be able to attach the camera to that bone in code then…

I have overworked the whole export functionality again. The structure how 3D Studio Max is building up geometry does differ quite a bit from panda3D’s structure, at least of what is exposed to maxscript… But i think i got it now.

I think this is a great idea since it’s virtually version independent. I hope you’ll try adding basic animation support at some point (unless Panda’s COLLADA support gets there first :smiling_imp:), although I fear you may be facing quite some challenges there.

I was considering using Maxscript as a front end to passing the max scene to the actuall .dlo which would handle the actual egg exporting. This way we’d keep the UI easier to debug and tweak while still getting the benefits of the .dlo. Would this be better than the current way to edit the egger’s UI and code via C++? I think we’d at least be able to separate UI and processing code. Thoughts? post here…

https://discourse.panda3d.org/viewtopic.php?p=55187#55187

~Andrew

@AndrewG

Absolutely! That would have been my way if i had any clue of C++. I’m not sure how far the Collada-support is by now, but until then i would be totally up for that.

The EGG-file format in connection with maxscript is giving me quite some headache because quite some funcionality isn’t exposed via maxscript (i’m thinking of proper normals and uv’s for polygons). This would profit heavily from coding in C++!