POV-Ray : Newsgroups : povray.general : Highlight vs. reflected lamp dilemma Server Time
19 Oct 2021 05:09:36 EDT (-0400)
  Highlight vs. reflected lamp dilemma (Message 1 to 4 of 4)  
From: Cousin Ricky
Subject: Highlight vs. reflected lamp dilemma
Date: 1 May 2021 11:43:39
Message: <608d772b$1@news.povray.org>
What are highlights?  They are specular reflections, often blurred, of
light sources.  So it dawned on me circa 2013 August 25 that if my
objects have both reflection and specular/phong in their finish, they
shouldn't also be reflecting the Sun or light bulb.  No prob, just set
no_reflection on the looks_like for the time being.  For my desk lamp
project, my idea has been to have a flag for whether or not the light
bulb should reflect, thereby allowing the user to choose between
highlights and a reflected bulb.

Enter radiosity artifacts from lamp fixtures.  (See "Hooded lamp
occlusion" in p.b.i.)  The inner surface of a lamp hood is so bright
that radiosity leaves bright spots all over the scene unless an insanely
high radiosity count is used.  Setting no_radiosity on the hood interior
eliminates the artifacts, but now the light from that radiosity must be
replaced.  A 180 degree cosine falloff spotlight does the trick.

But now, this means that objects with both reflection and highlights
will now reflect double the light from the hood interior!  I cannot set
no_reflection on the hood interior, because then the texture of the hood
exterior would show through in the reflection.  Besides, the hood is
larger than the bulb, and the more extended an object, the bigger the
morphological discrepancy between its reflection and the equivalent
point highlight.  What was easy for the light bulb doesn't work for the
fixture.

So how should this dilemma be resolved?  Have the user refrain from
setting specular or phong in finishes that have a reflection?  Just live
with the double light, since it would most often exceed the image
format's dynamic range anyway?  The former solution would require high
quality (i.e, slow) blurred reflection for realistic highlights, and
latter solution would be unsuitable for HDR and EXR images.  Is there a
third way that doesn't involve the user in these complications?

Or should I just go ahead with the reflection flag, and warn the user
that the flag won't affect the hood interior?


Post a reply to this message

From: Alain Martel
Subject: Re: Highlight vs. reflected lamp dilemma
Date: 2 May 2021 13:21:45
Message: <608edfa9$1@news.povray.org>
Le 2021-05-01 à 11:43, Cousin Ricky a écrit :
> What are highlights?  They are specular reflections, often blurred, of
> light sources.  So it dawned on me circa 2013 August 25 that if my
> objects have both reflection and specular/phong in their finish, they
> shouldn't also be reflecting the Sun or light bulb.  No prob, just set
> no_reflection on the looks_like for the time being.  For my desk lamp
> project, my idea has been to have a flag for whether or not the light
> bulb should reflect, thereby allowing the user to choose between
> highlights and a reflected bulb.
> 
> Enter radiosity artifacts from lamp fixtures.  (See "Hooded lamp
> occlusion" in p.b.i.)  The inner surface of a lamp hood is so bright
> that radiosity leaves bright spots all over the scene unless an insanely
> high radiosity count is used.  Setting no_radiosity on the hood interior
> eliminates the artifacts, but now the light from that radiosity must be
> replaced.  A 180 degree cosine falloff spotlight does the trick.
> 
> But now, this means that objects with both reflection and highlights
> will now reflect double the light from the hood interior!  I cannot set
> no_reflection on the hood interior, because then the texture of the hood
> exterior would show through in the reflection.  Besides, the hood is
> larger than the bulb, and the more extended an object, the bigger the
> morphological discrepancy between its reflection and the equivalent
> point highlight.  What was easy for the light bulb doesn't work for the
> fixture.
> 
> So how should this dilemma be resolved?  Have the user refrain from
> setting specular or phong in finishes that have a reflection?  Just live
> with the double light, since it would most often exceed the image
> format's dynamic range anyway?  The former solution would require high
> quality (i.e, slow) blurred reflection for realistic highlights, and
> latter solution would be unsuitable for HDR and EXR images.  Is there a
> third way that doesn't involve the user in these complications?
> 
> Or should I just go ahead with the reflection flag, and warn the user
> that the flag won't affect the hood interior?
> 

For the radiosity case, you should use the latest version and benefit 
from the importance setting.
Do something similar to this :

#declare MXCount = 60000;
#declare AVCount = 100;

#default{radiosity{importance AVCount/MXCount}}

global_settings{
	radiosity{<some radiosity stuff>
		count MXCount, MXCount*1.5
		}
	}

For the object acting as your light sources, add :
radiosity{importance 1}

That way, the sampling count will average about 100 for most of the 
scene, but, those bright object will receive a lot of needed attention.

Also, using radiosity, you can add «brilliance on».
That way, objects with high brilliance will become reflective. That 
reflection will be blurred in a way similar to phong highlights.

When using blurred reflection, it's advantageous to have two copy of 
those objects :
Copy 1 have high quality, averaged, blurring. That copy need the 
no_reflection attribute. Also add no_radiosity to that one. Only one of 
the copies need to be taken into account when evaluating radiosity.

Copy 2 have rough, micro-normals blurring and have the no_image attribute.
Also adding no_shadow to one of the copy can help when evaluating the 
shadows.

That solves the issue of self reflection causing an exponential 
explosion in the sampling.


Post a reply to this message

From: Cousin Ricky
Subject: Re: Highlight vs. reflected lamp dilemma
Date: 2 May 2021 19:55:43
Message: <608f3bff$1@news.povray.org>
On 2021-05-02 1:21 PM (-4), Alain Martel wrote:
> 
> For the object acting as your light sources, add :
> radiosity{importance 1}
> 
> That way, the sampling count will average about 100 for most of the
> scene, but, those bright object will receive a lot of needed attention.

I tried radiosity importance, and the result was disastrous.  Maybe I
used it wrong?


Post a reply to this message

From: Alain Martel
Subject: Re: Highlight vs. reflected lamp dilemma
Date: 3 May 2021 10:35:17
Message: <60900a25$1@news.povray.org>
Le 2021-05-02 à 19:55, Cousin Ricky a écrit :
> On 2021-05-02 1:21 PM (-4), Alain Martel wrote:
>>
>> For the object acting as your light sources, add :
>> radiosity{importance 1}
>>
>> That way, the sampling count will average about 100 for most of the
>> scene, but, those bright object will receive a lot of needed attention.
> 
> I tried radiosity importance, and the result was disastrous.  Maybe I
> used it wrong?
> 

Did you use the default directive ? It is crucial to use it to set the 
average importance so that most of the scene gets a reasonable sampling 
density. Also, the base count value seems to need to be larger than 10000.
I typically use count values from 60000 to 500000. Don't hesitate to 
increase that if needed. Just decrease the default importance accordingly.
Next, I tend to use pretrace_end of about 0.005 to 0.00125.
Use adaptive nearest_count, like 20, 3. This tend to give good results.
I also like to set nearest_count just under my pretrace_end value. So, 
something like 0.0045 to 0.0012.

NEVER forget to set radiosity{importance 1} for very bright objects. 
Also, set it to about 0.5 to 0.75 for bright objects that are relatively 
small.
In some cases, you may also need to increase it for luminous walls. 
Here, a value around 0.1 should be enough.

The following tend to give me good results :
#declare MXCount = 100000;// Set the maximum count size
#declare AVCount = 111; // Set the average radiosity sampling density

#default radiosity{importance AVCount/MXCount}

global_settings{
	radiosity{
		pretrace_end 0.0025
		count MXCount, MXCount*sqrt(2)
		nearest_count 20 3 // Can even use 20 2
		minimum_reuse 0.0022
// it seems that this NEED to be smaller than pretrace_end
		error_bound 0.3
// May need a smaller value in some cases
// Smaller value = need larger MXCount, but usually same AVCount
		low_error_factor 0.3
		adc_bailout 0.0001
		}
	}


Post a reply to this message

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