POV-Ray : Newsgroups : povray.general : sunpos.inc Server Time
30 Jul 2024 06:29:49 EDT (-0400)
  sunpos.inc (Message 1 to 9 of 9)  
From: SharkD
Subject: sunpos.inc
Date: 5 Sep 2009 18:17:42
Message: <4aa2e386@news.povray.org>
The docs don't tell you how *far away* the sun is from the center of the 
scene when you include this file. What is the distance?

-Mike


Post a reply to this message

From: SharkD
Subject: Re: sunpos.inc
Date: 5 Sep 2009 18:28:19
Message: <4aa2e603$1@news.povray.org>
I have some other lighting questions as well.

1. Does CIE_Skylight.inc in LightsysIV use media to create the sky 
color, or does it simply create a sky_sphere pigment?
2. Does it create a sun as well as a sky? Is the sun an object, or is it 
just a brighter spot in the sky?
2.Right now I am using the looks_like statement, to create a sun object 
and light source. Unfortunately, the distances are so great that the sun 
object is culled from the scene. Is there a way to place the object 
nearer to the camera while still having the light source very far away? 
I'm guessing that this would normally create problems such as shadows. 
How do I get around them?

-Mike


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: sunpos.inc
Date: 6 Sep 2009 03:51:59
Message: <4aa36a1f@news.povray.org>
SharkD escribió:
> I have some other lighting questions as well.
> 
> 1. Does CIE_Skylight.inc in LightsysIV use media to create the sky 
> color, or does it simply create a sky_sphere pigment?

   It is a mesh dome, where triangles are colored according to complex 
calculations. Read the readme_skylight.txt file: it's all explained there by 
the author, Philippe Debar.

> 2. Does it create a sun as well as a sky? Is the sun an object, or is it 
> just a brighter spot in the sky?


   No object, is just a spot in the dome mesh. AFAIK, this spot doesn't 
models the sun, but the brightness of the sky at that point. I usually put a 
light_source at the SolarPosition returned by the include.

> 2.Right now I am using the looks_like statement, to create a sun object 
> and light source. Unfortunately, the distances are so great that the sun 
> object is culled from the scene. Is there a way to place the object 
> nearer to the camera while still having the light source very far away? 
> I'm guessing that this would normally create problems such as shadows. 
> How do I get around them?

   Just take out the object from the looks_like and place it where you want, 
adding no_shadow to it.

--
Jaime


Post a reply to this message

From: clipka
Subject: Re: sunpos.inc
Date: 6 Sep 2009 03:52:18
Message: <4aa36a32$1@news.povray.org>
SharkD schrieb:
> The docs don't tell you how *far away* the sun is from the center of the 
> scene when you include this file. What is the distance?

A quick look at sunpos.inc reveals that the point returned by the SunPos 
macro will be placed 1000000000 (1e+9) units  away.

You can pick your own favorite distance by using

     #declare MySunPos = vnormalize(SunPos(...))*MySunDistance;


Post a reply to this message

From: clipka
Subject: Re: sunpos.inc
Date: 6 Sep 2009 03:56:31
Message: <4aa36b2f$1@news.povray.org>
SharkD schrieb:
> 2.Right now I am using the looks_like statement, to create a sun object 
> and light source. Unfortunately, the distances are so great that the sun 
> object is culled from the scene. Is there a way to place the object 
> nearer to the camera while still having the light source very far away? 
> I'm guessing that this would normally create problems such as shadows. 
> How do I get around them?

You can...

a) place a sphere a good deal closer, give it ambient-only finish, and 
mark it as "no_shadow" to prevent it from casting shadows, or

b) use a sky_sphere with some smart pigment generating a bright spot 
where the sun should be.


Post a reply to this message

From: Alain
Subject: Re: sunpos.inc
Date: 6 Sep 2009 13:09:11
Message: <4aa3ecb7$1@news.povray.org>
SharkD a écrit :
> I have some other lighting questions as well.
> 
> 1. Does CIE_Skylight.inc in LightsysIV use media to create the sky 
> color, or does it simply create a sky_sphere pigment?
> 2. Does it create a sun as well as a sky? Is the sun an object, or is it 
> just a brighter spot in the sky?
> 2.Right now I am using the looks_like statement, to create a sun object 
> and light source. Unfortunately, the distances are so great that the sun 
> object is culled from the scene. Is there a way to place the object 
> nearer to the camera while still having the light source very far away? 
> I'm guessing that this would normally create problems such as shadows. 
> How do I get around them?
> 
> -Mike
If the light_source with it's looks_like objects is to far away, you can 
place it closer while making it proportionaly smaller.

So, if you place it 1000 times closer, make it 1000 times smaller. This 
will preserve it's perceived dimention.

Also, use the "parallel" attribute for the light_source, with "point_at 
0" to orient it toward the center of your scene. This simulate a 
light_source cituated at "infinity".

It's always a good idea to create your scene around the origin.


Alain


Post a reply to this message

From: SharkD
Subject: Re: sunpos.inc
Date: 6 Sep 2009 13:35:36
Message: <4aa3f2e8$1@news.povray.org>
clipka wrote:
> A quick look at sunpos.inc reveals that the point returned by the SunPos 
> macro will be placed 1000000000 (1e+9) units  away.
> 
> You can pick your own favorite distance by using
> 
>     #declare MySunPos = vnormalize(SunPos(...))*MySunDistance;

Does the scene's basic unit of measurement matter when using sunpos? 
Also, is the sun's radius/diameter isn't calculated by the script?

-Mike


Post a reply to this message

From: SharkD
Subject: Re: sunpos.inc
Date: 6 Sep 2009 13:36:28
Message: <4aa3f31c$1@news.povray.org>
Alain wrote:
> If the light_source with it's looks_like objects is to far away, you can 
> place it closer while making it proportionaly smaller.
> 
> So, if you place it 1000 times closer, make it 1000 times smaller. This 
> will preserve it's perceived dimention.
> 
> Also, use the "parallel" attribute for the light_source, with "point_at 
> 0" to orient it toward the center of your scene. This simulate a 
> light_source cituated at "infinity".
> 
> It's always a good idea to create your scene around the origin.
> 
> 
> Alain

OK, thanks.

-Mike


Post a reply to this message

From: clipka
Subject: Re: sunpos.inc
Date: 6 Sep 2009 18:34:43
Message: <4aa43903$1@news.povray.org>
SharkD schrieb:
> Does the scene's basic unit of measurement matter when using sunpos? 

No, the SunPos macro doesn't care about the size of the rest of your scene.

> Also, is the sun's radius/diameter isn't calculated by the script?

No, SunPos only computes the sun's position.

For realism, the diameter should be approximately 1/100 of the distance.


Post a reply to this message

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