Home Unreal Engine

Hair Shader Issues

DustyShinigami
polycounter lvl 4
Offline / Send Message
Pinned
DustyShinigami polycounter lvl 4

Hi

I'm feeling a little bit at a loss here. Whilst working on my character's hair, I decided to see how it was looking in my UE4 scene, and I'm having mixed feelings. :-\ To begin with, before rebuilding the lighting, it looked kinda fine. The only issue was the colour of the hair. Changing the root and tip colours made it look very washed out and the lighting was giving it a strange blue-ish/purple-y look. Rebuilding the lighting fixed that, but now it just looks... crap. And very clumpy due to my clump hair cards. It no longer looks or 'feels' like hair, if you know what I mean. It looks too harsh and doesn't have that soft hair look. This is with the hair shader from one of the Meta Human projects. I migrated it into my scene and then set up all the needed maps - Alpha, Height, Root, ID etc.

I extracted the needed maps for the reference hair mesh my character is based on, and without needing to rebuild the lighting, that hair looks better in comparison. It actually looks and feels better to me. Plus, the clumps look softer.

I'm not sure if it's because of the clumps I've made, some other settings I need to adjust (I did try playing around with some of them, but there wasn't much change), or both, or if I should just learn to make my own hair shader? Though surely the one provided from the Meta Human projects would be fine...? Although, my character is supposed to be a game asset, but will only be used for presentation/portfolio purposes.

From the reference/official model:

My own:

Replies

  • Joopson
    Offline / Send Message
    Joopson quad damage

    Though I'm not a character artist, I will say, while squinting, I think yours generally looks better and more believable than the reference model.


    To me, the reference hair looks like the hair out of Dark Souls 3 or Bloodborne; which is to say, pretty flatly shaded— but your version goes a long way towards getting light lights and dark darks, which real hair usually does have.


    I'll defer to character artists, but from my perspective, I'd say you're overthinking it— at least as far as comparing yours to another piece of game art hair. I'd say spend more time looking at photos of hair and trying to get closer to that, than aiming for the game art quality benchmark you've chosen.

  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 4

    Thank you. That certainly means a lot. ^_^ You’re probably right of course - I’m probably overthinking it. I do that a lot. But I am interested in what other character artists think.

    But yes, the reference hair is from a last generation game. Red Dead Redemption 2, specifically. Though I’ve not loaded up the shader and added the rest of the maps (Normal, AO, Roughness etc.) I just slapped in the maps the hair shader requires by default.

    I’ll also have to load my assets into the Realistic Human project, so it uses the same lighting and shader settings and see what the results are like. I feel I may need to tone down the darkened roots a bit.

  • Fabi_G
    Offline / Send Message
    Fabi_G insane polycounter

    Hi! I think your hair looks thicker than the other hair due to its alpha, less fly away hair and maybe to little variation between strands. Also looks like it has high roughness or low spec.

    Bit confused about building the lighting part. Is the hair set to dynamic? Because characters typically are. Using baked lighting in ue, they are lit by volumetric lightmap (contribution of static light) and dynamic light sources iirc.

    Makes sense to look into an example project.

    Overall it's certainly going somewhere, keep it up!

  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 4

    Thank you. Yeah, it’s still very much WIP at the moment and I’ve yet to add flyaways. :) Currently working on adding breakup and trying to get some negative spaces added, too.

    Good point about the lighting though. I’ll have to check to see if it’s set to Dynamic or Static. The scene I’ve set up has quite a few assets, so the slightest change, and the lighting needs to be rebuilt. Although to be fair, considering the majority of the scene won’t even be seen in the final beauty renders, it might be worth having the lighting set to Static overall. It does take far too long to regenerate…

    I’m unsure what you mean by it being thicker due to its alpha though. Do you mean the Alpha map? Once I’m on my PC, I’ll upload screens of the maps I have.

  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 4

    Okay, in the Digital Human file I have set up, the hair is already set to Static. Not sure about my character scene. Though I'm currently using my laptop, so the brightness/contrast will probably be better on my PC. However, so far, it looks far too dark. And this is with the lighting that's already there.

    I have no Diffuse map applied - just using root and tip colours, which aren't dark. I might need to adjust the ramp so it's a bit lighter in Photoshop...

    And these are the maps I have... The darkness of the roots are looking a bit too dark and harsh, to be honest.

  • BagelHero
    Offline / Send Message
    BagelHero interpolator

    Yeah those alpha maps are just too thick and clumpy. The reference ones are much more sparse.

  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 4

    Okay. So I think, ultimately, I've made a boo-boo. ^^; These clumps were made as part of a hair course and were based on the clumps designed for that project. The project being, a female with long braided hair. As my current character was originally made as part of an assignment, I figured I could save time and re-use them. And only needing to change the colour. Realistically though, I should have made completely new ones for this specific character. 😬

  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 4

    I think I'll put this project on hold for now. I've been at it for too long already and especially the hair. I've got other projects to fix up and work on. Could do with a breather from this. :)

    When I come back to it, I'll probably look at re-doing all the hair just for this character. And not try and save time by pinching another's when it's not right for them. 😅

    Looking at the official model's hair sheet, the clumps look a lot softer. These actually look like the hairs I once made in Substance Designer, so I might make them via that next time.

    Also, I made the mistake of making additional clumps and having them on 2-3 new hair sets/sheets, which wasn't especially optimised. So next time, I'll make sure to get them all onto a single sheet. :)

  • Fabi_G
    Offline / Send Message
    Fabi_G insane polycounter

    "it might be worth having the lighting set to Static overall" - Ideally use stationary/moveable lights to light the character as itself is moveable and won't get baked (unless you treat it as a static mesh, but then you need good lightmap UVs, light-bake, add specular with reflection captures else - not worth it). The bust in the sample project you posted may be a static mesh set to static, but the whole lighting setup is dynamic.

    Generally, I think that project is not well suited if you want to see hair using cards implemented in unreal, as it uses strands. Paragon characters are probably more useful here.

    Regarding the alpha, yes I meant the opacity mask looks to thick/to little negative space and as a result will look less layered.

  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 4

    Paragon characters... Okay, got it. I'll take a look at some. Thanks.

    I'm actually a bit confused with the whole Static and Dynamic thing. Can meshes be changed to Dynamic? From what I can see/tell, meshes are all Static anyway, right...? I don't recall seeing any option to change that anywhere. Or I take it Static Meshes are a separate thing and have a different meaning to that of static/baked and Dynamic lighting...? My character model was set to Static, but changing it to Moveable doesn't appear to have made any noticeable difference.

    As a side issue: I'm still confused with why it takes so long for my scene to re-build the lighting. I've tried optimising where I can, but it doesn't seem to make any difference. The scene was downloaded from the Epic Store I think, so that'll be contributing to why it takes so long, but I've deleted all the props/assets in the buildings that won't be seen; I've checked the Lightmap Density, and a lot of stuff was in the red, which I've got into the green by deleting stuff or adjusting the lightmap resolutions. Even glass shaders on the doors and windows were in the red. So far, I've just turned the objects off in the outliner, but it's still taking forever to re-build the lighting. I seem to recall at one point that it takes around 10 minutes or so to rebuild everything. I might have to try deleting them permenantly as they're not going to be seen in the final renders.

    Here's a before and after of how the hair looks when the lighting has been re-built compared to when it's been moved and needs re-building. The strands stand out more once it's been moved, but obviously, the colour is borked. Setting it to Moveable removes the red error to rebuild the lighting, but the colour just looks bad to me. :-\ Though I could try playing with some of the shader settings; it might help a bit.

  • Fabi_G
    Offline / Send Message
    Fabi_G insane polycounter

    Oh, best get used reading documentation. I try my best to give some short answers:

    Typically characters are skeletal meshes (guess not mandatory for rigid ones, like a chess pawn). They are movable (can move during gameplay), same as animated or simulated objects. Therefore:

    1) Their shadows don't get baked into lightmaps of the static environment. Else their baked shadows would stay in place when the casting object moved.

    2) They don't recieve static shadows. If a character had light baked in shadow and would move into lit area, the shadow would remain (hm well no, in ue practice the light baked into the moved objects lightmap will be discarded).

    Hard to tell what's up with your lighting setup without being able to check out the project. When using baked lighting its important to setup a lightmass importance volume. Aside from reducing light build times, inside of this volume the volumetric lightmap is generated, which is how dynamic object are lit by indirect static light.

    If light baking and creating lightmap UVs for static objects isn't something you want to spend time on, or keeps you from your primary goal, look for a dynamic lighting solution, maybe check how it was done in fortnite in ue4 (didn't check) or switch to ue5.

Sign In or Register to comment.