POV-Ray : Newsgroups : povray.general : Light inside diff, atmospheric scatter, no scatter? Server Time
5 Nov 2024 20:17:27 EST (-0500)
  Light inside diff, atmospheric scatter, no scatter? (Message 1 to 4 of 4)  
From: Yann Ramin
Subject: Light inside diff, atmospheric scatter, no scatter?
Date: 23 Feb 2003 05:03:19
Message: <3e589c67@news.povray.org>
I placed a light inside a subtracted series of spheres (the sphere no longer 
has an inside, and has slits cut in it - light can exit the sphere). I'm 
expecting there to be scattered light when leaving the sphere, yet I am 
seeing none. No media seems to work while the light is inside the sphere. 
Media will work once the light leaves the sphere. Is there any way around 
this problem?

(please also reply to e-mail, thank you)

Yann


#declare SphereCutout = difference {
        sphere { <0,0,0>,1 }
        box { <-.1,-2,-2>,
                <.1, 2, 2>
        }
}

#declare SphereCutout2 = difference {
        object { SphereCutout }
        box { <-.1,-2,-2>,
                <.1, 2, 2>
                rotate z*90
        }
}

#declare SphereShell = difference {
        object { SphereCutout2 }
        sphere { <0,0,0>,0.95 }
}

object { SphereShell }


media {
                scattering {1, 0.3 }
                samples 10
                method 3
        }

light_source {
        <0,0,0>
        color rgb 1
        media_interaction on
        media_attenuation on
}


Post a reply to this message

From: Micha Riser
Subject: Re: Light inside diff, atmospheric scatter, no scatter?
Date: 23 Feb 2003 06:46:08
Message: <3e58b480@news.povray.org>
POV global media does not work if the rays go into infinity. You either have 
to use a media container or put a object into the scene where all rays hit, 
like e.g. 
 sphere{0,100 hollow}

> 
> 
> #declare SphereCutout = difference {
>         sphere { <0,0,0>,1 }
>         box { <-.1,-2,-2>,
<snip>

You can construct this CSG object more compactly: 
#declare SphereShell = intersection{
        sphere { <0,0,0>,1 }    
        box { <-.1,-2,-2>,<.1, 2, 2> inverse}
        box { <-.1,-2,-2>,<.1, 2, 2> rotate z*90 inverse}
        sphere { <0,0,0>,0.95 inverse}
}

Also 10 samples won't be enough to get a nice picture in this case.

- Micha

-- 
POV-Ray Objects Collection: http://objects.povworld.org


Post a reply to this message

From: hughes, b 
Subject: Re: Light inside diff, atmospheric scatter, no scatter?
Date: 23 Feb 2003 07:15:14
Message: <3e58bb52@news.povray.org>
"Micha Riser" <mri### [at] gmxnet> wrote in message
news:3e58b480@news.povray.org...
>
> POV global media does not work if the rays go into infinity. You either
have
> to use a media container or put a object into the scene where all rays
hit,
> like e.g.
>  sphere{0,100 hollow}

And like Micha has said, the samples really matter too. I was checking on
this also and then added Micha's condensed version of that object.

#declare SphereShell = intersection{
        sphere { <0,0,0>,1 }
        box { <-.1,-2,-2>,<.1, 2, 2> rotate z*90 inverse}
        box { <-.1,-2,-2>,<.1, 2, 2> inverse}
        sphere { <0,0,0>,0.95 inverse}
        pigment {rgb 0}
}

SphereShell

// container to prevent infinite media dropout
sphere {0,20
pigment {rgbt 1}
interior {
    media {
                intervals 1
                samples 150, 300 // too low is fragmented
                method 3
                scattering {1, 0.3 extinction 0.1}
        }
    }
 hollow
}

light_source {
        <0,0,0>,
        color rgb 10 // I know, it's very bright to help media show up
        media_interaction on
        media_attenuation on
        fade_distance 1 // the reason for the bright light, fading used here
        fade_power 2
}

camera {location <10,10,-10> angle 30 look_at 0}


Post a reply to this message

From: Yann Ramin
Subject: Re: Light inside diff, atmospheric scatter, no scatter?
Date: 23 Feb 2003 20:46:29
Message: <3e597974@news.povray.org>
Thanks for all the help! I got the image to work, although I thought your 
light setting of 10 was very bright...

I posted the image in the binaries group if you're interested.


hughes, b. wrote:

> "Micha Riser" <mri### [at] gmxnet> wrote in message
> news:3e58b480@news.povray.org...
>>
>> POV global media does not work if the rays go into infinity. You either
> have
>> to use a media container or put a object into the scene where all rays
> hit,
>> like e.g.
>>  sphere{0,100 hollow}
> 
> And like Micha has said, the samples really matter too. I was checking on
> this also and then added Micha's condensed version of that object.
> 
> #declare SphereShell = intersection{
>         sphere { <0,0,0>,1 }
>         box { <-.1,-2,-2>,<.1, 2, 2> rotate z*90 inverse}
>         box { <-.1,-2,-2>,<.1, 2, 2> inverse}
>         sphere { <0,0,0>,0.95 inverse}
>         pigment {rgb 0}
> }
> 
> SphereShell
> 
> // container to prevent infinite media dropout
> sphere {0,20
> pigment {rgbt 1}
> interior {
>     media {
>                 intervals 1
>                 samples 150, 300 // too low is fragmented
>                 method 3
>                 scattering {1, 0.3 extinction 0.1}
>         }
>     }
>  hollow
> }
> 
> light_source {
>         <0,0,0>,
>         color rgb 10 // I know, it's very bright to help media show up
>         media_interaction on
>         media_attenuation on
>         fade_distance 1 // the reason for the bright light, fading used
>         here fade_power 2
> }
> 
> camera {location <10,10,-10> angle 30 look_at 0}


Post a reply to this message

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