Max > Unity - OBJ and Mat IDs getting in a jumble...

Hi, I’ve got a weird issue importing OBJs from Max 2014 into Unity. First up I’m using .obj to work around some issues we had with mesh orientation on a previous project that I guessed would apply here too.

So I have an object in Max with two mat IDs and it looks fine. I export this and import in Unity but see three IDs in the Inspector, there are definitely only two on the source object. The IDs also get jumbled and are partially applied to the wrong faces, and one quad has a third material applied. I’ve tried a few test objects with several materials applied and they all do the same thing - jumbled Mat IDs and this one random pair of tris with their own material. I think materials past the first two or three are being binned in all cases. FBX exports fine, and I can’t see anything wrong in the OBJ export settings but logic suggests this might be where the source of the problem is.

I don’t know of any limitations relating to the obj format but I guess there could be some. If it was coming through with one material I’d assume so, but the fact it’s both adding one and jumbling IDs this obviously isn’t the case.

If I scratch my head much more I’m gonna draw blood…

Curiouser and curiouser.

The extra ID in my first object seems to be a corrupt matID that’s as a result of the material changing. I applied 6 materials in horizontal strips to a sphere, the first is OK, the second is applied to the whole rest of the object except for the first quad of each new mat, which gets the correct material as applied, and past this all faces revert to the second material, as seen here:

It’s looking more and more like OBJ just isn’t gonna work for objects with more than one material, which seems very odd. Guess I’ll try FBX and hope I don’t run into any weird orientation problems.