Monday, April 10, 2006

Yesterday I did a quick test of grass rendering.
The grass waves slowly in the wind and is rendered as thousands of camera facing billboards. The nice thing is that everything is done on the GPU. The billboards are stored in one single static vertex buffer and the transformation to face the camera and the animation is done in a vertex shader.
I'm also using a neat trick to "fade" the grass out over distance without the need of alpha sorting.

It's not that good looking right now, but it's just a quick test. Putting it on real terrain with more variation of foliage and good texturing and lighting will hopefully make it look better.


Mr. Volckmer said...

Can't wait to see your vegetation implementation develop. :)

Kyle said...

Just found your blog a few days ago and I must say it is amazing. What else do you intend to implement? I can't wait to see the next post.

Alex said...

You posted me on GDNet because of
terrain rendering, however, I clicked your link and what I saw, it was amazing, I mean it is amazing.
This is exactly what I want to do.
I´m absolutly enchanted. Your terrain engine looks totally incredible.
Maybe you want to try something else because of your gras problem.
I haven´t implemented it yet, but it looks just fine. See
for more detailed information.
I will keep an eye on your website.
Good luck.


Anonymous said...

Would that neat trick be modulating the alpha channel with noise and then alpha testing as described in GPU Gems 2? What a sweet book. Anyway great job on your development, you are really making progress.

Jonas Risbrandt said...

Anonymous: Indeed, that is the trick I'm using:)

I have both GPU Gems books and they are worth the money tenfold!