Jump to content
  • Advertisement
Sign in to follow this  
MARS_999

Skydome vs. GLUQuadrics

This topic is 5096 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!