Notifications
Clear all

[Closed] Fill the mat editor w/VR mats?

You probably all remember the good old one script, whicj simply fill the material browser when the max starts with new scene? Simple 24 VR mats of diferent colors, in the mat editor?

But I can not find it now?
Can somebody help me?

11 Replies
1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

Just go to Menu > Customize > Custom UI and Default Switcher… and in “Inital settings for tool options” pick “MAX.vray”.
NOTE: i suppose you already have installed vray

Or you can save this code as *.ms and place in maxroot>Scripts>Startup folder.


 -- uncomment next line if you not want different randomization on every startup
 --seed 0
for m in 1 to meditMaterials.count do 
( 
	meditMaterials[m] = VRayMtl diffuse:(random black white) \
	name:(if m < 10 then ("0"+m as string+" - VRay") else (m as string+" - VRay"))
)
 
1 Reply
(@okmijun)
Joined: 11 months ago

Posts: 0

I am stupid!
I put it in specified folder and it doesnt laod on startup, but it works, when reload it

If u like full saturated random colors

VRayMtl diffuse:(c = random black white ; c.s = 255 ; c)

The default state of the material editor comes from the Medit.mat in your Defaults folder. Save your desired materials in that file and it will be used for scene start, or Medit Reset.

FYI, cleaner code for the name is:

name:(formattedprint m format:"2.2d")

-Eric

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

Very nice.

name:(formattedprint m format:"2.2d")+"some name"

THANKS!

Hvala Branko and Eric!

I not suggest you to use startup script. Eric suggested better solution.
Try this:
#1 Use my code to randomize diffuse colors of VRayMtl’s in the Material Editor or create your custom mtl’s.
#2 Save Material Library file using name “matlib” in folder:
max2014 -> [b] 3ds Max 2014\en-US\defaults\MAX\FactoryDefaults[/b]
or if you use later versions then:
max2012 -> [b]3ds Max 2012\Defaults\MAX\FactoryDefaults[/b]
NOTE: before you save mtl Library, rename file that already exist in theses folder (if you want backup default file later)

Thanks Gazibara!

Hey countryman
are you received my mail?

right now!