|
| 1 | +<?xml version="1.0"?> |
| 2 | +<materialx version="1.39"> |
| 3 | + |
| 4 | + <nodedef name="ND_open_pbr_surface_to_standard_surface" node="open_pbr_surface_to_standard_surface" nodegroup="translation"> |
| 5 | + <input name="base_weight" type="float" value="1.0" /> |
| 6 | + <input name="base_color" type="color3" value="0.8, 0.8, 0.8" /> |
| 7 | + <input name="base_diffuse_roughness" type="float" value="0.0" /> |
| 8 | + <input name="base_metalness" type="float" value="0.0" /> |
| 9 | + |
| 10 | + <input name="specular_weight" type="float" value="1.0" /> |
| 11 | + <input name="specular_color" type="color3" value="1, 1, 1" /> |
| 12 | + <input name="specular_roughness" type="float" value="0.3" /> |
| 13 | + <input name="specular_ior" type="float" value="1.5" /> |
| 14 | + <input name="specular_roughness_anisotropy" type="float" value="0.0" /> |
| 15 | + |
| 16 | + <input name="transmission_weight" type="float" value="0.0" /> |
| 17 | + <input name="transmission_color" type="color3" value="1, 1, 1" /> |
| 18 | + <input name="transmission_depth" type="float" value="0.0" /> |
| 19 | + <input name="transmission_scatter" type="color3" value="0, 0, 0" /> |
| 20 | + <input name="transmission_scatter_anisotropy" type="float" value="0.0" /> |
| 21 | + <input name="transmission_dispersion_scale" type="float" value="0.0" /> |
| 22 | + |
| 23 | + <input name="subsurface_weight" type="float" value="0" /> |
| 24 | + <input name="subsurface_color" type="color3" value="0.8, 0.8, 0.8" /> |
| 25 | + <input name="subsurface_radius" type="float" value="1.0" /> |
| 26 | + <input name="subsurface_radius_scale" type="color3" value="1.0, 0.5, 0.25" /> |
| 27 | + <input name="subsurface_scatter_anisotropy" type="float" value="0.0" /> |
| 28 | + |
| 29 | + <input name="fuzz_weight" type="float" value="0.0" /> |
| 30 | + <input name="fuzz_color" type="color3" value="1, 1, 1" /> |
| 31 | + <input name="fuzz_roughness" type="float" value="0.5" /> |
| 32 | + |
| 33 | + <input name="coat_weight" type="float" value="0.0" /> |
| 34 | + <input name="coat_color" type="color3" value="1, 1, 1" /> |
| 35 | + <input name="coat_roughness" type="float" value="0.0" /> |
| 36 | + <input name="coat_roughness_anisotropy" type="float" value="0.0" /> |
| 37 | + <input name="coat_ior" type="float" value="1.6" /> |
| 38 | + <input name="coat_darkening" type="float" value="1.0" /> |
| 39 | + |
| 40 | + <input name="thin_film_weight" type="float" value="0" /> |
| 41 | + <input name="thin_film_thickness" type="float" value="0.5" /> |
| 42 | + <input name="thin_film_ior" type="float" value="1.4" /> |
| 43 | + |
| 44 | + <input name="emission_luminance" type="float" value="0.0" /> |
| 45 | + <input name="emission_color" type="color3" value="1, 1, 1" /> |
| 46 | + |
| 47 | + <input name="geometry_opacity" type="float" value="1" /> |
| 48 | + <input name="geometry_thin_walled" type="boolean" value="false" /> |
| 49 | + |
| 50 | + <!--Outputs--> |
| 51 | + <output name="base_out" type="float" /> |
| 52 | + <output name="base_color_out" type="color3" /> |
| 53 | + <output name="diffuse_roughness_out" type="float" /> |
| 54 | + <output name="metalness_out" type="float" /> |
| 55 | + |
| 56 | + <output name="specular_out" type="float"/> |
| 57 | + <output name="specular_color_out" type="color3" /> |
| 58 | + <output name="specular_roughness_out" type="float" /> |
| 59 | + <output name="specular_IOR_out" type="float" /> |
| 60 | + <output name="specular_anisotropy_out" type="float" /> |
| 61 | + |
| 62 | + <output name="transmission_out" type="float" /> |
| 63 | + <output name="transmission_color_out" type="color3" /> |
| 64 | + <output name="transmission_depth_out" type="float" /> |
| 65 | + <output name="transmission_scatter_out" type="color3" /> |
| 66 | + <output name="transmission_scatter_anisotropy_out" type="float" /> |
| 67 | + <output name="transmission_dispersion_out" type="float" /> |
| 68 | + |
| 69 | + <output name="subsurface_out" type="float" /> |
| 70 | + <output name="subsurface_color_out" type="color3" /> |
| 71 | + <output name="subsurface_radius_out" type="color3" /> |
| 72 | + <output name="subsurface_scale_out" type="float" /> |
| 73 | + <output name="subsurface_anisotropy_out" type="float" /> |
| 74 | + |
| 75 | + <output name="sheen_out" type="float" /> |
| 76 | + <output name="sheen_color_out" type="color3" /> |
| 77 | + <output name="sheen_roughness_out" type="float" /> |
| 78 | + |
| 79 | + <output name="coat_out" type="float" /> |
| 80 | + <output name="coat_color_out" type="color3" /> |
| 81 | + <output name="coat_roughness_out" type="float" /> |
| 82 | + <output name="coat_anisotropy_out" type="float" /> |
| 83 | + <output name="coat_IOR_out" type="float" /> |
| 84 | + <output name="coat_affect_color_out" type="float" /> |
| 85 | + <output name="coat_affect_roughness_out" type="float" /> |
| 86 | + |
| 87 | + <output name="thin_film_thickness_out" type="float" /> |
| 88 | + <output name="thin_film_IOR_out" type="float" /> |
| 89 | + |
| 90 | + <output name="emission_out" type="float" /> |
| 91 | + <output name="emission_color_out" type="color3" /> |
| 92 | + |
| 93 | + <output name="opacity_out" type="color3" /> |
| 94 | + <output name="thin_walled_out" type="boolean" /> |
| 95 | + </nodedef> |
| 96 | + |
| 97 | + <nodegraph name="NG_open_pbr_surface_to_standard_surface" nodedef="ND_open_pbr_surface_to_standard_surface"> |
| 98 | + |
| 99 | + <!--Base--> |
| 100 | + <dot name="base" type="float"> |
| 101 | + <input name="in" type="float" interfacename="base_weight" /> |
| 102 | + </dot> |
| 103 | + <dot name="baseColor" type="color3"> |
| 104 | + <input name="in" type="color3" interfacename="base_color" /> |
| 105 | + </dot> |
| 106 | + <dot name="diffuseRoughness" type="float"> |
| 107 | + <input name="in" type="float" interfacename="base_diffuse_roughness" /> |
| 108 | + </dot> |
| 109 | + <dot name="metalness" type="float"> |
| 110 | + <input name="in" type="float" interfacename="base_metalness" /> |
| 111 | + </dot> |
| 112 | + |
| 113 | + <!--Specular--> |
| 114 | + <dot name="spec" type="float"> |
| 115 | + <input name="in" type="float" interfacename="specular_weight" /> |
| 116 | + </dot> |
| 117 | + <dot name="specColor" type="color3"> |
| 118 | + <input name="in" type="color3" interfacename="specular_color" /> |
| 119 | + </dot> |
| 120 | + <mix name="specRoughness" type="float"> |
| 121 | + <input name="fg" type="float" interfacename="coat_roughness" /> |
| 122 | + <input name="bg" type="float" interfacename="specular_roughness" /> |
| 123 | + <input name="mix" type="float" interfacename="coat_weight" /> |
| 124 | + </mix> |
| 125 | + <dot name="specIOR" type="float"> |
| 126 | + <input name="in" type="float" interfacename="specular_ior" /> |
| 127 | + </dot> |
| 128 | + <!-- logic for anisotropic specular is noticeably different between Standard Surface and OpenPBR, so the translation between these concepts will take more thought--> |
| 129 | + <dot name="specAnisotropy" type="float"> |
| 130 | + <input name="in" type="float" interfacename="specular_roughness_anisotropy" /> |
| 131 | + </dot> |
| 132 | + |
| 133 | + <!--Transmission--> |
| 134 | + <dot name="transmission" type="float"> |
| 135 | + <input name="in" type="float" interfacename="transmission_weight" /> |
| 136 | + </dot> |
| 137 | + <dot name="transmissionColor" type="color3"> |
| 138 | + <input name="in" type="color3" interfacename="transmission_color" /> |
| 139 | + </dot> |
| 140 | + <dot name="transmissionDepth" type="float"> |
| 141 | + <input name="in" type="float" interfacename="transmission_depth" /> |
| 142 | + </dot> |
| 143 | + <dot name="transmissionScatter" type="color3"> |
| 144 | + <input name="in" type="color3" interfacename="transmission_scatter" /> |
| 145 | + </dot> |
| 146 | + <dot name="transmissionScatterAnisotropy" type="float"> |
| 147 | + <input name="in" type="float" interfacename="transmission_scatter_anisotropy" /> |
| 148 | + </dot> |
| 149 | + <dot name="transmissionDispersion" type="float"> |
| 150 | + <input name="in" type="float" interfacename="transmission_dispersion_scale" /> |
| 151 | + </dot> |
| 152 | + |
| 153 | + <!--Subsurface--> |
| 154 | + <dot name="subsurface" type="float"> |
| 155 | + <input name="in" type="float" interfacename="subsurface_weight" /> |
| 156 | + </dot> |
| 157 | + <dot name="subsurfaceColor" type="color3"> |
| 158 | + <input name="in" type="color3" interfacename="subsurface_color" /> |
| 159 | + </dot> |
| 160 | + <dot name="subsurfaceScale" type="float"> |
| 161 | + <input name="in" type="float" interfacename="subsurface_radius" /> |
| 162 | + </dot> |
| 163 | + <dot name="subsurfaceRadius" type="color3"> |
| 164 | + <input name="in" type="color3" interfacename="subsurface_radius_scale" /> |
| 165 | + </dot> |
| 166 | + <dot name="subsurfaceAnisotropy" type="float"> |
| 167 | + <input name="in" type="float" interfacename="subsurface_scatter_anisotropy" /> |
| 168 | + </dot> |
| 169 | + |
| 170 | + <!--Sheen--> |
| 171 | + <dot name="sheen" type="float"> |
| 172 | + <input name="in" type="float" interfacename="fuzz_weight" /> |
| 173 | + </dot> |
| 174 | + <dot name="sheenColor" type="color3"> |
| 175 | + <input name="in" type="color3" interfacename="fuzz_color" /> |
| 176 | + </dot> |
| 177 | + <power name="sheenRoughness" type="float"> |
| 178 | + <input name="in1" type="float" interfacename="fuzz_roughness" /> |
| 179 | + <input name="in2" type="float" value="2.5" /> |
| 180 | + </power> |
| 181 | + |
| 182 | + <!--Coat--> |
| 183 | + <dot name="coat" type="float"> |
| 184 | + <input name="in" type="float" interfacename="coat_weight" /> |
| 185 | + </dot> |
| 186 | + <dot name="coatColor" type="color3"> |
| 187 | + <input name="in" type="color3" interfacename="coat_color" /> |
| 188 | + </dot> |
| 189 | + <dot name="coatRoughness" type="float"> |
| 190 | + <input name="in" type="float" interfacename="coat_roughness" /> |
| 191 | + </dot> |
| 192 | + <dot name="coatAnisotropy" type="float"> |
| 193 | + <input name="in" type="float" interfacename="coat_roughness_anisotropy" /> |
| 194 | + </dot> |
| 195 | + <dot name="coatIOR" type="float"> |
| 196 | + <input name="in" type="float" interfacename="coat_ior" /> |
| 197 | + </dot> |
| 198 | + <dot name="coatAffectColor" type="float"> |
| 199 | + <input name="in" type="float" interfacename="coat_darkening" /> |
| 200 | + </dot> |
| 201 | + <dot name="coatAffectRoughness" type="float"> |
| 202 | + <input name="in" type="float" interfacename="coat_darkening" /> |
| 203 | + </dot> |
| 204 | + |
| 205 | + <!--ThinFilm--> |
| 206 | + <multiply name="thinFilmThicknessConversion" type="float"> |
| 207 | + <input name="in1" type="float" interfacename="thin_film_thickness" /> |
| 208 | + <input name="in2" type="float" value="1000" /> |
| 209 | + </multiply> |
| 210 | + <ifgreater name="thinFilmThickness" type="float"> |
| 211 | + <input name="value1" type="float" interfacename="thin_film_weight" /> |
| 212 | + <input name="value2" type="float" value="0.0" /> |
| 213 | + <input name="in1" type="float" nodename="thinFilmThicknessConversion" /> |
| 214 | + <input name="in2" type="float" value="0.0" /> |
| 215 | + </ifgreater> |
| 216 | + <dot name="thinFilmIOR" type="float"> |
| 217 | + <input name="in" type="float" interfacename="thin_film_ior" /> |
| 218 | + </dot> |
| 219 | + |
| 220 | + <!--Emission--> |
| 221 | + <dot name="emission" type="float"> |
| 222 | + <input name="in" type="float" interfacename="emission_luminance" /> |
| 223 | + </dot> |
| 224 | + <dot name="emissionColor" type="color3"> |
| 225 | + <input name="in" type="color3" interfacename="emission_color" /> |
| 226 | + </dot> |
| 227 | + |
| 228 | + <!--Geometry--> |
| 229 | + <convert name="geometryOpacity" type="color3"> |
| 230 | + <input name="in" type="float" interfacename="geometry_opacity" /> |
| 231 | + </convert> |
| 232 | + <dot name="geometryThinWalled" type="boolean"> |
| 233 | + <input name="in" type="boolean" interfacename="geometry_thin_walled" /> |
| 234 | + </dot> |
| 235 | + |
| 236 | + <!--Outputs--> |
| 237 | + <output name="base_out" type="float" nodename="base" /> |
| 238 | + <output name="base_color_out" type="color3" nodename="baseColor" /> |
| 239 | + <output name="diffuse_roughness_out" type="float" nodename="diffuseRoughness" /> |
| 240 | + <output name="metalness_out" type="float" nodename="metalness" /> |
| 241 | + |
| 242 | + <output name="specular_out" type="float" nodename="spec" /> |
| 243 | + <output name="specular_color_out" type="color3" nodename="specColor" /> |
| 244 | + <output name="specular_roughness_out" type="float" nodename="specRoughness" /> |
| 245 | + <output name="specular_IOR_out" type="float" nodename="specIOR" /> |
| 246 | + <output name="specular_anisotropy_out" type="float" nodename="specAnisotropy" /> |
| 247 | + |
| 248 | + <output name="transmission_out" type="float" nodename="transmission" /> |
| 249 | + <output name="transmission_color_out" type="color3" nodename="transmissionColor" /> |
| 250 | + <output name="transmission_depth_out" type="float" nodename="transmissionDepth" /> |
| 251 | + <output name="transmission_scatter_out" type="color3" nodename="transmissionScatter" /> |
| 252 | + <output name="transmission_scatter_anisotropy_out" type="float" nodename="transmissionScatterAnisotropy" /> |
| 253 | + <output name="transmission_dispersion_out" type="float" nodename="transmissionDispersion" /> |
| 254 | + |
| 255 | + <output name="subsurface_out" type="float" nodename="subsurface" /> |
| 256 | + <output name="subsurface_color_out" type="color3" nodename="subsurfaceColor" /> |
| 257 | + <output name="subsurface_radius_out" type="color3" nodename="subsurfaceRadius" /> |
| 258 | + <output name="subsurface_scale_out" type="float" nodename="subsurfaceScale" /> |
| 259 | + <output name="subsurface_anisotropy_out" type="float" nodename="subsurfaceAnisotropy" /> |
| 260 | + |
| 261 | + <output name="sheen_out" type="float" nodename="sheen" /> |
| 262 | + <output name="sheen_color_out" type="color3" nodename="sheenColor" /> |
| 263 | + <output name="sheen_roughness_out" type="float" nodename="sheenRoughness" /> |
| 264 | + |
| 265 | + <output name="coat_out" type="float" nodename="coat" /> |
| 266 | + <output name="coat_color_out" type="color3" nodename="coatColor" /> |
| 267 | + <output name="coat_roughness_out" type="float" nodename="coatRoughness" /> |
| 268 | + <output name="coat_anisotropy_out" type="float" nodename="coatAnisotropy" /> |
| 269 | + <output name="coat_IOR_out" type="float" nodename="coatIOR" /> |
| 270 | + <output name="coat_affect_color_out" type="float" nodename="coatAffectColor" /> |
| 271 | + <output name="coat_affect_roughness_out" type="float" nodename="coatAffectRoughness" /> |
| 272 | + |
| 273 | + <output name="thin_film_thickness_out" type="float" nodename="thinFilmThickness" /> |
| 274 | + <output name="thin_film_IOR_out" type="float" nodename="thinFilmIOR" /> |
| 275 | + |
| 276 | + <output name="emission_out" type="float" nodename="emission" /> |
| 277 | + <output name="emission_color_out" type="color3" nodename="emissionColor" /> |
| 278 | + |
| 279 | + <output name="opacity_out" type="color3" nodename="geometryOpacity" /> |
| 280 | + <output name="thin_walled_out" type="boolean" nodename="geometryThinWalled" /> |
| 281 | + </nodegraph> |
| 282 | +</materialx> |
0 commit comments