Render several materials

Render several materials

ehH4VM4
Community Visitor Community Visitor
466 Views
1 Reply
Message 1 of 2

Render several materials

ehH4VM4
Community Visitor
Community Visitor

Does anyone in here gave a script on following

 

On a selected object in max to apply material, render in camera view with the scene settings, save the image then apply another material from material editor, render out give it a new name...and so on..

Would be really helpfull

Thank you all 

0 Likes
467 Views
1 Reply
Reply (1)
Message 2 of 2

wernienst
Collaborator
Collaborator

Here is a very simple one:

Assuming the materials in question are in slot 1 to 5 and a sample object is selected:

 

firstSlot = 1
lastSlot = 5
for m = firstSlot to lastSlot do(
    $.material = meditMaterials[m]
    imgName = "Sample_" + meditMaterials[m].name + ".tif"
    render outputSize[640,480] vfb:true outputfile:imgName
    )

The image files are generally placed in the project's sceneassets / images subfolder.

Caution: The script does not do any validation tests and overwrites any files with identical names.

0 Likes