|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi there,
Does anyone have suggestions for generating a night sky with stars? A big
spehere with random holes punched through it? :) I obviously can't use
light to illuminate a sky_sphere.
Yann
--
--------------------------------------------------------------------
Yann Ramin atr### [at] atrustrivalieeuorg
Atrus Trivalie Productions www.redshift.com/~yramin
Monterey High IT www.montereyhigh.com
AIM oddatrus
Marina, CA
IRM Developer Network Toaster Developer
SNTS Developer KLevel Developer
--------------------------------------------------------------------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Yann Ramin" <atr### [at] atrustrivalieeuorg> wrote in message
news:39d2d4cd@news.povray.org...
|
| Does anyone have suggestions for generating a night sky with stars? A big
| spehere with random holes punched through it? :) I obviously can't use
| light to illuminate a sky_sphere.
Easiest thing to do is use the star texture on a sky_sphere, it's in the
texture.inc file which comes with POV. In MegaPov there's a post process
kind too.
Second easiest would be to use the galaxy.inc from Chris Colefax, or one of
the others people have done already. There is one which mimics the true
stellar sky using Hubble data I believe.
I can't go looking much now for specific ones but at:
http://www.btinternet.com/~consty/render/render_f.htm
go to the Utilities then POV files and there'll be both a link to Chris
Colefax's site and a 3D Starfield file.
Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
and turn up up the ambient in its the finish{} statement to make the stars
light up (with radiosity turned on these can practically become light
sources).
--
Dan D.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Bob Hughes wrote:
>
> "Yann Ramin" <atr### [at] atrustrivalieeuorg> wrote in message
> news:39d2d4cd@news.povray.org...
> |
> | Does anyone have suggestions for generating a night sky with stars? A big
> | spehere with random holes punched through it? :) I obviously can't use
> | light to illuminate a sky_sphere.
>
> Easiest thing to do is use the star texture on a sky_sphere, it's in the
> texture.inc file which comes with POV. In MegaPov there's a post process
> kind too.
Post processing is better, because you don't have problems with
antialiasing, which usualy eats all stars ;-).
> Second easiest would be to use the galaxy.inc from Chris Colefax, or one of
> the others people have done already. There is one which mimics the true
> stellar sky using Hubble data I believe.
> I can't go looking much now for specific ones but at:
> http://www.btinternet.com/~consty/render/render_f.htm
> go to the Utilities then POV files and there'll be both a link to Chris
> Colefax's site and a 3D Starfield file.
>
> Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ddombrow wrote:
>
> and turn up up the ambient in its the finish{} statement to make the stars
> light up (with radiosity turned on these can practically become light
> sources).
I think, that they are too small for it...
Disnel
>
> --
> Dan D.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Yann Ramin <atr### [at] atrustrivalieeuorg> wrote in message
news:39d2d4cd@news.povray.org...
> Hi there,
>
> Does anyone have suggestions for generating a night sky with stars? A big
> spehere with random holes punched through it? :) I obviously can't use
> light to illuminate a sky_sphere.
>
I generally use some version of the following
#declare StarNo=0;
#declare rndPos=seed(8932)
#while (StarNo<1000) // change value for more or less stars
sphere {
<1000,0,0>,1 // change numbers according to scale of scene
texture {
pigment {rgb 1}
finish {ambient 0.9}
}
rotate <360*rand(rndPos),360*rand(rndPos),360*rand(rndPos)>
}
#declare StarNo=StarNo+1
#end
Gail
********************************************************************
* gsh### [at] monotixcoza * System.dat not found. *
* http://www.rucus.ru.ac.za/~gail/ * Reformat hard drive Y)es O)k *
********************************************************************
* If at first you don't succeed, call it version 1.0 *
********************************************************************
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Gail Shaw <gsh### [at] monotixcoza> wrote:
: sphere {
: <1000,0,0>,1 // change numbers according to scale of scene
: rotate <360*rand(rndPos),360*rand(rndPos),360*rand(rndPos)>
This has two main problems.
Firstly, the sphere is located in the x-axis (at <1000,0,0>), so the
first rotation (which is around the x-axis) will have no effect.
Secondly, rotating an evenly random angle around the y-axis and then
an evenly random angle around the z-axis has an undesired effect: You
will have more stars near the y-axis (ie. around <0,1000,0>) than near
the x-z plane.
That is, the stars are not evenly scattered around the sky but there are
more stars directly "up" than near the "horizon".
If you want an even distribution of stars you have to use a bit more
complicated algorithm. For example:
1) Calculate a random point inside a sphere (eg. a unit sphere). The
random distribution must be even.
2) Translate this point in the direction origin-point (ie. multiply it by
a value) so that its distance from the origin will be the desired (eg. 1000).
For example something like this:
#declare Stars = 1000;
#declare Distance = 1000;
#declare StarRadius = 1;
#declare Seed=seed(0);
#local Ind=0;
#while(Ind<Stars)
#local Location = <-1+rand(Seed)*2, -1+rand(Seed)*2, -1+rand(Seed)*2>;
#while(vlength(Location) > 1)
#local Location = <-1+rand(Seed)*2, -1+rand(Seed)*2, -1+rand(Seed)*2>;
#end
#local Location = Distance*Location/vlength(Location);
sphere { Location, StarRadius pigment { rgb 1 } finish { ambient 1 } }
#local Ind=Ind+1;
#end
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi Warp!
Just curios: Why the inner loop? I don't see a reason to keep the length of
Location below 1.
vlength(Location/vlenth(Location)) is always 1 isn't it?
Or is it already too late at night?
KK
Warp <war### [at] tagpovrayorg> wrote:
> For example something like this:
>
> #declare Stars = 1000;
> #declare Distance = 1000;
> #declare StarRadius = 1;
> #declare Seed=seed(0);
>
> #local Ind=0;
> #while(Ind<Stars)
> #local Location = <-1+rand(Seed)*2, -1+rand(Seed)*2, -1+rand(Seed)*2>;
> #while(vlength(Location) > 1)
> #local Location = <-1+rand(Seed)*2, -1+rand(Seed)*2, -1+rand(Seed)*2>;
> #end
> #local Location = Distance*Location/vlength(Location);
> sphere { Location, StarRadius pigment { rgb 1 } finish { ambient 1 } }
> #local Ind=Ind+1;
> #end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
KalleK wrote:
> Just curios: Why the inner loop? I don't see a reason to keep the length of
> Location below 1.
> vlength(Location/vlenth(Location)) is always 1 isn't it?
> Or is it already too late at night?
Warp's code evenly distributes points within a cube at the origin. In order to
make an even spherical distribution, only the subset of these points within a
sphere that fits inside the cube is taken. The point is then moved to a fixed
distance from the origin.
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sorry: too late at night...
Having turned of the computer yesterday, i realized my fault.
Thanks!
KK
> Warp's code evenly distributes points within a cube at the origin. In
order to
> make an even spherical distribution, only the subset of these points
within a
> sphere that fits inside the cube is taken. The point is then moved to a
fixed
> distance from the origin.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |