Merge/combine materials
-
I've looked through the plugins forum and can't find it: is there a plugin that combines materials? I import a lot of models (I like to save out components and work on them in a separate instance of SU) and I often get duplicate materials: "Blue glass", "Blue glass1", "Blue glass2"...
The Global Material Changer plugin works for me when I'm paying attention, but not when I'm working on a model with multiple people who don't care. Even just a juiced-up version of Global Material changer would work: I'd love to be able to choose two or more materials as the "OLD Materials to Replace" and then select the NEW Material to Add. How difficult would this be? (I don't Ruby Script...)
-
It is a very reasonable request, I suffer from this a lot myself.
-
To clarify...
You want a tool to check if some materials have the same color RGB values, transparency, colorizing, texture-filepath and texture-scaling.
If so then say take the simplest name of them all and replace all other materials with the one AND after all materials sorted purge the unused ones ?
This is doable... I feel 'MaterialConsolidator' coming on... -
My new 'MaterialConsolidator' is here http://forums.sketchucation.com/viewtopic.php?p=295290#p295290
-
There is a plugin called Repaint on smustard which replaces a texture with another one which is already in the model. The now unused replaced texture can then be purged. It works good but it is not free. $3.00 is not too expensive though.
-
There are other material changing plugins, too, however this new one by TIG automates the whole process!
-
I just got back and found all these responses to my question/request. Fantastic! TIG, thank you so much for the Material Consolidator plugin! It works beautifully and rids me of all duplicate materials!
Now... how difficult would it be to take this one step further? In addition to all the duplicates I get, I also get SIMILAR materials that should be consolidated. For example: "Glass-blue", "Glass-blue1", "Glass-blue2", etc. are all meant to a glass material in my model. Different people in my company tweaked them to suit their own asthetic so they have different properties. I'd love to be able to manually choose these materials and consolidate them.
What to you think? Easy? Hard?
-
@ledisnomad said:
For example: "Glass-blue", "Glass-blue1", "Glass-blue2", etc. are all meant to a glass material in my model. Different people in my company tweaked them to suit their own asthetic so they have different properties. I'd love to be able to manually choose these materials and consolidate them.
What to you think? Easy? Hard?
How would there similarities be determined? Remember that computers doesn't do subjective evaluation very well.
-
The user would chose the materials to consolidate. When I orginally posted, I wasn't even considering an automated solution to determine duplicates. TIG's plugin works wonderfully for that and is very helpful. I guess what I was originally thinking was an updated/new Global Material Changer plugin to select multiple materials and consolidate them.
-
I suppose you could use a dialog to set up a pattern like /^Glass-blue/
For material name that starts with 'Glass-blue'.
Or /[Gg]lass/ for any material name containing the text 'Glass' or 'glass' etc etc...
You can eval the pattern string in a gsub() on each materials name...
Then you can iterate through the Model's Materials and find all of the ones with 'matching names' as an array.
Then you can apply a Name+R+G+B+A[+texture+size] which is initially read from the first match in the array... and offered for 'adjustment' in a second dialog...
On OK all of the matches are 'consolidated to 'Name' using the set R/G/B/A..values etc and the rest of the matching materials are replaced with 'Name' and then 'purged'...
Advertisement