Page 1 of 2

blender 2.79/2.8 hair shader, subsurface

PostPosted: Mon Sep 17, 2018 1:22 am
by jujube
Posting it here instead of my "doodles" thread because it deserves its own thread, and also because it's not super makehuman related.. not sure where any of it goes...

I have a huuuuuuuuge pile of shader experimenting I did a few months ago that I didn't share yet.

Blender 2.79 development + version + 2.8 beta have a lovely principed hair shader similar to the one in renderman, plus a new option for the subsurface in the regular principled shader.

and yes, if you try very hard (or have a beefy computer) it really is possible to have hairs collide with things

Re: blender 2.79/2.8 hair shader, subsurface

PostPosted: Mon Sep 17, 2018 1:24 am
by jujube
Hair part two:

Re: blender 2.79/2.8 hair shader, subsurface

PostPosted: Mon Sep 17, 2018 1:26 am
by jujube
More recently the voronoi finally has more modes, most excitingly a crackle mode! You can also do creepy things with it, which I put in an imgur album: https://imgur.com/a/pRKfQrb
(actually only the first two use creepy crackles, the rest are displacement subsurf using texturehaven files instead.)

Re: blender 2.79/2.8 hair shader, subsurface

PostPosted: Tue Sep 18, 2018 9:57 am
by wolgade
Interesting. Thanks for sharing your experiments. Especially hair collision looks promising.

Re: blender 2.79/2.8 hair shader, subsurface

PostPosted: Thu Sep 20, 2018 3:18 am
by jujube
Oh yeah that reminds me, here are the in progress views of the hair sim. (the hair physics is not a recent improvement though, I think. )
The physics settings, too.
Oh, and another strange thing, is that the ramped up collision quality didn't actually seem to make the hair truly rest on the collision object, it only delayed the inevitable, lol. IIRC the fancy hair would seem to rest on the object perfectly at first, but then eventually slowly fall through the object, the same way that low quality hair does quickly and immediately to attempted collision objects.
Also, child hairs have no collision, so the underside has a bunch of extra hairs secretly passing through the object.

Re: blender 2.79/2.8 hair shader, subsurface

PostPosted: Sat Sep 22, 2018 1:26 pm
by RobBaer
jujube wrote:Also, child hairs have no collision, so the underside has a bunch of extra hairs secretly passing through the object.


I wonder if this is a "bug" worth reporting on the Blender site? You already have a nice simple reproducible example. It seems at the very least a desirable "feature fix".

Re: blender 2.79/2.8 hair shader, subsurface

PostPosted: Sun Sep 23, 2018 8:21 am
by wolgade
RobBaer wrote:I wonder if this is a "bug" worth reporting on the Blender site?

As far as I understood the concept of "children", this is expected behaviour. Children don't know anything about physics. They don't get simulated. They're either interpolated between existing particles (Interpolate) or grouped around them within a certain radius (Simple).

Re: blender 2.79/2.8 hair shader, subsurface

PostPosted: Sun Sep 23, 2018 4:07 pm
by RobBaer
wolgade wrote:As far as I understood the concept of "children", this is expected behaviour. Children don't know anything about physics. They don't get simulated. They're either interpolated between existing particles (Interpolate) or grouped around them within a certain radius (Simple).

I guess you are right [ https://docs.blender.org/manual/ko/dev/ ... ldren.html ]
Children are Hair and Keyed particles assigned subparticles. They make it possible to work primarily with a relatively low amount of Parent particles, for whom the physics are calculated. The children are then aligned to their parents. Without recalculating the physics the number and visualization of the children can be changed.


I wonder if cranking up the parent's deflect emitter would help "simulate child deflection" at least with simple children. Probably wouldn't help with interpolated hair.

I still am totally incompetent at working particle hair to good result. I really like jujube's tests because they teach me how to step back and think about hair behavior from first principals. Usually, I just change settings and see what happens :o

Re: blender 2.79/2.8 hair shader, subsurface

PostPosted: Mon Oct 01, 2018 8:49 pm
by blindsaypatten
Wrt the shader, there is a good demonstration on youtube:
https://www.youtube.com/watch?v=xNlGsmZ6osk

Basically you can replace the sometimes insane network of hair shader material nodes with a single node that's easy to get realistic results with.

Oh boy would I love to buy a reusable form of the hairstyles in the demo!

Edit: here are the material nodes from Mindfront's African Hair with Bun, replaced by the single Principled Hair BSDF node:
AfroNodes.png


The difference in the renders is almost indistinguishable even without having gone to any extent to make them match.

Re: blender 2.79/2.8 hair shader, subsurface

PostPosted: Sat Oct 06, 2018 12:04 am
by jujube
wolgade wrote:
RobBaer wrote:I wonder if this is a "bug" worth reporting on the Blender site?

As far as I understood the concept of "children", this is expected behaviour. Children don't know anything about physics. They don't get simulated. They're either interpolated between existing particles (Interpolate) or grouped around them within a certain radius (Simple).


Nah, this was before physics. Children have a separate thing where they have zero physics. The issue is that the base hairs do have physics, but it's buggy physics.

(The image is of hair with children, showing how child hairs ignore collision completely. I avoided it by taking all those renders from an angle that didn''t show the hairs passing through. But having a vertex group that put less child hairs on the parent hairs growing from lower on the rectangle, may potentially help. )

The video is of the hair dynamics without child particles. At the end of the video, the hairs start to pass through the cylinder.