General CRYENGINE Discussion

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Trainee TraineeMember since: 03.03.2011, 20:51Posts: 170 Likes: 0
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 07.07.2011, 18:02 
Quote by Thomy:
And, when combined with EnvironmentalProbes and SSR, results can look very convincing :)


Very nice article once again and huuuuh this time you really played and tested alot of stuff in comparison. Thanks for explaining some of the CVARs its going to help me with some fine tuning :)

I think what alot of people forget about is that alot of the illumination changes that were introduced and crytek is still working on are using a quite different approach than what gamers are used to today. Not just cause its done in realtime, but cause it does change some of the fundamentals we are used to. Lighting always was something rather static. Assets would cast a shadow that could move with the sunlight or other moving light sources, some AO would melt with it but thats pretty much all about it. A greyscale layer of shadows if you wanted more you needed to precompute it. Its not just GI itself that changed but also the switch from SSAO to SSDO that does improve the overall look of the global lighting in a real time environment to a great amount, by introducing light and shadow color bleeding like it hasn't really been done before real time. This gives content creators much more freedom when it comes to light setup throughout the entire production process as no other engine at this time and reduces their precomputing time significantly. Leveldesigners literally can play around with their assets and the way they place the lights in real time and no longer rely on endless consultations with their asset creators.

I do agree with you that in some cases the visual qualtiy does suffer, like some of the ghosting, tearing effects and an overall amount of "bluryness" that appear but i think that isn't that much the issue of the engine itself, but rather cause downscalability crytek wanted to achieve as well, so it works for everyone and not just the high end setups. Needs some tuning and tweaking, but hey give the guys some time. 6 years ago noone would have thought that a PS or XBox could have real time lighting like this.

User avatar   Beginner BeginnerMember since: 13.10.2005, 18:56Posts: 24 Likes: 0
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 07.07.2011, 19:31 
Hi really nice to see someone really involved in CE3 features
thank you very much for your time and effort really useful and well written
hope to see the next
User avatar   Skilled Modder Skilled ModderMember since: 15.04.2008, 13:25Posts: 759Location: Russia, Moskow Likes: 34
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 07.07.2011, 19:39 
Hehe, ive expected that you cant say something new for me about GI - but i was wrong XD. Second thanks :)
User avatar   Uber Modder Uber ModderMember since: 14.03.2008, 21:31Posts: 1760 Likes: 38
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 07.07.2011, 19:59 
thank you guys!
@Steampunk
unfortuntately the GI didn't make it into the console versions.
And you have to think about scenes where realtime GI (for the sun only) actually made sense in Crysis 2. That's what makes it a little disappointing.
@Lex4art
What was new to you? :D

Seems like I progressed so fast from article to article that I am slowly running out of topics to talk about :(
Probably need to change the topic to "CryEngine 3 technology you know about, but is interesting anyway" :D

Well, I have still have some ideas, but the next ones won't be as fresh and misterious!
But if you think some tech is interesting and that I should review it - let me know!


User avatar   Skilled Modder Skilled ModderMember since: 15.04.2008, 13:25Posts: 759Location: Russia, Moskow Likes: 34
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 07.07.2011, 20:03 
e_GICascadesRatio + e_GIIterations - i didn't get what they does in my tests :).
User avatar   Hardcore Modder Hardcore ModderMember since: 25.12.2008, 08:07Posts: 849 Likes: 0
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 08.07.2011, 00:36 
You could talk about physics :D
User avatar   Skilled Modder Skilled ModderMember since: 15.04.2008, 13:25Posts: 759Location: Russia, Moskow Likes: 34
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 08.07.2011, 10:16 
Or irradiance lighting (cubemap-based ambient lights).
User avatar   Uber Modder Uber ModderMember since: 14.03.2008, 21:31Posts: 1760 Likes: 38
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 08.07.2011, 10:51 
irradiance volumes is a 100% topic, I can confirm that :)
Originally I wanted to combine it with GI, but that article would have been way to long


  Uber Modder Uber ModderMember since: 17.06.2009, 12:26Posts: 1941Location: South Africa Likes: 0
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 08.07.2011, 14:53 
best thread i have read in ages...please keep this going Thomy!
User avatar   Has no life Has no lifeMember since: 27.12.2007, 01:50Posts: 6478Location: Nottingham Likes: 4
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 08.07.2011, 14:54 
Fantastic set of articles Thomy, i'm sure these will be hugely helpful for the community!
User avatar   Uber Modder Uber ModderMember since: 14.03.2008, 21:31Posts: 1760 Likes: 38
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 10.07.2011, 00:50 
Chapter 6:
From S^3 to S^5

My 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.
Subsurface scattering
Screen-space self-shadowing
Screen-space subsurface scattering.
These are the main techniques which lead to promoshots like this one :)
Image

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).
Image

This technique is still usable in CryEngine 3, but was replaced by a newer one for use in Crysis 2.
Screen-Space Subsurface Scattering.
Image

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,

Image
Image
Image

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".
Image
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)
Image
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!
Image

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)
Image
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)
Image
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)
Image

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
Image
Image
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.
Image
Image

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.
Image
Image
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.
Image
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
Image

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

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

Or can it?
Image
Image

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!




Last edited by Thomy on 12.07.2011, 14:01, edited 10 times in total.
  Uber Modder Uber ModderMember since: 17.06.2009, 12:26Posts: 1941Location: South Africa Likes: 0
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 10.07.2011, 08:46 
hey Thomy...quick question on lights...
any idea on how many dynamic lights the new engine can handle in one scene or within veiwing distance of each other?
  Uber Modder Uber ModderMember since: 17.06.2011, 10:49Posts: 1473Location: Germany Likes: 7
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 10.07.2011, 09:00 
Crysis 1 Subsurface Scattering is better, its not so dark :p

thx Thomy :happy:


Intel Core i5-2500K
ASRock P67 Pro3
8 GB DDR3-1333
GTX560 2GB
Win7 x64
User avatar   Has no life Has no lifeMember since: 02.02.2007, 07:25Posts: 5200 Likes: 253
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 10.07.2011, 09:16 
Crysis2 character skins looks plastic. :(
  Uber Modder Uber ModderMember since: 17.06.2011, 10:49Posts: 1473Location: Germany Likes: 7
 

 Post Topic: Re: CE 3 Tech you might not know about [article series] - Pa
PostPosted 10.07.2011, 09:28 
yes :whistle:

to big shadows :rolleyes:


Intel Core i5-2500K
ASRock P67 Pro3
8 GB DDR3-1333
GTX560 2GB
Win7 x64