Cycles: new Microfacet-based Hair BSDF with elliptical cross-section support #105600

Merged
Weizhen Huang merged 114 commits from weizhen/blender:microfacet_hair into main 2023-08-18 12:46:20 +02:00
2 changed files with 12 additions and 12 deletions
Showing only changes of commit 6858fba43d - Show all commits

View File

@ -3726,12 +3726,12 @@ NODE_DEFINE(MicrofacetHairBsdfNode)
SOCKET_IN_FLOAT(aspect_ratio, "Aspect Ratio", 0.85f);
SOCKET_IN_FLOAT(offset, "Offset", 2.f * M_PI_F / 180.f);
SOCKET_IN_FLOAT(roughness, "Roughness", 0.3f);
SOCKET_IN_FLOAT(roughness, "Hair Roughness", 0.3f);
SOCKET_IN_FLOAT(ior, "IOR", 1.55f);
SOCKET_IN_FLOAT(R, "Reflection", 1.0f);
SOCKET_IN_FLOAT(TT, "Transmission", 1.0f);
SOCKET_IN_FLOAT(TRT, "Secondary Reflection", 1.0f);
SOCKET_IN_FLOAT(R, "R lobe", 1.0f);
SOCKET_IN_FLOAT(TT, "TT lobe", 1.0f);
SOCKET_IN_FLOAT(TRT, "TRT lobe", 1.0f);
SOCKET_IN_FLOAT(random_roughness, "Random Roughness", 0.0f);
SOCKET_IN_FLOAT(random_color, "Random Color", 0.0f);
@ -3769,7 +3769,7 @@ void MicrofacetHairBsdfNode::compile(SVMCompiler &compiler)
{
compiler.add_node(NODE_CLOSURE_SET_WEIGHT, one_float3());
ShaderInput *roughness_in = input("Roughness");
ShaderInput *roughness_in = input("Hair Roughness");
ShaderInput *random_roughness_in = input("Random Roughness");
ShaderInput *offset_in = input("Offset");
ShaderInput *ior_in = input("IOR");
@ -3778,9 +3778,9 @@ void MicrofacetHairBsdfNode::compile(SVMCompiler &compiler)
ShaderInput *melanin_redness_in = input("Melanin Redness");
ShaderInput *random_color_in = input("Random Color");
ShaderInput *R_in = input("Reflection");
ShaderInput *TT_in = input("Transmission");
ShaderInput *TRT_in = input("Secondary Reflection");
ShaderInput *R_in = input("R lobe");
ShaderInput *TT_in = input("TT lobe");
ShaderInput *TRT_in = input("TRT lobe");
ShaderInput *aspect_ratio_in = input("Aspect Ratio");

View File

@ -44,13 +44,13 @@ static void node_declare(NodeDeclarationBuilder &b)
"For elliptical hair cross-section, the aspect ratio is the ratio of the minor axis to "
"the major axis. Recommended values are 0.8~1 for Asian hair, 0.65~0.9 for Caucasian "
"hair, 0.5~0.65 for African hair. Set this to 1 for circular cross-section");
b.add_input<decl::Float>(N_("Roughness"))
b.add_input<decl::Float>(N_("Roughness"), "Hair Roughness")
.default_value(0.3f)
.min(0.0f)
.max(1.0f)
.subtype(PROP_FACTOR)
.description("Microfacet roughness");
b.add_input<decl::Float>(N_("Reflection"))
b.add_input<decl::Float>(N_("Reflection"), "R lobe")
.default_value(1.0f)
.min(0.0f)
.max(1.0f)
@ -58,7 +58,7 @@ static void node_declare(NodeDeclarationBuilder &b)
.description(
"The first light bounce off the hair surface. The color of this component is always "
"white");
b.add_input<decl::Float>(N_("Transmission"))
b.add_input<decl::Float>(N_("Transmission"), "TT lobe")
.default_value(1.0f)
.min(0.0f)
.max(1.0f)
@ -66,7 +66,7 @@ static void node_declare(NodeDeclarationBuilder &b)
.description(
"The component that is transmitted through the hair. Picks up the color of the pigment "
"inside the hair");
b.add_input<decl::Float>(N_("Secondary Reflection"))
b.add_input<decl::Float>(N_("Secondary Reflection"), "TRT lobe")
.default_value(1.0f)
.min(0.0f)
.max(1.0f)