This topic is now archived and is closed to further replies.


skybox movement

Recommended Posts

steg    390
Hi, I''ve got my cube with the relevant cloud textures in place on each face, how to apply this to my ''world'' so it moves correctly ? I have a camera in place which moves around the world, but do I have to apply some different world transformation on the skybox (3d cube) ? Many thanks, sTeVe

Share this post

Link to post
Share on other sites
Abstraction    122
Just transform the skybox so that the camera is always in the center. Like if your camera is at (10,10,10) then move your sky box to (10,10,10) and then render it. You do, however, want the orientation of your camera to apply to the skybox. So you have a rotation matrix (the orientation of your camera) and a tranformation matrix (the location of your camera) multiply them together, in the right order of course, and then set the result as the world transformation.

Remember to draw the skybox first with the zbuffer off.

Share this post

Link to post
Share on other sites
you could draw you skybox completely independent of
the world.

every fram you start with drawing the skybox.
don''t translate, only rotate the skybox about the angles
of your camera, but drawing it realative to

Then draw the world without concerning about the sky,
just as you would draw it without sky.

You''re always in the center of the skybox, the sky can be considered "infinite big"
(just a feasible model here)
so that you won''t recognize any changes when changing the camera''s

(Go outside your house, look up to the sky, and walk a bit
around. BE CAREFUL not to run in front of a car or something
The sky appears to always stay at same "position", not to move)

Share this post

Link to post
Share on other sites