View Full Version : Sky boxes à la Quake3
03-25-2002, 12:49 AM
Quake3 has a nice skybox system. You can apply a sky shader (contains 6 skybox textures) to any surface and that surface will always look as if it were a sky, thus always seems to have the same distance from the viewer.
Does anyone have an idea how they achieve that effect?
Thanks in advance
03-25-2002, 01:09 AM
Maybe they draw the skybox first (z-writing off), then they draw the polygons that should look like the skybox fully transparent (masking-z). Finally you draw the world.
03-25-2002, 01:15 AM
> Does anyone have an idea how they achieve that effect?
You render your sky box after rotating to the camera orientation, but before translating to the camera position. Or you directly translate the sky box at the camera's position. Since it's a cube, the dimensions shouldn't matter (as long as it's in the clipping range).
03-25-2002, 01:18 AM
That would be good ways if you had one skybox for the complete map. But I think that q3 can have several different skyboxes. Somehow they must have a way to project the skybox on the sky faces...
[This message has been edited by LaBasX2 (edited 03-25-2002).]
03-25-2002, 01:30 AM
Hmm, I was thinking about it again....might be you're right. Using your technique you could also have several different sky boxes. I will try it. Thanks!!
03-25-2002, 06:31 AM
LaBasX2, I think it will be interresting for you to get the source of QuakeIII Clone engine I found some time ago.
The engine is extremely good and can render every quake III maps with all effects. I'm sure you will see how the skyboxes are done by looking on that code.
quake3 gets the skybox (note its not really a skybox, skyquads) texture coordinates by projecting the texture coordinates onto a sphere
03-25-2002, 09:09 AM
AFAIK Q3 uses one skybox like described above. The only thing is that they use the BSP with "visual info" to know which part of the skybox must be rendered. (each face of the cube is made by multiple quads) Just to avoid overdraw.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.