POV-Ray : Newsgroups : povray.general : Light inside a sphere filled with small holes Server Time
31 Oct 2024 14:10:31 EDT (-0400)
  Light inside a sphere filled with small holes (Message 1 to 4 of 4)  
From: Paul
Subject: Light inside a sphere filled with small holes
Date: 27 Feb 2000 12:11:48
Message: <38b95ad4@news.povray.org>
Thanks to everyone who has helped me out so far with all my questions, and
especially to Ken for guiding a relative newcomer to the newsgroup and to
POV-Ray!

This is something that i've been trying to do on my own for a few weeks now,
but I just can't seem to get anywhere with it. Hopefully someone out there
can help.

Firstly I want to created a hollow sphere that is filled with small holes. I
imagine it looking like it's been sprayed with gunfire.

Next I want to place a light source inside the sphere so that the light
shines out through the holes and creates narrow beams of light, perhaps
making use of some mist or fog.

I would also like to animate the scene with a camera flying around the
object. It would also be useful if the light source could be switched off at
the start of the animation and then about 1/3 of the way through the
animation suddenly increase from a low glow to a really bright light.

I know it's a lot to ask for and that there are many issues to consider, but
i'd be really appreciative of any comments, source code or advise anyone
has,

Please e-mail any files to me if possible (or reply to this posting of
course!)

Thanks
Paul


Post a reply to this message

From: Chris Huff
Subject: Re: Light inside a sphere filled with small holes
Date: 27 Feb 2000 12:54:56
Message: <chrishuff_99-A750BB.12562527022000@news.povray.org>
In article <38b95ad4@news.povray.org>, "Paul" <ran### [at] freenetcouk> 
wrote:

> Firstly I want to created a hollow sphere that is filled with small 
> holes. I imagine it looking like it's been sprayed with gunfire.
> 
> Next I want to place a light source inside the sphere so that the light
> shines out through the holes and creates narrow beams of light, perhaps
> making use of some mist or fog.

Well, you could use a clipping shape to make the holes, or use CSG with 
a transparent texture for the pieces being cut out. Like this:
difference {
    sphere {<0,0,0>,1 texture {SphereTex}}
    cylinder {<-1.1,0,0>, < 1.1,0,0>,0.1
        pigment {color rgbf <1,1,1,1>}
    }
}

To make the light beams visible, you need to use media. This can be slow 
though, you might want to check out MegaPOV, which has some speed 
enhancing features for media.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: David Curtis
Subject: Re: Light inside a sphere filled with small holes
Date: 27 Feb 2000 14:08:54
Message: <38b97646@news.povray.org>
In article <38b95ad4@news.povray.org>, "Paul" <ran### [at] freenetcouk> wrote:
>Firstly I want to created a hollow sphere that is filled with small holes. I
>imagine it looking like it's been sprayed with gunfire.
>
>Next I want to place a light source inside the sphere so that the light
>shines out through the holes and creates narrow beams of light, perhaps
>making use of some mist or fog.
>

I've been recently playing with this code. Should be a good starting point. 
The transmit holes in the color_map render quicker than with using CSG to cut 
the holes out.

camera {
        location <0, 2, -5>
        look_at <0, 0, 0>
}

light_source { <0, 0, 0> color rgb 2 }
light_source { <10, 10, -10> color rgb 0.25 }

sphere { <0,0,0>, 1 
        pigment { 
                leopard 
                color_map { 
                        [ 0.0 color rgbt <0.3, 0.3, 0.8, 0.25> ]
                        [ 0.7 color rgbt <0.3, 0.3, 0.8, 0.25> ]
                        [ 0.7 color rgbt <0.3, 0.3, 0.8, 1.0> ]
                        [ 1.0 color rgbt <0.3, 0.3, 0.8, 1.0> ]
                }
                scale 0.0625
        }
        rotate <0, clock*45, 0>
}

plane { y, -2 pigment { color rgb 1 } hollow }
plane { z, 2 pigment { color rgb 1 } hollow }

#declare m = 1;
#if (m)
        media {
          //intervals 10
          //samples 10,15
          //confidence 0.9999
          //variance 1/1000
          //ratio 0.9
                absorption rgb <0.07, 0.07, 0.03>
                scattering { 1, rgb 0.1 extinction 0.1 }
        }
#end


Post a reply to this message

From: Bob Hughes
Subject: Re: Light inside a sphere filled with small holes
Date: 27 Feb 2000 15:58:45
Message: <38b99005@news.povray.org>
What you want to use for the light changes would be ClockMod.inc by Chris
Colefax.  I'm guessing you already went and got that.  All you do is declare a
'start_clock' and 'finish_clock' with a 'clock_type' ("S" might be good) then
include the clockmod.inc and use 'mclock' in place of 'clock'.
As Chris H. and David C. have suggested you will need to use 'media' since fog
isn't going to show light and shadow.

Bob

"Paul" <ran### [at] freenetcouk> wrote in message news:38b95ad4@news.povray.org...
| Thanks to everyone who has helped me out so far with all my questions, and
| especially to Ken for guiding a relative newcomer to the newsgroup and to
| POV-Ray!
|
| This is something that i've been trying to do on my own for a few weeks now,
| but I just can't seem to get anywhere with it. Hopefully someone out there
| can help.
|
| Firstly I want to created a hollow sphere that is filled with small holes. I
| imagine it looking like it's been sprayed with gunfire.
|
| Next I want to place a light source inside the sphere so that the light
| shines out through the holes and creates narrow beams of light, perhaps
| making use of some mist or fog.
|
| I would also like to animate the scene with a camera flying around the
| object. It would also be useful if the light source could be switched off at
| the start of the animation and then about 1/3 of the way through the
| animation suddenly increase from a low glow to a really bright light.
|
| I know it's a lot to ask for and that there are many issues to consider, but
| i'd be really appreciative of any comments, source code or advise anyone
| has,
|
| Please e-mail any files to me if possible (or reply to this posting of
| course!)
|
| Thanks
| Paul
|
|


Post a reply to this message

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