Sign in to follow this  
winsrp

skybox, skydome or skywhatever that will allow day and night

Recommended Posts

so terreain is looking good, and now I've reached the point where I need to start making some sky, sun, moon, stars, sunset, sunrise, and maybe moving shadows.

HLSL seems to be mad at me and it just does't want to cooperate, besides my HLSL knowladge seems to be closer to 0 than what I would like to.

I've read somewhere that insted of a skybox, that is rather flat, I might try to use a skydome, make a sun with HDR, and a lot of stuff I just can't get.

The only requirement I've got (to make it look pretty), is that day to night transitions can be seem on both sides, so on the half where the sun goes down it shows orange to blue gradient transition, while at the same time on the other half it shows kind of blue to black gradient transition.

Shadows should move with the sun position, and the moon should shine a tidy bit.

So, I would like to request help (lots of help) from the gurus in this forum, please o please... help!!.

Share this post


Link to post
Share on other sites
I've never done this before, so take my advice with a grain of salt, BUT could you, instead of using a sky"box" use a sort of sky "sphere"? On one side have it day time, on the other have look like night and have the gradient between the two on each side between them?

Then in game you could just rotate the sphere and have a light follow where the sun/moon is?

Don't know how to explain, and that is probably the wrong way to do it. But it's just an idea :P

Share this post


Link to post
Share on other sites
[quote name='winsrp' timestamp='1341500103' post='4955995']
The only requirement I've got (to make it look pretty), is that day to night transitions can be seem on both sides, so on the half where the sun goes down it shows orange to blue gradient transition, while at the same time on the other half it shows kind of blue to black gradient transition.
[/quote]
Why don't you simply interpolate between a day and night texture.

As for the sun, if your looking for something that looks a lot like a sun incorporate [url="http://developer.nvidia.com/node/170"]volumetric light scattering[/url].

Since you said your using XNA I would imagine you don't have much experience doing pure graphics theory, usually that is wrapped up in classes, so you might try checking out this XNA [url="http://xnacommunity.codeplex.com/wikipage?title=Componente%20SkyDome&referringTitle=Componentes"]example[/url] I found online. Edited by DevLiquidKnight

Share this post


Link to post
Share on other sites
I think it would be more complex than a simple interpolation. I have not done this, but I think that you might get away with a rotating sphere that just contains the sun/moon/stars, then have a few timed interpolations for the sky colour (e.g. sunrise, day, sunset, night). I assume you want HDR so you can do things like eye adjustment?

Share this post


Link to post
Share on other sites
sphere going around, is an interesting idea, but, it does has some problems, as the gradient starts to show when its like 2pm... not right, and if I would make the gradient smaller the effect just won't look right, but is not a bad idea overall combining other techniques.

Graphics theory and me, yeah... not really good at it, mostly doing self thought lessons here, with the help of the forum of course. That XNA example look promising.

I was thinking like jeff here which has the interpolation, the textures, colors, HDR, well I know what it is from what I've read and it does looks cool, would be in the nice to have list, but not entirely required. So this could be a point up for all of you, as the idea is just the combination, of all... I just wished that example would be in xna 4.0... instead of 3.1, dang it.

I'll try to make a rotating sphere with some colors to start, and see how that comes up.. then, I'll just try to make some nice night textures, and the day texture, might as well just be a light blue sky with a white sphere on it, as my clouds are move live than just a image pasted on top of the blue (or that's the plan for the soon to come clouds).

Share this post


Link to post
Share on other sites
I wouldn't start with colours on a sphere if I were you. The thing about sunset is that it's always centred on the horizon, it doesn't move around the sky. I would first interpolate non-moving sunrise/day/sunset/night background colours, then draw the rotating sphere with a transparent background on top of it. Moving clouds would be cool, but remember that clouds are complex - their colour depends upon both ambient and direct lighting.

Share this post


Link to post
Share on other sites
so.. you are suggesting that I draw 2 spheres?? My clouds are going to be 3d objects, so no problem there, whey will take both shadows and light from the sun.

And make rain.

Share this post


Link to post
Share on other sites
I think that would work decently. What are your plans for clouds? The problem is that the light interaction with real clouds isn't simple. I read a most complicated article on it years ago. ;)

Share this post


Link to post
Share on other sites
well, my game is made of cubes, so I was going to make voxel clouds, flying around, those will solid white, and flying through the land, so they can actually pass on mountains, and you can get in the clouds, of course they are not terrain like solid.

So they are just like any other object in the scenery that will take and produce shadows.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this