I'm looking for a way to create a dynamic material library of sorts... if I update a shader in one file, those changes apply to others as well.
I have a scene with thousands of objects and about 75 shaders. That scene is duplicated to several max files, each with different object animation. When I change a shader on an object in one file, I currently need to re-create / copy it over to the other scenes. This is very time consuming. Is there a way to make this more efficient than using 'select by material' with a particular shader and replacing with the updated version? This would take hours.
Any suggestions are appreciated! Thanks.
JD
Your post subject line has been edited by @hagen.deloss: Replace materials on thousands of objects with same name in another file
Solved! Go to Solution.
Solved by hagen.deloss. Go to Solution.
Solved by hagen.deloss. Go to Solution.
Hello @jasond240
Thanks for posting your question here on the forums! This reminds me of a file renaming question I previously helped out with here, I wonder if you can take any information from this thread.
What version of 3DS Max are you using?
We found and tested a script that would rename and re-path multiple files inside Max so the user could rename their bitmaps, and not have to relink them all by hand. Here is the script and a test scene that helped us do this.
I hope this helps!
Please select the Accept as Solution button if my post solves your issue or answers your question.
Hagen Deloss
Community Manager | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA
Hi Hagen, thanks for the response. I'm going to bookmark the script you mentioned as it may come in handy in another project. Unfortunately, I'm not sure if it will apply here as I'm not actually renaming anything.
Example - In one file, I change the RGB value of a colour... I need that change to be reflected in the same material in 10 other Max files. They may or may not have linked bitmaps.
Also, say I have box001 in the master file and I assign material#1 to it. It would be amazing if box001 automagically gets assigned material#1 in the 10 other max files. I thought of using xref but that would be impossible to set up with thousands of objects.
Max 2018.4 with Corona Renderer
Thanks!
JD
This is not helps you now but may help in future, please vote https://forums.autodesk.com/t5/3ds-max-ideas/live-material-library/idi-p/8003391
Hi @jasond240
That does sound time consuming! It looks like @RGhost77 linked a great idea that pertains to Material Libraries, which is what I was going to suggest, have you looked into using material libraries on this project? They can hold all your scenes materials in an external file, that can be reloaded and updated any time!
What version of 3DS Max are you running currently? What rendering engine are you using?
Here is a video going over how to save and load material libraries, and as you can guess, material libraries do need to be saved/loaded manually, they don't update live.
I hope this helps in your situation! Let me know if you have any other questions, I'm happy to help 😄
Please select the Accept as Solution button if my post solves your issue or answers your question.
Hagen Deloss
Community Manager | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA
Hi Hagen,
I do use many saved material libraries already however how would I easily replace a scene material with one that's in the library? If I drag the updated material from the library to the slate editor, it just creates an instance/copy as material#1 and doesn't replace the existing one in the scene... as far as I've known.
I'm using Max 2018.4 with Corona Renderer
Having an option for a live material library would be very helpful in this case.
Thanks,
Jason
Hi @jasond240
That's a great question, and I had no idea how, so I poked around and it looks like if you right click on the material library drop down, there's an option to "update scene materials from library", here's a screenshot of the option.
I hope this helps! If this isn't getting you the results you wanted, let me know and we can keep troubleshooting 😄
Please select the Accept as Solution button if my post solves your issue or answers your question.
Hagen Deloss
Community Manager | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA
We're definitely getting somewhere with the "update scene materials from library" option! I can use it for some of my other projects and maybe this one.
An additional problem here is that not all of the thousands of objects have materials assigned to them at this point. Also the assigned material may change to something completely different as the project progresses. Then I'd have to manually change them all again.
Seems like I would need a script to parse all objects in a parent scene and assign materials in the child scene based on object name. For example, the script prompts for parent file name, finds Object01 in parent scene with Material#1, script then assigns Material#1 to the matching object in the child scene.
Hopefully my situation isn't a one-off and might be useful to others who work with huge scenes and multiple versions of scenes at a time.
JD
Oh yes, this sounds like a custom script for sure, I was looking on Scriptspot and wasn't able to find anything that did exactly what you are looking for, but you are right, I'm sure a lot of folks would benefit from a tool like that!
The best idea i have had would be to first select all the objects unassigned and group them, then assign the material to that selection. once you have assigned materials to the objects, you can ungroup them again.
Once a material is applied to a group of objects, you can reselect those objects by right clicking on the currently assigned material you want to replace, navigate down to select>select by material. Here is a gif of where that option is located.
I wish I had scripting experience, but the best I can do is point you in the right direction!
Please select the Accept as Solution button if my post solves your issue or answers your question.
Hagen Deloss
Community Manager | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA
Hi @jasond240
I wanted to check back and see if my post helped you with your problem. It would be super helpful if you could add a post with how you decide to proceed, and your results. That way other Community members can benefit from your process
Please select the Accept as Solution button if a post solves your issue or answers your question.
Hagen Deloss
Community Manager | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA
Can't find what you're looking for? Ask the community or share your knowledge.