POV-Ray : Newsgroups : povray.newusers : sun Server Time
22 Dec 2024 16:05:13 EST (-0500)
  sun (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: folkert
Subject: sun
Date: 12 Aug 2011 12:40:00
Message: <web.4e45569e51b4cef7e70ca0910@news.povray.org>
Hi,

I'm trying to render my appartment is realistic as possible. So for that I put a
huge sun above it:

// distance: 150.000.000km, diameter 1.932.000km
light_source { <0, 15000000000000, 0> color White
                area_light <193200000000, 0, 0>, <0, 0, 193200000000>, 5, 5
adaptive 1 jitter
                looks_like {
                        sphere { <0, 15000000000000 + 193200000000 / 2, 0>,
193200000000/2 pigment { color rgb<0.85,1.0,0.85> } }
                }
}

please note that 15... above (and the 1932 of course) are in cm.

I also added a sky_sphere.

The complete scene is at http://vanheusden.com/pov/flat.zip

Now the main room (render the test.pov for that) is rather dark. Much darker
then  it was in reality. Of course I could add an extra light just before the
window but that's faking it too much.
What would be the solution?

Thanks!


Post a reply to this message

From: Warp
Subject: Re: sun
Date: 12 Aug 2011 13:11:27
Message: <4e455ebf@news.povray.org>
folkert <fol### [at] vanheusdencom> wrote:
> Hi,

> I'm trying to render my appartment is realistic as possible. So for that I put a
> huge sun above it:

> // distance: 150.000.000km, diameter 1.932.000km
> light_source { <0, 15000000000000, 0> color White
>                 area_light <193200000000, 0, 0>, <0, 0, 193200000000>, 5, 5
> adaptive 1 jitter
>                 looks_like {
>                         sphere { <0, 15000000000000 + 193200000000 / 2, 0>,
> 193200000000/2 pigment { color rgb<0.85,1.0,0.85> } }
>                 }
> }

  Note that you will not get any visible difference by using those values
or using values which are eg. five orders of magnitude smaller. What you
*could* potentially get with such huge values, however, is rendering
artifacts due to the limited accuracy of floating point values. (After
all, you are using values like 15000000000000 in conjunction with values
that probably are less than 1, in other words, you are dealing with over
15 digits of accuracy, which is the size of the mantissa of a double
precision floating point number. Rendering artifacts are a real possibility.)

> Now the main room (render the test.pov for that) is rather dark. Much darker
> then  it was in reality. Of course I could add an extra light just before the
> window but that's faking it too much.
> What would be the solution?

  Real-life rooms are much brighter because the sunlight bounces from the
walls and other surfaces, further illuminating the rest of the room (and
even this reflected light will bounce a second time, although it will be
significantly dimmer, but still contributes to the overall brightness;
even the third bounce might contribute a bit).

  The only way to simulate that in a scene is to use radiosity. This will
make the rendering significantly slower, and getting all the radiosity
parameters correct can be an arduous task, but the end result can be very
realistic.

-- 
                                                          - Warp


Post a reply to this message

From: Cousin Ricky
Subject: Re: sun
Date: 13 Aug 2011 00:50:03
Message: <web.4e4600bf9449a1f585de7b680@news.povray.org>
"folkert" <fol### [at] vanheusdencom> wrote:
> // distance: 150.000.000km, diameter 1.932.000km
> light_source { <0, 15000000000000, 0> color White
>                 area_light <193200000000, 0, 0>, <0, 0, 193200000000>, 5, 5
> adaptive 1 jitter
>                 looks_like {
>                         sphere { <0, 15000000000000 + 193200000000 / 2, 0>,
> 193200000000/2 pigment { color rgb<0.85,1.0,0.85> } }
>                 }
> }

Please read this FAQ:
   http://wiki.povray.org/content/Knowledgebase:Misconceptions#Topic_6

Bring your light source in much closer, and scale down the diameter of the Sun
accordingly.  If you use the parallel keyword, then it won't make a difference
how far away the light_source is for illumination (although it might affect the
looks_like if it isn't sufficiently far away).  Try this:
____________________________________________________________________________

//Declare variables so you won't have mysterious numbers all over your code:
#declare V_SUN = <the Sun's location>; //Not necessarily overhead.
#declare dSun = vlength (V_SUN) * (1390000/150000000);

light_source
{  V_SUN, color White
   area_light dSun * x, dSun * z, 5, 5 adaptive 1 jitter
   circular orient //Using this, the Sun doesn't have to be overhead.
   parallel point_at 0
   looks_like
   {  sphere
      {  0, dSun //Location is relative to the light_source, not the origin.
         pigment { color rgb <0.85, 1.0, 0.85> }
         //Give the Sun a glowing appearance:
         finish { diffuse 0 ambient 1 } //POV-Ray 3.6.
            //or
         finish { diffuse 0 ambient 0 emission 1 } //POV-Ray 3.7.
      }
   }
}
____________________________________________________________________________

According to my source, the Sun's diameter is 1,390,000 km.  Also note that the
distance from the Earth to the Sun varies slightly over the course of a year.

Why is your Sun's looks_like light green?


Post a reply to this message

From: Cousin Ricky
Subject: Re: sun
Date: 13 Aug 2011 02:20:03
Message: <web.4e46172b9449a1f585de7b680@news.povray.org>
"folkert" <fol### [at] vanheusdencom> wrote:
> Now the main room (render the test.pov for that) is rather dark. Much darker
> then  it was in reality. Of course I could add an extra light just before the
> window but that's faking it too much.

With your Sun directly overhead, the only illumination inside the room comes
from the sky_sphere.

> What would be the solution?

If you wish to rely only on light that comes from outdoors, this may be
difficult.  The human eye has a fantastic ability to adjust to low light levels,
and what looks to you like a brightly lit room is actually very dark compared to
outdoors.

- Set global_settings { assumed_gamma 1 }.  This should be as automatic as
breathing.

- Use a brighter sky_sphere pigment.

- Alternatively, you can surround your scene with a huge sphere, and apply your
sky pigment with a high finish { ambient } to the sphere.

- Move the Sun so that it shines through a window.  The illumination of the
floor or a wall will give radiosity something more to work with.  Note that you
will not see the sunbeam shining into the room (unless you use media).

- Use high dynamic range illumination (HDRI).  HDRI is available in POV-Ray 3.7,
and documentation is available at the MegaPov Web site:
   http://megapov.inetart.net/manual-1.2.1/tutorials_hdri.html

P.S. A recursion_limit of 5 greatly slows down the render with little or no
visual benefit.


Post a reply to this message

From: Alain
Subject: Re: sun
Date: 13 Aug 2011 12:43:04
Message: <4e46a998@news.povray.org>

> Hi,
>
> I'm trying to render my appartment is realistic as possible. So for that I put a
> huge sun above it:
>
> // distance: 150.000.000km, diameter 1.932.000km
> light_source {<0, 15000000000000, 0>  color White
>                  area_light<193200000000, 0, 0>,<0, 0, 193200000000>, 5, 5
> adaptive 1 jitter
>                  looks_like {
>                          sphere {<0, 15000000000000 + 193200000000 / 2, 0>,
> 193200000000/2 pigment { color rgb<0.85,1.0,0.85>  } }
>                  }
> }
>
> please note that 15... above (and the 1932 of course) are in cm.
>
> I also added a sky_sphere.
>
> The complete scene is at http://vanheusden.com/pov/flat.zip
>
> Now the main room (render the test.pov for that) is rather dark. Much darker
> then  it was in reality. Of course I could add an extra light just before the
> window but that's faking it too much.
> What would be the solution?
>
> Thanks!
>
>

Use the parallel attribute for your sun.
Place it MUCH closer, like 1 000 000 times closer!
Reduce the size of the area_light and the looks_like sphere by that same 
amount.
You may possibly get by using adaptive 0, but use a higher density for 
the area_light. 17 x 17 is good.
Make it circular and use orient. This will nicely simulate a spherical 
light_source.

As it is, your sun is straight up. Removing it will not change anything 
as there is nothing for it to shine upon that can indirectly illuminate 
the interior.

You don't have any ground outside your room. Add something like plane{y, 
-30 pigment{Some_colour}}


Alain


Post a reply to this message

From: Alain
Subject: Re: sun
Date: 13 Aug 2011 12:55:36
Message: <4e46ac88@news.povray.org>


Looking at your sky_sphere, I see that you are using a deprecated 
construction. You should use the actual syntax:

sky_sphere {
     pigment {
       gradient y
       color_map {
         [0.002 color rgb <0.0, 0.2, 1.0>]
//Use this if <= 0.02
         [0.002 color rgb <0.0, 0.1, 0.8>]// sharp transition
         [0.2   color rgb <0.3, 0.2, 0.2>]
//Use if >= 0.2
       }
       scale 2
       translate -1
     }
     pigment {
       bozo
       turbulence 0.65
       octaves 6
       omega 0.7
       lambda 2
       color_map {
           [0.0  color rgb <0.85, 0.85, 0.85>]
           [0.1  color rgb <0.75, 0.75, 0.75>]
           [0.5  color rgbt <1, 1, 1, 1>]
// Stay at that value for all values > 0.5
       }
       scale <0.2, 0.5, 0.2>
     }
     rotate -135*x
   }


Post a reply to this message

From: folkert
Subject: Re: sun
Date: 13 Aug 2011 15:50:01
Message: <web.4e46d4b89449a1f5e70ca0910@news.povray.org>
> Please read this FAQ:
>    http://wiki.povray.org/content/Knowledgebase:Misconceptions#Topic_6
>
> Bring your light source in much closer, and scale down the diameter of the Sun
> accordingly.  If you use the parallel keyword, then it won't make a difference
> how far away the light_source is for illumination (although it might affect the
> looks_like if it isn't sufficiently far away).  Try this:
....
> According to my source, the Sun's diameter is 1,390,000 km.  Also note that the
> distance from the Earth to the Sun varies slightly over the course of a year.

> Why is your Sun's looks_like light green?

Ehr that should've been yellow :-)

Thank you all for your explanations!

It all looks really nice now.

Now I'm fighting with animating it. That works but there are spots (e.g.
corners) that flicker while moving. I think it has to do with the radiation
element. I took care of the photo-mapping (in first scene do a save and do a
load in all other frames)

http://vps001.vanheusden.com/~folkert/output.avi


Post a reply to this message

From: Alain
Subject: Re: sun
Date: 13 Aug 2011 18:59:23
Message: <4e4701cb@news.povray.org>


> Now I'm fighting with animating it. That works but there are spots (e.g.
> corners) that flicker while moving. I think it has to do with the radiation
> element. I took care of the photo-mapping (in first scene do a save and do a
> load in all other frames)
>
> http://vps001.vanheusden.com/~folkert/output.avi
>
>
>

When animating a radiosity scene, as the camera and other elements move 
around, the exact location where the radiosity samples are taken will 
change.
To compensate, you need to take more samples, especialy in the pretrace 
steps.
Set:
always_sample off (new default, always recomended for any scene)
nearest_count 20 (to average more samples, maximum value)
pretrace_end 0.005 (or lower: 0.0025 or 0.00125)
minimum_reuse slightly lower than pretrace_end

Increase the count value.
With version 3.7, you can go higher than the former maximum of 1600.
If you increase the count value, you may be interested in using the new 
importance radiosity controll.
You set the default value in a default statement:
#default { radiosity { importance 0.1 } }

and set the importance of specific objects as follow:
In the object's definition, add:

radiosity { importance 1 }

importance range from 0 < importance <= 1

You may try a two pass render.
First pass at low resolution, aa OFF. You can use a low quality focal 
blur with a large aperture to force the taking of additional radiosity 
samples. SAVE the radiosity data to a file.
Second pass at full resolution and AA ON. You load the radiosity data 
from the first pass. always_sample MUST be OFF on that pass.

You are beter to use version 3.7 and use the +hr flag specialy for your 
animations.
Version 3.7 RC3 have beter radiosity with many bugs corrected, can use 
all present cores, have beter focal blur handling and is frequently 
faster than 3.6.1.
You no longer need to remove ambient when doing a radiosity scene as 
it's now done automaticaly. You can use the new emission in your finish 
if you want some object to actualy glow and illuminate it's surrounding.

All this will actualy move you from new user to normal user and even to 
advanced user.



Alain


Post a reply to this message

From: folkert
Subject: Re: sun
Date: 14 Aug 2011 07:00:00
Message: <web.4e47a9ee9449a1f5e70ca0910@news.povray.org>
> always_sample off (new default, always recomended for any scene)
> nearest_count 20 (to average more samples, maximum value)
> pretrace_end 0.005 (or lower: 0.0025 or 0.00125)
> minimum_reuse slightly lower than pretrace_end
> Increase the count value.
> #default { radiosity { importance 0.1 } }

Ok now I've got:
global_settings {
        radiosity {
                brightness 2.2
                count 500
                error_bound 0.15
                gray_threshold 0.0
                low_error_factor 0.2
                nearest_count 20
                adc_bailout 0.01
                max_sample -1.0
                media off
                normal off
                always_sample off
                pretrace_start 0.08
                pretrace_end 0.00125
                minimum_reuse 0.00120
        }
}
#default {finish{ambient 0} radiosity { importance 0.1 } }

> radiosity { importance 1 }

And I also added that to my window-definitions.

Will restart the rendercluster!

> You are beter to use version 3.7 and use the +hr flag specialy for your
> animations.
> Version 3.7 RC3 have beter radiosity with many bugs corrected, can use
> all present cores, have beter focal blur handling and is frequently
> faster than 3.6.1.

Yes, I'm using that version. Especially as it uses multiple cores.

Thanks a lot Alain!


Post a reply to this message

From: Alain
Subject: Re: sun
Date: 14 Aug 2011 11:56:35
Message: <4e47f033@news.povray.org>


Don't forget the +hr flag!
It's particularly important for animations using radiosity.


Alain


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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