OBJ import and 16 materials limit


I wrote a 3D block-building app for iphone, and I have it now exporting OBJ files with associated MTL files. I have been learning and using Blender 2.49 for Mac for a couple of weeks. Today I made a huge file with the app and ran into the Blender 16 materials limit. For a few hours I thought it was a bug in my program.

My app exports an entire scene, could be thousands of little objects, as a single OBJ file, so the number of materials can certainly pass 16. I was lamenting this when I saw something about that limit being removed in 2.5x.

I got all excited, downloaded the beta for 2.53, and opened my scene. I no longer can see my spotlights in my render, but hopefully that is a switch I need to turn on somewhere? I am on mac. In any case the scene renders correctly with all the settings I’d made in 2.49.

But now, when I import a new OBJ file, it seems to ignore the MTL file completely. I just get a grey object. Is that a bug in the new blender, or is there a way to do it?


I was thinking maybe I could import the OBJ/MTL files into another program and then export from there into a format that will work in Blender? Are there any other free programs/file formats I could use to do this?

The 2.5 beta has bugs in the obj import modul, the last fixes about are made yesterday.
Try to get a newer build from www.graphicall.org for osx.

Commit by campbellbarton :: r31351 /trunk/blender/release/scripts/io/export_obj.py: (link)
speedup and cleanup of OBJ exporter

You have to wait a few days to get a build after r31351.
Cheers mib

Check this out!

Thanks, that WORKED!