POV-Ray : Newsgroups : povray.advanced-users : Textured sky and radiosity Server Time
28 Jul 2024 20:27:37 EDT (-0400)
  Textured sky and radiosity (Message 1 to 7 of 7)  
From: David Wallace
Subject: Textured sky and radiosity
Date: 31 Jul 2003 09:17:35
Message: <3f2916ef$1@news.povray.org>
How do I set up a textured sky in such a way that radiosity will work with
it?  I can get a radiosity sphere right from the scene samples:

sphere {
  <0, 0, 0>, 1
  texture {
   pigment {
     gradient y
     color_map {
       [0.0 color rgb < 0.880, 0.935, 0.976 >]
       [0.2 color rgb < 0.300, 0.450, 0.950 >]
     }
   }
   finish { diffuse 0 ambient 1 }
  }
  hollow on
  no_shadow
  scale 30000
}

I also learned how to set up a textured sky_sphere:

#declare Sky1 = pigment { image_map { png "skyday9.png" interpolate 2 }
scale <.15,.5,.15> }

#declare Sky = sky_sphere {
 pigment {
   Sky1
   warp{
    spherical
    orientation z
    dist_exp 1
   }
  rotate x*180
 }
}

Now how do I put these two great tastes together to make some awesome eye
candy?


Post a reply to this message

From: Tek
Subject: Re: Textured sky and radiosity
Date: 5 Aug 2003 18:46:07
Message: <3f3033af$1@news.povray.org>
Both spheres and sky_spheres interact correctly with radiosity, so it doesn't
matter which you use. But to layer clouds over a sky (which is what I think you
want to do) you can just use a layered pigment, something like this:

sky_sphere {
  pigment {
    //first layer
    gradient y
    color_map {
      [0.0 color rgb < 0.880, 0.935, 0.976 >]
      [0.2 color rgb < 0.300, 0.450, 0.950 >]
    }
  }
  pigment {
    //second layer, any transparent bits of this will let you see the first
layer
    bozo
    turbulence .5
    scale <.3,.1,.3>
    rotate x*180
    colour_map {
      [0.3 rgb 0.8]
      [0.5 rgb 1 transmit 1]
    }
  }
}

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

"David Wallace" <dar### [at] earthlinknet> wrote in message
news:3f2916ef$1@news.povray.org...
> How do I set up a textured sky in such a way that radiosity will work with
> it?  I can get a radiosity sphere right from the scene samples:
>
> sphere {
>   <0, 0, 0>, 1
>   texture {
>    pigment {
>      gradient y
>      color_map {
>        [0.0 color rgb < 0.880, 0.935, 0.976 >]
>        [0.2 color rgb < 0.300, 0.450, 0.950 >]
>      }
>    }
>    finish { diffuse 0 ambient 1 }
>   }
>   hollow on
>   no_shadow
>   scale 30000
> }
>
> I also learned how to set up a textured sky_sphere:
>
> #declare Sky1 = pigment { image_map { png "skyday9.png" interpolate 2 }
> scale <.15,.5,.15> }
>
> #declare Sky = sky_sphere {
>  pigment {
>    Sky1
>    warp{
>     spherical
>     orientation z
>     dist_exp 1
>    }
>   rotate x*180
>  }
> }
>
> Now how do I put these two great tastes together to make some awesome eye
> candy?
>
>


Post a reply to this message

From: Warp
Subject: Re: Textured sky and radiosity
Date: 6 Aug 2003 05:46:12
Message: <3f30ce64@news.povray.org>
Tek <tek### [at] evilsuperbraincom> wrote:
> But to layer clouds over a sky

... you don't put it on the sky_sphere. You should use eg. a horizontal
plane instead.

  The POV-Ray documentation gives a very bad example in one of its
tutorials about putting clouds on the sky_sphere itself. IMHO this bad
example should be fixed (and may perhaps even be).

  The reason why it's the incorrect way is that Earth clouds form a sphere
which center is not at the camera (as happens with sky_sphere), but
6000 km *below* the camera, the radius of the sphere being little larger
than that. In practice this means that from the point of view of the camera
the clouds form almost a plane in practice (even though it's strictly not
a plane, it is a good-enough approximation).
  If you put the coulds on the sky_sphere, the result will be completely
unrealistic and unnatural.

  Here is an example of how it can be done:

camera { location -z*2 look_at y*.5 angle 50 }
light_source { <1000, 2000, -500>, 1 }

sky_sphere
{ pigment
  { gradient y color_map
    { [0 rgb <.8,1,1>][.3 rgb <.2,.5,1>][1 rgb z]
    }
  }
}

plane
{ -y, -100
  pigment
  { bozo color_map
    { [0 rgb .5][.2 rgb 1][.5 rgbf 1]
    }
    turbulence .5
    scale 100
  }
  finish { ambient 1 }
}

// ground:
plane { y,-10 pigment { rgb <.8,.5,.3> } }


-- 
#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: Christopher James Huff
Subject: Re: Textured sky and radiosity
Date: 6 Aug 2003 11:25:44
Message: <cjameshuff-47E868.10241306082003@netplex.aussie.org>
In article <3f30ce64@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

> ... you don't put it on the sky_sphere. You should use eg. a horizontal
> plane instead.

I dislike plane skies, for their infinite horizon effects. I recommend a 
big hollow sphere centered far below the scene instead...I do not find a 
plane to be "good enough".

-- 
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: Tek
Subject: Re: Textured sky and radiosity
Date: 6 Aug 2003 16:23:32
Message: <3f3163c4$1@news.povray.org>
I agree with that, but with some clever scaling you can get pretty good effects
just using a sky sphere (look at my grassy julia picture for an example
http://www.evilsuperbrain.com/gallery/finished/grassy.jpg).

Though you're right, a large sphere centered far below the scene is the most
realistic method.

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


"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cja### [at] netplexaussieorg...
> In article <3f30ce64@news.povray.org>, Warp <war### [at] tagpovrayorg>
> wrote:
>
> > ... you don't put it on the sky_sphere. You should use eg. a horizontal
> > plane instead.
>
> I dislike plane skies, for their infinite horizon effects. I recommend a
> big hollow sphere centered far below the scene instead...I do not find a
> plane to be "good enough".
>
> -- 
> 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: David Wallace
Subject: Re: Textured sky and radiosity
Date: 7 Aug 2003 05:49:03
Message: <3f32208f$1@news.povray.org>
Maybe I need to make my goal more clear -- I want an image-mapped sky to
work with radiosity.  I could care less if the technique is by sphere or
sky_sphere.  I have seen a link concerning how to eliminate the crunching
effect at the poles of image-mapped spheres, but I don't remember off
the.top of my head where it is.  A large hollow sphere placed far below the
scene will probably suffer from this phenomenon unless corrected.

"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cja### [at] netplexaussieorg...
> In article <3f30ce64@news.povray.org>, Warp <war### [at] tagpovrayorg>
> wrote:
>
> > ... you don't put it on the sky_sphere. You should use eg. a horizontal
> > plane instead.
>
> I dislike plane skies, for their infinite horizon effects. I recommend a
> big hollow sphere centered far below the scene instead...I do not find a
> plane to be "good enough".
>
> -- 
> 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: Christopher James Huff
Subject: Re: Textured sky and radiosity
Date: 7 Aug 2003 11:18:22
Message: <cjameshuff-00CE28.10165507082003@netplex.aussie.org>
In article <3f32208f$1@news.povray.org>,
 "David Wallace" <dar### [at] earthlinknet> wrote:

> Maybe I need to make my goal more clear -- I want an image-mapped sky to
> work with radiosity.  I could care less if the technique is by sphere or
> sky_sphere.  I have seen a link concerning how to eliminate the crunching
> effect at the poles of image-mapped spheres, but I don't remember off
> the.top of my head where it is.  A large hollow sphere placed far below the
> scene will probably suffer from this phenomenon unless corrected.

You could just use a planar projection for the image map. It will be 
distorted, with the effects getting extremely bad near the "equator", 
but the effects will be small in the area of the sphere you will be able 
to see. You don't say anything about the source image: what projection 
it uses, what it's intended to be mapped on...

You also need to clarify the "to work with radiosity" part. How does 
what you're doing not work with radiosity? I didn't think this is the 
case, but radiosity may ignore the sky_sphere. If that is the case, you 
can just put the pigment on a big sphere...but you apparently already 
know how to do that.


> > I dislike plane skies, for their infinite horizon effects. I recommend a
> > big hollow sphere centered far below the scene instead...I do not find a
> > plane to be "good enough".

And another thing: for many scenes, the inaccuracy of a sky_sphere sky 
is perfectly acceptable. If the scale of the visible part of the scene 
is small compared to the altitude and extent of the clouds, you will 
have a hard time finding any difference. For an indoor scene with a view 
out the window, or even most outdoor scenes, a sky_sphere is fine. If 
you have an ocean view stretching out to the sunset, it won't work 
right...though it may still look right, if the appearance of the sky is 
fairly even.

-- 
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

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