Car demo - deferred rendering

Vilem_Otte 117 Mar 03, 2010 at 15:00



as most of you probably noticed by now, I’m still not dead (and/or married) and continuing in my passion - and thats programming, especially graphics demos and game development.

So what am I having to show - this image is showing (as you might noticed) Porsche Cayenne model rendered on my own technology, along with Havok physics (but well it can’t be seen until it is not moving).

So to the technical details - the graphics engine is made from hybrid renderer - it is based on 2 renderer kinds, the deferred renderer along with real time ray tracer.
I finally achieved shadows I was trying to achieve for very long time (improving the algorithm for almost 2 years or so), and this still isn’t the end (it will never be). Although it approached quality, where it is general, fully scalable and fast solution … to achieve physically plausible soft shadows, either high frequency or low frequency.
Whole solution is based upon lots of math, and sampling (who would expect that) … the algorithm is basically same as when you’re computing ray traced area shadows … but heavily optimized to achieve everything in real time on mainstream hardware.
Another thing in this demo is (probably not seen until I post wire image) progressive tessellation, it is pretty much useless for this one (except for getting “meshsmooth” like effect) - because there isn’t any displacement mapping present … but I would definitely count it as good effect.
And I shall continue … another one is real time dynamic reflections inside deferred renderer (it was heavy magic to achieve this one), eh… to achieve this one to move in real time. And I’m happy for that.
There is also cool ambient occlusion present. The last new technical thing is multisampling inside MRT, that is also supported on current version.

Okay, some more images of this cool car are here:

[img][/img] [img][/img]

[img][/img] [img][/img]

And I have also video updated on youtube - Here
Or you can visit my blog, where you can view the progress of development on demo - Here

I would like to hear any comments and I can try to answer any question from you.

8 Replies

Please log in or register to post a reply.

JarkkoL 102 Mar 03, 2010 at 15:12

Very nice, good job! I like car physics in the video too (: Can you tell more details how you combine raytracing with traditional rasterized GPU rendering?

vrnunes 102 Mar 03, 2010 at 15:17

definitely looks good!

legloups 101 Mar 03, 2010 at 19:55

Good job, the render is beautiful and the physics too :)

sebh 101 Mar 04, 2010 at 10:21

Good work!

Can you give some details about your shadowing algorithm? What sort of light is used here? Area or the sky? Something interesting may also be done for shadow coming from the sky with importance sampling. (I have seen some paper on this)

If I understand, your shadows are ray traced? What kind of data structure do you use?

Everything else is rendered using the deferred renderer?

Vilem_Otte 117 Mar 04, 2010 at 21:06

Thanks for the comments, I finally got to answer here :) … so let’s start…

#JarkkoL - I’ll post here few images, that will get you the basic idea how to combine rasterized (deferred) and ray traced buffers together (they’re combined inside a pixel/fragment shader):
Ray traced buffer contains AO and shadows [img][/img] is combined with deferred buffers - reflections deferred buffer [img][/img] and lit deferred buffer [img][/img]

Hope that you get the basic idea -> e.g. computing deferred buffer(s) and ray traced buffers and after everything combine them together to get final results.

#sebh - There is area light in the scene, I also developed very nice GI algorithms for inside/outside use … but it still needs a lot of fine tuning, so it is not used here.
Here are just shadows separated and maxed out:

For ray tracing most suitable structures are KD trees (mostly for static scenes) and bounding volume (interval) hierarchies (for dynamic scenes) … and this scene is dynamic -> so BVHs/BIHs are better for this purpose … and thus I’m using them (BIHs to be exact).
As written a bit up - ambient occlusion and shadows are generated inside ray traced buffer and reflections and lit scene is generated inside deferred buffers. All is combined then to get high quality image result.

I’ve post few images on my blog where shadows/AO (separated and combined) were maxed out … so you can just look there and see how it looks when they are at maximum quality.

JarkkoL 102 Mar 04, 2010 at 22:00

Ok, so I take that you compute raytracing on CPU and pass full frames of the raytraced buffer to GPU each frame for composition?

Vilem_Otte 117 Mar 08, 2010 at 11:22

Basically yes, althought would also be possible to compute them using CUDA/OpenCL (holding them on GPU all the time might also give better results than transferring from memory to GPU).

Anyway I don’t know about speed boost if I would swap to GPU raytracing, because GPU is pretty much used at full scale while performing multisampled deferred rendering.

elfrank 101 Jun 28, 2010 at 20:48

how do you compute the secondary rays?