POV-Ray : Newsgroups : povray.general : Scattering media and photons Server Time
16 Nov 2024 05:17:26 EST (-0500)
  Scattering media and photons (Message 1 to 10 of 21)  
Goto Latest 10 Messages Next 10 Messages >>>
From: IMBJR
Subject: Scattering media and photons
Date: 11 Mar 2004 18:43:52
Message: <ocu150drt8hccnsd7lv4g5m160hohfsh9u@4ax.com>
Well, I've got a sort of laser beam being generated in a scattering
medium so you can see the beam.

I want to be able to reflect the beam off of something, so I added the
necessary photon clauses. 

However, one sees the beam as it comes out of the little laser gun
that is used to contain the light source, sees it in the medium as it
makes it way, sees it hit the object its designed to hit and that's
it. There are no visible light beams being reflected. Yet, if I tilt
the object, it correctly casts its caustics onto a background plane.

If I'm reading the documentation correctly this should work. Is there
anything obviously wrong I'm doing from my description of it, or
should I post the script to the appropriate group?

--------------------------------
My First Subgenius Picture Book:
http://www.imbjr.com


Post a reply to this message

From: Slime
Subject: Re: Scattering media and photons
Date: 12 Mar 2004 01:04:05
Message: <405152d5@news.povray.org>
> I want to be able to reflect the beam off of something, so I added the
> necessary photon clauses.

Are you using media photons?

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


Post a reply to this message

From: IMBJR
Subject: Re: Scattering media and photons
Date: 12 Mar 2004 14:50:06
Message: <o954509i1fievc4qpbsmk1ln4pr6mfs8q6@4ax.com>
On Fri, 12 Mar 2004 01:01:45 -0500, "Slime" <slm### [at] slimelandcom> wrote:

>> I want to be able to reflect the beam off of something, so I added the
>> necessary photon clauses.
>
>Are you using media photons?

If you mean am I using the media statement in the global photon
declaration then yes - see the attached scene file.

Hopefully, someone will be able to slap me on the forehead and tweak
me on the nose for doing something stupid in this code.

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

--------------------------------
My First Subgenius Picture Book:
http://www.imbjr.com


Post a reply to this message


Attachments:
Download 'reflectos.pov.txt' (4 KB)

From: IMBJR
Subject: Re: Scattering media and photons
Date: 12 Mar 2004 14:54:30
Message: <cd5450p159oeei9vd9e1iglj84721scvjk@4ax.com>
On Fri, 12 Mar 2004 01:01:45 -0500, "Slime" <slm### [at] slimelandcom> wrote:

>> I want to be able to reflect the beam off of something, so I added the
>> necessary photon clauses.
>
>Are you using media photons?
>
> - Slime
>[ http://www.slimeland.com/ ]
>

PS. If anyone can tell me a better way of producing a beam of light I
am open to suggestions.

Currently, I've a cylinder of light in a box with a transparent sphere
cut out of it. The problem is that the documentation implies that the
rays are not parallel so I've not got what I would have thought was a
truer model of a laser beam. Notice in the code that the box is quite
big - that's because I can't seem to get the diameter of the beam any
smaller - and that's why I'm using this box get-up, to be able to
narrow the beam. I tried a parallel light, but the light comes from
the entire plane specified, and so that will not give me a single beam
of light out of box. I tried looks_like (with a small sphere) on the
cylinder and parallel light options and neither wored.


--------------------------------
My First Subgenius Picture Book:
http://www.imbjr.com


Post a reply to this message

From: Slime
Subject: Re: Scattering media and photons
Date: 12 Mar 2004 23:20:40
Message: <40528c18@news.povray.org>
> Currently, I've a cylinder of light

Hmm, I vaguely remember other people having troubles with cylinder lights
and photons... but I don't remember what the solutions were.

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


Post a reply to this message

From: IMBJR
Subject: Re: Scattering media and photons
Date: 13 Mar 2004 10:53:58
Message: <btb650tm5bqmehlv463uie51em8g1ke70n@4ax.com>
On Fri, 12 Mar 2004 23:18:50 -0500, "Slime" <slm### [at] slimelandcom> wrote:

>> Currently, I've a cylinder of light
>
>Hmm, I vaguely remember other people having troubles with cylinder lights
>and photons... but I don't remember what the solutions were.

LOL

Cheers, that fills me with hope!

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

--------------------------------
My First Subgenius Picture Book:
http://www.imbjr.com


Post a reply to this message

From: Phil Cook
Subject: Re: Scattering media and photons
Date: 15 Mar 2004 04:29:49
Message: <opr4wcqgeqp4ukzs@news.povray.org>
On Sat, 13 Mar 2004 15:58:50 +0000, IMBJR <no### [at] spamhere> wrote:

> On Fri, 12 Mar 2004 23:18:50 -0500, "Slime" <slm### [at] slimelandcom> wrote:
>
>>> Currently, I've a cylinder of light
>>
>> Hmm, I vaguely remember other people having troubles with cylinder 
>> lights
>> and photons... but I don't remember what the solutions were.
>
> LOL
>
> Cheers, that fills me with hope!
>
>>
>> - Slime
>> [ http://www.slimeland.com/ ]
>>

Hopefully you won't object to comments from a newbie, but as I've been 
messing with this sort of thing I may know what's happening.
The parallel light source beam diameter seems to be controlled by the 
tightness keyword, as for reflecting the light beam off a reflected 
surface; it doesn't.
As they say a picture is worth a thousand words;

//code
global_settings {

photons {
count 20000
media 200
autostop 0
jitter .4
}
}

#declare LightReflector=
prism{0,6,4
<3,0>,<3,-3>,<0,-3><3,0>}

media{
scattering{1,rgb 0.01}
}

light_source{<1.5,3,50>, rgb <100,0,0> cylinder point_at<1.5,3,-10>
tightness 0.3
media_attenuation on
media_interaction on
}

camera{
location<1.5,20,-1.5>
look_at<1.5,0,-1.5>
/*location <-5,3,-1.5>
look_at <10,3,-1.5>*/
}

object{LightReflector hollow
photons{
target
reflection on
}
pigment{rgb 0.85}
finish{reflection {1.0} ambient 1 diffuse 0}
}

sphere{0,0.2 pigment{rgb 0.8} finish{ambient 0} translate <1.5,3,0.5>}
sphere{0,0.2 pigment{rgb 0.8} finish{ambient 1} translate <2,5,0.5>}
//end code

As you can see from the top view the light beam isn't reflected, but if 
you switch to the other camera view the white sphere is reflected in the 
prism. The only way round this I think is to point a cylinder light where 
the beam should reflect.

Hope this helps

Phil

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: IMBJR
Subject: Re: Scattering media and photons
Date: 15 Mar 2004 16:14:34
Message: <8d7c50t9lui77r465c5efdlhv8am482jmk@4ax.com>
On Mon, 15 Mar 2004 09:31:18 -0000, Phil Cook
<phi### [at] nospamdeckingdealscouk> wrote:

>On Sat, 13 Mar 2004 15:58:50 +0000, IMBJR <no### [at] spamhere> wrote:
>
>> On Fri, 12 Mar 2004 23:18:50 -0500, "Slime" <slm### [at] slimelandcom> wrote:
>>
>>>> Currently, I've a cylinder of light
>>>
>>> Hmm, I vaguely remember other people having troubles with cylinder 
>>> lights
>>> and photons... but I don't remember what the solutions were.
>>
>> LOL
>>
>> Cheers, that fills me with hope!
>>
>>>
>>> - Slime
>>> [ http://www.slimeland.com/ ]
>>>
>
>Hopefully you won't object to comments from a newbie, but as I've been 
>messing with this sort of thing I may know what's happening.
>The parallel light source beam diameter seems to be controlled by the 
>tightness keyword, as for reflecting the light beam off a reflected 
>surface; it doesn't.
>As they say a picture is worth a thousand words;
>
>//code
>global_settings {
>
>photons {
>count 20000
>media 200
>autostop 0
>jitter .4
>}
>}
>
>#declare LightReflector=
>prism{0,6,4
><3,0>,<3,-3>,<0,-3><3,0>}
>
>media{
>scattering{1,rgb 0.01}
>}
>
>light_source{<1.5,3,50>, rgb <100,0,0> cylinder point_at<1.5,3,-10>
>tightness 0.3
>media_attenuation on
>media_interaction on
>}
>
>camera{
>location<1.5,20,-1.5>
>look_at<1.5,0,-1.5>
>/*location <-5,3,-1.5>
>look_at <10,3,-1.5>*/
>}
>
>object{LightReflector hollow
>photons{
>target
>reflection on
>}
>pigment{rgb 0.85}
>finish{reflection {1.0} ambient 1 diffuse 0}
>}
>
>sphere{0,0.2 pigment{rgb 0.8} finish{ambient 0} translate <1.5,3,0.5>}
>sphere{0,0.2 pigment{rgb 0.8} finish{ambient 1} translate <2,5,0.5>}
>//end code
>
>As you can see from the top view the light beam isn't reflected, but if 
>you switch to the other camera view the white sphere is reflected in the 
>prism. The only way round this I think is to point a cylinder light where 
>the beam should reflect.
>
>Hope this helps

Interesting. I've had a play with your scene and still can't see why
this does not work. After all I'm sure the documentation does talk
about photons being trapped/held/sampled in media.

>
>Phil

--------------------------------
My First Subgenius Picture Book:
http://www.imbjr.com


Post a reply to this message

From: Phil Cook
Subject: Re: Scattering media and photons
Date: 16 Mar 2004 05:01:23
Message: <opr4x8vnzup4ukzs@news.povray.org>
On Mon, 15 Mar 2004 21:19:25 +0000, IMBJR <no### [at] spamhere> wrote:

> On Mon, 15 Mar 2004 09:31:18 -0000, Phil Cook
> <phi### [at] nospamdeckingdealscouk> wrote:
>
>> On Sat, 13 Mar 2004 15:58:50 +0000, IMBJR <no### [at] spamhere> wrote:
>>
>>> On Fri, 12 Mar 2004 23:18:50 -0500, "Slime" <slm### [at] slimelandcom> wrote:
>>>
>>>>> Currently, I've a cylinder of light
>>>>
>>>> Hmm, I vaguely remember other people having troubles with cylinder
>>>> lights
>>>> and photons... but I don't remember what the solutions were.
>>>
>>> LOL
>>>
>>> Cheers, that fills me with hope!
>>>
>>>>
>>>> - Slime
>>>> [ http://www.slimeland.com/ ]
>>>>
>>
>> Hopefully you won't object to comments from a newbie, but as I've been
>> messing with this sort of thing I may know what's happening.
>> The parallel light source beam diameter seems to be controlled by the
>> tightness keyword, as for reflecting the light beam off a reflected
>> surface; it doesn't.
>> As they say a picture is worth a thousand words;
>>
<snip code>
>>
>> As you can see from the top view the light beam isn't reflected, but if
>> you switch to the other camera view the white sphere is reflected in the
>> prism. The only way round this I think is to point a cylinder light 
>> where
>> the beam should reflect.
>>
>> Hope this helps
>
> Interesting. I've had a play with your scene and still can't see why
> this does not work. After all I'm sure the documentation does talk
> about photons being trapped/held/sampled in media.

Yeah I've fiddled with it at lot too, add a new camera at:

location <10,7,3>
look_at <-10,3,3>

add a box at:

box{0,<-10,10,-100> rotate y*22.5 translate <-10,0,10> pigment {rgb 0.8} 
finish{reflection {1.0} ambient 0.5 diffuse 1}}

then switch the LightReflector to ambient 0.5 diffuse 1

you can see that the light beam is being calculated as there is a patch on 
the box however note the lack of a shadow from the first sphere which 
should appear in the middle of it, also note the lack of the reflected 
shadow in the box part which is showing the reflection of the 
LightReflector.

So unless there's something I'm missing it appears POV-Ray can't do this 
sort of thing with media.

--
Phil

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: IMBJR
Subject: Re: Scattering media and photons
Date: 16 Mar 2004 15:37:41
Message: <7jpe50ttstqe6gvdasidg304fdv24u2h2r@4ax.com>
On Tue, 16 Mar 2004 10:03:13 -0000, Phil Cook
<phi### [at] nospamdeckingdealscouk> wrote:

>On Mon, 15 Mar 2004 21:19:25 +0000, IMBJR <no### [at] spamhere> wrote:
>
>> On Mon, 15 Mar 2004 09:31:18 -0000, Phil Cook
>> <phi### [at] nospamdeckingdealscouk> wrote:
>>
>>> On Sat, 13 Mar 2004 15:58:50 +0000, IMBJR <no### [at] spamhere> wrote:
>>>
>>>> On Fri, 12 Mar 2004 23:18:50 -0500, "Slime" <slm### [at] slimelandcom> wrote:
>>>>
>>>>>> Currently, I've a cylinder of light
>>>>>
>>>>> Hmm, I vaguely remember other people having troubles with cylinder
>>>>> lights
>>>>> and photons... but I don't remember what the solutions were.
>>>>
>>>> LOL
>>>>
>>>> Cheers, that fills me with hope!
>>>>
>>>>>
>>>>> - Slime
>>>>> [ http://www.slimeland.com/ ]
>>>>>
>>>
>>> Hopefully you won't object to comments from a newbie, but as I've been
>>> messing with this sort of thing I may know what's happening.
>>> The parallel light source beam diameter seems to be controlled by the
>>> tightness keyword, as for reflecting the light beam off a reflected
>>> surface; it doesn't.
>>> As they say a picture is worth a thousand words;
>>>
><snip code>
>>>
>>> As you can see from the top view the light beam isn't reflected, but if
>>> you switch to the other camera view the white sphere is reflected in the
>>> prism. The only way round this I think is to point a cylinder light 
>>> where
>>> the beam should reflect.
>>>
>>> Hope this helps
>>
>> Interesting. I've had a play with your scene and still can't see why
>> this does not work. After all I'm sure the documentation does talk
>> about photons being trapped/held/sampled in media.
>
>Yeah I've fiddled with it at lot too, add a new camera at:
>
>location <10,7,3>
>look_at <-10,3,3>
>
>add a box at:
>
>box{0,<-10,10,-100> rotate y*22.5 translate <-10,0,10> pigment {rgb 0.8} 
>finish{reflection {1.0} ambient 0.5 diffuse 1}}
>
>then switch the LightReflector to ambient 0.5 diffuse 1
>
>you can see that the light beam is being calculated as there is a patch on 
>the box however note the lack of a shadow from the first sphere which 
>should appear in the middle of it, also note the lack of the reflected 
>shadow in the box part which is showing the reflection of the 
>LightReflector.
>
>So unless there's something I'm missing it appears POV-Ray can't do this 
>sort of thing with media.

How odd. Unless I'm misreading the documentation, we should be able to
do this. I'm sure I've see a classic Dark Side Of The Moon prism with
refracted beam done in POV. I can't see why reflections should be any
different.

>
>--
>Phil

--------------------------------
My First Subgenius Picture Book:
http://www.imbjr.com


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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