POV-Ray : Newsgroups : povray.general : Sky backgrounds : Re: Sky backgrounds Server Time
4 Aug 2024 00:24:55 EDT (-0400)
  Re: Sky backgrounds  
From: Warp
Date: 11 Sep 2003 11:40:11
Message: <3f60975b@news.povray.org>
aquarin <nomail@nomail> wrote:
> I am not sure it is the "best way", but it is "my way":
> sky_sphere {
>   pigment {
>     image_map {jpeg "sky1.jpg"}
>     scale 2
>     translate -1
>   }
>   rotate 70*y
> }

  Even without testing I can say that doesn't work at all.
  The sky backgrounds are (hemi)spherical projections so you have to use
the spherical map type (was it map_type 1?).
  However, since they are not spherical projections but hemispherical (only
half of the sphere), this is not enough. You need to create a pigment
from <0,0,0> to <1,1,0> where the upper half consists of the image (and
the lower half has whatever) and then apply a spherical warp.

  So it should look something like this (completely untested, so it may
have bugs):

sky_sphere
{ pigment
  { image_map { jpeg "sky1.jpg" once }
    scale <1,.5,1> translate y*.5
    warp { spherical }
  }
}

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

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