Home Unreal Engine

UDK - Crysis Like Foliage and Vegetation Technique

djoexe
polycounter lvl 7
Offline / Send Message
djoexe polycounter lvl 7
Hi everyone, I spent several hours searching the internet to get the absolute technique to achieve the result of what Crytek did with Crysis.

I found couple of thread here and there of some people asking the same question I'm currently asking, but I never found a thread that answered the question.

Unfortunately, i'm not here to give you the technique itself but rather to gather the maximum information we can to make this thread as usefull as possible for everyone.

Here are a couple of question mark I have and some result I got from many hours of shaders testing and photoshop tweaking.

The result we want is this.
crysis-screenshot-3_zps931ca705.jpg

Here is the technique Crytek is using to achieve this amazing result
7_zps03226807.jpg
The link to the webpage for full description :
http://http.developer.nvidia.com/GPUGems3/gpugems3_ch16.html

Here is the result of a user named Nielsen144 using this same technique, based from his understanding of what Crytek mentioned on their website.
nielsen144result_zpsbd25f5aa.jpg

Here is his shader, but as we can see, we cannot see where everything is plugged into and we also cannot see if he's using any transmission mask and color.
1_zps54388d56.jpg

Now let's take a look at my attempt on achieving the same result.
2_zpsed0c9c10.jpg
Here is the top view.
3_zps778bfa20.jpg

It's a OK for me, but thats all, it lacks of something to get it just right. I used the same technique as Mr. Nielsen144 but with transmission and a minor adjustment to the SSS. Let's take a look.

6_zps71dffec8.jpg

For the transmission, I only plugged a mask, because when I do plug a color into the transmission color, nothing is changed.

Also, if i'm correct, Crytek did not mention using any transmission stuff into their shader. If i only use SSS the same way Crytek does, I do not get any result from the light passing through the leaves...they are opaque.

4_zps56f70746.jpg


Knowing that SSS is took into account by lighting only if there is thickness to the geometry, I cannot believe that my palm tree using planes for the leaves will be affected by the SSS.

This thread on polycount came across the same thing.
http://www.polycount.com/forum/showthread.php?t=85953

So, do I need transmission for foliage or SSS used correctly will do the trick ?

Here is a video showing in real time the effect of lighting on foliage. I don't think he's using UDK.
[ame="http://www.youtube.com/watch?v=1VZlDy8FOO8"]Rendering Translucent Foliage - YouTube[/ame]

I'm not a pro in shaders creation so i'm asking for tip and tricks using this method like Crytek does in their engine.

Replies

  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    As far as I know, Transmission was the pre-DX11 SSS that is baked with lighting. The DX-11 SSS is not baked.

    From what I remember when I was messing around with the DX-11 features, Sub-Surface Scattering Radius is where you'd put your mask. I remember one thread awhile back where someone used an inverse of his AO for his crystals.

    For starters, I'd ditch the Transmission altogether and attempt to rebuild everything with the DX11 SSS option, using a mask for the Radius. The two color options will just use a Constant 3. Combining the Transmission and SSS may be giving weird results and it'll probably be much easier using one.

    Also Nielsen144's example seems like it's hiding something with all the post-process. I'd rather see the plant in a natural environment with the SSS being emphasized. :)
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    This was Pre-DX11, he is using CustomLighting slots. What is being done is the equivalent of a Shlick-Fresnel with 0 Falloff, so you can see the other side of the mesh.

    The catch is with this setup, that the plant needs to be double side rendered, and not have any thickness to it.
  • Xendance
    Options
    Offline / Send Message
    Xendance polycounter lvl 7
    You might want to clamp the dot products to 0...1 range instead of -1...1. If I recall correctly, that might cause the upper side to be overly bright.
  • djoexe
    Options
    Offline / Send Message
    djoexe polycounter lvl 7
    New update
    This is what I achieved without using any SSS. Only using TRANSMISSION Mask and Color.
    8_zps2b51ccfb.jpg
    Using only this nodes setup. I also plugged my normal map into the B slot of the Dot Product at the bottom right.
    9_zps0e4c341d.jpg

    This is a bit better, but evrything is baked again. Is anybody know how SSS works ? Because I tried several possibilities and It always end up messy without getting near of what i've done here. I found a thread of someone building a jungle setup but he ended up like me using Transmission but on his side, it was a project limitation, thats not my concern here. I want to study the effect of SSS on foliage and vegetation overall to get the most realistic feel possible.
Sign In or Register to comment.