Realtime glossy reflections


#1

I’ve been experimenting a bit with this effect:

http://dusanbosnjak.com/test/webGL/new/glossyNew/room.html

Other than that one nvidia paper that this is derived from, i couldnt find any other resources. I think the halo effect when the leg is in front of the window is due to a weird hack that i used to bloom the reflections, the depth/color variation shouldn’t really matter since it looks good otherwise.


#2

The light bloom is the likeliest candidate - the reflections you see when looking in to from the window side don’t show the artifact.

Nice stuff

Is this relevant? http://www.gamedev.net/blog/1323/entry-2254101-real-time-local-reflections/


#3

I’m not sure if the demo works correctly in my browser.
I only see something resembling reflection at very grazing angles from underneath the chairs and there’s no bloom.

We did have blurry screen-space reflections in Ryse (Crysis 2 & 3 were 100% glossy).
Might be interesting:
http://crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf (starting page 27)

Even there we had some halo problems, but there’s loads of articles nowadays on implementations in various studios:




#4

Darn, for some reason, the demo doesn’t always load right the first time (the render target in particular), it should work on most desktop browsers.

Thanks for the links. I’m not entirely sure what the first one does, but the others make sense. Pity that WebGL doesn’t have explicit access to mip map levels. I’m using a new version of chrome canary that supports this, but even still requires some manual configuration. Still, good for testing until the new spec comes out. This is basically the same idea, figure out the roughness, width of the cone, except that i’m doing some sort of QMC if i understand correctly, mip maps would help get rid of the noise?


#5

Aha!
Now we’re talking.
You’re right - now that I’m running it the second time, it looks much more like you described.

Without seeing the proper result, I was under the assumption that you’re doing screen-space reflections, but they’re actually raytraced. Not bad.
Is this the paper you implemented? http://graphics.cs.umass.edu/pubs/pg08.pdf

Can you add a teapot or a curved surface? This would show off the accuracy of the reflections much better than a simple plane.

About mip-maps: if I got the paper right, you’d get rid of the noise across the surfaces of reflected objects, since the mipmaps are for the shading in its texture space, but you’d still have noise along objects’ sihouettes, where you have no prefiltered texture to sample from.
They also mention this on page 8 and I guess solve it by sampling the sihouettes more excessively.

Good stuff though!
Unfortunately such techniques are still way to memory- and computation-heavy for a game, but maybe on the next next gen, we have enough memory and horse-power to drop rasterizers for good. :slight_smile:


#6

Ouch, there goes my ego :slight_smile:

No, i was looking at that paper but it was a bit over my head (i’m new to graphics programming). I need to read this again to figure out what’s going on :slight_smile:

It is screen-space reflection. Why I mentioned QMC is because of the sample gathering, i thought it had something to do with how you average the samples. I realize now that the Q is not needed, but basically it’s about using different samples for the numerator and denominator when averaging?