POV-Ray : Newsgroups : povray.binaries.images : tone mapping in povray Server Time
30 Jul 2024 10:12:38 EDT (-0400)
  tone mapping in povray (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Florian Siegmund
Subject: tone mapping in povray
Date: 15 Apr 2012 08:40:02
Message: <web.4f8abfb6cc9ac5f1a4c3084d0@news.povray.org>
Something is bugging me. Namely the question why there's spent so much time in
improving radiosity, sslt, photons etc. while an essential thing is still
missing in my eyes. You can use the best radiosity and area light settings and
end up with a render that is still looking somewhat artificial.
Correct me if I am wrong, but isn't it a fact that povray has always suffered
from a linear lighting model?
My eyes are longing for a little bit of non-linearity :)
And I don't think it would be that hard to implement into the main program. As
far as I know Megapov has such a feature, called 'tone mapping'.
I found out a way to simulate this in the official version, it's a bit dirty but
it works for me.

The trick is to reflect the whole scene in two small spheres centered at the
camera location and make use of the 'exponent' keyword to control the light
intensities. (I call it a dirty solution because I don't think that it would
work well with focal blur, although I haven't tried it yet)

I don't know if this is pysically correct in any way, but the resulting renders
look more authentic and believable to me than general pov renders.
And as a positive side-effect, the images look more colorful and less
'washed-out' as you can convince yourselves by looking at the attached images.

Here's my... dirty... code :)

sphere {
    CAMERA_LOCATION, 0.01 // small radius
    pigment {color rgb 0}
    finish {
        reflection {
            1.35 // overall image brightness
            exponent 0.87 // non-linearity        }
    }
    no_reflection
    no_shadow
}

sphere {
    CAMERA_LOCATION, 0.001 // smaller radius
    pigment {color rgb 0}
    finish {
        reflection {1}
    }
    no_image
    no_shadow
}

Regards, Florian


Post a reply to this message


Attachments:
Download 'tone_mapping.jpg' (585 KB)

Preview of image 'tone_mapping.jpg'
tone_mapping.jpg


 

From: Florian Siegmund
Subject: Re: tone mapping in povray
Date: 15 Apr 2012 08:55:01
Message: <web.4f8ac4e26dc6cfa9a4c3084d0@news.povray.org>
"Florian Siegmund" <flo### [at] gmxat> wrote:
> sphere {
>     CAMERA_LOCATION, 0.01 // small radius
>     pigment {color rgb 0}
>     finish {
>         reflection {
>             1.35 // overall image brightness
>             exponent 0.87 // non-linearity        }
>     }
>     no_reflection
>     no_shadow
> }

Sorry, there's a little typo in my code...
The closing bracket in the first finish block has jumped up one line somehow
and has become a comment.
Here's the corrected version:

     finish {
         reflection {
             1.35 // overall image brightness
             exponent 0.87 // non-linearity
         }
     }

Regards, Florian


Post a reply to this message

From: Alain
Subject: Re: tone mapping in povray
Date: 15 Apr 2012 10:03:25
Message: <4f8ad52d@news.povray.org>

> Something is bugging me. Namely the question why there's spent so much time in
> improving radiosity, sslt, photons etc. while an essential thing is still
> missing in my eyes. You can use the best radiosity and area light settings and
> end up with a render that is still looking somewhat artificial.
> Correct me if I am wrong, but isn't it a fact that povray has always suffered
> from a linear lighting model?
> My eyes are longing for a little bit of non-linearity :)
> And I don't think it would be that hard to implement into the main program. As
> far as I know Megapov has such a feature, called 'tone mapping'.
> I found out a way to simulate this in the official version, it's a bit dirty but
> it works for me.
>
> The trick is to reflect the whole scene in two small spheres centered at the
> camera location and make use of the 'exponent' keyword to control the light
> intensities. (I call it a dirty solution because I don't think that it would
> work well with focal blur, although I haven't tried it yet)
>
> I don't know if this is pysically correct in any way, but the resulting renders
> look more authentic and believable to me than general pov renders.
> And as a positive side-effect, the images look more colorful and less
> 'washed-out' as you can convince yourselves by looking at the attached images.
>

To have physicaly correct, you need to use linear colour space. You can 
always alter the end image if you want.
Some use an assumed_gamma of 2.2 or srgb.
You can also set the file gamma to some arbitrary value, like 2 or 3 if 
you want.

Your cornel cox tone altered image have to much saturation compared to 
the original cornel box. In fact, the original render is also slightly 
oversaturated...

In your second image, the only notable difference is in the sandy ground 
in the background and a slight yellowish cast in the lower part of the 
sky. If you tint the fog slightly yellow, you'll get roughly the same 
effect.


Post a reply to this message

From: Thomas de Groot
Subject: Re: tone mapping in povray
Date: 15 Apr 2012 10:30:30
Message: <4f8adb86@news.povray.org>
On 15-4-2012 14:35, Florian Siegmund wrote:
> Something is bugging me. Namely the question why there's spent so much time in
> improving radiosity, sslt, photons etc. while an essential thing is still
> missing in my eyes. You can use the best radiosity and area light settings and
> end up with a render that is still looking somewhat artificial.
> Correct me if I am wrong, but isn't it a fact that povray has always suffered
> from a linear lighting model?
> My eyes are longing for a little bit of non-linearity :)
> And I don't think it would be that hard to implement into the main program. As
> far as I know Megapov has such a feature, called 'tone mapping'.
> I found out a way to simulate this in the official version, it's a bit dirty but
> it works for me.

Interesting. When I used MegaPOV I standard used the tone mapping 
utility. Your little trick works well and allows to play with the 
overall tone of the rendered scene. Makes colours deeper. Curious to 
read what the experts have to say about this ;-)

As I was playing around with some LOTW landscapes, I tried it out 
immediately. Upper image is not tone mapped, lower image with exponent 
0.7. Rendered in version 3.7 RC5; LOTW scene file and includes adapted 
to 3.7 use.

Thomas


Post a reply to this message


Attachments:
Download 'lotw 34_18_var_tonemapping.png' (1221 KB)

Preview of image 'lotw 34_18_var_tonemapping.png'
lotw 34_18_var_tonemapping.png


 

From: Le Forgeron
Subject: Re: tone mapping in povray
Date: 15 Apr 2012 10:34:19
Message: <4f8adc6b@news.povray.org>
Le 15/04/2012 14:35, Florian Siegmund nous fit lire :
> Correct me if I am wrong, but isn't it a fact that povray has always suffered
> from a linear lighting model?

I think povray has always suffered from a lack of clear explanation &
tutorial on finish settings.

pigment/color are pretty easy to understand: a red, a green, a blue
component. And a touch of mixing with transmit & filter. Simple, easy,
and enough.

On the other side, the finish is not exposed with a global vision.


Post a reply to this message


Attachments:
Download 'apparence.png' (128 KB)

Preview of image 'apparence.png'
apparence.png


 

From: Norbert Kern
Subject: Re: tone mapping in povray
Date: 15 Apr 2012 12:00:01
Message: <web.4f8aeedf6dc6cfa9a2ad19490@news.povray.org>
"Florian Siegmund" <flo### [at] gmxat> wrote:

> My eyes are longing for a little bit of non-linearity :)

I think, it's the same impression, which lended me to use the "incorrect" value
2.2 for assumed_gamma - at least for outdoor scenes.

In some art books or composition guides you can read that you should not use
mid tones - either use dark or bright tones. For the same reasons you should use
either deep or really pale colors. Never use bright or dark colors together with
midtones for the main objects.
Of course this is only true if you aren't a genius...

So I decided to go for visually pleasent images, which are easier to generate
with higher gamma values.


Norbert Kern


Post a reply to this message

From: Florian Siegmund
Subject: Re: tone mapping in povray
Date: 15 Apr 2012 15:15:01
Message: <web.4f8b1ca36dc6cfa97f3840f50@news.povray.org>
"Norbert Kern" <nor### [at] t-onlinede> wrote:
> I think, it's the same impression, which lended me to use the "incorrect" value
> 2.2 for assumed_gamma - at least for outdoor scenes.
>
> In some art books or composition guides you can read that you should not use
> mid tones - either use dark or bright tones. For the same reasons you should use
> either deep or really pale colors. Never use bright or dark colors together with
> midtones for the main objects.
> Of course this is only true if you aren't a genius...
>
> So I decided to go for visually pleasent images, which are easier to generate
> with higher gamma values.
>
>
> Norbert Kern

Here's another example scene where tone mapping, although using it the way I do
may be 'incorrect', for me makes sense and somehow looks better than without.
(exponent = 1 ... no tone mapping)

Just imagine a very dark room with a fire place, glowing coals, a lava lamp, a
candle or something similar. While looking directly into one of these 'light
sources', your eyes adapt to the lighting conditions and everything else around
gets darker. Isn't it? - I am not a genius, but at least I try to be one ;-)

Regards, Florian


Post a reply to this message


Attachments:
Download 'glowing.jpg' (818 KB)

Preview of image 'glowing.jpg'
glowing.jpg


 

From: Thomas de Groot
Subject: Re: tone mapping in povray
Date: 16 Apr 2012 02:41:17
Message: <4f8bbf0d$1@news.povray.org>
On 15-4-2012 17:55, Norbert Kern wrote:
> "Florian Siegmund"<flo### [at] gmxat>  wrote:
>
>> My eyes are longing for a little bit of non-linearity :)
>
> I think, it's the same impression, which lended me to use the "incorrect" value
> 2.2 for assumed_gamma - at least for outdoor scenes.
>

At the end of the day, it is up to the individual user to stretch up the 
boundaries and produce the impression he/she likes best, independently 
from linearity. So, playing with gamma or with Florian's tone mapping 
give us additional freedom. This way it is already built in into POV-Ray.

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: tone mapping in povray
Date: 16 Apr 2012 02:45:45
Message: <4f8bc019$1@news.povray.org>
On 15-4-2012 16:34, Le_Forgeron wrote:
>
> On the other side, the finish is not exposed with a global vision.

LOL, you are perfectly right!

Thomas


Post a reply to this message

From: clipka
Subject: Re: tone mapping in povray
Date: 16 Apr 2012 08:10:12
Message: <4f8c0c24@news.povray.org>
Am 15.04.2012 17:55, schrieb Norbert Kern:
> "Florian Siegmund"<flo### [at] gmxat>  wrote:
>
>> My eyes are longing for a little bit of non-linearity :)
>
> I think, it's the same impression, which lended me to use the "incorrect" value
> 2.2 for assumed_gamma - at least for outdoor scenes.
>
> In some art books or composition guides you can read that you should not use
> mid tones - either use dark or bright tones. For the same reasons you should use
> either deep or really pale colors. Never use bright or dark colors together with
> midtones for the main objects.
> Of course this is only true if you aren't a genius...
>
> So I decided to go for visually pleasent images, which are easier to generate
> with higher gamma values.

One problem with misusing gamma correction for artistic purposes is that 
it inevitably shifts linearly (i.e. physically properly) computed color 
hues towards the red, green or blue extreme, instead of increasing 
saturation while preserving hue.

A better approach is to render the image with high bit depth, and use 
post-processing to achieve brightness, contrast and hue adjustments in a 
much more controlled manner.

Or, maybe even better yet, have built-in post-processing features to 
achieve this; there is indeed the intention to provide some 
functionality to that effect. Don't hold your breath though, as it won't 
happen in 3.7.0.


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.