Sign in to follow this  

atmospheric scattering (almost working)

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

sun looks great but sky is purpie, my scattering coefficients are the ones given in the preetham paper. i will see if i can post code later. seems like mie scattering is right and rayleigh is a lil off oh and btw one critical thing i rarely see mentioned is that since this is a sky that in perspective never changes position in relation to the viewer (except the sun) is that 'fairly accurate density function' from the papers can easily be precalculated at each vertex in the sky dome and is givin by (in page 2 of preetham siggraph 2003 course notes) 1 ---------------------------------------- (cos(theta) - 0.15*pow(93.885 - theta), -1.253)) where theta is the angle from the zenith(str8 up (0, 1, 0))

Share this post


Link to post
Share on other sites
When I implemented atmospheric scattering I used the Sean O'Neil technique (link) from GPU Gems 2. Check that out it may help you fix your problem.
Quote:

i will see if i can post code later.

That would help.

Share this post


Link to post
Share on other sites
Just to warn you. I didn't find that the Sean O'Niel gave good results when the camera is INSIDE the atmosphere. I would advice you to give the Preetham implementation a go instead. True is it not physical correct, but it gives damn good skies compared.

Share this post


Link to post
Share on other sites
Yeah I found problems with it, but I managed to work around them. The results looked like this.
I abandoned that project along time ago.
/edit
I managed to work around SOME of them. You can see the banding/shearing problems on the top row of images. I think the chapter in GPU Gems 2 says you only get this problem on nVidia not ATI.

Share this post


Link to post
Share on other sites

This topic is 3843 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.

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