View Full Version : Script/Tool for adding gamma node.
ghostlake114 01-13-2008, 10:54 AM Hi
I am searching for a script that will search in all shading network connection and automatically add gamma node correct 0.454 before any texture file, also correct color swatch of diffuse color of some basic shader ..
There is an old tool in a thread called "MR sky wash out ...", but it only works on Maya shader (lambert/blinn..) and also add gamma node every where before texture node without checking if it has been connected to gamma node or not
Thanks for any helps or sharing
| |
floze
01-13-2008, 05:28 PM
The color swatches are hardcoded into the 3dGraphics.dll, so you wont find a way to do that without reverse engineering this and maybe other binaries. Or simply ask Autodesk to implement a general solution (which is more reasonable).
ghostlake114
01-13-2008, 05:35 PM
about color swatch, script dont make any modifier to it. script check if there is any gamma node and then plug one with the same color in diffuse with gamma correction.
So have you written any floze :), I am really tiring of plug gamma node every where I could :buttrock:
floze
01-13-2008, 06:10 PM
about color swatch, script dont make any modifier to it. script check if there is any gamma node and then plug one with the same color in diffuse with gamma correction.
So have you written any floze :), I am really tiring of plug gamma node every where I could :buttrock:
From a script's point of view it'd be very tedious to check whether there's a reason to gamma correct a color or not - transparencies and alike dont need that as you know. And how would you check if a color has already been corrected or not? Same story for the textures. You could indeed write a tool that does all this once, but you'll have a problem at the second run. And even if you checked all that, you'd probably end up on the other side of this line:
bad<<<<<<<<<<<<good>>>>>>>>>>>>bad
^ ^ ^
nothing some everything
gamma gamma gamma
corrected corrected corrected
..although it looks ridiculous. What we actually need is a switchable LUT sort of control for everything - but even then we have a problem in the 3d world, because we are usually working with mixed content; some elements (i.e. sRGB textures) wouldnt need that LUT. So this LUT routine would have to check all this as well, or at least it needs to be aware, e.g. by reading the embedded color profiles of file textures. I guess that's all kind of revolutionary ideas, as it involves quite some change in the whole interface.
ghostlake114
01-13-2008, 06:43 PM
A LUT control like in 3DSMax is a revolution for Maya. I have asked about this and no way. My friends using Vray with linear workflow and they never encounter any problem of re-correct gamma, mean It is more easier for them to work. They dont need to make a long thread of "why my color wash out" but just rememmber to change gamma for scene fit their gamma output.
I notice about your loop, the script I mentioned enter this problem if we run it twice. But It will check first if texture connect to any gamma node, and we make sure must having rule using this script, for example never plug texture into any gamma node in anycase to make sure the right output.
Eshta
04-19-2008, 02:18 AM
http://toi.bk.tudelft.nl/?module=meldb
ghostlake114
04-19-2008, 02:29 AM
Thanks for great page :applause:
But the way I am using to degamma is quite simple, I build phenomenon for any shader I use with an embed gamma node value = 0.454. So no need to plug more gamma node :D
CGTalk Moderation
04-19-2008, 02:29 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2009, Jelsoft Enterprises Ltd.