Sky dome or sky plane?

Started by
11 comments, last by ganchmaster 18 years, 10 months ago
Hello, I want to implement a sky with moving "clouds" (textures) into my game engine. What's the best solution, a SkyDome or a SkyPlane? Where can I find information about their implementation? Thank you very much!
Advertisement
Here are some resources I found on GameDev:

Classic Sky Thread
Simple Clouds Article
Perlin Noise Tutorial

Mark Harris Homepage

Clouds are tough to model well (and to animated). There are lots of papers out there on it, but most are intended for non-realtime use.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
If you want your sky to meet the horizon (in fact, it will probably have to extend a good ways below it) you will need a dome, or some kind of enclosing geometry. If you try to make a plane, you will need to make the plane huge and you still won't be able to get it to meet the horizon everywhere. It should be possible to map textures onto a dome such that it looks like an infinite plane; also, the bottom of the dome will probably be more of a haze than definite features like clouds.

The easy and fast (in terms of frame rate) way to get moving clouds is to have some animated scrolling layers. You won't see the clouds changing though, so if you want that you might look into a technique that uses animated noise. Alternatively I guess you could try using a 3d texture and trilinear filtering between slices to get animation, but it probably won't look as good as a well-implemented procedural texture (but, again, will run much faster...)
Another option for clouds might be to use a billboard. You can put an animated texture on the billboard if you want. Manual animation is best, either by altering the texture coords or by flipping through different textures.

Also, I prefer a skydome, but I use an entire sphere to I know it wont have any holes on the horrizon. I tile a sky scape onto it, and then use billboards for the floating clouds and sun/lens flare and moon, etc...

When you render the dome, render it first with Z buffer and Z writes both DISABLED, and always render it using the IDENTITY MATRIX which will always keep it centered above you regardless of where you move.

QUAD
3DMUVE is an amateur game development team, and the designer and developer of a new gaming technology “MUVE” for the gaming industry.
Quote:Original post by ganchmaster
The easy and fast (in terms of frame rate) way to get moving clouds is to have some animated scrolling layers. You won't see the clouds changing though, so if you want that you might look into a technique that uses animated noise. Alternatively I guess you could try using a 3d texture and trilinear filtering between slices to get animation, but it probably won't look as good as a well-implemented procedural texture (but, again, will run much faster...)


well, you could combine 3D textures and procedural texture. Using Perlin noise you could fill a volume texture with 256 (for example) Z stages (int values from 0 to 255) of the clouds (X and Y values according to tex resolution).... don´t know for sure, but IIRC Perlin noise has the useful habit to animate smoothly along the z-axis. So you could precompute 256 (or more) 'frames' of a cloud animation, and if you made a tileable Perlin noise, you could 'loop' through that all the time. There should be some tutorials, screens or perhaps even animations of this in action around the web. Try google for "Perlin Noise"
True, you can precompute the noise and put it in a 3d texture, but you might have trouble avoiding appearance of tiling in time and space without having a huge texture.

If you have 256 frames as you suggest, and use a 256x256 texture, that's 16MB in a single texture, assuming you have compression at least as good as 8 bpp. 256x256 seems like a minimum to avoid seeing the texture tile in space while not having huge texels on your sky geometry. The neat thing about generating the noise on the fly is that you could have high detail without tiling or excessive memory usage, if I understand the Perlin techniques correctly.

But I haven't tried it, maybe you could find an acceptable texture size. Probably 256 frames is a lot more than you really need.
Try a skydome. Not a SPHERE but a real DOME. With a dome you can cause the illusion of sky that stretches away. You can even use some color trick in order to tint the sky depending on the hour. You cna usea a second dome with the clouds.

Luck!
Guimo
Sorry but I don't kwow the difference between a dome and sphere.

Thank you very much!
A sphere goes all the way around, and 50% of the triangles are below the ground and never seen, whereas a dome is only the top viewable 50% that is seen. In most cases this fine, but if off on the horizon you have a large crater like the Grand Canyon or something that causes a large chunk of terrain to be below the horizon, you might get a hole with a dome which only comes as low as the horizon. If you use a sphere, then apply proper culling to only the visible triangles on the sphere, I don’t think you’ll loose too much performance, but you gain the knowledge there won’t be holes. On the other hand if you are certain you’d never run into that situation, then a dome is half the size and half the tris to render, so it is a good solution if it works for your environment.

Guimo brings up a great point on shading the dome (or sphere) based on time of day. I actually do that in my engine, and it’s really easy. By setting the vertex color you can shade the dome (no texturing, just coloring) from various shades of blue in the day time to black in the night time, and provide a nice affect for time changes.


3DMUVE is an amateur game development team, and the designer and developer of a new gaming technology “MUVE” for the gaming industry.
Ok, then maybe the best solution is a Dome put lower than the horizon with a first layer only colored and a second layer with the clouds created with Perlin Noise, isn't it?

This topic is closed to new replies.

Advertisement