Shader setup for Daniel Bystedt's hair

In the Blender Meetup, Daniel Bystedt presented his real-time hair workflow, unfortunately, it’s hard for me to make out what is on the projector. I gathered some research together, and made a hair card texture that contains color and alpha.

HairCards

His Shader setup looks different in that looks like it uses a combine RGB node and uses a plane as a background.

After that, he demonstrates using the hair card + particle instance modifier, with index and value attributes, to create a procedural method of placing the hair cards and randomizing the UV. This is where I am having the most trouble. Could someone explain it or direct me to a learning resource please? The hair card tutorials I’ve seen involve hand placing them.
Also, I’m attempting to create a mullet and the short hairs don’t seem to have as many segments. I’m not sure If I should cut the short hairs, or use vertex groups to make them short.

2 Likes

Let’s try a fresh start. I’m attempting to create a simple hair card workflow. Most of the tutorials I have found don’t cover creating them and hand place the cards. Then I found this video from the Blender Meetup Feb 2020.
The video covers two parts of the process.

  1. Creation of the hair card textures (normal being the second texture)
  2. Using particle instance modifier and a material that makes placing hair cards procedural

I have attempted the first part and have the above.
In the video, why is there a background plane? I don’t know how to get an alpha using a background plane. Also, is there a flat shading option for renders?

PS. I’m not sure if this is the best thread for this topic

I think I have the hair card generating figured out. Now I’m tackling the next step and wondered if you could help.

In the above picture the hair texture is six hair types going from thick (left) to thin (right) and since I am using multiple hair particles, I can adjust the UV to get different results. The issue is the random color is 0-1 and without any step. I want to limit where the UV will be.
Example: I want only the left three the be used. That would be x = 0, 0.167, or 0.333. If the random value is higher than 0.333 it should either loop to 0 (Module) or be 0.333 (Min). Values in between should round to the closet increment.
Anyone have any thoughts on achieving the desired results?

Hey, never used it before and MAYBE a bit late but you could try using Vector math node and set it to module. In theory any first input exceeding the second input should loop around to 0 + reminder.
So .9 modulo .2 should be .1 again and so on…