Condence material ID, bitmaps and material IDs
I have a multi-subobject material with nearly 500 sub-objects. most of the slots are the same exact bitmap. is there a way to get rid of the materials with duplicated bitmaps? also is there a way to change material IDs of the model to match the new reduced Multi-subobject?
I have a feeling I seen a script like this somewhere, but can not remember what it was called.
Comments
Almost there !
How about the model Material ID side of things ? any way to update the Model's IDs so that they point to the same bitmap that they had before the script?
...
Method that I posted is 30% accurate. I only filter bitmaps in diffuse map slot and submats names. There are many options that should be checked before you sets model's ID. Problem with model will be if it have different Id's then multimaterial. Also comparation of materials and maps (procedural and bitmaps) is quite complex. If you are looking more then 80% accuracy that tool will be probably commercial. Mayby someone else can you help with that.
bga
Thanks !
I appreciate the hard work, Now for a commercial tool that does this, anyone know of one off the top of there head?
...
First you need to answer on some questions:
1. Submaterials are ??? Standardmaterial, VrayMtl, Arch&Design
2. You want to exclude all mtls with same bitmap in which slot? Diffuse, Bump etc.
3. If duplicate submaterials are also used in the scene then what?
bga
hmm..
1 Standard materials
2: diffuse
3: condense them as well, and then also change material ID's to match the bitmap materials. ( if material ID 1,2, and 200 use a same bitmaps, than all material IDs 1 2 and 200 on the model will become whatever ID that the new Condensed material has set up for that ID/bitmap.
( err unless there is a better way to do this)
...
I did not tested this but you can try on material in active material editor slot.
Pick one multimaterial and run this code
bga
...optimized version
bga