Home Unreal Engine

My model looks great in Static mesh viewer and material preview but not In game.

synergy11
polycounter lvl 6
Offline / Send Message
synergy11 polycounter lvl 6
Some of my branches are rendering almost completely black.

I used production quality build. 4 res lightmaps.

I've tried editing the vertex normal as per this link. http://www.polycount.com/forum/showthread.php?t=125920

But that seemed to look worse.


I believe we should not have to edit custom vertex normals in UE4 due to the PBR system and all?

Please see examples.

Any feedback would be great!

Thanks

Replies

  • ZacD
    Offline / Send Message
    ZacD ngon master
    PBR still can use the same vertex normal tricks, is this before or after baking lighting or what is your lighting setup like? What does it look like without baking lighting? Are you using the 2 sided foliage shading built into UE4?
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    Sorry, I should have given more details.

    This is after baking the lighting. I am using the stock lighting set up found in the Third Person template.

    I am using the new 2 sided foliage shader built into UE4.

    I'm not sure how to unbake lighting to check how it looks that way? :)

    Thanks for your help.

    I'm so close to getting my trees looking the way I want! All I need to do is get all the Alpha cards lighting correctly.

    Any suggestions?
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    After more testing, it looks like my shading gets messed up after I build the lighting.

    When I just drop the mesh in it looks uniformly lit as per my vertex normals.
  • Fwap
    Offline / Send Message
    Fwap polycounter lvl 13
    I ran into some weird lighting on some foliage recently too I remedied it by putting a bit of self illumination into the material.
    Maybe try this?
    Also I thought i might mention this as well, but i think it unlikely because it looks fine before the light bake but could it be your normals?
    Tree_Normals.gif
    WIKI
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    Ok I have gotten better results by jacking up the lightmap resolution. The polygons are no longer rending black.

    But there is still something wrong with the Shader or Vertex normals.

    I'll attach pics of both.

    It looks like the Shader is getting confused as to which polygons are facing the light and which polygons are not, as you can see in the pic. The subsurface color is showing on polygons facing the sun and polygons facing away, which is wrong. As far as I know the new foliage shader is only supposed to have the subsurface color showing on the backside of the texure. :)

    Material network attached.

    Any help would be greatly appreciated. Thanks

    Fwap: I will try to test adding Emission Color to the shader and see if that lightens it up a bit.
  • Ramseus
    Offline / Send Message
    Ramseus polycounter lvl 12
    This is obnoxious, but whenever you have a two sided material, unless you intentionally want the normals to be inverted on the backfaces (and really when would you?) you need to plug in a TwoSidedSign node. That took me forever to figure out, and foliage looks like garbage without it.

    1N1E8av.gif


    alternatively, make your material one sided and duplicate and flip all your geometry :poly142:
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    Thanks Ram. I'll try that asap.

    One question though: Should this have to be done even using the new Foliage Shading Model that was released?
  • Ramseus
    Offline / Send Message
    Ramseus polycounter lvl 12
    Yeah, I looked at it the other day and two sided foliage normals behaves the same way. That may or may not completely fix your lighting issues, static lighting on foliage is frustratingly tricky, but it's definitely something you need in your material either way. Just a weird little thing that's less intuitive about UE4 compared to good old UDK/UE3.
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    It's looking much better now! Thanks a lot.

    The only issue now is the Subsurface color appears to be affect by adding the two sided node. It's still coming through however the color is different.

    I'll attach pics.

    Should I be assigning the Twosidedsign node to other channels as well? Or just the normal?

    Thanks again Ram.
Sign In or Register to comment.