Home Technical Talk

Hair Plane normals in UE4

polycounter lvl 11
Offline / Send Message
Croftyness polycounter lvl 11
I've just started to test hair in ue4 however my shader is really uneven. I'm assuming it something to do with the normals as it's fine without one. Does anyone know how I can fix this, or got any suggestions?
I've rendered the normals using a Vray orthographic camera.
Cheers
SuoIQ5e.png
35mU02z.png
9goPVqo.jpg

Replies

  • jfitch
    Offline / Send Message
    jfitch polycounter lvl 5
    I'm not sure what you mean by uneven? What is the issue you're having?
  • cman2k
    Offline / Send Message
    cman2k polycounter lvl 17
    You haved curved normals baked into your normal map, when you really need something way more neutral. I assume you are re-using these areas of your normal map on multiple cards, but the curvature of those cards isn't consistent, so when it changes you get inaccurate shading.

    Are you baking curved pieces of hair onto flat hair cards? Can you get your lowpoly geometry to be closer to your highpoly geometry, before you bake? The closer they are, the less macro-curvature you'll see in your normal map, the more re-usable those modular chunks will be without shading issues.
  • Croftyness
    Offline / Send Message
    Croftyness polycounter lvl 11
    This is my scene set-up. I'm using the Vray Normals render element. How would I go about baking a normal map like you described?
    1H2h59y.png
  • jfitch
    Offline / Send Message
    jfitch polycounter lvl 5
    Ah, okay I see what cman2k is saying. You'll want to bake your normals with the hair straight, not curved or flowing in any way. The curvature and flow will come from the direction of your cards, not your normal map.
  • Croftyness
    Offline / Send Message
    Croftyness polycounter lvl 11
    Thanks for the suggestion. They seem to be ok on alternative flat and curved geometry. I've got some more images that may present the problem better.
    A8Vz3vO.png
    Detailed Normal
    b2tvwtx.png
    World Normal
    zdYlA7r.png
  • Croftyness
    Offline / Send Message
    Croftyness polycounter lvl 11
    The problem is I don't know how to get a tangent spaced bake using Vray.
  • Veezen
    Offline / Send Message
    Veezen polycounter lvl 9
    I'm not sure exactly how this will affect your hair, but you can try select your hair meshes arranged on head, and under Modifier list choose Edit normals. Click on "[+] Edit normals" and then on "-- Normal". Select all (ctrl + a) and try using three methods:
    1) Press "reset" button and check how it looks in UE4
    2) Press "unify" button and do the same
    3) Move your cursor up, so that the lines which you see (which come from vertices) are straight up.

    I remember that I had similar problem, when I import grass meshes to UE4 and I think that I fixed this using one of these method.
  • leslievdb
    Offline / Send Message
    leslievdb polycounter lvl 15
    this might help, create a sphere around your hairmesh and run this script
    http://www.scriptspot.com/3ds-max/scripts/normal-thief

    what it will do is transfer those sphere normals to the hairmesh and you`ll get nice smoothing
  • Croftyness
    Offline / Send Message
    Croftyness polycounter lvl 11
    Hey thanks for the replies, I tried both of those methods but it didn't seem to work. I think it's a normal map baking problem. In a perfect world I would be able to use render to texture with Vray to get a tangent normal map and the standard complete map. The only work around I can think of is rendering a height map and using a 3rd party tool to convert it.
  • wes.sau
    Have you tried rendering the normal with mental ray? Switch to mental ray renderer, assign a standard material to the hair and put a "normals make normal" map type in the self-illumination slot. The normal make normal map can be found in the metaSL section of the available map types. It renders in world space, but rendered from top-down as you're already doing should give tangent-like results.
  • Croftyness
    Offline / Send Message
    Croftyness polycounter lvl 11
    Cool. I'll try that later. I'm using NDO for the time being. It seems to work pretty well if not better.
    oWUwM0X.png
    KWMlMye.png
Sign In or Register to comment.