Community
3ds Max Forum
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Replacing scene materials using the material library 3DS Max 2018.4

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
jasond240
7577 Views, 10 Replies

Replacing scene materials using the material library 3DS Max 2018.4

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

10 REPLIES 10
Message 2 of 11
hagen.deloss
in reply to: jasond240

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


 

Message 3 of 11
jasond240
in reply to: hagen.deloss

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

Message 4 of 11
RGhost77
in reply to: jasond240

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


Royal Ghost | veda3d.com
Message 5 of 11
hagen.deloss
in reply to: jasond240

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


 

Message 6 of 11
jasond240
in reply to: hagen.deloss

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

Message 7 of 11
hagen.deloss
in reply to: jasond240

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. Screenshot (123).png

 

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


 

Message 8 of 11
jasond240
in reply to: hagen.deloss

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

Message 9 of 11
hagen.deloss
in reply to: jasond240

 

@jasond240

 

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.

selectbymat.gif

 

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


 

Message 10 of 11
hagen.deloss
in reply to: jasond240

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


 

Message 11 of 11
igord29M3PL
in reply to: hagen.deloss

this solved my similar problem, have an animation with like 20 scenes but the materials have to change, this is the right way, thank you Hagen

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report