Sign in to follow this  
SkavenPlanet

Ocean Wave 'Fake' SSS

Recommended Posts

SkavenPlanet    350

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?

Share this post


Link to post
Share on other sites
stalef    607

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:

https://www.youtube.com/watch?v=EfrSaIY0YQA

Edited by stalef

Share this post


Link to post
Share on other sites
SkavenPlanet    350

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:

https://www.youtube.com/watch?v=EfrSaIY0YQA

 

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.

Edited by SkavenPlanet

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this