POV-Ray : Newsgroups : povray.general : Had a thought.. Server Time
25 Dec 2024 01:49:01 EST (-0500)
  Had a thought.. (Message 1 to 10 of 10)  
From: Patrick Elliott
Subject: Had a thought..
Date: 29 Jun 2006 16:22:23
Message: <MPG.1f0de469270f5a65989f30@news.povray.org>
Specifically last night when I couldn't sleep. No idea how I got around 
to thinking about POV-Ray. The last thing I was doing was watching the 
new Blade TV show. lol

Anyway.. I seem to remember discussions of problems with trying to 
simulate sunlight, etc. Mainly, no matter how far away you place a 
light, it never produces a parallel path, or at least not without 
placing it so far away that the light never gets to the objects. But, if 
I understand Sky_Sphere right, it acts on the color of a pixel if the 
ray goes effectively infinite.. So, my first thought was something like:

Sky_Light {
  X, Y, Z
  // 0 = point light, 1 = unit disc.
  size {0/1
        [scale <x,y>]}
  pigment {...}
  falloff 0->1
}

Where X,Y,Z is the "direction" from origin the light would appear on the 
sky_sphere, size is either a point or unit sized disc, which in the 
later case can be scaled, and there is a falloff, which lets you 
determine how fast the light shrinks. The only problem was.. How to make 
it work with the sky_spheres own pattern, so I thought:

Sky_Light {
  X, Y, Z
  // 0 = point light, 1 = unit disc.
  size {0/1
        [scale <x,y>]}
  pigment {...}
  [mask_pattern {...}]
  falloff 0->1
}

Which would let you define something like a transparency mask. How much 
the sky_sphere gives off light, relative to the sky_light, would be 
determined by the mask. Ok.. Still has problems... The thought though 
was that something like a cloud could have a mask that made the 
"denser" parts transfer less light than the other parts, so you could 
get some shadows from the clouds. Then it occurred to me that this still 
doesn't deal with the sun type source too well. What is needed is for 
falloff to be patterned as well, so you can define a sharp drop near the 
center disc, then a much slower fade from there, so that some light is 
still coming off the farthest edges of the visible sky, just like in the 
real world. But, how to determine the "brightness" of stars, without 
them producing large enough amounts of light to act like normal point 
sources as well... The do provide "some" after all, just not a lot and 
they need to be visible.

Then I decided this was getting too complex and decided, maybe a 
sky_light isn't needed. What might work better is to make a light_mask 
or even add a pattern system to ambient, for the sky_sphere. In other 
words, either define a kind of brightness pattern that determines how 
much "light" is given off by parts of the sky_sphere, or just let 
ambient be defined the same way as the texture for the sky_sphere, so 
that you can create white spots for stars, using stafield, but also use 
the same pattern to determine the "brightness" of those spots from the 
standpoint of providing light. This would however mean, in both cases, 
disabling any current light interaction with sky_sphere, when the new 
options are used, so that its only visible as per the ambient level it 
produces, not just by itself. The light_mask is probably the better bet, 
ambient isn't meant to be a light source, except in cases like 
radiosity, where it does work like one. But, this actually means that 
maybe the visibility of the sky_sphere "must" be based on interaction 
with the mask, since other lights in the scene having an effect on it 
would mess things up a lot.

So, what does anyone think of the idea. I am only assuming its possible 
to make such a light source system work, but unless I am seriously 
missing something, I would think it would solve the parallel light from 
distant sources issue, and better than the current system, which has an 
ambient value/light amounts from the sky_sphere that is for the entire 
object. You are still forced to make a "sun" point light or area light 
as well, which won't produce quite the right results. Of course, I have 
no bloody clue if this would be any better, but that's for the people 
that know how the heck this would/wouldn't work to figure out. lol

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Alain
Subject: Re: Had a thought..
Date: 29 Jun 2006 20:05:30
Message: <44a46aca$1@news.povray.org>
Patrick Elliott nous apporta ses lumieres en ce 29/06/2006 16:22:

> Anyway.. I seem to remember discussions of problems with trying to 
> simulate sunlight, etc. Mainly, no matter how far away you place a 
> light, it never produces a parallel path, or at least not without 
> placing it so far away that the light never gets to the objects. But, if 
> I understand Sky_Sphere right, it acts on the color of a pixel if the 
> ray goes effectively infinite.. So, my first thought was something like:
> 
> Sky_Light {
>   X, Y, Z
>   // 0 = point light, 1 = unit disc.
>   size {0/1
>         [scale <x,y>]}
>   pigment {...}
>   falloff 0->1
> }
> 
> Where X,Y,Z is the "direction" from origin the light would appear on the 
> sky_sphere, size is either a point or unit sized disc, which in the 
> later case can be scaled, and there is a falloff, which lets you 
> determine how fast the light shrinks. The only problem was.. How to make 
> it work with the sky_spheres own pattern, so I thought:
> 
> Sky_Light {
>   X, Y, Z
>   // 0 = point light, 1 = unit disc.
>   size {0/1
>         [scale <x,y>]}
>   pigment {...}
>   [mask_pattern {...}]
>   falloff 0->1
> }
> 
Why don't you use parallel in the light's description? It makes all the rays of light
effectively 
parallel, thus simulating a light source that is situated at "infinity".
light_source{Location, Colour parallel point_at PointAt}

-- 
Alain
-------------------------------------------------
  Maybe God wants us to meet a few wrong people
before meeting the right one, so that when
we finally meet the person, we will know how to be
grateful.


Post a reply to this message

From: Patrick Elliott
Subject: Re: Had a thought..
Date: 30 Jun 2006 16:59:42
Message: <MPG.1f0f3e7f9694cbc2989f31@news.povray.org>
In article <44a46aca$1@news.povray.org>, ele### [at] netscapenet 
says...
> Patrick Elliott nous apporta ses lumieres en ce 29/06/2006 16:22:
> 
> > Anyway.. I seem to remember discussions of problems with trying to 
> > simulate sunlight, etc. Mainly, no matter how far away you place a 
> > light, it never produces a parallel path, or at least not without 
> > placing it so far away that the light never gets to the objects. But, i
f 
> > I understand Sky_Sphere right, it acts on the color of a pixel if the
 
> > ray goes effectively infinite.. So, my first thought was something like
:
> > 
> > Sky_Light {
> >   X, Y, Z
> >   // 0 = point light, 1 = unit disc.
> >   size {0/1
> >         [scale <x,y>]}
> >   pigment {...}
> >   falloff 0->1
> > }
> > 
> > Where X,Y,Z is the "direction" from origin the light would appear on th
e 
> > sky_sphere, size is either a point or unit sized disc, which in the 
> > later case can be scaled, and there is a falloff, which lets you 
> > determine how fast the light shrinks. The only problem was.. How to mak
e 
> > it work with the sky_spheres own pattern, so I thought:
> > 
> > Sky_Light {
> >   X, Y, Z
> >   // 0 = point light, 1 = unit disc.
> >   size {0/1
> >         [scale <x,y>]}
> >   pigment {...}
> >   [mask_pattern {...}]
> >   falloff 0->1
> > }
> > 
> Why don't you use parallel in the light's description? It makes all the r
ays of light effectively 
> parallel, thus simulating a light source that is situated at "infinity".
> light_source{Location, Colour parallel point_at PointAt}
> 
Umm. Other than not realizing that existed... lol Still, you might be 
able to do a lot more with my concept, for example, a point source is a) 
not an accurate presentation of the sun, b) not sized right and c) 
doesn't add any light from the sky itself. What I was thinking in terms 
of was a light that could be made to have a bright center, a quick fall 
off near its edge, but the rest of the sky still "bright" from it, 
though faded towards the far edges of the horizon. The theory being that 
for some cases, this might give more control over what it actually 
produces. As things currently stand, any light will tend to effect a 
sky_sphere more or less equally across its entire surface, which it 
seems to me isn't quite right.

Anyway, it was just an idea. I think it could be used to do some 
interesting stuff, maybe.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Alain
Subject: Re: Had a thought..
Date: 30 Jun 2006 21:10:14
Message: <44a5cb76$1@news.povray.org>
Patrick Elliott nous apporta ses lumieres en ce 30/06/2006 16:59:
> In article <44a46aca$1@news.povray.org>, ele### [at] netscapenet 
> says...
>> Patrick Elliott nous apporta ses lumieres en ce 29/06/2006 16:22:
>>
>> Why don't you use parallel in the light's description? It makes all the rays of
light effectively 
>> parallel, thus simulating a light source that is situated at "infinity".
>> light_source{Location, Colour parallel point_at PointAt}
>>
> Umm. Other than not realizing that existed... lol Still, you might be 
> able to do a lot more with my concept, for example, a point source is a) 
> not an accurate presentation of the sun, b) not sized right and c) 
> doesn't add any light from the sky itself. What I was thinking in terms 
> of was a light that could be made to have a bright center, a quick fall 
> off near its edge, but the rest of the sky still "bright" from it, 
> though faded towards the far edges of the horizon. The theory being that 
> for some cases, this might give more control over what it actually 
> produces. As things currently stand, any light will tend to effect a 
> sky_sphere more or less equally across its entire surface, which it 
> seems to me isn't quite right.
NO! sky_sphere is a "background" feature, not a proper object.
It don't react to light, it's like an object with: finish{ambient 1 diffuse 0}
> 
> Anyway, it was just an idea. I think it could be used to do some 
> interesting stuff, maybe.
> 
A parallel light can also be an area_light or a spot_light. It can also be
projected_through some 
object. You should read the documentations about light_source, completely: 3.4.7 
Light Sources
If you want the sky/sky_sphere to contribute to the overall lighting, you should use
radiosity. 
Another option is to use a shadowless fill light.
Have a sky_sphere, or a realy large "world sphere" with a pattern that match what you
want and use 
radiosity. Please read: 3.3.4  Radiosity

-- 
Alain
-------------------------------------------------
Getting the job done is no excuse for not following the rules.


Post a reply to this message

From: Patrick Elliott
Subject: Re: Had a thought..
Date: 1 Jul 2006 17:09:50
Message: <MPG.1f1092509c9cfad9989f32@news.povray.org>
In article <44a5cb76$1@news.povray.org>, ele### [at] netscapenet 
says...
> Patrick Elliott nous apporta ses lumieres en ce 30/06/2006 16:59:
> > In article <44a46aca$1@news.povray.org>, ele### [at] netscapenet 
> > says...
> >> Patrick Elliott nous apporta ses lumieres en ce 29/06/2006 16:22:
> >>
> >> Why don't you use parallel in the light's description? It makes all th
e rays of light effectively 
> >> parallel, thus simulating a light source that is situated at "infinity
".
> >> light_source{Location, Colour parallel point_at PointAt}
> >>
> > Umm. Other than not realizing that existed... lol Still, you might be
 
> > able to do a lot more with my concept, for example, a point source is a
) 
> > not an accurate presentation of the sun, b) not sized right and c) 
> > doesn't add any light from the sky itself. What I was thinking in terms
 
> > of was a light that could be made to have a bright center, a quick fall
 
> > off near its edge, but the rest of the sky still "bright" from it, 
> > though faded towards the far edges of the horizon. The theory being tha
t 
> > for some cases, this might give more control over what it actually 
> > produces. As things currently stand, any light will tend to effect a 
> > sky_sphere more or less equally across its entire surface, which it 
> > seems to me isn't quite right.
> NO! sky_sphere is a "background" feature, not a proper object.
> It don't react to light, it's like an object with: finish{ambient 1 diffu
se 0}
> > 
> > Anyway, it was just an idea. I think it could be used to do some 
> > interesting stuff, maybe.
> > 
> A parallel light can also be an area_light or a spot_light. It can also b
e projected_through some 
> object. You should read the documentations about light_source, completely
: 3.4.7  Light Sources
> If you want the sky/sky_sphere to contribute to the overall lighting, you
 should use radiosity. 
> Another option is to use a shadowless fill light.
> Have a sky_sphere, or a realy large "world sphere" with a pattern that ma
tch what you want and use 
> radiosity. Please read: 3.3.4  Radiosity
> 
Yeah, I know you can use Radiosity. I was thinking in terms of what 
might work "without" that. And yeah, there are a mess of other 
solutions, they are have serious limitations. For example, a bloody area 
light **won't** do what I am talking about. A spotlight gets closer, but 
its still not doing what I am talking about. Fill lights are just a 
cludge. They work, but they are hardly going to produce the same result.

Why is it that whenever someone has an idea, instead of someone saying, 
"That's interesting.", and *maybe* trying it out, all you get is an 
endless list of reasons and tricks to avoid trying it? Not that I am 
saying someone should, if its a totally stupid idea, but the endless 
parade of, "Well, if you mix 15 other things together, it might come 
close.", just bugs the hell out of me. The only thing worse imho, is 
with another program I use where I **know** I am right, but there have 
been 3-4 cludges added in to "fix" a problem that has never been 
correctly fixed, because the developer a) doesn't the time, b) doesn't 
have the knowledge and c) doesn't have an incentive, to include the 
"correct" solution. To be clear, I *do not* think my idea in the case of 
POV-Ray is a correct solution, just an interesting idea, but the 
philosophy involved with examining it seems to be the same. "Why try 
something that "might" produce interesting results if you have a dozen 
complicated, more difficult to use and incomplete solutions that can be 
clued together for a similar result?"

Sorry, in a bit of a bad mood today, but I think my point is valid. 
Seems like some idea no one even wants to try to consider, never mind 
try in actual fact. I don't see the gaping hole in mine that means it 
wouldn't be useful or possibly better than some existing solutions. 
Especially since some stuff, like placing clouds on a sky_sphere, 
currently means 'no interaction with light' at all, while a sky_sphere 
that can act as a light "could". That in and of itself would improve how 
some things work, without the overhead, for those with some sort of 
deadline, of having to fiddle with media for hours or other complicated 
textures and objects, to produce the same.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Had a thought..
Date: 2 Jul 2006 19:47:01
Message: <44a85af5$1@news.povray.org>
"Patrick Elliott" <sel### [at] rraznet> wrote in message 
news:MPG.1f1092509c9cfad9989f32@news.povray.org...
> Yeah, I know you can use Radiosity. I was thinking in terms of what 
> might work "without" that.

how would you do what you describe without using a very similar 
technique POV-Ray's radiosity uses?

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

From: Patrick Elliott
Subject: Re: Had a thought..
Date: 3 Jul 2006 19:35:01
Message: <MPG.1f1358aec442c7ff989f34@news.povray.org>
In article <44a85af5$1@news.povray.org>, zeg### [at] povplacecom 
says...
> "Patrick Elliott" <sel### [at] rraznet> wrote in message news:MPG.1f1092509c
9cfad9989f32@news.povray.org...
> > Yeah, I know you can use Radiosity. I was thinking in terms of what 
> > might work "without" that.
> 
> how would you do what you describe without using a very similar technique
 POV-Ray's radiosity uses?
> 
No idea. Its not like I can code the idea. lol

Frankly, I kind of wanted either a) that won't work at all, or b) it is 
an interesting idea. A long laundry list about why I could solve the 
same problems with a mess of other features was "not" what I was after. 
As I said, I rethought it several times. Its possible that it isn't 
possible and a totally pointless idea, if I knew enough to realize it. 
Telling me I can "sort of" get the same result I envisioned with other 
stuff or a bit like saying, "You can sort of make a flying car of you 
strap wings and a jet engine on a VW Bug.", without bothering to say why 
using a VW Bug is a better alternative that just building a flying car. 
One good reason might be, "It won't work anyway.", but that's not what I 
ended up with. ;)

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Andrea Reina
Subject: Re: Had a thought..
Date: 9 Jul 2006 04:50:00
Message: <web.44b0c2812a037f6269bcdf780@news.povray.org>
Patrick Elliott <sel### [at] rraznet> wrote:
> In article <44a85af5$1@news.povray.org>, zeg### [at] povplacecom
> says...
> > "Patrick Elliott" <sel### [at] rraznet> wrote in message news:MPG.1f1092509c
> 9cfad9989f32@news.povray.org...
> > > Yeah, I know you can use Radiosity. I was thinking in terms of what
> > > might work "without" that.
> >
> > how would you do what you describe without using a very similar technique
>  POV-Ray's radiosity uses?
> >
> No idea. Its not like I can code the idea. lol
>
> Frankly, I kind of wanted either a) that won't work at all, or b) it is
> an interesting idea. A long laundry list about why I could solve the
> same problems with a mess of other features was "not" what I was after.
> As I said, I rethought it several times. Its possible that it isn't
> possible and a totally pointless idea, if I knew enough to realize it.
> Telling me I can "sort of" get the same result I envisioned with other
> stuff or a bit like saying, "You can sort of make a flying car of you
> strap wings and a jet engine on a VW Bug.", without bothering to say why
> using a VW Bug is a better alternative that just building a flying car.
> One good reason might be, "It won't work anyway.", but that's not what I
> ended up with. ;)
>
> --
> void main () {

>     call functional_code()
>   else
>     call crash_windows();
> }

The responses you got are what they are because that's simply what's
possible, and what's effective. You can't put a light-source in the
sky_sphere because it isn't an object, but an abstraction. Like background,
it's not really there, but is something added if the ray doesn't hit an
object. Light sources need _some_ positional parameter, and a sky_sphere,
despite accepting the same pigment_map function that other objects do,
doesn't provide that.

You were told that the best way to get the low-key lighting from the sky was
to use radiosity, but you rejected that. It's resource-intensive, fair
enough. Would have been good if you had said that, instead of just no, I
don't want it. You're asking people to give you advice for free, if you're
going to reject it openly, at least tell us why.

Then it was suggested that you use a low-intensity shadowless light source
instead, but you rejected that idea too, saying you were looking for
something else, when what you said was just what was suggested. That low
intensity beyond the cut-off that you were asking for, that's what a
shadowless light source is. If you're still dead-set on using sky_sphere to
simulate the appearance of the sun, give it an x-gradient with yellow (or
white if you prefer) from say 0.9 to 1.0, make the rest of it blue, then
rotate it -45*x. Play with the starting point of the white til you get the
size you want. I'm assuming you're looking in the z direction, btw. If not,
adjust the rotation accordingly.

Please know what you're asking for. You asked for a flying car, and you were
told *both* the VW bug and build it answer, but you ignored them both.

Andrea


Post a reply to this message

From: Patrick Elliott
Subject: Re: Had a thought..
Date: 9 Jul 2006 15:34:13
Message: <MPG.1f1b0937b6ae8bab989f40@news.povray.org>
In article <web.44b0c2812a037f6269bcdf780@news.povray.org>, 
nomail@nomail says...
> Patrick Elliott <sel### [at] rraznet> wrote:
> > In article <44a85af5$1@news.povray.org>, zeg### [at] povplacecom
> > says...
> > > "Patrick Elliott" <sel### [at] rraznet> wrote in message news:MPG.1f1092
509c
> > 9cfad9989f32@news.povray.org...
> > > > Yeah, I know you can use Radiosity. I was thinking in terms of what
> > > > might work "without" that.
> > >
> > > how would you do what you describe without using a very similar techn
ique
> >  POV-Ray's radiosity uses?
> > >
> > No idea. Its not like I can code the idea. lol
> >
> > Frankly, I kind of wanted either a) that won't work at all, or b) it is
> > an interesting idea. A long laundry list about why I could solve the
> > same problems with a mess of other features was "not" what I was after.
> > As I said, I rethought it several times. Its possible that it isn't
> > possible and a totally pointless idea, if I knew enough to realize it.
> > Telling me I can "sort of" get the same result I envisioned with other
> > stuff or a bit like saying, "You can sort of make a flying car of you
> > strap wings and a jet engine on a VW Bug.", without bothering to say wh
y
> > using a VW Bug is a better alternative that just building a flying car.
> > One good reason might be, "It won't work anyway.", but that's not what 
I
> > ended up with. ;)
> >
> > --
> > void main () {

> >     call functional_code()
> >   else
> >     call crash_windows();
> > }
> 
> The responses you got are what they are because that's simply what's
> possible, and what's effective. You can't put a light-source in the
> sky_sphere because it isn't an object, but an abstraction. Like backgroun
d,
> it's not really there, but is something added if the ray doesn't hit an
> object. Light sources need _some_ positional parameter, and a sky_sphere,
> despite accepting the same pigment_map function that other objects do,
> doesn't provide that.
> 
> You were told that the best way to get the low-key lighting from the sky 
was
> to use radiosity, but you rejected that. It's resource-intensive, fair
> enough. Would have been good if you had said that, instead of just no, I
> don't want it. You're asking people to give you advice for free, if you'r
e
> going to reject it openly, at least tell us why.
> 
> Then it was suggested that you use a low-intensity shadowless light sourc
e
> instead, but you rejected that idea too, saying you were looking for
> something else, when what you said was just what was suggested. That low
> intensity beyond the cut-off that you were asking for, that's what a
> shadowless light source is. If you're still dead-set on using sky_sphere 
to
> simulate the appearance of the sun, give it an x-gradient with yellow (or
> white if you prefer) from say 0.9 to 1.0, make the rest of it blue, then
> rotate it -45*x. Play with the starting point of the white til you get th
e
> size you want. I'm assuming you're looking in the z direction, btw. If no
t,
> adjust the rotation accordingly.
> 
> Please know what you're asking for. You asked for a flying car, and you w
ere
> told *both* the VW bug and build it answer, but you ignored them both.
> 
> Andrea
> 
Actually. I wasn't *asking* for anything. I had an idea. I described it. 
I wanted some input on if it was feasible. If I was asking, "how do you 
do this?", I would have posted it in Advanced users and given some SDL 
showing what I was attempting and why I needed it. I don't **need** 
this. I just thought it might be interesting for someone to try, which 
included the possibility of extending what sky_sphere was actually 
capable of. I am sorry if you thought otherwise and that created some 
confusion as to what I was actually looking for, which was feed back, 
not instructions on how to duplicate the effect.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Kenneth
Subject: Re: Had a thought..
Date: 27 Sep 2006 04:10:00
Message: <web.451a31312a037f62c8438e760@news.povray.org>
"Andrea Reina" <nomail@nomail> wrote:

>
> The responses you got are what they are because that's simply what's
> possible, and what's effective.

No, the responses he got were rather condescending and a kind of "slap
down." I think it's obvious, and I see his point. There's just NO NEED for
some in the POV community to treat others this way. If we all knew the
answers to everything, there would no sense in asking in the first place.
My advice? Treat others as you would want to be treated.  (No "Biblical"
undertones there; none needed.)

Ken W.


Post a reply to this message

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