Skip to main content
gamedev.net
🔒 Locked

SkySphere Question

Started by webjeff May 4, 2004 at 10:52 AM 6 replies 600+ views
Original Post
webjeff
webjeff
I created a skysphere circle, however, do I put a texture on it?? How do I make it cool like daytime/nighttime. Are those just different textures? Thats gonna be one huge ass texture, haha. I got a circle, what do I do next? Thanks Jeff
neneboricua19
neneboricua19
You would normally put a texture on it. You need to set the texture coordinates of the vertices of your dome to be spherical texture coordinates.

Daytime/nighttime effects are a little more difficult. I''ve never done them myself before so I can''t offer much advice. Perhaps someone else on this board can help.

neneboricua
Supernat02
Supernat02
To add, a sphere is nice because you can rotate the sphere, thereby giving the impression of a change from day to night, vice versa, and make clouds and stars move (you can add a second, smaller sphere, and alpha blend it over the first sphere). This is pretty simple and looks simple. You have to get a lot more complex if you want more realism. I would recommend using a semi-sphere that''s oval in shape. In other words, the top part of the dome is mostly flat (or just very sparsely curved) and at the edges of the world, it sharply curves toward the world...kinda like a mushroom. This will make your clouds look like they''re actually moving off into the horizon, instead of like they''re flowing around in a big circle. Even doing this, you have to account for the sharp curve at the horizon point (there are ways to deal with it). You have to update the texture coords every frame if you do this. If you think you can get away with just a big sphere, and it does what you want, then use that.

Chris
Chris ByersMicrosoft DirectX MVP - 2005
webjeff
webjeff
Hmm,

OK, if I use a semi-sphere (half sphere) and use a texture, I can''t rotate the sphere anymore cause its only half of a sphere now, do I move the texture?? How does that work, I knew someone who used coloring in the triangles themselves to make it look from day to dusk to night, any ideas on how to do that?

Thanks
Jeff.
bzroom
bzroom
I would make your sky texture black and white. Then set your vertex colors to the tint you want the sky to have (blue->orange->red->black). As for moving the coordinates there should be a texture matrix stack, just google for it.
Arcibald Wearlot
Arcibald Wearlot
i used a sky sphere some time ago, but there are some problems, the biggest one is the texture coordinates. its nearly impossible to texture a sphere perfectly at the top, there are visible artifacts. just open 3dstudio max and map a sphere with spherical coords, and look at the top, the texture here will be distorted. i found no way to avoid this problem. another problem is the clouds that "fall" into the horizon, rotating around you, while they should go plain over the horizon, just a bit curved.
so for now im using a sky plane, that is a plane curved at the edges. it is similar to an half-sphere but i dont get the artifacts of spherical coords. im thinking about using fog with the same color of the sky, so i can get a nice effect of clouds disappearing into the far horizon

[edited by - Arcibald Wearlot on May 4, 2004 5:25:13 PM]
imDivineLight
imDivineLight
Have you seen the Donuts Demo, it uses a sky sphere, i don''t thinks it''s mapped wrong, can''t we use their mesh in our worlds, atleast we don''t have to chane sphere geometery!
::- Hear the beauty of silence -::

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.