Instancing 1 object and 16 Materials Limit


I have 1 model ~4-5M VE:
I need to instance it 31 times and add 31 differet materials.

But 1 object can have max 16 materials,
soo for now i have 2 main objects allmost 10 000 000 verts
and 1 of them has 16 materials, another 15 materials (all objects have different material, no textures).

Is there any way to use 1 main object and save memory?
Is there particular reason for limit 16?
Why blender allows me to add materials if after saving and reopening they are gone?


It sounds like you’re abusing the material system. If you’re not already using material nodes and/or UV maps, you should.

In the Editing buttons, set the two objects to use the same mesh. This will save memory by storing vertex information once only. Don’t forget to set your materials to link to objects rather than meshes, so you can set a different material for each object.

I don’t think there’s a particular reason for 16 materials per object. Although this limit could be increased, it’s actually quite a lot. If you hit the limit, there’s probably a better way of doing what you want to do.

Blender will only save materials that are in use. If you add a material but don’t assign it to a user or set a fake user, Blender won’t save it. This is how you delete materials. If you want to keep a material that isn’t being used on any objects or meshes, you need to set a fake user (press the F button by the material name).

It’s just the number that is hard coded into blender. In the blender 2.5 alphas, this number has increased to many thousands of materials per object.

Can you explain more closely the process?
Let’s say i have A and B main meshes with object type materials 16/15,
and allready instanced and all materials assigned to 31 objects.

Soo i have to select B mesh in edit mode or object mode and tell it’s A mesh from where?
Do i need to recreate B mesh Alt+D’s?

That’s a good news

Sorry it was double post. )

Assign the same mesh to all your objects. Then apply the materials to the objects, not the mesh. By default materials are applied to the mesh. So you have to override this. That is what the OB button is for in the materials panel. Then you will have 31 objects, all instancing 1 mesh and each object can have up to 16 materials.

Thank you all for your help.

Got it working :smiley: