Skydome vs. GLUQuadrics

Started by
42 comments, last by MARS_999 19 years, 9 months ago
I have a Skydome somewhat coded up. After I started working on it why couldn't one use a gluQuadric instead as a skydome? Is the only reason why people don't is becuase its a waste of polygons to render the other half? Thanks
Advertisement
What does gluQuadric do?
You can make a sphere with it. You use this

sphere = gluNewQuadric();gluQuadricDrawstyle(sphere, GLU_FILL);gluQuadricNormals(sphere, GLU_SMOOTH);gluQuadricTexture(sphere, GL_TRUE);gluSphere(sphere, sphere_size, 90, 90);


Something to that effect...
I am just looking for why people don't use that instead?
+/-'s

Quote:Is the only reason why people don't is becuase its a waste of polygons to render the other half? Thanks

You might potentially need the other half, if for example your camera is very high up; so it's not necessarily a waste. The performance cost is going to be negligable anyway, unless it's highly tesellated.

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

Well, if your ground plane (by ground plane I mean the lowest height) goes straight in the middle of the sphere, then I guess the other half is wasted. GLU is open source, right?
Can't you just hack that function so it will draw a semisphere?
Quote:Original post by Raduprv
Well, if your ground plane (by ground plane I mean the lowest height) goes straight in the middle of the sphere, then I guess the other half is wasted. GLU is open source, right?
Can't you just hack that function so it will draw a semisphere?

You probably could, but it really is a waste. When done right, a box works just fine if you use seamless textures and move it with the camera, you can't tell that it is a box. If you do use a quadric, either sphere or cylinder(hint, hint), You only do it once for the skybox so the polygon waste doesn't have much of an effect. If there is a noticably difference, the problem isn't in the quadric, rather maybe the system or the video card. The box is probably the best option, it has a good result and only is six polygons, five if you are on terrain and can't see the bottom anyway. If you worry about the performance hit of a quadric, how do you plan to get any realtime simulations up anyway? Anything that looks good in 3d will have many more polygons than any sphere or cylinder that a quadric comes up with.


The box still looks ugly, you can tell it's a box.
Quote:Original post by Raduprv
The box still looks ugly, you can tell it's a box.

If the textures are seamless,and of course you don't shade the box,then it's perfect.There's no way anyone can tell that it's a box.
Quote:Original post by Raduprv
The box still looks ugly, you can tell it's a box.


Not unless you're doing it very wrong. I use 6 textures rendered from a 90 degree FOV in bryce. The textures are rendered with clamp to edge. There is no way you can tell it's a box; the effect is identical to if the scene was rendered that way in real-time (except obviously it doesn't move when the camera is translated).

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

The only thing I've noticed when using a Sky Box, is that when I start using fog in the scene, the corners have denser fog, since the the corners are farther from the camera, making it look like a "box", even though the textures are seamless.

This topic is closed to new replies.

Advertisement