Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (howardR, sleakz), 706 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Gallery
Next Gallery
Print Thread
Rating: 5
Page 2 of 5 1 2 3 4 5
SSAO v0.6 for A7 & A8 #330073
06/25/10 15:08
06/25/10 15:08
8 Images
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
SSAO v0.6 for A7 & A8

SSAO v0.6 for A7 & A8

This is the 0.6 release of SSAO for Gamestudio A7 & A8!

It has been in development for about 1,5yrs now. After working on the new version for nine months, it has improved in many areas: it is ~21% faster than it's predecessor, it introduces a CHM manual, and automatic GPU-bone support, and a new demo (gpu animated characters with SSAO, DOF and PSSM shadows), and support for decals, and user events, and functionality for attached post-processing chains that want to re-use the depth- and normalmap, which is generated by SSAO, even if SSAO is disabled.

Core features
  • Compatible to A7.86.6 & A8.30.3, shader model 3 required
  • Easy integration into any existing renderchain
  • Supports fog and particles; static meshes; solid-, alphatesting and softalpha entities; decals (new); animated sprites
  • Automatic GPU bone support (A8 pro only) (new)
  • Works with (blurred) stencil shadows and PSSM shadows
  • Can sample depth- and normal map, even if SSAO is disabled (new)
  • Lots of showcase demos included + source
  • CHM manual (new)
  • Free to use in any project (MIT license)

Download (2011-10-10)
SSAO v0.6 source + demos ~44MB


Donation
If you like this software, if you find it useful or if you use it in a project (that maybe goes commercial), - and you would like to help me to find the time to work and improve this, please consider a donation via PayPal smile

Behind the scenes
The main targets for the current release were driven by structural- and performance related changes. While introducing GPU bones, I noticed that the amount of surface shaders exploded. I was also sick of having doubled code in all shader, so I wrote a unified shader which is being compiled during startup several times in different flavors for the support of all surface types and cpu- and gpu-animation support. I also pass compiler #defines to the shaders, which caused a huge boost on the performance in general, and, depending on what you dis- or enable, you get lots of extra frames. I also made the encoding scheme for the upscaling stage based on a texture lookup, which gave me also a instant boost. Plus, I made the sky pixel rejection right now, so, the performance is now also dependent on the amount of sky you have, so, SSAO will now run in space- or racing games, where the sky makes 50% of the screen two or more times faster! Another big win is the newly introduced manual.

Forecast & Call for projects
The upcoming features are now listed in the manual! The list is quiet huge and if you need some of them in a hurry, don't hesitate to contact me! It would be really cool to be in touch with developers, who actually use it, because they give me almost all the time hints how to improve it.

Kudos
The GPU-bone support was mainly targetted to be used for the zombie hordes in Call of Death, thanks to Zapan who actually came up with that feature request. The release takes also advantage of some custom engine features added by JCL, thank you very much for that! I also want to thank Slin, JustSid, Superku, Firoball, PadMalcolm, Jane, Kitsu and ChrisB for their assistance to make this possible! Also thanks to the whole community, I love you smile A8 ftw!

Have fun and best regards,
-Christian

P.S: don't forget to post bugs and comments wink and in the case that you don't like it, tell me why!
Last edited by HeelX; 10/09/11 19:28.
47 Comments
Re: SSAO for A7 & A8 v0.51 [Re: HeelX] #351113
12/21/10 21:52
12/21/10 21:52
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Quote:

Thanks for helping me!!

No, we have to thank you for this great shader. Thanks a lot.




Last edited by Widi; 12/21/10 21:53.
Re: SSAO for A7 & A8 v0.51 [Re: FBL] #351445
12/25/10 00:13
12/25/10 00:13
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I will test the demo(s) as soon as I will have access to my (gamestudio) pc again and I will check if I can find/ help you with the problem(s), but only in a couple of days.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: SSAO for A7 & A8 v0.51 [Re: FBL] #351639
12/27/10 16:43
12/27/10 16:43
Joined: Sep 2002
Posts: 1,604
Deutschland
ChrisB Offline
Serious User
ChrisB  Offline
Serious User

Joined: Sep 2002
Posts: 1,604
Deutschland
I've looked into it (i have a Geforce6600). Your mrt-depth rendering doesn't work.
If i'm remembering this correct you have to use textures with the same total bit depth on each rendertarget, which means if you bind a 32bit floating point single channel texture on rendertarget 0 you have to use a 32bit texture on rendertarget 1.
And don't use single channel 16bit floating point textures on geforce6/7. They support it somehow now (after some driver updates) but R32F is still faster on these cards.
Code:
#define PP_SSAO_HIRES_DEPTH_FORMAT        14    // 32 bit FP
	#ifndef PP_SSAO_NOSOFTALPHA
		#define PP_SSAO_HIRES_NORMAL_ALPHA_FORMAT 32    // 3 x 8 bit (normals) + 1 x 8 bit (alpha) -- default
	#else
		#define PP_SSAO_HIRES_NORMAL_ALPHA_FORMAT 32    // 2 x 8 bit +(normals)
	#endif


works fine for me.


www.Swollen-Eyeballs.org
ICQ:169213431
#3dgs@quakenet
Re: SSAO for A7 & A8 v0.51 [Re: FBL] #351721
12/28/10 10:11
12/28/10 10:11
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Hi folks,
I added the fixes described above, made some other fixes and uploaded it as version 0.51! - It works here as perfect as the 0.5 release, but this should work now better for some of you who have a nVidia card. Please test it and report all bugs.

Download (2010-12-28)
SSAO v0.51 source + demos ~38MB
SSAO v0.51 source only ~27KB

@Firoball/Superku: If you still have problems with black seams at edges between geometry and the sky, please run the ikasoeder demo, wait until the camera is static and make two screenshots: with SSAO active and inactive. I am away for the next days, but around the weekend I will upload two tests, one which is intended to examine the sky-border problem and second, a test in which I split the targets I use in the blur pass. This will lead to twice the lookups in the blur stage, but maybe it fixes the remaining issues. Regarding the sprites, I will evantually hack the diffuse view and force softalpha sprites not being rendered, but in the particle pass (which will be called alpha pass, if it makes into the release).

Last edited by HeelX; 12/28/10 10:14.
Re: SSAO for A7 & A8 v0.51 [Re: HeelX] #351749
12/28/10 12:47
12/28/10 12:47
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline
Expert
Puppeteer  Offline
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Everything works fine for me.
But the particles demo doesnt work the way it should:
Click


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: SSAO for A7 & A8 v0.51 [Re: FBL] #351754
12/28/10 13:18
12/28/10 13:18
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Thanks for testing, guys!

Originally Posted By: Puppeteer
But the particles demo doesnt work the way it should [...]

@Puppeteer: Can you please force a "standard" 4:3 resolution (e.g. 1024x768) and test it again? Looks like the view sizes are different or so (you are testing it on a super widescreen, aren't you? ^^)...

Last edited by HeelX; 12/31/10 12:50.
Re: SSAO for A7 & A8 v0.52 [Re: HeelX] #352626
01/04/11 21:36
01/04/11 21:36
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Dear users,

together with the great help and assistance from Superku and Firoball I was able to make the sprites now work and I hope v0.52 is now fully compatible to any SM 3.0 card on planet earth grin

The depth is now sampled as normalized float, packed into an 888 format on an 8888 target, to make depth-blending work on some cumbersome nVidia cards. Since the first post processing stage does a bilinear sampling on the depth map, direct sampling on packed floats will result in slicing-artifacts on planes parallel to the camera. To overcome this, an additional unpacking pass has been hinged in right before the SSAO approximation takes place. The benefit of this are not only rock-solid depth values, but also avoided overhead in other stages for unpacking (for the sake of video memory for the additional target).

Please test it and report all bugs.

Download (2011-01-04)
SSAO v0.52 source + demos ~38MB
SSAO v0.52 source only ~30KB

I hope no one has complaints smile so that I can work now on the 0.6 release version!

@Puppeteer - can you please re-try the particles demo?

Last edited by HeelX; 01/04/11 21:38.
Re: SSAO for A7 & A8 v0.52 [Re: HeelX] #352759
01/05/11 19:23
01/05/11 19:23
Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
Roel Offline
Senior Member
Roel  Offline
Senior Member

Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
hmmmmm makes me almost want to upgrade to A8smile
Serious, it is nice.
a little suggestiong(don't know if it has been said before)
objects appear smaller when they are in the distance.
however, the ssao lookups don't: they seem to have a fixed size.
which makes the ssao effect do weird things when it is at distant objects(seen it in the white demo)
would it be a nice idea to make the offset from where the samples are taken distance dependent?
this way you can also use less texture lookups when objects are further away, because the radius of the ssao is less.

I hope you understand my.... sort-of-englishcrazy


Check out the throwing game here: The throwing game
Re: SSAO for A7 & A8 v0.52 [Re: Roel] #352762
01/05/11 19:46
01/05/11 19:46
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
I get a DirectX Error after changing the screen resoltuion (via the button you made) in the white demo - Can't create DirectX texture unnamed.
This just happens at the White Demo, and after the second time resizeing...

Changing to fullscreen gives me an "undecleared error -'big numer'"

Also, the fire (particles) in the particle demo is not visible at all with the smallest resolution.


However, nice presentation and nice that you made that for us laugh

Re: SSAO for A7 & A8 v0.52 [Re: Rei_Ayanami] #352770
01/05/11 20:15
01/05/11 20:15
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Thanks! smile

Quote:
hmmmmm makes me almost want to upgrade to A8

It works also for A7 (although there is a particle bug in A7 which lets them look darker - emulate particles with sprites then).

Quote:
which makes the ssao effect do weird things when it is at distant objects

I don't get what you mean, but I sorta know what is the reason: since this is a screen-spaced post processing effect, taking depth into account is a difficult thing to deal with. For instance, the blurring takes depth and normals into account and to calculate the depth threshold I use a custom made formula which looked good to me.

One thing to avoid this is what you see in the forecast above: Mixed-resolution SSAO approximation. This covers two things: 1.) when calculating AO on low-resolution images, I get artifacts on highfrequency depth maps (as to be seen on the fences in the testscene demo). One way to fix this is to estimate which hi-res pixels are degenerative and there I could calculate the AO again based on hi-res data. This leads me to the 2.) approach, in which I would try to experiment with differently scaled depthmaps to keep the AO sampling "grid" nearly same sized on different dephts, which means that I calculate AO on near parts on a very low res image and the farther away a pixel is, I take more likely hires versions of the depthmap into account. That is highly experimental to me and I didn't saw this anywhere (except for loose recommendations) and I am sure if it is working out -- it *could* lead both to speed improvements and "homogenous" AO details at the same time (again on the cost of video memory...).

The size of the microspheres could indeed be based on a depth-based variable, I'll check it out! Reducing samples based on depth is to be deprecated - I think - because of a more expensive shader (they are quite sensitive to conditional sampling!). Though, I already reduced in v0.5 the depth samples by the half (the post-processing is now a bottleneck, but in total faster than in 0.4).

Quote:
I get a DirectX Error after changing the screen resoltuion (via the button you made) in the white demo - Can't create DirectX texture unnamed.
I don't get this, I pressed it now ~10 times and nothing happened. Anyone else?

Quote:
Changing to fullscreen gives me an "undecleared error -'big numer'"
Same as above.

Quote:
Also, the fire (particles) in the particle demo is not visible at all with the smallest resolution.
Yep, I noticed that too some time ago but I didn't had the time to develop a proper testcase for jcl.

Quote:
However, nice presentation and nice that you made that for us

Thanks again! smile It is quite a challenging but it's worth every hour to work on it. It's such a bliss to see Gamestudio running with it smile

Last edited by HeelX; 01/05/11 20:19.
Page 2 of 5 1 2 3 4 5

Moderated by  jcl, Realspawn, Spirit 

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