Jump to content
  • Advertisement

This topic is 385 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

How many ico sphere subdivisions steps does one normally use for rendering sky domes? Depending on the resulting number of vertices, does one normally use the Geometry Shader for the tessellation or just bind a mesh? Which non-uniform scaling does one typically apply to transform the ico sphere to an ellipsoid (flatter appearance thus more natural)?

For rendering an ico sphere as model, I typically use 5k triangles (2.5k vertices, 5 subdivision steps).

Edited by matt77hias

Share this post


Link to post
Share on other sites
Advertisement

2 triangles ? a sky dome is a infinite distant surface,  all you need is a view vector from your pixel position and use it to intersect a virtual geometry to sample your sky textures :)

Edited by galop1n

Share this post


Link to post
Share on other sites

A sky dome is rendered around the camera, and is actually pretty small. Its just enough to cover the entire view of the camera, and moves with it, so it appears infinitely distant. So, really anything that covers the entire view of the camera would work. Sky boxes (a cube) are pretty easy to implement, and won't require any texture scrolling.

If you want to use a ico sphere anyway, just divide it once, or twice. Twice, going by how blender does it, gives you a round enough sphere with only 42 vertices.

Share this post


Link to post
Share on other sites
12 hours ago, galop1n said:

2 triangles ?

Could I still achieve the following (by applying stretching the transformation some how):

Fig17-6.png.09c877cd7316efce800fd6e46a865a91.png

The sky above the camera appears flatter (less curved).

Edited by matt77hias

Share this post


Link to post
Share on other sites

I was hoping galop1n would answer this, because I'm not sure if I fully understand the way he was talking about doing it. But it seems like you could use the angle from the view vector to the horizon to translate the geometry towards the camera when looking up enough.

Share this post


Link to post
Share on other sites
1 hour ago, Yxjmir said:

I was hoping galop1n would answer this, because I'm not sure if I fully understand the way he was talking about doing it.

If you use a fullscreen primitive (quad, triangle, etc.), you only need the NDC xy coordinates and use NDC z=1.0 (far plane), transform NDC -> (float4) -> view -> (float4x4) world, sample the cubemap with the world space coordinates. This should be equivalent with a sphere about the camera.

Not sure, how he intends to stretch (non-uniform scaling?) this sphere to an ellipsoid, however.

Edited by matt77hias

Share this post


Link to post
Share on other sites

If I were you, unless you can figure it out or find a tutorial/example, I would just use a cube or sphere. You can rotate them, and change the color multiplied by the texture color to simulate day/night cycle, or have it fade over time into the sunrise/noon/sunset/midnight textures. The Sun is its own billboard(always faces directly towards the camera), and so is the moon, stars/clouds should be on the skydome's textures.

You could also fake the depth of the sphere with a slightly smaller one that is shorter along the up-axis that has a cloud texture, and rotates around the depth-axis. Doing this you don't have to worry about the long side of the ellipsoid ending up overhead. It also makes the clouds move independently of the day/night cycle adding to the realism.

Whatever you decide, start simple then after you get it working add things like trying to simulate depth on the 2 triangles.

Share this post


Link to post
Share on other sites

My skybox can be set to 4 to 16 planes, box to circle, with different colors for up and down vertices, and selectable how many times the texture will be mirrored,

the only problem i have is the top and bottom not being there, so you cant look up in my games,

i need some professional skybox tutorial, or maybe have a sky geosphere ?, i want fast low poly rendering with best results,

i also want moving clounds passing by, anyone have good tutorial ?

Share this post


Link to post
Share on other sites
10 hours ago, the incredible smoker said:

the only problem i have is the top and bottom not being there, so you cant look up in my games,

This sounds like it might be a face winding order problem or normals are pointing the wrong way.

10 hours ago, the incredible smoker said:

i want fast low poly rendering with best results

Using a cube is the simplest and if textured well enough you won't notice a difference between it and a sphere, no matter how many sides it has.

This looks very simple, but I haven't tested it, it uses openGL but the steps are pretty much the same regardless. It looks like a series of tutorials so maybe he explained other parts that you need to fully implement it.

http://www.mbsoftworks.sk/index.php?page=tutorials&series=1&tutorial=13

I would like to point out that the skybox should ONLY show the sky/sky and clouds. The cube map example image in the tutorial is a bad example for a skybox. If you need more help, you might need to start a new topic, since matt77hias asked about subdividing the geometry, and make an icosphere appear flatter.

Share this post


Link to post
Share on other sites
14 hours ago, Yxjmir said:

This sounds like it might be a face winding order problem or normals are pointing the wrong way.

I did not add triangles for the top and bottom, just the sides, so there is no problem.

 

14 hours ago, Yxjmir said:

Using a cube is the simplest and if textured well enough you won't notice a difference between it and a sphere, no matter how many sides it has.

If there was no difference in performance then i want it completly sound, i bet the PC crashes, ofcourse it matters, also in poly count.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!