Game Development Community

DSSDO as a replacement for SSAO

by Lukas Joergensen · in Torque 3D Professional · 01/26/2014 (1:34 pm) · 31 replies

Hey guys!

Ever since I saw Ron's blog about SSDO as a method of adding Single-Bounce global illumination as well as Indirect Lighting I have been wanting to get a hold of a SSDO shader myself.
Bonus info: Did you know that if you google "SSDO", Ron's blog is the 5th hit? Don't come here and tell me the GarageGames community have fallen behind the Game Development frontline!

So I recently decided to give it a go, I read this article and downloaded this shader from Kayru.org.
And really, it was just a small amount of work getting it working in T3D! Just a matter of connecting the dots.

First off, what is SSDO?
Watch this fantastic video on the subject:

So where am I at?
I've got it mostly working, it seems like the occlusion is working fine, but I don't have the "bounce" part which is what gives the color-bleeding effect and allows for global illumination.

Here is a picture of the DSSDOVizPostFx:
imageshack.com/a/img849/3619/ouqs.png
Still seems like there is some issues here and there, I'm just not sure what they are and how to solve them.. Work goes on, I'd really wish I knew what I was doing LOL, I'm just poking my way through this because honestly I know little and less about hlsl and shaders, I'm just learning as I go.
Page«First 1 2 Next»
#21
06/09/2014 (5:44 pm)
Can't really say I fully grasp the math there m'self, but we were looking into mProjectWorldToScreen as it relates to LightFlareData::_testVisibility just last night for a pre-filter on occlusion-culling. Might point you in the right direction, at least.
#22
06/10/2014 (1:09 am)
Hehe I don't know what you did guys, but somehow you gave me a revelation that made me solve the SSGI puzzle:
imagizer.imageshack.us/a/img840/8066/ey6j.pngimagizer.imageshack.us/a/img856/4357/vldm.pngimagizer.imageshack.us/a/img853/5662/xpqz.pngimagizer.imageshack.us/a/img841/1379/r94b.png
Larger versions can be found here: LivingRoom GI Off LivingRoom GI On Kitcchen GI Off Kitcchen GI On

Larger versions are necessary to really get an impression of the effect.

Edit: Small issues with it being too bright in some places, I'll be working to solve that.

@Kory The code is basically the Kayru shader translated to something T3D understands, nothing more. (Except the SSGI there is a bit more to that)
#23
06/10/2014 (6:34 pm)
@Lukas
With you solving the issue have you decide what and how you plan on releasing it? I'm still VERY interested in the shader and unfortunately I'm not as good at shader creation as I wish..Let me know something we could ever work out a deal a shader for a shader maybe.. Great job on figuring it out!!!
#24
06/10/2014 (11:22 pm)
@Kory
Thou shalt pay a thousand newborn souls if thou wants to lay hands on this shader code!

Besides it's not 'done' yet.. The lighting is delayed by one frame which creates some ugly artifacts.

This is the latest image, which is not delayed by one frame:


imageshack.com/a/img855/9199/gr5b.jpg




As you see, a lot is lost from performing the calculations after the scene has been lit. I'm trying to make it look better, but as it stands I just have a color bleed shader :(

Relevant discussion

As for releasing it, I'm still discussing that with Paul.

Edit: Btw I'm really bad at shaders tbh, I'm just learning as I go. Don't let it hold you back, my experience is that you'll find shaders easier to program than you might think!.... And then you hit a wall and want to:

stream1.gifsoup.com/view6/3840613/bart-simpson-heart-ripped-off-o.gif
#25
06/12/2014 (7:02 am)
Well hopefully you guys will decide something once it's complete that will benefit you guys and the community as well...Again good luck!!
#26
06/13/2014 (2:30 pm)
My SSGI, WIP-blog 1
You can find the Kayru shader converted to T3D-compatible code there, it's not perfect though, it needs a little more work!
#27
06/13/2014 (10:16 pm)
I had a chance to play with it. Here's a before and after screenshot:

Before: i.imgur.com/z3PsZTb.jpg

After: i.imgur.com/AZ7XwPi.jpg
#28
06/14/2014 (6:29 am)
Lukas thanks for sharing the code :) I'll check it out a little later today but before I do...Is all I have to do is copy your shader from the blog? Do I need to set things up any certain way? or just copy the info, call it SSGI.hlsl, save, then add the shaders/common/..folder..then define in the shader.cs in the client folder?

Again thanks!!!
#29
06/14/2014 (6:54 am)
@Kory, the code in the blog is just a translation of the Kayru shader, it's not done and I don't recommend using it unless you intend to improve it :)

I hope to find some time to write more blogs that better explain the whole process, but I'm also working on improving the SSGI shader in the meantime.

The SSDO code IS the same as I'm using in the original post as a replacement for SSAO, but you need to do some more steps than just adding the shader, it should be added like the SSAO shader has been added, with some source code changes and changes to the vectorLight.hlsl

I hope in the future to find some way to calculate the SSDO for each light in the scene and not just the sunlight.

Anyone wanting to test or work on the proof-of-concept shader in their game are welcome to email me at ljorgensen@winterleafentertainment.com it's not really good enough for releases but it's a good start for writing a working SSGI shader.
#30
07/12/2014 (8:51 pm)
I'm trying to get my head around this.

Isn't this the same as Ubiq Visuals SSAO Shader Kit with Depth of Field Shader Kit combined? Which I believe is already included in Torque3D, or am I missing something?
#31
07/13/2014 (9:45 am)
No, there are several ways of calculating ambient occlusion, this is a screen-space method. Among screen-space method you can find SSAO, SSDO, HBAO and more.
Each of them looks different and has different quality.

Torque3D includes a SSAO method, this is SSDO which is different in that it uses directional data instead of just applying occlusion everywhere.
Page«First 1 2 Next»