POV-Ray : Newsgroups : povray.general : Star Filled Sky Server Time
6 Nov 2024 02:23:30 EST (-0500)
  Star Filled Sky (Message 1 to 9 of 9)  
From: James Gray
Subject: Star Filled Sky
Date: 15 Nov 2002 15:50:52
Message: <junk-1511021450530001@ip68-97-75-252.ok.ok.cox.net>
Okay, I'm trying to add a night sky to my scene and I'm running into two
problems.  First, here's what I have:

sky_sphere {
   pigment {
      granite
      color_map {
         [0    color Black]
         [.08  color Black]
         [.1 color White]
         [.1 color Black]
      }
      warp { turbulence 1 }
      scale .1
      frequency 2
   }
}

Problem number one.  I really like the look of this, but I really want
about 1/10th of the stars that are in here.  I've tried messing with scale
and frequency, but I just haven't found the right way to make the stars
appear less frequently in the pattern.

Prolem number two.  My scene has plenty of ugly jaggies and thus really
needs anti-aliasing.  Unfortunately, when I trace with that, at any of the
different settings I've tried, I turn the above starfield into a solid
black sky.  Is there no way to have both?

Thanks in advance for any and all help.  I've still got buckets to learn
about tracing.

James


Post a reply to this message

From: Johannes Dahlstrom
Subject: Re: Star Filled Sky
Date: 15 Nov 2002 16:24:37
Message: <3dd56615@news.povray.org>
James Gray wrote:

<snip>

Try this out:

// --- --- ---

#declare D = .5;

sky_sphere {
        pigment {
                crackle
                color_map {
                        [pow(0.5, D) color Black]
                        [pow(0.6, D) color White*10]
                }
                scale .005/D
        }
}

// --- --- ---

It should render fine with aa. You can also adjust the star density with 
the 'D' variable.


Post a reply to this message

From: Christopher James Huff
Subject: Re: Star Filled Sky
Date: 15 Nov 2002 16:48:11
Message: <chrishuff-F01A24.16472715112002@netplex.aussie.org>
In article <jun### [at] ip68-97-75-252okokcoxnet>,
 jun### [at] grayproductionsnet (James Gray) wrote:

> Problem number one.  I really like the look of this, but I really want
> about 1/10th of the stars that are in here.  I've tried messing with scale
> and frequency, but I just haven't found the right way to make the stars
> appear less frequently in the pattern.

Try reducing the amount of color map that is non-black. Move the 
0.08-0.1 boundary further towards 1 in your map.


> Prolem number two.  My scene has plenty of ugly jaggies and thus really
> needs anti-aliasing.  Unfortunately, when I trace with that, at any of the
> different settings I've tried, I turn the above starfield into a solid
> black sky.  Is there no way to have both?

There really isn't a good way around this. The texture technique takes 
advantage of pixels being point samples, antialiasing samples an area, 
and the bright areas get drowned out by the larger dark areas.
The antialiasing code also clips colors to the [0, 1] range before 
averaging the colors for the final pixel color, so you can't just make 
individual extremely bright stars. (it does this to avoid jagged edges 
on extremely bright objects, in my opinion the fix is worse than the 
problem)

The most reliable technique seems to be to use spheres randomly 
positioned in a half-sphere around the scene, sized just big enough to 
always cover a pixel. This usually looks really ugly in my opinion, and 
is sensitive to the image size (though you could automatically 
compensate for that) but is resistant to antialiasing.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: =Bob=
Subject: Re: Star Filled Sky
Date: 15 Nov 2002 18:21:01
Message: <3dd5815d$1@news.povray.org>
"James Gray" <jun### [at] grayproductionsnet> wrote in message
news:jun### [at] ip68-97-75-252okokcoxnet...

[deletions]

: Prolem number two.  My scene has plenty of ugly jaggies and thus really
: needs anti-aliasing.  Unfortunately, when I trace with that, at any of the
: different settings I've tried, I turn the above starfield into a solid
: black sky.  Is there no way to have both? -- James

I've encountered the same problems. I solved it in a two
step process. First I rendered the star field on a black
background. Then I rendered my foreground without the star
field on a black background, then OR the foreground onto
the background. I did this in a small animation once and it
looked very nice.
=Bob=


Post a reply to this message

From: Gwen & Emory Stagmer
Subject: Re: Star Filled Sky
Date: 15 Nov 2002 18:46:29
Message: <3DD58953.F79C91D8@comcast.net>
I made a starfield graphic using FractInt.  Then image_map'd
it onto a large sphere( radius 1e6 ).  My graphic is 2048x2048.
It stands up well to AA, and animates correctly.
In FractInt, I used a plasma image, then rendered a starfield
from it.

Emory

James Gray wrote:
> 
> Okay, I'm trying to add a night sky to my scene and I'm running into two
> problems.  First, here's what I have:
> 
> sky_sphere {
>    pigment {
>       granite
>       color_map {
>          [0    color Black]
>          [.08  color Black]
>          [.1 color White]
>          [.1 color Black]
>       }
>       warp { turbulence 1 }
>       scale .1
>       frequency 2
>    }
> }
> 
> Problem number one.  I really like the look of this, but I really want
> about 1/10th of the stars that are in here.  I've tried messing with scale
> and frequency, but I just haven't found the right way to make the stars
> appear less frequently in the pattern.
> 
> Prolem number two.  My scene has plenty of ugly jaggies and thus really
> needs anti-aliasing.  Unfortunately, when I trace with that, at any of the
> different settings I've tried, I turn the above starfield into a solid
> black sky.  Is there no way to have both?
> 
> Thanks in advance for any and all help.  I've still got buckets to learn
> about tracing.
> 
> James


Post a reply to this message

From: Warp
Subject: Re: Star Filled Sky
Date: 16 Nov 2002 03:49:08
Message: <3dd60683@news.povray.org>
One solution (eg. used by Colefax's galaxy include) is to put real objects
(eg. spheres) as stars. You'll need to create some thousands of them, but
that shouldn't be a problem.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Shay
Subject: Re: Star Filled Sky
Date: 19 Nov 2002 11:18:42
Message: <3dda6462$1@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote in message news:3dd60683@news.povray.org...
>   One solution (eg. used by Colefax's galaxy include) is to put real
objects
> (eg. spheres) as stars. You'll need to create some thousands of them, but
> that shouldn't be a problem.
>

Or to save memory, perhaps copies of a mesh pentagon oriented to face the
camera.

 -Shay


Post a reply to this message

From: Christopher James Huff
Subject: Re: Star Filled Sky
Date: 19 Nov 2002 11:43:44
Message: <chrishuff-9963B8.11422319112002@netplex.aussie.org>
In article <3dda6462$1@news.povray.org>, "Shay" <sah### [at] simcopartscom> 
wrote:

> Or to save memory, perhaps copies of a mesh pentagon oriented to face the
> camera.

This won't save much memory, in fact it could consume more. A sphere is 
almost as close to the smallest possible object as you can get. Aside 
from the stuff common to every object, a sphere has to keep a center 
vector and a radius, 4 double values total. A mesh has a pointer to mesh 
data, a long integer of the number of textures, a pointer to an array of 
texture pointers, and a short integer used by the inside_vector code.

Now, if you made several different meshes, each with multiple stars, and 
used randomly rotated and positioned copies of these, you would save 
more memory. There would be a few patterns of stars repeated over the 
sky, but it shouldn't be noticeable if they are randomly oriented and if 
there are enough different patterns.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Tom Galvin
Subject: Re: Star Filled Sky
Date: 19 Nov 2002 15:01:02
Message: <Xns92CB98B9ABFDBtomatimporg@204.213.191.226>
jun### [at] grayproductionsnet (James Gray) wrote in
news:jun### [at] ip68-97-75-252okokcoxnet: 

> Okay, I'm trying to add a night sky to my scene and I'm running into
> two problems.  First, here's what I have:

<snip>

> 
> James

If you would like the actual constellations then check out this page:

http://www.geocities.com/CapeCanaveral/Galaxy/8018/

Tom


Post a reply to this message

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