POV-Ray : Newsgroups : povray.newusers : camera setup for a skybox Server Time
1 Nov 2024 07:26:49 EDT (-0400)
  camera setup for a skybox (Message 1 to 7 of 7)  
From: emzic
Subject: camera setup for a skybox
Date: 28 Feb 2006 07:02:28
Message: <Xns977884A9531C3emzicNOSPAMembegecom@203.29.75.35>
hello,

i want to generate 6 quadratic images to be used as skybox textures in a 
game. but unfortunately i have no idea how to set up the camera correctly 
besides that it has to look into the 6 different directions.

i would be very grateful for any help on this.

thank you!


Post a reply to this message

From: helge h
Subject: Re: camera setup for a skybox
Date: 28 Feb 2006 07:55:01
Message: <web.44044723a7dd28121c6902970@news.povray.org>
emzic <emz### [at] SPAMembegecom> wrote:
> hello,
>
> i want to generate 6 quadratic images to be used as skybox textures in a
> game. but unfortunately i have no idea how to set up the camera correctly
> besides that it has to look into the 6 different directions.
>
> i would be very grateful for any help on this.
>
> thank you!

maybe this can help:

http://news.povray.org/povray.macintosh/thread/%3Cr### [at] netplexaussieorg%3E/?ttop=214395&to
ff=100

H


Post a reply to this message

From: helge h
Subject: Re: camera setup for a skybox
Date: 28 Feb 2006 08:05:00
Message: <web.44044a50a7dd28121c6902970@news.povray.org>
"helge_h" <nomail@nomail> wrote:
> emzic <emz### [at] SPAMembegecom> wrote:
> > hello,
> >
> > i want to generate 6 quadratic images to be used as skybox textures in a
> > game. but unfortunately i have no idea how to set up the camera correctly
> > besides that it has to look into the 6 different directions.
> >
> > i would be very grateful for any help on this.
> >
> > thank you!
>
> maybe this can help:

sorry, the url was too long; try this:

http://tinyurl.com/pctrj

H


Post a reply to this message

From: emzic
Subject: Re: camera setup for a skybox
Date: 28 Feb 2006 08:21:25
Message: <Xns9778920C76B0BemzicNOSPAMembegecom@203.29.75.35>
"helge_h" <nomail@nomail> wrote in
news:web.44044a50a7dd28121c6902970@news.povray.org: 

> "helge_h" <nomail@nomail> wrote:
>> emzic <emz### [at] SPAMembegecom> wrote:
>> > hello,
>> >
>> > i want to generate 6 quadratic images to be used as skybox textures
>> > in a game. but unfortunately i have no idea how to set up the
>> > camera correctly besides that it has to look into the 6 different
>> > directions. 
>> >
>> > i would be very grateful for any help on this.
>> >
>> > thank you!
>>
>> maybe this can help:
> 
> sorry, the url was too long; try this:
> 
> http://tinyurl.com/pctrj

thank you!

unfortunately those six images dont fit together at all. i was even 
trying to stitch them together in photoshop but couldnt find any matching 
edges.

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!


Post a reply to this message

From: emzic
Subject: Re: camera setup for a skybox
Date: 28 Feb 2006 08:49:40
Message: <Xns977896D613214emzicNOSPAMembegecom@203.29.75.35>
ok, i could just solve it using paul bourkes approach:

http://astronomy.swin.edu.au/~pbourke/projection/cuberender/#povray


Post a reply to this message

From: Chris B
Subject: Re: camera setup for a skybox
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

From: Slime
Subject: Re: camera setup for a skybox
Date: 4 Mar 2006 03:27:24
Message: <44094f6c$1@news.povray.org>
I usually use this:

camera {
 location 0
 right x
 up y
 direction z

 angle 90

 #if (frame_number = 0)
  look_at  x
 #else #if (frame_number = 1)
  look_at  -x
 #else #if (frame_number = 2)
  look_at  y
 #else #if (frame_number = 3)
  look_at  -y
 #else #if (frame_number = 4)
  look_at  z
 #else #if (frame_number = 5)
  look_at  -z
 #end #end #end #end #end #end
}

With command line options +kfi0 +kff5

- Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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