User Tag List

Page 1 of 4 123 ... LastLast
Results 1 to 40 of 127

Thread: [FREE] Hair Material

  1. #1
    2

    Lightbulb [FREE] Hair Material

    Hi all!

    I'm making an anisotropic reflections hair material and I want to share it with the all of you.

    This is the first version of the material, I hope that the community help me to improve it and make it better and bigger Hair Material for all.





    Version 1 Features:

    [X] Solid color
    [X] Gradient color
    [X] New gradient control (more Artist friendly)
    [X] Full Highlights Control (Color, Power, Shift and Strength)
    [X] General Shift control (height)
    [X] Jitter ammount
    [X] Lit mode
    [X] Roughness control
    [X] PBR Specular Control (Affects all hair, only Highlight 1, Power)
    [X] Rim Light (Exponent, Color, Strength)
    [X] Glitter control (WIP) (Glitter Texture, Switch for highlights, Power)
    [X] Diffuse base texture (colored by Gradient or Solid color)
    [X] Highlight 1 Mask Texture
    [X] Shift Texture (more real hair, anime style...)

    Note: UV's of the hair model must be vertical (Hair root in the top, and tip in the bottom) for now



    If somebody has problems to create the material, ask me in this thread.

    Full Material (Right click > Open in a new tab/window for full size image)



    Material Function Color Gradient (Right click > Open in a new tab/window for full size image)



    Material Function Shift Tangent (Right click > Open in a new tab/window for full size image)



    Material Function Strand Spec (Right click > Open in a new tab/window for full size image)



    SmoothStep Custom Node





    You can download the base textures HERE

    Note: Highlight Mask is not included, you have to use a full white image by default.

    You can see a Mini Tutorial about How to setup "LightVector" with Material Parameter Collection "MPC_SunDirection" HERE

    UPDATE: You can download a sample package HERE


    I share this material with all of you with three conditions:

    - This is FREE for all, DO NOT SELL IT (you can sell your games, of course, and I hope you will :P)
    - If you improve it or add new features please share it here to help all the community
    - If you distribute this material, please include a reference to this thread


    When I'll have free time to add some of the new features, maybe I will upload the .uasset files, but this will require some time.
    In the meanwhile, let me know if you have any problem creating the material and I will help you


    All 3D models by Mizuko


    Old Wip thread (For reference)

    English isn't my first language, so please excuse any mistakes.
    Last edited by MizuGames; 04-07-2017 at 02:06 AM. Reason: Add DotCam tip, add SmoothStep node image, add MiniTutorial LightVector, add download link

  2. #2
    0
    Ohhhhh Thank u for this great tutorial.

    ¡Gracias amigo!

  3. #3
    1
    You. I like you.

  4. #4
    0
    Samaritan
    Join Date
    Mar 2015
    Posts
    91
    Congrats on the release! I have been working on something visually similar but technically different. Very cool to see!
    Carlos Montero | @cman2k | Technical Art Director @neoglyphic
    Working on Sunborn Rising and the Neofur Plugin | I made Black Mesa

  5. #5
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,225
    This looks great! Thanks for sharing it

    Quick tip for all: Make sure you right click on the material graph images above and select Open in a new tab/window to see the full size image!
    Last edited by DotCam; 03-19-2015 at 03:01 PM.

  6. #6
    0
    This is awesome, I was going to build my own, but I would only know how to do it in substance. I am still relatively new to UE4 material editor. This should be really helpful for me

  7. #7
    0
    Quote Originally Posted by neo0eve View Post
    Ohhhhh Thank u for this great tutorial.

    ¡Gracias amigo!
    Quote Originally Posted by AdeptStrain View Post
    You. I like you.
    Quote Originally Posted by JoshieZombie View Post
    This is awesome, I was going to build my own, but I would only know how to do it in substance. I am still relatively new to UE4 material editor. This should be really helpful for me
    Thanks all

  8. #8
    0
    Quote Originally Posted by cman2k View Post
    Congrats on the release! I have been working on something visually similar but technically different. Very cool to see!
    I see your Fur & Fiber Assets, really cool effect

  9. #9
    0
    By the way, you can share the material by just copying the .uasset files of it and uploading them somewhere.

  10. #10
    0
    Quote Originally Posted by DotCam View Post
    This looks great! Thanks for sharing it

    Quick tip for all: Make sure you right click on the material graph images above and select Open in a new tab/window to see the full size image!
    I'm glad that you like it and thanks for the quick tip!

  11. #11
    0
    I have a question, what is in the light direction parameter collection?

  12. #12
    0
    Quote Originally Posted by EIREXE View Post
    I have a question, what is in the light direction parameter collection?
    As the light calculation is now deferred (and not forward like some other engines) we don't have a way to determine the light direction from the material anymore (https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Vector/index.html#lightvector). Keeping that in mind we have to provide an artificial light direction vector to the material. In this case, MiDaEm used a material parameter collection to share the information with all materials that need to access it.

  13. #13

  14. #14
    0
    Awesome! thanks for the share! Looks great. Can't wait to dissect it tonight.

  15. #15
    0
    Quote Originally Posted by EIREXE View Post
    I have a question, what is in the light direction parameter collection?
    Quote Originally Posted by Raphael Baldi View Post
    As the light calculation is now deferred (and not forward like some other engines) we don't have a way to determine the light direction from the material anymore (https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Vector/index.html#lightvector). Keeping that in mind we have to provide an artificial light direction vector to the material. In this case, MiDaEm used a material parameter collection to share the information with all materials that need to access it.
    That's it!

    Thanks for the help Raphael

  16. #16
    0
    Quote Originally Posted by daveSchoneveld View Post
    Awesome! thanks for the share! Looks great. Can't wait to dissect it tonight.

    Thank you and enjoy!

  17. #17
    0
    Quote Originally Posted by EIREXE View Post
    By the way, you can share the material by just copying the .uasset files of it and uploading them somewhere.
    This would be really helpful for us just learning the material nodes. I have only had the chance to learn a few of the basic ones so far. This is above my complexity since I only get Saturdays and Sundays to play. If not no worries, thanks for this Midaem looks so realistic.

  18. #18
    0
    Infiltrator
    Join Date
    Mar 2014
    Posts
    17
    Interesting work, MiDaEm. I just attempted to reverse engineer it and got stuck on the SmoothStep node in the MF_StandSpec material function. It doesn't show up in search.

    If you could share the material asset files, that would be wonderful n.n

  19. #19
    0
    Quote Originally Posted by Snow View Post
    Interesting work, MiDaEm. I just attempted to reverse engineer it and got stuck on the SmoothStep node in the MF_StandSpec material function. It doesn't show up in search.

    If you could share the material asset files, that would be wonderful n.n
    +1 Im also stuck on this. I'm pretty sure its a custom node, If you could post the code that would be great

    Fantastic Work! I can't wait to get it working properly and thanks for the Share!

  20. #20
    0
    UE4 implements a SmoothStep function in Runtime/Core/Public/Math/UnrealMathUtility.h, here is the code:
    Code:
    static float SmoothStep(float A, float B, float X)
    	{
    		if (X < A)
    		{
    			return 0.0f;
    		}
    		else if (X >= B)
    		{
    			return 1.0f;
    		}
    		const float InterpFraction = (X - A) / (B - A);
    		return InterpFraction * InterpFraction * (3.0f - 2.0f * InterpFraction);
    	}
    I'm guessing this is what the custom node needs to be:
    Name:  Capture.PNG
Views: 33535
Size:  48.0 KB

  21. #21
    0
    Thanks Midaem, and MuchtoLearn...
    totally have this in my project now and it is lovely...Bought a coffee (or two) for Midaem, if you ever want one MuchToLearn just put the link up...Thanks again...

  22. #22
    0
    Quote Originally Posted by Snow View Post
    Interesting work, MiDaEm. I just attempted to reverse engineer it and got stuck on the SmoothStep node in the MF_StandSpec material function. It doesn't show up in search.

    If you could share the material asset files, that would be wonderful n.n
    Quote Originally Posted by Lunchbox View Post
    +1 Im also stuck on this. I'm pretty sure its a custom node, If you could post the code that would be great

    Fantastic Work! I can't wait to get it working properly and thanks for the Share!
    Quote Originally Posted by MuchToLearn View Post
    UE4 implements a SmoothStep function in Runtime/Core/Public/Math/UnrealMathUtility.h, here is the code:
    Ops! I forgot about it ^^U

    As MuchToLearn say Unreal Engine implements a SmoothStep funcion, but it's much more easy, JUST CALL IT!


  23. #23
    0
    Thanks all for the big response here and twitter

    Don't forget to share your screenshots! I would like to see it

  24. #24
    0
    Woaw, that's a very nice shader ! Thanks for sharing !

  25. #25
    0
    Amazing! Thank you for sharing, I was watching it since the project's start!

  26. #26

  27. #27
    0
    Thank you for this!

  28. #28
    0
    Thank you for adding your work to the community!

  29. #29
    0
    Quote Originally Posted by Froyok View Post
    Woaw, that's a very nice shader ! Thanks for sharing !
    Quote Originally Posted by Rafa Angeline View Post
    Amazing! Thank you for sharing, I was watching it since the project's start!
    Quote Originally Posted by HSbF6 View Post
    can't wait to try this! thanks a lot
    Quote Originally Posted by Steve_T View Post
    Thank you for this!
    Quote Originally Posted by Sanvean View Post
    Thank you for adding your work to the community!
    Thanks all!

  30. #30
    0
    When I'll have free time to add some of the new features, maybe I will upload the .uasset files, but this will require some time.

    In the meanwhile, let me know if you have any problem creating the material and I will help you

  31. #31
    0
    you can also select the whole graph copy and paste into a text editor... I think that works even with the Material Functions w/o going into the sub graph.

  32. #32
    0
    Quote Originally Posted by daveSchoneveld View Post
    you can also select the whole graph copy and paste into a text editor... I think that works even with the Material Functions w/o going into the sub graph.
    I will try it this weekend

  33. #33
    0
    Infiltrator
    Join Date
    Nov 2014
    Posts
    12
    Great looking material, good job! And thanks for giving it away for free =)

  34. #34
    0
    A friend and I have both recreated this material following the pictures and neither of us can get the gradient to produce any more than a solid color. The preview in your image shows a gradient, but ours is just solid white. As far as we can tell everything is as identical as it can possibly be. Also, in my preview, the shine isn't anywhere near as high quality as your preview is, while my friend is on a 4850 and sees no shine at all.

    I tried to create a clone of your settings minus color (since gradient's aren't working) and as you can see, between your preview and mine the light shading is entirely different.

    http://i.imgur.com/WleGuqt.png

    Also, I don't know what values or information the MPC_SunDirection is supposed to contain. I am still very new to materials, so the lack of clarification in this area leads me to consider that may be a cause of some problems we are having.

  35. #35
    0
    I recreated this yesterday and it is in fact awesome...Thank so much for sharing.....

  36. #36
    0
    Quote Originally Posted by Raphael Baldi View Post
    As the light calculation is now deferred (and not forward like some other engines) we don't have a way to determine the light direction from the material anymore (https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Vector/index.html#lightvector). Keeping that in mind we have to provide an artificial light direction vector to the material. In this case, MiDaEm used a material parameter collection to share the information with all materials that need to access it.

    You can find more about Material Parameter Collection @ https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ParameterCollections/index.html
    MPC_SunDirection contains LightVector as Raphael Baldi said in his post

    Give me 10 minutes and I will post a little "how to" tutorial

    Could you make a screenshot of your material and your MF_ColorGradient to see what is wrong?

    I used a Highlight mask to control the Highlight 1 in my screen capture "HairInstance.png", this is the reason why my highlight seems different.

    Your highlight is higher than mine because MPC_SunDirection is empty and by default is 0,0,0

  37. #37
    0
    So much awesome.... just so much awesome!

    Thank you!

  38. #38
    0
    [Mini Tutorial] How to setup "LightVector" with Material Parameter Collection "MPC_SunDirection"

    - Create a New Parameter Collection




    - Rename to MPC_SunDirection

    - Add a new Vector Parameter

    - Change Parameter Name to "LightDirection"


    - Create a New Blueprint Actor, call it "LightVectorControl"

    - Edit the blueprint

    - Go to Construction Script Tab

    - Create two new variables

    1- "Refresh" type Boolean and Editable
    2- "SunLight" type Directional Light and Editable





    Now drag and drop "Refresh" and "SunLight" variables to center area and GET it

    Replicate this screen



    Compile and close blueprint

    Drag and drop the blueprint to your scene

    Select your blueprint

    In the "Details" tab set the Sun Light combo to your Sun Light

    If you change your Sun rotation remember click on Refresh button of your blueprint to refresh the "LightVector" on your material



    And thats all folks!

    I hope it helps
    Last edited by MizuGames; 04-07-2017 at 02:10 AM.

  39. #39
    0
    Quote Originally Posted by President View Post
    I recreated this yesterday and it is in fact awesome...Thank so much for sharing.....
    Screenshot or it didn't happen!

    Quote Originally Posted by Nexomnix View Post
    So much awesome.... just so much awesome!

    Thank you!

  40. #40
    0
    Quote Originally Posted by President View Post
    The sun direction thing is a Material Parameter Collection... post # 13 on this page should explain it... an easy way to set that up is go to any of your levels and set the default Numbers to your Sun Light location...that should get that going...
    Okay, I thought that might have been what it was but I wanted to be certain.


    Quote Originally Posted by MiDaEm View Post
    MPC_SunDirection contains LightVector as Raphael Baldi said in his post

    Give me 10 minutes and I will post a little "how to" tutorial
    That would be great! (edit - I see you posted while I was making my images - awesome! Thanks )

    Could you make a screenshot of your material and your MF_ColorGradient to see what is wrong?
    My nodes aren't as prettily arranged as yours yet, but hopefully it should be readable.

    The Gradient - https://i.imgur.com/UYZpB7K.png

    Main material. I don't know how you managed to splice it together so perfectly. As you might guess, graphics are not my forte... - https://i.imgur.com/VGcoMaM.png

    I used a Highlight mask to control the Highlight 1 in my screen capture "HairInstance.png", this is the reason why my highlight seems different.
    That makes sense. Most of this is way too advanced for me but I did notice you were using a different mask but I wasn't sure how big of an impact it was making.

    Appreciate the time you took in making this/helping out.

Page 1 of 4 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •