The forum on this site is closed for new comments and posts. Continue the conversation in the new forum, and learn more here.

Creating hair on a head detailed.

  • Hello!

    There are a few ways to create hair in Blender for Lens Studio, the most common way of making hair with Blender is using particle system, however, I do not recommend this method for Lens Studio because it is very hard to control the direction of each hair when working with a textured plane, and it generates a lot of polygons which makes it very heavy to use.

    I would recommend making hairs with curves, it is still a very time consuming task but you would achieve a lot better looking and optimized result with it for Lens Studio.

    Here are a few well explained Blender tutorials for making hair with curves:

    Making hair with textured planes and curves:
    https://www.youtube.com/watch?v=W8oxZSft_Ns

    Making hair with solid curve objects:
    https://www.youtube.com/watch?v=t2XjdzzWCqI

    There are also programs that does semi-auto hair generation, such as Adobe Fuse (realistic) and VRoid (cartoony), check out the guides here:
    https://helpx.adobe.com/beta/fuse/help/create-custom-fuse-hair.html
    https://www.youtube.com/watch?v=fKGLS3S8b-A

     

    Making hair can be tricky and confusing, here’s a quick example demonstrating the workflow of creating a simple custom hairstyle in Blender and importing it to Lens Studio:

     

    • First we can find a head mesh for reference, my favorite is this one from Blendswap:

    https://www.blendswap.com/blend/3334

    • We're also gonna set up a picture with transparency as the UV, it's best to have a few variations on the same picture for optimization purpose (so less textures used in Lens Studio). Here's the one I created.

    • I used the same image to create a normal map for later use as well (you can find them in the package linked below), we don't need it in Blender but it'll make a big difference in Lens Studio.
    • In your blender scene, setup a rectangle plane with a few subdivisions, keep it between 10 and 30 would be idea. Position the UV according to your hair texture as shown below:

     

    • Then you would apply a curve modifier to your hair plane and point a curve to it, make sure to apply visual and object transform and have your curve and plane at the same position. I have included the blender file example in the file link under this guide, feel free to check out the setup for curve modifier in there :) Here's a quick video example of working with curve modifiers: https://www.youtube.com/watch?v=oHkzyH9dpv4
    • After the plane and texture is set up, we’re gonna start creating some curves along the head.

    • It is inevitable to have hair ends fighting against each others :(

    • so what we need to do is we'll convert the hair into meshes (Object/Convert to/Curve to Meshes), then clean it up by hand. In the end we'll get something like this:

     

    • This would look ok-ish if we move it to Lens Studio, but it would look like a statue if it does not move along with the head. in order to achieve dynamic movement we'll have to rig the hair, then apply chained physics in Lens Studio. For reference, here's a short tutorial on rigging in blender: https://www.youtube.com/watch?v=cGvalWG8HBU
    • Remember to name your bones accordingly so you don't get confused later in Lens Studio, after rigging the scene looks something like this:

    • After we've setup the bones, we also need to do appropriate weight paint. (a good weight paint tutorial here: https://www.youtube.com/watch?v=v6_m3xFSlIU ) Make sure the top bone has all the hair roots weight so that if bottom bones move, the hair doesn't get 'unrooted' as shown in this pic:
    • I also applied the solidify modifier in blender to give hair some volume and also have it render on both sides. 
    • After all the setup, now we can move it to Lens Studio!
    • I've created a custom occluder model from the head base mesh we downloaded on Blendswap, so it occludes the shoulder as well and you wouldn't see hair from the back.

    • With the Chained Physics template, we'll use the same techniques as the chained physics template example objects, and set up our bones one by one.

    • Remember for the Force of your bone, you can reference the local position of object in Value1, in this case h6.001 if it is a child object to object in Value0. If your bone in Value1 has a different offset (such as for the bangs).
    • For example. value (0,-1,0) works as Force for the chain on h6 and h6.001 because the local position for h6.001 has 0 value on X and Z axis. If otherwise then you'd probably need to apply some offset number in the value for Force.
    • That being said, it is recommended to have bones perpendicular to each others when working with chain physics :P it'll grant you an easier time tweaking the numbers.
    • For this tutorial I used simple plane for a straight hairstyle, if you want your hair to have more volume or curves, it is recommended to have custom shapes for each hair strain, again it will be a time consuming process, but the result would be a lot more realistic.

     

    That's all for this guide! Hope information provided here can be useful for your situation.

     

    You can find materials used for this tutorial here:

    https://www.dropbox.com/s/xoyi3j1nsiw1rxs/hair_example_project.zip?dl=0 

     

    Happy creating ;)

    Comment actions Permalink
  • I've been looking for a  tutorial like this forever. I'm trying to create a beard in particular with blender. Something like this.

     

    It seems that you have skipped the export process in this tutotial. I know the file needs to be exported into .fbx format but what else needs to be done in order for the materials (hair) to show up in lens studio? I've been playing around with the nodes in the shade editor to create my own hair texture instead of the alpha images that you used, but I still used the plane technique. I came up with this.

    The texturing is not perfect. I was just playing around with it. But as you can see the mesh is transparent with the outline like yours, but I am trying to get it to import with just the hair material but it keeps importing the solid mesh instead As shown below

    I guess I'm asking what your export process was like? Did the hair material automatically appear when you imported it into Lens studio or did you have to link the materials manually? It would be great if you cleared that up. I'll be trying your technique with the alpha images to see if it will work for me that way but help would be appreciated! Thanks.

    Comment actions Permalink
  • Hi CDplayABDC6

     

    Yes you would have to link it manually. You'd have to export all the texture maps and apply them to a material in Lens Studio.

    Comment actions Permalink

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?

Version

Graphics

Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:

Name:

Email:

What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!