View Full Version : skybox help
12-23-2009, 10:20 AM
Can you please tell me some rules of thumb that you use when placing the skybox in your games, i.e. when deciding to what value to set xmin, xmax, ymin, ymax, zmin, zmax?
Is setting cube vertex coordinates to (+/-f/sqrt(3), +/-f/sqrt(3), +/-f/sqrt(3)) + V_camera, where V_camera is the position of the camera, a good idea?
12-24-2009, 12:55 AM
I'm using very simple,fast and looking good enough solution:
On drawing the skybox:
Switch to 2d mode and disable the z-buffer
Draw window size rectangle with color gradient effect from top to down.
Switch back to 3D,enable back z-buffer
No algorithm or math needed ...
12-24-2009, 01:37 AM
Here's a post I made on it skybox (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=258489#Post2584 89).
12-24-2009, 05:17 AM
Thanks, but I don't think your approach is good. The gradient would maybe work for a racing game, but it's pretty much a 2D thing. The cube needs to rotate with the view. The second maxz approach is bad, as it's still possible to come near the skybox and this is a big no no. I'll just try to implement my translational skybox.
12-25-2009, 09:50 AM
I was too critical of you two. Thanks for your help. Next time I'll just do my math and keep my mouth shut :)
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.