Pages: 1 [2] 3 4 5 6 ... 16   Go Down
  Print  
Author Topic: SSAO for Quest3D (Source code available for purchase)  (Read 58726 times)
March 23, 2009, 03:45:58 pm
i am sure it will work. Though i don't want to put a shader to every surface.
That's why i use a global shader approach -- i thought i could use.

So for now.

I can make a smart material or i use a OO object. the oo object consists of multiple single object. Glued together in later in quest3d. So they don't behave like normal hierarchy object.

March 23, 2009, 04:16:40 pm
Look like smart material can be nice solution for most of the users + apply SSAO as post-process.

Upgrade to PSSM is available for SSAO customers. Check http://www.3dvrm.com/shadows_solution/ for details.
March 23, 2009, 04:19:32 pm
btw: You have to make sure your expression for moving the objects i only called once a frame.
So setting the main loop to RCL once is much better. Just set the channels you need to be call multiple times, manual to "ignore tree count".

March 23, 2009, 04:29:39 pm
Yeah, you right, forgot about that.

Would be nice to add animated character, this is the strongest point of SSAO. Maybe I'll animate grass atleast, plus add shadow maps.

Upgrade to PSSM is available for SSAO customers. Check http://www.3dvrm.com/shadows_solution/ for details.
March 23, 2009, 07:10:54 pm
Great work Viktor!!!  Grin Cheesy

Very good work, and useful. Thanks for sharing your knowledge!!!
March 23, 2009, 09:37:40 pm
Yes verrry nice work Smiley
March 23, 2009, 10:32:32 pm
Jos, sorry, didn't saw your post. They say in docs and presentations that linear depth is used, as they use it for bunch of othre effects including one that reconstuct world position of pixel from depth (you need linear depth to do it). Maybe specifically for SSAO it's rescaled.
Yes, that is true, they use it for multiple things. But, lets say you have a scene with SSAO. This is scene 1. Now, lets say you have an exact same scene that's twice as big in all directions, scene 2. Lets say scene 2 is twice as far away from the camera. It should look exactly the same as scene 1. But, the depth range is twice as big. So, to get the exact same SSAO result, the log of the depth should be used.

As and extra advantage, storing the log depth in a 16 bit buffer gives you all the range you'll need. I'm not sure what kind of buffer you use now, but with log depth you could first store the linear depth in a single 32 bit channel texture. Then you can sample down, create a small poison disk in RGBA, take the log and store in a 16 bit 4 channel texture.
Quote
I'm rescaling depth influence for different distance. Shadows fade away because sampling radius has a maximum boundary, this is needed to keep good performance. So, when you get close to an object small cavities become too big for sampling radius to capture them. I can rescale depth in such a way that shadows near camera won't be white, but they will turn into plain gray color (half-occlusion).
Of course, I forgot about that.
March 23, 2009, 10:38:04 pm
Hmm... now I see what you mean, that's a good suggestion as now to handle situation as you describe i'm scaling depth, but it's more a "magic numbers" approach than a math. Thank you for good idea ! Need to try it.

Upgrade to PSSM is available for SSAO customers. Check http://www.3dvrm.com/shadows_solution/ for details.
March 23, 2009, 10:43:43 pm
Hmm... now I see what you mean, that's a good suggestion as now to handle situation as you describe i'm scaling depth, but it's more a "magic numbers" approach than a math. Thank you for good idea ! Need to try it.
I remember reading it somewhere before. I think you are correct that crysis also stores a linear depth for other purposes, but SSAO should use logarithmic depth. Then you'll only need some "magic numbers" in the front maybe. A 16 bit logaritmic depth should easily reach all the way to the back of the scene.
March 24, 2009, 12:54:45 pm
Made a setup with smart material to capture depth and calculate SSAO, so now you don't need to manually put HLSL on every surface. Was very disapointed that smart material can't work with Nature Painter, so grass and stones was collapsed to single meshes.
I'll post a scene as soon as get smart material switching properly.

Check attached screen:


* Smart_material_example.jpg (357.81 KB, 1223x888 - viewed 458 times.)

Upgrade to PSSM is available for SSAO customers. Check http://www.3dvrm.com/shadows_solution/ for details.
March 24, 2009, 01:37:50 pm
Fantastic Victor  Cheesy
March 24, 2009, 02:51:50 pm
Guys, thank you for positive feedback!

Done. This is example with smart material, so no manual HLSL connection anymore. All geometry rendered without shaders. SSAO is applied at the end as a post-process -> "Render SSAO to screen".
I've included two smart materials, one for opaque objects and one for objects with alpha in diffuse texture. In Include folder you will find their source.

EDIT: One small issue - SSAO is now calculated for everything, including sky, I'll cut it in next update.

* Smart Materials SSAO.zip (7593.17 KB - downloaded 1696 times.)

Upgrade to PSSM is available for SSAO customers. Check http://www.3dvrm.com/shadows_solution/ for details.
March 24, 2009, 06:14:26 pm
kewl  Grin
March 25, 2009, 03:20:49 pm
New demo with shadows is available on project's webpage:
http://3dvrm.com/ssao/
"SSAO executable demo with Variance Shadow Maps"

Now on ground and statue SSAO is dispayed only in shadows.

New screeshot:


* SSAO_shadows_comparison_01.jpg (769.02 KB, 1024x1490 - viewed 487 times.)

Upgrade to PSSM is available for SSAO customers. Check http://www.3dvrm.com/shadows_solution/ for details.
March 25, 2009, 04:12:51 pm
viktor, it is looking great. with shadow maps the visual quality is really superb.
unfortunately i am getting shadow-artefacts on my 7950gtx. have a look at the attached screenshot. is it a limitation of the 7-series? are there some tweaks i can try to improve shadow-quality?


* shadow-artefact.jpg (212.35 KB, 1280x800 - viewed 454 times.)
Pages: 1 [2] 3 4 5 6 ... 16   Go Down
  Print  
 
Jump to: