Notifications
Clear all

[Closed] Merging materials into a scene

Hi,
I’d like to merge materials into a scene. If you go through the interface and open a new material-library, you can either load a .mat file or a .max file. If you choose the latter, you see all materials from that scene. Is there a way to get this to work with maxscript? In mxs you can only load .mat-files.
The way I merge materials at the moment is by merging the objects, collect their materials and delete the objects again. Is there a more clever way?

Klaas

3 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

When MAX opens a material library as max file it actually merges the scene the similar way as you are. The cleaner way is to xref the scene with materials, collect them, and delete the reference.

That’s how I do it for mine, altho I am thinking about a custom material exporter that would work between max versions, I have written one for specific jobs but there’s a hell of a lot of things to include.

 JHN

I also found that you can get in trouble with memory. if you’re merging a large library by max file, right now I’m exporting the lib file as .mat file and in my merge tool use the available matlib functions, it seems to be less of a burden on my scene’s and material tool. I will look at the xref scene as well, nice suggestion, it save me a step from making a .mat file.

-Johan