forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Promotes new cell style on Worley Noise to the Unified Noise node gra…
…phs.
- Loading branch information
Showing
7 changed files
with
1,121 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
build_voronoi/bin/libraries/pbrlib/genosl/mx_chiang_hair_roughness.osl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
void mx_chiang_hair_roughness(float longitudinal, float azimuthal, float scale_TT, float scale_TRT, output vector2 roughness_R, output vector2 roughness_TT, output vector2 roughness_TRT) | ||
{ | ||
// TODO: Write OSL implementation of this node. | ||
roughness_R = vector2(0.0, 0.0); | ||
roughness_TT = vector2(0.0, 0.0); | ||
roughness_TRT = vector2(0.0, 0.0); | ||
} |
25 changes: 25 additions & 0 deletions
25
build_voronoi/bin/resources/Materials/TestSuite/pbrlib/bsdf/chiang_hair_bsdf.mtlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0"?> | ||
<materialx version="1.39"> | ||
|
||
<nodegraph name="test_chiang_hair1"> | ||
<chiang_hair_bsdf name="chiang_hair_bsdf1" type="BSDF"> | ||
<input name="ior" type="float" value="1.5" /> | ||
<input name="tint_R" type="color3" value="0.9, 0.8, 0.7" /> | ||
<input name="tint_TT" type="color3" value="1.0, 0.9, 0.7" /> | ||
<input name="tint_TRT" type="color3" value="0.5, 0.5, 1.0" /> | ||
<input name="roughness_R" type="vector2" value="0.1, 0.2" /> | ||
<input name="roughness_TT" type="vector2" value="0.05, 0.07" /> | ||
<input name="roughness_TRT" type="vector2" value="0.2, 0.4" /> | ||
<input name="cuticle_angle" type="float" value="0.6" /> | ||
<input name="absorption_coefficient" type="vector3" value="0.2, 0.5, 0.8" /> | ||
</chiang_hair_bsdf> | ||
|
||
<surface name="surface1" type="surfaceshader"> | ||
<input name="bsdf" type="BSDF" nodename="chiang_hair_bsdf1" /> | ||
<input name="opacity" type="float" value="1.0" /> | ||
</surface> | ||
|
||
<output name="out" type="surfaceshader" nodename="surface1" /> | ||
</nodegraph> | ||
|
||
</materialx> |
81 changes: 81 additions & 0 deletions
81
...noi/bin/resources/Materials/TestSuite/pbrlib/surfaceshader/chiang_hair_surfaceshader.mtlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0"?> | ||
<materialx version="1.39"> | ||
|
||
<nodedef name="ND_simple_hair_shader" node="simple_hair" nodegroup="pbr" doc="Simple hair shader" version="1.0" isdefaultversion="true"> | ||
<input name="melaninConcentration" type="float" value="0.5" uimin="0.0" uimax="1.0" /> | ||
<input name="melaninRedness" type="float" value="0.5" uimin="0.0" uimax="1.0" /> | ||
<input name="melaninMix" type="float" value="1.0" uimin="0.0" uimax="1.0" /> | ||
<input name="baseColor" type="color3" value="1,1,1" uimin="0,0,0" uimax="1,1,1" /> | ||
<input name="longitudinalRoughness" type="float" value="0.1" uimin="0.0" uimax="1.0" /> | ||
<input name="azimuthalRoughness" type="float" value="0.1" uimin="0.0" uimax="1.0" /> | ||
<input name="cuticleAngle" type="float" value="0.5" uimin="0.0" uimax="1.0" /> | ||
<input name="tint_R" type="color3" value="1 1,1" uimin="0,0,0" uimax="1,1,1" /> | ||
<input name="tint_TT" type="color3" value="1 1,1" uimin="0,0,0" uimax="1,1,1" /> | ||
<input name="tint_TRT" type="color3" value="1 1,1" uimin="0,0,0" uimax="1,1,1" /> | ||
<input name="ior" type="float" value="1.55" uimin="0.0" uimax="1.0" /> | ||
<output name="out" type="surfaceshader" /> | ||
</nodedef> | ||
|
||
<nodegraph name="NG_simple_hair_shader" nodedef="ND_simple_hair_shader"> | ||
<!-- absorption coefficient --> | ||
<deon_hair_absorption_from_melanin name="absorption_from_melanin" type="vector3"> | ||
<input name="melanin_concentration" type="float" interfacename="melaninConcentration" /> | ||
<input name="melanin_redness" type="float" interfacename="melaninRedness" /> | ||
</deon_hair_absorption_from_melanin> | ||
<chiang_hair_absorption_from_color name="absorption_from_color" type="vector3"> | ||
<input name="color" type="color3" interfacename="baseColor" /> | ||
</chiang_hair_absorption_from_color> | ||
<mix name="mix_melanin_basecolor" type="vector3"> | ||
<input name="fg" type="vector3" nodename="absorption_from_melanin" /> | ||
<input name="bg" type="vector3" nodename="absorption_from_color" /> | ||
<input name="mix" type="float" interfacename="melaninMix" /> | ||
</mix> | ||
|
||
<!-- specular roughness --> | ||
<chiang_hair_roughness name="spec_roughness" type="multioutput"> | ||
<input name="longitudinal" type="float" interfacename="longitudinalRoughness" /> | ||
<input name="azimuthal" type="float" interfacename="azimuthalRoughness" /> | ||
<output name="roughness_R" type="vector2" /> | ||
<output name="roughness_TT" type="vector2" /> | ||
<output name="roughness_TRT" type="vector2" /> | ||
</chiang_hair_roughness> | ||
|
||
<!-- specular (Chiang hair BSDF) --> | ||
<chiang_hair_bsdf name="chiang_bsdf" type="BSDF"> | ||
<input name="tint_R" type="color3" interfacename="tint_R" /> | ||
<input name="tint_TT" type="color3" interfacename="tint_TT" /> | ||
<input name="tint_TRT" type="color3" interfacename="tint_TRT" /> | ||
<input name="roughness_R" type="vector2" nodename="spec_roughness" output="roughness_R" /> | ||
<input name="roughness_TT" type="vector2" nodename="spec_roughness" output="roughness_TT" /> | ||
<input name="roughness_TRT" type="vector2" nodename="spec_roughness" output="roughness_TRT" /> | ||
<input name="cuticle_angle" type="float" interfacename="cuticleAngle" /> | ||
<input name="absorption_coefficient" type="vector3" nodename="mix_melanin_basecolor" /> | ||
</chiang_hair_bsdf> | ||
|
||
<surface name="surface_shader" type="surfaceshader"> | ||
<input name="bsdf" type="BSDF" nodename="chiang_bsdf" /> | ||
</surface> | ||
|
||
<output name="out" type="surfaceshader" nodename="surface_shader" /> | ||
</nodegraph> | ||
|
||
|
||
<!-- default material --> | ||
<simple_hair name="SR_default" type="surfaceshader"> | ||
<input name="melaninConcentration" type="float" value="0.5" uimin="0.0" uimax="1.0" /> | ||
<input name="melaninRedness" type="float" value="0.5" uimin="0.0" uimax="1.0" /> | ||
<input name="melaninMix" type="float" value="1.0" uimin="0.0" uimax="1.0" /> | ||
<input name="baseColor" type="color3" value="1,1,1" uimin="0,0,0" uimax="1,1,1" /> | ||
<input name="longitudinalRoughness" type="float" value="0.1" uimin="0.0" uimax="1.0" /> | ||
<input name="azimuthalRoughness" type="float" value="0.1" uimin="0.0" uimax="1.0" /> | ||
<input name="cuticleAngle" type="float" value="0.5" uimin="0.0" uimax="1.0" /> | ||
<input name="tint_R" type="color3" value="1,1,1" uimin="0,0,0" uimax="1,1,1" /> | ||
<input name="tint_TT" type="color3" value="1,1,1" uimin="0,0,0" uimax="1,1,1" /> | ||
<input name="tint_TRT" type="color3" value="1,1,1" uimin="0,0,0" uimax="1,1,1" /> | ||
<input name="ior" type="float" value="1.55" uimin="0.0" uimax="1.0" /> | ||
</simple_hair> | ||
<surfacematerial name="simple_hair_default" type="material"> | ||
<input name="surfaceshader" type="surfaceshader" nodename="SR_default" /> | ||
</surfacematerial> | ||
|
||
</materialx> |
Binary file added
BIN
+50.6 KB
...d_voronoi/source/MaterialXGenMdl/CMakeFiles/MaterialXGenMdl.dir/Nodes/CustomNodeMdl.cpp.o
Binary file not shown.
Oops, something went wrong.