Atmospheric Scattering
Well this is a pleasent surprise. I started tinkering with Sean O'neils sample code about atmospheric scattering [Edit 01/2008 - but his site has since gone away). His implementation was in GLSL and I'm working with DirectX (.NET FTW). I actually managed to copy and paste the shader and fix it up and it mostly works. It's amazing what some nice shaders can do to make things look nicer. I think this is pretty good for my first HLSL program ;)- Details
- Written by Chris Savoie
- Category: Update
- Hits: 2583
I love sleeping
I'll update this with more info later. Short story: A comment I read on another site left me thinking while I was asleep: Prioritize triangle subdivision based on screen space movement. I simplified this to a sorted list based on movement perpendicular to the camera forward vector. Here's the results.Update:
To explain a bit better. When a triangle subdivides without updating it's three edges are split in half. The new points created are just interpolated so the screen space movement should be 0. I then get the position if that point was updated and test the difference between the two vectors against the up and right vector of the camera. I add the two magnituded and the final output is what I use to sort the order of triangle subdivision. To narrow down the search I simply ignore backfacing triangles. This can be bad because there's a change that subdivided version may appear above the horizon. I'll worry about that later.
A quick explanation for the pictured. The first one is simply what the planet looks like from far away now. The second is what the back of the planet looks like, it's completly un-subdivided. The third picture is a view from the planet surface and the last is the same view from over head to see how the subdivision worked.
- Details
- Written by Chris Savoie
- Category: Update
- Hits: 2395
OMG A PLANET
I must have done something right. Converting terrain to a planet took all of 2 hours. A couple tweaks to collision works a little bit but likely I'll have to make a decent octree system for collision. I'll worry about that later. For now PLANET!
- Details
- Written by Chris Savoie
- Category: Update
- Hits: 2402
A bit of rambling
Not sure where to go from here. I'm not 100% about the quad tri system anymore. The T Junctions are starting to concern me a bit. I need to get some more motivation. I'll be studying lighting techniques... since I've never done it before. I haven't really been working on it much lately because I haven't been able to think of what to work on. For some reason I don't think it's quite at the state to apply to a planet. Maybe I just need to do some refactoring. Current list of things that need to be done 'right':
- Culling
- Proper thread based subdivision
- Texturing
- Lighting
- Add Quad/Oct tree for faster collision
- Water
- Clouds
- Atmosphere
- Stars
- Sun
- Foliage
I need to stop complaining about something to do and just do something. For now you just get furry terrain.
At least I know the normals are correct.
- Details
- Written by Chris Savoie
- Category: Update
- Hits: 2499