POV-Ray : Newsgroups : povray.general : The sun and stars Server Time
4 Aug 2024 16:12:06 EDT (-0400)
  The sun and stars (Message 1 to 10 of 24)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Rich
Subject: The sun and stars
Date: 19 Apr 2003 11:04:17
Message: <Xns93625C49E7338spammindspringcom@204.213.191.226>
Tek has posted some really nice work in the images group, and I've 
borrowed some of the code that he and others have posted regarding the 
rendering of realistic star fields and the sun.  The problem I'd like to 
address in my render is the fact that if the sun is visible to any degree 
in an image, there's absolutely no way you'd be able to see the stars.
    	So, realism is not the best option here, but I'd at least like to 
get rid of the stars that are visible through the sun's "atmosphere" and 
a bit beyond that.  I've attempted to place the pigments in a 
pigment_map, but for some reason the star pigment is washed out and I 
can't figure out why.

Here's the code:

global_settings {
  assumed_gamma 1.0
}

camera {
  location  <0.0, 1.5, -10.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

#declare pStars = pigment {
  pigment_pattern {
   crackle form <1,0,0>
   pigment_map {
    [0 crackle solid
       pigment_map {
         [0 bozo scale 30
            colour_map {
              [0 rgb .7]
              [1 rgb 1.3]
            } ]
         [0.75 rgb 0] 
       } ]
    [1 rgb 0]
   }
  }
  colour_map {
   [.5 rgb 0]
   [1 rgb 3]
  }
  scale 0.004
  rotate <45,90,45>
 }

#declare pSun = pigment {
  gradient y scale 2 
  translate -1 poly_wave 50
  colour_map {
    [0 rgbt 1]
    [1 rgb <3,2,1>]
  }
}

sky_sphere {
  pigment {
    gradient y
    pigment_map {
      [0.0  pStars]
      [0.85 pSun]
    }
    rotate <80,325,0>
  }
}


-- 
Rich Allen
(Remove SPAM from my address to reply by e-mail)


Post a reply to this message

From: Tek
Subject: Re: The sun and stars
Date: 19 Apr 2003 12:58:19
Message: <3ea1802b$1@news.povray.org>
Well the physical phenomenon that stops the stars being visible is the iris of
your eye or the camera. so to simulate that you'd want a sun that was much
brighter than the stars, then darken the entire image when the sun's in view.

But anyway, the code you posted seems a little strange, because bits of your sky
will become transparent. Your pigment_map uses two textures, one of which has
some transparency.

The way I do it is to layer the sun texture over the stars:

sky_sphere {
    pigment {
        pStars
    }
    pigment {
       gradient y scale 2
       translate -1 poly_wave 50
       colour_map {
            [0 rgb <3,2,1> transmit 1]
            [1 rgb <3,2,1> transmit 0]
       }
   }
}

The important thing here is that the transmit channel of the sun is controlling
how visible the stars are, so in the centre of the sun there's no stars
(transmit 0), and as the sun fades out they fade in.

If you want a larger region without stars but without affecting the sun's fade,
things get more complex, but something like this should work:


sky_sphere {
    pigment {
        pStars
    }
    pigment {
       gradient y scale 2
       translate -1 poly_wave 50
       colour_map {
            [0 rgb <3,2,1>*.5 transmit 1]
            [.5 rgb <3,2,1>*.5 transmit 0] //darken the sun but don't show any
stars through
            [1 rgb <3,2,1> transmit 0]
       }
   }
}

But I'm not entirely sure what effect you're trying to get. If you just fade out
the stars earlier you'll get a dark ring round the sun.

BTW, the "rgbt 1" was a typo in my original code, it was meant to be "rgb
<3,2,1> transmit 1", but I didn't fix it cause it didn't look too bad. With rgbt
1 it means the sun colour fades from orange to white as it becomes more
transparent, which is not the effect I wanted.

--
Tek
http://www.evilsuperbrain.com


"Rich" <SrP### [at] ricoswebcom> wrote in message
news:Xns### [at] 204213191226...
>     Tek has posted some really nice work in the images group, and I've
> borrowed some of the code that he and others have posted regarding the
> rendering of realistic star fields and the sun.  The problem I'd like to
> address in my render is the fact that if the sun is visible to any degree
> in an image, there's absolutely no way you'd be able to see the stars.
>     So, realism is not the best option here, but I'd at least like to
> get rid of the stars that are visible through the sun's "atmosphere" and
> a bit beyond that.  I've attempted to place the pigments in a
> pigment_map, but for some reason the star pigment is washed out and I
> can't figure out why.
>
> Here's the code:
>
> global_settings {
>   assumed_gamma 1.0
> }
>
> camera {
>   location  <0.0, 1.5, -10.0>
>   direction 1.5*z
>   right     x*image_width/image_height
>   look_at   <0.0, 0.0,  0.0>
> }
>
> #declare pStars = pigment {
>   pigment_pattern {
>    crackle form <1,0,0>
>    pigment_map {
>     [0 crackle solid
>        pigment_map {
>          [0 bozo scale 30
>             colour_map {
>               [0 rgb .7]
>               [1 rgb 1.3]
>             } ]
>          [0.75 rgb 0]
>        } ]
>     [1 rgb 0]
>    }
>   }
>   colour_map {
>    [.5 rgb 0]
>    [1 rgb 3]
>   }
>   scale 0.004
>   rotate <45,90,45>
>  }
>
> #declare pSun = pigment {
>   gradient y scale 2
>   translate -1 poly_wave 50
>   colour_map {
>     [0 rgbt 1]
>     [1 rgb <3,2,1>]
>   }
> }
>
> sky_sphere {
>   pigment {
>     gradient y
>     pigment_map {
>       [0.0  pStars]
>       [0.85 pSun]
>     }
>     rotate <80,325,0>
>   }
> }
>
>
> --
> Rich Allen
> (Remove SPAM from my address to reply by e-mail)


Post a reply to this message

From: Lenx
Subject: Re: The sun and stars
Date: 19 Apr 2003 15:21:12
Message: <3ea1a1a8$1@news.povray.org>
you can add a layer between the star and sun layer that makes a 'second sun'
under the first one. that second sun has to be the color of the sky (black?)
and fades into transparant at a certain distance to the real sun's borders.







"Rich" <SrP### [at] ricoswebcom> schreef in bericht
news:Xns### [at] 204213191226...
>     Tek has posted some really nice work in the images group, and I've
> borrowed some of the code that he and others have posted regarding the
> rendering of realistic star fields and the sun.  The problem I'd like to
> address in my render is the fact that if the sun is visible to any degree
> in an image, there's absolutely no way you'd be able to see the stars.
>     So, realism is not the best option here, but I'd at least like to
> get rid of the stars that are visible through the sun's "atmosphere" and
> a bit beyond that.  I've attempted to place the pigments in a
> pigment_map, but for some reason the star pigment is washed out and I
> can't figure out why.
>
> Here's the code:
>
> global_settings {
>   assumed_gamma 1.0
> }
>
> camera {
>   location  <0.0, 1.5, -10.0>
>   direction 1.5*z
>   right     x*image_width/image_height
>   look_at   <0.0, 0.0,  0.0>
> }
>
> #declare pStars = pigment {
>   pigment_pattern {
>    crackle form <1,0,0>
>    pigment_map {
>     [0 crackle solid
>        pigment_map {
>          [0 bozo scale 30
>             colour_map {
>               [0 rgb .7]
>               [1 rgb 1.3]
>             } ]
>          [0.75 rgb 0]
>        } ]
>     [1 rgb 0]
>    }
>   }
>   colour_map {
>    [.5 rgb 0]
>    [1 rgb 3]
>   }
>   scale 0.004
>   rotate <45,90,45>
>  }
>
> #declare pSun = pigment {
>   gradient y scale 2
>   translate -1 poly_wave 50
>   colour_map {
>     [0 rgbt 1]
>     [1 rgb <3,2,1>]
>   }
> }
>
> sky_sphere {
>   pigment {
>     gradient y
>     pigment_map {
>       [0.0  pStars]
>       [0.85 pSun]
>     }
>     rotate <80,325,0>
>   }
> }
>
>
> --
> Rich Allen
> (Remove SPAM from my address to reply by e-mail)


Post a reply to this message

From: Warp
Subject: Re: The sun and stars
Date: 19 Apr 2003 15:59:53
Message: <3ea1aab9@news.povray.org>
Actually if you want a photographically realistic result, the stars
shouldn't be visible even if you are "photographing" (ie. in this case
rendering) a planet (eg. Earth). Well, at least not if you want the
details of the planet to be visible.

  This is related to exposure time. The planet is brightly lit by the
Sun, but the stars are rather dim. If you set the exposure time of your
photographing device so that the details of the planetary surface are
visible, the stars will be way too dim to be seen. If on the other hand
you set the exposure time so long that the stars become visible, the
planet will become overexposed, ie completely white (well, the lit
part of the planet).

  Space movies are always unrealistic in this matter. There planets and
stars are perfectly visible all alike, which can't be achieved with any
ordinary photographing device. (In theory you would need some kind of
digital device which analyzes the image and corrects the exposure in
different parts of the image depending on their brightness.)
  On the other hand, space shots with completely black skies would be
pretty boring, so we can forgive this artistic effect.

-- 
#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: Lenx
Subject: Re: The sun and stars
Date: 20 Apr 2003 04:34:08
Message: <3ea25b80@news.povray.org>
"Warp" <war### [at] tagpovrayorg> schreef in bericht
news:3ea1aab9@news.povray.org...
>   Actually if you want a photographically realistic result, the stars
> shouldn't be visible even if you are "photographing" (ie. in this case
> rendering) a planet (eg. Earth). Well, at least not if you want the
> details of the planet to be visible.
>
>   This is related to exposure time. The planet is brightly lit by the
> Sun, but the stars are rather dim. If you set the exposure time of your
> photographing device so that the details of the planetary surface are
> visible, the stars will be way too dim to be seen. If on the other hand
> you set the exposure time so long that the stars become visible, the
> planet will become overexposed, ie completely white (well, the lit
> part of the planet).
>
>   Space movies are always unrealistic in this matter. There planets and
> stars are perfectly visible all alike, which can't be achieved with any
> ordinary photographing device. (In theory you would need some kind of
> digital device which analyzes the image and corrects the exposure in
> different parts of the image depending on their brightness.)
>   On the other hand, space shots with completely black skies would be
> pretty boring, so we can forgive this artistic effect.
>
> --
> #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 -

i think you think too much, don't you think ;-)
it is true what you say, but imo if art was scientific correct it wasn't
called art anymore.

regards, lenx


Post a reply to this message

From: Warp
Subject: Re: The sun and stars
Date: 20 Apr 2003 09:14:04
Message: <3ea29d1b@news.povray.org>
Lenx <len### [at] pandorabe> wrote:
> it is true what you say, but imo if art was scientific correct it wasn't
> called art anymore.

  I don't agree.
  There are many things which are most beautiful when they are completely
physically correctly modelled (fakes and shortcuts usually make them look
less pretty). For example water, fire, cloths, objects colliding with each
other, etc etc.
  For example a slow-motion animation of a rock thrown into a pool of
water is the most beautiful when its modelling is physically perfect.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Lenx
Subject: Re: The sun and stars
Date: 20 Apr 2003 10:09:46
Message: <3ea2aa2a$1@news.povray.org>
>   I don't agree.
>   There are many things which are most beautiful when they are completely
> physically correctly modelled (fakes and shortcuts usually make them look
> less pretty). For example water, fire, cloths, objects colliding with each
> other, etc etc.
>   For example a slow-motion animation of a rock thrown into a pool of
> water is the most beautiful when its modelling is physically perfect.
>

you won :-)
it is a scientific reproduction of nature, which is for me pure art
but i didn't mean it really in that way, i had something in mind like
'artistic freedom'.
lenx


Post a reply to this message

From: Jellby
Subject: Re: The sun and stars
Date: 20 Apr 2003 11:48:22
Message: <3ea2c145@news.povray.org>
Among other things, Warp wrote:

>   This is related to exposure time. The planet is brightly lit by the
> Sun, but the stars are rather dim. If you set the exposure time of your
> photographing device so that the details of the planetary surface are
> visible, the stars will be way too dim to be seen. If on the other hand
> you set the exposure time so long that the stars become visible, the
> planet will become overexposed, ie completely white (well, the lit
> part of the planet).

I'd say scattering plays a role too here on earth, we don't see the stars 
when the sun is shining because the sky itself shines too (obscuring the 
sun with the hand is not enough). In outer space this doesn't happen and it 
should be possible to see the stars you cover the sun (and other bright 
bodies), but I've never been there to try.

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: Warp
Subject: Re: The sun and stars
Date: 20 Apr 2003 12:31:58
Message: <3ea2cb7e@news.povray.org>
Jellby <jel### [at] m-yahoocom> wrote:
> In outer space this doesn't happen and it 
> should be possible to see the stars you cover the sun (and other bright 
> bodies), but I've never been there to try.

  As I said, it's perfectly possible to photograph stars in space. You
just need to set the exposure time of the photographing device so long that
it captures the light of the stars.
  And as I said, the problem with this is that if there's a much brighter
object visible, it will be highly overexposed, and will most probably
turn completely white in the image.
  Covering the bright object may be necessary if the object is extremely
bright because the brightness can overwhelm and bleed (at least if we are
using a photographic film), overexposing the whole image. I don't know
if this is necessary with a digital camera, though (does anyone know?).

-- 
#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: Sir Charles W  Shults III
Subject: Re: The sun and stars
Date: 20 Apr 2003 12:46:34
Message: <3ea2ceea$1@news.povray.org>
Many CCDs or digital cameras have enough dynamic range to get dim objects as
well as bright objects, but the images must be processed in a computer to bring
out all the features in most circumstances.  If the images showed the entire
dynamic range compressed to fit our human light range, they would look
unnatural, like our happy little space images with stars and planets all the
same.

Cheers!

Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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