POV-Ray : Newsgroups : povray.newusers : Killing rays over a certain length Server Time
28 Jul 2024 18:17:26 EDT (-0400)
  Killing rays over a certain length (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: SharkD
Subject: Re: Killing rays over a certain length
Date: 12 Dec 2008 19:25:00
Message: <web.49430060bd563cd093fa7c500@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> SarkD, bounding box don't work that way. Bounding boxes are used to make ray
> intersection tests with objects more efficient. You test against the list of
> bounding boxes, and, if you hit one, you test the object within.

Sorry, I just kind of read the thread title and skimmed over the rest of the
post.

-Mike


Post a reply to this message

From: clipka
Subject: Re: Killing rays over a certain length
Date: 12 Dec 2008 20:55:01
Message: <web.4943152fbd563cd07c822d860@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> > Explaining why might make my question clearer: some friends and I were
> > discussing what it would look like if you could take a film with a camera so
> > fast that you could watch the progress of light across a room. I want the light
> > to ooze slowly out of the lights and over objects, and so I want to terminate
> > any ray which is longer than a distance ct, where c is the speed of light and t
> > the (short!) time since the start of the film.
>
> I suggested a while back that a "speed_of_light" parameter be added to povray,
> and the response was rather negative due to the required modeling of
> relativity.

I remember an article *somewhere* about relativistic effects with an experiment
someone made with - ta-daaa - a modified version of PoV-ray!

So it must exist somewhere out there already...


The experiment showed the classic 3D-teapot zooming past the camera at about the
speed of light, and the PoV-ray version was tweaked to take speed of light into
account.

Much to the surprise of the readers (and possibly the experimentor as well), the
teapot did *not* look "squished" as is often claimed in popular-science articles
about relativity, but rather *rotated*!


Geez, if only I could remember where that article was! c't maybe (a german
computer technology magazine). I'll try to dig that up.


Post a reply to this message

From: clipka
Subject: Re: Killing rays over a certain length
Date: 12 Dec 2008 21:05:01
Message: <web.49431835bd563cd07c822d860@news.povray.org>
"clipka" <nomail@nomail> wrote:
> Geez, if only I could remember where that article was! c't maybe (a german
> computer technology magazine). I'll try to dig that up.

Got something here (though it's not the original article I remember) on a German
web page for teachers:

http://www.lehrer-online.de/dyn/bin/435242-437415-1-programme_rel_raytracing.zip

The same page (http://www.lehrer-online.de/povray-relativistisch.php) claims
that there is also some Unix version downloadable from some university in
Australia, but that link seems dead.


Post a reply to this message

From: SharkD
Subject: Re: Killing rays over a certain length
Date: 12 Dec 2008 23:15:00
Message: <web.49433602bd563cd0ba2bd12d0@news.povray.org>
"clipka" <nomail@nomail> wrote:
> I remember an article *somewhere* about relativistic effects with an experiment
> someone made with - ta-daaa - a modified version of PoV-ray!
>
> So it must exist somewhere out there already...

I wonder how these modifications impacted performance, or whether they were
limited in such a degree that they were only in use when the designer intended
them to be.

-Mike


Post a reply to this message

From: statto
Subject: Re: Killing rays over a certain length
Date: 13 Dec 2008 11:25:00
Message: <web.4943e127bd563cd0430307c70@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> I think there is a fundamental problem with this approach,
> namely that POV-Ray does not trace from the light sources
> forward but from the eye backwards. So, terminating rays
> doesn't really have the effect of light oozing anywhere.

I don't think that should make any difference, because it would just mean that
rays tracing back from the camera would never make it to a given light source,
and thus that pixel would stay dark. Indeed, as you point out when discussing
light sources with a sharp cut-off fade_distance,

> it is
> however not physically correct because it does not take into
> account the time for the light to travel from the object to
> the camera.

....whereas chopping off rays over a certain length from the camera would do
exactly that.

> Furthermore, you may also need to take into account that
> your film material moves at relativistic speed :-P

I live in a Newtonian universe and plan to use a digital video camera. Which is
definitely not a contradiction.

Is there no way to give fog attenuation an offset, such that brightness fades
exponentially but only after a certain distance if you have a non-zero offset?
If not, how would I make a feature suggestion to that effect?!


Post a reply to this message

From: clipka
Subject: Re: Killing rays over a certain length
Date: 13 Dec 2008 12:50:00
Message: <web.4943f48cbd563cd06c22a54d0@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> "clipka" <nomail@nomail> wrote:
> > I remember an article *somewhere* about relativistic effects with an experiment
> > someone made with - ta-daaa - a modified version of PoV-ray!
> >
> > So it must exist somewhere out there already...
>
> I wonder how these modifications impacted performance, or whether they were
> limited in such a degree that they were only in use when the designer intended
> them to be.
>
> -Mike

I'd expect some transition from 3D-vectors to 4D-vectors, and objects modified
accordinly. That shouldn't impact ray intersection tests too much, and that's
what mainly counts.

I wouldn't want to implement it myself though :)


Post a reply to this message

From: Alain
Subject: Re: Killing rays over a certain length
Date: 13 Dec 2008 15:47:09
Message: <49441f4d$1@news.povray.org>
statto nous illumina en ce 2008-12-11 19:37 -->
> Alain <ele### [at] netscapenet> wrote:
>> statto nous illumina en ce 2008-12-10 07:22 -->
>>> Is there a way to use a fog-like command to kill all rays over a certain length?
>>>
>>> Rather than the exponential decay with length with a normal fog, I would like
>>> any ray over a certain length to be entirely eradicated, and any ray shorter
>>> than that to be transmitted, possibly with a slight fuzziness between these two
>>> extremes.
>>>
>>> Any ideas?
>>>
>>>
>> There is no ready, automated, way to do that. I'm not sure why you want that.
>>
>> What you can do:
>> Enclose your scene within a large sphere centered at the camera. That sphere's
>> radius is set to the distance at whitch you want your rays terminated. Be sure
>> to make it hollow, or use the "inverse" key word, if you want to use some fog.
>>
>> Use one of the background feature, and make sure that there are no object
>> farther than the maximum distance you want. You may put your scene into an
>> union, and intersect it with a large sphere. Anything outside that sphere will
>> be removed.
>>
>>
>> SarkD, bounding box don't work that way. Bounding boxes are used to make ray
>> intersection tests with objects more efficient. You test against the list of
>> bounding boxes, and, if you hit one, you test the object within.
>>
>> --
>> Alain
>> -------------------------------------------------
>> A modest man is usually admired; if people ever hear of him.
> 
> Explaining why might make my question clearer: some friends and I were
> discussing what it would look like if you could take a film with a camera so
> fast that you could watch the progress of light across a room. I want the light
> to ooze slowly out of the lights and over objects, and so I want to terminate
> any ray which is longer than a distance ct, where c is the speed of light and t
> the (short!) time since the start of the film.
> 
> If I understand your union-with-an-inverse-sphere suggestion correctly, it will
> destroy all objects greater than a distance ct from the camera, which is not
> quite the intended effect!
> 
> Perhaps my idea is impossible with POV-Ray...but I thought it would be easier to
> make a computer model than try to do it in real life. ;)
> 
> 
> 
You can't do it as you mention, but you can FAKE it.

This will simulate a VERY brief light burst that will sweep across your scene.
If you want the light front to sweep across the scene, you can do the following:
Place your light_source normaly at a good distance. Make it "parallel"
Now, you play with the FINISH of your scene.
Use a texture_map where you use the planar pattern, and, that pattern will move 
acording to the clock.
The finish diffuse part is zero away from the reference plane, grow to 1 at the 
plane, and drop back to zero on the other side. Diffuse zero don't react to the 
light. Don't use specular nor phong.

Another way, would be the use of two light, one positive, one negative, both 
with a rather large fade_power, maybe in the order of 20 to 50, both will need 
intensities in the 100000's range. You then play with fade_distance by 
progresslively increasing it. The fade distance and power for the negative light 
should be a little lower then that of the positive one.

light_source{10*x, rgb 100000 fade_power 12 fade_distance 10*clock+0.1}
light_source[10*x, rgb -100000 fade_power 10 fade_distance 10*clock+0.001}

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you call in sick in order to render.
David Kraics


Post a reply to this message

From: Leroy Whetstone
Subject: Re: Killing rays over a certain length
Date: 14 Dec 2008 23:55:39
Message: <4945E398.8030208@joplin.com>
This will stop the light from a light source.

  light_source{<0,20,30> color White}
  sphere{<0,20,30>,1+40*Value pigment{Red} hollow no_image}

Change Value to any thing ya want.
It will light only up only things in the sphere so if you want to see
the objects of a scene before the light wave hit use another light.
   Like:
light_source{<0,30,0> color White shadowless}


Post a reply to this message

From: Slime
Subject: Re: Killing rays over a certain length
Date: 15 Dec 2008 01:53:50
Message: <4945fefe$1@news.povray.org>
> Explaining why might make my question clearer: some friends and I were
> discussing what it would look like if you could take a film with a camera 
> so
> fast that you could watch the progress of light across a room. I want the 
> light
> to ooze slowly out of the lights and over objects, and so I want to 
> terminate
> any ray which is longer than a distance ct, where c is the speed of light 
> and t
> the (short!) time since the start of the film.

If you want to accurately simulate the speed of light, you want surfaces to 
remain dark until enough time has passed for light to travel the distance 
from the light source to the object, and then to the camera.

So, for any point in 3D space, the time until that point should be visible 
is proportional to distance(point, light) + distance(point, camera). You can 
make a function{} that calculates this value. Then, make a texture that uses 
that function to display white where it is less than a certain threshold, 
and black otherwise. If you apply that texture to all objects in the scene, 
and change the threshold over time with the 'clock' variable, you can make 
an animation where the lit parts of the scene are shown in white.

Then, it should be possible to take that video and use it as a mask for the 
original, normally textured image. This could be done in POV-Ray with some 
texture/function cleverness or just in a third party video editor.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Reactor
Subject: Re: Killing rays over a certain length
Date: 15 Dec 2008 04:20:00
Message: <web.494620d9bd563cd08d64a2c00@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote:
> > Explaining why might make my question clearer: some friends and I were
> > discussing what it would look like if you could take a film with a camera
> > so
> > fast that you could watch the progress of light across a room. I want the
> > light
> > to ooze slowly out of the lights and over objects, and so I want to
> > terminate
> > any ray which is longer than a distance ct, where c is the speed of light
> > and t
> > the (short!) time since the start of the film.
>
> If you want to accurately simulate the speed of light, you want surfaces to
> remain dark until enough time has passed for light to travel the distance
> from the light source to the object, and then to the camera.
>
> So, for any point in 3D space, the time until that point should be visible
> is proportional to distance(point, light) + distance(point, camera). You can
> make a function{} that calculates this value. Then, make a texture that uses
> that function to display white where it is less than a certain threshold,
> and black otherwise. If you apply that texture to all objects in the scene,
> and change the threshold over time with the 'clock' variable, you can make
> an animation where the lit parts of the scene are shown in white.
>
> Then, it should be possible to take that video and use it as a mask for the
> original, normally textured image. This could be done in POV-Ray with some
> texture/function cleverness or just in a third party video editor.
>
>  - Slime
>  [ http://www.slimeland.com/ ]

Sounds pretty, good, but one could also multiply that pigment with existing
scene pigments.  That way, the white parts will leave the original pigment
unaffected, whereas the black bits will cancel it out.

Or something.

-Reactor


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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