Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, 1 invisible), 877 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: SSAO [Re: lostclimate] #240278
12/10/08 11:20
12/10/08 11:20
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
are you using 16 bit floating point texture, or 32 bit floating point texture? (if you're using BMAP* name = "#widthxheightxbits"; is the "bits" bit 12 or 14?) and if you're doing floating point textures a different way, what way is that?

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: SSAO [Re: JibbSmart] #240334
12/10/08 15:00
12/10/08 15:00
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
The whole problem has nothing to do with 16 or 32 bit fp. You can even do ssao with 32bit rgba if you encode the depthmap.

You have to do a simple depthtest and check if a blurred part of the depthmap intersects with a "far away" part of the depthmap. If this is the case you simply don't apply ssao. And there you go: The black line are gone.
Now creating the code for all this is not quite as easy, but basically that's what you have to do smile


Shade-C EVO Lite-C Shader Framework
Re: SSAO [Re: BoH_Havoc] #240373
12/10/08 17:26
12/10/08 17:26
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
oh, no, ive already done that. im talking about the rings that happen on surfaces facing (or close to facing) the camera. what im doing rihgt now is actually 32bit rgba (not sure how to do floating point textures the way i have it set up so maybe thats what i need to work on.)

Re: SSAO [Re: lostclimate] #240404
12/10/08 20:03
12/10/08 20:03
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
Ah sorry, i thought you were talking about this bug:




As you are using 32bit rgba, you could try to encode your depthmap like this:

encode (depthmap shader):
float depth = Color.r; //this is the depth
Color.r = floor(Color.r*127)/127;
Color.g = floor((depth-Color.r)*127*127)/127;

decode (ssao shader):
float depth = tex2D(depthSampler,inTex).r + tex2D(depthSampler,inTex).g/127;

This should drastically reduce the "rings". However ultimately you might want to use a 32bit floating point texture:

bmap_to_format(depthTexture,14);

and then only write/read from the red channel of your depthmap.

Hope this helps smile



Shade-C EVO Lite-C Shader Framework
Re: SSAO [Re: BoH_Havoc] #240445
12/10/08 23:52
12/10/08 23:52
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
i checked this a little late, slin already helped me with it, although even he was stumped a couple times. eventually though after several hours and a complete script rewrite:




need to get rid of the lines again, the only issue ill have is that any places that need to actually be dark, get filtered out the only way i know of doing this.

Re: SSAO [Re: lostclimate] #240472
12/11/08 05:23
12/11/08 05:23
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
nice work!

i think foxfire solved that problem (is an area really being occluded or not?) using a few ray-traces, but i doubt that would be necessary.

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: SSAO [Re: JibbSmart] #240839
12/12/08 20:55
12/12/08 20:55
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
trying to do some normal tests to fix the black lines (even though 2 days ago i told myself i wouldnt mess with it anymore :P )




Re: SSAO [Re: lostclimate] #240843
12/12/08 21:21
12/12/08 21:21
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
that looks so much better. a bit blurry, though.

Re: SSAO [Re: broozar] #240857
12/12/08 22:55
12/12/08 22:55
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
thanks, im working on it :P

Re: SSAO [Re: lostclimate] #241248
12/15/08 02:22
12/15/08 02:22
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
well it is to the point were i am very happy with it, some the dark lines are gone for the most part (although there are some halos on some of the edges because if my "depth detection test" to see if its to far to calculate. but it isnt too noticable, and once i get dynamic lightmapping in (either via slins work or boh_havocs work) it will be barely noticable. not ssao is perfect, and im not going to attempt to even get mine close. I'd show another screen but i have to wait until i have another environment to show you it on since the only one i have right now is a level im working on for a client, and i shouldnt be showing that.

Page 2 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