Pages

Showing posts with label ambient occlusion. Show all posts
Showing posts with label ambient occlusion. Show all posts

Monday, 14 June 2010

GPU raytrace test

Whilst I'm quite happy with the depth peeling approach my lightmapper currently uses it does suffer from precision issues in certain circumstances. Firstly, light leaks are very common and although I've found a solution, it wreaks havoc with thin double sided objects. Secondly, very large scenes containing small objects pose a problem as the resolution of the depth peel render target becomes too sparse to handle the smaller objects accurately.

I've recently been reading up on GPU raytracing so I thought I'd give it a go. To start with I've opted for the easiest thing I could think of which is ambient occlusion on a small scene with no ray acceleration structure. Here are the results...





  
The resulting AO map.

Scene Stats:
  •  364 samples per pixel
  •  1024x1024 AO map
  •  A whopping 62 polygons!
  •  Render time of roughly 10 seconds (A quick test in mental ray with 64 samples per pixel took roughly 1 minute)


It's an interesting start and I'm keen to see how it pans out.

Wednesday, 19 May 2010

Realtime tests

Thought I'd blow the dust off an old render engine I was working on to test the lightmaps I've been generating. The scene's pretty basic but the lightmap (1024^2) is working well I think. I'll post some more complex scenes soon.













The old engine was a light pre pass type renderer so here's the scene rendered with 64 dynamic point lights. I also baked an ambient occlusion map to help modulate the lighting.


Thursday, 8 April 2010

Ambient Occlusion

These images were generated in my GI app after some small modifications to one of the shaders. Instead of evaluating the colour of nearby surfaces it only evaluates the distance so it's very fast.

Hallway scene, 9 objects with 512 x 512 AO maps ~10 seconds
Sci-fi scene, 11 objects with 512 x 512 AO maps ~10 seconds
Bedroom scene, 5 objects with 512 x512 AO maps ~6 seconds