Autogamma

50 votes
Version: 
1
Date Updated:: 
12/09/2008

This is a script that simplifies the working process for a linear workflow.

The script applies a colour correct with a gamma of 2.2 to every material at render time i.e textures AND flat colours.

Lastpixel works on lots of large projects with multiple xrefs being created by several staff members so to avoid problems of having to manually apply colour corrects we use this script.

We developed this script about 6 months ago and its great I leave it turned on all the time
with remove CC's after each render (so I dont have to click through colour corrects in my material editor )
colour mapping to linear gamma 2.2 (dont affect colours ticked) and thats it, LWF for dummies.

Installation
Gup. files goes into plugins folder and mcr. goes to macroscript
Customize Lastpixel and place in you quad menu or whatever you prefer.
And obviously you need to install colour correct script
http://www.cuneytozdas.com/software/.../#ColorCorrect

It saves current setting to the scene so if you reopen the scene the same setting stills holds, will do xrefs, works with standard and vray mats only.
The script only applies colour corrects to materials applied to an object in the scene
i.e. no colour corrects applied to maps in the enviroments slots or unused materials in the material editor.
no colour corrects to textures i.e. a texture applied to a light

Dont forget to go to you max preferences and either completely disable gamma lut correction (I do this as I use Vray frame buffer all the time) or set your bitmap files input gamma back to one otherwise you will colour correct your textures twice.

There is also an override values drop down that allows you to access all the usual colour correct options where you can change the gamma etc. (and turn your whole scene green if you want )

Although we use this in a production pipeline and it works fine I/we (lastpixel) take no responsibility for it doing anything at all or possibly destroying everything,everywhere, USE AT OWN RISK yada yada yada....

EDIT
As some people on chaosgroup were having issues using this scripts I posted an explanation of how to use it. I figured I would copy it here

LWF is a two step process
first gamma correct your materials.
Max gives you the option to do this you can set bitmap input to 2.2 in the gamma preferences BUT Max will not apply a gamma correction to a flat colour e.g. a red colour swatch with no bitmap on it.
To solve this problem you must put colour corrects onto the diffuse slot of flat colours and set them to 2.2 and this will fix the problem but its messy especially with a lot of people working on large scenes.
To get around this you can stop using max to colour correct you bitmaps (i.e set bitmap input back to its default of 1) as this only does half the job.It misses all your flat colours.Instead use a script to put a colour correct onto every diffuse slot so it will affect a bitmap or a flat colour. There are several scripts that do this.

Where the autogamma script shines is that it only applies the colour corrects at rendertime (including xrefs) so you dont have all these diffuse maps nested in colour corrects in your material editor.
Because you dont have a colour correct in you material editor (which would have darkened your material) you dont need to brighten the material editor so you dont need to tick affect material editor. The affect colour selectors is the exact same so you dont need to tick affect colour selectors.

In other words your diffuse map and flat colour materials will look like they always did and the whole bitmap and colours problem is taken care of at render time.

The script only takes care of the first part of LWF
second gamma correct your display
Enable gamma in the max preferences gamma LUT and set it to 2.2. The gamma 2.2 tickbox here only affects the display of the max frame buffer, the vray frame buffer has its own button (sRGB button) to do this.
Both will brighten the image within there own respective frame buffers but this is for display purposes only.
Colour mapping in vray is where you decide to burn the gamma into the image or not.

I use the vray fb all the time with the srgb button on but if you do want to use the max fb or clone a copy from the
vray fb to the max fb then leave gamma enable on in the gamma and LUT and set it to 2.2 (same as in my screengrab) and you max frame buffer will look the same as your vray frame buffer.

input bitmap gamma 1 (the autogamma script is now changing you bitmaps to 2.2 at rendertime)
output bitmap gamma 1.

Finally colour mapping set it linear and set gamma to 2.2
If you dont want to burn the gamma into the image tick the "Dont affect colours adaptation only" box
If you want to burn the gamma into the image leave the box unticked

Then save out to exr. and you should have no problems.

www.lastpixel.com.au

Other Software Required: 
colour correct script
Version Requirement: 
max 9 32/64 bit and max 2009 32/64
Video URL: 
AttachmentSize
Autogamma.zip54.95 KB

Comments

Comment viewing options

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

2012?

Is there likely to be a release for this for 3ds max 2012?

The linear workflow check-box introduced in SP3 is a workaround for converting old scenes and not recommended to be introduced in to every day workflow.

This script was the best I'd ever used and now they've released an updated ColorCorrect plugin I'd love nothing more than to be able to use it again.

titane357's picture

Hello ! This script is

Hello !
This script is amazingly usefull BUT I encounter some problems :
sometimes when I remove, then add gamma correction, this script make error and apply some diffuse map to another material...
(maxdesign 2011 vray 1.5) Now, I'm too afraid to use it and mess my material.
If you can help... thanks.

jinj's picture

I got the same error on

I got the same error on 2011
1) I open the script in maxscript editor...
2) from toll in the menu bar... select: evaluate all
3) save
4) than you must (one way is to) select again seve as,
copy to desktop the mcr file... close the maxscript editor with
out to saving nothing!!! drag and drop the script in max view port...
now the script run fine without showing the error again!!!
make a copy from the mcr for future use!!!

kawpatiek's picture

@seatar: Thanks for the

@seatar:

Thanks for the quickfix I think this will do for the moment

Saetar's picture

I'm having a similar problem

I'm having a similar problem in 3ds Max 2011. The only solution to make a workable script - you must open the script in the LP-autogamma.mcr MaxscriptEditor and do evaluate all. Still want to decompile the script under the 2011 version that did not have to do all the time to evaluate all MaxscriptEditor each time you open 3ds Max 2011.

kawpatiek's picture

Hi, I've been using this

Hi, I've been using this script since Max2008 and i'm terribly loving it.

But it's weird cause right now I've upgraded my workstation to Max2010, And I'm getting an error on the script.

My max script dialog is showing " --No ""+"" function for undefined" pointing to line 19 "rdoCurrentState.state = AutoGammaEnabledState + 1" of autogamma.mcr file.

Any leads on fixing this???

gregkilla's picture

hi, first of all, thx for the

hi, first of all, thx for the script - I've been using it for a year or so. I can confirm that it works fine with 2010 - one just has to download beta cc from the forum:

http://www.cuneytozdas.com/forum/topic.asp?TOPIC_ID=645

There are two things on my wishlist, though ;]

1. Help
2. Possibility of cc reflection channel

Anyway thanks again for this time saving plugin.

+

maxplugins's picture

If anyone wants to try it

If anyone wants to try it out, I've recompiled Autogamma for Max 2010. I haven't had a chance to test it, so I'd be glad for any feedback on whether it's OK or not...

I've also adjusted the UI of the macroscript, because in 2010 a lot of the labels were being cut short.

http://www.maxplugins.de/r2010_files/lastpixel/Autogamma.zip

Dave

MAX Plugins.de

The Plugin database

MAX Plugins.de

The Plugin database

toriacht's picture

probably not actually as of

probably not actually

as of right now chaosgroup (we are a vray studio) have implemented a linear workflow option (its in colour mapping in Sp3)

I dont think it works in the same way, for a start its faster and seems to use less memory but the results are more or less the same thing as autogamma (enviroment images e.g. vray sky look different as autogamma doesnt apply a colour correct to these maps).

So further developement is unlikely

tryharder's picture

any chance to see it soon

any chance to see it soon for Max 2010 ???

Comment viewing options

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