Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,534 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: trying to get ssao working, too [Re: Slin] #179821
01/25/08 15:28
01/25/08 15:28
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
hmm found a strange bug:
when using a 16bit fp texture i can render the shaderresult to a rt and use it lateron in another shader as mtlSkin.
however when using a 32bit fp texture the texture gets changed on the fly o_O eg. I render the result of the depthbuffer to a tex called s_bmap_depth. Now i create a stage that blurrs the depthbuffer. Now when i want to use the unblurred texture it doesn't work, it's also blurred. This is really strange.

So when you are changing your shader to use an fp texture, first try it with a 16bit fp tex.


Shade-C EVO Lite-C Shader Framework
Re: trying to get ssao working, too [Re: BoH_Havoc] #179822
01/25/08 19:59
01/25/08 19:59
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
@ ello:

I guess you'll eventually get it right with some modifications but it looks promising so far
I've done some research and there are basically three tricks:



  • 1. applying dithering to the samplers since using a low sampling rate of the occlusion will cause artifacts. In your case, this could solve the edge bleeding issue.

  • 2. blurring the AO term and storing it in an occlusion map.

  • 3. create two passes.
    3.1 pass one ; rendering the scene normally.
    3.2 pass two ; full screen quad pass to compute the ambient occlusion at each pixel and use it to modify the already computed lighting from pass one.



Might be hard to achieve though but I guess this is logic since it's a next-gen shader effect

Edit: handy article about SSAO

Cheers

Frazzle

Last edited by frazzle; 01/25/08 20:01.

Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: trying to get ssao working, too [Re: frazzle] #179823
01/25/08 20:28
01/25/08 20:28
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Quote:

# 1. applying dithering to the samplers since using a low sampling rate of the occlusion will cause artifacts. In your case, this could solve the edge bleeding issue.



How can dithering solve the edge bleeding issue? Maybe I don't understand, but I don't think it solves the edge bleeding issues. I think you could solve the edge bleeding issues with a smart blur. Don't blur the pixel if the depth delta with neighbours is too big.

Quote:


# 3. create two passes.
3.1 pass one ; rendering the scene normally.
3.2 pass two ; full screen quad pass to compute the ambient occlusion at each pixel and use it to modify the already computed lighting from pass one.




That's not really a trick is it? It's the whole idea of the algorithm sumarized.


I think you won't get very good results with this technique, ello (I would be happy if you proved me wrong!). I think you'll get better results when you use the technique shown in the article frazzle posted. You have to actually unproject some points (with the depth and view vector) to check for occlusion.

Re: trying to get ssao working, too [Re: Excessus] #179824
01/25/08 21:04
01/25/08 21:04
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
@ Excessus:

I didn't stated it from my own experience, I actually never tried AO and I barely was up-to-date about the logarithm used within SSAO so I did some research about it. The article I posted was the fundation were on I posted the suggestions, that's why I wrote 'could'
Anyway, thanks for correcting this and I hope this article is somehow helpful to you ello

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: trying to get ssao working, too [Re: frazzle] #179825
01/25/08 22:14
01/25/08 22:14
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
download the shader workshops. you'll see how jcl uses a R32-bit TargetMap.

@BoH_Havoc: mine doesn't have that issue. i can't imagine what's happening, but mine works quite well (not the final result, yet, but the blurring of the R32-bit depth map in a separate map and comparing the results).

are you doing separate horizontal and vertical blurring to reduce the samples? i was planning on doing that if i find time today, but at the moment my shader (in a rather un-optimised fashion) generates the difference map in the same stage as the blur, so with no need to access the depth map later. i can't imagine why it would get blurred, though, if you have it in a different bmap altogether :S

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: trying to get ssao working, too [Re: JibbSmart] #179826
01/25/08 22:52
01/25/08 22:52
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Quote:


download the shader workshops. you'll see how jcl uses a R32-bit TargetMap.





Well, I know how it's handled but like I mentioned in my previous post, I didn't made the statement, I quoted it in order to give a 'potential' solution for edge blurring

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: trying to get ssao working, too [Re: frazzle] #179827
01/26/08 00:15
01/26/08 00:15
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
twasn't directed at you it was actually @ Slin, and any others who haven't got 32-bit depth maps working the easy way.

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: trying to get ssao working, too [Re: JibbSmart] #179828
01/26/08 12:57
01/26/08 12:57
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
frazzle, i came along that article, too, and it seems to be a cool approach. i was just not able to understand what rgba is telling there. maybe i need to look again and again until i get it. for now i know that my approach is not getting better

Re: trying to get ssao working, too [Re: ello] #179829
01/26/08 17:00
01/26/08 17:00
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
@ Julz:

Ah oke, well I guess I misinterpretated that ^^
The reason why I thought that you adressed it towards me is because your post has got a 'RE: frazzle'

@ ello:

I think I need to do some check up work as well since I'm not fully up-to-date about ssao yet
Anyway, I hope you'll get it right soon

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: trying to get ssao working, too [Re: frazzle] #179830
01/26/08 23:08
01/26/08 23:08
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Quote:

'RE: frazzle'


aha, sorry bout that. a symptom of "quick reply"

@ ello: i'd love to see screenshots using a 32-bit depth map, if there's any difference. with any luck i'll be able to have a somewhat decent ssao up soon too.

julz


Formerly known as JulzMighty.
I made KarBOOM!
Page 3 of 3 1 2 3

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1