View Full Version : How to gamma correct Maya Fluids?
TheNeverman 09-09-2008, 03:10 PM I'm using some fire created with Overburn (http://petershipkov.com/development/overburn/overburn.htm) in a scene lit with physical sun/sky - which of course means I need to tweak the gamma in the scene - but in the hypershade, I can't find what I need to grab from the fluidshapeNode to pipe thru my gammaCorrect node... help?
thanks
(the color and incandescence ramps are what I need to run thru a gamma correction node)
| |
Tobbe
09-09-2008, 05:52 PM
Hi, what you could do is to connect several gamma-nodes to the ramp inputs.
For example: fluidShape->color->color[n].color_Color.
Duncan
09-09-2008, 07:00 PM
Just changing the fluids input colors is not really a gamma correction. You could try routing the fluid outColor attribute through the gamma node. The outcolor is the final shaded color value sent to the renderer. I'm not sure if it works to simply insert the gamma node between the fluidShape.outColor and the shadingGroup.volumeMaterial connection, because the shading group uses the connection to find the fluid and also get its outTransparency values( although you could try it). However you can assign a volume shader node to the fluid then connect to the volumeShader's outColor and outTransparency nodes. ( the volume shader is a do nothing node that simply has an outColor and outTransparency attribute ) Connect the fluidShader outColor to your gamma node then connect the gamma output to the outColor on the volumeShader node. Directly connect the fluidShader outTransparency to the volumeShader outTransparency. I've not tried it, but it should work.
Duncan
TheNeverman
09-09-2008, 09:59 PM
thanks for the info Tobbe and Duncan...
my current workflow when using physical sun/sky is to run all my texture files thru a gamma correct node - which can be time consuming obviously...
Is there a better workflow when using physical sun/sky?
lauras
09-09-2008, 10:12 PM
Hi!
With the Physical Sun & Sky setup you can do your gamma correct to the final render instead of each individual texture.
To do this you will need to set your mia_exposure_simple gamma value to "1.00" and in your Render Globals you will need to go to the Framebuffer options and change the Gamma value to ".455".
I have noticed that it does yield slightly different results than doing a gamma correct to the individual textures.
OR
You can try this script (http://toi.bk.tudelft.nl/?module=meldb&page=details&sID=42) to add gamma correct nodes to all your textures.
Have fun with Physical Sun & Sky!
L
Duncan
09-09-2008, 10:30 PM
I'm not sure if it makes sense to gamma correct the textures for lighting(unless the texture is something like a sky image to use for illumination... in such cases gamma can compensate for compression in the photo). The real thing that needs gamma correction is the final rendered image( before being converted to a generally lower bit resolution file... the internal renderer values are floating point ). The gamma correction is generally to accomodate the display medium, for example the monitor.
If one has a pure white material then it will scatter all light that illuminates it. However depending on the display device and the lighting that white material could be any color... even black if there is no light. If your texture represents the surface color then gamma correcting it will affect its light scattering properties. For example if the color value was 0.5 it would scatter half the light hitting it, however with the gamma applied to the texture it might only scatter a small portion of light hitting it. This would not be accurate if the color was suppose to represent a 50% grey material.
MR has a gamma attribute in the render settings(under primary framebuffer) that you can use to gamma correct your scene. I believe it is really an ungamma, so you need to use higher values to darken, but I'm not positive.
It should be more accurate to apply gamma correction at the image level rather than to all the color/incandescence values in the scene, although the difference in some cases might be subtle. It also has the advantage of being much easier to do.
Duncan
YourDaftPunk
09-10-2008, 03:39 AM
Duncun, this has to be one of the biggest issues confusing new artists. Colors on color swatches are picked on monitors, usually pc monitors, with a gamma of 2.2, are they not? When you toss a lens shader on to your camera, you gamma up from the linear render, but the colors in that render were picked with gamma baked in already. That's double gamma. The result is a color in the render that is too bright and unsaturated.
I know that maxwell render, modo, lightwave (edit-xsi 7 too) and others let you pick a color on the swatch interface which is ungammad behind the scenes so what you see is what you get. That's why people are trying to run gamma nodes into the fluid shaders- the color we see, the one we picked with a gamma of 2.2, is not what what we get with a lens shader. That 2.2 color swatch was treated as linear (without a conversion) in the render, then gamma corrected again.
It's nice to be able to put .5 into a shader when we mean 50%, but from an artist's perspective, what looks 50% grey is much more important.
-shawn
CGTalk Moderation
09-10-2008, 03:39 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.