Chapter 6:From S^3 to S^5My main focus in this article will be on SSS, SSSS and last but not least - SSSSS.
Too much S for you?
Let's break it down! Essentially every of these rendering techniques is primarily used to create realistic-looking human faces and skin.
Sub
surface
scattering
Screen-
space
self-
shadowing
Screen-
space
sub
surface
scattering.
These are the main techniques which lead to promoshots like this one


So what is Subsurface Scattering?
Subsurface Scattering is a technique used to simulate how light acts passing through translucent objects, in this article I will concentrate on SSS for human skin.
If you do not understand how this works in real life, cover a flashlight with your hand and you will see, how light passes through and your skin appears reddish.
Crysis 1 was one of the first (if not the first) titles to use this technique, and this is the reason why Prophet, Psycho and co. are still among the most realistic-looking characters in video game history (personal opinion).

This technique is still usable in CryEngine 3, but was replaced by a newer one for use in Crysis 2.
Screen-Space Subsurface Scattering.
What are the differences and how do they work in CryEngine?Let's check out how they look in comparison first!
I recommend opening them in different tabs on your browser,
No SSS,
Crysis 2 Screen-Space Subsurface Scattering,
Crysis 1 Subsurface Scattering,


Let's get to it!Subsurface scattering actually approximates how the light passes through an object and with the help of a SSS-image, which indicates which parts of the face are more translucent than others, creates the final output (it can also do without, but of course the final quality is not as accurate as with such an image)
Below we see the sss-image for "Prophet".

The only modifiers for the traditional subsurface scattering are "Light Diffusion Amount" and "Subsurface Multiplier" in the material shader section.
Take a look to see what they do. (
fullscreen link)

Oh yeah, Hargreave trying to look sexy

Now let's get to
Screen-space subsurface scattering which is a technique recently developed by
Jorge Jimenez, which works in image space.
If you want to know all the details, check out this
Link.
If you just want to know the raw version:
The lit parts on the face are blurred in both x and y direction with a form of chromatic shift/aberration depending on the curving/"convolution" of the facial area next to it.
Now the thing is - we can easily check if a surfaces are convex/concave, because we have the depth information already saved because of deferred rendering!
Sounds too complicated?
I will do my best to explain it in the shot below (
fullscreen link)
Please forgive the typos and sentence structure fails

It was late at night!

The only material shader modifier for this one is "blur".
You can see how much it changes by looking at the picture below (
fullscreen link)

Now obviously you can see, when blur is turned up all to the max, hargreave looks like a wax figurine. Which in way may be a compliment, because these figurines have a lot of subsurface scattering going on under their skin.
Yeah ok, interesting tech, but which one is better?Now by all honesty, I think everybody who looks at the first comparison screens, has to admit that the "old" Subsurface Scattering looks more realistic on Hargreave.
Let's further compare the techniques.
On the left we have the old Prophet rendering (Cry-Adam confirmed that we can use old Crysis assets in the new Editor) and on the right the same material with the new screen-space technique applied (and the darkness was matched a little)

The second shot is the other way round - on the left we have the new technique and on the right the old one applied (standard marine on the left, mp_marine to the right)

Now, especially looking at the first shot, even though the color difference is not as big, I am of the opinion that the traditional SSS-rendered Prophet looks better than the modified version mainly because more details are preserved and the skin looks less like a latex glove.
I think the same thing applies for the soldier.
And now look at these pictures!
Fullscreen:
screen-space subsurface scattering and
oldschool subsurface scattering

Nobody can defend the screen space approach in this situation!
Especially note how more light passes through lips and nose in this screen, this really looks amazing.
So why use SSSSS if it does not look better(even Unreal Engine 3's Samaritan Demo had it?Crytek
itself argues with better and more scaleable performance, as does Jorge Jimenez the inventor of SSSSS (link provided in the introduction). The arguments they provide make sense - traditional SSS has to be calculated for each character in many steps, while SSSSS is a relatively cheap post-effect and only depends on the screenspace covered with the shader.
Sounds good to me, but I was surprised to see the opposite to be true.
Let's look at the screens below. Both are covered with over 130 copies of Hargreave.
If you want to open them in different tabs,
subsurface scattering and
screen-space subsurface scattering.


That's suprising, isn't it? I really wonder why there is an average difference of 2ms in favor of the traditional method when they appraise the newer one to be more "console-friendly" (No flame comments, ok?).
I can assure you these performance rates above are representative for this scene, i have taken many more screenshots and the results are the same.
Why did Crytek choose the screen-space approach if not even performance speaks for it?Personally, I see 2 arguments.
First one:
The calculation of light diffusion for the subsurface scattering is, like many other effects,
only calculated for ONE light - the sun. If we don't have direct sunlight on the character, the skin looks flat like a stone. There is no difference to a standard "ilum" shader in buildings.
So let's compare results without direct sunlight! (Note: "Blur" is turned up to 3 for the screen-space approach for the sake of comparison)
If you want to open them in different tabs,
subsurface scattering and
screen-space subsurface scattering.


If you don't like the look of it, you might still prefer the traditional approach here, but I am convinced that for the majority of us, the second screen looks more realistic.
Second one:
With the new technique, the Crytek engineers also introduced "Screen-Space Self-Shadowing", which in most cases leads to a more realistic shadowing on character's faces and skin. This is probably also the reason why the performance gets a little worse.
Look at the comparison shots above at the beginning of "Which one is better" - especially at the marine and prophet. You will see very smooth, realistic looking shadows on the neck and below the eyebrows. The marine's helmet even casts shadows on the character.

With the the traditional shadowing, we would get much, much worse results because we do not have the shadow map resolution to cast such small detail shadows in a correct way.
How does it work?
I am not sure, I did not find any papers on that, but from the results I see, i guess the depth map with the information on convolutions taken for the SSSSS before is again used to determine where depth differences are harsh enough to cast shadows.
That is also useful for things like hats or helmet to cast smooth shadows on the body.
We can control the strength and distance of the self-shadowing with the following modifier in the material menu

To see what it does I equipped Hargreave with this stylish hat and took some screens. Modifier set to
0 25 and
64.



And the technique can even cast shadows from objects independent from the character.

Or can it?


Seriously? What's that?
A bug?
We can clearly see that both the weapon in front of his face and the weapon 2.5 meters away cast the same kind of shadow on the face.
My answer to that:
Self-Shadowing is only a post-processing effect and is at least as "fake" as SSAO, SSSSS and SS-Reflections. There is no real shadow on the geometry, instead, pixels on the face are darkened afterwards.
A real shadow is not calculated, instead parts of the face below the potential shadow caster (which must be in front of these face parts) are darkened.
Usually this fools the audience, but in special cases ... yeah

I think one could fix this if one puts on a barrier of maximum depth difference.
Now if that was not enough -
Screen-Spaced Self-Shadowing only takes into account sunlight!So other than outside, you won't get any effect!
I think I don't have to post a screen of no self-shadowing.
So overall...?Subsurface Scattering (used in Crysis)Pros- creates very realistic-looking human skin
- to the audience very believable effect, especially if looking against the sun
- certain areas like the mouth or the nose are more translucent when a special SSS-image is provided
- performance/visual ratio is still good (in my opinion)
Cons- completely dependent on the sun, no sunlight no effect.
- bugs occur when object geometry has seams (not shown here though, only used well modelled human heads)
- approximation inaccurate (but believeable)
VS Screen-Space Subsurface Scattering (used in Crysis 2)Pros- creates quite realistic-looking human skin
- also includes self-shadowing technique, which adds extra realism
- independent of light positions
- performance depends on amount of pixels on screen -> good, scaleable framerates
- no impact on memory, because it is a post-processing effect
Cons- details and bumps are lost during the process of blurring.
- self-shadowing completely dependent on the sun
- some distance/shadow problems with self-shadowing
- approximation inaccurate, looks not as good as SSS with sunlight.
Conclusion:Many of you will cry out - "SSSSS is just fake! And the bugs with the self-shadowing are horrible! Consoles destroy everything!"
First of all - don't flame! Second thing - did you notice any of these flaws during gameplay? No?
Well then it has achieved its goal. And besides - everything is fake in rasterization. And politics are fake also.
Personally I consider this technique to be quite interesting, I'd love to see how it looks with the traditional and the new scattering combined.
One last thing, which I'd like to say:I hope in future Crytek does not artificially cap modifiers, though the chances are superslim. It's one thing to constrain the shader param sliders from 0.5 to 2, (light diffusion amount), because that helps artists which are not so experienced with it. But why can't I put some insanely high values when typing into the boxes?
Same thing applies for cVars. And environment maps. Why can't I have an 16k resolution even if it does not make sense for my game?
And one last suggestion, even though I do not think any employee involved reads this, it would be a very very good thing, if one can toggle the light's properties to support certain features, like for example SSDO, subsurface scattering or self-shadowing. Of course, implementation would not be copy-paste, because the sun works a little different than point lights, BUT I don't think the CryEngine 3 is really competitive when many important features are outside-only (like GI).
Liked the read? Want more? Give me some feedback! Don't hate!
Want something to be featured? Say it!