CGTalk > Techniques > Lighting and Shaders
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 10-01-2012, 03:12 PM   #16
govindk
Visual Story Teller
 
govindk's Avatar
CGSociety Member
portfolio
Govind Krishna
Texture Painter | Look Development Artist
Bangalore, India
 
Join Date: Nov 2010
Posts: 319
Send a message via Yahoo to govindk
My god!! So many Methods...!!

I am going to copy paste something from an other thread:-

In Mental Ray -
(1) You change the setting under color management,
(2) and under texture file node (depending on what you have set as input under color management),
(3) render window for viewing properly
(4) add .454 gamma node to swatches...!!
(5) rendering in 16 bit or 32 bit exr or similar linear supported format...DONE!! (hope I didn't miss anything)

In V-Ray-
(1) Turning on affect BG, don't affect colors under color mapping and setting Gamma to 2.2
(2) Adding a texture and selecting the bit map input gamma under Vray extra node for 8-bit files
(3)sRGB button for V-Ray Frame Buffer
(4) Adding .454 gamma node to swatches
(5)rendering in 16 bit or 32 bit exr or similar linear supported format


So according to EarlyWorm, tthe above mentioned method's are for jpeg and other 8bit formats..!! For .exr or .hdr we should keep it to GAMMA 1
So all this while even in Mental Ray, I was doing it wrong then.

Last edited by govindk : 10-01-2012 at 03:15 PM.
 
Old 10-01-2012, 03:28 PM   #17
kanooshka
Lighting Enthusiast
 
kanooshka's Avatar
portfolio
Dan Konieczka
Technical Director
Hartford,
 
Join Date: Mar 2006
Posts: 933
Basically the rule of the thumb is if it's not an hdri and a color or texture looks "correct" on your monitor. You need to ungamma it before rendertime (.454). This applys to any colors whether it's diffuse/specular file or a swatch on a material or light.

-Dan
 
Old 10-01-2012, 04:50 PM   #18
govindk
Visual Story Teller
 
govindk's Avatar
CGSociety Member
portfolio
Govind Krishna
Texture Painter | Look Development Artist
Bangalore, India
 
Join Date: Nov 2010
Posts: 319
Send a message via Yahoo to govindk
OH!! You have to color correct the swatch on a CG LIGHT?
There is so much I need to learn regarding the technical part of LWF
 
Old 10-01-2012, 09:42 PM   #19
revilo3D
CG Addict
 
revilo3D's Avatar
portfolio
Oliver Hilbert
3D Lecturer
Media Design School
New Zealand
 
Join Date: Mar 2005
Posts: 623
Quote:
Originally Posted by earlyworm
*Exception given to having the "don't affect colours" option on - which doesn't apply any colour mapping to the final image. But I don't use that option and I don't know enough about what it's doing to comment on it.


Its simple really. If your sampler looks at the image at 1.0 and samples it accordingly - when you apply a sRGB LUT to your image in nuke or the VFB - your image will not have appropriately or sufficient sampling - espeically in darker areas. Setting color mapping to 2.2 but choosing dont affect colors makes sampling take place with a brightened picture - but still outputs an linear image.

Do note guys that sRGB and gamma 2.2 is not the same thing. Be careful of this. From an eyeballing point of view you can't tell the diff.. but sRGB has darker blacks.
__________________
"Yeap, im certain - I spent 50hrs making sure it was a cow"

www.revilo3d.com
 
Old 10-02-2012, 05:40 AM   #20
earlyworm
car unenthusiast
 
earlyworm's Avatar
Will Earl
craftsperson
Grizzly Country, Canada
 
Join Date: Mar 2005
Posts: 1,685
Quote:
Originally Posted by revilo3D
Its simple really.


Thanks, that makes some sense - I'll give it a try. But wouldn't you want less samples (relatively speaking) in those darker areas anyway? A little bit of sampling noise in the shadows does help mimic grain/noise.
 
Old 10-02-2012, 09:58 AM   #21
revilo3D
CG Addict
 
revilo3D's Avatar
portfolio
Oliver Hilbert
3D Lecturer
Media Design School
New Zealand
 
Join Date: Mar 2005
Posts: 623
Mmm perhaps but remember a dark value of 0.2 turns to 0.5 with a sRGB LUT. Now you have issues in your midtones.

It all really depends really too - linear can also have contrasting affects - and may result in oversampling when not needed. Sampling is intended to be adaptive in relation to our perception to achieve quality/speed where needed. The image should really be sampled in relation to as how we will see it
__________________
"Yeap, im certain - I spent 50hrs making sure it was a cow"

www.revilo3d.com
 
Old 10-02-2012, 11:39 AM   #22
govindk
Visual Story Teller
 
govindk's Avatar
CGSociety Member
portfolio
Govind Krishna
Texture Painter | Look Development Artist
Bangalore, India
 
Join Date: Nov 2010
Posts: 319
Send a message via Yahoo to govindk
EarlyWorm one more aspect of that "do not affect color," is that if you do not turn in on then it bakes in the gamma value you have set into the image. In your method however, I reckon, turning that switch off doesn't do anything much as you set your Gamma Value to 1.0

After doing a couple of test with different lighting scenario (1 simple rect light, dome light with a black & white ramp, HDR images, etc)...

I feel this workflow suits me better, kinda inclined to what revilo3D & majority of others suggested:-
(1) Setting Gamma to 2.2, with do not affect color turned on
(2) Adding a texture and selecting the bit map input gamma under Vray extra node for 8-bit files & adding .454 gamma node to color swatches
(3)sRGB button for V-Ray Frame Buffer to view my images properly
(4)Rendering in 16 bit or 32 bit exr or similar linear supported format

However it does lack a lot of contrast which I am still trying to figure out, why?
In some situations I am getting good results with sRGB button turned off. So I think I will un-gamma those images with 0.454 or similar value inside Nuke to get it back. It better to do that, rather than working on non-linear and getting wrong maths.

**And I am also wondering if it is really necessary to add 0.454 gamma node to CG Light (vray light) swatches, like kanooshka suggested. If that's what he meant, I might have understood it wrong.

Here is an image with few of my settings for LWF tests, that I think I will stick with:-

http://imageshack.us/a/img705/7158/10796679.jpg

One interesting observation I made during this test is that - WHEN I applied an HDR images to my dome light and rendered it, without adding "bitmap input gamma," I got a renderTime of 4min on a 800 by 600 rez
by adding "bitmap input gamma," and setting it to 1.0 I got the same result, no change whatsoever in quality or noise but the renderTime went down by 1 min, I got a 3min...


http://imageshack.us/a/img803/7006/87178601.jpg
 
Old 10-02-2012, 12:49 PM   #23
Panupat
Expert
 
Panupat's Avatar
portfolio
Panupat Chong
Thailand
 
Join Date: Feb 2004
Posts: 1,942
The lack of contrast gives you a lot more information to work with in the darker area. Feel free to adjust it in post to have the desire contrast. It's way better than have an image without enough data.
 
Old 10-02-2012, 01:27 PM   #24
govindk
Visual Story Teller
 
govindk's Avatar
CGSociety Member
portfolio
Govind Krishna
Texture Painter | Look Development Artist
Bangalore, India
 
Join Date: Nov 2010
Posts: 319
Send a message via Yahoo to govindk
Quote:
Originally Posted by Panupat
The lack of contrast gives you a lot more information to work with in the darker area. Feel free to adjust it in post to have the desire contrast. It's way better than have an image without enough data.


Precisely Panupat!!
I thought I was doing something wrong, that's why I was loosing contrast.
But continuous tests made me realize that its better to work on post rather than fiddling around with Maya and waiting each time for render to complete.
 
Old 10-03-2012, 12:37 AM   #25
revilo3D
CG Addict
 
revilo3D's Avatar
portfolio
Oliver Hilbert
3D Lecturer
Media Design School
New Zealand
 
Join Date: Mar 2005
Posts: 623
Quote:
Originally Posted by SandyBrown
One interesting observation I made during this test is that - WHEN I applied an HDR images to my dome light and rendered it, without adding "bitmap input gamma," I got a renderTime of 4min on a 800 by 600 rez
by adding "bitmap input gamma," and setting it to 1.0 I got the same result, no change whatsoever in quality or noise but the renderTime went down by 1 min, I got a 3min...


Interesting observation there Will keep an eye on that. Do note - HDR is a linear file format and will not be required to be corrected. I think by applying the a correction attribute but not changing it - it's coverting the HDR file into vrays internal format and may be more efficent. Have a look at your memory usage and see if you spot any changes there. This may also be a +1 for apply attributes rather than linear workflow checkbox option.
__________________
"Yeap, im certain - I spent 50hrs making sure it was a cow"

www.revilo3d.com
 
Old 10-03-2012, 04:37 AM   #26
earlyworm
car unenthusiast
 
earlyworm's Avatar
Will Earl
craftsperson
Grizzly Country, Canada
 
Join Date: Mar 2005
Posts: 1,685
Quote:
Originally Posted by revilo3D
Mmm perhaps but remember a dark value of 0.2 turns to 0.5 with a sRGB LUT. Now you have issues in your midtones.

It all really depends really too - linear can also have contrasting affects - and may result in oversampling when not needed. Sampling is intended to be adaptive in relation to our perception to achieve quality/speed where needed. The image should really be sampled in relation to as how we will see it


Never had problems with my mid-tones before.

Interesting I would have assumed the opposite, that normalizing the values that your sampling (with a gamma of 2.2) would result in a higher number of and a more uniform distribution of samples.

As I say, I'll try it out sometime.
 
Old 10-03-2012, 07:58 AM   #27
govindk
Visual Story Teller
 
govindk's Avatar
CGSociety Member
portfolio
Govind Krishna
Texture Painter | Look Development Artist
Bangalore, India
 
Join Date: Nov 2010
Posts: 319
Send a message via Yahoo to govindk
revilo3D After reading your post, i did test it again and this time observed my RAM...

I think you must have already guessed it , however When you do not use BIG(bitmap input gamma), the RAM usage is less compared to when you add BIG with a value of 1.0 to the HDR image.
It climbed up a little, so yes there is a difference.
And I think like you said, V-Ray might be optimizing it.

EarlyWorm, you posted a picture of a cube, I thought that was little washed out though, I did not see your shader, so I can be wrong !!
 
Old 10-04-2012, 07:32 AM   #28
earlyworm
car unenthusiast
 
earlyworm's Avatar
Will Earl
craftsperson
Grizzly Country, Canada
 
Join Date: Mar 2005
Posts: 1,685
Quote:
Originally Posted by govindk
EarlyWorm, you posted a picture of a cube, I thought that was little washed out though, I did not see your shader, so I can be wrong !!


You thought an unshaded grey cube was a little washed out!? Sorry I couldn't have come up with a prettier example.

The point was just showing that they're matched visually and it's a very simple test from which you'd easily spot if something was wrong between the two.

Good find with the RAM usage.
 
Old 10-04-2012, 07:39 AM   #29
govindk
Visual Story Teller
 
govindk's Avatar
CGSociety Member
portfolio
Govind Krishna
Texture Painter | Look Development Artist
Bangalore, India
 
Join Date: Nov 2010
Posts: 319
Send a message via Yahoo to govindk
Even I was testing things with a matte grey Vray shader and getting washed out results.
I thought you were doing the same and I thought it did look a little brighter
 
Old 10-12-2012, 03:50 PM   #30
FranciscoSCN
Veteran
 
FranciscoSCN's Avatar
portfolio
Francisco Nogueira
Porto, PT
 
Join Date: Mar 2006
Posts: 75
Quote:
Originally Posted by govindk
I feel this workflow suits me better, kinda inclined to what revilo3D & majority of others suggested:-
(1) Setting Gamma to 2.2, with do not affect color turned on
(2) Adding a texture and selecting the bit map input gamma under Vray extra node for 8-bit files & adding .454 gamma node to color swatches
(3)sRGB button for V-Ray Frame Buffer to view my images properly
(4)Rendering in 16 bit or 32 bit exr or similar linear supported format

However it does lack a lot of contrast which I am still trying to figure out, why?
In some situations I am getting good results with sRGB button turned off. So I think I will un-gamma those images with 0.454 or similar value inside Nuke to get it back. It better to do that, rather than working on non-linear and getting wrong maths.

**And I am also wondering if it is really necessary to add 0.454 gamma node to CG Light (vray light) swatches, like kanooshka suggested. If that's what he meant, I might have understood it wrong.


I'm also trying to find my preferred LWF method and as such, I'm trying to understand other methods. I don't really understand the one you described here. Newbie analysis, but here goes:

It seems to me that you're only using V-Ray Colour Mapping to sample the image with a 2.2 gamma setting (as others have pointed out in this thread). Because of this, you're linearizing your input textures files with the V-Ray extra attributes and the swatches with a simple Maya gamma node (but not the light colour swatch).

Is my analysis wrong? Wouldn't it be more simple to set Colour Mapping gamma to 1.0, affecting colours AND affecting colour swatches? That way you wouldn't need to manually apply a gamma node to every single colour swatch in Maya, leaving only colour textures to be gamma corrected, for a correct linear output render. What is your motivation to have Colour Mapping, well, affect the colours?

Also, by not setting any Colour Mapping, will V-Ray output a 1.0 gamma file? (it sure seems so, since you're not affecting colours but are maintaining a linear output)
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:19 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.