Material preview toggle (hide lights, set exposure, set env. background)


i´m currently working on optimizing my workflow.
And since my Computer isn´t that powerful, rendertimes one of my bigger problems.
Especially when working on materials, waiting for test-renders, just to change little values is killing me when working on larger scenes.
So my workflow for testing materials in a scene consists of the following steps for me right now:

1. Pick object for preview and isolate selection.
2. Turn off all scene lights.
3. Turn on the skylight for material-previews (labeled "MatSky").
4. Put my preferred HDRI into the environment slot (skylight is told to use environment).
5. Turn down exposure to an appropriate value (one skylight=exposure value of -2 to 0).
6. unhide my materialpreview-layer (some studiogeometry, depending on the objects i use).
7. Hit render.

Once i´m done tweaking the material, i have to revert all steps:

8. Turn off skylight.
9. Replace HDRI in Env-Slot with Mr Sky.
10. Turn up exposure.
11. Hide materialpreview-layer.
12. Turn on scene lights.
13. Unisolate selection.

Then i usually do a testrender, to see how the material looks in the scene.

It woud be a major time-saver to just do all the above steps with one click, instead of many, but unfortunately some of the steps don´t show up in the macro-listener and i don´t have the time to work my way through the max-help right now.

So maybe one of you with a little more experience could point me in the right direction...


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture


you are lucky man then, what about 4GB like me ;)

my recent MAXScripts RSS (archive here)

wearestardust's picture

yeah, i´m still having

yeah, i´m still having trouble with the paths thing...i´m moving around alot and therefore have all my 3D-stuff on an external drive (for the time beeing at least), so i guess that was the problem there.
On the other hand, i´m unfortunately still a little short on CPU and RAM...8GB and Amd II X4 isn´t that pretty.
Take a 5.5 Mill poly scene and you might be getting anxious like me...;)
I´ll probably try again though cause i really don´t like my workflow atm.

wearestardust's picture

That does sound like an

That does sound like an alternative, i´m still having some conerns though:

1. It seems my maps get lost when i copy and paste objekts, wich kind of defies the purpose of material-tweaking...probably because my paths are set to relative, so i´d have to change the pastefile.max-directory from autoback to something else, right?
2. probably not that much of an issue, but 2 instances of max eat up more resources.
3. once your done and you want your changes to take effect in the original scene you have to copy and paste the objects back and delete the originals or what?

br0t's picture

I dont have any problems with

I dont have any problems with maps, if all your paths are relative I'd rather say you need both max instances to have the same project folder set. Also "getDir" will search in the current project folder.
RAM and cores is something you should have plenty off :D I usually have 2 or 3 max instances open, and can still render and work at the same time.
Yes I would paste them back into the original file and either delete the old stuff before or using the popup dialog when merging in the changed stuff.

Never get low & slow & out of ideas

br0t's picture

I use a similar workflow when

I use a similar workflow when testing out materials, but its easier:
have one max instance with your scene, and another one opened with a test scene, e.g. with an HDRI and some lights and geometry. You can then use this script:

to copy and paste Objects from one max instance to the other. Fast and easy. It may be helpful to change this line  thecopypastedir = getdir #autoback -- CHANGE THIS TO ANY FOLDER YOU WANT to something more general like  thecopypastedir = "C:\\" -- CHANGE THIS TO ANY FOLDER YOU WANT so it will work with max intances that have different project folders. If you want to copy paste between max 2011 and 2012 there is also a small change needed, butmaybe you wanna try it out first, just a suggestion.

Never get low & slow & out of ideas

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.