Car demo - deferred rendering

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Mar 03, 2010 at 15:00

10-03-02.jpg

Description
Hello,

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]http://1.bp.blogspot.com/_PHCyn95roV0/S4sGHMlb_OI/AAAAAAAAAFI/v-_HupkzG8U/s200/Cayenne01.PNG[/img] [img]http://2.bp.blogspot.com/_PHCyn95roV0/S4sGIPVwS6I/AAAAAAAAAFg/E8ZyZlpNU_o/s200/Cayenne04.PNG[/img]

[img]http://3.bp.blogspot.com/_PHCyn95roV0/S4sGH8V6IrI/AAAAAAAAAFY/sd68oSrnAXE/s200/Cayenne03.PNG[/img] [img]http://2.bp.blogspot.com/_PHCyn95roV0/S4sGHt86ajI/AAAAAAAAAFQ/tlxTVGgHYo0/s200/Cayenne02.PNG[/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.

Fe8a5d0ee91f9db7f5b82b8fd4a4e1e6
0
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?

17ba6d8b7ba3b6d82970a7bbba71a6de
0
vrnunes 102 Mar 03, 2010 at 15:17

definitely looks good!

B1ebc32b2ab75924065ab8508b62e224
0
legloups 101 Mar 03, 2010 at 19:55

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

A5bd7bba12c38eaadbd1efd1c2ac0c77
0
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?

B20d81438814b6ba7da7ff8eb502d039
0
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]http://2.bp.blogspot.com/_PHCyn95roV0/S4_GOiYeLOI/AAAAAAAAAGI/ERgB1jwZq0g/s1600-h/RTBufferOUT.PNG[/img] is combined with deferred buffers - reflections deferred buffer [img]http://1.bp.blogspot.com/_PHCyn95roV0/S4_GNho1hOI/AAAAAAAAAFw/fmq_e2RCdAI/s200/DSreflOUT.PNG[/img] and lit deferred buffer [img]http://2.bp.blogspot.com/_PHCyn95roV0/S4_GNcL_wuI/AAAAAAAAAFo/3zl8WgBqoPc/s200/DSOUT.PNG[/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:

[img]http://4.bp.blogspot.com/_PHCyn95roV0/S4_GOA76UvI/AAAAAAAAAGA/uovnIHbeytM/s200/MaxShadows.PNG[/img]
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.

Fe8a5d0ee91f9db7f5b82b8fd4a4e1e6
0
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?

B20d81438814b6ba7da7ff8eb502d039
0
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.

F0094edf2671828625baaf81afbabe97
0
elfrank 101 Jun 28, 2010 at 20:48

how do you compute the secondary rays?