Home Technical Talk

How do I get soft normal foliage like this?

triangle
Offline / Send Message
Pinned
monagart triangle
I'm currently working on a project for my uni course and have been trying to get trees and bushes with a certain effect. It's pretty much the same as can be seen in this game:

https://www.insidedecay.com/maquette

I am familiar with softening normals, or transferring them from a sphere on to a tree, but it doesn't quite get the exact effect. In these examples the normals of the leafs/alpha cards blend perfectly with the base of the tree, and the silhouette is perfectly coloured and softly shaded. I have experimented in engine and can't seem to get the same effect as the back of the alpha cards will have different normals, the foliage with cast shadows on each other, or the mesh won't cast a shadow on the ground. I'm working in unreal so not sure if there is a certain way to do it here.

This is the closet I've managed to get to the effect:




As you can see it seems to work on the right bush, but as soon as I apply the opacity maps the normals become black on one side, even with a two sided material or two sided foliage setting. I can't seem to figure this out so thought I'd ask and see :)

Replies

  • Eric Chadwick
    Don't use a double-sided shader, duplicate and flip the polygons manually before bending the normals.

    More about why:
    http://wiki.polycount.com/wiki/Foliage#Vertex_Normals
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    This thread discusses the same issue as well as some others:
    https://polycount.com/discussion/209623/smooth-foliage-like-in-breath-of-the-wild-europa-by-helder-pinto-mini-tutorial#latest

    What you are looking for against the black back faces is this:

  • monagart
    Offline / Send Message
    monagart triangle
    Thank you so much @Eric Chadwick and @Obscura

    I done a very quick test in engine trying some of this out and it seems to be working well. I'm going to make some proper meshes and try the same thing. Still need to add in some colour variation here and fix some shading but thanks for the help! 


  • monagart
    Offline / Send Message
    monagart triangle
    So I feel like I'm almost there, but still having some issues with this. I'm not sure why it's started happening now, but the foliage alphas are casting harsh shadows on to the rest of the mesh. Weirdly enough the shadows look great from afar, but become a problem when close.

    Here is is from afar. It's pretty much the EXACT look I want for the trees.



    Here it is when you get closer:



    And what they look like right at them:



    Anyone out there know how to possibly fix this?

    I have one are light and one directional light, both on moveable right now but the issue persists even when baked on static or stationery.

    Shadow bias is at 1, and shadow sharpness has also been tweaked (but doesn't change much).

  • Eric Chadwick
    Turn off self-shadowing?
  • Eric Chadwick
    Looking at your reference, they don't self-shadow at all.

  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Yep, usually self shadowing is disabled, or you can play with the bias parameter of the shadow to make the contact softer.
  • Panupat
    Offline / Send Message
    Panupat polycounter lvl 14
    I liked your last one more than your reference! That little dark gradient revealing leaf shapes you have totally sold me.
  • monagart
    Offline / Send Message
    monagart triangle
    @Panupat thank you! Messing about in Unreal has made some nice effects :)
Sign In or Register to comment.