POV-Ray : Newsgroups : povray.newusers : Killing rays over a certain length : Re: Killing rays over a certain length Server Time
28 Jul 2024 20:29:24 EDT (-0400)
  Re: Killing rays over a certain length  
From: Alain
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

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