POV-Ray : Newsgroups : povray.general : Star night sky Server Time
9 Aug 2024 01:26:45 EDT (-0400)
  Star night sky (Message 1 to 10 of 20)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Yann Ramin
Subject: Star night sky
Date: 28 Sep 2000 01:19:09
Message: <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.

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

From: Bob Hughes
Subject: Re: Star night sky
Date: 28 Sep 2000 01:35:39
Message: <39d2d8ab@news.povray.org>
"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

From: ddombrow
Subject: Re: Star night sky
Date: 28 Sep 2000 01:42:55
Message: <39d2da5f$1@news.povray.org>
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

From: disnel
Subject: Re: Star night sky
Date: 28 Sep 2000 08:24:06
Message: <39D3394B.6C243333@hlavacek-partner.cz>
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

From: disnel
Subject: Re: Star night sky
Date: 28 Sep 2000 08:24:45
Message: <39D33972.B13A4F09@hlavacek-partner.cz>
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

From: Gail Shaw
Subject: Re: Star night sky
Date: 28 Sep 2000 08:36:50
Message: <39d33b62@news.povray.org>
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

From: Warp
Subject: Re: Star night sky
Date: 28 Sep 2000 10:04:53
Message: <39d35005@news.povray.org>
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

From: KalleK
Subject: Re: Star night sky
Date: 28 Sep 2000 16:19:20
Message: <39d3a7c8@news.povray.org>
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

From: David Fontaine
Subject: Re: Star night sky
Date: 28 Sep 2000 21:02:53
Message: <39D3E7FA.15D62A5D@faricy.net>
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

From: KalleK
Subject: Re: Star night sky
Date: 29 Sep 2000 02:33:50
Message: <39d437ce$1@news.povray.org>
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

Goto Latest 10 Messages Next 10 Messages >>>

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