Saturday, April 22, 2006

As some might have noticed, I haven't updated the blog for some time now. The reason is that I'm on vacation in India with my girlfriend. I'll be staying here for three weeks so there will be no coding for a while:)

I just wanted to thank everybody who have left comments and sent me email. It's very encouraging and makes me want to keep on going!

In a few hours we're leaving for Kerala. It's supposed to be a real paradise and I think we'll have a great time!

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.

Friday, April 07, 2006

I got stuck when trying to redesign my engine to better support materials that depend on multiple render passes. So I started working on a cloud system instead:)

The system if fully dynamic and the clouds move and deform. The lighting is a (rather) simple trick but looks quite nice. I got the basic idea from an article by Michael Gehling in last months GDMag. I just modified it to suit my needs. The main problem I have is that it's very hard to tweak the system to look good in all situations. Settings that look good at dawn look crap at noon and vice versa. But I think I can solve that by interpolating settings over the day-night cycle.

Another problem is that things are getting rather costly as you can see on the fps counter:) So far I've done no optimizations what so ever so I think I can squeeze quite a few more fps out of this baby.

Here's a few new screenshots:

Tuesday, April 04, 2006

I've added water to the engine. So far there's only reflections but refractions are coming up.

Now I need to render the scene multiple times per frame. The geometry that is going to show up in reflections is first rendered to a texture. This texure is then used in a second pass where the scene is rendered as normal but the reflection texture is projected onto the water plane. The same has to be done for refractions. The reflection pass is done with a lower LOD setting to increase speed, and the distortion of the water makes it very hard to notice the decreased LOD anyway.

I'm not totally happy with the way these multiple render passes are handled by the engine, so I think I have to redesign a bit. That's why I left out refractions for now.

Monday, April 03, 2006

For the second assignment in the ASR course we took a dive into the beautiful world of Global Illumination.

We had to write a Monte Carlo path tracer. The math is a bit involved but it all boils down to a very simple algorithm. Take a loot at this slide for more information.

What you gain in simplicity you loose in speed. Since we approximate the rendering equation with random sampling (Monte Carlo integration) we need to sample a lot to reduce noise. The first image was redered at a resolution of 1024 x 1024 with 625 samples per pixel. It took 72 minutes to complete. The second one uses 2304 samples per pixels and took about 6 hours to render:)

I really like the second image. Note the caustics formed by light passing through the glass objects. Quite pretty! Kudos to Jesper for setting up that scene!