POV-Ray : Newsgroups : povray.newusers : camera setup for a skybox : Re: camera setup for a skybox Server Time
29 Jul 2024 10:25:04 EDT (-0400)
  Re: camera setup for a skybox  
From: Chris B
Date: 28 Feb 2006 09:00:19
Message: <44045773@news.povray.org>
"emzic" <emz### [at] SPAMembegecom> wrote in message 
news:Xns9778920C76B0BemzicNOSPAMembegecom@203.29.75.35...
> ... snip ...
> meanwhile i could create matching front, back, left and right textures
> using an angle of 90.
>
> camera {
> location <0, 0, 0>
> look_at <1, 0, 0> //vary the direction here
>    angle 90
> }
>
> just the top and bottom textures dont seem to match when i use look_at
> <0,-1,0> and <0,1,0>
>
> thank you for any help!

I think you're nearly there, it's probably just that the default aspect 
ratio is 4 to 3, so if you add a right vector and an up vector with length 1 
then you should be able to generate 6 squares that fit together around a 
cube. The example below illustrates this.
Note. The image width and height you generate will need to be equal, 
otherwise it still won't help much.

Regards,
Chris B.

camera {location <0,0,0>
  look_at <0,-1,0>
  angle 90
  right x
  up y
}
light_source{0 rgb 1}

cylinder {<-1,-1, 1><-1, 1, 1>,0.08 pigment {color rgb <1,0,0>}}
cylinder {< 1,-1, 1>< 1, 1, 1>,0.08 pigment {color rgb <1,1,0>}}
cylinder {<-1,-1,-1><-1, 1,-1>,0.08 pigment {color rgb <1,0,1>}}
cylinder {< 1,-1,-1>< 1, 1,-1>,0.08 pigment {color rgb <0,1,1>}}


Post a reply to this message

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