Soft Reflections

pat777

Newcomer
Soft Reflections make graphics look a lot more realistic. Of course soft reflections should only happen on certain reflective objects such as a foggy mirror.
 
Heh well here's an exciting ATI soft reflections demo.

http://www.ati.com/developer/sdk/RADEONSDK/Html/Samples/Direct3D/RADEONSoftReflect.html

Should be capable of doing it with pixel shaders and render to texture though.

Edit:
The algorithm I'm thinking btw that would work nicely would be to render to texture writing the texture's alpha value with the depth.

Now when the texture is applied to the mirror or reflective surface. Get multiple samples from the texture with jitter based on the recorded depth.

More Depth means more samples and higher level of jitter
Depth of zero would mean 1 sample with no jitter.

Basically should work decently might try coding it up but can't test at the moment unfortunately. Anything wrong anyone can see with this algorithm for soft shadows?
 
Okay realized some mistakes there and kinda hard to have dynamic number of samples for SM2. So would just have to do fixed number and then just by controlling spread of the samples control the blurring. Also won't result in soft shadows on the edges of distant objects (resulting in somewhat a harsher edge than should be).

To achieve results seems it will need 2 passes of rendering the mirrored objects for this method I'm thinking to work. First pass just for the reflection, then another pass where the x and y axis are projected so they increase in size relative to depth (so like instead of Texel X = X/Z instead like X/Z^(3/4)). This will result in the depths being spread out.

Or another method could be just to blur the stored alpha values ensuring more sampling on the edges of a close object and far object. That seems in my mind potentially the best option there (the other one with 2 textures will have the issue that a close object won't have any of the far object diffused into it like realistic soft shadows should and this is also an issue with the method used by the T-Buffer and that ATI demo).

Also can anyone tell the difference between those images 3dfx is showing? I can't tell the difference though they are labeled differently.
 
Yeah you should be able to. Really motion blur, AA, Depth of Field, soft reflections, etc are really all very similar things due to rendering with everything being slightly off.
 
Cryect said:
Also can anyone tell the difference between those images 3dfx is showing? I can't tell the difference though they are labeled differently.

soft.jpg



Cryect said:
Yeah you should be able to. Really motion blur, AA, Depth of Field, soft reflections, etc are really all very similar things due to rendering with everything being slightly off.

Indeed. They're all essentially different forms of AA. That's why if 3dfx were still around, MSAA wouldn't really be an issue with these effects, since they'd all be done by the T-buffer and not shaders; so no jaggies with these effects, unlike the jaggies with shaders and MSAA.
 
Lecram25 said:
Indeed. They're all essentially different forms of AA. That's why if 3dfx were still around, MSAA wouldn't really be an issue with these effects, since they'd all be done by the T-buffer and not shaders; so no jaggies with these effects, unlike the jaggies with shaders and MSAA.
Motion blur is antialiasing, depth of field and soft reflections are not.
T-Buffer is nothing else than multisample buffer in DX, implemented in NV20+/R300+.
If game developers wanted to do this, they could. However, a maximum of 4 or 6 samples is just not enough for many effects. Not to mention that the fillrate is divided by that number.
 
Funny how you should say as the VSA100 has a maximum of 2 samples per chip; 4 samples on the Voodoo 5 5500. Yet, tbuffer works in Serious Sam : SE (all effects iirc) and the q3 motion blur demo.

Maybe not all the effects are different forms of AA, but motion blur (temporal AA) and DoF (focal AA) definitely are.
 
Heh damn I was looking at the wrong part of the picture for the soft reflection. For some reason was thinking that was a mirror not a painting. :oops:
 
Lecram25 said:
Funny how you should say as the VSA100 has a maximum of 2 samples per chip; 4 samples on the Voodoo 5 5500. Yet, tbuffer works in Serious Sam : SE (all effects iirc) and the q3 motion blur demo.
What's funny about that? It "works", of course, but 4 or 6 samples are often not enough by far to get a really convincing motion blur/depth of field/soft reflections/etc. effect.

Maybe not all the effects are different forms of AA, but motion blur (temporal AA) and DoF (focal AA) definitely are.
Same question as LeGreg: What kind of aliasing are you fighting with that?
 
Heh well motion blur is fighting temporal aliasing (only issue is as far as games are concerned if you can display those frames individually its just better to do that way of course but if you can exceed 2x the refresh rate be nice to have motion blur where the card automatically combines all the frames calculated since the last time the frame was sent to the screen).

But yeah DoF is definately not AA at all.
 
What's funny about that? It "works", of course, but 4 or 6 samples are often not enough by far to get a really convincing motion blur/depth of field/soft reflections/etc. effect.

Funny because your earlier post made it out to be as if you didn't believe it was possible. You need to be more specific when you say something:

"However, a maximum of 4 or 6 samples is just not enough for many effects."

Of course it's not enough for a convincing effect but mind you the tbuffer was going to be heavily "revised" (I have no idea how 3dfx planned on overcoming the limited amount of samples, but they were sticking with it).

But yeah DoF is definately not AA at all.

Well 3dfx seemed to think it was. Unless it's a disgusting typo. :rolleyes:

http://www.traumatic.de/pphlogger/d...ly.de/downloads/3dfx-tbuffer-presentation.zip

(slides 5 & 14)
 
It works correctly if you install it correctly, amazing how people like to not follow directions and then blame whatever :p But I do agree its a little strange how strict ATI demos are.

The demo should be installed to

?:\atiddk\direct3d\RADEONSoftReflect

and you need to install the media zip file thats used with all their demos to

?:\atiddk\media

If you have it there should work fine, if not it will tell you it can't find the can model file or whatever.
 
Back
Top