Ocean Wave 'Fake' SSS

Started by
2 comments, last by David_pb 9 years, 2 months ago

I recently read this article about AC3's ocean rendering and was very impressed with the effectiveness of faking subsurface scattering with a simple color and transparency ramp so I decided to implement the color and alpha ramping based on a terrain height map into my fast-fourier transform based ocean renderer which works pretty nicely and is relatively simple. However I am a little unsure as to how to implement SSS based on backlit waves as described in the article. It states that a simple test based on sun position, camera position, and slope is used to determine the color ramping but doesn't go into much more detail than that. Here's the specific text that I was referencing:

Ocean Water normally has some SSS but rendering it would be extremely expensive. To provide the effect the team used a simple SSS test based on viewing position, sun position and surface slope, this would then vary localized 'shallowness' or tint/opacity. It is remarkable how effective it is to fake SSS by just making the underside of back lit waves 'less shallow' (tint/transparent).

and a few screenshots of the desired effect (from AC3 and Black Flag):

SSS.png

assassins-creed-iv-black-flag-general-sc

I'm not sure exactly how the interpolationValue or "tintAmount" is determined by those three variables, I assume it would essentially be like normal-based lighting except in the direction facing away from the sun but I'm exactly sure how the camera position is supposed to be involved. Has anyone done this or something similar before?

Advertisement

This is done in the NVidia Island demo. The demo/sample is in the DirectX11 SDK. Shader code is available. Might be more info in shader comments or whitepaper.

YouTube video:

This is done in the NVidia Island demo. The demo/sample is in the DirectX11 SDK. Shader code is available. Might be more info in shader comments or whitepaper.

YouTube video:

Thanks for that resource! Finally took a stab at this and I feel like I'm pretty close but not quite sure that I have it down completely:

Water%20Screen.png

The effect in my shader seems far less noticeable.

Look's nice, Could you provide the shader code though? Maybe someone has a idea for improvement?

This topic is closed to new replies.

Advertisement