Manequinn with hair for UE4 groom plugin(alembic hair) - asset overview and instructions.
Jun 5, 2021 12:35 · 4571 words · 22 minute read
Hello everyone! And in this video - I want to tell you about my product “Manequinn with hair for UE4 groom plugin (alembic hair)” This is a video instruction that includes an overview of this product.
00:17 - And also - information on how to use this hair.
00:20 - How to transfer it to MetaHuman or any other character.
00:24 - How to edit it and so on… I will also tell you what is included in this product and what you get after purchase.
00:31 - This video is released thanks to the “Поинт” company.
00:34 - Which is the official distributor of “Autodesk” in Russia.
00:38 - In the direction of “Media & Entertainment”.
00:40 - All the lessons that I release on the channel are created on licensed software.
00:45 - Also special thanks to Ephere. So let’s start with what’s included in this product.
00:51 - Just recently, I updated this asset to version 2021. 1. 2 And that is what I recommend downloading.
00:59 - This includes: Archive with the project for “Maya”.
01:02 - Archive with a project for “Unreal Engine”.
01:04 - And a series of alembic files. As soon as you unzip the archive for “Unreal Engine”, you will see this content.
01:11 - And let’s open this project and talk about it.
01:14 - So. This is an optimized scene with no high settings for visual display.
01:19 - On my 2080Ti - it gives a pretty good FPS. Even when approaching this hair.
01:30 - How did I achieve this? I just loaded the more optimized hair into the “Groom” - instead of the ones I used for rendering.
01:35 - This is 70 thousand hairs. And 50 CV points for one guide.
01:40 - That is, if you now go to the “HAIR CONTENT” folder, then you will see so many “ALEMBIC HAIR” And in this case - I used this one.
01:48 - If you open it, you will see that the number of hairs is 70,337.
01:53 - How do you know the number of CV points? - I have already told in other lessons.
01:56 - If you divide this value by the number of hairs, you get exactly 50.
02:02 - Of course, if you wish, you can use the even more optimized Alembic that I have prepared.
02:08 - In the “Alembic” folder - you can find basic files that you might find useful.
02:12 - These are 93 thousand, 70 thousand, 34 thousand and 11 thousand hairs (30CV points. ) That is, any of them - you can upload to “Groom” and see how they look.
02:23 - For example, 11 thousand hairs look like this.
02:27 - This is a very optimized file, and if you want to optimize more - it will only look worse.
02:30 - For this amount - I recommend increasing the “hair width” value.
02:34 - For example, up to 0. 1. Naturally, the hair will look worse than on a render with 120K.
02:41 - But again, if this is a stylized character, then this option may work.
02:45 - By the way. I immediately recommend paying attention to FPS - with this hair count.
02:49 - And that’s all - without creating an “LOD” optimization.
02:52 - I repeat that I do not prepare projects for games.
02:55 - That is, there is no LOD for hair and LOD from hair-cards( lowpoly geometry with a texture) All this I do - for rendering for “cinematic quality”.
03:02 - Since I carry out orders for hairstyles for them, I prepare my hair for such tasks.
03:08 - Because I have experience. Also, in the folder with “Alembic” you can see the file - “hair full 120K” with a different number of CV points.
03:15 - And exactly 70 CV points is the hair quality that I used in the render.
03:20 - That is, if now I drag this file to the “Groom asset”.
03:23 - After that, naturally adjust the thickness of the hairs that I used in the render.
03:27 - Then you will see - the hairstyle that I rendered.
03:30 - Yes, it has a slightly lower FPS than the optimized options.
03:33 - But as I know - in cinematics - 15-30fps is not a problem.
03:39 - Considering studios use 3090 for rendering.
03:41 - And I’m showing you how this scene works on the 2080Ti.
03:45 - But if you are not satisfied with this FPS, then you can use any of the “alembic” that I have prepared.
03:51 - Or make your own - using my scene for “Autodesk Maya”.
03:54 - For example, even 120K hairs and 30CV points give excellent FPS at 2080Ti.
04:00 - Naturally, when a 30CV is used in a hairstyle, the ribbing of the hair is noticeable when you zoom in.
04:06 - But at the same time - the quality of the general form does not suffer greatly.
04:08 - And the FPS is much higher. Personally, I don’t like this ribbing.
04:12 - Therefore, for my render, I used the maximum possible number of CVs that my video card handled.
04:18 - Epic Games recommends 50 CV points for most tasks.
04:21 - Now let’s talk about what this project includes.
04:24 - About “Alembic” files - I have already told, but that’s not all.
04:28 - In the folder - “HAIR CONTENT” - you will find a hair shader.
04:31 - If you open “Main Hair Inst” - then you will see such parameters.
04:34 - If you open “Main Master Hair” - you will see such a list of nodes.
04:38 - “Leonhard Frehse” helped me with this material.
04:41 - Who is developing “Unitscape” for “Unreal Engine” in our team.
04:45 - I left a link to the project - in a pinned comment.
04:48 - I asked him to take the very best from Nick Rutlinh’s material, which we refined in previous lessons.
04:54 - And also examples from Epic Games and to make of it - one material for “cinematic rendering”.
04:58 - Now I will tell you what you can do with this shader.
05:01 - First, you can use the “Apply Hair Dye” option, which allows you to color the roots or ends separately.
05:07 - As soon as you turn it on, additional parameters will appear.
05:11 - “Use Root Dye” is used to change the color of the roots.
05:14 - And “Use Tip Dye” is the tips. Let’s turn on “Root Dye” and try adjusting the color for the roots.
05:20 - Once you turn it on, nothing will change. For this option to work, you need to load the white texture into the “Paint Mask” slot.
05:27 - Or paint a mask for the areas where you want to use this option.
05:31 - Next, use the “Dye Hair” and “Dye Percentage” parameters to adjust the fill level.
05:37 - Then - change the color of the roots - using the “Root Dye Color” parameter.
05:56 - As a result, the resulting color will be mixed with “Melanin”.
06:09 - Also, if you want to color the tips, turn on the “Use Tip Dye” option.
06:13 - This way - you can choose a color for them.
06:24 - And with the help of “Dye Hair” and “Dye Percentage” - you can adjust the level of mixing between these colors.
06:36 - If you don’t want to color the roots, just turn off “Use Root Dye”.
06:51 - Well, or turn off all options and configure only “Melanin” - using this parameter.
07:09 - I also really like the “White Amount” parameter.
07:12 - With which - you can adjust the percentage of gray hair.
07:15 - Basically - there are many useful parameters that will help make your hair render more realistic.
07:35 - Also, in this shader - you can enable “Albedo”.
07:38 - And load the drawn mask to change the color at a specific location.
07:42 - That is, this is another option for dyeing hair.
07:45 - The roots take into account the color of the soil next to them and apply it to the entire tuft or individual hair.
07:51 - To enable the work of such a mask - you need to configure the “Albedo Blend” and load the texture into the “Albedo” slot.
07:57 - Now, using the example of different colors that I will draw on the scalp - I will demonstrate to you how this parameter works.
08:03 - In order to get access to the scalp - download the project for Maya.
08:07 - Next, open Maya and specify the path to this project.
08:10 - After that, we open the scene. As a result, you will have such a scene.
08:20 - We will talk about it later. For now, let’s export the scalp and draw a mask.
08:25 - Select this object, go to layers and turn on its display.
08:33 - Then we export to “OBJ” format. About scalp painting - I will show it in “3D-Coat”.
08:42 - In order to start it - select the “Paint UV-mapped mesh” mode.
08:45 - Next, using this icon, we import the scalp.
08:48 - In the window that appears, make such settings and click OK.
08:56 - Using the “Fill” tool, fill the entire scalp with any color.
08:59 - Also, anywhere - add a few more colors. Then, using the “Textures - Export Color Albedo Map” menu, export the mask.
09:18 - Then go back to the “Unreal Engine” and load it into the “Albedo” slot.
09:22 - Thus, we see that the hair is dyed in the colors that we painted in “3D-Coat”.
09:27 - I will explain again how it works. Imagine that you have a specific point from which a tuft of hair grows.
09:33 - And if in this area there is a certain color, for example, yellow, pink or some other…
09:38 - then this clump will be painted in this color.
09:40 - Thus - you can do highlights. Or some other interesting coloring.
09:45 - Also, I want to talk about setting up “Albedo Blend”.
09:48 - Which allows you to mix the result of “Albedo” with “Melanin”.
09:50 - The value of this parameter depends on your task.
09:53 - Whether it’s realistic or stylized hair. Now let’s talk about how to color some individual bun of the selected hair - some color in “Ornatrix”.
10:12 - And bring this to “Unreal Engine” with another parameter that Leo added.
10:17 - For this task - we will use “Use Vertex”. So, if you open a scene in Maya, you will see this Ornatrix object.
10:28 - This is the same hairstyle you saw in the render.
10:31 - Opening Ornatrix settings - you can go to “BakedHair” and see what percentage of hair is displayed in the viewport at the moment.
10:39 - If you enter 1, you will see 100%. Immediately I say that with this value - be careful.
10:45 - Since 100% hair display in the viewport requires a powerful GPU.
10:49 - To start working with some part and at the same time see 100% - in “Ornatrix” they came up with the “Isolation” tool.
10:56 - With the help of the “hide” button you can isolate the necessary part of the hair and hide the rest.
11:00 - Holding down “CTRL” - you can hide those parts that are not hidden.
11:07 - Next, go to the modifier, which I named - “For Editing”.
11:11 - In “Interpolation” we set these settings. Then we select this tool and the name of the channel - we write in this way.
11:24 - Choose the color you want to dye your hair with and paint it.
11:34 - After that, go back to “BakedHair” and do “Unhide”.
11:38 - Then we select - any other part and do the same manipulations with it.
11:42 - That is, we paint in the desired color. If you want to work only with the selected part, activate the “Affect Selected only” tool.
12:13 - Then we do “Unhide” again. Thus, you can paint any of the selected beams in the desired color.
12:19 - At the same time - anywhere. Now let’s export this hair.
12:23 - But before that, let’s optimize them a little.
12:26 - For example, for optimization - you can put 70% of the hair and change the number of CV points by one guide - in the CV-count modifier.
12:34 - For example, let it be 30 CV. Yes, smoothing of bends will not be so smooth.
12:39 - But this hairstyle will work great - in the viewport.
12:42 - Next, we enable these two groups for export.
12:44 - Select the topmost object. Go to the “File - Export Selection - Ornatrix Alembic” menu.
12:50 - Since we haven’t used 100% hair rendering, turn off the “Use Render Version” option.
12:56 - And click “Export Selection” and export “Alembic”.
13:00 - Go back to Unreal Engine and import this Alembic with these settings.
13:05 - Always use them. Even if you import this “Alembic” into your scene.
13:11 - This is the basic rule for Ornatrix hair. Drag the imported “Alembic” into the “Groom Asset”.
13:22 - Now if you turn on “Vertex Blend” at 100%, then you will see the colors that were painted in Maya.
13:28 - If we want the “Melanin” to be visible, then decrease the “Vertex Blend” value.
13:33 - Also that is all - you can mix with the “Albedo” texture that you painted earlier.
13:37 - Thus, you will have colored hair, physically correct “Melanin” and “Vertex Paint”.
13:43 - As a result, we figured out what possibilities this shader gives.
13:48 - And now, of course, you will be interested in how to transfer this hair to the MetaHuman character.
13:53 - Also, I think you will be interested in my story about editing this hairstyle in Maya.
13:58 - First, let’s talk about how I made these “Alembic”.
14:02 - That is, if you suddenly have a desire to make your own optimized “Alembic” from this hair, you will know how to do it in a project for Maya.
14:10 - So. Now we finally get to talking about the Maya project.
14:14 - As soon as you open it, you will see a familiar mannequin and hair.
14:18 - You already know about “BakedHair” optimization and hair count.
14:21 - 100% is 120,000 hairs. Which I rendered and showed in the preview of this project.
14:27 - That is, in all the renders that you have seen, these are 120,000 hairs and 70 CV points.
14:33 - But if, for example, you want to get 30% of this amount, then enter the value equal to 0. 3.
14:40 - After optimizing the amount of hair, you can start editing the hairstyle.
14:44 - For example, you want to comb some strands.
14:47 - To do this, I added the “Edit Guides” modifier - which I renamed to “For Editing”.
14:52 - Before editing, specifically in Maya - I recommend using the “Hide” function in the “Isolation” tab of the “Hair From Guides” modifier.
14:58 - That is - to isolate some separate part, and then go to “Editing”.
15:02 - Why is that? Because Maya doesn’t perform well yet with a lot of hair in Edit Guides In “3ds Max” everything is ok with this.
15:10 - If you are interested in this - write in the comments and I will prepare this scene for it.
15:14 - Even before the “Edit Guides” - I added the “Clump Groups” modifier.
15:18 - With the help of which - got a separate group for each “Clump”.
15:21 - This is useful for highlighting. So. Let me show you how to edit a hairstyle.
15:34 - As I said - first go to “BakedHair” and isolate the desired part with “Hide”.
15:41 - If you touched unnecessary parts during selection, then simply hide them - holding “CTRL”.
15:46 - As a result, we have such a bundle. Go to “Editing”.
15:50 - Now, for example, to select the yellow bundle - select “Select by group” and click on it.
15:55 - Thus, it will be highlighted and group 19 assigned to it.
16:00 - Further, for example - I do not want to comb it all, but only - only a certain part.
16:03 - To do this, turn off the selection by groups and by holding down “CTRL” - remove the selection from the desired part.
16:10 - After that, in order to comb it, we select this tool, make such settings and proceed to editing.
16:26 - So that all changes concern only the selected part and not be transferred to the adjacent ones - do not forget to make such settings in “Interpolation”.
16:42 - If, however, you are used to editing your hairstyle using the older method - with the help of guides, then Ornatrix has a Filter tool.
16:49 - With the help of it - you can get an arbitrary number of guides for this hairstyle and rig it.
16:54 - Now I will show you how to do this. So. Go back to “BakedHair” and do “Unhide All”.
17:01 - Next, select the topmost modifier and make a duplicate using the “Edit - Duplicate Special” menu.
17:07 - In the window that appears, set everything up in this way and click on the “Duplicate Special” button.
17:13 - Thanks to this, you will receive an exact copy of this object.
17:17 - Next, remove all modifiers up to “BakedHair”.
17:23 - For ease of perception - assign “ChangeWidth” with any settings and apply the “Filter Strands” modifier.
17:35 - With “Fraction” - you can get any number of guides from this hairstyle.
17:40 - Naturally now - I show it quickly. And in an ideal situation - it is better to assign groups to each part of the hair and for each group - create a separate number of guides that are needed.
17:49 - If this is interesting or something is not clear - write about it in the comments and I will record a separate video on this topic.
17:55 - And now - I will show how to turn the resulting number of hairs using the “Filter” into guides.
18:00 - To do this, after the “Filter” modifier, assign the “GuidesFromHair” modifier.
18:05 - And after that - “Edit Guides”. As a result, you will receive guides - with which you can rig your hair.
18:10 - And now the question is - how to do it? Select the hair object.
18:15 - After “BakedHair” add the “Adopt External Guides” modifier.
18:22 - And with the help of “Assign Control Guides” select the resulting guides.
18:29 - Set the “Control Point” value to 100%. And now, if you select an object with guides.
18:35 - Select a few of them and start editing, then the hair will react to these changes.
18:47 - If it’s more convenient for you. you can work with guides.
18:50 - But personally, it’s more convenient for me to edit hair - using the new workflow.
18:54 - Naturally, in some places - the hair will not react to changes in the guides.
18:58 - That is why I recommended at the very beginning - to create groups for a separate bundle.
19:03 - But as I said, this topic requires a separate detailed video.
19:07 - Therefore, this is all that I wanted to show specifically on this topic.
19:10 - Now let’s talk about how to transfer this hairstyle to “MetaHuman”.
19:15 - Again, I won’t show you - the detailed migration process.
19:17 - Since this takes a very long time. But I will definitely tell you about the main points.
19:22 - I will show the transfer of the hairstyle using the example of “MetaHuman - Vivian”.
19:26 - You can choose any character or create your own.
19:30 - The workflow for hair transfer is exactly the same.
19:32 - Therefore, the choice of the character does not affect him in any way.
19:35 - So, after you export from “Quixel Bridge” to “Maya” - you will have such a model with a rig and blendshapes.
19:42 - We don’t need all this to transfer the hairstyle.
19:45 - It is enough to select the head and torso and drag them out of the group using the middle mouse button.
19:50 - Then delete the history of these models and do - “Freeze and Reset Transformation”.
19:59 - After that - export to “OBJ” -format and import into the scene with the hairstyle.
20:03 - Next, the task is to blend the scalp with the hair - on the head of the new model.
20:09 - That is, first - you need to make a copy of the head and separate the scalp.
20:12 - I got the following result. Next, you need to export the new and old scalp to Zbrush.
20:19 - Inside it, first of all, we import the old scalp, and then the new one.
20:24 - So that you have this order of layers. Then run “ZWrap” and place the ponts.
21:19 - Then, with the help of “Wrapping” we make a “Wrap” of the scalp.
21:22 - Next, export the result and load it into Maya.
21:25 - Then we select this new scalp. After that - the old one, which you had with hair.
21:31 - Go to the “Deform” menu and adjust the “BlendShape”.
21:35 - Now if you go to “Animation”, and then in the menu “Windows-Animation Editors” and select “Shape Editor” - you will see a window.
21:43 - In this window, you can adjust the BlendShape of the old scalp with hair to the new head.
21:49 - Next, we need to turn on the display of the hair.
21:51 - In “BakedHair” select “attach roots”. Turn on 100% and move the slider to a value of 1.
21:57 - As a result, we will see that the hair has been transferred to the character’s head.
22:00 - Yes, there are points that need to be corrected and you already know how to do it.
22:04 - I will not show the detailed editing of this hairstyle right now.
22:07 - The only thing I want to show is the purpose of the “PushAwayFromSurface” modifier.
22:16 - Then turn off “Collide with distribution mesh” and add head and torso to “collision meshes”.
22:30 - Thus - “Ornatrix” will push out all the hair that has got in and all that remains for you is to edit the hairstyle in the ways that it showed.
22:40 - That is, right-click, select “Collapse Up to Here” to bake all the actions.
22:45 - Then in “BakedHair” click “Attach Roots”. Turn on 100% hair display.
22:50 - After that - assign “Edit Guides”. Use “Hide” in “BakedGuides” to isolate the part we want to work with.
22:56 - And let’s start editing. All in all, I think you understand the whole process.
23:00 - I will not do the editing now and will show you the next step without it.
23:05 - That is when you are happy with the result and have edited everything - after the “Edit Guides” we assign the “Detail” modifier, to set the number of CV points for one guide.
23:14 - I think 30 will enough for the example. After that, turn on these two modifiers and export the hairstyle to “Ornatrix Alembic”.
23:23 - Activate “Use render version” if “Baked Hair” is set to 100%.
23:28 - If, however, you want to optimize up to 70%, then turn off this option and export this hairstyle.
23:34 - Next, using the “Quixel Bridge” export “Meta Human - Vivian” to “Unreal Engine”.
23:39 - That is, open my project, enable the “Megascans” plugin and import the model.
23:44 - We turn on all the options offered. To do this, click on the “Enable Missing” button.
23:48 - After that - “Unreal” will prompt you to reboot.
23:51 - We do it and open the project again. Next, drag the BP-Vivian object into the scene.
23:57 - And in “Hair” we load the exported alembic.
24:00 - As a result, you will see a new hairstyle. But it will be cut off.
24:04 - To fix this issue, open the “BP-Vivian” asset and adjust the “Hair-Clip-Length”.
24:10 - By default, it is 25, but we need more since we have long hair.
24:14 - In this case, this value is 95. Save the asset and see what happens.
24:20 - The only point that I have not figured out yet is how to remove the intersection of hair with clothes.
24:25 - This question I will be solving with “Epic Games”.
24:27 - And when I have an answer, I’ll tell you about it in a separate video.
24:29 - Just, I think that by that time - I will completely adapt this hairstyle for this character.
24:34 - Also, if you drag and drop the material I prepared, you will have the same shade as in my render.
24:39 - For the material - I already told you at the beginning of the video.
24:42 - After that, you will also need to configure - “Bind”.
24:45 - To do this, select “Create Binding”. In “Target” and “Source Skeletal Mesh” - select “Vivian Face Mesh” Save this asset and drag it to the “Bind Asset”.
24:59 - Then, in the “Alembic” settings, turn on the physics.
25:06 - Next, for the hair to start working, you need to move the character.
25:10 - After that, start to experiment with the physics settings.
25:13 - For example, in order for the hairstyle to retain its shape, you need to play with the “Bend Stiffness” parameter.
25:19 - By the way, all the settings for hair physics can be found in the “MetaHuman” project.
25:23 - Therefore, I will not talk about them now. I hope you can understand that this is just a test to demonstrate what buyers have asked me to show.
25:31 - After all, I did not prepare this model specifically for “MetaHuman”.
25:34 - And the goal of this project was an asset for decorating interiors or exteriors.
25:39 - The next step I want to tackle is figuring out how to prepare this hair for collisions with the shirt and other issues.
25:47 - So I’m going to prepare a full-fledged asset ready for use with any character from “MetaHuman”.
25:52 - And even then - I will release a separate video on this topic.
25:55 - There are a lot of issues to solve with Epic Games first.
25:58 - Well, of course - it is normal to comb this hair and adapt it to this head.
26:02 - That’s all I wanted to show in this video review and instructions.
26:05 - Thank you for watching and wish you a good mood. .