 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi.
This is probably a FAQ, but I can not manage to find its answer.
I am looking for light settings for a sunny outdoor scene: deep blue sky,
sharp shadows, but the parts in the shadow must still be visible.
My base scene has this:
light_source { <100000, 100000, -100000> rgb 2 }
sky_sphere {
pigment {
gradient y
color_map {
[ 0.0 rgb <0.9, 0.9, 1> ]
[ 0.5 rgb <0.3, 0.3, 1> ]
}
}
}
The best I could do was to set the global_settings ambient_light to 3 and
default radiosity, but I am not entirely satisfied, because the blue tint of
the sky is distinctly visible.
Can someone give me some advice, please?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas George <nicolas$george@salle-s.org> wrote:
> The best I could do was to set the global_settings ambient_light to 3 and
> default radiosity, but I am not entirely satisfied, because the blue tint of
> the sky is distinctly visible.
Well, if there isn't anything else to reflect than the blue sky, then of
course objects will get a blue tint. This is realistic. For example,
consider this image (rendered with povray):
http://warp.povusers.org/sponza.jpg
Observe how the upper parts of the walls have a blue tint because of the
sky. I wouldn't call it unrealistic.
If you want some other tint, you have to put some other objects around
the scene.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote in message <471c74f2@news.povray.org>:
> Well, if there isn't anything else to reflect than the blue sky, then of
> course objects will get a blue tint.
I never noticed a blue tint in the sand of a beach, for example. At least,
not as much as I see on my scene.
Maybe the brain is compensating, but in that case, I would like advice on
how to emulate this compensation.
I wrote a minimal example to show the amount of difference I get. It is at
the end.
> This is realistic. For example,
> consider this image (rendered with povray):
>
> http://warp.povusers.org/sponza.jpg
This is really impressing. Before I noticed "rendered with povray", I
thought it was a photo illustrating the blue tint in nature-rendered images.
Is the source code available somewhere. I would really like to study it and
learn from it.
> Observe how the upper parts of the walls have a blue tint because of the
> sky. I wouldn't call it unrealistic.
That is really realistic, but the blue tint you get is very faint, nothing
compared to what I am trying to get rid of.
Minimal example:
plane {
y, 0
pigment { rgb <0.804, 0.569, 0.494> }
normal { bumps 0.5 }
}
camera {
location <220, 50, 0> look_at <0, 0, 0>
}
sky_sphere {
pigment {
gradient y
color_map {
[ 0.0 rgb <0.9, 0.9, 1> ]
[ 0.5 rgb <0.3, 0.3, 1> ]
}
}
}
light_source { <100000, 100000, -100000> rgb 3 }
global_settings {
#if(1)
ambient_light 3.4
#else
radiosity { }
#end
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
As Warp pointed out, a sky-blue tinge to shadows is perfectly normal, and
exactly what you see in real life on a sunny day with a clear sky.
However, you can adjust gray_threshold in the radiosity settings. This
specifies how much colour to include in the radiosity calculations (1 = no
colours, 0 = full colour radiosity). Obviously, if you get rid of the sky
colour you will also lose colours emitted from nearby objects, so you can't
have it both ways I'm afraid!
One more point - it's best to set all objects' ambient to 0, otherwise they
actively emit light in radiosity calculations. If you have the global
ambient=3 then your scene must be really, really bright :)
Bill
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bill Pragnell" wrote in message
<web.471c85bad8eb8586731f01d10@news.povray.org>:
> However, you can adjust gray_threshold in the radiosity settings. This
> specifies how much colour to include in the radiosity calculations (1 = no
> colours, 0 = full colour radiosity).
Thanks, that does exactly what I was hoping.
> Obviously, if you get rid of the sky
> colour you will also lose colours emitted from nearby objects, so you can't
> have it both ways I'm afraid!
That is ok for me in that particular scene.
As a more theoretical question, would it be possible, with the radiosity
algorithm, to have different gray_threshold for each object?
> One more point - it's best to set all objects' ambient to 0, otherwise they
> actively emit light in radiosity calculations.
Is it enough to set the global_settings ambient_light to 0, or is it
necessary to add a finish { ambient 0 } to each object in the scene.
> If you have the global
> ambient=3 then your scene must be really, really bright :)
Indeed. I use radiosity OR global ambient, not both.
Thanks for your help.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas George <nicolas$george@salle-s.org> wrote:
> As a more theoretical question, would it be possible, with the radiosity
> algorithm, to have different gray_threshold for each object?
I'm not sure. It's certainly not possible with the current implementation; I
don't know how easy (or worthwhile) a patch it would be.
> Is it enough to set the global_settings ambient_light to 0, or is it
> necessary to add a finish { ambient 0 } to each object in the scene.
From the documentation:
"The actual ambient used is: Ambient = Finish_Ambient * Global_Ambient."
So if you set global ambient = 0 then it will work fine. If you want nonzero
ambient light then it's better to use the #default finish { } and only
specify the ambient values you want to override.
Have fun. I like bright daylight scenes with radiosity, you can get some
really realistic results!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Well, if there isn't anything else to reflect than the blue sky, then
>> of
>> course objects will get a blue tint.
>
> I never noticed a blue tint in the sand of a beach, for example. At least,
> not as much as I see on my scene.
The problem is, when you are at a beach, everything else around you has the
same blue tint so you don't notice it.
If you could suddenly switch the sky from blue to grey overcast then you'd
surely notice. Beware that cameras automatically adjust the colour tint
too, so comparing photos is no use unless you know they were taken with the
same colour-balance settings.
> Maybe the brain is compensating, but in that case, I would like advice on
> how to emulate this compensation.
Yes, the brain compensates for the illumination colour up to a certain
extent. What it thinks should be a certain colour (eg white) it will see as
a certain colour and use the difference to determine the global lighting
colour and then the colour of unknown objects. There are many optical
illusions that exploit the way the brain works in this situation.
> I wrote a minimal example to show the amount of difference I get. It is at
> the end.
How are you choosing the RGB values to use for the sky, sunlight and sand?
Those are probably not physically accurate... Unless you have some
sophisticated optical measurement equipment, I suggest you just tweak with
these values until your scene looks the way you want it. Also check your
gamma settings...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas George nous apporta ses lumieres en ce 2007/10/22 05:37:
> Hi.
>
> This is probably a FAQ, but I can not manage to find its answer.
>
> I am looking for light settings for a sunny outdoor scene: deep blue sky,
> sharp shadows, but the parts in the shadow must still be visible.
>
> My base scene has this:
>
> light_source { <100000, 100000, -100000> rgb 2 }
> sky_sphere {
> pigment {
> gradient y
> color_map {
> [ 0.0 rgb <0.9, 0.9, 1> ]
> [ 0.5 rgb <0.3, 0.3, 1> ]
> }
> }
> }
>
> The best I could do was to set the global_settings ambient_light to 3 and
> default radiosity, but I am not entirely satisfied, because the blue tint of
> the sky is distinctly visible.
>
> Can someone give me some advice, please?
Normaly, you should refrain from using ambient_light in the global_settings.
It's purpose is, in non-radiosity scenes, to give some overall colouration to
the ambient part of the finishes.
If you set is to 3, as you did, you effectively multiply the ambient value of
any finish by 3, whitch is not recomended i when using radiosity.
Have some non-blue objects outside the visible part of the scene masking part of
the sky.
Set gray-threshold to something like 0.5 to 0.8, it will desaturate the
radiosity samples, reducing the blueness somewhat.
--
Alain
-------------------------------------------------
Important letters that contain no errors will develop errors in the mail.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas George nous apporta ses lumieres en ce 2007/10/22 07:34:
> "Bill Pragnell" wrote in message
> <web.471c85bad8eb8586731f01d10@news.povray.org>:
>> However, you can adjust gray_threshold in the radiosity settings. This
>> specifies how much colour to include in the radiosity calculations (1 = no
>> colours, 0 = full colour radiosity).
>
> Thanks, that does exactly what I was hoping.
>
>> Obviously, if you get rid of the sky
>> colour you will also lose colours emitted from nearby objects, so you can't
>> have it both ways I'm afraid!
>
> That is ok for me in that particular scene.
>
> As a more theoretical question, would it be possible, with the radiosity
> algorithm, to have different gray_threshold for each object?
>
>> One more point - it's best to set all objects' ambient to 0, otherwise they
>> actively emit light in radiosity calculations.
>
> Is it enough to set the global_settings ambient_light to 0, or is it
> necessary to add a finish { ambient 0 } to each object in the scene.
>
>>
Beter to use:
#default{finish{ambient 0}} and to override the provided ambient of ready-made
finishes to ambient 0.
Seting ambient_lights 0 will also turn off any lighting by high ambient object
you may have.
--
Alain
-------------------------------------------------
"Having a smoking area in a restaurant is like having a peeing area in a pool."
--Thomas Pfeffer, American Heart Association
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> I wrote a minimal example to show the amount of difference I get. It
>> is at
>> the end.
>
> How are you choosing the RGB values to use for the sky, sunlight and
> sand? Those are probably not physically accurate... Unless you have
> some sophisticated optical measurement equipment, I suggest you just
> tweak with these values until your scene looks the way you want it.
> Also check your gamma settings...
>
Maybe increasing the brightness of the "sun" could also help. Or
diminishing that of the sky_sphere. I would have thought that on a sunny
day you get a lot more light from the Sun than from the rest of the
sky... Not a mere 3 times more.
--
Vincent
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Vincent Le Chevalier wrote in message <471d1c2f$1@news.povray.org>:
> Or
> diminishing that of the sky_sphere.
I do not know how to do that. Is it possible?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Bill Pragnell wrote:
>
> From the documentation:
>
> "The actual ambient used is: Ambient = Finish_Ambient * Global_Ambient."
>
> So if you set global ambient = 0 then it will work fine. If you want nonzero
> ambient light then it's better to use the #default finish { } and only
> specify the ambient values you want to override.
>
Something that's sometimes useful is to give each object's finish some
ambient value that will look OK for test renders (ambient 0.3 works
pretty well). If you then set the global ambient value to 0 for a
radiosity render, the ambient value for the objects' textures will
revert to 0. If you need something in the final scene to have a
non-zero ambient (for example, a glowing LED), set its ambient really
high and then set the global ambient to something like 0.001, which will
effectively kill the ambient in the other textures.
Hope that's slightly useful...
--Sherry Shaw
--
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}// TenMoons
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas George nous apporta ses lumieres en ce 2007/10/22 18:14:
> Vincent Le Chevalier wrote in message <471d1c2f$1@news.povray.org>:
>> Or
>> diminishing that of the sky_sphere.
>
> I do not know how to do that. Is it possible?
Just reduce the rgb values that you use for the sky_shere.
You can also reduce the brightness in the radiosity block, it default to 1 if
you don't set it yourself.
--
Alain
-------------------------------------------------
You know you've been raytracing too long when you've convinced your boss that
raytracing is really an integral part of your job title (and you really don't
work in a position that requires it).
Quietly Watching
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Sherry Shaw nous apporta ses lumieres en ce 2007/10/22 19:16:
> Bill Pragnell wrote:
>>
>> From the documentation:
>>
>> "The actual ambient used is: Ambient = Finish_Ambient * Global_Ambient."
>>
>> So if you set global ambient = 0 then it will work fine. If you want
>> nonzero
>> ambient light then it's better to use the #default finish { } and only
>> specify the ambient values you want to override.
>>
>
> Something that's sometimes useful is to give each object's finish some
> ambient value that will look OK for test renders (ambient 0.3 works
> pretty well). If you then set the global ambient value to 0 for a
> radiosity render, the ambient value for the objects' textures will
> revert to 0. If you need something in the final scene to have a
> non-zero ambient (for example, a glowing LED), set its ambient really
> high and then set the global ambient to something like 0.001, which will
> effectively kill the ambient in the other textures.
>
> Hope that's slightly useful...
>
> --Sherry Shaw
>
>
Even beter: use this "trick"
#declare Rad = 1;
have:
#if(Rad)radiosity{ your_radiosity_settings }#end
and add this to your finishes:
... #if(Rad)ambient 0 #else ambient 0.3 #end
Now, set Rad to 0 for the test renders and to 1 for the radiosity renders.
No ugly trick, only 1 variable to set.
--
Alain
-------------------------------------------------
Stay out of my head, its a bad neighborhood.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas George a écrit :
> Vincent Le Chevalier wrote in message <471d1c2f$1@news.povray.org>:
>> Or
>> diminishing that of the sky_sphere.
>
> I do not know how to do that. Is it possible?
It is not possible with a sky_sphere because you cannot specify a
finish. However, you can do that with a really big hollow sphere
centered on the origin.
With this method, you can specify an ambient value, but you must set
diffuse to 0, otherwise the sky sphere will be illuminated by the sun,
and it becomes impossible to adjust their brightness separately.
And then you can play with the diffuse component of the objects (that
can be done in the #default block).
The next problem is that POV-Ray has no exposure control, so in fact it
will not necessarily look right when you diminish the ambient value of
the sky sphere. It will get you a very dark sky...
In my experience it is better to first adjust the ambient of the
sky_sphere to obtain the right color in the places where you see the
sky. Then, set the sunlight and the diffuse component to get the
lighting you like. Playing with these three things it's possible to
obtain many results...
I'm not quite sure it's the right way to do it though ;-)
Here is an example:
#if(1)
global_settings {
radiosity {}
}
#default {finish{ambient 0}}
#end
// Use this to control the brightness of the shadows
#default {finish{diffuse 0.35}}
plane {
y, 0
pigment { rgb <0.804, 0.569, 0.494> }
normal { bumps 0.5 }
}
union{
sphere{y,1}
cylinder {
0,3*y,0.5
translate <2,0,-2>
}
pigment{rgb 1}
scale 30
}
camera {
location <220, 50, 0> look_at <0, 0, 0>
}
sphere {
0,1
texture {
pigment {
gradient y
color_map {
[ 0.0 rgb <0.9, 0.9, 1> ]
[ 0.5 rgb <0.3, 0.3, 1> ]
}
}
finish {
// Use this to adjust the brightness of the sky
ambient 1
diffuse 0 }
}
scale 200000
hollow
}
light_source {
<100000, 100000, -100000>
rgb <1,1,0.9>*6 // And this to adjust the sunlight
}
--
Vincent
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Vincent Le Chevalier" <gal### [at] libertyALLsurfSP AMfr> wrote in
message news:471e1c7b$1@news.povray.org...
> Nicolas George a écrit :
>> Vincent Le Chevalier wrote in message <471d1c2f$1@news.povray.org>:
>>> Or diminishing that of the sky_sphere.
>>
>> I do not know how to do that. Is it possible?
>
> It is not possible with a sky_sphere because you cannot specify a finish.
> However, you can do that with a really big hollow sphere centered on the
> origin.
or you could of course just multiply the color-values of your sky_sphere...
cu!
--
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x) // ZK http://www.povplace.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Vincent Le Chevalier wrote in message <471e1c7b$1@news.povray.org>:
> It is not possible with a sky_sphere because you cannot specify a
> finish. However, you can do that with a really big hollow sphere
> centered on the origin.
<snip details>
Thanks, I will try to look into it when I have time.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Alain wrote:
> Even beter: use this "trick"
> #declare Rad = 1;
>
> have:
> #if(Rad)radiosity{ your_radiosity_settings }#end
>
> and add this to your finishes:
> ... #if(Rad)ambient 0 #else ambient 0.3 #end
>
> Now, set Rad to 0 for the test renders and to 1 for the radiosity renders.
> No ugly trick, only 1 variable to set.
>
If you check the flag *inside* the global_settings block--
global_settings{
// assumed_gamma etc.
#if (Rad)
ambient_light 0.001
radiosity {
// Radiosity settings
}
#end
}
}
--then you have only one variable to set and no changes to the finishes.
But it's all good. ;) The "best" approach depends on things like the
length of your scene code, whether you're using textures from an
#include file, whether or not you're already basing textures on the
state of a flag (like "#if (test-mode) Little_Texture #else Big_Texture
#end"), and the way you like to do things.
--Sherry Shaw
--
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}// TenMoons
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |