Hello Survey, sorry for the late reply, but I made some enormous changes to the exporter and the import code does also change.
The base for the Importer is the FPSCtoAGK import code, that you can find in your users/ example.
So you already have the code to display object, texture and lightmap!
Current State:
- You can now export instances from 3dsMax to AppGameKit! This will help to reduce the memory size for each map (Lightmaps and textures are still working correctly!)
- Objects are now positioned at 0,0,0, scaled at 1.0 and rotated to 0,0,0 before export. All this information will be saved in a XML file for later use in AGK. (Frustrum culling now works on each seperate model!)
- Global Unit variable (Now you can export models from 3dsMax in Inches, Meters, Centimeters, AppGameKit can convert everything into the regular world size)
- Mesh-Color will be used if no texture exists, if a texture exists, but has no diffuse map, the diffuse color will be used to color the objects in AppGameKit (So you actually do not need a texture for each model to have a lightmap)
- Bugs Fixed, if an error occurs, no export will take place, so there will be no bugs with broken 3d models if you try to import it to AppGameKit (checking for existence is not enough to load a model)
- direct material opacity support! - Can be even set to additive inside the "Extended Parameters" tab from the material.
- 3ds max will now export the volume of the objects to 3dsMax. I think this is more interesting, if you try to add physical elements from 3dsMAX through the importer-
Still to do:
Set lightmap size after the surface size of each mesh (Currently you can only set one lightmap size for all objects) If this is done, it will result in more performance and even smaller files. (If there is a tiny model in the map, it should not have a 512x512 lightmap, that is oversized)
If the UV Map on an instance is diffrent than the one in the reference (in 3dsMAX,) so its not an instance anymore and will be saved as an original. (Dunno if my code does this already, should but I have to try it) does work as far as I can get it. To generate an original from an instance, convert the instance to an editable poly
Known bugs:
When a new Standard material is made, and a diffuse texture is added the size of the texture is set to 100.0, it should be 1.0 in order to not to mess up the UV map on layer 1, some kind of strange behaviour of 3dsMax, because once I modify the size to 1, its exacly like in AppGameKit, maybe I have to scale the object UV after this size to get universal compatibily.