skybox movement

Started by
2 comments, last by steg 22 years, 3 months ago
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

If it isn't working, take a bath, have a think and try again...

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

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
(0,0,0).

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

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


Thanks for your help guys, I''ll give it a go.

Regards,
sTeVe

If it isn't working, take a bath, have a think and try again...

This topic is closed to new replies.

Advertisement