POV-Ray : Newsgroups : povray.newusers : Using Fog for depthcue - broken when behind transparent objects Server Time
13 May 2024 16:54:14 EDT (-0400)
  Using Fog for depthcue - broken when behind transparent objects (Message 10 to 19 of 19)  
<<< Previous 9 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: Using Fog for depthcue - broken when behind transparent objects
Date: 26 Feb 2014 00:00:01
Message: <web.530d740776632899c2d977c20@news.povray.org>
> "Lothar" <les### [at] helixnihgov> wrote:

> >
> >    adding the keyword hollow definitely changes something. It seems to
> > over-compensate now. The white fog in the back seems to be greatly enhanced!
>
> Kenneth wrote:
> Comment specular and roughness out and the 'extra' fog effect disappears! Or
> move the lights to some odd angles relative to the triangle.
>

I thought I would explain that better, in case the solution didn't seem obvious:
Your triangle is just a flat shape. Since it isn't a 'smooth' triangle, the
'normals' across the surface all point in one direction-- straight out at
90-degrees to the surface. The SPECULAR/ROUGHNESS addition just bends light rays
that reach the surface--based on the normals-- to give it a shiny appearance.
But your lights (one of them anyway) are aligned really close to that 'normal'
axis-- and so is the camera. The end result is that the entire flat triangle is
'shining' almost uniformly due to the specular addition; that shininess adds to
the brightness of the fog seen *through* the triangle.


Post a reply to this message

From: Lothar
Subject: Re: Using Fog for depthcue - broken when behind transparent objects
Date: 26 Feb 2014 10:40:00
Message: <web.530e09f676632899abef93160@news.povray.org>
Hi,

  looks like it is solved in my "real-life" example. The example with the boxes
and one non-smooth triangle was made up and showed the signs of over
compensation for the reasons you have mentioned. My actual case contains
smooth_triangles with proper normal definition and adding "hollow" solved this
problem right away and the objects behind transparent ones have the proper
amount of depthcuing by fog on it.
Thanks to all, this was rather illuminating and slightly embarrassing for me. I
should have figured it out myself - it only goes to show that I still don't know
the inner workings of povray that well.

Cheers,

   Lothar


"Kenneth" <kdw### [at] gmailcom> wrote:
> > "Lothar" <les### [at] helixnihgov> wrote:
>
> > >
> > >    adding the keyword hollow definitely changes something. It seems to
> > > over-compensate now. The white fog in the back seems to be greatly enhanced!
> >
> > Kenneth wrote:
> > Comment specular and roughness out and the 'extra' fog effect disappears! Or
> > move the lights to some odd angles relative to the triangle.
> >
>
> I thought I would explain that better, in case the solution didn't seem obvious:
> Your triangle is just a flat shape. Since it isn't a 'smooth' triangle, the
> 'normals' across the surface all point in one direction-- straight out at
> 90-degrees to the surface. The SPECULAR/ROUGHNESS addition just bends light rays
> that reach the surface--based on the normals-- to give it a shiny appearance.
> But your lights (one of them anyway) are aligned really close to that 'normal'
> axis-- and so is the camera. The end result is that the entire flat triangle is
> 'shining' almost uniformly due to the specular addition; that shininess adds to
> the brightness of the fog seen *through* the triangle.


Post a reply to this message

From: Alain
Subject: Re: Using Fog for depthcue - broken when behind transparent objects
Date: 26 Feb 2014 14:11:51
Message: <530e3c77$1@news.povray.org>

> Hi,
>
>    looks like it is solved in my "real-life" example. The example with the boxes
> and one non-smooth triangle was made up and showed the signs of over
> compensation for the reasons you have mentioned. My actual case contains
> smooth_triangles with proper normal definition and adding "hollow" solved this
> problem right away and the objects behind transparent ones have the proper
> amount of depthcuing by fog on it.
> Thanks to all, this was rather illuminating and slightly embarrassing for me. I
> should have figured it out myself - it only goes to show that I still don't know
> the inner workings of povray that well.
>
> Cheers,
>
>     Lothar
>
>

It's the "newusers" forum... It's the place to ask questions that /may/ 
appear sily or dumb, or are obvious oversight to more experimented users.


Post a reply to this message

From: Kenneth
Subject: Re: Using Fog for depthcue - broken when behind transparent objects
Date: 26 Feb 2014 14:15:00
Message: <web.530e3c1176632899c2d977c20@news.povray.org>
"Lothar" <les### [at] helixnihgov> wrote:
>
> Thanks to all, this was rather illuminating and slightly embarrassing for
> me. I should have figured it out myself...

I feel the same way :-(  I was blaming the fog/transparency feature for the
problem, when it was actually working OK...at least in this context :-P


Post a reply to this message

From: Cousin Ricky
Subject: Re: Using Fog for depthcue - broken when behind transparent objects
Date: 6 Mar 2014 07:50:01
Message: <web.53186e9176632899192ae5f10@news.povray.org>
Alain <kua### [at] videotronca> wrote:
> If you use version 3.7, you should use 1, 2.2 OR srgb for your
> assumed_gamma. Other values will be altered to 1 or 2.2.

Where did you get that idea?

Try this:
______________________________________________________________

// +kff4 +ki1.0 +kf2.2
#version 3.7;

global_settings { assumed_gamma clock }

camera { location <0, 3, -3> look_at y }

light_source { <-1, 1, -1> * 1000, rgb 1 parallel point_at 0 }

plane
{ y, 0
  pigment { checker rgb 0.25 rgb 0.75 }
}

sphere
{ y, 1
  pigment { rgb <0.8, 0.5, 0.2> }
}
______________________________________________________________

All 4 images will be different.


Post a reply to this message

From: Alain
Subject: Re: Using Fog for depthcue - broken when behind transparent objects
Date: 6 Mar 2014 16:27:04
Message: <5318e828@news.povray.org>

> Alain <kua### [at] videotronca> wrote:
>> If you use version 3.7, you should use 1, 2.2 OR srgb for your
>> assumed_gamma. Other values will be altered to 1 or 2.2.
>
> Where did you get that idea?
>

 From the warnings you get when using values other than 1 or 2.2 for the 
assumed_gamma.


Post a reply to this message

From: Cousin Ricky
Subject: Re: Using Fog for depthcue - broken when behind transparent objects
Date: 6 Mar 2014 21:25:01
Message: <web.53192dc876632899192ae5f10@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> > Alain <kua### [at] videotronca> wrote:
> >> If you use version 3.7, you should use 1, 2.2 OR srgb for your
> >> assumed_gamma. Other values will be altered to 1 or 2.2.
> >
> > Where did you get that idea?
> >
>
>  From the warnings you get when using values other than 1 or 2.2 for the
> assumed_gamma.

I get no such warnings, and my outputs show that no such substitution takes
place.

I'm using POV-Ray 3.7.0, compiled with g++ 4.8-2.1.2 on openSUSE 13.1 GNU/Linux.


Post a reply to this message

From: clipka
Subject: Re: Using Fog for depthcue - broken when behind transparent objects
Date: 27 May 2014 05:02:05
Message: <5384548d@news.povray.org>
Am 26.02.2014 02:01, schrieb Alain:

>> //Start
>> global_settings {
>>    ambient_light rgb  <0.40000, 0.40000, 0.40000>
>>    assumed_gamma      1.800
>
> If you use version 3.7, you should use 1, 2.2 OR srgb for your
> assumed_gamma. Other values will be altered to 1 or 2.2.

You're mistaken there.

(You would have been right for many of the 3.7 betas, but when the 3.7 
gamma handling took shape it was ultimately decided to make 
assumed_gamma fully functional again.)

That said, for realistic results it is highly recommended to use 
assumed_gamma 1.0.


Post a reply to this message

From: Alain
Subject: Re: Using Fog for depthcue - broken when behind transparent objects
Date: 27 May 2014 19:40:54
Message: <53852286@news.povray.org>

> Am 26.02.2014 02:01, schrieb Alain:
>
>>> //Start
>>> global_settings {
>>>    ambient_light rgb  <0.40000, 0.40000, 0.40000>
>>>    assumed_gamma      1.800
>>
>> If you use version 3.7, you should use 1, 2.2 OR srgb for your
>> assumed_gamma. Other values will be altered to 1 or 2.2.
>
> You're mistaken there.
>
> (You would have been right for many of the 3.7 betas, but when the 3.7
> gamma handling took shape it was ultimately decided to make
> assumed_gamma fully functional again.)
>
> That said, for realistic results it is highly recommended to use
> assumed_gamma 1.0.
>

OK. I was indeed left with the idea from the messages from the betas. As 
I normaly only use assumed_gamma 1, the support for values other than 1, 
2.2 or srgb escaped me .


Post a reply to this message

From: Cousin Ricky
Subject: Re: Using Fog for depthcue - broken when behind transparent objects
Date: 9 Jun 2014 17:00:00
Message: <web.53961f9876632899192ae5f10@news.povray.org>
Alain <kua### [at] videotronca> wrote:
> OK. I was indeed left with the idea from the messages from the betas. As
> I normaly only use assumed_gamma 1, the support for values other than 1,
> 2.2 or srgb escaped me .

Ah!  This would also explain why I never saw that warning.


Post a reply to this message

<<< Previous 9 Messages Goto Initial 10 Messages

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