So, as far as eye-candy goes, Ruined should more than fill ones appetite - at least for an indie game.
First up it's:
Dynamic Trees - the kind with leaves.
- You heard right, trees will appear to blow and sway in the wind.
- I'm also using hardware instancing for drawing trees/bushes/grass, so I should be able to have a considerable amount of vegetation on the screen at once.
- Trees are pretty awesome...
Followed by:
God Rays a.k.a. Light Shafts
- God rays create the effect of sun-rays shining around sun-occluding objects.
- In other words, it's nothing but eye candy, but delicious eye candy at that!
A word on implementation
God-rays are actually really easy to program.
- Draw the sky, masked by the environment into a TINY render-target (you can use your depth buffer for this)
- Radially blur this image into another TINY render-target, using the sun-screen-space position
- Additively blend the blurred image with your final output.
Here are some links where you can find out more on programming god-rays
- http://http.developer.nvidia.com/GPUGems3/gpugems3_ch13.html
- http://jcoluna.wordpress.com/2012/06/05/light-shafts-tone-mapping/
Dynamic Vegetation is a bit harder.
- Your model needs to have certain values painted to each of it's vertices
- In the vertex shader you transform each vertices position taking into account it's vertex color
- Blender doesn't support painting a single channel of a vertex color at a time (ie Red, Green, or Blue), so a processor must be written to combine three separate vertex color channels into one. So you have to make a channel for Reds, a channel for Greens, and a channel for Blues, then you combine all three of these channels into one.
- I then wrote my own simple model format to allow me to hardware instance with ease
Again, here are some links that have some more information on the topic
- http://http.developer.nvidia.com/GPUGems3/gpugems3_ch16.html
- http://mtnphil.wordpress.com/2011/10/18/wind-animations-for-vegetation/
Note: The tree model used in this post is provided as free-ware from the Loopix-Project in its original form.
No comments:
Post a Comment