View Full Version : photographic lens shader math?!

03-02-2011, 05:09 PM
I lit a scene with the "photographic lens shader" and the simplest settings there is:
cm2 1
whitpoint white
film iso 0
camera shutter 0
f number 0
vignetting 0
burn highlights 0
crush blacks 0
saturation 1
gamma 2.2

just for the linear workflow with a physical sky&sun basically.

after setting up the render with all the passes, changing the gamma back to 1.0 and setting up to 32bit open exr, I tried combing the images together like this:

diffuse+indirect+reflection+refraction+specular and on top a gamma 2.2 node

but the comp doesnt look the same as the render view preview.
as I read the lens shader is not going to be applied to the renderpasses, so I figured it has something to do with the photographic lens shader.
what else is it doing except the gamma thing?

thanks for any advice!

03-02-2011, 06:55 PM
I think those should all be adds, not multiply's

03-02-2011, 06:57 PM
haha.yeah of course, sorry my mistake. I am doing adds of course! not multiplies!

03-02-2011, 10:06 PM
i wouldn't bother using the lens shader if you want 1 for 1, use mayas crappy color management to apply a sRGB lut to the maya render display.

03-02-2011, 11:17 PM
You might be better off using the simple exposure.

However, I believe mental ray samples internally in perceptual space. The lens shader is really just a good preview unless you make changes where it's indeed a different colorspace or LUT other than sRGB.

03-02-2011, 11:32 PM
burn highlights 0

This is most likely why. When this setting is at 0 you are not allowing any pixels in the image to clip. Everything in the image will be compressed to fit into the 0 to 1 range when this is set to 0. If you set this to 1 your results in Nuke will probably match what you see in Maya much better than they do now.

03-15-2011, 03:11 PM
thx for the replies

ndeboar: yes in the future i guess i will

redsand1080: ok if this is true, I totally got these values confused, thought 1 meant everything is pressed in a range between 0 and 1

ok but lets say, the client saw the first image with the photographic lens shader on it and every change from the approved picture is confusing him. sadly we all know this is true.
what shall I do ?

03-15-2011, 03:39 PM
ok if this is true, I totally got these values confused, thought 1 meant everything is pressed in a range between 0 and 1

Yea you got this confused. 1 = no compression. 0 = maximum compression, i.e. no values in the image are allowed to go over 1. You can test yourself with an HDR image plugged in an env node in Maya. You'll see at 1 lots of values get blown out. at 0 nothing will.

Try setting this to 1 instead. Let me know if it gets you where you need to be with your image.


03-15-2011, 04:18 PM
thanks justin,

anyhow, I still got the same problem
I have the feeling, that the photographic lens shader is doing some things more and I would like to know what..

CGTalk Moderation
03-15-2011, 04:18 PM
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.