View Full Version : mia_physical sky/sun gamma/node issue
fiscus
05-01-2007, 05:41 AM
Hey guys,
I'm new to Maya so please bare with me.
I've been quite impressed with the results from the new mia_physicalsky / physical sun in 8.5.
I started experimenting with a animation I'm working on and I noticed that my textures were rendering washed out.
After a bit of googling I found this article - http://tutorialscentral.com/index.php?option=com_content&task=view&id=57&Itemid=1&limit=1&limitstart=1
Which touches on my the textures are washed out and how to fix things.
Firstly, I couldn't seem to add a gamma correction node into my texture - but I guess I can consult the docs on how to do that (again I'm very new to this). Although any pointers on how to drop in a gamma node in the hypershader would be great.
I couldn't seem to find many other threads of people having issues with their textures blowing out so I started to wonder if there was a general setting that can combat or control this?
Or does this gamma correction node need to be applied to every texture that you are using in the scene?
Finally when I get to preview my render in the script editor I keep getting:
// Error: (Mayatomr.Custom) : mia_physicalsky1: couldn't find light node sunDirection, ignored //
Any ideas what that might be?
Thanks.
re gamma, you can either apply an overall gamma correction on the final image, or apply it per texture. i prefer per-texture, but i'm a control freak that way. also if you happen to use hdr images for input (it might happen), hdr images have an implied gamma of 1, and you DON'T want this corrected.
to apply, in hypershade go create->colour node->gamma. set the 3 gamma values to 0.45, middle-mouse drag your image node onto the colour slot of the gamma node, then middle drag the gamma node to the colour slot of your material.
and why '0.45'? mentalray internally is using no gamma at all, which is a gamma of 1. most images and textures you use are using a gamma of 2.2. To correct this to 1, you multiply 2.2 by its inverse ( 1 / 2.2), this equals 0.45.
incedentally, if you're using pure colour rather than textures, you can use the gamma node by itself as the colour input. just alter its colour swatch, set the gamma to 0.45, and you'll get a matching colour in the render.
re the light direction warning, you're using 8.5, and using the built in method? ie, mentalray globals, environment, 'create sun and sky'. this create a directional light, which is wired into the sun-sky shader, and uses this to determine the sun direction. if you delete it or rename it, you'll probably break things.
edit: ah, i see that tutorial covers everything i just said. doh.
Aenarion
06-04-2007, 02:32 AM
That tutorial was the best starting point for me as well in using the new PhysicalSun in maya 8.5 but i wanted to ask somethings and since this thread is open...
1) I know how to correct the gamma etc, but the problem with using the gamma node is that you have to apply it on all your textures. For being scenes that's a drawback. I heard that there is some kind of script that when you render it's apply the gamma correct node auto on all your textures colors but i couldnt find it so far.
2) The other problem I came across working that method is the textures when you apply the gamma node on the shading mode (press 6) dont look correctly. So if i need to adjust the way my textures look i have to disconnect the gamma node fix the textures and then add back the gamma node. That's a bit time consuming. But i think there is an option to fix that.
3) Fixing the light intensity of the shader. I mean it's brightness/contrast in photoshop terms. This is a little bit frustrating after you apply the gamma node you only have on thing to play with mainly the diffusion channel and if you map something else there not much to do. (well go a bit more advanced on shaders maybe and add some more nodes)
4) The method of correcting the gamma from turning the gamma to 0.454 in Frame buffer i think is wrong all the way. The reason for that is that this method applies gamma correct to all the render and not only to the textures. And the only reason we need the gamma node is to UNGAMMA the textures so that the gamma from the lense (tonemapper in other words) will apply the proper gamma. So if we use this method it just ungamma the whole texture but the only thing that needs to be ungamma'ed is the textures.
A good illustration of this is the link below from CGTALK :
http://forums.cgsociety.org/showthread.php?f=87&t=452901&page=8&pp=15
look for the post of Sphere close to the bottom. In my understanding if we use the frame buffer fix we got :
a) texture with proper gamma
b) render no gamma (since we inversed the gamma to 1)
So if you see in that post it's the 3rd pic which is wrong. The result might look ok for some people's eyes but according to the whole thread is wrong. correct me if i m wrong though.
5) Is there a way to fix the warning that MR throws when you use gamma node? I guess it doesnt affect the render but just for the sake of it.
6) finally I think we should make a sticky of how exactly this thing works because it's a great addition to maya (only 8.5) and a lot of people dont get it and it's worth. Also there is so much misinformation over the net about this that you are easily misguided. And there is always more than one way to do something but it's always better when you're learning to follow 1 way till you go more advanced and you experiment and tweak better things.
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.