The Huang model of the Principled Hair BSDF is too dark #123451
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#123451
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows 10
Graphics card: RTX 2070
Blender Version
Broken: Blender 4.1
Short description of error
The hair in the Huang model of the Principled Hair BSDF is too dark even at low Melanin levels. The hair in the screenshots are both at a Melanin level of 0.1. You can see the difference between the Chiang and the Huang models, and the hair in the Huang model is way darker. Even if energy loss is expected, that is still too dark. If you set the Melanin level to even lower, the hair just becomes grey and white, without ever becoming light blonde. It is technically possible to turn the hair in the Huang model blonde, by setting the lights extremely bright like at 10000W, but you can't use that to light a scene because all the other objects will just be overblown with light.
Exact steps for others to reproduce the error
I can replicate this behaviour, but based on the comments in !105600, this might be expected?
CC @weizhen to give a proper comment on this.
There is some known issue with the energy conservation, basically the Huang model is overestimating the total internal reflection and thus darker than it should be.
I can put aside some time to improve the estimation of the Huang model. In the meanwhile, if you can achieve similar effect by adjusting the light, maybe you can use light linking so that the bright light only affects the hair?
From the screenshots shown in !105600, the Huang model is slightly darker than the Chiang model. But from my testing, it is a lot darker than shown in the screenshots.
That's an interesting idea. I just tried it, but it's not quite the same.
The one on the left is using the Chiang model, with a light of 100W lighting it. The one on the right is using the Huang model, with a light of 500W lighting it. Both are at a Melanin level of 0.1. Using light linking this way also gives off some reflection on the nearby surfaces, making it almost like the hair itself is glowing.
I can't make light blonde hair like this with the Huang model.
Your model has an unrealistically high IOR of 2.0, the default is 1.55. I adjusted some parameters to make it closer to your desired look. Notably, I changed the Transmission, which is a parameter that should at best not be touched because it might cause energy issues.
The melanin concentration only gives the absorption, but the color is also determined by the reflection and the combination of multiple lobes, and since Chiang and Huang are different models, they are not expected to deliver the same color. But not being able to reproduce the desired color using physically correct values is concerning, this would be a bigger project than the energy conservation issue.
Besides, melanin absorption is wavelength-dependent, but Cycles is a RGB renderer, which is especially bad at approximating absorption colors. There were experiments done on the Chiang model to give more satisfying matching under a RGB renderer, maybe those parameters don't work well with the Huang model.
Sorry about that. I must have forgotten to change the rest of the parameters back to their default values when I was changing things around to see if I could achieve better results. But I assure you, I was using the default value of 1.55 for the IOR when I noticed the problem.
It's not a problem if the Huang model produces different colours from the Chiang model. I actually didn't use the Chiang model for comparison at first. It's just that I was struggling to produce the blonde colour I had in mind with the Huang model.
I didn't know Cycles is a RGB renderer, although I don't know what that means. Interesting. I have only heard that it is an unbiased renderer. Well, if it is a limitation of Cycles, then it's fine. Thank you for helping me.
I don't think Huang has an energy problem. The specific setup that you shared happens to highlight a difference between the hair models.
(all of the following images use 0.1melanin, ior 1.5, and 0 scale tilt, rendered at 2048samples)
If we look at the "front" and at the bottom of the strands (which is how you set the camera), we see Chiang with much more light there. But let us zoom out. Chiang also has sharper highlights towards the top of the strands.
If we simply rotate the camera to be in the "back", we see a vast difference. Huang seems to prefer to forward scatter light.
I often find that using anything more than one light, such as an HDRI
or multiple lights
produces fairly consistent results between the models.
Also, using realistically sized hair (30um radius in these images) and viewing it a reasonable distance, any differences are difficult to notice.
However, if you read my file names, you'll notice that Huang's roughness will need to be half of Chiang to get similar light behavior (on average, the "exact" ratio changes between low or high roughness).
Other than the amount of perceived roughness, the roughness behaves differently between Chiang and Huang. All 1.0 roughness.
The one potential issue that I found, which might make Huang seem to lose energy in some cases, is the excessive scattering of reflected and transmitted light. In these images, their roughness is 0, yet Huang still doesn't have sharp caustics.
@Fernando-Alcala Thanks for your comparisons, they are very helpful!
Regarding the roughness matching issue you mentioned, Huang and Chiang use different roughness models. Huang's roughness squared should be equivalent to MultiGGX roughness. I'm considering squaring the Huang roughness in the next version.
The missing of sharp caustics is interesting, can you share the file you used to produce caustics in Chiang?
Thank you for the extensive testing. Your results are helpful. One thing I wish to emphasise though, I'm not requesting the Huang model to produce similar or the same results as the Chiang model does. I simply provided the comparison to show the Huang hair is too dark even at a very low melanin level.
Your findings of the Huang model performing better with forward light is most likely why I'm having trouble with the hair. It indeed works better with an HDRI in my experience too, but I can't always choose where I can place the lights or use an HDRI. The specific scenario I am in is that the lights happen to be on one side of a corridor only, and they are above the character I'm trying to light. In fact, now that I think about it, there are very few situations where we see lights shining directly through the hair.
I think the main problem for me is that the Huang model, and actually the Chiang model too, have trouble showing light blonde hair under normal lighting conditions. Here is an example:
This is again at 0.1 of Melanin and 1.25 of Transmission, Huang model. To be fair, the Chiang model didn't fare much better. You can see the environment isn't very dark. It can be brighter, but certainly at the current level of brightness, it should be possible to see light blonde hair. For comparison, this is a real photo, and I think the lighting is much darker than my scene, but you can clearly see blonde hair.
Commentary on the last real reference you posted. While the average pixel level is low, this is likely due to a low exposure either in camera or post-process. There are decent highlights and shadows, just taken down a bit. So, the hair is likely receiving a good amount of environmental light.
Another thing, both real references you showed are of people who likely have treated their hair blonde, they are not natural (their dark eyebrows are what their true hair color is, and their dark roots indicate that it has been a few weeks since their last hair treatment). Ideally, bleaching only attacks eumelanin, but other damaging side effects will occur. Could treated hair be accurately represented with Cycles's hair BSDFs? Probably, you would at least have to decrease melanin and increase the pheomelanin ratio.
Here is a scene with two hairs enclosed in a box with small windows. They are lit with a sky texture: 5degree sunset at 0.1 strength. Huang is seen with less light.
Some basic level adjustments to try to make it more even. It seems like the rest of the environment is needed if either of them wants the unlit parts of their hair to have sharp highlights and thorough lighting.
I am unable to reasonably achieve too-dark hair. By the time I get hair too dark, the whole scene is too dark.
I have a pure white sphere and a "gold" necklace for light-level reference. This scene has a 1meter x 0.5meter 0.5W area light with 180degree spread placed in front of the hairs. Huang is seen with less light, but it is not too dark.
Then looking at the forward scattered light, Huang still has less light, but the difference is not too much.
This setup shows a great difference between Chiang and Huang. It has a 1W 0.2meter x 0.2meter light above and in between the hairs. MGGX with volume absorption and scattering is not going to perfectly represent hair BSDFs, but I think it is a good reference point to use. Chiang really likes backscattering, almost excessively. I want to say Chiang is incorrect because of how different it looks to Huang and MGGX, but they are different models and Chiang is production-proven.
And looking at the forward scatter between Chiang and Huang doesn't show much difference. So transmission at least is fine.
Thank you once again for putting in so much efforts to help me. I really appreciate it. This is really strange. Your results are exactly what I expect, but I can't achieve such results myself. Well, I can't share the environments because they are not mine, but I can share the hair I used. Could you please try lighting this hair so it looks blonde?
The two biggest changes you need to make are making the hair's radius 40um and setting glossy bounces to something like 16. You should also change Factor Min in Set Hair Curve Profile to 1 (only newly grown hair tapers and that taper is short, and you're basically guaranteed to cut that off when grooming). I also set the transmission modulator back to 1.
There are still some dark spots left, but you can see most of it now and it looks much softer. At this angle, you could also benefit from making the top hair curve more smoothly.
Move around and you can see Huang pleasantly interact with the light. Use Huang's elliptical component to its advantage.
Thank you so much. So the hair radius was the main problem. I used a higher value because a huge number of hair strands consume a lot of memory. May I ask, after you set the radius to 40um, did you change the density in the Interpolate Hair Curves modifier? If so, what did you change it to?
No change there.
Okay but, after I set the radius of the hair to 40um, without changing the density of the hair, it looks like he is balding.
Of course, I can increase the density to compensate for that, but from my testing, I have to increase the density to like 4,000,000 with the current settings, which takes up too much memory and slows down rendering by quite a lot. Maybe it is realistic that you need that much hair to cover the head in real life with physically correct hair, but it is quite taxing on the computer.