🔒 Locked
skymaps? basic theory?
Advertisement
Original Post
Would anyone care to explain the theory behind drawing a sky?
I dont need code examples or anything, just a basic idea of how its done. My idea is to, after everything is drawn, do a loadidentity, disaable lights and draw a cube that reaches the the extremes of the viewport... am i right with this one, or is there a better way?
thnx
~DemOSh
oh yeah, Strylinys is right. be sure make the sphere smaller than your camera clipping distance.
"wouldn''t a sphere be slow though?"
have you tried it yet?
but if you want the answer, it''s slow if you have too many segments that define the sphere. you can pull off a good sphere with around 16 segments. you really wouldn''t be able to tell because the map should cover it up real good, and if you disable lighting, you won''t see the faceted faces. so, really, as you increase the number of points, the only thing you''d affect is the way the texture is painted onto the sphere. if you can tell that it''s not smooth, increase the number of segments. if it''s too slow, decrease.
if you could think of anything better, i''d like to know.
well,... you could always do a HEMIsphere, but my game requires a full sphere.
a2k
"wouldn''t a sphere be slow though?"
have you tried it yet?
but if you want the answer, it''s slow if you have too many segments that define the sphere. you can pull off a good sphere with around 16 segments. you really wouldn''t be able to tell because the map should cover it up real good, and if you disable lighting, you won''t see the faceted faces. so, really, as you increase the number of points, the only thing you''d affect is the way the texture is painted onto the sphere. if you can tell that it''s not smooth, increase the number of segments. if it''s too slow, decrease.
if you could think of anything better, i''d like to know.
well,... you could always do a HEMIsphere, but my game requires a full sphere.
a2k
Well..
the easiest thing to do is as you said.. draw a skybox. This is a box drawn centered on the player''s view position. You can add a little bit of parallaxing when moving but it isn''t necessary (I believe Shogo did this). All of the Quake and Unreal engine games use skyboxes, and you can find a number of free textures for skyboxes at:
http://halflife.lowlife.com/wadfather
Spherically mapped skys look cool especially when you have clouds scrolling up and over the horizon, but you can''t beat the simplicity of drawing a box
One thing to note.. the resolution of your sky textures will have an impact on how "close" the sky seems to be to the player. It''s an optical illusion I guess
For stuff like starfields and nebulae effects.. it''s best to use a low res texture for the nebula, and then tile or multitexture a higher res star texture over top of it for a detail texture.
good luck
the easiest thing to do is as you said.. draw a skybox. This is a box drawn centered on the player''s view position. You can add a little bit of parallaxing when moving but it isn''t necessary (I believe Shogo did this). All of the Quake and Unreal engine games use skyboxes, and you can find a number of free textures for skyboxes at:
http://halflife.lowlife.com/wadfather
Spherically mapped skys look cool especially when you have clouds scrolling up and over the horizon, but you can''t beat the simplicity of drawing a box
One thing to note.. the resolution of your sky textures will have an impact on how "close" the sky seems to be to the player. It''s an optical illusion I guess
For stuff like starfields and nebulae effects.. it''s best to use a low res texture for the nebula, and then tile or multitexture a higher res star texture over top of it for a detail texture.
good luck
Hmm, haven''t had too much experience using 3dsmax, but I''d expect that it would be slow (since the work I''ve done in max appeared to have lots of triangles in the sphere, not too sure if i was able to change the amount, never tried)... If you are talking about a comparison between triangles and other polygons, triangles would develop the fastest display list even though it may give you more glVertex() calls. This is because all video cards are optimized for triangles since it is almost the most basic unit you can get when drawing in 3d space... and it always lies in one plane.
S.
S.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement