Issues with multiple materials

Baddcog

06-07-2008 19:39:24

Been messing with this exporter a few days to view in Lexi viewer for a yet to be released game Zero Gear.

Anyway, I've been getting errors when trying to open models in Lexi View. Here's what I'm doing.

Max 7, create mesh.
make 2 materials, one is for spec, one for matte.
Add matte material to obj.
Select polys and add spec to them.

I have 2 material slots, but on export they get added into a sub-object material: ie: material#35/matte, material#35/spec

My material file has 2 materials with those paths/names.

I load in Lexi view and get an error that says Material#35 is already in use.
This has been a real pain as I am trying to export one mesh, not 2 but can't get the export to NOT make a sub-object material.
------------------
I have found a work around though, it's very odd because the end results seem the same.

First I do all of above, make mesh, tex with different materials, export as 3ds.
Reset my max file to clear it.
import my 3ds.
Don't apply any materials and material #35/matte and spec are both listed.
Export the osm. The material file looks the same as first time.

Lexi Viewer will now open the mesh.
--------------
Am I doing something terribly wrong or is this an issue with the exporter that needs solved?

Lioric

07-07-2008 17:42:12

The exporter is not doing the sub-object material, this material is created when you apply a different material to a selected part of your object

The issue seems to be in the mesh viewer you are using, as the it seems it is using only part of the name of the materials (the "material#35" part in your case) and that creates the problem, if you have access to the sources of the mesh viewer you can fix it, if this is the case

Have you tested loading your scenes with the oSceneLoader demo application?

Baddcog

07-07-2008 20:49:28

Thanks. I think I started to realize that when I exported the 3ds, then re-imported it. It has a sub-material then also, but for some reason exporting the mesh after that fixes it.

I haven't tried oSceneLoader yet, I'll have to give it a shot and see what happens.