POV-Ray : Newsgroups : povray.binaries.scene-files : Sky simulation Server Time
18 Apr 2024 07:26:21 EDT (-0400)
  Sky simulation (Message 1 to 10 of 38)  
Goto Latest 10 Messages Next 10 Messages >>>
From: scott
Subject: Sky simulation
Date: 7 Jun 2013 07:51:18
Message: <51b1c936@news.povray.org>
See example images posted in p.b.i

SkySim.inc is the macro, SkySimTestGround.pov is a simple example of a 
scene using the macro.


Post a reply to this message


Attachments:
Download 'windows-1252' (7 KB) Download 'windows-1252' (3 KB)

From: Thomas de Groot
Subject: Re: Sky simulation
Date: 7 Jun 2013 10:54:55
Message: <51b1f43f$1@news.povray.org>
On 7-6-2013 13:51, scott wrote:
> SkySim.inc is the macro, SkySimTestGround.pov is a simple example of a
> scene using the macro.

Very good. Thanks very much indeed. Much better of course than the 
simple example I gave :-)

Thomas


Post a reply to this message

From: Fractracer
Subject: Re: Sky simulation
Date: 30 Jun 2013 08:00:01
Message: <web.51d01cc859bb6361916440570@news.povray.org>
scott <sco### [at] scottcom> wrote:
> See example images posted in p.b.i
>
> SkySim.inc is the macro, SkySimTestGround.pov is a simple example of a
> scene using the macro.

Hello, I try your macro but I've got an error on line:
#local xyYtoR = function (x,y,Y){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
-0.4986)*Y/SkyMaxLuminance }
where Y seems undefined.
I am wrong?


Post a reply to this message

From: Alain
Subject: Re: Sky simulation
Date: 30 Jun 2013 13:13:32
Message: <51d0673c@news.povray.org>

> scott <sco### [at] scottcom> wrote:
>> See example images posted in p.b.i
>>
>> SkySim.inc is the macro, SkySimTestGround.pov is a simple example of a
>> scene using the macro.
>
> Hello, I try your macro but I've got an error on line:
> #local xyYtoR = function (x,y,Y){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
> -0.4986)*Y/SkyMaxLuminance }
> where Y seems undefined.
> I am wrong?
>

Try calling the function this way:
xyYtoR(x,y,1)

This is a reason to NOT use "X", "Y" or "Z" as user variable names. It 
can lead to some confusion.



Alain


Post a reply to this message

From: scott
Subject: Re: Sky simulation
Date: 1 Jul 2013 03:31:45
Message: <51d13061@news.povray.org>
> Hello, I try your macro but I've got an error on line:
> #local xyYtoR = function (x,y,Y){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
> -0.4986)*Y/SkyMaxLuminance }
> where Y seems undefined.
> I am wrong?

Y is one of the parameters for the function, so it becomes defined when 
the function is called. What version of POV are you using? I've tried it 
on 3.6 and 3.7 with no issues.

On 30/06/2013 18:14, Alain wrote:
 > This is a reason to NOT use "X", "Y" or "Z" as user variable names.
 > It can lead to some confusion.

I wouldn't normally do such a thing, but the colour space used by the 
algorithm is Yxy. My POV version didn't complain or get confused about 
using Y and y, so this makes the equations easier to read. I suppose I 
could have used _Y or something.


Post a reply to this message

From: Fractracer
Subject: Re: Sky simulation
Date: 1 Jul 2013 06:40:00
Message: <web.51d15b7b59bb6361916440570@news.povray.org>
scott <sco### [at] scottcom> wrote:
> > Hello, I try your macro but I've got an error on line:
> > #local xyYtoR = function (x,y,Y){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
> > -0.4986)*Y/SkyMaxLuminance }
> > where Y seems undefined.
> > I am wrong?
>
> Y is one of the parameters for the function, so it becomes defined when
> the function is called. What version of POV are you using? I've tried it
> on 3.6 and 3.7 with no issues.
>
> On 30/06/2013 18:14, Alain wrote:
>  > This is a reason to NOT use "X", "Y" or "Z" as user variable names.
>  > It can lead to some confusion.
>
> I wouldn't normally do such a thing, but the colour space used by the
> algorithm is Yxy. My POV version didn't complain or get confused about
> using Y and y, so this makes the equations easier to read. I suppose I
> could have used _Y or something.

It works (not fine but with no errors) when I change Y by z:
#local xyYtoR = function (x,y,z){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
-0.4986)*Y/SkyMaxLuminance }
I know this is not the good value but I try to see what happens.
I use v3.6 and v3.7 with the same result.


Post a reply to this message

From: scott
Subject: Re: Sky simulation
Date: 1 Jul 2013 07:54:13
Message: <51d16de5$1@news.povray.org>
> It works (not fine but with no errors) when I change Y by z:
> #local xyYtoR = function (x,y,z){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
> -0.4986)*Y/SkyMaxLuminance }
> I know this is not the good value but I try to see what happens.
> I use v3.6 and v3.7 with the same result.

If you change the Y to z in the parameter list then just change the Y to 
z in the equation too:

#local xyYtoR = function (x,y,z){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
-0.4986)*z/SkyMaxLuminance }

That should then work the same as the original version.


Post a reply to this message

From: Fractracer
Subject: Re: Sky simulation
Date: 1 Jul 2013 08:25:01
Message: <web.51d174e159bb6361916440570@news.povray.org>
scott <sco### [at] scottcom> wrote:
> > It works (not fine but with no errors) when I change Y by z:
> > #local xyYtoR = function (x,y,z){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
> > -0.4986)*Y/SkyMaxLuminance }
> > I know this is not the good value but I try to see what happens.
> > I use v3.6 and v3.7 with the same result.
>
> If you change the Y to z in the parameter list then just change the Y to
> z in the equation too:
>
> #local xyYtoR = function (x,y,z){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
> -0.4986)*z/SkyMaxLuminance }
>
> That should then work the same as the original version.

Thanks, I go to try this when my render in works will stop.


Post a reply to this message

From: scott
Subject: Re: Sky simulation
Date: 1 Jul 2013 08:54:56
Message: <51d17c20$1@news.povray.org>
> Thanks, I go to try this when my render in works will stop.

OK but I still find it odd you get an error when using Y as a parameter. 
What is the exact error you get, can you copy and paste it here for us 
to see?

If you copy the below code into an empty POV document (so just 1 line) - 
does it work?

#local xyYtoR = function (x,y,Y){ x+y+Y }


Post a reply to this message

From: Fractracer
Subject: Re: Sky simulation
Date: 1 Jul 2013 09:10:01
Message: <web.51d17e3959bb6361916440570@news.povray.org>
scott <sco### [at] scottcom> wrote:
> > Thanks, I go to try this when my render in works will stop.
>
> OK but I still find it odd you get an error when using Y as a parameter.
> What is the exact error you get, can you copy and paste it here for us
> to see?
>
> If you copy the below code into an empty POV document (so just 1 line) -
> does it work?
>
> #local xyYtoR = function (x,y,Y){ x+y+Y }

It work with a simple scene, I can't understand what's happens!!! With
sky_sim.inc ...
OOOPS!!! I've find, I have a variable declared Y... Excuse me...


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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