Skip to main content
gamedev.net
🔒 Locked

Skydome

Started by Rudan 3 replies 850+ views
Original Post
Rudan
Rudan
What is the best way to do a sphere for a skydome in openGL? I''ve tried some things, but I still dont know how to do it. I really could use some help! Thanks...
-----------------------------Reporter: Are they slow-moving, chief?Sheriff: Yeah, they're dead. They're all messed up.-Night of the living dead
Facehat
Facehat
I''ve found that it''s generally easier and faster to use a sky-box instead. Some idea, but instead of drawing dome you just put a cube around the player. It looks just about as good.

But to answer your question:

For the sphere, I believe that glu has a sphere function. You should probably look that up. Also, make sure you set the cullmode correctly.


-------------------------------------------
"Don't worry about it sir, it's an eye-dee-ten-tee error -- takes too long to explain -- have a nice day."
I d 10 t
milo
milo
Vell, eez acshually wery sympeel. Just e-mail me and I''ll send you the dome class from a small demo I wrote a month or two ago. Kinda simple. Kinda undone. Does not use GLUT. But, it does draw a static textured, vertex lit, sky dome. So it should give you a start. You can control such things as the radius, z-scaling, vertical divisions, horizontal divisions, how big a slice off the top of a sphere you want for your dome, origin of the dome, etc.

However, an improvement that I may do (if I''m not more motivated by doing something else) is to rewrite it to calculate the vertexes as a geodesic dome. If you look at Dagoth Moor Zoological Gardens in wireframe mode, you''ll see what I''m pretty sure is a geodesic dome instead of a sphere. Theirs looks a lot smoother than mine at the same number of triangles. Plus, the triangle fan at the top of my spherical dome stands out unless vertical divisions of the sphere is pretty high. I''m pretty sure I can do the geodesic dome with no triangle fan.

Something else I probably don''t have right in my demo is the lighting settings. Anyone want to guess how the lighting is set for the sky in DMZG? Even though DMZG is a demo for nVidia T&L, are they using lightmaps, as well? I can''t decide.

Mike Roberts
aka milo
mlbobs@telocity.com
Rudan
Rudan
Thanks for your help.
I''ll try to do a skybox and see how it turns out.

-----------------------------Reporter: Are they slow-moving, chief?Sheriff: Yeah, they're dead. They're all messed up.-Night of the living dead
Pauly
Pauly
Go to http://www.flightgear.org if you download the source you''ll see a coloured skydome class. You provide the angle of the sun and it colours the dome for you. Very very cool twilight effects....

It uses the SSG scene graph, but it''d be pretty easy to reverse engineering it back to pure OpenGL.

Paul.

Topic Locked

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

Sign in to reply to this topic.