Home Unreal Engine

Adding mud on hair in Ue4, using layered materials possible ?

polycounter lvl 14
Offline / Send Message
disanski polycounter lvl 14
Hey guys, dont know much about shaders so wanted to ask first before starting to dig deeper into this. I am trying to add mud on hair and I was thinking it might be a good idea to try a layered material. Is it possible to convert the hair shader epic came out with to be used in a layered material setup so i can add the mud on top as a second layer?
Thanks in advance

Replies

  • Mark Dygert
    Options
    Offline / Send Message
    1) Is it dynamic?
    Because changing the dynamic properties of hair and cloth, from soft and flowing to clumped and heavy is not exactly easy or built into unreal. What physics solutions are you using? Apex Cloth? Nvidia Hairworks? Or... is the hair mostly helmet hair and you just need to change the helmet and you're not worried about dynamics?

    2) How is the mud applied?
    Does it splash on the hair and need some kind of hit detection to place it correctly? Is it universally applied, like the character jumps in mud, is fully submerged and comes out with a different hair style?

    Unreal's hair shader is pretty tech heavy and designed to look really good up close and then quickly LOD out. It also uses a blend based on camera view angle that could be hard to layer properly. You might want to treat the mud clumps as separate objects and swap out pieces. Or go with a much more lightweight solution that will blend better. Opacity blending is some of the heaviest shader work you can do so it's going to ding your performance and could have some pretty big issues with things like fog, other translucent shaders. 
  • disanski
    Options
    Offline / Send Message
    disanski polycounter lvl 14
    Hey Mark, thanks for the quick reply.
    1) the hair would be animated, i dont know too much about the details yet.
    2) Mud would be already on the hair on big chunks stuck between the hairs over time kind of. My problem is that with the current hair shader there is no way to add normal map, or roughness  controls. If I could just hook this up I would not need the layer  material :)
    I think I might just have to add it as separate meshes on top of the hair planes :)
    Thanks for the advice Mark

  • Mark Dygert
    Options
    Offline / Send Message
    Yea, separate meshes would probably be the best/easiest way to handle it. Going through the Unreal hair shader will require a lot of rework and would probably be a lot of instructions.

    Depending on how you animate the hair, you might want to add sockets for the hair/mud clumps, so you can spawn them in at the same location and even scale up the mud clumps so they start over take the hair over time. You can also add dynamics/physics to sockets so you get some secondary motion without having to do full on hair or cloth sim.

    This might be helpful?
    https://www.youtube.com/watch?v=Jq0pB2Um_pA

    Sounds interesting, Good LUCK! =)
  • disanski
    Options
    Offline / Send Message
    disanski polycounter lvl 14
    Yeah I am gonna go with separate meshes at the end. I am not too involved with the animation for this ( this is why I don't know much details) mostly handling the planes placement and textures :)
    Thanks a lot for the help ( yep this is gonna be fun one :) )
Sign In or Register to comment.