Upload EXLS1 2026.09.25_01
Browse files- .gitattributes +3 -0
- EXLS1/.metadata/com.nvidia.simready.root_usds.json +6 -0
- EXLS1/com.nvidia.simready.packaging.json +6 -0
- EXLS1/simready_usd/.thumbs/256x256/EXLS1_main.usd.png +3 -0
- EXLS1/simready_usd/EXLS1_main.usd +3 -0
- EXLS1/simready_usd/layers/.thumbs/256x256/EXLS1_ConnectionPoints.usd.png +3 -0
- EXLS1/simready_usd/layers/.thumbs/256x256/EXLS1_Properties.usda.png +3 -0
- EXLS1/simready_usd/layers/EXLS1_ConnectionPoints.usd +0 -0
- EXLS1/simready_usd/layers/EXLS1_Properties.json +278 -0
- EXLS1/simready_usd/layers/EXLS1_Properties.usda +539 -0
- EXLS1/simready_usd/layers/apply_metadata.py +356 -0
- EXLS1/simready_usd/layers/excel_to_json.py +229 -0
- EXLS1/simready_usd/layers/properties.xlsx +0 -0
- EXLS1/simready_usd/materials/OmniPBR/OmniPBR.mdl +419 -0
- EXLS1/simready_usd/materials/OmniPBR/OmniPBRBase.mdl +493 -0
- EXLS1/simready_usd/materials/OmniPBR/OmniPBR_ClearCoat.mdl +734 -0
- EXLS1/simready_usd/materials/Polycarbonate_Opaque.mdl +1031 -0
- EXLS1/simready_usd/materials/Polypropylene_Opaque.mdl +1049 -0
- EXLS1/simready_usd/materials/Semi_Aniline_Leather.mdl +718 -0
- EXLS1/simready_usd/materials/Stainless_Steel.mdl +1543 -0
- EXLS1/simready_usd/materials/Stainless_Steel_Brushed.mdl +0 -0
- EXLS1/simready_usd/materials/WhiteMode.mdl +31 -0
- EXLS1/simready_usd/payloads/.thumbs/256x256/external.usd.png +3 -0
- EXLS1/simready_usd/payloads/.thumbs/256x256/internal.usd.png +3 -0
- EXLS1/simready_usd/payloads/external.usd +3 -0
- EXLS1/simready_usd/payloads/internal.usd +3 -0
- EXLS1/simready_usd/textures/image screen.png +3 -0
.gitattributes
CHANGED
|
@@ -87,3 +87,6 @@ CW181DCHA1SAEX/simready_usd/payloads/external.usd filter=lfs diff=lfs merge=lfs
|
|
| 87 |
CW181DCHA1SAEX/simready_usd/payloads/internal.usd filter=lfs diff=lfs merge=lfs -text
|
| 88 |
CW415H1TA1S9BT/simready_usd/payloads/external.usd filter=lfs diff=lfs merge=lfs -text
|
| 89 |
CW415H1TA1S9BT/simready_usd/payloads/internal.usd filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
CW181DCHA1SAEX/simready_usd/payloads/internal.usd filter=lfs diff=lfs merge=lfs -text
|
| 88 |
CW415H1TA1S9BT/simready_usd/payloads/external.usd filter=lfs diff=lfs merge=lfs -text
|
| 89 |
CW415H1TA1S9BT/simready_usd/payloads/internal.usd filter=lfs diff=lfs merge=lfs -text
|
| 90 |
+
EXLS1/simready_usd/EXLS1_main.usd filter=lfs diff=lfs merge=lfs -text
|
| 91 |
+
EXLS1/simready_usd/payloads/external.usd filter=lfs diff=lfs merge=lfs -text
|
| 92 |
+
EXLS1/simready_usd/payloads/internal.usd filter=lfs diff=lfs merge=lfs -text
|
EXLS1/.metadata/com.nvidia.simready.root_usds.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"format_version": "1.0",
|
| 3 |
+
"entries": [
|
| 4 |
+
"simready_usd/EXLS1_main.usd"
|
| 5 |
+
]
|
| 6 |
+
}
|
EXLS1/com.nvidia.simready.packaging.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"format_version": "1.0",
|
| 3 |
+
"package_id": "simready.hf.Vertiv.simready-assets.EXLS1.2026.09.25_01",
|
| 4 |
+
"license": "cc-by-4.0",
|
| 5 |
+
"metadata": []
|
| 6 |
+
}
|
EXLS1/simready_usd/.thumbs/256x256/EXLS1_main.usd.png
ADDED
|
|
Git LFS Details
|
EXLS1/simready_usd/EXLS1_main.usd
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:932abf691def7632a26ba363a6cf7d3d9657f4f1534ac4c4d51e55a73f06dee4
|
| 3 |
+
size 8514765
|
EXLS1/simready_usd/layers/.thumbs/256x256/EXLS1_ConnectionPoints.usd.png
ADDED
|
|
Git LFS Details
|
EXLS1/simready_usd/layers/.thumbs/256x256/EXLS1_Properties.usda.png
ADDED
|
|
Git LFS Details
|
EXLS1/simready_usd/layers/EXLS1_ConnectionPoints.usd
ADDED
|
Binary file (22.1 kB). View file
|
|
|
EXLS1/simready_usd/layers/EXLS1_Properties.json
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"properties": {
|
| 3 |
+
"aif:spec": {
|
| 4 |
+
"type": "string",
|
| 5 |
+
"value": "",
|
| 6 |
+
"description": ""
|
| 7 |
+
},
|
| 8 |
+
"aif:spec:upsRating": {
|
| 9 |
+
"type": "int",
|
| 10 |
+
"value": 1200,
|
| 11 |
+
"description": "UPS Rating in KW"
|
| 12 |
+
},
|
| 13 |
+
"aif:spec:outputActivePower": {
|
| 14 |
+
"type": "int",
|
| 15 |
+
"value": 1200,
|
| 16 |
+
"description": "Output Active Power at 104degF (kW)"
|
| 17 |
+
},
|
| 18 |
+
"aif:spec:electricalInputVoltage": {
|
| 19 |
+
"type": "int",
|
| 20 |
+
"value": 480,
|
| 21 |
+
"description": "Electrical Nominal Voltage in V"
|
| 22 |
+
},
|
| 23 |
+
"aif:spec:electricalCurrent": {
|
| 24 |
+
"type": "string",
|
| 25 |
+
"value": "",
|
| 26 |
+
"description": "Electrical Current"
|
| 27 |
+
},
|
| 28 |
+
"aif:spec:inputCurrentDistortion": {
|
| 29 |
+
"type": "string",
|
| 30 |
+
"value": "",
|
| 31 |
+
"description": "Input Current Distortion (THDi) at Nominal Voltage at Full Load"
|
| 32 |
+
},
|
| 33 |
+
"aif:spec:electricalInputFrequency": {
|
| 34 |
+
"type": "int",
|
| 35 |
+
"value": 60,
|
| 36 |
+
"description": "Electrical Input Frequency in HZ"
|
| 37 |
+
},
|
| 38 |
+
"aif:spec:electricalInputPhase": {
|
| 39 |
+
"type": "int",
|
| 40 |
+
"value": 3,
|
| 41 |
+
"description": "Electrical Input Phase"
|
| 42 |
+
},
|
| 43 |
+
"aif:spec:inputPowerFactor": {
|
| 44 |
+
"type": "float",
|
| 45 |
+
"value": 0.99,
|
| 46 |
+
"description": "Electrical Power Factor"
|
| 47 |
+
},
|
| 48 |
+
"aif:spec:electricalPowerWalkIn": {
|
| 49 |
+
"type": "string",
|
| 50 |
+
"value": "",
|
| 51 |
+
"description": "Power Walk-in (seconds)"
|
| 52 |
+
},
|
| 53 |
+
"aif:spec:batteryType": {
|
| 54 |
+
"type": "string",
|
| 55 |
+
"value": "Lithium ion, VRLA",
|
| 56 |
+
"description": "Battery Type"
|
| 57 |
+
},
|
| 58 |
+
"aif:spec:batteryFloatVoltage": {
|
| 59 |
+
"type": "int",
|
| 60 |
+
"value": 540,
|
| 61 |
+
"description": "Battery Float Voltage"
|
| 62 |
+
},
|
| 63 |
+
"aif:spec:dcRippleVoltage": {
|
| 64 |
+
"type": "string",
|
| 65 |
+
"value": "",
|
| 66 |
+
"description": "DC Ripple at Float Voltage"
|
| 67 |
+
},
|
| 68 |
+
"aif:spec:nominalBatteryBus": {
|
| 69 |
+
"type": "string",
|
| 70 |
+
"value": "480 V",
|
| 71 |
+
"description": "Nominal Battery Bus"
|
| 72 |
+
},
|
| 73 |
+
"aif:spec:temperatureCompensatedBatteryCharging": {
|
| 74 |
+
"type": "string",
|
| 75 |
+
"value": "",
|
| 76 |
+
"description": "Temperature Compensated Battery Charging"
|
| 77 |
+
},
|
| 78 |
+
"aif:spec:loadPowerFactor": {
|
| 79 |
+
"type": "string",
|
| 80 |
+
"value": "",
|
| 81 |
+
"description": "Load Power Factor Supported (Without Derating)"
|
| 82 |
+
},
|
| 83 |
+
"aif:spec:outputVoltage": {
|
| 84 |
+
"type": "int",
|
| 85 |
+
"value": 480,
|
| 86 |
+
"description": "Output Voltage"
|
| 87 |
+
},
|
| 88 |
+
"aif:spec:electricalOutputFrequency": {
|
| 89 |
+
"type": "int",
|
| 90 |
+
"value": 60,
|
| 91 |
+
"description": "Electrical Output Frequency in HZ"
|
| 92 |
+
},
|
| 93 |
+
"aif:spec:electricalOutputPhase": {
|
| 94 |
+
"type": "int",
|
| 95 |
+
"value": 3,
|
| 96 |
+
"description": "Electrical Output Phase"
|
| 97 |
+
},
|
| 98 |
+
"aif:spec:outputThdNominalVoltage": {
|
| 99 |
+
"type": "float",
|
| 100 |
+
"value": 1.5,
|
| 101 |
+
"description": "Output THD at Nominal Voltage at RMS value"
|
| 102 |
+
},
|
| 103 |
+
"aif:spec:outputThdNominalVoltageWithNonLinearLoad": {
|
| 104 |
+
"type": "int",
|
| 105 |
+
"value": 5,
|
| 106 |
+
"description": "Output THD at Nominal Voltage including a 100kVA Non Linear Load per IEC 6204 at RMS value"
|
| 107 |
+
},
|
| 108 |
+
"aif:spec:transientRecoveryLoad": {
|
| 109 |
+
"type": "float",
|
| 110 |
+
"value": 0.04,
|
| 111 |
+
"description": "Transient Recovery 100 Load Step"
|
| 112 |
+
},
|
| 113 |
+
"aif:spec:voltageDisplacement": {
|
| 114 |
+
"type": "int",
|
| 115 |
+
"value": 120,
|
| 116 |
+
"description": "Voltage Displacement"
|
| 117 |
+
},
|
| 118 |
+
"aif:spec:overloadAtNominalVoltage": {
|
| 119 |
+
"type": "int",
|
| 120 |
+
"value": 110,
|
| 121 |
+
"description": "Overload at Nominal Voltage and 77degF (25degC)"
|
| 122 |
+
},
|
| 123 |
+
"aif:spec:upsEnclosureClass": {
|
| 124 |
+
"type": "string",
|
| 125 |
+
"value": "IP 20",
|
| 126 |
+
"description": "UPS Enclosure Class with and without front door open"
|
| 127 |
+
},
|
| 128 |
+
"aif:spec:color": {
|
| 129 |
+
"type": "string",
|
| 130 |
+
"value": "Black, RAL 7021",
|
| 131 |
+
"description": "Color"
|
| 132 |
+
},
|
| 133 |
+
"aif:spec:operatingTemperature": {
|
| 134 |
+
"type": "float",
|
| 135 |
+
"value": 273.15,
|
| 136 |
+
"description": "Operating Temperature in degC"
|
| 137 |
+
},
|
| 138 |
+
"aif:spec:relativeHumidity": {
|
| 139 |
+
"type": "string",
|
| 140 |
+
"value": "",
|
| 141 |
+
"description": "Relative Humidity non-condensing"
|
| 142 |
+
},
|
| 143 |
+
"aif:spec:operatingAltitude": {
|
| 144 |
+
"type": "float",
|
| 145 |
+
"value": 1005.84,
|
| 146 |
+
"description": "Operating Altitude without derating"
|
| 147 |
+
},
|
| 148 |
+
"aif:spec:communicationOptions": {
|
| 149 |
+
"type": "string",
|
| 150 |
+
"value": "",
|
| 151 |
+
"description": "Communication Options"
|
| 152 |
+
},
|
| 153 |
+
"aif:spec:cardCompatibility": {
|
| 154 |
+
"type": "string",
|
| 155 |
+
"value": "IS-UNITY-DP, IS-485EXI",
|
| 156 |
+
"description": "Card Compatibility"
|
| 157 |
+
},
|
| 158 |
+
"aif:spec:protocolsAvailable": {
|
| 159 |
+
"type": "string",
|
| 160 |
+
"value": "MODBUS-IP, MODBUS-485, BACNET-IP, BACNET-MSTP, SNMP, HTTP, LIFE Services",
|
| 161 |
+
"description": "Protocols Available"
|
| 162 |
+
},
|
| 163 |
+
"aif:core": {
|
| 164 |
+
"type": "string",
|
| 165 |
+
"value": "",
|
| 166 |
+
"description": ""
|
| 167 |
+
},
|
| 168 |
+
"aif:core:manufacturer": {
|
| 169 |
+
"type": "string",
|
| 170 |
+
"value": "Vertiv",
|
| 171 |
+
"description": "Equipment manufacturer name"
|
| 172 |
+
},
|
| 173 |
+
"aif:core:modelNumber": {
|
| 174 |
+
"type": "string",
|
| 175 |
+
"value": "Liebert EXL S1 1200 kW",
|
| 176 |
+
"description": "Equipment model number [AIF-MANAGED]"
|
| 177 |
+
},
|
| 178 |
+
"aif:core:overallGeometryDimensions": {
|
| 179 |
+
"type": "vector3f",
|
| 180 |
+
"value": [
|
| 181 |
+
2654.0,
|
| 182 |
+
914.0,
|
| 183 |
+
2009.0
|
| 184 |
+
],
|
| 185 |
+
"description": "Overall Geometry (WxDxH) (metric)"
|
| 186 |
+
},
|
| 187 |
+
"aif:core:weight": {
|
| 188 |
+
"type": "int",
|
| 189 |
+
"value": 2117,
|
| 190 |
+
"description": "Equipment weight in kilograms"
|
| 191 |
+
},
|
| 192 |
+
"aif:core:height": {
|
| 193 |
+
"type": "int",
|
| 194 |
+
"value": 2009,
|
| 195 |
+
"description": "Equipment height in mm"
|
| 196 |
+
},
|
| 197 |
+
"aif:core:width": {
|
| 198 |
+
"type": "int",
|
| 199 |
+
"value": 2654,
|
| 200 |
+
"description": "Equipment width in mm"
|
| 201 |
+
},
|
| 202 |
+
"aif:core:depth": {
|
| 203 |
+
"type": "int",
|
| 204 |
+
"value": 914,
|
| 205 |
+
"description": "Equipment depth in mm"
|
| 206 |
+
},
|
| 207 |
+
"aif:core:installationClearance": {
|
| 208 |
+
"type": "int",
|
| 209 |
+
"value": 2000,
|
| 210 |
+
"description": "Installation Clearance in mm"
|
| 211 |
+
},
|
| 212 |
+
"aif:core:accessibilityRequirement": {
|
| 213 |
+
"type": "int",
|
| 214 |
+
"value": 1500,
|
| 215 |
+
"description": "Service clearance in mm"
|
| 216 |
+
},
|
| 217 |
+
"aif:core:assetVersion": {
|
| 218 |
+
"type": "float",
|
| 219 |
+
"value": 0.1,
|
| 220 |
+
"description": "Design Revision of Digital Twin Asset"
|
| 221 |
+
},
|
| 222 |
+
"aif:core:assetClass": {
|
| 223 |
+
"type": "string",
|
| 224 |
+
"value": "UPS",
|
| 225 |
+
"description": "Class of AI Factory Equipment"
|
| 226 |
+
},
|
| 227 |
+
"aif:core:sceneOptimizerVersion": {
|
| 228 |
+
"type": "string",
|
| 229 |
+
"value": "get_scene_optimizer_id()",
|
| 230 |
+
"description": "Scene Optimizer version"
|
| 231 |
+
},
|
| 232 |
+
"aif:core:assetValidatorVersion": {
|
| 233 |
+
"type": "string",
|
| 234 |
+
"value": "get_asset_validator_id()",
|
| 235 |
+
"description": "Asset Validator version"
|
| 236 |
+
},
|
| 237 |
+
"aif:core:assetDescription": {
|
| 238 |
+
"type": "string",
|
| 239 |
+
"value": "Vertiv Liebert EXL S1 1200 kW monolithic uninterruptible power supply.",
|
| 240 |
+
"description": "Human Readable Description of Asset [AIF-MANAGED]"
|
| 241 |
+
},
|
| 242 |
+
"aif:core:connectsToModelDocumentation": {
|
| 243 |
+
"type": "string",
|
| 244 |
+
"value": "https://www.vertiv.com/en-in/products-catalog/critical-power/uninterruptible-power-supplies-ups/liebert-exl-s1-1000-1200kvakw/",
|
| 245 |
+
"description": "Url to online documentation"
|
| 246 |
+
},
|
| 247 |
+
"aif:core:assetCreationDate": {
|
| 248 |
+
"type": "string",
|
| 249 |
+
"value": "8/26/2026",
|
| 250 |
+
"description": "Creation Date of Revision of Asset ISO 8601 format (YYYY-MM-DD)"
|
| 251 |
+
},
|
| 252 |
+
"aif:core:simreadyVersion": {
|
| 253 |
+
"type": "float",
|
| 254 |
+
"value": 0.1,
|
| 255 |
+
"description": "SimReady version"
|
| 256 |
+
},
|
| 257 |
+
"aif:core:geometrympv": {
|
| 258 |
+
"type": "string",
|
| 259 |
+
"value": "",
|
| 260 |
+
"description": "Geometry_MPV"
|
| 261 |
+
},
|
| 262 |
+
"aif:core:aifthermal": {
|
| 263 |
+
"type": "string",
|
| 264 |
+
"value": "",
|
| 265 |
+
"description": "AIF_Thermal"
|
| 266 |
+
},
|
| 267 |
+
"aif:core:aifelectrical": {
|
| 268 |
+
"type": "string",
|
| 269 |
+
"value": "",
|
| 270 |
+
"description": "AIF_Electrical"
|
| 271 |
+
}
|
| 272 |
+
},
|
| 273 |
+
"metadata": {
|
| 274 |
+
"description": "AIF properties for USD equipment models",
|
| 275 |
+
"version": "1.0",
|
| 276 |
+
"created": "2025-12-02"
|
| 277 |
+
}
|
| 278 |
+
}
|
EXLS1/simready_usd/layers/EXLS1_Properties.usda
ADDED
|
@@ -0,0 +1,539 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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= "" (
|
| 9 |
+
customData = {
|
| 10 |
+
dictionary omni = {
|
| 11 |
+
dictionary kit = {
|
| 12 |
+
bool locked = 1
|
| 13 |
+
}
|
| 14 |
+
}
|
| 15 |
+
}
|
| 16 |
+
doc = "[AIF-MANAGED]"
|
| 17 |
+
)
|
| 18 |
+
custom int aif:core:accessibilityRequirement = 1500 (
|
| 19 |
+
customData = {
|
| 20 |
+
dictionary omni = {
|
| 21 |
+
dictionary kit = {
|
| 22 |
+
bool locked = 1
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
doc = "Service clearance in mm [AIF-MANAGED]"
|
| 27 |
+
)
|
| 28 |
+
custom string aif:core:aifelectrical = "" (
|
| 29 |
+
customData = {
|
| 30 |
+
dictionary omni = {
|
| 31 |
+
dictionary kit = {
|
| 32 |
+
bool locked = 1
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
doc = "AIF_Electrical [AIF-MANAGED]"
|
| 37 |
+
)
|
| 38 |
+
custom string aif:core:aifthermal = "" (
|
| 39 |
+
customData = {
|
| 40 |
+
dictionary omni = {
|
| 41 |
+
dictionary kit = {
|
| 42 |
+
bool locked = 1
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
doc = "AIF_Thermal [AIF-MANAGED]"
|
| 47 |
+
)
|
| 48 |
+
custom string aif:core:assetClass = "UPS" (
|
| 49 |
+
customData = {
|
| 50 |
+
dictionary omni = {
|
| 51 |
+
dictionary kit = {
|
| 52 |
+
bool locked = 1
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
doc = "Class of AI Factory Equipment [AIF-MANAGED]"
|
| 57 |
+
)
|
| 58 |
+
custom string aif:core:assetCreationDate = "8/26/2026" (
|
| 59 |
+
customData = {
|
| 60 |
+
dictionary omni = {
|
| 61 |
+
dictionary kit = {
|
| 62 |
+
bool locked = 1
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
doc = "Creation Date of Revision of Asset ISO 8601 format (YYYY-MM-DD) [AIF-MANAGED]"
|
| 67 |
+
)
|
| 68 |
+
custom string aif:core:assetDescription = "Vertiv Liebert EXL S1 1200 kW monolithic uninterruptible power supply." (
|
| 69 |
+
customData = {
|
| 70 |
+
dictionary omni = {
|
| 71 |
+
dictionary kit = {
|
| 72 |
+
bool locked = 1
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
doc = "Human Readable Description of Asset [AIF-MANAGED]"
|
| 77 |
+
)
|
| 78 |
+
custom string aif:core:assetValidatorVersion = "get_asset_validator_id()" (
|
| 79 |
+
customData = {
|
| 80 |
+
dictionary omni = {
|
| 81 |
+
dictionary kit = {
|
| 82 |
+
bool locked = 1
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
doc = "Asset Validator version [AIF-MANAGED]"
|
| 87 |
+
)
|
| 88 |
+
custom float aif:core:assetVersion = 0.1 (
|
| 89 |
+
customData = {
|
| 90 |
+
dictionary omni = {
|
| 91 |
+
dictionary kit = {
|
| 92 |
+
bool locked = 1
|
| 93 |
+
}
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
doc = "Design Revision of Digital Twin Asset [AIF-MANAGED]"
|
| 97 |
+
)
|
| 98 |
+
custom string aif:core:connectsToModelDocumentation = "https://www.vertiv.com/en-in/products-catalog/critical-power/uninterruptible-power-supplies-ups/liebert-exl-s1-1000-1200kvakw/" (
|
| 99 |
+
customData = {
|
| 100 |
+
dictionary omni = {
|
| 101 |
+
dictionary kit = {
|
| 102 |
+
bool locked = 1
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
doc = "Url to online documentation [AIF-MANAGED]"
|
| 107 |
+
)
|
| 108 |
+
custom int aif:core:depth = 914 (
|
| 109 |
+
customData = {
|
| 110 |
+
dictionary omni = {
|
| 111 |
+
dictionary kit = {
|
| 112 |
+
bool locked = 1
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
}
|
| 116 |
+
doc = "Equipment depth in mm [AIF-MANAGED]"
|
| 117 |
+
)
|
| 118 |
+
custom string aif:core:geometrympv = "" (
|
| 119 |
+
customData = {
|
| 120 |
+
dictionary omni = {
|
| 121 |
+
dictionary kit = {
|
| 122 |
+
bool locked = 1
|
| 123 |
+
}
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
+
doc = "Geometry_MPV [AIF-MANAGED]"
|
| 127 |
+
)
|
| 128 |
+
custom int aif:core:height = 2009 (
|
| 129 |
+
customData = {
|
| 130 |
+
dictionary omni = {
|
| 131 |
+
dictionary kit = {
|
| 132 |
+
bool locked = 1
|
| 133 |
+
}
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
doc = "Equipment height in mm [AIF-MANAGED]"
|
| 137 |
+
)
|
| 138 |
+
custom int aif:core:installationClearance = 2000 (
|
| 139 |
+
customData = {
|
| 140 |
+
dictionary omni = {
|
| 141 |
+
dictionary kit = {
|
| 142 |
+
bool locked = 1
|
| 143 |
+
}
|
| 144 |
+
}
|
| 145 |
+
}
|
| 146 |
+
doc = "Installation Clearance in mm [AIF-MANAGED]"
|
| 147 |
+
)
|
| 148 |
+
custom string aif:core:manufacturer = "Vertiv" (
|
| 149 |
+
customData = {
|
| 150 |
+
dictionary omni = {
|
| 151 |
+
dictionary kit = {
|
| 152 |
+
bool locked = 1
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
}
|
| 156 |
+
doc = "Equipment manufacturer name [AIF-MANAGED]"
|
| 157 |
+
)
|
| 158 |
+
custom string aif:core:modelNumber = "Liebert EXL S1 1200 kW" (
|
| 159 |
+
customData = {
|
| 160 |
+
dictionary omni = {
|
| 161 |
+
dictionary kit = {
|
| 162 |
+
bool locked = 1
|
| 163 |
+
}
|
| 164 |
+
}
|
| 165 |
+
}
|
| 166 |
+
doc = "Equipment model number [AIF-MANAGED]"
|
| 167 |
+
)
|
| 168 |
+
custom vector3f aif:core:overallGeometryDimensions = (2654, 914, 2009) (
|
| 169 |
+
customData = {
|
| 170 |
+
dictionary omni = {
|
| 171 |
+
dictionary kit = {
|
| 172 |
+
bool locked = 1
|
| 173 |
+
}
|
| 174 |
+
}
|
| 175 |
+
}
|
| 176 |
+
doc = "Overall Geometry (WxDxH) (metric) [AIF-MANAGED]"
|
| 177 |
+
)
|
| 178 |
+
custom string aif:core:sceneOptimizerVersion = "get_scene_optimizer_id()" (
|
| 179 |
+
customData = {
|
| 180 |
+
dictionary omni = {
|
| 181 |
+
dictionary kit = {
|
| 182 |
+
bool locked = 1
|
| 183 |
+
}
|
| 184 |
+
}
|
| 185 |
+
}
|
| 186 |
+
doc = "Scene Optimizer version [AIF-MANAGED]"
|
| 187 |
+
)
|
| 188 |
+
custom float aif:core:simreadyVersion = 0.1 (
|
| 189 |
+
customData = {
|
| 190 |
+
dictionary omni = {
|
| 191 |
+
dictionary kit = {
|
| 192 |
+
bool locked = 1
|
| 193 |
+
}
|
| 194 |
+
}
|
| 195 |
+
}
|
| 196 |
+
doc = "SimReady version [AIF-MANAGED]"
|
| 197 |
+
)
|
| 198 |
+
custom int aif:core:weight = 2117 (
|
| 199 |
+
customData = {
|
| 200 |
+
dictionary omni = {
|
| 201 |
+
dictionary kit = {
|
| 202 |
+
bool locked = 1
|
| 203 |
+
}
|
| 204 |
+
}
|
| 205 |
+
}
|
| 206 |
+
doc = "Equipment weight in kilograms [AIF-MANAGED]"
|
| 207 |
+
)
|
| 208 |
+
custom int aif:core:width = 2654 (
|
| 209 |
+
customData = {
|
| 210 |
+
dictionary omni = {
|
| 211 |
+
dictionary kit = {
|
| 212 |
+
bool locked = 1
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
doc = "Equipment width in mm [AIF-MANAGED]"
|
| 217 |
+
)
|
| 218 |
+
custom string aif:spec = "" (
|
| 219 |
+
customData = {
|
| 220 |
+
dictionary omni = {
|
| 221 |
+
dictionary kit = {
|
| 222 |
+
bool locked = 1
|
| 223 |
+
}
|
| 224 |
+
}
|
| 225 |
+
}
|
| 226 |
+
doc = "[AIF-MANAGED]"
|
| 227 |
+
)
|
| 228 |
+
custom int aif:spec:batteryFloatVoltage = 540 (
|
| 229 |
+
customData = {
|
| 230 |
+
dictionary omni = {
|
| 231 |
+
dictionary kit = {
|
| 232 |
+
bool locked = 1
|
| 233 |
+
}
|
| 234 |
+
}
|
| 235 |
+
}
|
| 236 |
+
doc = "Battery Float Voltage [AIF-MANAGED]"
|
| 237 |
+
)
|
| 238 |
+
custom string aif:spec:batteryType = "Lithium ion, VRLA" (
|
| 239 |
+
customData = {
|
| 240 |
+
dictionary omni = {
|
| 241 |
+
dictionary kit = {
|
| 242 |
+
bool locked = 1
|
| 243 |
+
}
|
| 244 |
+
}
|
| 245 |
+
}
|
| 246 |
+
doc = "Battery Type [AIF-MANAGED]"
|
| 247 |
+
)
|
| 248 |
+
custom string aif:spec:cardCompatibility = "IS-UNITY-DP, IS-485EXI" (
|
| 249 |
+
customData = {
|
| 250 |
+
dictionary omni = {
|
| 251 |
+
dictionary kit = {
|
| 252 |
+
bool locked = 1
|
| 253 |
+
}
|
| 254 |
+
}
|
| 255 |
+
}
|
| 256 |
+
doc = "Card Compatibility [AIF-MANAGED]"
|
| 257 |
+
)
|
| 258 |
+
custom string aif:spec:color = "Black, RAL 7021" (
|
| 259 |
+
customData = {
|
| 260 |
+
dictionary omni = {
|
| 261 |
+
dictionary kit = {
|
| 262 |
+
bool locked = 1
|
| 263 |
+
}
|
| 264 |
+
}
|
| 265 |
+
}
|
| 266 |
+
doc = "Color [AIF-MANAGED]"
|
| 267 |
+
)
|
| 268 |
+
custom string aif:spec:communicationOptions = "" (
|
| 269 |
+
customData = {
|
| 270 |
+
dictionary omni = {
|
| 271 |
+
dictionary kit = {
|
| 272 |
+
bool locked = 1
|
| 273 |
+
}
|
| 274 |
+
}
|
| 275 |
+
}
|
| 276 |
+
doc = "Communication Options [AIF-MANAGED]"
|
| 277 |
+
)
|
| 278 |
+
custom string aif:spec:dcRippleVoltage = "" (
|
| 279 |
+
customData = {
|
| 280 |
+
dictionary omni = {
|
| 281 |
+
dictionary kit = {
|
| 282 |
+
bool locked = 1
|
| 283 |
+
}
|
| 284 |
+
}
|
| 285 |
+
}
|
| 286 |
+
doc = "DC Ripple at Float Voltage [AIF-MANAGED]"
|
| 287 |
+
)
|
| 288 |
+
custom string aif:spec:electricalCurrent = "" (
|
| 289 |
+
customData = {
|
| 290 |
+
dictionary omni = {
|
| 291 |
+
dictionary kit = {
|
| 292 |
+
bool locked = 1
|
| 293 |
+
}
|
| 294 |
+
}
|
| 295 |
+
}
|
| 296 |
+
doc = "Electrical Current [AIF-MANAGED]"
|
| 297 |
+
)
|
| 298 |
+
custom int aif:spec:electricalInputFrequency = 60 (
|
| 299 |
+
customData = {
|
| 300 |
+
dictionary omni = {
|
| 301 |
+
dictionary kit = {
|
| 302 |
+
bool locked = 1
|
| 303 |
+
}
|
| 304 |
+
}
|
| 305 |
+
}
|
| 306 |
+
doc = "Electrical Input Frequency in HZ [AIF-MANAGED]"
|
| 307 |
+
)
|
| 308 |
+
custom int aif:spec:electricalInputPhase = 3 (
|
| 309 |
+
customData = {
|
| 310 |
+
dictionary omni = {
|
| 311 |
+
dictionary kit = {
|
| 312 |
+
bool locked = 1
|
| 313 |
+
}
|
| 314 |
+
}
|
| 315 |
+
}
|
| 316 |
+
doc = "Electrical Input Phase [AIF-MANAGED]"
|
| 317 |
+
)
|
| 318 |
+
custom int aif:spec:electricalInputVoltage = 480 (
|
| 319 |
+
customData = {
|
| 320 |
+
dictionary omni = {
|
| 321 |
+
dictionary kit = {
|
| 322 |
+
bool locked = 1
|
| 323 |
+
}
|
| 324 |
+
}
|
| 325 |
+
}
|
| 326 |
+
doc = "Electrical Nominal Voltage in V [AIF-MANAGED]"
|
| 327 |
+
)
|
| 328 |
+
custom int aif:spec:electricalOutputFrequency = 60 (
|
| 329 |
+
customData = {
|
| 330 |
+
dictionary omni = {
|
| 331 |
+
dictionary kit = {
|
| 332 |
+
bool locked = 1
|
| 333 |
+
}
|
| 334 |
+
}
|
| 335 |
+
}
|
| 336 |
+
doc = "Electrical Output Frequency in HZ [AIF-MANAGED]"
|
| 337 |
+
)
|
| 338 |
+
custom int aif:spec:electricalOutputPhase = 3 (
|
| 339 |
+
customData = {
|
| 340 |
+
dictionary omni = {
|
| 341 |
+
dictionary kit = {
|
| 342 |
+
bool locked = 1
|
| 343 |
+
}
|
| 344 |
+
}
|
| 345 |
+
}
|
| 346 |
+
doc = "Electrical Output Phase [AIF-MANAGED]"
|
| 347 |
+
)
|
| 348 |
+
custom string aif:spec:electricalPowerWalkIn = "" (
|
| 349 |
+
customData = {
|
| 350 |
+
dictionary omni = {
|
| 351 |
+
dictionary kit = {
|
| 352 |
+
bool locked = 1
|
| 353 |
+
}
|
| 354 |
+
}
|
| 355 |
+
}
|
| 356 |
+
doc = "Power Walk-in (seconds) [AIF-MANAGED]"
|
| 357 |
+
)
|
| 358 |
+
custom string aif:spec:inputCurrentDistortion = "" (
|
| 359 |
+
customData = {
|
| 360 |
+
dictionary omni = {
|
| 361 |
+
dictionary kit = {
|
| 362 |
+
bool locked = 1
|
| 363 |
+
}
|
| 364 |
+
}
|
| 365 |
+
}
|
| 366 |
+
doc = "Input Current Distortion (THDi) at Nominal Voltage at Full Load [AIF-MANAGED]"
|
| 367 |
+
)
|
| 368 |
+
custom float aif:spec:inputPowerFactor = 0.99 (
|
| 369 |
+
customData = {
|
| 370 |
+
dictionary omni = {
|
| 371 |
+
dictionary kit = {
|
| 372 |
+
bool locked = 1
|
| 373 |
+
}
|
| 374 |
+
}
|
| 375 |
+
}
|
| 376 |
+
doc = "Electrical Power Factor [AIF-MANAGED]"
|
| 377 |
+
)
|
| 378 |
+
custom string aif:spec:loadPowerFactor = "" (
|
| 379 |
+
customData = {
|
| 380 |
+
dictionary omni = {
|
| 381 |
+
dictionary kit = {
|
| 382 |
+
bool locked = 1
|
| 383 |
+
}
|
| 384 |
+
}
|
| 385 |
+
}
|
| 386 |
+
doc = "Load Power Factor Supported (Without Derating) [AIF-MANAGED]"
|
| 387 |
+
)
|
| 388 |
+
custom string aif:spec:nominalBatteryBus = "480 V" (
|
| 389 |
+
customData = {
|
| 390 |
+
dictionary omni = {
|
| 391 |
+
dictionary kit = {
|
| 392 |
+
bool locked = 1
|
| 393 |
+
}
|
| 394 |
+
}
|
| 395 |
+
}
|
| 396 |
+
doc = "Nominal Battery Bus [AIF-MANAGED]"
|
| 397 |
+
)
|
| 398 |
+
custom float aif:spec:operatingAltitude = 1005.84 (
|
| 399 |
+
customData = {
|
| 400 |
+
dictionary omni = {
|
| 401 |
+
dictionary kit = {
|
| 402 |
+
bool locked = 1
|
| 403 |
+
}
|
| 404 |
+
}
|
| 405 |
+
}
|
| 406 |
+
doc = "Operating Altitude without derating [AIF-MANAGED]"
|
| 407 |
+
)
|
| 408 |
+
custom float aif:spec:operatingTemperature = 273.15 (
|
| 409 |
+
customData = {
|
| 410 |
+
dictionary omni = {
|
| 411 |
+
dictionary kit = {
|
| 412 |
+
bool locked = 1
|
| 413 |
+
}
|
| 414 |
+
}
|
| 415 |
+
}
|
| 416 |
+
doc = "Operating Temperature in degC [AIF-MANAGED]"
|
| 417 |
+
)
|
| 418 |
+
custom int aif:spec:outputActivePower = 1200 (
|
| 419 |
+
customData = {
|
| 420 |
+
dictionary omni = {
|
| 421 |
+
dictionary kit = {
|
| 422 |
+
bool locked = 1
|
| 423 |
+
}
|
| 424 |
+
}
|
| 425 |
+
}
|
| 426 |
+
doc = "Output Active Power at 104degF (kW) [AIF-MANAGED]"
|
| 427 |
+
)
|
| 428 |
+
custom float aif:spec:outputThdNominalVoltage = 1.5 (
|
| 429 |
+
customData = {
|
| 430 |
+
dictionary omni = {
|
| 431 |
+
dictionary kit = {
|
| 432 |
+
bool locked = 1
|
| 433 |
+
}
|
| 434 |
+
}
|
| 435 |
+
}
|
| 436 |
+
doc = "Output THD at Nominal Voltage at RMS value [AIF-MANAGED]"
|
| 437 |
+
)
|
| 438 |
+
custom int aif:spec:outputThdNominalVoltageWithNonLinearLoad = 5 (
|
| 439 |
+
customData = {
|
| 440 |
+
dictionary omni = {
|
| 441 |
+
dictionary kit = {
|
| 442 |
+
bool locked = 1
|
| 443 |
+
}
|
| 444 |
+
}
|
| 445 |
+
}
|
| 446 |
+
doc = "Output THD at Nominal Voltage including a 100kVA Non Linear Load per IEC 6204 at RMS value [AIF-MANAGED]"
|
| 447 |
+
)
|
| 448 |
+
custom int aif:spec:outputVoltage = 480 (
|
| 449 |
+
customData = {
|
| 450 |
+
dictionary omni = {
|
| 451 |
+
dictionary kit = {
|
| 452 |
+
bool locked = 1
|
| 453 |
+
}
|
| 454 |
+
}
|
| 455 |
+
}
|
| 456 |
+
doc = "Output Voltage [AIF-MANAGED]"
|
| 457 |
+
)
|
| 458 |
+
custom int aif:spec:overloadAtNominalVoltage = 110 (
|
| 459 |
+
customData = {
|
| 460 |
+
dictionary omni = {
|
| 461 |
+
dictionary kit = {
|
| 462 |
+
bool locked = 1
|
| 463 |
+
}
|
| 464 |
+
}
|
| 465 |
+
}
|
| 466 |
+
doc = "Overload at Nominal Voltage and 77degF (25degC) [AIF-MANAGED]"
|
| 467 |
+
)
|
| 468 |
+
custom string aif:spec:protocolsAvailable = "MODBUS-IP, MODBUS-485, BACNET-IP, BACNET-MSTP, SNMP, HTTP, LIFE Services" (
|
| 469 |
+
customData = {
|
| 470 |
+
dictionary omni = {
|
| 471 |
+
dictionary kit = {
|
| 472 |
+
bool locked = 1
|
| 473 |
+
}
|
| 474 |
+
}
|
| 475 |
+
}
|
| 476 |
+
doc = "Protocols Available [AIF-MANAGED]"
|
| 477 |
+
)
|
| 478 |
+
custom string aif:spec:relativeHumidity = "" (
|
| 479 |
+
customData = {
|
| 480 |
+
dictionary omni = {
|
| 481 |
+
dictionary kit = {
|
| 482 |
+
bool locked = 1
|
| 483 |
+
}
|
| 484 |
+
}
|
| 485 |
+
}
|
| 486 |
+
doc = "Relative Humidity non-condensing [AIF-MANAGED]"
|
| 487 |
+
)
|
| 488 |
+
custom string aif:spec:temperatureCompensatedBatteryCharging = "" (
|
| 489 |
+
customData = {
|
| 490 |
+
dictionary omni = {
|
| 491 |
+
dictionary kit = {
|
| 492 |
+
bool locked = 1
|
| 493 |
+
}
|
| 494 |
+
}
|
| 495 |
+
}
|
| 496 |
+
doc = "Temperature Compensated Battery Charging [AIF-MANAGED]"
|
| 497 |
+
)
|
| 498 |
+
custom float aif:spec:transientRecoveryLoad = 0.04 (
|
| 499 |
+
customData = {
|
| 500 |
+
dictionary omni = {
|
| 501 |
+
dictionary kit = {
|
| 502 |
+
bool locked = 1
|
| 503 |
+
}
|
| 504 |
+
}
|
| 505 |
+
}
|
| 506 |
+
doc = "Transient Recovery 100 Load Step [AIF-MANAGED]"
|
| 507 |
+
)
|
| 508 |
+
custom string aif:spec:upsEnclosureClass = "IP 20" (
|
| 509 |
+
customData = {
|
| 510 |
+
dictionary omni = {
|
| 511 |
+
dictionary kit = {
|
| 512 |
+
bool locked = 1
|
| 513 |
+
}
|
| 514 |
+
}
|
| 515 |
+
}
|
| 516 |
+
doc = "UPS Enclosure Class with and without front door open [AIF-MANAGED]"
|
| 517 |
+
)
|
| 518 |
+
custom int aif:spec:upsRating = 1200 (
|
| 519 |
+
customData = {
|
| 520 |
+
dictionary omni = {
|
| 521 |
+
dictionary kit = {
|
| 522 |
+
bool locked = 1
|
| 523 |
+
}
|
| 524 |
+
}
|
| 525 |
+
}
|
| 526 |
+
doc = "UPS Rating in KW [AIF-MANAGED]"
|
| 527 |
+
)
|
| 528 |
+
custom int aif:spec:voltageDisplacement = 120 (
|
| 529 |
+
customData = {
|
| 530 |
+
dictionary omni = {
|
| 531 |
+
dictionary kit = {
|
| 532 |
+
bool locked = 1
|
| 533 |
+
}
|
| 534 |
+
}
|
| 535 |
+
}
|
| 536 |
+
doc = "Voltage Displacement [AIF-MANAGED]"
|
| 537 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Apply Metadata to USD
|
| 3 |
+
=====================
|
| 4 |
+
|
| 5 |
+
Reads a metadata JSON file, validates it, and creates a USD properties layer.
|
| 6 |
+
The layer is written to the specified output location as a .usda file.
|
| 7 |
+
Properties are namespaced as aif:<type>:property_name (e.g., aif:core:Manufacturer).
|
| 8 |
+
|
| 9 |
+
Usage:
|
| 10 |
+
python apply_metadata.py --input <metadata.json> --output <properties.usda> --default_prim <prim_name>
|
| 11 |
+
python apply_metadata.py --input core.json --output core_props.usda --default_prim Root
|
| 12 |
+
python apply_metadata.py --input electrical.json --output elec_props.usda --default_prim Root --namespace electrical
|
| 13 |
+
"""
|
| 14 |
+
|
| 15 |
+
import json
|
| 16 |
+
import argparse
|
| 17 |
+
import os
|
| 18 |
+
from pxr import Usd, Sdf, Vt, Gf
|
| 19 |
+
from typing import Optional
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
def validate_metadata_json(json_data):
|
| 23 |
+
"""
|
| 24 |
+
Validate the metadata JSON structure.
|
| 25 |
+
Returns (is_valid, error_message)
|
| 26 |
+
"""
|
| 27 |
+
if not isinstance(json_data, dict):
|
| 28 |
+
return False, "Root JSON must be an object/dictionary"
|
| 29 |
+
|
| 30 |
+
if "properties" not in json_data:
|
| 31 |
+
return False, "Missing required 'properties' key"
|
| 32 |
+
|
| 33 |
+
properties = json_data["properties"]
|
| 34 |
+
if not isinstance(properties, dict):
|
| 35 |
+
return False, "'properties' must be an object/dictionary"
|
| 36 |
+
|
| 37 |
+
# Validate each property
|
| 38 |
+
for prop_name, prop_config in properties.items():
|
| 39 |
+
if not isinstance(prop_config, dict):
|
| 40 |
+
return False, f"Property '{prop_name}' must be an object/dictionary"
|
| 41 |
+
|
| 42 |
+
if "type" not in prop_config:
|
| 43 |
+
return False, f"Property '{prop_name}' missing required 'type' field"
|
| 44 |
+
|
| 45 |
+
if "value" not in prop_config:
|
| 46 |
+
return False, f"Property '{prop_name}' missing required 'value' field"
|
| 47 |
+
|
| 48 |
+
return True, None
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def get_usd_type_from_string(type_str, value):
|
| 52 |
+
"""
|
| 53 |
+
Convert JSON type specs to USD's strongly-typed attribute system.
|
| 54 |
+
"""
|
| 55 |
+
# Basic type mapping
|
| 56 |
+
basic_type_mapping = {
|
| 57 |
+
"string": Sdf.ValueTypeNames.String,
|
| 58 |
+
"float": Sdf.ValueTypeNames.Float,
|
| 59 |
+
"double": Sdf.ValueTypeNames.Double,
|
| 60 |
+
"int": Sdf.ValueTypeNames.Int,
|
| 61 |
+
"bool": Sdf.ValueTypeNames.Bool,
|
| 62 |
+
"vector3f": Sdf.ValueTypeNames.Vector3f,
|
| 63 |
+
"vector3d": Sdf.ValueTypeNames.Vector3d,
|
| 64 |
+
"color3f": Sdf.ValueTypeNames.Color3f,
|
| 65 |
+
"token": Sdf.ValueTypeNames.Token,
|
| 66 |
+
"asset": Sdf.ValueTypeNames.Asset,
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
# 2D Array type mapping
|
| 70 |
+
array_type_mapping = {
|
| 71 |
+
"float2d_array": Sdf.ValueTypeNames.Float2Array,
|
| 72 |
+
"double2d_array": Sdf.ValueTypeNames.Double2Array,
|
| 73 |
+
"int2d_array": Sdf.ValueTypeNames.Int2Array,
|
| 74 |
+
"string2d_array": Sdf.ValueTypeNames.StringArray,
|
| 75 |
+
"bool2d_array": Sdf.ValueTypeNames.BoolArray,
|
| 76 |
+
"vector3f2d_array": Sdf.ValueTypeNames.Vector3fArray,
|
| 77 |
+
"vector3d2d_array": Sdf.ValueTypeNames.Vector3dArray,
|
| 78 |
+
"color3f2d_array": Sdf.ValueTypeNames.Color3fArray,
|
| 79 |
+
"color3d2d_array": Sdf.ValueTypeNames.Color3dArray,
|
| 80 |
+
"token2d_array": Sdf.ValueTypeNames.TokenArray,
|
| 81 |
+
"asset2d_array": Sdf.ValueTypeNames.AssetArray
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
# Fallback mapping for types that don't exist as 2D arrays
|
| 85 |
+
fallback_mapping = {
|
| 86 |
+
"float2d_array": Sdf.ValueTypeNames.FloatArray,
|
| 87 |
+
"double2d_array": Sdf.ValueTypeNames.DoubleArray,
|
| 88 |
+
"int2d_array": Sdf.ValueTypeNames.IntArray,
|
| 89 |
+
"string2d_array": Sdf.ValueTypeNames.StringArray,
|
| 90 |
+
"bool2d_array": Sdf.ValueTypeNames.BoolArray,
|
| 91 |
+
"vector3f2d_array": Sdf.ValueTypeNames.Vector3fArray,
|
| 92 |
+
"vector3d2d_array": Sdf.ValueTypeNames.Vector3dArray,
|
| 93 |
+
"color3f2d_array": Sdf.ValueTypeNames.Color3fArray,
|
| 94 |
+
"color3d2d_array": Sdf.ValueTypeNames.Color3dArray,
|
| 95 |
+
"token2d_array": Sdf.ValueTypeNames.TokenArray,
|
| 96 |
+
"asset2d_array": Sdf.ValueTypeNames.AssetArray
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
# Check basic types first
|
| 100 |
+
if type_str.lower() in basic_type_mapping:
|
| 101 |
+
return basic_type_mapping[type_str.lower()]
|
| 102 |
+
|
| 103 |
+
# Check 2D array types with validation
|
| 104 |
+
if type_str.lower() in array_type_mapping:
|
| 105 |
+
usd_type = array_type_mapping[type_str.lower()]
|
| 106 |
+
try:
|
| 107 |
+
_ = getattr(Sdf.ValueTypeNames, usd_type.typeName)
|
| 108 |
+
return usd_type
|
| 109 |
+
except AttributeError:
|
| 110 |
+
print(f"Warning: 2D array type '{type_str}' not available, using fallback")
|
| 111 |
+
return fallback_mapping.get(type_str.lower(), Sdf.ValueTypeNames.StringArray)
|
| 112 |
+
|
| 113 |
+
print(f"Warning: Unknown type '{type_str}', defaulting to String")
|
| 114 |
+
return Sdf.ValueTypeNames.String
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
def make_valid_usd_attr_name(prop_name):
|
| 118 |
+
"""
|
| 119 |
+
Convert human-readable names to USD-compliant attribute identifiers.
|
| 120 |
+
"""
|
| 121 |
+
return prop_name.replace(" ", "_").replace("-", "_").replace("(", "").replace(")", "")
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
def convert_value_for_usd(value, usd_type):
|
| 125 |
+
"""
|
| 126 |
+
Transform Python data types into USD's native representation.
|
| 127 |
+
"""
|
| 128 |
+
# Handle 2D array types
|
| 129 |
+
if usd_type == Sdf.ValueTypeNames.Float2Array:
|
| 130 |
+
if isinstance(value, list) and all(isinstance(row, list) and len(row) == 2 for row in value):
|
| 131 |
+
return Vt.Float2Array([Vt.Float2(row[0], row[1]) for row in value])
|
| 132 |
+
elif usd_type == Sdf.ValueTypeNames.Double2Array:
|
| 133 |
+
if isinstance(value, list) and all(isinstance(row, list) and len(row) == 2 for row in value):
|
| 134 |
+
return Vt.Double2Array([Vt.Double2(row[0], row[1]) for row in value])
|
| 135 |
+
elif usd_type == Sdf.ValueTypeNames.Int2Array:
|
| 136 |
+
if isinstance(value, list) and all(isinstance(row, list) and len(row) == 2 for row in value):
|
| 137 |
+
return Vt.Int2Array([Vt.Int2(row[0], row[1]) for row in value])
|
| 138 |
+
|
| 139 |
+
# Handle array fallback types
|
| 140 |
+
elif usd_type == Sdf.ValueTypeNames.FloatArray:
|
| 141 |
+
if isinstance(value, list) and all(isinstance(row, list) for row in value):
|
| 142 |
+
flattened = [item for row in value for item in row]
|
| 143 |
+
return Vt.FloatArray(flattened)
|
| 144 |
+
elif isinstance(value, list):
|
| 145 |
+
return Vt.FloatArray(value)
|
| 146 |
+
elif usd_type == Sdf.ValueTypeNames.DoubleArray:
|
| 147 |
+
if isinstance(value, list) and all(isinstance(row, list) for row in value):
|
| 148 |
+
flattened = [item for row in value for item in row]
|
| 149 |
+
return Vt.DoubleArray(flattened)
|
| 150 |
+
elif isinstance(value, list):
|
| 151 |
+
return Vt.DoubleArray(value)
|
| 152 |
+
elif usd_type == Sdf.ValueTypeNames.IntArray:
|
| 153 |
+
if isinstance(value, list) and all(isinstance(row, list) for row in value):
|
| 154 |
+
flattened = [item for row in value for item in row]
|
| 155 |
+
return Vt.IntArray(flattened)
|
| 156 |
+
elif isinstance(value, list):
|
| 157 |
+
return Vt.IntArray(value)
|
| 158 |
+
|
| 159 |
+
# Handle single value types
|
| 160 |
+
elif usd_type == Sdf.ValueTypeNames.Vector3f:
|
| 161 |
+
if isinstance(value, list) and len(value) == 3:
|
| 162 |
+
return Gf.Vec3f(value[0], value[1], value[2])
|
| 163 |
+
elif usd_type == Sdf.ValueTypeNames.Color3f:
|
| 164 |
+
if isinstance(value, list) and len(value) == 3:
|
| 165 |
+
return Gf.Vec3f(value[0], value[1], value[2])
|
| 166 |
+
elif usd_type == Sdf.ValueTypeNames.Asset:
|
| 167 |
+
return Sdf.AssetPath(str(value))
|
| 168 |
+
|
| 169 |
+
return value
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
def create_properties_layer(metadata_config, output_path, default_prim_name):
|
| 173 |
+
"""
|
| 174 |
+
Create isolated USD layer containing only custom properties.
|
| 175 |
+
"""
|
| 176 |
+
print(f"Creating properties layer: {output_path}")
|
| 177 |
+
|
| 178 |
+
# Create new USD layer
|
| 179 |
+
layer = Sdf.Layer.CreateNew(output_path)
|
| 180 |
+
if not layer:
|
| 181 |
+
raise RuntimeError(f"Failed to create layer at: {output_path}")
|
| 182 |
+
|
| 183 |
+
# Create stage from layer
|
| 184 |
+
stage = Usd.Stage.Open(layer)
|
| 185 |
+
|
| 186 |
+
# Create default prim - handle both with and without leading slash
|
| 187 |
+
if default_prim_name.startswith('/'):
|
| 188 |
+
default_prim_path = default_prim_name
|
| 189 |
+
else:
|
| 190 |
+
default_prim_path = f"/{default_prim_name}"
|
| 191 |
+
|
| 192 |
+
default_prim = stage.OverridePrim(default_prim_path)
|
| 193 |
+
print(f" Created default prim: {default_prim_path}")
|
| 194 |
+
|
| 195 |
+
stage.SetDefaultPrim(default_prim)
|
| 196 |
+
|
| 197 |
+
# Set edit target
|
| 198 |
+
properties_layer = stage.GetRootLayer()
|
| 199 |
+
stage.SetEditTarget(properties_layer)
|
| 200 |
+
print(f" Set authoring layer to: {properties_layer.identifier}")
|
| 201 |
+
print(f" Adding properties to: {default_prim_path}")
|
| 202 |
+
|
| 203 |
+
# Get namespace from metadata or override
|
| 204 |
+
metadata = metadata_config.get("metadata", {})
|
| 205 |
+
base_namespace = metadata.get("namespace", "aif")
|
| 206 |
+
template_type = metadata.get("template_type", "custom")
|
| 207 |
+
print(f" Base namespace: {base_namespace}")
|
| 208 |
+
|
| 209 |
+
# Add custom properties
|
| 210 |
+
properties = metadata_config.get("properties", {})
|
| 211 |
+
|
| 212 |
+
for prop_name, prop_config in properties.items():
|
| 213 |
+
prop_type = prop_config.get("type", "string")
|
| 214 |
+
prop_value = prop_config.get("value")
|
| 215 |
+
prop_description = prop_config.get("description", "")
|
| 216 |
+
|
| 217 |
+
# Get USD type
|
| 218 |
+
usd_type = get_usd_type_from_string(prop_type, prop_value)
|
| 219 |
+
|
| 220 |
+
# Convert value if needed
|
| 221 |
+
converted_value = convert_value_for_usd(prop_value, usd_type)
|
| 222 |
+
|
| 223 |
+
# If property name already contains namespace (has colons), use it as-is
|
| 224 |
+
# Otherwise, construct namespace using template_type
|
| 225 |
+
if ":" in prop_name:
|
| 226 |
+
# Property already has namespace (e.g., "aif:core:manufacturer")
|
| 227 |
+
attr_name = make_valid_usd_attr_name(prop_name)
|
| 228 |
+
valid_prop_name = prop_name
|
| 229 |
+
else:
|
| 230 |
+
# Property needs namespace prefix (e.g., "manufacturer" -> "aif:custom:manufacturer")
|
| 231 |
+
valid_prop_name = make_valid_usd_attr_name(prop_name)
|
| 232 |
+
attr_name = f"{base_namespace}:{template_type}:{valid_prop_name}"
|
| 233 |
+
|
| 234 |
+
if prop_name != valid_prop_name:
|
| 235 |
+
print(f" Converted property name: '{prop_name}' -> '{valid_prop_name}'")
|
| 236 |
+
|
| 237 |
+
# Create typed attribute
|
| 238 |
+
attr = default_prim.CreateAttribute(attr_name, usd_type)
|
| 239 |
+
attr.Set(converted_value)
|
| 240 |
+
print(f" Created: {attr_name} = {converted_value} ({prop_type})")
|
| 241 |
+
|
| 242 |
+
# Add documentation
|
| 243 |
+
managed_doc = f"{prop_description} [AIF-MANAGED]" if prop_description else "[AIF-MANAGED]"
|
| 244 |
+
attr.SetDocumentation(managed_doc)
|
| 245 |
+
|
| 246 |
+
# Lock property in UI using customData
|
| 247 |
+
custom_data = {
|
| 248 |
+
'omni': {
|
| 249 |
+
'kit': {
|
| 250 |
+
'locked': True
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
}
|
| 254 |
+
attr.SetCustomData(custom_data)
|
| 255 |
+
print(f" Locked property: {attr_name}")
|
| 256 |
+
|
| 257 |
+
# Add layer metadata
|
| 258 |
+
metadata = metadata_config.get("metadata", {})
|
| 259 |
+
if metadata:
|
| 260 |
+
root_layer = stage.GetRootLayer()
|
| 261 |
+
for key, value in metadata.items():
|
| 262 |
+
root_layer.customLayerData[key] = value
|
| 263 |
+
|
| 264 |
+
# Save the layer
|
| 265 |
+
stage.Save()
|
| 266 |
+
print(f" Created and saved properties layer: {output_path}")
|
| 267 |
+
|
| 268 |
+
return output_path
|
| 269 |
+
|
| 270 |
+
|
| 271 |
+
def main():
|
| 272 |
+
"""Apply metadata from JSON to create USD properties layer."""
|
| 273 |
+
parser = argparse.ArgumentParser(
|
| 274 |
+
description="Apply metadata from JSON to create a USD properties layer",
|
| 275 |
+
formatter_class=argparse.RawDescriptionHelpFormatter
|
| 276 |
+
)
|
| 277 |
+
parser.add_argument(
|
| 278 |
+
"--input",
|
| 279 |
+
required=True,
|
| 280 |
+
help="Input metadata.json file path"
|
| 281 |
+
)
|
| 282 |
+
parser.add_argument(
|
| 283 |
+
"--output",
|
| 284 |
+
required=True,
|
| 285 |
+
help="Output .usda properties layer file path"
|
| 286 |
+
)
|
| 287 |
+
parser.add_argument(
|
| 288 |
+
"--default_prim",
|
| 289 |
+
required=True,
|
| 290 |
+
help="Name of the default prim to create (e.g., 'Root', 'Asset')"
|
| 291 |
+
)
|
| 292 |
+
parser.add_argument(
|
| 293 |
+
"--namespace",
|
| 294 |
+
required=False,
|
| 295 |
+
help="Optional namespace override (e.g., 'core', 'electrical'). If not specified, uses template_type from metadata."
|
| 296 |
+
)
|
| 297 |
+
|
| 298 |
+
args = parser.parse_args()
|
| 299 |
+
|
| 300 |
+
print("=== Applying Metadata to USD ===")
|
| 301 |
+
print(f"Input JSON: {args.input}")
|
| 302 |
+
print(f"Output USDA: {args.output}")
|
| 303 |
+
print(f"Default Prim: {args.default_prim}")
|
| 304 |
+
if args.namespace:
|
| 305 |
+
print(f"Namespace Override: {args.namespace}")
|
| 306 |
+
|
| 307 |
+
# Validate input file exists
|
| 308 |
+
if not os.path.exists(args.input):
|
| 309 |
+
print(f"X Error: Input file does not exist: {args.input}")
|
| 310 |
+
return 1
|
| 311 |
+
|
| 312 |
+
# Load and validate JSON
|
| 313 |
+
print("\nLoading metadata JSON...")
|
| 314 |
+
try:
|
| 315 |
+
with open(args.input, 'r') as f:
|
| 316 |
+
metadata_config = json.load(f)
|
| 317 |
+
except json.JSONDecodeError as e:
|
| 318 |
+
print(f"X Error: Invalid JSON in input file: {e}")
|
| 319 |
+
return 1
|
| 320 |
+
|
| 321 |
+
print("Validating metadata structure...")
|
| 322 |
+
is_valid, error_msg = validate_metadata_json(metadata_config)
|
| 323 |
+
if not is_valid:
|
| 324 |
+
print(f"X Error: Invalid metadata structure: {error_msg}")
|
| 325 |
+
return 1
|
| 326 |
+
|
| 327 |
+
print("OK Metadata validated successfully")
|
| 328 |
+
print(f" Properties: {len(metadata_config['properties'])}")
|
| 329 |
+
|
| 330 |
+
# Apply namespace override if provided
|
| 331 |
+
if args.namespace:
|
| 332 |
+
if "metadata" not in metadata_config:
|
| 333 |
+
metadata_config["metadata"] = {}
|
| 334 |
+
metadata_config["metadata"]["template_type"] = args.namespace
|
| 335 |
+
print(f" Namespace overridden to: {args.namespace}")
|
| 336 |
+
|
| 337 |
+
# Create output directory if needed
|
| 338 |
+
output_dir = os.path.dirname(args.output)
|
| 339 |
+
if output_dir and not os.path.exists(output_dir):
|
| 340 |
+
os.makedirs(output_dir)
|
| 341 |
+
print(f"Created output directory: {output_dir}")
|
| 342 |
+
|
| 343 |
+
# Create properties layer
|
| 344 |
+
print("\nCreating USD properties layer...")
|
| 345 |
+
try:
|
| 346 |
+
create_properties_layer(metadata_config, args.output, args.default_prim)
|
| 347 |
+
print(f"\nOK Successfully created properties layer: {args.output}")
|
| 348 |
+
return 0
|
| 349 |
+
except Exception as e:
|
| 350 |
+
print(f"\nX Error creating properties layer: {e}")
|
| 351 |
+
return 1
|
| 352 |
+
|
| 353 |
+
|
| 354 |
+
if __name__ == "__main__":
|
| 355 |
+
exit(main())
|
| 356 |
+
|
EXLS1/simready_usd/layers/excel_to_json.py
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 5 |
+
|
| 6 |
+
def convert_value_from_string(value_str, value_type):
|
| 7 |
+
"""
|
| 8 |
+
Convert string values from Excel to appropriate Python types.
|
| 9 |
+
|
| 10 |
+
Args:
|
| 11 |
+
value_str: String value from Excel
|
| 12 |
+
value_type: Target type (string, int, float, bool, etc.)
|
| 13 |
+
|
| 14 |
+
Returns:
|
| 15 |
+
Converted value in appropriate Python type
|
| 16 |
+
"""
|
| 17 |
+
if value_str is None or value_str == "":
|
| 18 |
+
return ""
|
| 19 |
+
|
| 20 |
+
value_type_lower = value_type.lower().strip()
|
| 21 |
+
|
| 22 |
+
try:
|
| 23 |
+
if value_type_lower == "int":
|
| 24 |
+
return int(float(value_str)) # Handle cases like "123.0"
|
| 25 |
+
elif value_type_lower == "float" or value_type_lower == "double":
|
| 26 |
+
return float(value_str)
|
| 27 |
+
elif value_type_lower == "bool":
|
| 28 |
+
if isinstance(value_str, bool):
|
| 29 |
+
return value_str
|
| 30 |
+
value_str_lower = str(value_str).lower().strip()
|
| 31 |
+
return value_str_lower in ["true", "1", "yes"]
|
| 32 |
+
elif value_type_lower in ["vector3f", "vector3d", "color3f"]:
|
| 33 |
+
# Handle vector types - expect format like "[1.0, 2.0, 3.0]" or "1.0, 2.0, 3.0"
|
| 34 |
+
if isinstance(value_str, str):
|
| 35 |
+
# Remove brackets and split
|
| 36 |
+
clean_str = value_str.strip().strip("[]()").strip()
|
| 37 |
+
values = [float(x.strip()) for x in clean_str.split(",")]
|
| 38 |
+
if len(values) == 3:
|
| 39 |
+
return values
|
| 40 |
+
else:
|
| 41 |
+
print(f"Warning: Vector type expects 3 values, got {len(values)}. Using as string.")
|
| 42 |
+
return str(value_str)
|
| 43 |
+
return str(value_str)
|
| 44 |
+
else:
|
| 45 |
+
# Default to string
|
| 46 |
+
return str(value_str)
|
| 47 |
+
except Exception as e:
|
| 48 |
+
print(f"Warning: Could not convert '{value_str}' to type '{value_type}': {e}")
|
| 49 |
+
print(f"Using original value as string.")
|
| 50 |
+
return str(value_str)
|
| 51 |
+
|
| 52 |
+
def create_json_from_excel(excel_path, json_path=None):
|
| 53 |
+
"""
|
| 54 |
+
Create a properties.json file from an Excel file.
|
| 55 |
+
|
| 56 |
+
Args:
|
| 57 |
+
excel_path: Path to the Excel file
|
| 58 |
+
json_path: Optional output path for JSON file (defaults to same directory as Excel)
|
| 59 |
+
|
| 60 |
+
Returns:
|
| 61 |
+
Path to created JSON file or None if failed
|
| 62 |
+
"""
|
| 63 |
+
print(f"Loading Excel file: {excel_path}")
|
| 64 |
+
|
| 65 |
+
try:
|
| 66 |
+
# Load workbook
|
| 67 |
+
wb = load_workbook(excel_path, data_only=True)
|
| 68 |
+
|
| 69 |
+
# Get Properties sheet
|
| 70 |
+
if "Properties" in wb.sheetnames:
|
| 71 |
+
ws = wb["Properties"]
|
| 72 |
+
else:
|
| 73 |
+
# Use active sheet if Properties sheet doesn't exist
|
| 74 |
+
ws = wb.active
|
| 75 |
+
print(f"Warning: 'Properties' sheet not found, using active sheet: {ws.title}")
|
| 76 |
+
|
| 77 |
+
except Exception as e:
|
| 78 |
+
print(f"Error: Failed to load Excel file: {e}")
|
| 79 |
+
return None
|
| 80 |
+
|
| 81 |
+
# Determine output path
|
| 82 |
+
if json_path is None:
|
| 83 |
+
excel_dir = os.path.dirname(os.path.abspath(excel_path))
|
| 84 |
+
json_path = os.path.join(excel_dir, "properties.json")
|
| 85 |
+
|
| 86 |
+
print(f"Creating JSON file: {json_path}")
|
| 87 |
+
|
| 88 |
+
# Read headers to find column positions
|
| 89 |
+
headers = {}
|
| 90 |
+
for col_num in range(1, ws.max_column + 1):
|
| 91 |
+
cell_value = ws.cell(row=1, column=col_num).value
|
| 92 |
+
if cell_value:
|
| 93 |
+
headers[cell_value.strip().lower()] = col_num
|
| 94 |
+
|
| 95 |
+
print(f"Found columns: {list(headers.keys())}")
|
| 96 |
+
|
| 97 |
+
# Verify required columns exist
|
| 98 |
+
required_columns = ["key", "type", "value", "description"]
|
| 99 |
+
missing_columns = [col for col in required_columns if col not in headers]
|
| 100 |
+
|
| 101 |
+
if missing_columns:
|
| 102 |
+
print(f"Error: Missing required columns: {missing_columns}")
|
| 103 |
+
print(f"Available columns: {list(headers.keys())}")
|
| 104 |
+
return None
|
| 105 |
+
|
| 106 |
+
# Get column indices
|
| 107 |
+
key_col = headers["key"]
|
| 108 |
+
type_col = headers["type"]
|
| 109 |
+
value_col = headers["value"]
|
| 110 |
+
desc_col = headers["description"]
|
| 111 |
+
|
| 112 |
+
# Build properties dictionary
|
| 113 |
+
properties = {}
|
| 114 |
+
row_count = 0
|
| 115 |
+
|
| 116 |
+
for row_num in range(2, ws.max_row + 1):
|
| 117 |
+
key = ws.cell(row=row_num, column=key_col).value
|
| 118 |
+
|
| 119 |
+
# Skip empty rows
|
| 120 |
+
if not key:
|
| 121 |
+
continue
|
| 122 |
+
|
| 123 |
+
key = str(key).strip()
|
| 124 |
+
prop_type = ws.cell(row=row_num, column=type_col).value
|
| 125 |
+
prop_value = ws.cell(row=row_num, column=value_col).value
|
| 126 |
+
prop_description = ws.cell(row=row_num, column=desc_col).value
|
| 127 |
+
|
| 128 |
+
# Set defaults for missing values
|
| 129 |
+
if not prop_type:
|
| 130 |
+
prop_type = "string"
|
| 131 |
+
print(f"Warning: No type specified for '{key}', defaulting to 'string'")
|
| 132 |
+
|
| 133 |
+
if prop_value is None:
|
| 134 |
+
prop_value = ""
|
| 135 |
+
|
| 136 |
+
if not prop_description:
|
| 137 |
+
prop_description = ""
|
| 138 |
+
|
| 139 |
+
# Convert value to appropriate type
|
| 140 |
+
converted_value = convert_value_from_string(prop_value, prop_type)
|
| 141 |
+
|
| 142 |
+
# Add to properties dictionary
|
| 143 |
+
properties[key] = {
|
| 144 |
+
"type": str(prop_type).strip(),
|
| 145 |
+
"value": converted_value,
|
| 146 |
+
"description": str(prop_description).strip()
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
row_count += 1
|
| 150 |
+
|
| 151 |
+
print(f"Processed {row_count} properties")
|
| 152 |
+
|
| 153 |
+
# Load metadata if Metadata sheet exists
|
| 154 |
+
metadata = {}
|
| 155 |
+
if "Metadata" in wb.sheetnames:
|
| 156 |
+
ws_meta = wb["Metadata"]
|
| 157 |
+
print("Loading metadata from Metadata sheet...")
|
| 158 |
+
|
| 159 |
+
for row_num in range(2, ws_meta.max_row + 1):
|
| 160 |
+
meta_key = ws_meta.cell(row=row_num, column=1).value
|
| 161 |
+
meta_value = ws_meta.cell(row=row_num, column=2).value
|
| 162 |
+
|
| 163 |
+
if meta_key:
|
| 164 |
+
metadata[str(meta_key).strip()] = str(meta_value).strip() if meta_value else ""
|
| 165 |
+
else:
|
| 166 |
+
# Use default metadata
|
| 167 |
+
metadata = {
|
| 168 |
+
"description": "AIF properties for USD equipment models",
|
| 169 |
+
"version": "1.0",
|
| 170 |
+
"created": "2025-12-02"
|
| 171 |
+
}
|
| 172 |
+
print("No Metadata sheet found, using default metadata")
|
| 173 |
+
|
| 174 |
+
# Create final JSON structure
|
| 175 |
+
json_data = {
|
| 176 |
+
"properties": properties,
|
| 177 |
+
"metadata": metadata
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
# Save JSON file
|
| 181 |
+
try:
|
| 182 |
+
with open(json_path, 'w', encoding='utf-8') as f:
|
| 183 |
+
json.dump(json_data, f, indent=2, ensure_ascii=False)
|
| 184 |
+
|
| 185 |
+
print(f"JSON file created successfully: {json_path}")
|
| 186 |
+
print(f"Total properties: {len(properties)}")
|
| 187 |
+
print(f"Metadata entries: {len(metadata)}")
|
| 188 |
+
|
| 189 |
+
return json_path
|
| 190 |
+
|
| 191 |
+
except Exception as e:
|
| 192 |
+
print(f"Error: Failed to save JSON file: {e}")
|
| 193 |
+
return None
|
| 194 |
+
|
| 195 |
+
if __name__ == "__main__":
|
| 196 |
+
# Get the directory where this script is located
|
| 197 |
+
script_dir = os.path.dirname(os.path.abspath(__file__))
|
| 198 |
+
|
| 199 |
+
# Excel file is in the same directory as this script
|
| 200 |
+
excel_path = os.path.join(script_dir, "properties.xlsx")
|
| 201 |
+
|
| 202 |
+
# Check if Excel file exists
|
| 203 |
+
if not os.path.exists(excel_path):
|
| 204 |
+
print(f"Error: Excel file not found at {excel_path}")
|
| 205 |
+
print("Please ensure properties.xlsx is in the same directory as this script.")
|
| 206 |
+
print(f"\nScript directory: {script_dir}")
|
| 207 |
+
print("\nLooking for Excel files in current directory...")
|
| 208 |
+
|
| 209 |
+
# Try to find any Excel files in the directory
|
| 210 |
+
excel_files = [f for f in os.listdir(script_dir) if f.endswith(('.xlsx', '.xls'))]
|
| 211 |
+
if excel_files:
|
| 212 |
+
print(f"Found Excel files: {excel_files}")
|
| 213 |
+
print(f"Please rename one of these to 'properties.xlsx' or update the script.")
|
| 214 |
+
else:
|
| 215 |
+
print("No Excel files found in the current directory.")
|
| 216 |
+
else:
|
| 217 |
+
# Create JSON file (will save to same directory as Excel)
|
| 218 |
+
json_path = create_json_from_excel(excel_path)
|
| 219 |
+
if json_path:
|
| 220 |
+
print(f"\n=== Conversion Complete ===")
|
| 221 |
+
print(f"Input: {excel_path}")
|
| 222 |
+
print(f"Output: {json_path}")
|
| 223 |
+
print(f"\nYou can now use this properties.json file with the USD property scripts.")
|
| 224 |
+
else:
|
| 225 |
+
print("\n=== Conversion Failed ===")
|
| 226 |
+
print("Please check the error messages above and ensure:")
|
| 227 |
+
print("1. Excel file has 'Key', 'Type', 'Value', and 'Description' columns")
|
| 228 |
+
print("2. Excel file is not open in another program")
|
| 229 |
+
print("3. You have write permissions in the directory")
|
EXLS1/simready_usd/layers/properties.xlsx
ADDED
|
Binary file (12.4 kB). View file
|
|
|
EXLS1/simready_usd/materials/OmniPBR/OmniPBR.mdl
ADDED
|
@@ -0,0 +1,419 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/***************************************************************************************************
|
| 2 |
+
* Copyright 2022 NVIDIA Corporation. All rights reserved.
|
| 3 |
+
*
|
| 4 |
+
* Redistribution and use in source and binary forms, with or without
|
| 5 |
+
* modification, are permitted provided that the following conditions
|
| 6 |
+
* are met:
|
| 7 |
+
* * Redistributions of source code must retain the above copyright
|
| 8 |
+
* notice, this list of conditions and the following disclaimer.
|
| 9 |
+
* * Redistributions in binary form must reproduce the above copyright
|
| 10 |
+
* notice, this list of conditions and the following disclaimer in the
|
| 11 |
+
* documentation and/or other materials provided with the distribution.
|
| 12 |
+
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
| 13 |
+
* contributors may be used to endorse or promote products derived
|
| 14 |
+
* from this software without specific prior written permission.
|
| 15 |
+
*
|
| 16 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
| 17 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 18 |
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
| 19 |
+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
| 20 |
+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
| 21 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
| 22 |
+
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
| 23 |
+
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
| 24 |
+
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 25 |
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 26 |
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 27 |
+
**************************************************************************************************/
|
| 28 |
+
|
| 29 |
+
mdl 1.7;
|
| 30 |
+
|
| 31 |
+
import ::df::*;
|
| 32 |
+
import ::state::*;
|
| 33 |
+
import ::math::*;
|
| 34 |
+
import ::base::*;
|
| 35 |
+
import ::state::*;
|
| 36 |
+
import ::tex::*;
|
| 37 |
+
import ::anno::*;
|
| 38 |
+
|
| 39 |
+
import ::debug::*;
|
| 40 |
+
|
| 41 |
+
import ::nvidia::core_definitions::file_texture;
|
| 42 |
+
import ::nvidia::core_definitions::normalmap_texture;
|
| 43 |
+
|
| 44 |
+
import OmniPBR_ClearCoat::*;
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
// OmniPBR //
|
| 48 |
+
|
| 49 |
+
export material OmniPBR(
|
| 50 |
+
|
| 51 |
+
// Albdeo //
|
| 52 |
+
|
| 53 |
+
color diffuse_color_constant = color(0.2) [[
|
| 54 |
+
anno::display_name("Albedo Color"),
|
| 55 |
+
anno::description("This is the albedo base color"),
|
| 56 |
+
anno::in_group("Albedo")
|
| 57 |
+
]],
|
| 58 |
+
uniform texture_2d diffuse_texture = texture_2d() [[
|
| 59 |
+
anno::display_name("Albedo Map"),
|
| 60 |
+
anno::in_group("Albedo")
|
| 61 |
+
]],
|
| 62 |
+
float albedo_desaturation = float(0.0) [[
|
| 63 |
+
anno::display_name("Albedo Map Desaturation"),
|
| 64 |
+
anno::description("Desaturates the albedo map"),
|
| 65 |
+
anno::in_group("Albedo"),
|
| 66 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 67 |
+
]],
|
| 68 |
+
float albedo_add = float(0.0) [[
|
| 69 |
+
anno::display_name("Albedo Add"),
|
| 70 |
+
anno::description("Adds a constant value to the diffuse color "),
|
| 71 |
+
anno::in_group("Albedo"),
|
| 72 |
+
anno::soft_range(float(-1.0), float(1.0))
|
| 73 |
+
]],
|
| 74 |
+
float albedo_brightness = float(1.0) [[
|
| 75 |
+
anno::display_name("Albedo Brightness"),
|
| 76 |
+
anno::description("Multiplier for the diffuse color "),
|
| 77 |
+
anno::in_group("Albedo"),
|
| 78 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 79 |
+
]],
|
| 80 |
+
color diffuse_tint = color(1.0) [[
|
| 81 |
+
anno::display_name("Color Tint"),
|
| 82 |
+
anno::description("When enabled, this color value is multiplied over the final albedo color"),
|
| 83 |
+
anno::in_group("Albedo")
|
| 84 |
+
]],
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
// Reflectivity //
|
| 88 |
+
|
| 89 |
+
float reflection_roughness_constant = float(0.5) [[
|
| 90 |
+
anno::display_name("Roughness Amount"),
|
| 91 |
+
anno::description("Higher roughness values lead to more blurry reflections"),
|
| 92 |
+
anno::in_group("Reflectivity"),
|
| 93 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 94 |
+
]],
|
| 95 |
+
float reflection_roughness_texture_influence = float(0.0) [[
|
| 96 |
+
anno::display_name("Roughness Map Influence"),
|
| 97 |
+
anno::description("Blends between the constant value and the lookup of the roughness texture"),
|
| 98 |
+
anno::in_group("Reflectivity"),
|
| 99 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 100 |
+
]],
|
| 101 |
+
uniform texture_2d reflectionroughness_texture = texture_2d() [[
|
| 102 |
+
anno::display_name("Roughness Map"),
|
| 103 |
+
anno::in_group("Reflectivity"),
|
| 104 |
+
anno::usage("roughness")
|
| 105 |
+
]],
|
| 106 |
+
float metallic_constant = float(0.0) [[
|
| 107 |
+
anno::display_name("Metallic Amount"),
|
| 108 |
+
anno::description("Metallic Material"),
|
| 109 |
+
anno::in_group("Reflectivity"),
|
| 110 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 111 |
+
]],
|
| 112 |
+
float metallic_texture_influence = float(0.0) [[
|
| 113 |
+
anno::display_name("Metallic Map Influence"),
|
| 114 |
+
anno::description("Blends between the constant value and the lookup of the metallic texture"),
|
| 115 |
+
anno::in_group("Reflectivity"),
|
| 116 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 117 |
+
]],
|
| 118 |
+
uniform texture_2d metallic_texture = texture_2d() [[
|
| 119 |
+
anno::display_name("Metallic Map"),
|
| 120 |
+
anno::in_group("Reflectivity"),
|
| 121 |
+
anno::usage("metalness")
|
| 122 |
+
]],
|
| 123 |
+
float specular_level = float(0.5) [[
|
| 124 |
+
anno::display_name("Specular"),
|
| 125 |
+
anno::description("The specular level (intensity) of the material"),
|
| 126 |
+
anno::in_group("Reflectivity"),
|
| 127 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 128 |
+
]],
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
// ORM //
|
| 132 |
+
|
| 133 |
+
uniform bool enable_ORM_texture = false [[
|
| 134 |
+
anno::display_name("Enable ORM Texture"),
|
| 135 |
+
anno::description("The ORM texture will be used to extract the Occlusion, Roughness and Metallic textures from R,G,B channels"),
|
| 136 |
+
anno::in_group("Reflectivity")
|
| 137 |
+
]],
|
| 138 |
+
uniform texture_2d ORM_texture = texture_2d() [[
|
| 139 |
+
anno::display_name("ORM Map"),
|
| 140 |
+
anno::description("Texture that has Occlusion, Roughness and Metallic maps stored in their respective R, G and B channels"),
|
| 141 |
+
anno::in_group("Reflectivity"),
|
| 142 |
+
anno::usage("roughness")
|
| 143 |
+
]],
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
// AO Group //
|
| 147 |
+
|
| 148 |
+
float ao_to_diffuse = 0.0 [[
|
| 149 |
+
anno::display_name("AO to diffuse"),
|
| 150 |
+
anno::description("Controls the amount of ambient occlusion multiplied against the diffuse color channel"),
|
| 151 |
+
anno::in_group("AO"),
|
| 152 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 153 |
+
]],
|
| 154 |
+
uniform texture_2d ao_texture = texture_2d() [[
|
| 155 |
+
anno::display_name("Ambient Occlusion Map"),
|
| 156 |
+
anno::description("The ambient occlusion texture for the material"),
|
| 157 |
+
anno::in_group("AO"),
|
| 158 |
+
anno::usage("occlusion")
|
| 159 |
+
]],
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
// Emission //
|
| 163 |
+
|
| 164 |
+
uniform bool enable_emission = false [[
|
| 165 |
+
anno::display_name("Enable Emission"),
|
| 166 |
+
anno::description("Enables the emission of light from the material"),
|
| 167 |
+
anno::in_group("Emissive")
|
| 168 |
+
]],
|
| 169 |
+
color emissive_color = color(1.0,0.1,0.1) [[
|
| 170 |
+
anno::display_name("Emissive Color"),
|
| 171 |
+
anno::description("The emission color"),
|
| 172 |
+
anno::in_group("Emissive"),
|
| 173 |
+
anno::enable_if("enable_emission == true")
|
| 174 |
+
]],
|
| 175 |
+
uniform texture_2d emissive_color_texture = texture_2d() [[
|
| 176 |
+
anno::display_name("Emissive Color map"),
|
| 177 |
+
anno::in_group("Emissive"),
|
| 178 |
+
anno::description("The emissive color texture"),
|
| 179 |
+
anno::enable_if("enable_emission == true")
|
| 180 |
+
]],
|
| 181 |
+
uniform texture_2d emissive_mask_texture = texture_2d() [[
|
| 182 |
+
anno::display_name("Emissive Mask map"),
|
| 183 |
+
anno::description("The texture masking the emissive color"),
|
| 184 |
+
anno::in_group("Emissive"),
|
| 185 |
+
anno::enable_if("enable_emission == true"),
|
| 186 |
+
anno::usage("occlusion")
|
| 187 |
+
]],
|
| 188 |
+
float emissive_intensity = float(40.0) [[
|
| 189 |
+
anno::display_name("Emissive Intensity"),
|
| 190 |
+
anno::description("Intensity of the emission"),
|
| 191 |
+
anno::in_group("Emissive"),
|
| 192 |
+
anno::enable_if("enable_emission == true")
|
| 193 |
+
]],
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
// Cutout Opacity //
|
| 197 |
+
|
| 198 |
+
uniform bool enable_opacity = false [[
|
| 199 |
+
anno::display_name("Enable Opacity"),
|
| 200 |
+
anno::description("Enables the use of cutout opacity"),
|
| 201 |
+
anno::in_group("Opacity")
|
| 202 |
+
]],
|
| 203 |
+
uniform texture_2d opacity_texture = texture_2d() [[
|
| 204 |
+
anno::display_name("Opacity Map"),
|
| 205 |
+
anno::in_group("Opacity"),
|
| 206 |
+
anno::usage("opacity")
|
| 207 |
+
]],
|
| 208 |
+
float opacity_constant = float(1.0) [[
|
| 209 |
+
anno::display_name("Opacity Amount"),
|
| 210 |
+
anno::description("Opacity value between 0 and 1, when Opacity Map is not valid"),
|
| 211 |
+
anno::in_group("Opacity"),
|
| 212 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 213 |
+
]],
|
| 214 |
+
uniform bool enable_opacity_texture = false [[
|
| 215 |
+
anno::display_name("Enable Opacity Texture"),
|
| 216 |
+
anno::description("Enables or disables the usage of the opacity texture map"),
|
| 217 |
+
anno::in_group("Opacity")
|
| 218 |
+
]],
|
| 219 |
+
uniform base::mono_mode opacity_mode = base::mono_average [[
|
| 220 |
+
anno::display_name("Opacity Mono Source"),
|
| 221 |
+
anno::description("Determines how to lookup opacity from the supplied texture. mono_alpha, mono_average, mono_luminance, mono_maximum"),
|
| 222 |
+
anno::in_group("Opacity")
|
| 223 |
+
]],
|
| 224 |
+
uniform float opacity_threshold = float(0.0) [[
|
| 225 |
+
anno::hard_range(0.0, 1.0),
|
| 226 |
+
anno::display_name("Opacity Threshold"),
|
| 227 |
+
anno::description("If 0, use fractional opacity values 'as is'; if > 0, remap opacity values to 1 when >= threshold and to 0 otherwise"),
|
| 228 |
+
anno::in_group("Opacity")
|
| 229 |
+
]],
|
| 230 |
+
|
| 231 |
+
|
| 232 |
+
// Normal //
|
| 233 |
+
|
| 234 |
+
uniform float geometry_normal_roughness_strength = 1.f
|
| 235 |
+
[[
|
| 236 |
+
anno::hard_range(0.0, 1.0),
|
| 237 |
+
anno::display_name("Normal map to roughness weight"),
|
| 238 |
+
anno::description("Enables and weights roughness induced by normal maps"),
|
| 239 |
+
anno::in_group("Normal")
|
| 240 |
+
]],
|
| 241 |
+
uniform float bump_factor = float(1.0) [[
|
| 242 |
+
anno::display_name("Normal Strength"),
|
| 243 |
+
anno::description("Strength of normal map"),
|
| 244 |
+
anno::in_group("Normal"),
|
| 245 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 246 |
+
]],
|
| 247 |
+
uniform texture_2d normalmap_texture = texture_2d() [[
|
| 248 |
+
anno::display_name("Normal Map"),
|
| 249 |
+
anno::in_group("Normal"),
|
| 250 |
+
anno::usage("normal")
|
| 251 |
+
]],
|
| 252 |
+
uniform float detail_bump_factor = float(0.3) [[
|
| 253 |
+
anno::display_name("Detail Normal Strength"),
|
| 254 |
+
anno::in_group("Normal"),
|
| 255 |
+
anno::description("Strength of the detail normal"),
|
| 256 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 257 |
+
]],
|
| 258 |
+
uniform texture_2d detail_normalmap_texture = texture_2d() [[
|
| 259 |
+
anno::display_name("Detail Normal Map"),
|
| 260 |
+
anno::in_group("Normal"),
|
| 261 |
+
anno::usage("normal")
|
| 262 |
+
]],
|
| 263 |
+
uniform bool flip_tangent_u = false [[
|
| 264 |
+
anno::display_name("Normal Map Flip U Tangent"),
|
| 265 |
+
anno::in_group("Normal")
|
| 266 |
+
]],
|
| 267 |
+
uniform bool flip_tangent_v = true [[
|
| 268 |
+
anno::display_name("Normal Map Flip V Tangent"),
|
| 269 |
+
anno::in_group("Normal")
|
| 270 |
+
]],
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
// UVW Projection Group //
|
| 274 |
+
|
| 275 |
+
uniform bool project_uvw = false [[
|
| 276 |
+
anno::display_name("Enable Project UVW Coordinates"),
|
| 277 |
+
anno::description("When enabled, UV coordinates will be generated by projecting them from a coordinate system"),
|
| 278 |
+
anno::in_group("UV")
|
| 279 |
+
]],
|
| 280 |
+
uniform bool world_or_object = false [[
|
| 281 |
+
anno::display_name("Enable World Space"),
|
| 282 |
+
anno::description("When enabled, uses world space for projection, otherwise object space is used"),
|
| 283 |
+
anno::in_group("UV"),
|
| 284 |
+
anno::enable_if("project_uvw == true")
|
| 285 |
+
]],
|
| 286 |
+
uniform int uv_space_index = 0 [[
|
| 287 |
+
anno::display_name("UV Space Index"),
|
| 288 |
+
anno::description("UV Space Index."),
|
| 289 |
+
anno::in_group("UV"),
|
| 290 |
+
anno::enable_if("project_uvw == true"),
|
| 291 |
+
anno::hard_range(int(0), int(3))
|
| 292 |
+
]],
|
| 293 |
+
|
| 294 |
+
|
| 295 |
+
// UVW Adjustments Group //
|
| 296 |
+
|
| 297 |
+
uniform float2 texture_translate = float2(0.0) [[
|
| 298 |
+
anno::display_name("Texture Translate"),
|
| 299 |
+
anno::description("Controls position of texture."),
|
| 300 |
+
anno::in_group("UV"),
|
| 301 |
+
anno::enable_if("project_uvw == true")
|
| 302 |
+
]],
|
| 303 |
+
uniform float texture_rotate = float(0.0) [[
|
| 304 |
+
anno::display_name("Texture Rotate"),
|
| 305 |
+
anno::description("Rotates angle of texture in degrees."),
|
| 306 |
+
anno::in_group("UV"),
|
| 307 |
+
anno::enable_if("project_uvw == true")
|
| 308 |
+
]],
|
| 309 |
+
uniform float2 texture_scale = float2(1.0) [[
|
| 310 |
+
anno::display_name("Texture Tiling"),
|
| 311 |
+
anno::description("Controls the repetition of the texture."),
|
| 312 |
+
anno::in_group("UV"),
|
| 313 |
+
anno::enable_if("project_uvw == true")
|
| 314 |
+
]],
|
| 315 |
+
uniform float2 detail_texture_translate = float2(0.0) [[
|
| 316 |
+
anno::display_name("Detail Texture Translate"),
|
| 317 |
+
anno::description("Controls the position of the detail texture."),
|
| 318 |
+
anno::in_group("UV"),
|
| 319 |
+
anno::enable_if("project_uvw == true")
|
| 320 |
+
]],
|
| 321 |
+
uniform float detail_texture_rotate = float(0.0) [[
|
| 322 |
+
anno::display_name("Detail Texture Rotate"),
|
| 323 |
+
anno::description("Rotates angle of the detail texture in degrees."),
|
| 324 |
+
anno::in_group("UV"),
|
| 325 |
+
anno::enable_if("project_uvw == true")
|
| 326 |
+
]],
|
| 327 |
+
uniform float2 detail_texture_scale = float2(1.0) [[
|
| 328 |
+
anno::display_name("Detail Texture Tiling"),
|
| 329 |
+
anno::description("Controls the repetition of the detail texture."),
|
| 330 |
+
anno::in_group("UV"),
|
| 331 |
+
anno::enable_if("project_uvw == true")
|
| 332 |
+
]],
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
// Geometry //
|
| 336 |
+
|
| 337 |
+
uniform float round_edges_radius = float(0.0) [[
|
| 338 |
+
anno::display_name("Round Edge Radius"),
|
| 339 |
+
anno::description("Influence radius around the edges in meters"),
|
| 340 |
+
anno::in_group("Geometry"),
|
| 341 |
+
anno::soft_range(0.0, 1.0)
|
| 342 |
+
]],
|
| 343 |
+
uniform float round_edges_roundness = float(1.0) [[
|
| 344 |
+
anno::display_name("Round Edge Roundness"),
|
| 345 |
+
anno::description("Determines how round the edge will look"),
|
| 346 |
+
anno::in_group("Geometry"),
|
| 347 |
+
anno::hard_range(0.0, 1.0)
|
| 348 |
+
]],
|
| 349 |
+
uniform bool round_edges_across_materials = false [[
|
| 350 |
+
anno::display_name("Round Edge Across Materials"),
|
| 351 |
+
anno::description("Normal smoothing happens only between facets of equal material, \n"
|
| 352 |
+
"\t\tunless this parameter is set true, in which case the smoothing \n"
|
| 353 |
+
"\t\thappens between facets irrespective of their materials"),
|
| 354 |
+
anno::in_group("Geometry")
|
| 355 |
+
]]
|
| 356 |
+
)
|
| 357 |
+
[[
|
| 358 |
+
anno::display_name("OmniPBR"),
|
| 359 |
+
anno::description("OmniPBR Base with support for clear coat, opacity and ORM textures."),
|
| 360 |
+
anno::in_group("Base"),
|
| 361 |
+
anno::version( 2, 1, 2),
|
| 362 |
+
anno::author("NVIDIA CORPORATION"),
|
| 363 |
+
anno::key_words(string[]("omni", "PBR", "opacity", "omniverse", "generic"))
|
| 364 |
+
]] = let {
|
| 365 |
+
|
| 366 |
+
material base = OmniPBR_ClearCoat::OmniPBR_ClearCoat(
|
| 367 |
+
diffuse_color_constant: diffuse_color_constant,
|
| 368 |
+
diffuse_texture: diffuse_texture,
|
| 369 |
+
albedo_desaturation: albedo_desaturation,
|
| 370 |
+
albedo_add: albedo_add,
|
| 371 |
+
albedo_brightness: albedo_brightness,
|
| 372 |
+
diffuse_tint: diffuse_tint,
|
| 373 |
+
reflection_roughness_constant: reflection_roughness_constant,
|
| 374 |
+
reflection_roughness_texture_influence: reflection_roughness_texture_influence,
|
| 375 |
+
reflectionroughness_texture: reflectionroughness_texture,
|
| 376 |
+
metallic_constant: metallic_constant,
|
| 377 |
+
metallic_texture_influence: metallic_texture_influence,
|
| 378 |
+
metallic_texture: metallic_texture,
|
| 379 |
+
specular_level: specular_level,
|
| 380 |
+
enable_ORM_texture: enable_ORM_texture,
|
| 381 |
+
ORM_texture: ORM_texture,
|
| 382 |
+
ao_to_diffuse: ao_to_diffuse,
|
| 383 |
+
ao_texture: ao_texture,
|
| 384 |
+
enable_emission: enable_emission,
|
| 385 |
+
emissive_color: emissive_color,
|
| 386 |
+
emissive_color_texture: emissive_color_texture,
|
| 387 |
+
emissive_mask_texture: emissive_mask_texture,
|
| 388 |
+
emissive_intensity: emissive_intensity,
|
| 389 |
+
enable_opacity: enable_opacity,
|
| 390 |
+
opacity_texture: opacity_texture,
|
| 391 |
+
opacity_constant: opacity_constant,
|
| 392 |
+
enable_opacity_texture: enable_opacity_texture,
|
| 393 |
+
opacity_mode: opacity_mode,
|
| 394 |
+
opacity_threshold: opacity_threshold,
|
| 395 |
+
geometry_normal_roughness_strength: geometry_normal_roughness_strength,
|
| 396 |
+
bump_factor: bump_factor,
|
| 397 |
+
normalmap_texture: normalmap_texture,
|
| 398 |
+
detail_bump_factor: detail_bump_factor,
|
| 399 |
+
detail_normalmap_texture: detail_normalmap_texture,
|
| 400 |
+
flip_tangent_u: flip_tangent_u,
|
| 401 |
+
flip_tangent_v: flip_tangent_v,
|
| 402 |
+
project_uvw: project_uvw,
|
| 403 |
+
world_or_object: world_or_object,
|
| 404 |
+
uv_space_index: uv_space_index,
|
| 405 |
+
texture_translate: texture_translate,
|
| 406 |
+
texture_rotate: texture_rotate,
|
| 407 |
+
texture_scale: texture_scale,
|
| 408 |
+
detail_texture_translate: detail_texture_translate,
|
| 409 |
+
detail_texture_rotate: detail_texture_rotate,
|
| 410 |
+
detail_texture_scale: detail_texture_scale,
|
| 411 |
+
round_edges_radius: round_edges_radius,
|
| 412 |
+
round_edges_roundness: round_edges_roundness,
|
| 413 |
+
round_edges_across_materials: round_edges_across_materials
|
| 414 |
+
);
|
| 415 |
+
|
| 416 |
+
} in material(
|
| 417 |
+
surface: base.surface,
|
| 418 |
+
geometry: base.geometry
|
| 419 |
+
);
|
EXLS1/simready_usd/materials/OmniPBR/OmniPBRBase.mdl
ADDED
|
@@ -0,0 +1,493 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/***************************************************************************************************
|
| 2 |
+
* Copyright 2022 NVIDIA Corporation. All rights reserved.
|
| 3 |
+
*
|
| 4 |
+
* Redistribution and use in source and binary forms, with or without
|
| 5 |
+
* modification, are permitted provided that the following conditions
|
| 6 |
+
* are met:
|
| 7 |
+
* * Redistributions of source code must retain the above copyright
|
| 8 |
+
* notice, this list of conditions and the following disclaimer.
|
| 9 |
+
* * Redistributions in binary form must reproduce the above copyright
|
| 10 |
+
* notice, this list of conditions and the following disclaimer in the
|
| 11 |
+
* documentation and/or other materials provided with the distribution.
|
| 12 |
+
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
| 13 |
+
* contributors may be used to endorse or promote products derived
|
| 14 |
+
* from this software without specific prior written permission.
|
| 15 |
+
*
|
| 16 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
| 17 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 18 |
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
| 19 |
+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
| 20 |
+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
| 21 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
| 22 |
+
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
| 23 |
+
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
| 24 |
+
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 25 |
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 26 |
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 27 |
+
**************************************************************************************************/
|
| 28 |
+
|
| 29 |
+
mdl 1.7;
|
| 30 |
+
|
| 31 |
+
import ::df::*;
|
| 32 |
+
import ::state::*;
|
| 33 |
+
import ::math::*;
|
| 34 |
+
import ::base::*;
|
| 35 |
+
import ::tex::*;
|
| 36 |
+
import ::anno::*;
|
| 37 |
+
import ::anno::*;
|
| 38 |
+
|
| 39 |
+
export float3 HemiOctahedronToUnitVector( float2 Oct ) [[
|
| 40 |
+
anno::hidden()
|
| 41 |
+
]]
|
| 42 |
+
{
|
| 43 |
+
Oct = float2( Oct.x + Oct.y, Oct.x - Oct.y ) * 0.5;
|
| 44 |
+
float3 N = float3( Oct.x, Oct.y, 1.0 - math::dot( float2(1.0), math::abs(Oct) ) );
|
| 45 |
+
return math::normalize(N);
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
export struct NormalData [[
|
| 49 |
+
anno::hidden()
|
| 50 |
+
]]
|
| 51 |
+
{
|
| 52 |
+
float3 normal;
|
| 53 |
+
float2 roughness;
|
| 54 |
+
};
|
| 55 |
+
|
| 56 |
+
export NormalData tangent_space_normal_roughness_texture(
|
| 57 |
+
uniform texture_2d texture
|
| 58 |
+
[[
|
| 59 |
+
anno::description("The input texture"),
|
| 60 |
+
anno::usage("normal")
|
| 61 |
+
]],
|
| 62 |
+
uniform float factor = 1.0f
|
| 63 |
+
[[ anno::description("Determines the degree of bumpiness") ]],
|
| 64 |
+
uniform bool flip_tangent_u = false
|
| 65 |
+
[[ anno::description("Can be used to fix mismatches between the object's tangent space and the normal map's tangent space") ]],
|
| 66 |
+
uniform bool flip_tangent_v = false
|
| 67 |
+
[[ anno::description("Can be used to fix mismatches between the object's tangent space and the normal map's tangent space") ]],
|
| 68 |
+
base::texture_coordinate_info uvw = base::texture_coordinate_info()
|
| 69 |
+
[[ anno::description("Parameterization to be used for texture mapping. Defaults to texture channel 0.") ]],
|
| 70 |
+
uniform float2 crop_u = float2( 0.0, 1.0)
|
| 71 |
+
[[ anno::description("Restricts the texture access to sub-domain of the texture in the u direction") ]],
|
| 72 |
+
uniform float2 crop_v = float2( 0.0, 1.0)
|
| 73 |
+
[[ anno::description("Restricts the texture access to sub-domain of the texture in the v direction") ]],
|
| 74 |
+
uniform tex::wrap_mode wrap_u = tex::wrap_repeat
|
| 75 |
+
[[ anno::description("Wrapping mode in the u direction") ]],
|
| 76 |
+
uniform tex::wrap_mode wrap_v = tex::wrap_repeat
|
| 77 |
+
[[ anno::description("Wrapping mode in the v direction") ]],
|
| 78 |
+
uniform bool clip = false
|
| 79 |
+
[[
|
| 80 |
+
anno::description("deprecated, usewrap_mode=tex::wrap_clip. Defines wrap_clamp behavior. If true, lookup outside [0,1] results in no bump"),
|
| 81 |
+
anno::hidden()
|
| 82 |
+
]],
|
| 83 |
+
uniform float scale = 1.
|
| 84 |
+
[[
|
| 85 |
+
anno::description("Scales the value red from the texture file. Can be used to adapt to different normal map formats"),
|
| 86 |
+
anno::unused()
|
| 87 |
+
]],
|
| 88 |
+
uniform float offset = 0.
|
| 89 |
+
[[
|
| 90 |
+
anno::description("Offset applied to the value red from the texture file. Can be used to adapt to different normal map formats"),
|
| 91 |
+
anno::unused()
|
| 92 |
+
]],
|
| 93 |
+
uniform float animation_start_time = 0.
|
| 94 |
+
[[ anno::description("When to start playing first frame of the animation ") ]],
|
| 95 |
+
uniform int2 animation_crop = int2(0, 0)
|
| 96 |
+
[[ anno::description("If the texture is an animation, the range of frames to be played can be specified.") ]],
|
| 97 |
+
uniform tex::wrap_mode animation_wrap = tex::wrap_repeat
|
| 98 |
+
[[ anno::description("Defines what to do outside of regular animation time") ]],
|
| 99 |
+
uniform float animation_fps = 30
|
| 100 |
+
[[ anno::description("Framerate to use for animation playback") ]]
|
| 101 |
+
)
|
| 102 |
+
[[
|
| 103 |
+
anno::description("Interprets the color values of a bitmap as a vector in tangent space"),
|
| 104 |
+
anno::hidden(),
|
| 105 |
+
anno::noinline()
|
| 106 |
+
]]
|
| 107 |
+
{
|
| 108 |
+
NormalData normalData;
|
| 109 |
+
normalData.roughness = float2(0);
|
| 110 |
+
normalData.normal = state::normal();
|
| 111 |
+
|
| 112 |
+
float frame = 0.0;
|
| 113 |
+
if(animation_crop != int2(0,0)) //only if we have an animation
|
| 114 |
+
{
|
| 115 |
+
frame = (::state::animation_time()-animation_start_time) * animation_fps ; //start playing at first frame of the animation
|
| 116 |
+
switch ( animation_wrap) {
|
| 117 |
+
case tex::wrap_repeat:
|
| 118 |
+
frame=frame>0? math::fmod(frame,animation_crop.y-animation_crop.x)+animation_crop.x:
|
| 119 |
+
math::fmod(frame,animation_crop.y-animation_crop.x)+animation_crop.y;
|
| 120 |
+
break;
|
| 121 |
+
case tex::wrap_mirrored_repeat:
|
| 122 |
+
float animation_crop_2y = 2.0*animation_crop.y;
|
| 123 |
+
frame=frame>0? math::fmod(frame,(animation_crop.y-animation_crop.x)*2.0)+animation_crop.x:
|
| 124 |
+
math::fmod(frame,(animation_crop.y-animation_crop.x)*2.0)+animation_crop_2y-animation_crop.x;
|
| 125 |
+
if(frame>animation_crop.y)
|
| 126 |
+
frame = animation_crop_2y-frame;
|
| 127 |
+
break;
|
| 128 |
+
case tex::wrap_clamp:
|
| 129 |
+
frame = math::clamp( frame+animation_crop.x, animation_crop.x, animation_crop.y);
|
| 130 |
+
break;
|
| 131 |
+
case tex::wrap_clip:
|
| 132 |
+
frame += animation_crop.x;
|
| 133 |
+
if(frame < animation_crop.x || frame > animation_crop.y) return normalData;
|
| 134 |
+
break;
|
| 135 |
+
}
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
if (tex::width(texture) == 0 || tex::height(texture) == 0 || // avoid division by zero in texremapu for invalid resource
|
| 139 |
+
factor == 0.0f)
|
| 140 |
+
return normalData;
|
| 141 |
+
{
|
| 142 |
+
if (clip) {
|
| 143 |
+
if (wrap_u == tex::wrap_clamp && (uvw.position.x < 0. || uvw.position.x > 1.)) {
|
| 144 |
+
return normalData;
|
| 145 |
+
}
|
| 146 |
+
if (wrap_v == tex::wrap_clamp && (uvw.position.y < 0. || uvw.position.y > 1.)) {
|
| 147 |
+
return normalData;
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
if (wrap_u == tex::wrap_clip && (uvw.position.x < 0. || uvw.position.x > 1.)) {
|
| 151 |
+
return normalData;
|
| 152 |
+
}
|
| 153 |
+
if (wrap_v == tex::wrap_clip && (uvw.position.y < 0. || uvw.position.y > 1.)) {
|
| 154 |
+
return normalData;
|
| 155 |
+
}
|
| 156 |
+
}
|
| 157 |
+
bool pixel_flip_u = flip_tangent_u;
|
| 158 |
+
bool pixel_flip_v = flip_tangent_v;
|
| 159 |
+
//if we mirror repeat a tangent space texture, tangent space needs to be flipped for every other tile
|
| 160 |
+
if (wrap_u == tex::wrap_mirrored_repeat) {
|
| 161 |
+
if( uvw.position.x > 0. && int(uvw.position.x) % 2 == 1)
|
| 162 |
+
pixel_flip_u = ! pixel_flip_u;
|
| 163 |
+
else if( uvw.position.x < 0. && int(uvw.position.x) % 2 == 0)
|
| 164 |
+
pixel_flip_u = ! pixel_flip_u;
|
| 165 |
+
}
|
| 166 |
+
if (wrap_v == tex::wrap_mirrored_repeat) {
|
| 167 |
+
if( uvw.position.y > 0. && int(uvw.position.y) % 2 == 1)
|
| 168 |
+
pixel_flip_v = ! pixel_flip_v;
|
| 169 |
+
else if( uvw.position.y < 0. && int(uvw.position.y) % 2 == 0)
|
| 170 |
+
pixel_flip_v = ! pixel_flip_v;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
float3 transformed_tangent_u = uvw.tangent_u;
|
| 174 |
+
float3 transformed_tangent_v = uvw.tangent_v;
|
| 175 |
+
|
| 176 |
+
if (pixel_flip_u)
|
| 177 |
+
transformed_tangent_u=-transformed_tangent_u;
|
| 178 |
+
if (pixel_flip_v)
|
| 179 |
+
transformed_tangent_v=-transformed_tangent_v;
|
| 180 |
+
|
| 181 |
+
float3 tangent_space_normal;
|
| 182 |
+
float4 normal_raw = tex::lookup_float4(texture,float2(uvw.position.x,uvw.position.y), wrap_u, wrap_v, crop_u, crop_v, frame);
|
| 183 |
+
if(normal_raw.x > 1.5)
|
| 184 |
+
{
|
| 185 |
+
// octahedron packed by OV
|
| 186 |
+
normal_raw.x -= 2.0;
|
| 187 |
+
normal_raw.x -= 0.5;
|
| 188 |
+
normal_raw.y -= 0.5;
|
| 189 |
+
tangent_space_normal = HemiOctahedronToUnitVector(float2(normal_raw.x, normal_raw.y) * 2.0);
|
| 190 |
+
normalData.roughness = float2(normal_raw.z, normal_raw.w);
|
| 191 |
+
}
|
| 192 |
+
else
|
| 193 |
+
{
|
| 194 |
+
// regular
|
| 195 |
+
tangent_space_normal = (float3(normal_raw.x, normal_raw.y, normal_raw.z) - float3(0.5)) * 2.0;
|
| 196 |
+
normalData.roughness = float2(0);
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
normalData.normal = math::normalize(
|
| 200 |
+
transformed_tangent_u * tangent_space_normal.x * factor +
|
| 201 |
+
transformed_tangent_v * tangent_space_normal.y * factor +
|
| 202 |
+
state::normal() * tangent_space_normal.z);
|
| 203 |
+
|
| 204 |
+
return normalData;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
|
| 208 |
+
export material OmniPBRBase(
|
| 209 |
+
|
| 210 |
+
|
| 211 |
+
// Albdeo //
|
| 212 |
+
|
| 213 |
+
color diffuse_reflection_color = color(0.2) [[
|
| 214 |
+
anno::display_name("Albedo Color"),
|
| 215 |
+
anno::description("This is the albedo base color"),
|
| 216 |
+
anno::in_group("Albedo")
|
| 217 |
+
]],
|
| 218 |
+
color diffuse_tint = color(1.0) [[
|
| 219 |
+
anno::display_name("Albedo Tint"),
|
| 220 |
+
anno::description("When enabled, this color value is multiplied over the final albedo color"),
|
| 221 |
+
anno::in_group("Albedo")
|
| 222 |
+
]],
|
| 223 |
+
|
| 224 |
+
|
| 225 |
+
// Reflecitivity //
|
| 226 |
+
|
| 227 |
+
float specular_reflection_roughness = float(0.0) [[
|
| 228 |
+
anno::display_name("Roughness"),
|
| 229 |
+
anno::description("Higher roughness values lead to more blurry reflections"),
|
| 230 |
+
anno::in_group("Reflectivity"),
|
| 231 |
+
anno::hard_range(0.0, 1.0)
|
| 232 |
+
]],
|
| 233 |
+
float2 specular_reflection_aniso_roughness = float2(0.0, 0.0) [[
|
| 234 |
+
anno::display_name("Aniso roughness"),
|
| 235 |
+
anno::description("Higher roughness values lead to more blurry reflections"),
|
| 236 |
+
anno::in_group("Reflectivity"),
|
| 237 |
+
anno::hidden()
|
| 238 |
+
]],
|
| 239 |
+
float metalness = float(0.0) [[
|
| 240 |
+
anno::display_name("Metalness"),
|
| 241 |
+
anno::description("Bias towards pure specular reflection"),
|
| 242 |
+
anno::in_group("Reflectivity"),
|
| 243 |
+
anno::hard_range(0.0, 1.0)
|
| 244 |
+
]],
|
| 245 |
+
float specular_level = float(0.5) [[
|
| 246 |
+
anno::display_name("Specular"),
|
| 247 |
+
anno::description("The specular level (intensity) of the material"),
|
| 248 |
+
anno::in_group("Reflectivity"),
|
| 249 |
+
anno::soft_range(0.0, 1.0)
|
| 250 |
+
]],
|
| 251 |
+
|
| 252 |
+
|
| 253 |
+
// Emission //
|
| 254 |
+
|
| 255 |
+
uniform bool enable_emission = false [[
|
| 256 |
+
anno::display_name("Enable Emission"),
|
| 257 |
+
anno::description("Enables the emission of light from the material"),
|
| 258 |
+
anno::in_group("Emissive")
|
| 259 |
+
]],
|
| 260 |
+
color emission_color = color(1.0,0.1,0.1) [[
|
| 261 |
+
anno::display_name("Emissive Color"),
|
| 262 |
+
anno::description("The emission color"),
|
| 263 |
+
anno::in_group("Emissive"),
|
| 264 |
+
anno::enable_if("enable_emission == true")
|
| 265 |
+
]],
|
| 266 |
+
float emission_intensity = float(40.0) [[
|
| 267 |
+
anno::display_name("Emissive Intensity"),
|
| 268 |
+
anno::description("Intensity of the emission"),
|
| 269 |
+
anno::in_group("Emissive"),
|
| 270 |
+
anno::soft_range(0.0, 1000.0),
|
| 271 |
+
anno::enable_if("enable_emission == true")
|
| 272 |
+
]],
|
| 273 |
+
|
| 274 |
+
|
| 275 |
+
// Geometry Opacity //
|
| 276 |
+
|
| 277 |
+
uniform bool enable_opacity = false [[
|
| 278 |
+
anno::display_name("Enable Opacity"),
|
| 279 |
+
anno::description("Enables the use of cutout opacity"),
|
| 280 |
+
anno::in_group("Opacity")
|
| 281 |
+
]],
|
| 282 |
+
float geometry_opacity = float(1.0) [[
|
| 283 |
+
anno::display_name("Opacity Amount"),
|
| 284 |
+
anno::description("Opacity value between 0 and 1, when Opacity Map is not valid"),
|
| 285 |
+
anno::in_group("Opacity"),
|
| 286 |
+
anno::hard_range(0.0, 1.0)
|
| 287 |
+
]],
|
| 288 |
+
uniform float geometry_opacity_threshold = 0.f
|
| 289 |
+
[[
|
| 290 |
+
anno::display_name("Opacity Threshold"),
|
| 291 |
+
anno::description("If 0, use fractional opacity values 'as is'; if > 0, remap opacity values to 1 when >= threshold and to 0 otherwise"),
|
| 292 |
+
anno::in_group("Opacity"),
|
| 293 |
+
anno::hard_range(0.0, 1.0)
|
| 294 |
+
]],
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
// Clearcoat //
|
| 298 |
+
|
| 299 |
+
uniform bool enable_coat = false [[
|
| 300 |
+
anno::display_name("Enable Clearcoat Layer"),
|
| 301 |
+
anno::description("Adds a coat layer on top of the material when enabled"),
|
| 302 |
+
anno::in_group("Clearcoat")
|
| 303 |
+
]],
|
| 304 |
+
float coat_weight = float(1.0) [[
|
| 305 |
+
anno::display_name("Clearcoat Weight"),
|
| 306 |
+
anno::description("Sets the weight for coat layer"),
|
| 307 |
+
anno::in_group("Clearcoat"),
|
| 308 |
+
anno::hard_range(0.0, 1.0)
|
| 309 |
+
]],
|
| 310 |
+
color coat_color = color(1.0) [[
|
| 311 |
+
anno::display_name("Clearcoat Tint"),
|
| 312 |
+
anno::description("Clearcoat is tinted and affects the underlying material"),
|
| 313 |
+
anno::in_group("Clearcoat")
|
| 314 |
+
]],
|
| 315 |
+
float coat_transparency = float(1.0) [[
|
| 316 |
+
anno::display_name("Clearcoat Transparency"),
|
| 317 |
+
anno::description("Adjusts the transparency of the coat. Can be turned into a fully opaque coat covering the underlying layer"),
|
| 318 |
+
anno::in_group("Clearcoat"),
|
| 319 |
+
anno::hard_range(0.0, 1.0)
|
| 320 |
+
]],
|
| 321 |
+
float coat_roughness = float(0.0) [[
|
| 322 |
+
anno::display_name("Clearcoat Roughness"),
|
| 323 |
+
anno::description("Higher roughness values lead to more blurry reflections"),
|
| 324 |
+
anno::in_group("Clearcoat"),
|
| 325 |
+
anno::hard_range(0.0, 1.0)
|
| 326 |
+
]],
|
| 327 |
+
float2 coat_aniso_roughness = float2(0.0, 0.0) [[
|
| 328 |
+
anno::display_name("Clearcoat aniso roughness"),
|
| 329 |
+
anno::description("Higher roughness values lead to more blurry reflections"),
|
| 330 |
+
anno::in_group("Clearcoat"),
|
| 331 |
+
anno::hidden()
|
| 332 |
+
]],
|
| 333 |
+
float coat_ior = float(1.56) [[
|
| 334 |
+
anno::display_name("Clearcoat IOR"),
|
| 335 |
+
anno::description("Sets the Index of refraction for the coat layer"),
|
| 336 |
+
anno::in_group("Clearcoat"),
|
| 337 |
+
anno::soft_range(0.0, 4.0)
|
| 338 |
+
]],
|
| 339 |
+
float3 clearcoat_geometry_normal = state::normal() [[
|
| 340 |
+
anno::display_name("Clearcoat Normal"),
|
| 341 |
+
anno::in_group("Clearcoat"),
|
| 342 |
+
anno::usage("normal")
|
| 343 |
+
]],
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
// Geometry //
|
| 347 |
+
|
| 348 |
+
uniform float round_edges_radius = float(0.0) [[
|
| 349 |
+
anno::display_name("Round Edge Radius"),
|
| 350 |
+
anno::description("Influence radius around the edges in meters"),
|
| 351 |
+
anno::in_group("Geometry"),
|
| 352 |
+
anno::soft_range(0.0, 1.0)
|
| 353 |
+
]],
|
| 354 |
+
uniform float round_edges_roundness = float(1.0) [[
|
| 355 |
+
anno::display_name("Round Edge Roundness"),
|
| 356 |
+
anno::description("Determines how round the edge will look"),
|
| 357 |
+
anno::in_group("Geometry"),
|
| 358 |
+
anno::hard_range(0.0, 1.0)
|
| 359 |
+
]],
|
| 360 |
+
uniform bool round_edges_across_materials = false [[
|
| 361 |
+
anno::display_name("Round Edge Across Materials"),
|
| 362 |
+
anno::description("Normal smoothing happens only between facets of equal material, \n"
|
| 363 |
+
"\t\tunless this parameter is set true, in which case the smoothing \n"
|
| 364 |
+
"\t\thappens between facets irrespective of their materials"),
|
| 365 |
+
anno::in_group("Geometry")
|
| 366 |
+
]],
|
| 367 |
+
float3 geometry_normal = state::normal() [[
|
| 368 |
+
anno::display_name("Geometry Normal"),
|
| 369 |
+
anno::in_group("Geometry"),
|
| 370 |
+
anno::usage("normal")
|
| 371 |
+
]]
|
| 372 |
+
|
| 373 |
+
)
|
| 374 |
+
[[
|
| 375 |
+
anno::display_name("OmniPBR Base"),
|
| 376 |
+
anno::description("OmniPBR Base with support for clear coat, opacity and ORM textures."),
|
| 377 |
+
anno::in_group("Omni Materials"),
|
| 378 |
+
anno::version( 2, 1, 1),
|
| 379 |
+
anno::author("NVIDIA CORPORATION"),
|
| 380 |
+
anno::key_words(string[]("omni", "PBR", "opacity", "omniverse", "generic"))
|
| 381 |
+
]]
|
| 382 |
+
= let{
|
| 383 |
+
|
| 384 |
+
// Diffuse Bsdf //
|
| 385 |
+
|
| 386 |
+
color tinted_diffuse_color = diffuse_reflection_color * diffuse_tint;
|
| 387 |
+
|
| 388 |
+
color base_color = tinted_diffuse_color;
|
| 389 |
+
|
| 390 |
+
bsdf diffuse_bsdf = df::weighted_layer(
|
| 391 |
+
weight: 1.0,
|
| 392 |
+
layer: df::diffuse_reflection_bsdf(
|
| 393 |
+
tint: base_color,
|
| 394 |
+
roughness: float(0.0)
|
| 395 |
+
),
|
| 396 |
+
base: bsdf(),
|
| 397 |
+
normal: geometry_normal
|
| 398 |
+
);
|
| 399 |
+
|
| 400 |
+
// Glossy Reflection Bsdf //
|
| 401 |
+
|
| 402 |
+
float roughness_u = math::clamp(specular_reflection_roughness * specular_reflection_roughness
|
| 403 |
+
+ specular_reflection_aniso_roughness.x * specular_reflection_aniso_roughness.x, 0, 1);
|
| 404 |
+
float roughness_v = math::clamp(specular_reflection_roughness * specular_reflection_roughness
|
| 405 |
+
+ specular_reflection_aniso_roughness.y * specular_reflection_aniso_roughness.y, 0, 1);
|
| 406 |
+
bsdf ggx_smith_bsdf = df::microfacet_ggx_smith_bsdf(
|
| 407 |
+
roughness_u: roughness_u,
|
| 408 |
+
roughness_v: roughness_v,
|
| 409 |
+
tint: color(1.0),
|
| 410 |
+
mode: df::scatter_reflect
|
| 411 |
+
);
|
| 412 |
+
|
| 413 |
+
bsdf custom_curve_layer_bsdf = df::custom_curve_layer(
|
| 414 |
+
normal_reflectivity: 0.08,
|
| 415 |
+
grazing_reflectivity: 1.0,
|
| 416 |
+
exponent: 5.0,
|
| 417 |
+
weight: specular_level,
|
| 418 |
+
layer: ggx_smith_bsdf,
|
| 419 |
+
base: diffuse_bsdf,
|
| 420 |
+
normal: geometry_normal
|
| 421 |
+
);
|
| 422 |
+
|
| 423 |
+
bsdf directional_factor_bsdf = df::tint(base_color, ggx_smith_bsdf);
|
| 424 |
+
|
| 425 |
+
bsdf omni_PBR_bsdf = df::weighted_layer(
|
| 426 |
+
weight: metalness,
|
| 427 |
+
layer: directional_factor_bsdf,
|
| 428 |
+
base: custom_curve_layer_bsdf,
|
| 429 |
+
normal: geometry_normal
|
| 430 |
+
);
|
| 431 |
+
|
| 432 |
+
// Clear Coat //
|
| 433 |
+
|
| 434 |
+
float coat_roughness_u = math::clamp(coat_roughness * coat_roughness
|
| 435 |
+
+ coat_aniso_roughness.x * coat_aniso_roughness.x, 0, 1);
|
| 436 |
+
float coat_roughness_v = math::clamp(coat_roughness * coat_roughness
|
| 437 |
+
+ coat_aniso_roughness.y * coat_aniso_roughness.y, 0, 1);
|
| 438 |
+
bsdf coat_bsdf = df::microfacet_ggx_smith_bsdf(
|
| 439 |
+
roughness_u: coat_roughness_u,
|
| 440 |
+
roughness_v: coat_roughness_v,
|
| 441 |
+
tint: color(1.0),
|
| 442 |
+
mode: df::scatter_reflect
|
| 443 |
+
);
|
| 444 |
+
|
| 445 |
+
bsdf opaque_coat = df::weighted_layer(
|
| 446 |
+
weight: coat_transparency,
|
| 447 |
+
layer: ::df::tint(
|
| 448 |
+
tint: coat_color,
|
| 449 |
+
base: omni_PBR_bsdf
|
| 450 |
+
),
|
| 451 |
+
base: ::df::diffuse_reflection_bsdf(
|
| 452 |
+
tint: coat_color
|
| 453 |
+
)
|
| 454 |
+
);
|
| 455 |
+
|
| 456 |
+
bsdf omni_PBR_coated_bsdf = df::fresnel_layer(
|
| 457 |
+
ior: coat_ior,
|
| 458 |
+
weight: coat_weight,
|
| 459 |
+
layer: coat_bsdf,
|
| 460 |
+
base: opaque_coat,
|
| 461 |
+
normal: clearcoat_geometry_normal
|
| 462 |
+
);
|
| 463 |
+
|
| 464 |
+
bsdf final_bsdf = enable_coat ? omni_PBR_coated_bsdf : omni_PBR_bsdf;
|
| 465 |
+
|
| 466 |
+
color emission_value = enable_emission ? emission_color * color(emission_intensity) : color(0.0);
|
| 467 |
+
|
| 468 |
+
float opacity_value = geometry_opacity;
|
| 469 |
+
float cutout_opacity = enable_opacity ? ((geometry_opacity_threshold == 0.0) ? opacity_value : ((opacity_value >= geometry_opacity_threshold) ? 1.0 : 0)) : 1.0;
|
| 470 |
+
|
| 471 |
+
material_emission emission = material_emission(
|
| 472 |
+
df::diffuse_edf(),
|
| 473 |
+
intensity: emission_value
|
| 474 |
+
);
|
| 475 |
+
|
| 476 |
+
material_surface surface = material_surface(
|
| 477 |
+
scattering: final_bsdf,
|
| 478 |
+
emission: emission
|
| 479 |
+
);
|
| 480 |
+
|
| 481 |
+
material_geometry geometry = material_geometry(
|
| 482 |
+
normal: state::rounded_corner_normal(
|
| 483 |
+
radius: round_edges_radius,
|
| 484 |
+
across_materials: round_edges_across_materials,
|
| 485 |
+
roundness: round_edges_roundness
|
| 486 |
+
),
|
| 487 |
+
cutout_opacity: cutout_opacity
|
| 488 |
+
);
|
| 489 |
+
|
| 490 |
+
} in material(
|
| 491 |
+
surface: surface,
|
| 492 |
+
geometry: geometry
|
| 493 |
+
);
|
EXLS1/simready_usd/materials/OmniPBR/OmniPBR_ClearCoat.mdl
ADDED
|
@@ -0,0 +1,734 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/***************************************************************************************************
|
| 2 |
+
* Copyright 2022 NVIDIA Corporation. All rights reserved.
|
| 3 |
+
*
|
| 4 |
+
* Redistribution and use in source and binary forms, with or without
|
| 5 |
+
* modification, are permitted provided that the following conditions
|
| 6 |
+
* are met:
|
| 7 |
+
* * Redistributions of source code must retain the above copyright
|
| 8 |
+
* notice, this list of conditions and the following disclaimer.
|
| 9 |
+
* * Redistributions in binary form must reproduce the above copyright
|
| 10 |
+
* notice, this list of conditions and the following disclaimer in the
|
| 11 |
+
* documentation and/or other materials provided with the distribution.
|
| 12 |
+
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
| 13 |
+
* contributors may be used to endorse or promote products derived
|
| 14 |
+
* from this software without specific prior written permission.
|
| 15 |
+
*
|
| 16 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
| 17 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 18 |
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
| 19 |
+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
| 20 |
+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
| 21 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
| 22 |
+
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
| 23 |
+
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
| 24 |
+
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 25 |
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 26 |
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 27 |
+
**************************************************************************************************/
|
| 28 |
+
|
| 29 |
+
mdl 1.7;
|
| 30 |
+
|
| 31 |
+
import ::df::*;
|
| 32 |
+
import ::state::*;
|
| 33 |
+
import ::math::*;
|
| 34 |
+
import ::base::*;
|
| 35 |
+
import ::state::*;
|
| 36 |
+
import ::tex::*;
|
| 37 |
+
import ::anno::*;
|
| 38 |
+
|
| 39 |
+
import ::debug::*;
|
| 40 |
+
|
| 41 |
+
import ::nvidia::core_definitions::file_texture;
|
| 42 |
+
import ::nvidia::core_definitions::normalmap_texture;
|
| 43 |
+
|
| 44 |
+
import OmniPBRBase::*;
|
| 45 |
+
|
| 46 |
+
// Functions //
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
// Returns a matrix from R,T,S. inputs //
|
| 50 |
+
|
| 51 |
+
uniform float4x4 rotation_translation_scale(
|
| 52 |
+
uniform float3 rotation = float3(0.)
|
| 53 |
+
[[ anno::description("Rotation applied to every UVW coordinate") ]],
|
| 54 |
+
uniform float3 translation = float3(0.)
|
| 55 |
+
[[ anno::description("Offset applied to every UVW coordinate") ]],
|
| 56 |
+
uniform float3 scaling = float3(1.)
|
| 57 |
+
[[ anno::description("Scale applied to every UVW coordinate") ]]
|
| 58 |
+
)
|
| 59 |
+
[[
|
| 60 |
+
anno::description("Construct a transformation matrix from euler rotation, translation and scale"),
|
| 61 |
+
anno::hidden()
|
| 62 |
+
]]
|
| 63 |
+
{
|
| 64 |
+
float4x4 scale =
|
| 65 |
+
float4x4(scaling.x , 0.0 , 0.0 , 0.0,
|
| 66 |
+
0.0 , scaling.y , 0.0 , 0.0,
|
| 67 |
+
0.0 , 0.0 , scaling.z , 0.0,
|
| 68 |
+
translation.x , translation.y , translation.z , 1.0);
|
| 69 |
+
|
| 70 |
+
float3 s = math::sin(rotation);
|
| 71 |
+
float3 c = math::cos(rotation);
|
| 72 |
+
|
| 73 |
+
float4x4 rotate =
|
| 74 |
+
float4x4( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , 0.0,
|
| 75 |
+
c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , 0.0,
|
| 76 |
+
-s.y , s.x*c.y , c.x*c.y , 0.0,
|
| 77 |
+
0.0 , 0.0 , 0 , 1.0);
|
| 78 |
+
|
| 79 |
+
return scale * rotate;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
// Returns the normal n in tangent space, given n is in internal space. //
|
| 83 |
+
|
| 84 |
+
float3 transform_internal_to_tangent(float3 n)
|
| 85 |
+
{
|
| 86 |
+
/* flip_tangent_v */
|
| 87 |
+
return
|
| 88 |
+
n.x* float3(state::texture_tangent_u(0).x,-state::texture_tangent_v(0).x,state::normal().x)+
|
| 89 |
+
n.y* float3(state::texture_tangent_u(0).y,-state::texture_tangent_v(0).y,state::normal().y)+
|
| 90 |
+
n.z* float3(state::texture_tangent_u(0).z,-state::texture_tangent_v(0).z,state::normal().z);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
// Returns the normal n in internal space, given n is in tangent space.
|
| 94 |
+
float3 transform_tangent_to_internal(float3 n)
|
| 95 |
+
{
|
| 96 |
+
return state::texture_tangent_u(0) * n.x -
|
| 97 |
+
state::texture_tangent_v(0) * n.y + /* flip_tangent_v */
|
| 98 |
+
state::normal() * n.z;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
// Returns a normal by adding a detail normal to a global normal.
|
| 102 |
+
export float3 add_detail_normal(float3 nd = state::normal(), float3 n = state::normal())
|
| 103 |
+
{
|
| 104 |
+
// http://blog.selfshadow.com/publications/blending-in-detail/
|
| 105 |
+
float3 n_t = transform_internal_to_tangent(n);
|
| 106 |
+
float3 nd_t = transform_internal_to_tangent(nd);
|
| 107 |
+
n_t = n_t + float3(0.,0.,1.);
|
| 108 |
+
nd_t = nd_t * float3(-1.,-1.,1.);
|
| 109 |
+
n = n_t * math::dot(n_t, nd_t)/n_t.z - nd_t;
|
| 110 |
+
return math::normalize(transform_tangent_to_internal(n));
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
base::texture_return multiply_colors(
|
| 114 |
+
color color_1 = color(1.0, 1.0, 1.0),
|
| 115 |
+
color color_2 = color(.5, .5, .5),
|
| 116 |
+
float weight = 1.0
|
| 117 |
+
)
|
| 118 |
+
[[
|
| 119 |
+
anno::hidden()
|
| 120 |
+
]]
|
| 121 |
+
{
|
| 122 |
+
return base::blend_color_layers(
|
| 123 |
+
layers: base::color_layer[](
|
| 124 |
+
base::color_layer(
|
| 125 |
+
layer_color: color_2,
|
| 126 |
+
weight: weight,
|
| 127 |
+
mode: base::color_layer_multiply
|
| 128 |
+
)),
|
| 129 |
+
base: color_1
|
| 130 |
+
);
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
// OmniPBR Clearcoat //
|
| 135 |
+
|
| 136 |
+
export material OmniPBR_ClearCoat(
|
| 137 |
+
|
| 138 |
+
// Albdeo //
|
| 139 |
+
|
| 140 |
+
color diffuse_color_constant = color(0.2) [[
|
| 141 |
+
anno::display_name("Albedo Color"),
|
| 142 |
+
anno::description("This is the albedo base color"),
|
| 143 |
+
anno::in_group("Albedo")
|
| 144 |
+
]],
|
| 145 |
+
uniform texture_2d diffuse_texture = texture_2d() [[
|
| 146 |
+
anno::display_name("Albedo Map"),
|
| 147 |
+
anno::in_group("Albedo")
|
| 148 |
+
]],
|
| 149 |
+
float albedo_desaturation = float(0.0) [[
|
| 150 |
+
anno::display_name("Albedo Map Desaturation"),
|
| 151 |
+
anno::description("Desaturates the albedo map"),
|
| 152 |
+
anno::in_group("Albedo"),
|
| 153 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 154 |
+
]],
|
| 155 |
+
float albedo_add = float(0.0) [[
|
| 156 |
+
anno::display_name("Albedo Add"),
|
| 157 |
+
anno::description("Adds a constant value to the diffuse color "),
|
| 158 |
+
anno::in_group("Albedo"),
|
| 159 |
+
anno::soft_range(float(-1.0), float(1.0))
|
| 160 |
+
]],
|
| 161 |
+
float albedo_brightness = float(1.0) [[
|
| 162 |
+
anno::display_name("Albedo Brightness"),
|
| 163 |
+
anno::description("Multiplier for the diffuse color "),
|
| 164 |
+
anno::in_group("Albedo"),
|
| 165 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 166 |
+
]],
|
| 167 |
+
color diffuse_tint = color(1.0) [[
|
| 168 |
+
anno::display_name("Color Tint"),
|
| 169 |
+
anno::description("When enabled, this color value is multiplied over the final albedo color"),
|
| 170 |
+
anno::in_group("Albedo")
|
| 171 |
+
]],
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
// Reflectivity //
|
| 175 |
+
|
| 176 |
+
float reflection_roughness_constant = float(0.5) [[
|
| 177 |
+
anno::display_name("Roughness Amount"),
|
| 178 |
+
anno::description("Higher roughness values lead to more blurry reflections"),
|
| 179 |
+
anno::in_group("Reflectivity"),
|
| 180 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 181 |
+
]],
|
| 182 |
+
float reflection_roughness_texture_influence = float(0.0) [[
|
| 183 |
+
anno::display_name("Roughness Map Influence"),
|
| 184 |
+
anno::description("Blends between the constant value and the lookup of the roughness texture"),
|
| 185 |
+
anno::in_group("Reflectivity"),
|
| 186 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 187 |
+
]],
|
| 188 |
+
uniform texture_2d reflectionroughness_texture = texture_2d() [[
|
| 189 |
+
anno::display_name("Roughness Map"),
|
| 190 |
+
anno::in_group("Reflectivity"),
|
| 191 |
+
anno::usage("roughness")
|
| 192 |
+
]],
|
| 193 |
+
float metallic_constant = float(0.0) [[
|
| 194 |
+
anno::display_name("Metallic Amount"),
|
| 195 |
+
anno::description("Metallic Material"),
|
| 196 |
+
anno::in_group("Reflectivity"),
|
| 197 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 198 |
+
]],
|
| 199 |
+
float metallic_texture_influence = float(0.0) [[
|
| 200 |
+
anno::display_name("Metallic Map Influence"),
|
| 201 |
+
anno::description("Blends between the constant value and the lookup of the metallic texture"),
|
| 202 |
+
anno::in_group("Reflectivity"),
|
| 203 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 204 |
+
]],
|
| 205 |
+
uniform texture_2d metallic_texture = texture_2d() [[
|
| 206 |
+
anno::display_name("Metallic Map"),
|
| 207 |
+
anno::in_group("Reflectivity"),
|
| 208 |
+
anno::usage("metalness")
|
| 209 |
+
]],
|
| 210 |
+
float specular_level = float(0.5) [[
|
| 211 |
+
anno::display_name("Specular"),
|
| 212 |
+
anno::description("The specular level (intensity) of the material"),
|
| 213 |
+
anno::in_group("Reflectivity"),
|
| 214 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 215 |
+
]],
|
| 216 |
+
|
| 217 |
+
|
| 218 |
+
// ORM //
|
| 219 |
+
|
| 220 |
+
uniform bool enable_ORM_texture = false [[
|
| 221 |
+
anno::display_name("Enable ORM Texture"),
|
| 222 |
+
anno::description("The ORM texture will be used to extract the Occlusion, Roughness and Metallic textures from R,G,B channels"),
|
| 223 |
+
anno::in_group("Reflectivity")
|
| 224 |
+
]],
|
| 225 |
+
uniform texture_2d ORM_texture = texture_2d() [[
|
| 226 |
+
anno::display_name("ORM Map"),
|
| 227 |
+
anno::description("Texture that has Occlusion, Roughness and Metallic maps stored in their respective R, G and B channels"),
|
| 228 |
+
anno::in_group("Reflectivity"),
|
| 229 |
+
anno::usage("roughness")
|
| 230 |
+
]],
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
// AO Group //
|
| 234 |
+
|
| 235 |
+
float ao_to_diffuse = 0.0 [[
|
| 236 |
+
anno::display_name("AO to diffuse"),
|
| 237 |
+
anno::description("Controls the amount of ambient occlusion multiplied against the diffuse color channel"),
|
| 238 |
+
anno::in_group("AO"),
|
| 239 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 240 |
+
]],
|
| 241 |
+
uniform texture_2d ao_texture = texture_2d() [[
|
| 242 |
+
anno::display_name("Ambient Occlusion Map"),
|
| 243 |
+
anno::description("The ambient occlusion texture for the material"),
|
| 244 |
+
anno::in_group("AO"),
|
| 245 |
+
anno::usage("occlusion")
|
| 246 |
+
]],
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
// Emission //
|
| 250 |
+
|
| 251 |
+
uniform bool enable_emission = false [[
|
| 252 |
+
anno::display_name("Enable Emission"),
|
| 253 |
+
anno::description("Enables the emission of light from the material"),
|
| 254 |
+
anno::in_group("Emissive")
|
| 255 |
+
]],
|
| 256 |
+
color emissive_color = color(1.0,0.1,0.1) [[
|
| 257 |
+
anno::display_name("Emissive Color"),
|
| 258 |
+
anno::description("The emission color"),
|
| 259 |
+
anno::in_group("Emissive"),
|
| 260 |
+
anno::enable_if("enable_emission == true")
|
| 261 |
+
]],
|
| 262 |
+
uniform texture_2d emissive_color_texture = texture_2d() [[
|
| 263 |
+
anno::display_name("Emissive Color map"),
|
| 264 |
+
anno::in_group("Emissive"),
|
| 265 |
+
anno::description("The emissive color texture"),
|
| 266 |
+
anno::enable_if("enable_emission == true")
|
| 267 |
+
]],
|
| 268 |
+
uniform texture_2d emissive_mask_texture = texture_2d() [[
|
| 269 |
+
anno::display_name("Emissive Mask map"),
|
| 270 |
+
anno::description("The texture masking the emissive color"),
|
| 271 |
+
anno::in_group("Emissive"),
|
| 272 |
+
anno::enable_if("enable_emission == true"),
|
| 273 |
+
anno::usage("occlusion")
|
| 274 |
+
]],
|
| 275 |
+
float emissive_intensity = float(40.0) [[
|
| 276 |
+
anno::display_name("Emissive Intensity"),
|
| 277 |
+
anno::description("Intensity of the emission"),
|
| 278 |
+
anno::in_group("Emissive"),
|
| 279 |
+
anno::enable_if("enable_emission == true")
|
| 280 |
+
]],
|
| 281 |
+
|
| 282 |
+
|
| 283 |
+
// Cutout Opacity //
|
| 284 |
+
|
| 285 |
+
uniform bool enable_opacity = false [[
|
| 286 |
+
anno::display_name("Enable Opacity"),
|
| 287 |
+
anno::description("Enables the use of cutout opacity"),
|
| 288 |
+
anno::in_group("Opacity")
|
| 289 |
+
]],
|
| 290 |
+
uniform texture_2d opacity_texture = texture_2d() [[
|
| 291 |
+
anno::display_name("Opacity Map"),
|
| 292 |
+
anno::in_group("Opacity"),
|
| 293 |
+
anno::usage("opacity")
|
| 294 |
+
]],
|
| 295 |
+
float opacity_constant = float(1.0) [[
|
| 296 |
+
anno::display_name("Opacity Amount"),
|
| 297 |
+
anno::description("Opacity value between 0 and 1, when Opacity Map is not valid"),
|
| 298 |
+
anno::in_group("Opacity"),
|
| 299 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 300 |
+
]],
|
| 301 |
+
uniform bool enable_opacity_texture = false [[
|
| 302 |
+
anno::display_name("Enable Opacity Texture"),
|
| 303 |
+
anno::description("Enables or disables the usage of the opacity texture map"),
|
| 304 |
+
anno::in_group("Opacity")
|
| 305 |
+
]],
|
| 306 |
+
uniform base::mono_mode opacity_mode = base::mono_average [[
|
| 307 |
+
anno::display_name("Opacity Mono Source"),
|
| 308 |
+
anno::description("Determines how to lookup opacity from the supplied texture. mono_alpha, mono_average, mono_luminance, mono_maximum"),
|
| 309 |
+
anno::in_group("Opacity")
|
| 310 |
+
]],
|
| 311 |
+
uniform float opacity_threshold = float(0.0) [[
|
| 312 |
+
anno::display_name("Opacity Threshold"),
|
| 313 |
+
anno::description("If 0, use fractional opacity values 'as is'; if > 0, remap opacity values to 1 when >= threshold and to 0 otherwise"),
|
| 314 |
+
anno::in_group("Opacity"),
|
| 315 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 316 |
+
]],
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
// Clearcoat //
|
| 320 |
+
|
| 321 |
+
uniform bool enable_clearcoat = false [[
|
| 322 |
+
anno::display_name("Enable Clearcoat Layer"),
|
| 323 |
+
anno::description("Adds a clearcoat layer on top of the material when enabled"),
|
| 324 |
+
anno::in_group("Clearcoat")
|
| 325 |
+
]],
|
| 326 |
+
float clearcoat_weight = float(1.0) [[
|
| 327 |
+
anno::display_name("Clearcoat Weight"),
|
| 328 |
+
anno::description("Sets the weight for clearcoat layer"),
|
| 329 |
+
anno::in_group("Clearcoat"),
|
| 330 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 331 |
+
]],
|
| 332 |
+
color clearcoat_tint = color(1.0) [[
|
| 333 |
+
anno::display_name("Clearcoat Tint"),
|
| 334 |
+
anno::description("Clearcoat is tinted and affects the underlying material"),
|
| 335 |
+
anno::in_group("Clearcoat")
|
| 336 |
+
]],
|
| 337 |
+
float clearcoat_transparency = float(1.0) [[
|
| 338 |
+
anno::display_name("Clearcoat Transparency"),
|
| 339 |
+
anno::description("Adjusts the transparency of the clearcoat. Can be turned into a fully opaque clearcoat covering the underlying layer"),
|
| 340 |
+
anno::in_group("Clearcoat"),
|
| 341 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 342 |
+
]],
|
| 343 |
+
float clearcoat_reflection_roughness = float(0.0) [[
|
| 344 |
+
anno::display_name("Clearcoat Roughness"),
|
| 345 |
+
anno::description("Higher roughness values lead to more blurry reflections"),
|
| 346 |
+
anno::in_group("Clearcoat"),
|
| 347 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 348 |
+
]],
|
| 349 |
+
float clearcoat_ior = float(1.56) [[
|
| 350 |
+
anno::display_name("Clearcoat IOR"),
|
| 351 |
+
anno::description("Sets the Index of refraction for the clearcoat layer"),
|
| 352 |
+
anno::in_group("Clearcoat"),
|
| 353 |
+
anno::soft_range(float(0.0), float(4.0))
|
| 354 |
+
]],
|
| 355 |
+
uniform float clearcoat_bump_factor = float(1.0) [[
|
| 356 |
+
anno::display_name("Clearcoat Normal Map Strength"),
|
| 357 |
+
anno::description("Strength of normal map."),
|
| 358 |
+
anno::in_group("Clearcoat"),
|
| 359 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 360 |
+
]],
|
| 361 |
+
uniform texture_2d clearcoat_normalmap_texture = texture_2d() [[
|
| 362 |
+
anno::display_name("Clearcoat Normal Map"),
|
| 363 |
+
anno::description("Enables the usage of the normalmap texture"),
|
| 364 |
+
anno::in_group("Clearcoat"),
|
| 365 |
+
anno::usage("normal")
|
| 366 |
+
]],
|
| 367 |
+
uniform float2 clearcoat_texture_translate = float2(0.0) [[
|
| 368 |
+
anno::display_name("Clearcoat Texture Translate"),
|
| 369 |
+
anno::description("Controls the position of the clearcoat texture"),
|
| 370 |
+
anno::ui_order(1),
|
| 371 |
+
anno::in_group("UV")
|
| 372 |
+
]],
|
| 373 |
+
uniform float clearcoat_texture_rotate = float(0.0) [[
|
| 374 |
+
anno::display_name("Clearcoat Texture Rotate"),
|
| 375 |
+
anno::description("Rotates angle of the clearcoat texture in degrees"),
|
| 376 |
+
anno::ui_order(2),
|
| 377 |
+
anno::in_group("UV")
|
| 378 |
+
]],
|
| 379 |
+
uniform float2 clearcoat_texture_scale = float2(1.0) [[
|
| 380 |
+
anno::display_name("Clearcoat Texture Tiling"),
|
| 381 |
+
anno::description("Controls the repetition of the clearcoat texture"),
|
| 382 |
+
anno::ui_order(3),
|
| 383 |
+
anno::in_group("UV")
|
| 384 |
+
]],
|
| 385 |
+
float clearcoat_flatten = float(1.0) [[
|
| 386 |
+
anno::display_name("Clearcoat Flatten"),
|
| 387 |
+
anno::description("Flattens the clearcoat to even out the underlying bump maps"),
|
| 388 |
+
anno::in_group("Clearcoat"),
|
| 389 |
+
anno::hard_range(float(0.0), float(1.0))
|
| 390 |
+
]],
|
| 391 |
+
|
| 392 |
+
|
| 393 |
+
// Normal //
|
| 394 |
+
|
| 395 |
+
uniform float geometry_normal_roughness_strength = 1.f
|
| 396 |
+
[[
|
| 397 |
+
anno::hard_range(0.0, 1.0),
|
| 398 |
+
anno::display_name("Normal map to roughness weight"),
|
| 399 |
+
anno::description("Enables and weights roughness induced by normal maps"),
|
| 400 |
+
anno::in_group("Normal")
|
| 401 |
+
]],
|
| 402 |
+
uniform float bump_factor = float(1.0) [[
|
| 403 |
+
anno::display_name("Normal Strength"),
|
| 404 |
+
anno::description("Strength of normal map"),
|
| 405 |
+
anno::in_group("Normal"),
|
| 406 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 407 |
+
]],
|
| 408 |
+
uniform texture_2d normalmap_texture = texture_2d() [[
|
| 409 |
+
anno::display_name("Normal Map"),
|
| 410 |
+
anno::in_group("Normal"),
|
| 411 |
+
anno::usage("normal")
|
| 412 |
+
]],
|
| 413 |
+
uniform float detail_bump_factor = float(0.3) [[
|
| 414 |
+
anno::display_name("Detail Normal Strength"),
|
| 415 |
+
anno::in_group("Normal"),
|
| 416 |
+
anno::description("Strength of the detail normal"),
|
| 417 |
+
anno::soft_range(float(0.0), float(1.0))
|
| 418 |
+
]],
|
| 419 |
+
uniform texture_2d detail_normalmap_texture = texture_2d() [[
|
| 420 |
+
anno::display_name("Detail Normal Map"),
|
| 421 |
+
anno::in_group("Normal"),
|
| 422 |
+
anno::usage("normal")
|
| 423 |
+
]],
|
| 424 |
+
uniform bool flip_tangent_u = false [[
|
| 425 |
+
anno::display_name("Normal Map Flip U Tangent"),
|
| 426 |
+
anno::in_group("Normal")
|
| 427 |
+
]],
|
| 428 |
+
uniform bool flip_tangent_v = true [[
|
| 429 |
+
anno::display_name("Normal Map Flip V Tangent"),
|
| 430 |
+
anno::in_group("Normal")
|
| 431 |
+
]],
|
| 432 |
+
|
| 433 |
+
|
| 434 |
+
// UVW Projection Group //
|
| 435 |
+
|
| 436 |
+
uniform bool project_uvw = false [[
|
| 437 |
+
anno::display_name("Enable Project UVW Coordinates"),
|
| 438 |
+
anno::description("When enabled, UV coordinates will be generated by projecting them from a coordinate system"),
|
| 439 |
+
anno::in_group("UV")
|
| 440 |
+
]],
|
| 441 |
+
uniform bool world_or_object = false [[
|
| 442 |
+
anno::display_name("Enable World Space"),
|
| 443 |
+
anno::description("When enabled, uses world space for projection, otherwise object space is used"),
|
| 444 |
+
anno::in_group("UV"),
|
| 445 |
+
anno::enable_if("project_uvw == true")
|
| 446 |
+
]],
|
| 447 |
+
uniform int uv_space_index = 0 [[
|
| 448 |
+
anno::display_name("UV Space Index"),
|
| 449 |
+
anno::description("UV Space Index"),
|
| 450 |
+
anno::in_group("UV"),
|
| 451 |
+
anno::enable_if("project_uvw == true"),
|
| 452 |
+
anno::hard_range(int(0), int(3))
|
| 453 |
+
]],
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
// UVW Adjustments Group //
|
| 457 |
+
|
| 458 |
+
uniform float2 texture_translate = float2(0.0) [[
|
| 459 |
+
anno::display_name("Texture Translate"),
|
| 460 |
+
anno::description("Controls position of texture."),
|
| 461 |
+
anno::in_group("UV"),
|
| 462 |
+
anno::enable_if("project_uvw == true")
|
| 463 |
+
]],
|
| 464 |
+
uniform float texture_rotate = float(0.0) [[
|
| 465 |
+
anno::display_name("Texture Rotate"),
|
| 466 |
+
anno::description("Rotates angle of texture in degrees."),
|
| 467 |
+
anno::in_group("UV"),
|
| 468 |
+
anno::enable_if("project_uvw == true")
|
| 469 |
+
]],
|
| 470 |
+
uniform float2 texture_scale = float2(1.0) [[
|
| 471 |
+
anno::display_name("Texture Tiling"),
|
| 472 |
+
anno::description("Controls repetition of the texture."),
|
| 473 |
+
anno::in_group("UV"),
|
| 474 |
+
anno::enable_if("project_uvw == true")
|
| 475 |
+
]],
|
| 476 |
+
uniform float2 detail_texture_translate = float2(0.0) [[
|
| 477 |
+
anno::display_name("Detail Texture Translate"),
|
| 478 |
+
anno::description("Controls the position of the detail texture."),
|
| 479 |
+
anno::in_group("UV"),
|
| 480 |
+
anno::enable_if("project_uvw == true")
|
| 481 |
+
]],
|
| 482 |
+
uniform float detail_texture_rotate = float(0.0) [[
|
| 483 |
+
anno::display_name("Detail Texture Rotate"),
|
| 484 |
+
anno::description("Rotates angle of the detail texture in degrees."),
|
| 485 |
+
anno::in_group("UV"),
|
| 486 |
+
anno::enable_if("project_uvw == true")
|
| 487 |
+
]],
|
| 488 |
+
uniform float2 detail_texture_scale = float2(1.0) [[
|
| 489 |
+
anno::display_name("Detail Texture Tiling"),
|
| 490 |
+
anno::description("Controls repetition of the detail texture."),
|
| 491 |
+
anno::in_group("UV"),
|
| 492 |
+
anno::enable_if("project_uvw == true")
|
| 493 |
+
]],
|
| 494 |
+
|
| 495 |
+
|
| 496 |
+
// Geometry //
|
| 497 |
+
|
| 498 |
+
uniform float round_edges_radius = float(0.0) [[
|
| 499 |
+
anno::display_name("Round Edge Radius"),
|
| 500 |
+
anno::description("Influence radius around the edges in meters"),
|
| 501 |
+
anno::in_group("Geometry"),
|
| 502 |
+
anno::soft_range(0.0, 1.0)
|
| 503 |
+
]],
|
| 504 |
+
uniform float round_edges_roundness = float(1.0) [[
|
| 505 |
+
anno::display_name("Round Edge Roundness"),
|
| 506 |
+
anno::description("Determines how round the edge will look"),
|
| 507 |
+
anno::in_group("Geometry"),
|
| 508 |
+
anno::hard_range(0.0, 1.0)
|
| 509 |
+
]],
|
| 510 |
+
uniform bool round_edges_across_materials = false [[
|
| 511 |
+
anno::display_name("Round Edge Across Materials"),
|
| 512 |
+
anno::description("Normal smoothing happens only between facets of equal material, \n"
|
| 513 |
+
"\t\tunless this parameter is set true, in which case the smoothing \n"
|
| 514 |
+
"\t\thappens between facets irrespective of their materials"),
|
| 515 |
+
anno::in_group("Geometry")
|
| 516 |
+
]]
|
| 517 |
+
)
|
| 518 |
+
[[
|
| 519 |
+
anno::display_name("OmniPBR ClearCoat "),
|
| 520 |
+
anno::description("OmniPBR Base with support for clear coat, opacity and ORM textures."),
|
| 521 |
+
anno::in_group("Base"),
|
| 522 |
+
anno::version( 2, 1, 1),
|
| 523 |
+
anno::author("NVIDIA CORPORATION"),
|
| 524 |
+
anno::key_words(string[]("omni", "PBR", "opacity", "clearcoat", "omniverse", "generic"))
|
| 525 |
+
]] = let {
|
| 526 |
+
|
| 527 |
+
// UVW lookup and transformation //
|
| 528 |
+
base::texture_coordinate_system the_system = world_or_object ? base::texture_coordinate_world : base::texture_coordinate_object;
|
| 529 |
+
|
| 530 |
+
base::texture_coordinate_info uvw = project_uvw ? base::coordinate_projection(
|
| 531 |
+
coordinate_system: the_system,
|
| 532 |
+
texture_space: uv_space_index,
|
| 533 |
+
projection_type: base::projection_cubic
|
| 534 |
+
) :
|
| 535 |
+
base::coordinate_source(
|
| 536 |
+
coordinate_system: base::texture_coordinate_uvw,
|
| 537 |
+
texture_space: uv_space_index
|
| 538 |
+
);
|
| 539 |
+
|
| 540 |
+
base::texture_coordinate_info transformed_uvw = base::transform_coordinate(
|
| 541 |
+
transform: rotation_translation_scale(
|
| 542 |
+
scaling: float3(texture_scale.x, texture_scale.y, 1.0),
|
| 543 |
+
rotation: float3(0.0, 0.0, texture_rotate/180.*math::PI ),
|
| 544 |
+
translation: float3(texture_translate.x, texture_translate.y, 0.0)
|
| 545 |
+
),
|
| 546 |
+
coordinate: uvw
|
| 547 |
+
);
|
| 548 |
+
|
| 549 |
+
base::texture_coordinate_info detail_transformed_uvw = base::transform_coordinate(
|
| 550 |
+
transform: rotation_translation_scale(
|
| 551 |
+
scaling: float3(detail_texture_scale.x, detail_texture_scale.y, 1.0),
|
| 552 |
+
rotation: float3(0.0, 0.0, detail_texture_rotate/180.*math::PI ),
|
| 553 |
+
translation: float3(detail_texture_translate.x, detail_texture_translate.y, 0.0)
|
| 554 |
+
),
|
| 555 |
+
coordinate: uvw
|
| 556 |
+
);
|
| 557 |
+
|
| 558 |
+
base::texture_coordinate_info clearcoat_transformed_uvw = base::transform_coordinate(
|
| 559 |
+
transform: rotation_translation_scale(
|
| 560 |
+
scaling: float3(clearcoat_texture_scale.x, clearcoat_texture_scale.y, 1.0),
|
| 561 |
+
rotation: float3(0.0, 0.0, clearcoat_texture_rotate/180.*math::PI ),
|
| 562 |
+
translation: float3(clearcoat_texture_translate.x, clearcoat_texture_translate.y, 0.f)
|
| 563 |
+
),
|
| 564 |
+
coordinate: uvw
|
| 565 |
+
);
|
| 566 |
+
|
| 567 |
+
// Normal calculations //
|
| 568 |
+
OmniPBRBase::NormalData defaultData = OmniPBRBase::NormalData(state::normal(), float2(0));
|
| 569 |
+
|
| 570 |
+
OmniPBRBase::NormalData normal_data = tex::texture_isvalid(normalmap_texture) ?
|
| 571 |
+
OmniPBRBase::tangent_space_normal_roughness_texture(
|
| 572 |
+
texture: normalmap_texture,
|
| 573 |
+
factor: bump_factor,
|
| 574 |
+
uvw: transformed_uvw,
|
| 575 |
+
flip_tangent_u: flip_tangent_u,
|
| 576 |
+
flip_tangent_v: flip_tangent_v // true for dx, false for opengl
|
| 577 |
+
//flip_tangent_v: true
|
| 578 |
+
|
| 579 |
+
) : defaultData;
|
| 580 |
+
float3 the_normal = normal_data.normal;
|
| 581 |
+
|
| 582 |
+
OmniPBRBase::NormalData detail_normal_data = tex::texture_isvalid(detail_normalmap_texture) ?
|
| 583 |
+
OmniPBRBase::tangent_space_normal_roughness_texture(
|
| 584 |
+
texture: detail_normalmap_texture,
|
| 585 |
+
factor: detail_bump_factor,
|
| 586 |
+
uvw: detail_transformed_uvw,
|
| 587 |
+
flip_tangent_u: flip_tangent_u,
|
| 588 |
+
flip_tangent_v: flip_tangent_v // true for dx, false for opengl
|
| 589 |
+
) : defaultData;
|
| 590 |
+
float3 detail_normal = detail_normal_data.normal;
|
| 591 |
+
|
| 592 |
+
OmniPBRBase::NormalData clearcoat_normal_data = tex::texture_isvalid(clearcoat_normalmap_texture) ?
|
| 593 |
+
OmniPBRBase::tangent_space_normal_roughness_texture(
|
| 594 |
+
texture: clearcoat_normalmap_texture,
|
| 595 |
+
factor: clearcoat_bump_factor,
|
| 596 |
+
uvw: clearcoat_transformed_uvw,
|
| 597 |
+
flip_tangent_u: flip_tangent_u,
|
| 598 |
+
flip_tangent_v: flip_tangent_v // true for dx, false for opengl
|
| 599 |
+
) : defaultData;
|
| 600 |
+
float3 clearcoat_normal = clearcoat_normal_data.normal;
|
| 601 |
+
|
| 602 |
+
|
| 603 |
+
float3 diffuse_gloss_normal = tex::texture_isvalid(detail_normalmap_texture) ? add_detail_normal(detail_normal, the_normal) : the_normal;
|
| 604 |
+
float3 flattened_clearcoat_normal = ::math::lerp(diffuse_gloss_normal, ::state::normal(), clearcoat_flatten);
|
| 605 |
+
float3 final_clearcoat_normal = tex::texture_isvalid(clearcoat_normalmap_texture) ? add_detail_normal(flattened_clearcoat_normal, clearcoat_normal)
|
| 606 |
+
: flattened_clearcoat_normal;
|
| 607 |
+
|
| 608 |
+
|
| 609 |
+
// ORM Handling //
|
| 610 |
+
|
| 611 |
+
float3 ORM_lookup = tex::lookup_float3(
|
| 612 |
+
tex: ORM_texture,
|
| 613 |
+
coord: float2(transformed_uvw.position.x, transformed_uvw.position.y)
|
| 614 |
+
);
|
| 615 |
+
|
| 616 |
+
|
| 617 |
+
float3 roughness_lookup = tex::lookup_float3(
|
| 618 |
+
tex: reflectionroughness_texture,
|
| 619 |
+
coord: float2(transformed_uvw.position.x, transformed_uvw.position.y)
|
| 620 |
+
);
|
| 621 |
+
|
| 622 |
+
float roughness_selection = enable_ORM_texture ? ORM_lookup.y : roughness_lookup.x;
|
| 623 |
+
float reflection_roughness_s = math::lerp(reflection_roughness_constant, roughness_selection, reflection_roughness_texture_influence);
|
| 624 |
+
float2 reflection_roughness = float2(math::sqrt(reflection_roughness_s*reflection_roughness_s + (geometry_normal_roughness_strength * normal_data.roughness.x * normal_data.roughness.x)),
|
| 625 |
+
math::sqrt(reflection_roughness_s*reflection_roughness_s + (geometry_normal_roughness_strength * normal_data.roughness.y * normal_data.roughness.y)));
|
| 626 |
+
|
| 627 |
+
float2 clearcoat_reflection_roughness2 = float2(math::sqrt(clearcoat_reflection_roughness*clearcoat_reflection_roughness + (geometry_normal_roughness_strength * clearcoat_normal_data.roughness.x * clearcoat_normal_data.roughness.x)),
|
| 628 |
+
math::sqrt(clearcoat_reflection_roughness*clearcoat_reflection_roughness + (geometry_normal_roughness_strength * clearcoat_normal_data.roughness.y * clearcoat_normal_data.roughness.y)));
|
| 629 |
+
|
| 630 |
+
// Diffuse Color Lookup and AO //
|
| 631 |
+
|
| 632 |
+
base::texture_return base_lookup = base::file_texture(
|
| 633 |
+
texture: diffuse_texture,
|
| 634 |
+
color_offset: color(albedo_add),
|
| 635 |
+
color_scale: color(albedo_brightness),
|
| 636 |
+
mono_source: base::mono_luminance,
|
| 637 |
+
uvw: transformed_uvw,
|
| 638 |
+
clip: false
|
| 639 |
+
);
|
| 640 |
+
|
| 641 |
+
base::texture_return ao_lookup = base::file_texture(
|
| 642 |
+
texture: ao_texture,
|
| 643 |
+
color_offset: color(0.0, 0.0, 0.0),
|
| 644 |
+
color_scale: color(1.0, 1.0, 1.0),
|
| 645 |
+
mono_source: base::mono_average,
|
| 646 |
+
uvw: transformed_uvw,
|
| 647 |
+
clip: false
|
| 648 |
+
);
|
| 649 |
+
|
| 650 |
+
|
| 651 |
+
color ao_color = enable_ORM_texture ? color(ORM_lookup.x) : ao_lookup.tint;
|
| 652 |
+
color desaturated_base = math::lerp(base_lookup.tint, color(base_lookup.mono), albedo_desaturation);
|
| 653 |
+
color diffuse = tex::texture_isvalid(diffuse_texture)? desaturated_base : diffuse_color_constant;
|
| 654 |
+
color tinted_diffuse = multiply_colors(diffuse, diffuse_tint, 1.0).tint;
|
| 655 |
+
|
| 656 |
+
color base_color = multiply_colors(
|
| 657 |
+
color_1: tinted_diffuse,
|
| 658 |
+
color_2: ao_color,
|
| 659 |
+
weight: ao_to_diffuse
|
| 660 |
+
).tint;
|
| 661 |
+
|
| 662 |
+
|
| 663 |
+
// Metalness //
|
| 664 |
+
|
| 665 |
+
float3 metallic_lookup = tex::lookup_float3(
|
| 666 |
+
tex: metallic_texture,
|
| 667 |
+
coord: float2(transformed_uvw.position.x, transformed_uvw.position.y)
|
| 668 |
+
);
|
| 669 |
+
|
| 670 |
+
float metallic_selection = enable_ORM_texture ? ORM_lookup.z : metallic_lookup.x;
|
| 671 |
+
float metallic = math::lerp(metallic_constant, metallic_selection, metallic_texture_influence);
|
| 672 |
+
|
| 673 |
+
|
| 674 |
+
// Emission //
|
| 675 |
+
|
| 676 |
+
color emission_color_texture = tex::texture_isvalid(emissive_color_texture) ?
|
| 677 |
+
base::file_texture(
|
| 678 |
+
texture: emissive_color_texture,
|
| 679 |
+
color_offset: color(0.0, 0.0, 0.0),
|
| 680 |
+
color_scale: color(1.0, 1.0, 1.0),
|
| 681 |
+
mono_source: base::mono_average,
|
| 682 |
+
uvw: transformed_uvw,
|
| 683 |
+
clip: false
|
| 684 |
+
).tint : emissive_color;
|
| 685 |
+
|
| 686 |
+
color emission_mask_texture = tex::texture_isvalid(emissive_mask_texture) ?
|
| 687 |
+
base::file_texture(
|
| 688 |
+
texture: emissive_mask_texture,
|
| 689 |
+
color_offset: color(0.0, 0.0, 0.0),
|
| 690 |
+
color_scale: color(1.0, 1.0, 1.0),
|
| 691 |
+
mono_source: base::mono_average,
|
| 692 |
+
uvw: transformed_uvw,
|
| 693 |
+
clip: false
|
| 694 |
+
).tint : color(1.0);
|
| 695 |
+
|
| 696 |
+
color final_emission_color = enable_emission ? emission_color_texture * emission_mask_texture: color(0.0);
|
| 697 |
+
|
| 698 |
+
// Opacity //
|
| 699 |
+
|
| 700 |
+
float opacity_value = enable_opacity_texture ? base::file_texture(
|
| 701 |
+
texture: opacity_texture,
|
| 702 |
+
mono_source: opacity_mode,
|
| 703 |
+
uvw: transformed_uvw
|
| 704 |
+
).mono : opacity_constant;
|
| 705 |
+
|
| 706 |
+
float cutout_opacity = enable_opacity ? ((opacity_threshold == 0.0) ? opacity_value : ((opacity_value >= opacity_threshold) ? 1.0 : 0)) : 1.0;
|
| 707 |
+
|
| 708 |
+
material base = OmniPBRBase::OmniPBRBase(
|
| 709 |
+
diffuse_reflection_color: base_color,
|
| 710 |
+
specular_reflection_aniso_roughness: reflection_roughness,
|
| 711 |
+
specular_level: specular_level,
|
| 712 |
+
metalness: metallic,
|
| 713 |
+
enable_emission: enable_emission,
|
| 714 |
+
emission_color: final_emission_color,
|
| 715 |
+
emission_intensity: emissive_intensity,
|
| 716 |
+
enable_coat: enable_clearcoat,
|
| 717 |
+
coat_weight: clearcoat_weight,
|
| 718 |
+
coat_color: clearcoat_tint,
|
| 719 |
+
coat_transparency: clearcoat_transparency,
|
| 720 |
+
coat_aniso_roughness: clearcoat_reflection_roughness2,
|
| 721 |
+
coat_ior: clearcoat_ior,
|
| 722 |
+
enable_opacity: enable_opacity,
|
| 723 |
+
geometry_opacity: cutout_opacity,
|
| 724 |
+
clearcoat_geometry_normal: final_clearcoat_normal,
|
| 725 |
+
round_edges_radius: round_edges_radius,
|
| 726 |
+
round_edges_roundness: round_edges_roundness,
|
| 727 |
+
round_edges_across_materials: round_edges_across_materials,
|
| 728 |
+
geometry_normal: diffuse_gloss_normal
|
| 729 |
+
);
|
| 730 |
+
|
| 731 |
+
} in material(
|
| 732 |
+
surface: base.surface,
|
| 733 |
+
geometry: base.geometry
|
| 734 |
+
);
|
EXLS1/simready_usd/materials/Polycarbonate_Opaque.mdl
ADDED
|
@@ -0,0 +1,1031 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/******************************************************************************
|
| 2 |
+
* Copyright 2023 NVIDIA Corporation. All rights reserved. *
|
| 3 |
+
******************************************************************************
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge,
|
| 6 |
+
to any person obtaining a copy of the sample definition code that uses our
|
| 7 |
+
Material Definition Language (the "MDL Materials"), to reproduce and distribute
|
| 8 |
+
the MDL Materials, including without limitation the rights to use, copy, merge,
|
| 9 |
+
publish, distribute, and sell modified and unmodified copies of the MDL
|
| 10 |
+
Materials, and to permit persons to whom the MDL Materials is furnished to do
|
| 11 |
+
so, in all cases solely for use with NVIDIA's Material Definition Language,
|
| 12 |
+
subject to the following further conditions:
|
| 13 |
+
|
| 14 |
+
1. The above copyright notices, this list of conditions, and the disclaimer
|
| 15 |
+
that follows shall be retained in all copies of one or more of the MDL
|
| 16 |
+
Materials, including in any software with which the MDL Materials are bundled,
|
| 17 |
+
redistributed, and/or sold, and included either as stand-alone text files,
|
| 18 |
+
human-readable headers or in the appropriate machine-readable metadata fields
|
| 19 |
+
within text or binary files as long as those fields can be easily viewed by the
|
| 20 |
+
user, as applicable.
|
| 21 |
+
2. The name of NVIDIA shall not be used to promote, endorse or advertise any
|
| 22 |
+
Modified Version without specific prior written permission, except a) to comply
|
| 23 |
+
with the notice requirements otherwise contained herein; or b) to acknowledge
|
| 24 |
+
the contribution(s) of NVIDIA.
|
| 25 |
+
|
| 26 |
+
THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
| 27 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
|
| 28 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
|
| 29 |
+
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR
|
| 30 |
+
ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL,
|
| 31 |
+
INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF
|
| 32 |
+
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE
|
| 33 |
+
THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.
|
| 34 |
+
*/
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
mdl 1.5;
|
| 38 |
+
|
| 39 |
+
import ::anno::*;
|
| 40 |
+
import ::base::*;
|
| 41 |
+
import ::df::*;
|
| 42 |
+
import ::math::*;
|
| 43 |
+
import ::state::*;
|
| 44 |
+
import ::tex::*;
|
| 45 |
+
import ::nvidia::core_definitions::blend_colors;
|
| 46 |
+
import ::nvidia::core_definitions::dimension;
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
const string COPYRIGHT =
|
| 50 |
+
" Copyright 2023 NVIDIA Corporation. All rights reserved.\n"
|
| 51 |
+
" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n"
|
| 52 |
+
" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n"
|
| 53 |
+
" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n"
|
| 54 |
+
" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n"
|
| 55 |
+
" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n"
|
| 56 |
+
" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n"
|
| 57 |
+
" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n"
|
| 58 |
+
" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n"
|
| 59 |
+
" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n"
|
| 60 |
+
" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n";
|
| 61 |
+
|
| 62 |
+
const string DESCRIPTION = "Diffuse plastic polycarbonate material for rendering of diffuse plastic with volumetric exhaustion.";
|
| 63 |
+
|
| 64 |
+
export enum unit_scale
|
| 65 |
+
[[
|
| 66 |
+
::anno::hidden()
|
| 67 |
+
]]
|
| 68 |
+
{
|
| 69 |
+
unit_mm = 1,
|
| 70 |
+
unit_cm = 2,
|
| 71 |
+
unit_m = 3
|
| 72 |
+
};
|
| 73 |
+
|
| 74 |
+
struct volume_info
|
| 75 |
+
[[
|
| 76 |
+
::anno::hidden()
|
| 77 |
+
]]
|
| 78 |
+
{
|
| 79 |
+
color absorption_coefficient;
|
| 80 |
+
color scattering_coefficient;
|
| 81 |
+
};
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
// simplified volume coefficients
|
| 85 |
+
// This function takes a transmittance value and and albedo and translates it into meaningful
|
| 86 |
+
// scattering and volume coefficients that are userfriendly
|
| 87 |
+
//
|
| 88 |
+
volume_info volume_transmittance_albedo(
|
| 89 |
+
uniform float density_scale = 1.0,
|
| 90 |
+
uniform color transmittance = color(0.5f), // transmittance color after unit distance
|
| 91 |
+
uniform color albedo = color(1.0f)
|
| 92 |
+
)
|
| 93 |
+
{
|
| 94 |
+
color sigma_t = -::math::log(::math::saturate(transmittance)) * density_scale;
|
| 95 |
+
color sigma_s = sigma_t * ::math::saturate(albedo);
|
| 96 |
+
return volume_info(
|
| 97 |
+
scattering_coefficient: sigma_s,
|
| 98 |
+
absorption_coefficient: sigma_t - sigma_s);
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
// This function calculates the apropriate scattering and volume coefficients
|
| 102 |
+
// for a material of a given thickness.
|
| 103 |
+
// The user specifies the thickness of the material, e.g. 3mm and the amount
|
| 104 |
+
// of light passing through. The rest is automatically calculated for the material
|
| 105 |
+
// and the material_volume is returned.
|
| 106 |
+
volume_info custom_volume_transmittance(
|
| 107 |
+
uniform unit_scale unit_scale_select = unit_mm,
|
| 108 |
+
uniform float absorption_thickness = 3.0f,
|
| 109 |
+
uniform color transmittance = color(0.5f),
|
| 110 |
+
uniform color albedo = color(0.0f)
|
| 111 |
+
)
|
| 112 |
+
{
|
| 113 |
+
absorption_thickness = (absorption_thickness <= 0.0f) ? 0.00001 : absorption_thickness;
|
| 114 |
+
float scalefactor;
|
| 115 |
+
switch(unit_scale_select){
|
| 116 |
+
case unit_mm: scalefactor = 0.001f; break;
|
| 117 |
+
case unit_cm: scalefactor = 0.01f; break;
|
| 118 |
+
case unit_m: scalefactor = 1.0f; break;
|
| 119 |
+
default: scalefactor = 1.0f;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
volume_info vol_coefficients = volume_transmittance_albedo(
|
| 124 |
+
density_scale: 1.0f/(absorption_thickness * scalefactor),
|
| 125 |
+
transmittance: transmittance,
|
| 126 |
+
albedo: albedo
|
| 127 |
+
);
|
| 128 |
+
|
| 129 |
+
return vol_coefficients;
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
::base::texture_coordinate_info transform_coordinate_2(
|
| 134 |
+
float4x4 transform
|
| 135 |
+
[[ ::anno::description("A transformation to be applied to the source coordinates. rotation_translation_scale() is a suggested means to compute the transformation matrix") ]],
|
| 136 |
+
::base::texture_coordinate_info coordinate = ::base::texture_coordinate_info()
|
| 137 |
+
[[ ::anno::description("Coordinate, typically sourced from coordinate_source or coordinate_projection") ]]
|
| 138 |
+
) [[
|
| 139 |
+
::anno::description("Transform a texture coordinate by a matrix") ,
|
| 140 |
+
::anno::noinline()
|
| 141 |
+
]]
|
| 142 |
+
{
|
| 143 |
+
// Version 2
|
| 144 |
+
float4 r_position = transform * float4(coordinate.position.x,coordinate.position.y,coordinate.position.z,1);
|
| 145 |
+
//Try aproximating it for the case that the rotation is only aroud z and assuming the texture layout is nice and z is ~constant.
|
| 146 |
+
//just pretend there is no other rotation happening
|
| 147 |
+
//get rid of scaling and translation. Then extract fields where sin and cos would be in a simple 2d transform around z.
|
| 148 |
+
float4 u = transform[0];
|
| 149 |
+
float3 ru = ::math::normalize(float3(u.x,u.y,u.z));
|
| 150 |
+
float cos = ru.x;
|
| 151 |
+
float sin = -ru.y;
|
| 152 |
+
//TODO: at least also handle sign of z?
|
| 153 |
+
//TODO: handle tangent becoming 0
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
return ::base::texture_coordinate_info(
|
| 157 |
+
float3(r_position.x,r_position.y,r_position.z),
|
| 158 |
+
::math::normalize(cos * coordinate.tangent_u - sin * coordinate.tangent_v),
|
| 159 |
+
::math::normalize(cos * coordinate.tangent_v + sin * coordinate.tangent_u));
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
// Takes the standard input that every material has. It combines a couple of
|
| 164 |
+
// functions in one convenience function.
|
| 165 |
+
::base::texture_coordinate_info vmat_transform(
|
| 166 |
+
float2 translation = float2(0.0, 0.0),
|
| 167 |
+
float rotation = 0.0, // rotation in degrees
|
| 168 |
+
float2 scaling = float2(1.0, 1.0),
|
| 169 |
+
uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw,
|
| 170 |
+
uniform int uv_space = 0
|
| 171 |
+
)
|
| 172 |
+
{
|
| 173 |
+
float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f;
|
| 174 |
+
float4x4 scale =
|
| 175 |
+
float4x4(1.0 /scaling.x, 0. , 0. , 0.,
|
| 176 |
+
0. , 1.0 /scaling.y , 0. , 0.,
|
| 177 |
+
0. , 0. , 1.0, 0.,
|
| 178 |
+
translation.x , translation.y , 0.0, 1.);
|
| 179 |
+
|
| 180 |
+
float s = ::math::sin(rotation_rad);
|
| 181 |
+
float c = ::math::cos(rotation_rad);
|
| 182 |
+
float4x4 rotate =
|
| 183 |
+
float4x4( c , -s , 0.0 , 0.0,
|
| 184 |
+
s , c , 0.0 , 0.0,
|
| 185 |
+
0.0, 0.0 , 1.0 , 0.0,
|
| 186 |
+
0. , 0.0 , 0.0 , 1.);
|
| 187 |
+
|
| 188 |
+
return transform_coordinate_2(scale*rotate, ::base::coordinate_source(system, uv_space));
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
float2x2 invert_2x2(float2x2 M)
|
| 194 |
+
{
|
| 195 |
+
float det = M[0][0]*M[1][1] - M[0][1]*M[1][0];
|
| 196 |
+
//https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/
|
| 197 |
+
return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]);
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
// https://nullprogram.com/blog/2018/07/31/
|
| 201 |
+
//bias: 0.17353355999581582 ( very probably the best of its kind )
|
| 202 |
+
// NOTE: To turn this back to a float, one must divide the value by 4294967296.f
|
| 203 |
+
// which corresponds to 0xffffffff, however MDL seems to turn this into -1.
|
| 204 |
+
int lowbias32(int x)
|
| 205 |
+
{
|
| 206 |
+
x ^= x >>> 16;
|
| 207 |
+
x *= 0x7feb352d;
|
| 208 |
+
x ^= x >>> 15;
|
| 209 |
+
x *= 0x846ca68b;
|
| 210 |
+
x ^= x >>> 16;
|
| 211 |
+
return x;
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
float uint2float(int x)
|
| 215 |
+
{
|
| 216 |
+
return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0);
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
|
| 220 |
+
float2 rnd22(int2 p) {
|
| 221 |
+
float2 ret_val = float2(
|
| 222 |
+
uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f,
|
| 223 |
+
uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f
|
| 224 |
+
);
|
| 225 |
+
return ret_val;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
float3 srgb2rgb(float3 val)
|
| 229 |
+
{
|
| 230 |
+
return ::math::pow(::math::max(val, float3(0.0f)), 2.2);
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
float3 nonrepeat_lookup(
|
| 234 |
+
uniform texture_2d texture = texture_2d(),
|
| 235 |
+
::base::texture_coordinate_info uvw = ::base::coordinate_source(),
|
| 236 |
+
float texture_scale = 1.0,
|
| 237 |
+
float3 average_color = float3(0.5),
|
| 238 |
+
float patch_size = 8.0
|
| 239 |
+
)
|
| 240 |
+
{
|
| 241 |
+
float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale;
|
| 242 |
+
float Z = patch_size; // patch scale inside example texture
|
| 243 |
+
|
| 244 |
+
float3 O = float3(0.f);
|
| 245 |
+
float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f);
|
| 246 |
+
float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space
|
| 247 |
+
|
| 248 |
+
float2 U = uv_in;
|
| 249 |
+
float2 V = M * uv_in; //pre-tilted hexa coordinates
|
| 250 |
+
int2 I = int2(::math::floor(V)); // hexa-tile id
|
| 251 |
+
|
| 252 |
+
// The mean color needs to be determined in Photoshop
|
| 253 |
+
float3 m = average_color;
|
| 254 |
+
|
| 255 |
+
float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W;
|
| 256 |
+
F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates
|
| 257 |
+
|
| 258 |
+
if( F[2] > 0.f )
|
| 259 |
+
|
| 260 |
+
O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m)
|
| 261 |
+
+ (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m)
|
| 262 |
+
+ (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m);
|
| 263 |
+
else
|
| 264 |
+
O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m)
|
| 265 |
+
+ (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m)
|
| 266 |
+
+ (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m);
|
| 267 |
+
O = m + O/::math::length(W);
|
| 268 |
+
O = ::math::clamp( (O), 0.0, 1.0);
|
| 269 |
+
|
| 270 |
+
return float3(O);
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
|
| 274 |
+
// NOTE: tex_resource must be in linear space (ensure that ::tex::gamma_linear is used)
|
| 275 |
+
color endless_texture(
|
| 276 |
+
uniform texture_2d texture = texture_2d(),
|
| 277 |
+
::base::texture_coordinate_info uvw = ::base::coordinate_source(),
|
| 278 |
+
float texture_scale = 10.0,
|
| 279 |
+
float3 average_color = float3(0.5, 0.5, 1.0),
|
| 280 |
+
float patch_size = 8.0,
|
| 281 |
+
bool gamma_correct_lookup = true
|
| 282 |
+
)
|
| 283 |
+
{
|
| 284 |
+
return gamma_correct_lookup ? color(srgb2rgb(
|
| 285 |
+
nonrepeat_lookup (
|
| 286 |
+
texture: texture,
|
| 287 |
+
uvw: uvw,
|
| 288 |
+
texture_scale: texture_scale,
|
| 289 |
+
average_color: average_color,
|
| 290 |
+
patch_size: patch_size
|
| 291 |
+
))
|
| 292 |
+
) : color(nonrepeat_lookup (
|
| 293 |
+
texture: texture,
|
| 294 |
+
uvw: uvw,
|
| 295 |
+
texture_scale: texture_scale,
|
| 296 |
+
average_color: average_color,
|
| 297 |
+
patch_size: patch_size
|
| 298 |
+
));
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
export material Polycarbonate_Opaque(
|
| 303 |
+
uniform bool thin_walled = false [[
|
| 304 |
+
::anno::description("Makes the material thin-walled. This changes the behavior of the material in a way that light attenuation is not calculated volumetrically as light travels through the geometry but at the light surface level. Thin walled geometry mustbe modeled as a single sheet without any volume."),
|
| 305 |
+
::anno::display_name("Thin Walled"),
|
| 306 |
+
::anno::ui_order(0)
|
| 307 |
+
]],
|
| 308 |
+
float IOR = 1.586f [[
|
| 309 |
+
::anno::description("Sets the Index of refraction."),
|
| 310 |
+
::anno::display_name("IOR"),
|
| 311 |
+
::anno::in_group("Appearance"),
|
| 312 |
+
::anno::ui_order(1)
|
| 313 |
+
]],
|
| 314 |
+
float roughness = 0.f [[
|
| 315 |
+
::anno::description("Hight values lead to a blurrier reflection."),
|
| 316 |
+
::anno::display_name("Roughness"),
|
| 317 |
+
::anno::in_group("Appearance"),
|
| 318 |
+
::anno::hard_range(0.f, 1.f),
|
| 319 |
+
::anno::ui_order(2)
|
| 320 |
+
]],
|
| 321 |
+
uniform color diffuse_tint = color(0.752942f) [[
|
| 322 |
+
::anno::description("Adjusts the diffuse color of the surface."),
|
| 323 |
+
::anno::display_name("Diffuse Tint"),
|
| 324 |
+
::anno::in_group("Appearance"),
|
| 325 |
+
::anno::ui_order(3)
|
| 326 |
+
]],
|
| 327 |
+
uniform unit_scale units_absorption_thickness = unit_cm [[
|
| 328 |
+
::anno::description("Chooses the units that are used for setting the absorption thickness. Can be meters, centimeters or millimeters."),
|
| 329 |
+
::anno::display_name("Units Absorption Thickness "),
|
| 330 |
+
::anno::in_group("Appearance"),
|
| 331 |
+
::anno::ui_order(4)
|
| 332 |
+
]],
|
| 333 |
+
uniform float absorption_thickness = 20.f [[
|
| 334 |
+
::anno::description("The thickness for which the transmittance (color) is set. Example: If thickness is set to 3mm and transmittance to 0.8, then 80% of the light will pass through a 3mm thick material."),
|
| 335 |
+
::anno::display_name("Absorption Thickness"),
|
| 336 |
+
::anno::in_group("Appearance"),
|
| 337 |
+
::anno::ui_order(5)
|
| 338 |
+
]],
|
| 339 |
+
uniform color transmissive_tint = color(0.98f) [[
|
| 340 |
+
::anno::description("Adjusts the transmissive color of the material. The color is influenced by the \"Diffuse Tint\" color parameter."),
|
| 341 |
+
::anno::display_name("Transmissive Tint"),
|
| 342 |
+
::anno::in_group("Appearance"),
|
| 343 |
+
::anno::ui_order(6)
|
| 344 |
+
]],
|
| 345 |
+
// Smudges
|
| 346 |
+
float smudges = 0.66f [[
|
| 347 |
+
::anno::description("Adds smudges and fingerprints for a less clean and perfect look"),
|
| 348 |
+
::anno::display_name("Smudges"),
|
| 349 |
+
::anno::in_group("Appearance", "Smudges"),
|
| 350 |
+
::anno::hard_range(0.f, 1.f),
|
| 351 |
+
::anno::ui_order(7)
|
| 352 |
+
]],
|
| 353 |
+
float2 smudge_scale = float2(1.f) [[
|
| 354 |
+
::anno::description("Larger numbers increase the size."),
|
| 355 |
+
::anno::display_name("Smudge Scale"),
|
| 356 |
+
::anno::in_group("Appearance", "Smudges"),
|
| 357 |
+
::anno::soft_range(float2(0.f), float2(2.f)),
|
| 358 |
+
::anno::ui_order(8)
|
| 359 |
+
]],
|
| 360 |
+
|
| 361 |
+
// Round Corners
|
| 362 |
+
uniform bool round_corners = true [[// Transform
|
| 363 |
+
::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are rquired to evaluate the round corner effect"),
|
| 364 |
+
::anno::display_name("Round Corners"),
|
| 365 |
+
::anno::in_group("Round Corners"),
|
| 366 |
+
::anno::ui_order(9)
|
| 367 |
+
]],
|
| 368 |
+
uniform float radius = 1.5f [[
|
| 369 |
+
::anno::description("Radius of the rounded corners"),
|
| 370 |
+
::anno::display_name("Radius mm"),
|
| 371 |
+
::anno::in_group("Round Corners"),
|
| 372 |
+
::anno::soft_range(0.f, 10.f),
|
| 373 |
+
::anno::ui_order(10)
|
| 374 |
+
]],
|
| 375 |
+
uniform bool across_materials = false [[
|
| 376 |
+
::anno::description("Applies the round corner effect across different materials when enabled."),
|
| 377 |
+
::anno::display_name("Across Materials"),
|
| 378 |
+
::anno::in_group("Round Corners"),
|
| 379 |
+
::anno::ui_order(11)
|
| 380 |
+
]],
|
| 381 |
+
|
| 382 |
+
|
| 383 |
+
float2 texture_translate = float2(0.f) [[
|
| 384 |
+
::anno::description("Controls the position of the texture."),
|
| 385 |
+
::anno::display_name("Texture Translate"),
|
| 386 |
+
::anno::in_group("Transform"),
|
| 387 |
+
::anno::ui_order(12)
|
| 388 |
+
]],
|
| 389 |
+
float texture_rotate = 0.f [[
|
| 390 |
+
::anno::description("Rotates angle of the texture in degrees."),
|
| 391 |
+
::anno::display_name("Texture Rotate"),
|
| 392 |
+
::anno::in_group("Transform"),
|
| 393 |
+
::anno::soft_range(0.f, 360.f),
|
| 394 |
+
::anno::ui_order(13)
|
| 395 |
+
]],
|
| 396 |
+
float2 texture_scale = float2(1.f) [[
|
| 397 |
+
::anno::description("Larger numbers increase the size."),
|
| 398 |
+
::anno::display_name("Texture Scale"),
|
| 399 |
+
::anno::in_group("Transform"),
|
| 400 |
+
::nvidia::core_definitions::dimension(float2(0.45f, .45f)),
|
| 401 |
+
::anno::soft_range(float2(0.f), float2(2.f)),
|
| 402 |
+
::anno::ui_order(14)
|
| 403 |
+
]],
|
| 404 |
+
uniform int uv_space_index = 0 [[
|
| 405 |
+
::anno::description("uses the selected UV space index."),
|
| 406 |
+
::anno::display_name("UV Space Index"),
|
| 407 |
+
::anno::in_group("Advanced"),
|
| 408 |
+
::anno::soft_range(0, 4),
|
| 409 |
+
::anno::ui_order(15)
|
| 410 |
+
]],
|
| 411 |
+
float3 normal = ::state::normal() [[
|
| 412 |
+
::anno::description("Override this input to provide a custom normal for the material."),
|
| 413 |
+
::anno::display_name("Normal"),
|
| 414 |
+
::anno::in_group("Advanced"),
|
| 415 |
+
::anno::ui_order(16)
|
| 416 |
+
]])
|
| 417 |
+
[[
|
| 418 |
+
::anno::display_name("Polycarbonate Opaque - White"),
|
| 419 |
+
::anno::author("NVIDIA vMaterials"),
|
| 420 |
+
::anno::contributor("Ruediger Raab"),
|
| 421 |
+
::anno::contributor("Maik Rohland"),
|
| 422 |
+
::anno::description(DESCRIPTION),
|
| 423 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth")),
|
| 424 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Opaque.png"),
|
| 425 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 426 |
+
]]
|
| 427 |
+
=
|
| 428 |
+
let {
|
| 429 |
+
bool tmp0 = thin_walled;
|
| 430 |
+
material_surface tmp1(::df::fresnel_layer(IOR, 1.f, ::df::microfacet_ggx_smith_bsdf((::math::pow(::math::max(float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[0] * smudges, float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[1] * smudges), ::math::lerp(2.5f, 0.5f, ::math::pow(smudges, 0.25f))) + roughness * 0.5f) * (::math::pow(::math::max(float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[0] * smudges, float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[1] * smudges), ::math::lerp(2.5f, 0.5f, ::math::pow(smudges, 0.25f))) + roughness * 0.5f), (::math::pow(::math::max(float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[0] * smudges, float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[1] * smudges), ::math::lerp(2.5f, 0.5f, ::math::pow(smudges, 0.25f))) + roughness * 0.5f) * (::math::pow(::math::max(float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[0] * smudges, float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[1] * smudges), ::math::lerp(2.5f, 0.5f, ::math::pow(smudges, 0.25f))) + roughness * 0.5f), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(0.508000016f, ::df::diffuse_reflection_bsdf(diffuse_tint, 0.f), ::df::weighted_layer(1.f, ::df::diffuse_transmission_bsdf(transmissive_tint), bsdf(), normal), normal), normal), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance));
|
| 431 |
+
material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance));
|
| 432 |
+
color tmp3 = color(1.f, 1.f, 1.f);
|
| 433 |
+
material_volume tmp4 = thin_walled ? material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)) : material_volume(vdf(), custom_volume_transmittance(units_absorption_thickness, absorption_thickness, color(0.214040995f, 0.214040995f, 0.214040995f), transmissive_tint).absorption_coefficient, custom_volume_transmittance(units_absorption_thickness, absorption_thickness, color(0.214040995f, 0.214040995f, 0.214040995f), transmissive_tint).scattering_coefficient);
|
| 434 |
+
material_geometry tmp5(float3(0.f), 1.f, round_corners ? ::state::rounded_corner_normal(radius * 0.00100000005f, across_materials, 1.f) : ::state::normal());
|
| 435 |
+
hair_bsdf tmp6 = hair_bsdf();
|
| 436 |
+
} in
|
| 437 |
+
material(
|
| 438 |
+
thin_walled: tmp0,
|
| 439 |
+
surface: tmp1,
|
| 440 |
+
backface: tmp2,
|
| 441 |
+
ior: tmp3,
|
| 442 |
+
volume: tmp4,
|
| 443 |
+
geometry: tmp5,
|
| 444 |
+
hair: tmp6);
|
| 445 |
+
|
| 446 |
+
|
| 447 |
+
export material Polycarbonate_Ivory(*)
|
| 448 |
+
[[
|
| 449 |
+
::anno::display_name("Polycarbonate Opaque - Ivory"),
|
| 450 |
+
::anno::author("NVIDIA vMaterials"),
|
| 451 |
+
::anno::contributor("Ruediger Raab"),
|
| 452 |
+
::anno::contributor("Maik Rohland"),
|
| 453 |
+
::anno::description(DESCRIPTION),
|
| 454 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "ivory", "white", "light", "neutral")),
|
| 455 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Ivory.png"),
|
| 456 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 457 |
+
]] = Polycarbonate_Opaque
|
| 458 |
+
(
|
| 459 |
+
thin_walled: false,
|
| 460 |
+
IOR: 1.586f,
|
| 461 |
+
roughness: 0.0f,
|
| 462 |
+
diffuse_tint: color(0.896269f, 0.838799f, 0.686685f),
|
| 463 |
+
units_absorption_thickness: unit_cm,
|
| 464 |
+
absorption_thickness: 20.0f,
|
| 465 |
+
transmissive_tint: color(0.955973f, 0.896269f, 0.730461f),
|
| 466 |
+
smudges: 0.1f,
|
| 467 |
+
smudge_scale: float2(1.0f),
|
| 468 |
+
texture_translate: float2(0.0f),
|
| 469 |
+
texture_rotate: 0.0f,
|
| 470 |
+
texture_scale: float2(1.0f),
|
| 471 |
+
round_corners: false,
|
| 472 |
+
radius: 1.5f,
|
| 473 |
+
across_materials: false,
|
| 474 |
+
uv_space_index: 0
|
| 475 |
+
);
|
| 476 |
+
|
| 477 |
+
export material Polycarbonate_Lemon(*)
|
| 478 |
+
[[
|
| 479 |
+
::anno::display_name("Polycarbonate Opaque - Lemon"),
|
| 480 |
+
::anno::author("NVIDIA vMaterials"),
|
| 481 |
+
::anno::contributor("Ruediger Raab"),
|
| 482 |
+
::anno::contributor("Maik Rohland"),
|
| 483 |
+
::anno::description(DESCRIPTION),
|
| 484 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "lemon", "yellow", "saturated", "warm", "light")),
|
| 485 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Lemon.png"),
|
| 486 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 487 |
+
]] = Polycarbonate_Opaque
|
| 488 |
+
(
|
| 489 |
+
thin_walled: false,
|
| 490 |
+
IOR: 1.586f,
|
| 491 |
+
roughness: 0.0f,
|
| 492 |
+
diffuse_tint: color(0.715694f, 0.715694f, 0.045186f),
|
| 493 |
+
units_absorption_thickness: unit_cm,
|
| 494 |
+
absorption_thickness: 20.0f,
|
| 495 |
+
transmissive_tint: color(0.964686f, 0.964686f, 0.059511f),
|
| 496 |
+
smudges: 0.1f,
|
| 497 |
+
smudge_scale: float2(1.0f),
|
| 498 |
+
texture_translate: float2(0.0f),
|
| 499 |
+
texture_rotate: 0.0f,
|
| 500 |
+
texture_scale: float2(1.0f),
|
| 501 |
+
round_corners: false,
|
| 502 |
+
radius: 1.5f,
|
| 503 |
+
across_materials: false,
|
| 504 |
+
uv_space_index: 0
|
| 505 |
+
);
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
export material Polycarbonate_Yellow(*)
|
| 509 |
+
[[
|
| 510 |
+
::anno::display_name("Polycarbonate Opaque - Yellow"),
|
| 511 |
+
::anno::author("NVIDIA vMaterials"),
|
| 512 |
+
::anno::contributor("Ruediger Raab"),
|
| 513 |
+
::anno::contributor("Maik Rohland"),
|
| 514 |
+
::anno::description(DESCRIPTION),
|
| 515 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "yellow", "warm", "saturated", "light")),
|
| 516 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Yellow.png"),
|
| 517 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 518 |
+
]] = Polycarbonate_Opaque
|
| 519 |
+
(
|
| 520 |
+
thin_walled: false,
|
| 521 |
+
IOR: 1.586f,
|
| 522 |
+
roughness: 0.0f,
|
| 523 |
+
diffuse_tint: color(0.871367f, 0.603827f, 0.045186f),
|
| 524 |
+
units_absorption_thickness: unit_cm,
|
| 525 |
+
absorption_thickness: 20.0f,
|
| 526 |
+
transmissive_tint: color(0.955973f, 0.686685f, 0.049707f),
|
| 527 |
+
smudges: 0.1f,
|
| 528 |
+
smudge_scale: float2(1.0f),
|
| 529 |
+
texture_translate: float2(0.0f),
|
| 530 |
+
texture_rotate: 0.0f,
|
| 531 |
+
texture_scale: float2(1.0f),
|
| 532 |
+
round_corners: false,
|
| 533 |
+
radius: 1.5f,
|
| 534 |
+
across_materials: false,
|
| 535 |
+
uv_space_index: 0
|
| 536 |
+
);
|
| 537 |
+
|
| 538 |
+
export material Polycarbonate_Dark_Orange(*)
|
| 539 |
+
[[
|
| 540 |
+
::anno::display_name("Polycarbonate Opaque - Dark Orange"),
|
| 541 |
+
::anno::author("NVIDIA vMaterials"),
|
| 542 |
+
::anno::contributor("Ruediger Raab"),
|
| 543 |
+
::anno::contributor("Maik Rohland"),
|
| 544 |
+
::anno::description(DESCRIPTION),
|
| 545 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "dark", "orange", "saturated", "warm")),
|
| 546 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Dark_Orange.png"),
|
| 547 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 548 |
+
]] = Polycarbonate_Opaque
|
| 549 |
+
(
|
| 550 |
+
thin_walled: false,
|
| 551 |
+
IOR: 1.586f,
|
| 552 |
+
roughness: 0.0f,
|
| 553 |
+
diffuse_tint: color(0.527115f, 0.127438f, 0.026241f),
|
| 554 |
+
units_absorption_thickness: unit_cm,
|
| 555 |
+
absorption_thickness: 20.0f,
|
| 556 |
+
transmissive_tint: color(0.955973f, 0.514918f, 0.040915f),
|
| 557 |
+
smudges: 0.1f,
|
| 558 |
+
smudge_scale: float2(1.0f),
|
| 559 |
+
texture_translate: float2(0.0f),
|
| 560 |
+
texture_rotate: 0.0f,
|
| 561 |
+
texture_scale: float2(1.0f),
|
| 562 |
+
round_corners: false,
|
| 563 |
+
radius: 1.5f,
|
| 564 |
+
across_materials: false,
|
| 565 |
+
uv_space_index: 0
|
| 566 |
+
);
|
| 567 |
+
|
| 568 |
+
|
| 569 |
+
export material Polycarbonate_Red(*)
|
| 570 |
+
[[
|
| 571 |
+
::anno::display_name("Polycarbonate Opaque - Red"),
|
| 572 |
+
::anno::author("NVIDIA vMaterials"),
|
| 573 |
+
::anno::contributor("Ruediger Raab"),
|
| 574 |
+
::anno::contributor("Maik Rohland"),
|
| 575 |
+
::anno::description(DESCRIPTION),
|
| 576 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "red", "saturated", "warm")),
|
| 577 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Red.png"),
|
| 578 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 579 |
+
]] = Polycarbonate_Opaque
|
| 580 |
+
(
|
| 581 |
+
thin_walled: false,
|
| 582 |
+
IOR: 1.586f,
|
| 583 |
+
roughness: 0.0f,
|
| 584 |
+
diffuse_tint: color(0.644480f, 0.036889f, 0.036889f),
|
| 585 |
+
units_absorption_thickness: unit_cm,
|
| 586 |
+
absorption_thickness: 20.0f,
|
| 587 |
+
transmissive_tint: color(0.921582f, 0.049707f, 0.049707f),
|
| 588 |
+
smudges: 0.1f,
|
| 589 |
+
smudge_scale: float2(1.0f),
|
| 590 |
+
texture_translate: float2(0.0f),
|
| 591 |
+
texture_rotate: 0.0f,
|
| 592 |
+
texture_scale: float2(1.0f),
|
| 593 |
+
round_corners: false,
|
| 594 |
+
radius: 1.5f,
|
| 595 |
+
across_materials: false,
|
| 596 |
+
uv_space_index: 0
|
| 597 |
+
);
|
| 598 |
+
|
| 599 |
+
|
| 600 |
+
export material Polycarbonate_Magenta(*)
|
| 601 |
+
[[
|
| 602 |
+
::anno::display_name("Polycarbonate Opaque - Magenta"),
|
| 603 |
+
::anno::author("NVIDIA vMaterials"),
|
| 604 |
+
::anno::contributor("Ruediger Raab"),
|
| 605 |
+
::anno::contributor("Maik Rohland"),
|
| 606 |
+
::anno::description(DESCRIPTION),
|
| 607 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "magenta", "saturated", "warm")),
|
| 608 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Magenta.png"),
|
| 609 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 610 |
+
]] = Polycarbonate_Opaque
|
| 611 |
+
(
|
| 612 |
+
thin_walled: false,
|
| 613 |
+
IOR: 1.586f,
|
| 614 |
+
roughness: 0.0f,
|
| 615 |
+
diffuse_tint: color(0.539479f, 0.051269f, 0.545724f),
|
| 616 |
+
units_absorption_thickness: unit_cm,
|
| 617 |
+
absorption_thickness: 20.0f,
|
| 618 |
+
transmissive_tint: color(0.921582f, 0.049707f, 0.144128f),
|
| 619 |
+
smudges: 0.1f,
|
| 620 |
+
smudge_scale: float2(1.0f),
|
| 621 |
+
texture_translate: float2(0.0f),
|
| 622 |
+
texture_rotate: 0.0f,
|
| 623 |
+
texture_scale: float2(1.0f),
|
| 624 |
+
round_corners: false,
|
| 625 |
+
radius: 1.5f,
|
| 626 |
+
across_materials: false,
|
| 627 |
+
uv_space_index: 0
|
| 628 |
+
);
|
| 629 |
+
|
| 630 |
+
|
| 631 |
+
export material Polycarbonate_Purple(*)
|
| 632 |
+
[[
|
| 633 |
+
::anno::display_name("Polycarbonate Opaque - Purple"),
|
| 634 |
+
::anno::author("NVIDIA vMaterials"),
|
| 635 |
+
::anno::contributor("Ruediger Raab"),
|
| 636 |
+
::anno::contributor("Maik Rohland"),
|
| 637 |
+
::anno::description(DESCRIPTION),
|
| 638 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "purple", "saturated")),
|
| 639 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Purple.png"),
|
| 640 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 641 |
+
]] = Polycarbonate_Opaque
|
| 642 |
+
(
|
| 643 |
+
thin_walled: false,
|
| 644 |
+
IOR: 1.586f,
|
| 645 |
+
roughness: 0.0f,
|
| 646 |
+
diffuse_tint: color(0.191202f, 0.022174f, 0.456411f),
|
| 647 |
+
units_absorption_thickness: unit_cm,
|
| 648 |
+
absorption_thickness: 20.0f,
|
| 649 |
+
transmissive_tint: color(0.412543f, 0.049707f, 0.921582f),
|
| 650 |
+
smudges: 0.1f,
|
| 651 |
+
smudge_scale: float2(1.0f),
|
| 652 |
+
texture_translate: float2(0.0f),
|
| 653 |
+
texture_rotate: 0.0f,
|
| 654 |
+
texture_scale: float2(1.0f),
|
| 655 |
+
round_corners: false,
|
| 656 |
+
radius: 1.5f,
|
| 657 |
+
across_materials: false,
|
| 658 |
+
uv_space_index: 0
|
| 659 |
+
);
|
| 660 |
+
|
| 661 |
+
|
| 662 |
+
export material Polycarbonate_Dark_Blue(*)
|
| 663 |
+
[[
|
| 664 |
+
::anno::display_name("Polycarbonate Opaque - Dark Blue"),
|
| 665 |
+
::anno::author("NVIDIA vMaterials"),
|
| 666 |
+
::anno::contributor("Ruediger Raab"),
|
| 667 |
+
::anno::contributor("Maik Rohland"),
|
| 668 |
+
::anno::description(DESCRIPTION),
|
| 669 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "blue", "saturated", "cool", "dark")),
|
| 670 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Dark_Blue.png"),
|
| 671 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 672 |
+
]] = Polycarbonate_Opaque
|
| 673 |
+
(
|
| 674 |
+
thin_walled: false,
|
| 675 |
+
IOR: 1.586f,
|
| 676 |
+
roughness: 0.0f,
|
| 677 |
+
diffuse_tint: color(0.031896f, 0.061246f, 0.304987f),
|
| 678 |
+
units_absorption_thickness: unit_cm,
|
| 679 |
+
absorption_thickness: 20.0f,
|
| 680 |
+
transmissive_tint: color(0.056128f, 0.135633f, 0.955973f),
|
| 681 |
+
smudges: 0.1f,
|
| 682 |
+
smudge_scale: float2(1.0f),
|
| 683 |
+
texture_translate: float2(0.0f),
|
| 684 |
+
texture_rotate: 0.0f,
|
| 685 |
+
texture_scale: float2(1.0f),
|
| 686 |
+
round_corners: false,
|
| 687 |
+
radius: 1.5f,
|
| 688 |
+
across_materials: false,
|
| 689 |
+
uv_space_index: 0
|
| 690 |
+
);
|
| 691 |
+
|
| 692 |
+
|
| 693 |
+
export material Polycarbonate_Blue(*)
|
| 694 |
+
[[
|
| 695 |
+
::anno::display_name("Polycarbonate Opaque - Blue"),
|
| 696 |
+
::anno::author("NVIDIA vMaterials"),
|
| 697 |
+
::anno::contributor("Ruediger Raab"),
|
| 698 |
+
::anno::contributor("Maik Rohland"),
|
| 699 |
+
::anno::description(DESCRIPTION),
|
| 700 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "blue", "saturated", "cool")),
|
| 701 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Blue.png"),
|
| 702 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 703 |
+
]] = Polycarbonate_Opaque
|
| 704 |
+
(
|
| 705 |
+
thin_walled: false,
|
| 706 |
+
IOR: 1.586f,
|
| 707 |
+
roughness: 0.0f,
|
| 708 |
+
diffuse_tint: color(0.038204f, 0.171441f, 0.838799f),
|
| 709 |
+
units_absorption_thickness: unit_cm,
|
| 710 |
+
absorption_thickness: 20.0f,
|
| 711 |
+
transmissive_tint: color(0.042311f, 0.194618f, 0.955973f),
|
| 712 |
+
smudges: 0.1f,
|
| 713 |
+
smudge_scale: float2(1.0f),
|
| 714 |
+
texture_translate: float2(0.0f),
|
| 715 |
+
texture_rotate: 0.0f,
|
| 716 |
+
texture_scale: float2(1.0f),
|
| 717 |
+
round_corners: false,
|
| 718 |
+
radius: 1.5f,
|
| 719 |
+
across_materials: false,
|
| 720 |
+
uv_space_index: 0
|
| 721 |
+
);
|
| 722 |
+
|
| 723 |
+
|
| 724 |
+
export material Polycarbonate_Sky_Blue(*)
|
| 725 |
+
[[
|
| 726 |
+
::anno::display_name("Polycarbonate Opaque - Sky Blue"),
|
| 727 |
+
::anno::author("NVIDIA vMaterials"),
|
| 728 |
+
::anno::contributor("Ruediger Raab"),
|
| 729 |
+
::anno::contributor("Maik Rohland"),
|
| 730 |
+
::anno::description(DESCRIPTION),
|
| 731 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "blue", "sky", "light", "cool")),
|
| 732 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Sky_Blue.png"),
|
| 733 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 734 |
+
]] = Polycarbonate_Opaque
|
| 735 |
+
(
|
| 736 |
+
thin_walled: false,
|
| 737 |
+
IOR: 1.586f,
|
| 738 |
+
roughness: 0.0f,
|
| 739 |
+
diffuse_tint: color(0.135633f, 0.356400f, 0.871367f),
|
| 740 |
+
units_absorption_thickness: unit_cm,
|
| 741 |
+
absorption_thickness: 20.0f,
|
| 742 |
+
transmissive_tint: color(0.070360f, 0.346704f, 0.964686f),
|
| 743 |
+
smudges: 0.1f,
|
| 744 |
+
smudge_scale: float2(1.0f),
|
| 745 |
+
texture_translate: float2(0.0f),
|
| 746 |
+
texture_rotate: 0.0f,
|
| 747 |
+
texture_scale: float2(1.0f),
|
| 748 |
+
round_corners: false,
|
| 749 |
+
radius: 1.5f,
|
| 750 |
+
across_materials: false,
|
| 751 |
+
uv_space_index: 0
|
| 752 |
+
);
|
| 753 |
+
|
| 754 |
+
|
| 755 |
+
export material Polycarbonate_Light_Blue(*)
|
| 756 |
+
[[
|
| 757 |
+
::anno::display_name("Polycarbonate Opaque - Light Blue"),
|
| 758 |
+
::anno::author("NVIDIA vMaterials"),
|
| 759 |
+
::anno::contributor("Ruediger Raab"),
|
| 760 |
+
::anno::contributor("Maik Rohland"),
|
| 761 |
+
::anno::description(DESCRIPTION),
|
| 762 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "blue", "light", "cool")),
|
| 763 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Sky_Blue.png"),
|
| 764 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 765 |
+
]] = Polycarbonate_Opaque
|
| 766 |
+
(
|
| 767 |
+
thin_walled: false,
|
| 768 |
+
IOR: 1.586f,
|
| 769 |
+
roughness: 0.0f,
|
| 770 |
+
diffuse_tint: color(0.258183f, 0.768151f, 0.822786f),
|
| 771 |
+
units_absorption_thickness: unit_cm,
|
| 772 |
+
absorption_thickness: 20.0f,
|
| 773 |
+
transmissive_tint: color(0.300544f, 0.896269f, 0.955973f),
|
| 774 |
+
smudges: 0.1f,
|
| 775 |
+
smudge_scale: float2(1.0f),
|
| 776 |
+
texture_translate: float2(0.0f),
|
| 777 |
+
texture_rotate: 0.0f,
|
| 778 |
+
texture_scale: float2(1.0f),
|
| 779 |
+
round_corners: false,
|
| 780 |
+
radius: 1.5f,
|
| 781 |
+
across_materials: false,
|
| 782 |
+
uv_space_index: 0
|
| 783 |
+
);
|
| 784 |
+
|
| 785 |
+
|
| 786 |
+
export material Polycarbonate_Teal(*)
|
| 787 |
+
[[
|
| 788 |
+
::anno::display_name("Polycarbonate Opaque - Teal"),
|
| 789 |
+
::anno::author("NVIDIA vMaterials"),
|
| 790 |
+
::anno::contributor("Ruediger Raab"),
|
| 791 |
+
::anno::contributor("Maik Rohland"),
|
| 792 |
+
::anno::description(DESCRIPTION),
|
| 793 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "teal", "saturated", "cool")),
|
| 794 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Teal.png"),
|
| 795 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 796 |
+
]] = Polycarbonate_Opaque
|
| 797 |
+
(
|
| 798 |
+
thin_walled: false,
|
| 799 |
+
IOR: 1.586f,
|
| 800 |
+
roughness: 0.0f,
|
| 801 |
+
diffuse_tint: color(0.040915f, 0.571125f, 0.323143f),
|
| 802 |
+
units_absorption_thickness: unit_cm,
|
| 803 |
+
absorption_thickness: 20.0f,
|
| 804 |
+
transmissive_tint: color(0.064803f, 0.955973f, 0.332452f),
|
| 805 |
+
smudges: 0.1f,
|
| 806 |
+
smudge_scale: float2(1.0f),
|
| 807 |
+
texture_translate: float2(0.0f),
|
| 808 |
+
texture_rotate: 0.0f,
|
| 809 |
+
texture_scale: float2(1.0f),
|
| 810 |
+
round_corners: false,
|
| 811 |
+
radius: 1.5f,
|
| 812 |
+
across_materials: false,
|
| 813 |
+
uv_space_index: 0
|
| 814 |
+
);
|
| 815 |
+
|
| 816 |
+
|
| 817 |
+
export material Polycarbonate_Dark_Green(*)
|
| 818 |
+
[[
|
| 819 |
+
::anno::display_name("Polycarbonate Opaque - Dark Green"),
|
| 820 |
+
::anno::author("NVIDIA vMaterials"),
|
| 821 |
+
::anno::contributor("Ruediger Raab"),
|
| 822 |
+
::anno::contributor("Maik Rohland"),
|
| 823 |
+
::anno::description(DESCRIPTION),
|
| 824 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "green", "saturated", "dark")),
|
| 825 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Dark_Green.png"),
|
| 826 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 827 |
+
]] = Polycarbonate_Opaque
|
| 828 |
+
(
|
| 829 |
+
thin_walled: false,
|
| 830 |
+
IOR: 1.586f,
|
| 831 |
+
roughness: 0.0f,
|
| 832 |
+
diffuse_tint: color(0.026241f, 0.141263f, 0.026241f),
|
| 833 |
+
units_absorption_thickness: unit_cm,
|
| 834 |
+
absorption_thickness: 20.0f,
|
| 835 |
+
transmissive_tint: color(0.086500f, 0.854993f, 0.086500f),
|
| 836 |
+
smudges: 0.1f,
|
| 837 |
+
smudge_scale: float2(1.0f),
|
| 838 |
+
texture_translate: float2(0.0f),
|
| 839 |
+
texture_rotate: 0.0f,
|
| 840 |
+
texture_scale: float2(1.0f),
|
| 841 |
+
round_corners: false,
|
| 842 |
+
radius: 1.5f,
|
| 843 |
+
across_materials: false,
|
| 844 |
+
uv_space_index: 0
|
| 845 |
+
);
|
| 846 |
+
|
| 847 |
+
|
| 848 |
+
export material Polycarbonate_Green(*)
|
| 849 |
+
[[
|
| 850 |
+
::anno::display_name("Polycarbonate Opaque - Green"),
|
| 851 |
+
::anno::author("NVIDIA vMaterials"),
|
| 852 |
+
::anno::contributor("Ruediger Raab"),
|
| 853 |
+
::anno::contributor("Maik Rohland"),
|
| 854 |
+
::anno::description(DESCRIPTION),
|
| 855 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "green", "saturated")),
|
| 856 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Green.png"),
|
| 857 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 858 |
+
]] = Polycarbonate_Opaque
|
| 859 |
+
(
|
| 860 |
+
thin_walled: false,
|
| 861 |
+
IOR: 1.586f,
|
| 862 |
+
roughness: 0.0f,
|
| 863 |
+
diffuse_tint: color(0.023153f, 0.346704f, 0.023153f),
|
| 864 |
+
units_absorption_thickness: unit_cm,
|
| 865 |
+
absorption_thickness: 20.0f,
|
| 866 |
+
transmissive_tint: color(0.054480f, 0.938686f, 0.054480f),
|
| 867 |
+
smudges: 0.1f,
|
| 868 |
+
smudge_scale: float2(1.0f),
|
| 869 |
+
texture_translate: float2(0.0f),
|
| 870 |
+
texture_rotate: 0.0f,
|
| 871 |
+
texture_scale: float2(1.0f),
|
| 872 |
+
round_corners: false,
|
| 873 |
+
radius: 1.5f,
|
| 874 |
+
across_materials: false,
|
| 875 |
+
uv_space_index: 0
|
| 876 |
+
);
|
| 877 |
+
|
| 878 |
+
|
| 879 |
+
export material Polycarbonate_Light_Green(*)
|
| 880 |
+
[[
|
| 881 |
+
::anno::display_name("Polycarbonate Opaque - Light Green"),
|
| 882 |
+
::anno::author("NVIDIA vMaterials"),
|
| 883 |
+
::anno::contributor("Ruediger Raab"),
|
| 884 |
+
::anno::contributor("Maik Rohland"),
|
| 885 |
+
::anno::description(DESCRIPTION),
|
| 886 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "green", "saturated", "light")),
|
| 887 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Light_Green.png"),
|
| 888 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 889 |
+
]] = Polycarbonate_Opaque
|
| 890 |
+
(
|
| 891 |
+
thin_walled: false,
|
| 892 |
+
IOR: 1.586f,
|
| 893 |
+
roughness: 0.0f,
|
| 894 |
+
diffuse_tint: color(0.034340f, 0.679542f, 0.031896f),
|
| 895 |
+
units_absorption_thickness: unit_cm,
|
| 896 |
+
absorption_thickness: 20.0f,
|
| 897 |
+
transmissive_tint: color(0.054480f, 0.930111f, 0.054480f),
|
| 898 |
+
smudges: 0.1f,
|
| 899 |
+
smudge_scale: float2(1.0f),
|
| 900 |
+
texture_translate: float2(0.0f),
|
| 901 |
+
texture_rotate: 0.0f,
|
| 902 |
+
texture_scale: float2(1.0f),
|
| 903 |
+
round_corners: false,
|
| 904 |
+
radius: 1.5f,
|
| 905 |
+
across_materials: false,
|
| 906 |
+
uv_space_index: 0
|
| 907 |
+
);
|
| 908 |
+
|
| 909 |
+
|
| 910 |
+
export material Polycarbonate_Lime_Green(*)
|
| 911 |
+
[[
|
| 912 |
+
::anno::display_name("Polycarbonate Opaque - Lime Green"),
|
| 913 |
+
::anno::author("NVIDIA vMaterials"),
|
| 914 |
+
::anno::contributor("Ruediger Raab"),
|
| 915 |
+
::anno::contributor("Maik Rohland"),
|
| 916 |
+
::anno::description(DESCRIPTION),
|
| 917 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "green", "lime", "saturated", "light")),
|
| 918 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Lime_Green.png"),
|
| 919 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 920 |
+
]] = Polycarbonate_Opaque
|
| 921 |
+
(
|
| 922 |
+
thin_walled: false,
|
| 923 |
+
IOR: 1.586f,
|
| 924 |
+
roughness: 0.0f,
|
| 925 |
+
diffuse_tint: color(0.208637f, 0.597202f, 0.031896f),
|
| 926 |
+
units_absorption_thickness: unit_cm,
|
| 927 |
+
absorption_thickness: 20.0f,
|
| 928 |
+
transmissive_tint: color(0.300544f, 0.879622f, 0.043735f),
|
| 929 |
+
smudges: 0.1f,
|
| 930 |
+
smudge_scale: float2(1.0f),
|
| 931 |
+
texture_translate: float2(0.0f),
|
| 932 |
+
texture_rotate: 0.0f,
|
| 933 |
+
texture_scale: float2(1.0f),
|
| 934 |
+
round_corners: false,
|
| 935 |
+
radius: 1.5f,
|
| 936 |
+
across_materials: false,
|
| 937 |
+
uv_space_index: 0
|
| 938 |
+
);
|
| 939 |
+
|
| 940 |
+
|
| 941 |
+
export material Polycarbonate_Black(*)
|
| 942 |
+
[[
|
| 943 |
+
::anno::display_name("Polycarbonate Opaque - Black"),
|
| 944 |
+
::anno::author("NVIDIA vMaterials"),
|
| 945 |
+
::anno::contributor("Ruediger Raab"),
|
| 946 |
+
::anno::contributor("Maik Rohland"),
|
| 947 |
+
::anno::description(DESCRIPTION),
|
| 948 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "black", "dark", "neutral")),
|
| 949 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Black.png"),
|
| 950 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 951 |
+
]] = Polycarbonate_Opaque
|
| 952 |
+
(
|
| 953 |
+
thin_walled: false,
|
| 954 |
+
IOR: 1.586f,
|
| 955 |
+
roughness: 0.0f,
|
| 956 |
+
diffuse_tint: color(0.038204f, 0.038204f, 0.038204f),
|
| 957 |
+
units_absorption_thickness: unit_cm,
|
| 958 |
+
absorption_thickness: 20.0f,
|
| 959 |
+
transmissive_tint: color(0.038204f, 0.038204f, 0.038204f),
|
| 960 |
+
smudges: 0.1f,
|
| 961 |
+
smudge_scale: float2(1.0f),
|
| 962 |
+
texture_translate: float2(0.0f),
|
| 963 |
+
texture_rotate: 0.0f,
|
| 964 |
+
texture_scale: float2(1.0f),
|
| 965 |
+
round_corners: false,
|
| 966 |
+
radius: 1.5f,
|
| 967 |
+
across_materials: false,
|
| 968 |
+
uv_space_index: 0
|
| 969 |
+
);
|
| 970 |
+
|
| 971 |
+
|
| 972 |
+
export material Polycarbonate_Dark_Gray(*)
|
| 973 |
+
[[
|
| 974 |
+
::anno::display_name("Polycarbonate Opaque - Dark Gray"),
|
| 975 |
+
::anno::author("NVIDIA vMaterials"),
|
| 976 |
+
::anno::contributor("Ruediger Raab"),
|
| 977 |
+
::anno::contributor("Maik Rohland"),
|
| 978 |
+
::anno::description(DESCRIPTION),
|
| 979 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "gray", "dark", "neutral")),
|
| 980 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Dark_Gray.png"),
|
| 981 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 982 |
+
]] = Polycarbonate_Opaque
|
| 983 |
+
(
|
| 984 |
+
thin_walled: false,
|
| 985 |
+
IOR: 1.586f,
|
| 986 |
+
roughness: 0.0f,
|
| 987 |
+
diffuse_tint: color(0.127438f, 0.127438f, 0.127438f),
|
| 988 |
+
units_absorption_thickness: unit_cm,
|
| 989 |
+
absorption_thickness: 20.0f,
|
| 990 |
+
transmissive_tint: color(0.822786f, 0.822786f, 0.822786f),
|
| 991 |
+
smudges: 0.1f,
|
| 992 |
+
smudge_scale: float2(1.0f),
|
| 993 |
+
texture_translate: float2(0.0f),
|
| 994 |
+
texture_rotate: 0.0f,
|
| 995 |
+
texture_scale: float2(1.0f),
|
| 996 |
+
round_corners: false,
|
| 997 |
+
radius: 1.5f,
|
| 998 |
+
across_materials: false,
|
| 999 |
+
uv_space_index: 0
|
| 1000 |
+
);
|
| 1001 |
+
|
| 1002 |
+
|
| 1003 |
+
export material Polycarbonate_Light_Gray(*)
|
| 1004 |
+
[[
|
| 1005 |
+
::anno::display_name("Polycarbonate Opaque - Light Gray"),
|
| 1006 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1007 |
+
::anno::contributor("Ruediger Raab"),
|
| 1008 |
+
::anno::contributor("Maik Rohland"),
|
| 1009 |
+
::anno::description(DESCRIPTION),
|
| 1010 |
+
::anno::key_words(string[]("plastic", "polycarbonate", "PC", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "gray", "light", "neutral")),
|
| 1011 |
+
::anno::thumbnail("./.thumbs/Polycarbonate_Opaque.Polycarbonate_Light_Gray.png"),
|
| 1012 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 1013 |
+
]] = Polycarbonate_Opaque
|
| 1014 |
+
(
|
| 1015 |
+
thin_walled: false,
|
| 1016 |
+
IOR: 1.586f,
|
| 1017 |
+
roughness: 0.0f,
|
| 1018 |
+
diffuse_tint: color(0.456411f, 0.456411f, 0.456411f),
|
| 1019 |
+
units_absorption_thickness: unit_cm,
|
| 1020 |
+
absorption_thickness: 20.0f,
|
| 1021 |
+
transmissive_tint: color(0.991102f, 0.991102f, 0.991102f),
|
| 1022 |
+
smudges: 0.1f,
|
| 1023 |
+
smudge_scale: float2(1.0f),
|
| 1024 |
+
texture_translate: float2(0.0f),
|
| 1025 |
+
texture_rotate: 0.0f,
|
| 1026 |
+
texture_scale: float2(1.0f),
|
| 1027 |
+
round_corners: false,
|
| 1028 |
+
radius: 1.5f,
|
| 1029 |
+
across_materials: false,
|
| 1030 |
+
uv_space_index: 0
|
| 1031 |
+
);
|
EXLS1/simready_usd/materials/Polypropylene_Opaque.mdl
ADDED
|
@@ -0,0 +1,1049 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/******************************************************************************
|
| 2 |
+
* Copyright 2023 NVIDIA Corporation. All rights reserved. *
|
| 3 |
+
******************************************************************************
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge,
|
| 6 |
+
to any person obtaining a copy of the sample definition code that uses our
|
| 7 |
+
Material Definition Language (the "MDL Materials"), to reproduce and distribute
|
| 8 |
+
the MDL Materials, including without limitation the rights to use, copy, merge,
|
| 9 |
+
publish, distribute, and sell modified and unmodified copies of the MDL
|
| 10 |
+
Materials, and to permit persons to whom the MDL Materials is furnished to do
|
| 11 |
+
so, in all cases solely for use with NVIDIA’s Material Definition Language,
|
| 12 |
+
subject to the following further conditions:
|
| 13 |
+
|
| 14 |
+
1. The above copyright notices, this list of conditions, and the disclaimer
|
| 15 |
+
that follows shall be retained in all copies of one or more of the MDL
|
| 16 |
+
Materials, including in any software with which the MDL Materials are bundled,
|
| 17 |
+
redistributed, and/or sold, and included either as stand-alone text files,
|
| 18 |
+
human-readable headers or in the appropriate machine-readable metadata fields
|
| 19 |
+
within text or binary files as long as those fields can be easily viewed by the
|
| 20 |
+
user, as applicable.
|
| 21 |
+
2. The name of NVIDIA shall not be used to promote, endorse or advertise any
|
| 22 |
+
Modified Version without specific prior written permission, except a) to comply
|
| 23 |
+
with the notice requirements otherwise contained herein; or b) to acknowledge
|
| 24 |
+
the contribution(s) of NVIDIA.
|
| 25 |
+
|
| 26 |
+
THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
| 27 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
|
| 28 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
|
| 29 |
+
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR
|
| 30 |
+
ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL,
|
| 31 |
+
INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF
|
| 32 |
+
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE
|
| 33 |
+
THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.
|
| 34 |
+
*/
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
mdl 1.6;
|
| 38 |
+
|
| 39 |
+
import ::anno::*;
|
| 40 |
+
import ::base::*;
|
| 41 |
+
import ::df::*;
|
| 42 |
+
import ::math::*;
|
| 43 |
+
import ::state::*;
|
| 44 |
+
import ::tex::*;
|
| 45 |
+
import ::nvidia::core_definitions::blend_colors;
|
| 46 |
+
import ::nvidia::core_definitions::dimension;
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
const string COPYRIGHT =
|
| 50 |
+
" Copyright 2023 NVIDIA Corporation. All rights reserved.\n"
|
| 51 |
+
" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n"
|
| 52 |
+
" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n"
|
| 53 |
+
" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n"
|
| 54 |
+
" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n"
|
| 55 |
+
" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n"
|
| 56 |
+
" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n"
|
| 57 |
+
" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n"
|
| 58 |
+
" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n"
|
| 59 |
+
" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n"
|
| 60 |
+
" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n";
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
export enum unit_scale
|
| 64 |
+
[[
|
| 65 |
+
::anno::hidden()
|
| 66 |
+
]]
|
| 67 |
+
{
|
| 68 |
+
unit_mm = 1,
|
| 69 |
+
unit_cm = 2,
|
| 70 |
+
unit_m = 3
|
| 71 |
+
};
|
| 72 |
+
|
| 73 |
+
struct volume_info
|
| 74 |
+
[[
|
| 75 |
+
::anno::hidden()
|
| 76 |
+
]]
|
| 77 |
+
{
|
| 78 |
+
color absorption_coefficient;
|
| 79 |
+
color scattering_coefficient;
|
| 80 |
+
};
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
// simplified volume coefficients
|
| 84 |
+
// This function takes a transmittance value and and albedo and translates it into meaningful
|
| 85 |
+
// scattering and volume coefficients that are userfriendly
|
| 86 |
+
//
|
| 87 |
+
volume_info volume_transmittance_albedo(
|
| 88 |
+
uniform float density_scale = 1.0,
|
| 89 |
+
uniform color transmittance = color(0.5f), // transmittance color after unit distance
|
| 90 |
+
uniform color albedo = color(1.0f)
|
| 91 |
+
)
|
| 92 |
+
{
|
| 93 |
+
color sigma_t = -::math::log(::math::saturate(transmittance)) * density_scale;
|
| 94 |
+
color sigma_s = sigma_t * ::math::saturate(albedo);
|
| 95 |
+
return volume_info(
|
| 96 |
+
scattering_coefficient: sigma_s,
|
| 97 |
+
absorption_coefficient: sigma_t - sigma_s);
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
// This function calculates the apropriate scattering and volume coefficients
|
| 101 |
+
// for a material of a given thickness.
|
| 102 |
+
// The user specifies the thickness of the material, e.g. 3mm and the amount
|
| 103 |
+
// of light passing through. The rest is automatically calculated for the material
|
| 104 |
+
// and the material_volume is returned.
|
| 105 |
+
volume_info custom_volume_transmittance(
|
| 106 |
+
uniform unit_scale unit_scale_select = unit_mm,
|
| 107 |
+
uniform float absorption_thickness = 3.0f,
|
| 108 |
+
uniform color transmittance = color(0.5f),
|
| 109 |
+
uniform color albedo = color(0.0f)
|
| 110 |
+
)
|
| 111 |
+
{
|
| 112 |
+
absorption_thickness = (absorption_thickness <= 0.0f) ? 0.00001 : absorption_thickness;
|
| 113 |
+
float scalefactor;
|
| 114 |
+
switch(unit_scale_select){
|
| 115 |
+
case unit_mm: scalefactor = 0.001f; break;
|
| 116 |
+
case unit_cm: scalefactor = 0.01f; break;
|
| 117 |
+
case unit_m: scalefactor = 1.0f; break;
|
| 118 |
+
default: scalefactor = 1.0f;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
volume_info vol_coefficients = volume_transmittance_albedo(
|
| 123 |
+
density_scale: 1.0f/(absorption_thickness * scalefactor),
|
| 124 |
+
transmittance: transmittance,
|
| 125 |
+
albedo: albedo
|
| 126 |
+
);
|
| 127 |
+
|
| 128 |
+
return vol_coefficients;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
::base::texture_coordinate_info transform_coordinate_2(
|
| 133 |
+
float4x4 transform
|
| 134 |
+
[[ ::anno::description("A transformation to be applied to the source coordinates. rotation_translation_scale() is a suggested means to compute the transformation matrix") ]],
|
| 135 |
+
::base::texture_coordinate_info coordinate = ::base::texture_coordinate_info()
|
| 136 |
+
[[ ::anno::description("Coordinate, typically sourced from coordinate_source or coordinate_projection") ]]
|
| 137 |
+
) [[
|
| 138 |
+
::anno::description("Transform a texture coordinate by a matrix") ,
|
| 139 |
+
::anno::noinline()
|
| 140 |
+
]]
|
| 141 |
+
{
|
| 142 |
+
// Version 2
|
| 143 |
+
float4 r_position = transform * float4(coordinate.position.x,coordinate.position.y,coordinate.position.z,1);
|
| 144 |
+
//Try aproximating it for the case that the rotation is only aroud z and assuming the texture layout is nice and z is ~constant.
|
| 145 |
+
//just pretend there is no other rotation happening
|
| 146 |
+
//get rid of scaling and translation. Then extract fields where sin and cos would be in a simple 2d transform around z.
|
| 147 |
+
float4 u = transform[0];
|
| 148 |
+
float3 ru = ::math::normalize(float3(u.x,u.y,u.z));
|
| 149 |
+
float cos = ru.x;
|
| 150 |
+
float sin = -ru.y;
|
| 151 |
+
//TODO: at least also handle sign of z?
|
| 152 |
+
//TODO: handle tangent becoming 0
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
return ::base::texture_coordinate_info(
|
| 156 |
+
float3(r_position.x,r_position.y,r_position.z),
|
| 157 |
+
::math::normalize(cos * coordinate.tangent_u - sin * coordinate.tangent_v),
|
| 158 |
+
::math::normalize(cos * coordinate.tangent_v + sin * coordinate.tangent_u));
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
// Takes the standard input that every material has. It combines a couple of
|
| 163 |
+
// functions in one convenience function.
|
| 164 |
+
::base::texture_coordinate_info vmat_transform(
|
| 165 |
+
float2 translation = float2(0.0, 0.0),
|
| 166 |
+
float rotation = 0.0, // rotation in degrees
|
| 167 |
+
float2 scaling = float2(1.0, 1.0),
|
| 168 |
+
uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw,
|
| 169 |
+
uniform int uv_space = 0
|
| 170 |
+
)
|
| 171 |
+
{
|
| 172 |
+
float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f;
|
| 173 |
+
float4x4 scale =
|
| 174 |
+
float4x4(1.0 /scaling.x, 0. , 0. , 0.,
|
| 175 |
+
0. , 1.0 /scaling.y , 0. , 0.,
|
| 176 |
+
0. , 0. , 1.0, 0.,
|
| 177 |
+
translation.x , translation.y , 0.0, 1.);
|
| 178 |
+
|
| 179 |
+
float s = ::math::sin(rotation_rad);
|
| 180 |
+
float c = ::math::cos(rotation_rad);
|
| 181 |
+
float4x4 rotate =
|
| 182 |
+
float4x4( c , -s , 0.0 , 0.0,
|
| 183 |
+
s , c , 0.0 , 0.0,
|
| 184 |
+
0.0, 0.0 , 1.0 , 0.0,
|
| 185 |
+
0. , 0.0 , 0.0 , 1.);
|
| 186 |
+
|
| 187 |
+
return transform_coordinate_2(scale*rotate, ::base::coordinate_source(system, uv_space));
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
float2x2 invert_2x2(float2x2 M)
|
| 193 |
+
{
|
| 194 |
+
float det = M[0][0]*M[1][1] - M[0][1]*M[1][0];
|
| 195 |
+
//https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/
|
| 196 |
+
return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]);
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
// https://nullprogram.com/blog/2018/07/31/
|
| 200 |
+
//bias: 0.17353355999581582 ( very probably the best of its kind )
|
| 201 |
+
// NOTE: To turn this back to a float, one must divide the value by 4294967296.f
|
| 202 |
+
// which corresponds to 0xffffffff, however MDL seems to turn this into -1.
|
| 203 |
+
int lowbias32(int x)
|
| 204 |
+
{
|
| 205 |
+
x ^= x >>> 16;
|
| 206 |
+
x *= 0x7feb352d;
|
| 207 |
+
x ^= x >>> 15;
|
| 208 |
+
x *= 0x846ca68b;
|
| 209 |
+
x ^= x >>> 16;
|
| 210 |
+
return x;
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
float uint2float(int x)
|
| 214 |
+
{
|
| 215 |
+
return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0);
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
|
| 219 |
+
float2 rnd22(int2 p) {
|
| 220 |
+
float2 ret_val = float2(
|
| 221 |
+
uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f,
|
| 222 |
+
uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f
|
| 223 |
+
);
|
| 224 |
+
return ret_val;
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
float3 srgb2rgb(float3 val)
|
| 228 |
+
{
|
| 229 |
+
return ::math::pow(::math::max(val, float3(0.0f)), 2.2);
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
float3 nonrepeat_lookup(
|
| 233 |
+
uniform texture_2d texture = texture_2d(),
|
| 234 |
+
::base::texture_coordinate_info uvw = ::base::coordinate_source(),
|
| 235 |
+
float texture_scale = 1.0,
|
| 236 |
+
float3 average_color = float3(0.5),
|
| 237 |
+
float patch_size = 8.0
|
| 238 |
+
)
|
| 239 |
+
{
|
| 240 |
+
float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale;
|
| 241 |
+
float Z = patch_size; // patch scale inside example texture
|
| 242 |
+
|
| 243 |
+
float3 O = float3(0.f);
|
| 244 |
+
float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f);
|
| 245 |
+
float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space
|
| 246 |
+
|
| 247 |
+
float2 U = uv_in;
|
| 248 |
+
float2 V = M * uv_in; //pre-tilted hexa coordinates
|
| 249 |
+
int2 I = int2(::math::floor(V)); // hexa-tile id
|
| 250 |
+
|
| 251 |
+
// The mean color needs to be determined in Photoshop
|
| 252 |
+
float3 m = average_color;
|
| 253 |
+
|
| 254 |
+
float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W;
|
| 255 |
+
F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates
|
| 256 |
+
|
| 257 |
+
if( F[2] > 0.f )
|
| 258 |
+
|
| 259 |
+
O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m)
|
| 260 |
+
+ (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m)
|
| 261 |
+
+ (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m);
|
| 262 |
+
else
|
| 263 |
+
O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m)
|
| 264 |
+
+ (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m)
|
| 265 |
+
+ (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m);
|
| 266 |
+
O = m + O/::math::length(W);
|
| 267 |
+
O = ::math::clamp( (O), 0.0, 1.0);
|
| 268 |
+
|
| 269 |
+
return float3(O);
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
// NOTE: tex_resource must be in linear space (ensure that ::tex::gamma_linear is used)
|
| 274 |
+
color endless_texture(
|
| 275 |
+
uniform texture_2d texture = texture_2d(),
|
| 276 |
+
::base::texture_coordinate_info uvw = ::base::coordinate_source(),
|
| 277 |
+
float texture_scale = 10.0,
|
| 278 |
+
float3 average_color = float3(0.5, 0.5, 1.0),
|
| 279 |
+
float patch_size = 8.0,
|
| 280 |
+
bool gamma_correct_lookup = true
|
| 281 |
+
)
|
| 282 |
+
{
|
| 283 |
+
return gamma_correct_lookup ? color(srgb2rgb(
|
| 284 |
+
nonrepeat_lookup (
|
| 285 |
+
texture: texture,
|
| 286 |
+
uvw: uvw,
|
| 287 |
+
texture_scale: texture_scale,
|
| 288 |
+
average_color: average_color,
|
| 289 |
+
patch_size: patch_size
|
| 290 |
+
))
|
| 291 |
+
) : color(nonrepeat_lookup (
|
| 292 |
+
texture: texture,
|
| 293 |
+
uvw: uvw,
|
| 294 |
+
texture_scale: texture_scale,
|
| 295 |
+
average_color: average_color,
|
| 296 |
+
patch_size: patch_size
|
| 297 |
+
));
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
|
| 301 |
+
export material Polypropylene_Opaque(
|
| 302 |
+
|
| 303 |
+
// Appearance
|
| 304 |
+
uniform bool thin_walled = false [[
|
| 305 |
+
::anno::description("Makes t he material thin-walled. This changes the behavior of the material in a way that light attenuation is not calculated volumetrically as light travels through the geometry but at the light surface level. Thin walled geometry mustbe modeled as a single sheet without any volume."),
|
| 306 |
+
::anno::display_name("Thin Walled"),
|
| 307 |
+
::anno::in_group("Appearance"),
|
| 308 |
+
::anno::ui_order(0)
|
| 309 |
+
]],
|
| 310 |
+
float IOR = 1.49f [[
|
| 311 |
+
::anno::description("Sets the Index of refraction. For PP the ior is typically 1.49."),
|
| 312 |
+
::anno::display_name("IOR"),
|
| 313 |
+
::anno::in_group("Appearance"),
|
| 314 |
+
::anno::hard_range(1.1f, 3.0f),
|
| 315 |
+
::anno::ui_order(1)
|
| 316 |
+
]],
|
| 317 |
+
float roughness = 0.f [[
|
| 318 |
+
::anno::description("Hight values lead to a blurrier reflection."),
|
| 319 |
+
::anno::display_name("Roughness"),
|
| 320 |
+
::anno::in_group("Appearance"),
|
| 321 |
+
::anno::hard_range(0.f, 1.f),
|
| 322 |
+
::anno::ui_order(2)
|
| 323 |
+
]],
|
| 324 |
+
color diffuse_tint = color(0.752942f) [[
|
| 325 |
+
::anno::description("Adjusts the diffuse color of the surface."),
|
| 326 |
+
::anno::display_name("Diffuse Tint"),
|
| 327 |
+
::anno::in_group("Appearance"),
|
| 328 |
+
::anno::ui_order(3)
|
| 329 |
+
]],
|
| 330 |
+
uniform unit_scale units_absorption_thickness = unit_cm [[
|
| 331 |
+
::anno::description("Chooses the units that are used for setting the absorption thickness. Can be meters, centimeters or millimeters."),
|
| 332 |
+
::anno::display_name("Units Absorption Thickness "),
|
| 333 |
+
::anno::in_group("Appearance"),
|
| 334 |
+
::anno::ui_order(4)
|
| 335 |
+
]],
|
| 336 |
+
uniform float absorption_thickness = 20.f [[
|
| 337 |
+
::anno::description("The thickness for which the transmittance (color) is set. Example: If thickness is set to 3mm and transmittance to 0.8, then 80% of the light will pass through a 3mm thick material."),
|
| 338 |
+
::anno::display_name("Absorption Thickness"),
|
| 339 |
+
::anno::in_group("Appearance"),
|
| 340 |
+
::anno::ui_order(5)
|
| 341 |
+
]],
|
| 342 |
+
uniform color transmissive_tint = color(1.000000f) [[
|
| 343 |
+
::anno::description("Adjusts the transmissive color of the material. The color is influenced by the \"Diffuse Tint\" color parameter."),
|
| 344 |
+
::anno::display_name("Transmissive Tint"),
|
| 345 |
+
::anno::in_group("Appearance"),
|
| 346 |
+
::anno::ui_order(6)
|
| 347 |
+
]],
|
| 348 |
+
|
| 349 |
+
// Smudges
|
| 350 |
+
float smudges = 0.10f [[
|
| 351 |
+
::anno::description("Determines the amount of smudges that appears on the surface of the material."),
|
| 352 |
+
::anno::display_name("Smudges"),
|
| 353 |
+
::anno::in_group("Appearance", "Smudges"),
|
| 354 |
+
::anno::hard_range(0.f, 1.f),
|
| 355 |
+
::anno::ui_order(7)
|
| 356 |
+
]],
|
| 357 |
+
float2 smudge_scale = float2(1.f) [[
|
| 358 |
+
::anno::description("Larger numbers increase the size."),
|
| 359 |
+
::anno::display_name("Smudge Scale"),
|
| 360 |
+
::anno::in_group("Appearance", "Smudges"),
|
| 361 |
+
::anno::soft_range(float2(0.f), float2(2.f)),
|
| 362 |
+
::anno::ui_order(8)
|
| 363 |
+
]],
|
| 364 |
+
|
| 365 |
+
// Transform
|
| 366 |
+
float2 texture_translate = float2(0.f) [[
|
| 367 |
+
::anno::description("Controls the position of the texture."),
|
| 368 |
+
::anno::display_name("Texture Translate"),
|
| 369 |
+
::anno::in_group("Transform"),
|
| 370 |
+
::anno::ui_order(9)
|
| 371 |
+
]],
|
| 372 |
+
float texture_rotate = 0.f [[
|
| 373 |
+
::anno::description("Rotates angle of the texture in degrees."),
|
| 374 |
+
::anno::display_name("Texture Rotate"),
|
| 375 |
+
::anno::in_group("Transform"),
|
| 376 |
+
::anno::soft_range(0.f, 360.f),
|
| 377 |
+
::anno::ui_order(10)
|
| 378 |
+
]],
|
| 379 |
+
float2 texture_scale = float2(1.f) [[
|
| 380 |
+
::anno::description("Larger numbers increase the size."),
|
| 381 |
+
::anno::display_name("Texture Scale"),
|
| 382 |
+
::nvidia::core_definitions::dimension(float2(0.45f, .45f)),
|
| 383 |
+
::anno::in_group("Transform"),
|
| 384 |
+
::anno::soft_range(float2(0.f), float2(2.f)),
|
| 385 |
+
::anno::ui_order(11)
|
| 386 |
+
]],
|
| 387 |
+
|
| 388 |
+
|
| 389 |
+
// Round Corners
|
| 390 |
+
uniform bool round_corners = true [[
|
| 391 |
+
::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."),
|
| 392 |
+
::anno::display_name("Round Corners"),
|
| 393 |
+
::anno::in_group("Round Corners"),
|
| 394 |
+
::anno::ui_order(12)
|
| 395 |
+
]],
|
| 396 |
+
uniform float radius = 0.5f [[
|
| 397 |
+
::anno::description("Radius of the rounded corners."),
|
| 398 |
+
::anno::display_name("Radius mm"),
|
| 399 |
+
::anno::in_group("Round Corners"),
|
| 400 |
+
::anno::soft_range(0.f, 10.f),
|
| 401 |
+
::anno::ui_order(13)
|
| 402 |
+
]],
|
| 403 |
+
uniform bool across_materials = false [[
|
| 404 |
+
::anno::description("Applies the round corner effect across different materials when enabled."),
|
| 405 |
+
::anno::display_name("Across Materials"),
|
| 406 |
+
::anno::in_group("Round Corners"),
|
| 407 |
+
::anno::ui_order(14)
|
| 408 |
+
]],
|
| 409 |
+
|
| 410 |
+
// Advanced
|
| 411 |
+
uniform int uv_space_index = 0 [[
|
| 412 |
+
::anno::description("Uses the selected UV space index."),
|
| 413 |
+
::anno::display_name("UV Space Index"),
|
| 414 |
+
::anno::in_group("Advanced"),
|
| 415 |
+
::anno::soft_range(0, 4),
|
| 416 |
+
::anno::ui_order(15)
|
| 417 |
+
]],
|
| 418 |
+
float3 normal = ::state::normal() [[
|
| 419 |
+
::anno::description("Override this input to provide a custom normal for the material."),
|
| 420 |
+
::anno::display_name("Normal"),
|
| 421 |
+
::anno::in_group("Advanced"),
|
| 422 |
+
::anno::ui_order(16)
|
| 423 |
+
]])
|
| 424 |
+
[[
|
| 425 |
+
::anno::description("A polypropylene plastic material."),
|
| 426 |
+
::anno::display_name("Polypropylene Opaque - White"),
|
| 427 |
+
::anno::author("NVIDIA vMaterials"),
|
| 428 |
+
::anno::contributor("Ruediger Raab"),
|
| 429 |
+
::anno::contributor("Maik Rohland"),
|
| 430 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 431 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth")),
|
| 432 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Opaque.png"),
|
| 433 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 434 |
+
]]
|
| 435 |
+
=
|
| 436 |
+
let {
|
| 437 |
+
bool tmp0 = thin_walled;
|
| 438 |
+
material_surface tmp1(::df::fresnel_layer(IOR, 1.f, ::df::microfacet_ggx_smith_bsdf((::math::pow(::math::max(float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[0] * smudges, float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[1] * smudges), ::math::lerp(2.5f, 0.5f, ::math::pow(smudges, 0.25f))) + roughness * 0.5f) * (::math::pow(::math::max(float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[0] * smudges, float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[1] * smudges), ::math::lerp(2.5f, 0.5f, ::math::pow(smudges, 0.25f))) + roughness * 0.5f), (::math::pow(::math::max(float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[0] * smudges, float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[1] * smudges), ::math::lerp(2.5f, 0.5f, ::math::pow(smudges, 0.25f))) + roughness * 0.5f) * (::math::pow(::math::max(float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[0] * smudges, float3(endless_texture(texture_2d("./textures/plastic_smudges.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale * smudge_scale, ::base::texture_coordinate_uvw, uv_space_index), 4.f, float3(0.059f, 0.051f, 0.125f), 4.f, false))[1] * smudges), ::math::lerp(2.5f, 0.5f, ::math::pow(smudges, 0.25f))) + roughness * 0.5f), color(1.f, 1.f, 1.f), color(0.f, 0.f, 0.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(0.508f, ::df::diffuse_reflection_bsdf(diffuse_tint, 0.f), ::df::weighted_layer(1.f, ::df::diffuse_transmission_bsdf(color(0.196521997f, 1.f, 0.187316999f)), bsdf(), normal), normal), normal), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance));
|
| 439 |
+
material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance));
|
| 440 |
+
color tmp3 = color(1.f, 1.f, 1.f);
|
| 441 |
+
material_volume tmp4 = thin_walled ? material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)) : material_volume(vdf(), custom_volume_transmittance(units_absorption_thickness, absorption_thickness, color(0.214f, 0.214f, 0.214f), transmissive_tint).absorption_coefficient, custom_volume_transmittance(units_absorption_thickness, absorption_thickness, color(0.214f, 0.214f, 0.214f), transmissive_tint).scattering_coefficient);
|
| 442 |
+
material_geometry tmp5(float3(0.f), 1.f, round_corners ? ::state::rounded_corner_normal(radius * 0.001f, across_materials, 1.f) : ::state::normal());
|
| 443 |
+
hair_bsdf tmp6 = hair_bsdf();
|
| 444 |
+
} in
|
| 445 |
+
material(
|
| 446 |
+
thin_walled: tmp0,
|
| 447 |
+
surface: tmp1,
|
| 448 |
+
backface: tmp2,
|
| 449 |
+
ior: tmp3,
|
| 450 |
+
volume: tmp4,
|
| 451 |
+
geometry: tmp5,
|
| 452 |
+
hair: tmp6);
|
| 453 |
+
|
| 454 |
+
|
| 455 |
+
export material Polypropylene_Ivory(*)
|
| 456 |
+
[[
|
| 457 |
+
::anno::display_name("Polypropylene Opaque - Ivory"),
|
| 458 |
+
::anno::author("NVIDIA vMaterials"),
|
| 459 |
+
::anno::contributor("Ruediger Raab"),
|
| 460 |
+
::anno::contributor("Maik Rohland"),
|
| 461 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 462 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "ivory", "white", "light", "neutral")),
|
| 463 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Ivory.png"),
|
| 464 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 465 |
+
]] = Polypropylene_Opaque
|
| 466 |
+
(
|
| 467 |
+
thin_walled: false,
|
| 468 |
+
IOR: 1.49f,
|
| 469 |
+
roughness: 0.0f,
|
| 470 |
+
diffuse_tint: color(0.896269f, 0.838799f, 0.686685f),
|
| 471 |
+
units_absorption_thickness: unit_cm,
|
| 472 |
+
absorption_thickness: 20.0f,
|
| 473 |
+
transmissive_tint: color(0.955973f, 0.896269f, 0.730461f),
|
| 474 |
+
smudges: 0.1f,
|
| 475 |
+
smudge_scale: float2(1.0f),
|
| 476 |
+
texture_translate: float2(0.0f),
|
| 477 |
+
texture_rotate: 0.0f,
|
| 478 |
+
texture_scale: float2(1.0f),
|
| 479 |
+
round_corners: false,
|
| 480 |
+
radius: 1.5f,
|
| 481 |
+
across_materials: false,
|
| 482 |
+
uv_space_index: 0
|
| 483 |
+
);
|
| 484 |
+
|
| 485 |
+
export material Polypropylene_Lemon(*)
|
| 486 |
+
[[
|
| 487 |
+
::anno::display_name("Polypropylene Opaque - Lemon"),
|
| 488 |
+
::anno::author("NVIDIA vMaterials"),
|
| 489 |
+
::anno::contributor("Ruediger Raab"),
|
| 490 |
+
::anno::contributor("Maik Rohland"),
|
| 491 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 492 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "lemon", "yellow", "saturated", "warm", "light")),
|
| 493 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Lemon.png"),
|
| 494 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 495 |
+
]] = Polypropylene_Opaque
|
| 496 |
+
(
|
| 497 |
+
thin_walled: false,
|
| 498 |
+
IOR: 1.49f,
|
| 499 |
+
roughness: 0.0f,
|
| 500 |
+
diffuse_tint: color(0.715694f, 0.715694f, 0.045186f),
|
| 501 |
+
units_absorption_thickness: unit_cm,
|
| 502 |
+
absorption_thickness: 20.0f,
|
| 503 |
+
transmissive_tint: color(0.964686f, 0.964686f, 0.059511f),
|
| 504 |
+
smudges: 0.1f,
|
| 505 |
+
smudge_scale: float2(1.0f),
|
| 506 |
+
texture_translate: float2(0.0f),
|
| 507 |
+
texture_rotate: 0.0f,
|
| 508 |
+
texture_scale: float2(1.0f),
|
| 509 |
+
round_corners: false,
|
| 510 |
+
radius: 1.5f,
|
| 511 |
+
across_materials: false,
|
| 512 |
+
uv_space_index: 0
|
| 513 |
+
);
|
| 514 |
+
|
| 515 |
+
|
| 516 |
+
export material Polypropylene_Yellow(*)
|
| 517 |
+
[[
|
| 518 |
+
::anno::display_name("Polypropylene Opaque - Yellow"),
|
| 519 |
+
::anno::author("NVIDIA vMaterials"),
|
| 520 |
+
::anno::contributor("Ruediger Raab"),
|
| 521 |
+
::anno::contributor("Maik Rohland"),
|
| 522 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 523 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "yellow", "warm", "saturated", "light")),
|
| 524 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Yellow.png"),
|
| 525 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 526 |
+
]] = Polypropylene_Opaque
|
| 527 |
+
(
|
| 528 |
+
thin_walled: false,
|
| 529 |
+
IOR: 1.49f,
|
| 530 |
+
roughness: 0.0f,
|
| 531 |
+
diffuse_tint: color(0.871367f, 0.603827f, 0.045186f),
|
| 532 |
+
units_absorption_thickness: unit_cm,
|
| 533 |
+
absorption_thickness: 20.0f,
|
| 534 |
+
transmissive_tint: color(0.955973f, 0.686685f, 0.049707f),
|
| 535 |
+
smudges: 0.1f,
|
| 536 |
+
smudge_scale: float2(1.0f),
|
| 537 |
+
texture_translate: float2(0.0f),
|
| 538 |
+
texture_rotate: 0.0f,
|
| 539 |
+
texture_scale: float2(1.0f),
|
| 540 |
+
round_corners: false,
|
| 541 |
+
radius: 1.5f,
|
| 542 |
+
across_materials: false,
|
| 543 |
+
uv_space_index: 0
|
| 544 |
+
);
|
| 545 |
+
|
| 546 |
+
export material Polypropylene_Dark_Orange(*)
|
| 547 |
+
[[
|
| 548 |
+
::anno::display_name("Polypropylene Opaque - Dark Orange"),
|
| 549 |
+
::anno::author("NVIDIA vMaterials"),
|
| 550 |
+
::anno::contributor("Ruediger Raab"),
|
| 551 |
+
::anno::contributor("Maik Rohland"),
|
| 552 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 553 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "dark", "orange", "saturated", "warm")),
|
| 554 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Dark_Orange.png"),
|
| 555 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 556 |
+
]] = Polypropylene_Opaque
|
| 557 |
+
(
|
| 558 |
+
thin_walled: false,
|
| 559 |
+
IOR: 1.49f,
|
| 560 |
+
roughness: 0.0f,
|
| 561 |
+
diffuse_tint: color(0.527115f, 0.127438f, 0.026241f),
|
| 562 |
+
units_absorption_thickness: unit_cm,
|
| 563 |
+
absorption_thickness: 20.0f,
|
| 564 |
+
transmissive_tint: color(0.955973f, 0.514918f, 0.040915f),
|
| 565 |
+
smudges: 0.1f,
|
| 566 |
+
smudge_scale: float2(1.0f),
|
| 567 |
+
texture_translate: float2(0.0f),
|
| 568 |
+
texture_rotate: 0.0f,
|
| 569 |
+
texture_scale: float2(1.0f),
|
| 570 |
+
round_corners: false,
|
| 571 |
+
radius: 1.5f,
|
| 572 |
+
across_materials: false,
|
| 573 |
+
uv_space_index: 0
|
| 574 |
+
);
|
| 575 |
+
|
| 576 |
+
|
| 577 |
+
export material Polypropylene_Red(*)
|
| 578 |
+
[[
|
| 579 |
+
::anno::display_name("Polypropylene Opaque - Red"),
|
| 580 |
+
::anno::author("NVIDIA vMaterials"),
|
| 581 |
+
::anno::contributor("Ruediger Raab"),
|
| 582 |
+
::anno::contributor("Maik Rohland"),
|
| 583 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 584 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "red", "saturated", "warm")),
|
| 585 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Red.png"),
|
| 586 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 587 |
+
]] = Polypropylene_Opaque
|
| 588 |
+
(
|
| 589 |
+
thin_walled: false,
|
| 590 |
+
IOR: 1.49f,
|
| 591 |
+
roughness: 0.0f,
|
| 592 |
+
diffuse_tint: color(0.644480f, 0.036889f, 0.036889f),
|
| 593 |
+
units_absorption_thickness: unit_cm,
|
| 594 |
+
absorption_thickness: 20.0f,
|
| 595 |
+
transmissive_tint: color(0.921582f, 0.049707f, 0.049707f),
|
| 596 |
+
smudges: 0.1f,
|
| 597 |
+
smudge_scale: float2(1.0f),
|
| 598 |
+
texture_translate: float2(0.0f),
|
| 599 |
+
texture_rotate: 0.0f,
|
| 600 |
+
texture_scale: float2(1.0f),
|
| 601 |
+
round_corners: false,
|
| 602 |
+
radius: 1.5f,
|
| 603 |
+
across_materials: false,
|
| 604 |
+
uv_space_index: 0
|
| 605 |
+
);
|
| 606 |
+
|
| 607 |
+
|
| 608 |
+
export material Polypropylene_Magenta(*)
|
| 609 |
+
[[
|
| 610 |
+
::anno::display_name("Polypropylene Opaque - Magenta"),
|
| 611 |
+
::anno::author("NVIDIA vMaterials"),
|
| 612 |
+
::anno::contributor("Ruediger Raab"),
|
| 613 |
+
::anno::contributor("Maik Rohland"),
|
| 614 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 615 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "magenta", "saturated", "warm")),
|
| 616 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Magenta.png"),
|
| 617 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 618 |
+
]] = Polypropylene_Opaque
|
| 619 |
+
(
|
| 620 |
+
thin_walled: false,
|
| 621 |
+
IOR: 1.49f,
|
| 622 |
+
roughness: 0.0f,
|
| 623 |
+
diffuse_tint: color(0.539479f, 0.051269f, 0.545724f),
|
| 624 |
+
units_absorption_thickness: unit_cm,
|
| 625 |
+
absorption_thickness: 20.0f,
|
| 626 |
+
transmissive_tint: color(0.921582f, 0.049707f, 0.144128f),
|
| 627 |
+
smudges: 0.1f,
|
| 628 |
+
smudge_scale: float2(1.0f),
|
| 629 |
+
texture_translate: float2(0.0f),
|
| 630 |
+
texture_rotate: 0.0f,
|
| 631 |
+
texture_scale: float2(1.0f),
|
| 632 |
+
round_corners: false,
|
| 633 |
+
radius: 1.5f,
|
| 634 |
+
across_materials: false,
|
| 635 |
+
uv_space_index: 0
|
| 636 |
+
);
|
| 637 |
+
|
| 638 |
+
|
| 639 |
+
export material Polypropylene_Purple(*)
|
| 640 |
+
[[
|
| 641 |
+
::anno::display_name("Polypropylene Opaque - Purple"),
|
| 642 |
+
::anno::author("NVIDIA vMaterials"),
|
| 643 |
+
::anno::contributor("Ruediger Raab"),
|
| 644 |
+
::anno::contributor("Maik Rohland"),
|
| 645 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 646 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "purple", "saturated")),
|
| 647 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Purple.png"),
|
| 648 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 649 |
+
]] = Polypropylene_Opaque
|
| 650 |
+
(
|
| 651 |
+
thin_walled: false,
|
| 652 |
+
IOR: 1.49f,
|
| 653 |
+
roughness: 0.0f,
|
| 654 |
+
diffuse_tint: color(0.191202f, 0.022174f, 0.456411f),
|
| 655 |
+
units_absorption_thickness: unit_cm,
|
| 656 |
+
absorption_thickness: 20.0f,
|
| 657 |
+
transmissive_tint: color(0.412543f, 0.049707f, 0.921582f),
|
| 658 |
+
smudges: 0.1f,
|
| 659 |
+
smudge_scale: float2(1.0f),
|
| 660 |
+
texture_translate: float2(0.0f),
|
| 661 |
+
texture_rotate: 0.0f,
|
| 662 |
+
texture_scale: float2(1.0f),
|
| 663 |
+
round_corners: false,
|
| 664 |
+
radius: 1.5f,
|
| 665 |
+
across_materials: false,
|
| 666 |
+
uv_space_index: 0
|
| 667 |
+
);
|
| 668 |
+
|
| 669 |
+
|
| 670 |
+
export material Polypropylene_Dark_Blue(*)
|
| 671 |
+
[[
|
| 672 |
+
::anno::display_name("Polypropylene Opaque - Dark Blue"),
|
| 673 |
+
::anno::author("NVIDIA vMaterials"),
|
| 674 |
+
::anno::contributor("Ruediger Raab"),
|
| 675 |
+
::anno::contributor("Maik Rohland"),
|
| 676 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 677 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "blue", "saturated", "cool", "dark")),
|
| 678 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Dark_Blue.png"),
|
| 679 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 680 |
+
]] = Polypropylene_Opaque
|
| 681 |
+
(
|
| 682 |
+
thin_walled: false,
|
| 683 |
+
IOR: 1.49f,
|
| 684 |
+
roughness: 0.0f,
|
| 685 |
+
diffuse_tint: color(0.031896f, 0.061246f, 0.304987f),
|
| 686 |
+
units_absorption_thickness: unit_cm,
|
| 687 |
+
absorption_thickness: 20.0f,
|
| 688 |
+
transmissive_tint: color(0.056128f, 0.135633f, 0.955973f),
|
| 689 |
+
smudges: 0.1f,
|
| 690 |
+
smudge_scale: float2(1.0f),
|
| 691 |
+
texture_translate: float2(0.0f),
|
| 692 |
+
texture_rotate: 0.0f,
|
| 693 |
+
texture_scale: float2(1.0f),
|
| 694 |
+
round_corners: false,
|
| 695 |
+
radius: 1.5f,
|
| 696 |
+
across_materials: false,
|
| 697 |
+
uv_space_index: 0
|
| 698 |
+
);
|
| 699 |
+
|
| 700 |
+
|
| 701 |
+
export material Polypropylene_Blue(*)
|
| 702 |
+
[[
|
| 703 |
+
::anno::display_name("Polypropylene Opaque - Blue"),
|
| 704 |
+
::anno::author("NVIDIA vMaterials"),
|
| 705 |
+
::anno::contributor("Ruediger Raab"),
|
| 706 |
+
::anno::contributor("Maik Rohland"),
|
| 707 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 708 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "blue", "saturated", "cool")),
|
| 709 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Blue.png"),
|
| 710 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 711 |
+
]] = Polypropylene_Opaque
|
| 712 |
+
(
|
| 713 |
+
thin_walled: false,
|
| 714 |
+
IOR: 1.49f,
|
| 715 |
+
roughness: 0.0f,
|
| 716 |
+
diffuse_tint: color(0.038204f, 0.171441f, 0.838799f),
|
| 717 |
+
units_absorption_thickness: unit_cm,
|
| 718 |
+
absorption_thickness: 20.0f,
|
| 719 |
+
transmissive_tint: color(0.042311f, 0.194618f, 0.955973f),
|
| 720 |
+
smudges: 0.1f,
|
| 721 |
+
smudge_scale: float2(1.0f),
|
| 722 |
+
texture_translate: float2(0.0f),
|
| 723 |
+
texture_rotate: 0.0f,
|
| 724 |
+
texture_scale: float2(1.0f),
|
| 725 |
+
round_corners: false,
|
| 726 |
+
radius: 1.5f,
|
| 727 |
+
across_materials: false,
|
| 728 |
+
uv_space_index: 0
|
| 729 |
+
);
|
| 730 |
+
|
| 731 |
+
|
| 732 |
+
export material Polypropylene_Sky_Blue(*)
|
| 733 |
+
[[
|
| 734 |
+
::anno::display_name("Polypropylene Opaque - Sky Blue"),
|
| 735 |
+
::anno::author("NVIDIA vMaterials"),
|
| 736 |
+
::anno::contributor("Ruediger Raab"),
|
| 737 |
+
::anno::contributor("Maik Rohland"),
|
| 738 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 739 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "blue", "sky", "light", "cool")),
|
| 740 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Sky_Blue.png"),
|
| 741 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 742 |
+
]] = Polypropylene_Opaque
|
| 743 |
+
(
|
| 744 |
+
thin_walled: false,
|
| 745 |
+
IOR: 1.49f,
|
| 746 |
+
roughness: 0.0f,
|
| 747 |
+
diffuse_tint: color(0.135633f, 0.356400f, 0.871367f),
|
| 748 |
+
units_absorption_thickness: unit_cm,
|
| 749 |
+
absorption_thickness: 20.0f,
|
| 750 |
+
transmissive_tint: color(0.070360f, 0.346704f, 0.964686f),
|
| 751 |
+
smudges: 0.1f,
|
| 752 |
+
smudge_scale: float2(1.0f),
|
| 753 |
+
texture_translate: float2(0.0f),
|
| 754 |
+
texture_rotate: 0.0f,
|
| 755 |
+
texture_scale: float2(1.0f),
|
| 756 |
+
round_corners: false,
|
| 757 |
+
radius: 1.5f,
|
| 758 |
+
across_materials: false,
|
| 759 |
+
uv_space_index: 0
|
| 760 |
+
);
|
| 761 |
+
|
| 762 |
+
|
| 763 |
+
export material Polypropylene_Light_Blue(*)
|
| 764 |
+
[[
|
| 765 |
+
::anno::display_name("Polypropylene Opaque - Light Blue"),
|
| 766 |
+
::anno::author("NVIDIA vMaterials"),
|
| 767 |
+
::anno::contributor("Ruediger Raab"),
|
| 768 |
+
::anno::contributor("Maik Rohland"),
|
| 769 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 770 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "blue", "light", "cool")),
|
| 771 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Sky_Blue.png"),
|
| 772 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 773 |
+
]] = Polypropylene_Opaque
|
| 774 |
+
(
|
| 775 |
+
thin_walled: false,
|
| 776 |
+
IOR: 1.49f,
|
| 777 |
+
roughness: 0.0f,
|
| 778 |
+
diffuse_tint: color(0.258183f, 0.768151f, 0.822786f),
|
| 779 |
+
units_absorption_thickness: unit_cm,
|
| 780 |
+
absorption_thickness: 20.0f,
|
| 781 |
+
transmissive_tint: color(0.300544f, 0.896269f, 0.955973f),
|
| 782 |
+
smudges: 0.1f,
|
| 783 |
+
smudge_scale: float2(1.0f),
|
| 784 |
+
texture_translate: float2(0.0f),
|
| 785 |
+
texture_rotate: 0.0f,
|
| 786 |
+
texture_scale: float2(1.0f),
|
| 787 |
+
round_corners: false,
|
| 788 |
+
radius: 1.5f,
|
| 789 |
+
across_materials: false,
|
| 790 |
+
uv_space_index: 0
|
| 791 |
+
);
|
| 792 |
+
|
| 793 |
+
|
| 794 |
+
export material Polypropylene_Teal(*)
|
| 795 |
+
[[
|
| 796 |
+
::anno::display_name("Polypropylene Opaque - Teal"),
|
| 797 |
+
::anno::author("NVIDIA vMaterials"),
|
| 798 |
+
::anno::contributor("Ruediger Raab"),
|
| 799 |
+
::anno::contributor("Maik Rohland"),
|
| 800 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 801 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "teal", "saturated", "cool")),
|
| 802 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Teal.png"),
|
| 803 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 804 |
+
]] = Polypropylene_Opaque
|
| 805 |
+
(
|
| 806 |
+
thin_walled: false,
|
| 807 |
+
IOR: 1.49f,
|
| 808 |
+
roughness: 0.0f,
|
| 809 |
+
diffuse_tint: color(0.040915f, 0.571125f, 0.323143f),
|
| 810 |
+
units_absorption_thickness: unit_cm,
|
| 811 |
+
absorption_thickness: 20.0f,
|
| 812 |
+
transmissive_tint: color(0.064803f, 0.955973f, 0.332452f),
|
| 813 |
+
smudges: 0.1f,
|
| 814 |
+
smudge_scale: float2(1.0f),
|
| 815 |
+
texture_translate: float2(0.0f),
|
| 816 |
+
texture_rotate: 0.0f,
|
| 817 |
+
texture_scale: float2(1.0f),
|
| 818 |
+
round_corners: false,
|
| 819 |
+
radius: 1.5f,
|
| 820 |
+
across_materials: false,
|
| 821 |
+
uv_space_index: 0
|
| 822 |
+
);
|
| 823 |
+
|
| 824 |
+
|
| 825 |
+
export material Polypropylene_Dark_Green(*)
|
| 826 |
+
[[
|
| 827 |
+
::anno::display_name("Polypropylene Opaque - Dark Green"),
|
| 828 |
+
::anno::author("NVIDIA vMaterials"),
|
| 829 |
+
::anno::contributor("Ruediger Raab"),
|
| 830 |
+
::anno::contributor("Maik Rohland"),
|
| 831 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 832 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "green", "saturated", "dark")),
|
| 833 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Dark_Green.png"),
|
| 834 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 835 |
+
]] = Polypropylene_Opaque
|
| 836 |
+
(
|
| 837 |
+
thin_walled: false,
|
| 838 |
+
IOR: 1.49f,
|
| 839 |
+
roughness: 0.0f,
|
| 840 |
+
diffuse_tint: color(0.026241f, 0.141263f, 0.026241f),
|
| 841 |
+
units_absorption_thickness: unit_cm,
|
| 842 |
+
absorption_thickness: 20.0f,
|
| 843 |
+
transmissive_tint: color(0.086500f, 0.854993f, 0.086500f),
|
| 844 |
+
smudges: 0.1f,
|
| 845 |
+
smudge_scale: float2(1.0f),
|
| 846 |
+
texture_translate: float2(0.0f),
|
| 847 |
+
texture_rotate: 0.0f,
|
| 848 |
+
texture_scale: float2(1.0f),
|
| 849 |
+
round_corners: false,
|
| 850 |
+
radius: 1.5f,
|
| 851 |
+
across_materials: false,
|
| 852 |
+
uv_space_index: 0
|
| 853 |
+
);
|
| 854 |
+
|
| 855 |
+
|
| 856 |
+
export material Polypropylene_Green(*)
|
| 857 |
+
[[
|
| 858 |
+
::anno::display_name("Polypropylene Opaque - Green"),
|
| 859 |
+
::anno::author("NVIDIA vMaterials"),
|
| 860 |
+
::anno::contributor("Ruediger Raab"),
|
| 861 |
+
::anno::contributor("Maik Rohland"),
|
| 862 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 863 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "green", "saturated")),
|
| 864 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Green.png"),
|
| 865 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 866 |
+
]] = Polypropylene_Opaque
|
| 867 |
+
(
|
| 868 |
+
thin_walled: false,
|
| 869 |
+
IOR: 1.49f,
|
| 870 |
+
roughness: 0.0f,
|
| 871 |
+
diffuse_tint: color(0.023153f, 0.346704f, 0.023153f),
|
| 872 |
+
units_absorption_thickness: unit_cm,
|
| 873 |
+
absorption_thickness: 20.0f,
|
| 874 |
+
transmissive_tint: color(0.054480f, 0.938686f, 0.054480f),
|
| 875 |
+
smudges: 0.1f,
|
| 876 |
+
smudge_scale: float2(1.0f),
|
| 877 |
+
texture_translate: float2(0.0f),
|
| 878 |
+
texture_rotate: 0.0f,
|
| 879 |
+
texture_scale: float2(1.0f),
|
| 880 |
+
round_corners: false,
|
| 881 |
+
radius: 1.5f,
|
| 882 |
+
across_materials: false,
|
| 883 |
+
uv_space_index: 0
|
| 884 |
+
);
|
| 885 |
+
|
| 886 |
+
|
| 887 |
+
export material Polypropylene_Light_Green(*)
|
| 888 |
+
[[
|
| 889 |
+
::anno::display_name("Polypropylene Opaque - Light Green"),
|
| 890 |
+
::anno::author("NVIDIA vMaterials"),
|
| 891 |
+
::anno::contributor("Ruediger Raab"),
|
| 892 |
+
::anno::contributor("Maik Rohland"),
|
| 893 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 894 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "green", "saturated", "light")),
|
| 895 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Light_Green.png"),
|
| 896 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 897 |
+
]] = Polypropylene_Opaque
|
| 898 |
+
(
|
| 899 |
+
thin_walled: false,
|
| 900 |
+
IOR: 1.49f,
|
| 901 |
+
roughness: 0.0f,
|
| 902 |
+
diffuse_tint: color(0.034340f, 0.679542f, 0.031896f),
|
| 903 |
+
units_absorption_thickness: unit_cm,
|
| 904 |
+
absorption_thickness: 20.0f,
|
| 905 |
+
transmissive_tint: color(0.054480f, 0.930111f, 0.054480f),
|
| 906 |
+
smudges: 0.1f,
|
| 907 |
+
smudge_scale: float2(1.0f),
|
| 908 |
+
texture_translate: float2(0.0f),
|
| 909 |
+
texture_rotate: 0.0f,
|
| 910 |
+
texture_scale: float2(1.0f),
|
| 911 |
+
round_corners: false,
|
| 912 |
+
radius: 1.5f,
|
| 913 |
+
across_materials: false,
|
| 914 |
+
uv_space_index: 0
|
| 915 |
+
);
|
| 916 |
+
|
| 917 |
+
|
| 918 |
+
export material Polypropylene_Lime_Green(*)
|
| 919 |
+
[[
|
| 920 |
+
::anno::display_name("Polypropylene Opaque - Lime Green"),
|
| 921 |
+
::anno::author("NVIDIA vMaterials"),
|
| 922 |
+
::anno::contributor("Ruediger Raab"),
|
| 923 |
+
::anno::contributor("Maik Rohland"),
|
| 924 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 925 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "green", "lime", "saturated", "light")),
|
| 926 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Lime_Green.png"),
|
| 927 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 928 |
+
]] = Polypropylene_Opaque
|
| 929 |
+
(
|
| 930 |
+
thin_walled: false,
|
| 931 |
+
IOR: 1.49f,
|
| 932 |
+
roughness: 0.0f,
|
| 933 |
+
diffuse_tint: color(0.208637f, 0.597202f, 0.031896f),
|
| 934 |
+
units_absorption_thickness: unit_cm,
|
| 935 |
+
absorption_thickness: 20.0f,
|
| 936 |
+
transmissive_tint: color(0.300544f, 0.879622f, 0.043735f),
|
| 937 |
+
smudges: 0.1f,
|
| 938 |
+
smudge_scale: float2(1.0f),
|
| 939 |
+
texture_translate: float2(0.0f),
|
| 940 |
+
texture_rotate: 0.0f,
|
| 941 |
+
texture_scale: float2(1.0f),
|
| 942 |
+
round_corners: false,
|
| 943 |
+
radius: 1.5f,
|
| 944 |
+
across_materials: false,
|
| 945 |
+
uv_space_index: 0
|
| 946 |
+
);
|
| 947 |
+
|
| 948 |
+
|
| 949 |
+
export material Polypropylene_Black(*)
|
| 950 |
+
[[
|
| 951 |
+
::anno::display_name("Polypropylene Opaque - Black"),
|
| 952 |
+
::anno::author("NVIDIA vMaterials"),
|
| 953 |
+
::anno::contributor("Ruediger Raab"),
|
| 954 |
+
::anno::contributor("Maik Rohland"),
|
| 955 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 956 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "black", "dark", "neutral")),
|
| 957 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Black.png"),
|
| 958 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 959 |
+
]] = Polypropylene_Opaque
|
| 960 |
+
(
|
| 961 |
+
thin_walled: false,
|
| 962 |
+
IOR: 1.49f,
|
| 963 |
+
roughness: 0.0f,
|
| 964 |
+
diffuse_tint: color(0.038204f, 0.038204f, 0.038204f),
|
| 965 |
+
units_absorption_thickness: unit_cm,
|
| 966 |
+
absorption_thickness: 20.0f,
|
| 967 |
+
transmissive_tint: color(0.038204f, 0.038204f, 0.038204f),
|
| 968 |
+
smudges: 0.1f,
|
| 969 |
+
smudge_scale: float2(1.0f),
|
| 970 |
+
texture_translate: float2(0.0f),
|
| 971 |
+
texture_rotate: 0.0f,
|
| 972 |
+
texture_scale: float2(1.0f),
|
| 973 |
+
round_corners: false,
|
| 974 |
+
radius: 1.5f,
|
| 975 |
+
across_materials: false,
|
| 976 |
+
uv_space_index: 0
|
| 977 |
+
);
|
| 978 |
+
|
| 979 |
+
|
| 980 |
+
export material Polypropylene_Dark_Gray(*)
|
| 981 |
+
[[
|
| 982 |
+
::anno::display_name("Polypropylene Opaque - Dark Gray"),
|
| 983 |
+
::anno::author("NVIDIA vMaterials"),
|
| 984 |
+
::anno::contributor("Ruediger Raab"),
|
| 985 |
+
::anno::contributor("Maik Rohland"),
|
| 986 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 987 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "gray", "dark", "neutral")),
|
| 988 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Dark_Gray.png"),
|
| 989 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 990 |
+
]] = Polypropylene_Opaque
|
| 991 |
+
(
|
| 992 |
+
thin_walled: false,
|
| 993 |
+
IOR: 1.49f,
|
| 994 |
+
roughness: 0.0f,
|
| 995 |
+
diffuse_tint: color(0.127438f, 0.127438f, 0.127438f),
|
| 996 |
+
units_absorption_thickness: unit_cm,
|
| 997 |
+
absorption_thickness: 20.0f,
|
| 998 |
+
transmissive_tint: color(0.822786f, 0.822786f, 0.822786f),
|
| 999 |
+
smudges: 0.1f,
|
| 1000 |
+
smudge_scale: float2(1.0f),
|
| 1001 |
+
texture_translate: float2(0.0f),
|
| 1002 |
+
texture_rotate: 0.0f,
|
| 1003 |
+
texture_scale: float2(1.0f),
|
| 1004 |
+
round_corners: false,
|
| 1005 |
+
radius: 1.5f,
|
| 1006 |
+
across_materials: false,
|
| 1007 |
+
uv_space_index: 0
|
| 1008 |
+
);
|
| 1009 |
+
|
| 1010 |
+
|
| 1011 |
+
export material Polypropylene_Light_Gray(*)
|
| 1012 |
+
[[
|
| 1013 |
+
::anno::display_name("Polypropylene Opaque - Light Gray"),
|
| 1014 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1015 |
+
::anno::contributor("Ruediger Raab"),
|
| 1016 |
+
::anno::contributor("Maik Rohland"),
|
| 1017 |
+
::anno::description("Diffuse plastic polypropylene material for rendering of diffuse plastic with volumetric exhaustion."),
|
| 1018 |
+
::anno::key_words(string[]("plastic", "polypropylene", "PP", "synthetic", "opaque", "design", "packaging", "molded", "smudged", "smudges", "infinite tiling", "smooth", "gray", "light", "neutral")),
|
| 1019 |
+
::anno::thumbnail("./.thumbs/Polypropylene_Opaque.Polypropylene_Light_Gray.png"),
|
| 1020 |
+
::anno::copyright_notice(COPYRIGHT)
|
| 1021 |
+
]] = Polypropylene_Opaque
|
| 1022 |
+
(
|
| 1023 |
+
thin_walled: false,
|
| 1024 |
+
IOR: 1.49f,
|
| 1025 |
+
roughness: 0.0f,
|
| 1026 |
+
diffuse_tint: color(0.456411f, 0.456411f, 0.456411f),
|
| 1027 |
+
units_absorption_thickness: unit_cm,
|
| 1028 |
+
absorption_thickness: 20.0f,
|
| 1029 |
+
transmissive_tint: color(0.991102f, 0.991102f, 0.991102f),
|
| 1030 |
+
smudges: 0.1f,
|
| 1031 |
+
smudge_scale: float2(1.0f),
|
| 1032 |
+
texture_translate: float2(0.0f),
|
| 1033 |
+
texture_rotate: 0.0f,
|
| 1034 |
+
texture_scale: float2(1.0f),
|
| 1035 |
+
round_corners: false,
|
| 1036 |
+
radius: 1.5f,
|
| 1037 |
+
across_materials: false,
|
| 1038 |
+
uv_space_index: 0
|
| 1039 |
+
);
|
| 1040 |
+
|
| 1041 |
+
|
| 1042 |
+
|
| 1043 |
+
|
| 1044 |
+
|
| 1045 |
+
|
| 1046 |
+
|
| 1047 |
+
|
| 1048 |
+
|
| 1049 |
+
|
EXLS1/simready_usd/materials/Semi_Aniline_Leather.mdl
ADDED
|
@@ -0,0 +1,718 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/******************************************************************************
|
| 2 |
+
* Copyright 2023 NVIDIA Corporation. All rights reserved. *
|
| 3 |
+
******************************************************************************
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge,
|
| 6 |
+
to any person obtaining a copy of the sample definition code that uses our
|
| 7 |
+
Material Definition Language (the "MDL Materials"), to reproduce and distribute
|
| 8 |
+
the MDL Materials, including without limitation the rights to use, copy, merge,
|
| 9 |
+
publish, distribute, and sell modified and unmodified copies of the MDL
|
| 10 |
+
Materials, and to permit persons to whom the MDL Materials is furnished to do
|
| 11 |
+
so, in all cases solely for use with NVIDIA's Material Definition Language,
|
| 12 |
+
subject to the following further conditions:
|
| 13 |
+
|
| 14 |
+
1. The above copyright notices, this list of conditions, and the disclaimer
|
| 15 |
+
that follows shall be retained in all copies of one or more of the MDL
|
| 16 |
+
Materials, including in any software with which the MDL Materials are bundled,
|
| 17 |
+
redistributed, and/or sold, and included either as stand-alone text files,
|
| 18 |
+
human-readable headers or in the appropriate machine-readable metadata fields
|
| 19 |
+
within text or binary files as long as those fields can be easily viewed by the
|
| 20 |
+
user, as applicable.
|
| 21 |
+
2. The name of NVIDIA shall not be used to promote, endorse or advertise any
|
| 22 |
+
Modified Version without specific prior written permission, except a) to comply
|
| 23 |
+
with the notice requirements otherwise contained herein; or b) to acknowledge
|
| 24 |
+
the contribution(s) of NVIDIA.
|
| 25 |
+
|
| 26 |
+
THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
| 27 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
|
| 28 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
|
| 29 |
+
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR
|
| 30 |
+
ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL,
|
| 31 |
+
INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF
|
| 32 |
+
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE
|
| 33 |
+
THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.
|
| 34 |
+
*/
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
mdl 1.5;
|
| 38 |
+
|
| 39 |
+
import ::anno::*;
|
| 40 |
+
import ::base::*;
|
| 41 |
+
import ::df::*;
|
| 42 |
+
import ::math::*;
|
| 43 |
+
import ::state::*;
|
| 44 |
+
import ::tex::*;
|
| 45 |
+
import ::nvidia::core_definitions::blend_colors;
|
| 46 |
+
import ::nvidia::core_definitions::dimension;
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
const string COPYRIGHT =
|
| 50 |
+
" Copyright 2023 NVIDIA Corporation. All rights reserved.\n"
|
| 51 |
+
" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n"
|
| 52 |
+
" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n"
|
| 53 |
+
" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n"
|
| 54 |
+
" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n"
|
| 55 |
+
" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n"
|
| 56 |
+
" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n"
|
| 57 |
+
" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n"
|
| 58 |
+
" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n"
|
| 59 |
+
" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n"
|
| 60 |
+
" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n";
|
| 61 |
+
|
| 62 |
+
const string DESCRIPTION = "A semi aniline leather material";
|
| 63 |
+
|
| 64 |
+
annotation preview_scale( float f);
|
| 65 |
+
|
| 66 |
+
float2x2 invert_2x2(float2x2 M)
|
| 67 |
+
{
|
| 68 |
+
float det = M[0][0]*M[1][1] - M[0][1]*M[1][0];
|
| 69 |
+
//https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/
|
| 70 |
+
return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]);
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
float uint2float(int x)
|
| 74 |
+
{
|
| 75 |
+
return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0);
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
int lowbias32(int x)
|
| 79 |
+
{
|
| 80 |
+
x ^= x >>> 16;
|
| 81 |
+
x *= 0x7feb352d;
|
| 82 |
+
x ^= x >>> 15;
|
| 83 |
+
x *= 0x846ca68b;
|
| 84 |
+
x ^= x >>> 16;
|
| 85 |
+
return x;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
float2 rnd22(int2 p) {
|
| 89 |
+
float2 ret_val = float2(
|
| 90 |
+
uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f,
|
| 91 |
+
uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f
|
| 92 |
+
);
|
| 93 |
+
return ret_val;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
float3 srgb2rgb(float3 val)
|
| 97 |
+
{
|
| 98 |
+
return ::math::pow(::math::max(val, float3(0.0f)), 2.2);
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
float3 nonrepeat_lookup(
|
| 102 |
+
uniform texture_2d texture = texture_2d(),
|
| 103 |
+
::base::texture_coordinate_info uvw = ::base::coordinate_source(),
|
| 104 |
+
float texture_scale = 1.0,
|
| 105 |
+
float3 average_color = float3(0.5),
|
| 106 |
+
float patch_size = 8.0
|
| 107 |
+
)
|
| 108 |
+
{
|
| 109 |
+
|
| 110 |
+
float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale;
|
| 111 |
+
float Z = patch_size; // patch scale inside example texture
|
| 112 |
+
float CON = 1.0f;
|
| 113 |
+
|
| 114 |
+
float3 O = float3(0.f);
|
| 115 |
+
float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f);
|
| 116 |
+
float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space
|
| 117 |
+
|
| 118 |
+
float2 U = uv_in;
|
| 119 |
+
float2 V = M * uv_in; //pre-tilted hexa coordinates
|
| 120 |
+
int2 I = int2(::math::floor(V)); // hexa-tile id
|
| 121 |
+
|
| 122 |
+
// The mean color needs to be determined in Photoshop then to make the
|
| 123 |
+
// average color work out, take the float value and calculate the apropriate
|
| 124 |
+
// mean value as (value^(1/2.2))
|
| 125 |
+
|
| 126 |
+
float3 m = average_color;
|
| 127 |
+
|
| 128 |
+
float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W;
|
| 129 |
+
F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates
|
| 130 |
+
|
| 131 |
+
if( F[2] > 0.f )
|
| 132 |
+
|
| 133 |
+
O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON))
|
| 134 |
+
+ (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON))
|
| 135 |
+
+ (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON));
|
| 136 |
+
else
|
| 137 |
+
O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON))
|
| 138 |
+
+ (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON))
|
| 139 |
+
+ (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON));
|
| 140 |
+
O = m + O/::math::length(W);
|
| 141 |
+
O = ::math::clamp( (O), 0.0, 1.0);
|
| 142 |
+
|
| 143 |
+
return float3(O);
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
float3 endless_normal(
|
| 147 |
+
uniform texture_2d texture = texture_2d(),
|
| 148 |
+
float factor = 1.0,
|
| 149 |
+
bool flip_tangent_u = false,
|
| 150 |
+
bool flip_tangent_v = false,
|
| 151 |
+
::base::texture_coordinate_info uvw = ::base::coordinate_source(),
|
| 152 |
+
float texture_scale = 1.0,
|
| 153 |
+
float3 average_color = float3(0.5, 0.5, 1.0),
|
| 154 |
+
float patch_size = 8.0
|
| 155 |
+
//bool srgb2rgb = false,
|
| 156 |
+
//bool rgb2srgb = false
|
| 157 |
+
)
|
| 158 |
+
{
|
| 159 |
+
float3 transformed_tangent_u = flip_tangent_u ? uvw.tangent_u : - uvw.tangent_u;
|
| 160 |
+
float3 transformed_tangent_v = flip_tangent_v ? uvw.tangent_v : - uvw.tangent_v;
|
| 161 |
+
|
| 162 |
+
if (flip_tangent_u)
|
| 163 |
+
transformed_tangent_u=-transformed_tangent_u;
|
| 164 |
+
if (flip_tangent_v)
|
| 165 |
+
transformed_tangent_v=-transformed_tangent_v;
|
| 166 |
+
|
| 167 |
+
// normalized Lookup
|
| 168 |
+
float3 tangent_space_normal =
|
| 169 |
+
(nonrepeat_lookup (
|
| 170 |
+
texture: texture,
|
| 171 |
+
uvw: uvw,
|
| 172 |
+
texture_scale: texture_scale,
|
| 173 |
+
average_color: average_color,
|
| 174 |
+
patch_size: patch_size
|
| 175 |
+
) - 0.5) * (2.0 * factor);
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
return ::math::normalize(uvw.tangent_u * tangent_space_normal.x +
|
| 179 |
+
uvw.tangent_v * tangent_space_normal.y +
|
| 180 |
+
::state::normal()*1.0);
|
| 181 |
+
//return ::state::normal();
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
color endless_texture(
|
| 185 |
+
uniform texture_2d texture = texture_2d(),
|
| 186 |
+
::base::texture_coordinate_info uvw = ::base::coordinate_source(),
|
| 187 |
+
float texture_scale = 10.0,
|
| 188 |
+
float3 average_color = float3(0.5, 0.5, 1.0),
|
| 189 |
+
float patch_size = 8.0,
|
| 190 |
+
bool gamma_correct_lookup = true
|
| 191 |
+
)
|
| 192 |
+
{
|
| 193 |
+
return gamma_correct_lookup ? color(srgb2rgb(
|
| 194 |
+
nonrepeat_lookup (
|
| 195 |
+
texture: texture,
|
| 196 |
+
uvw: uvw,
|
| 197 |
+
texture_scale: texture_scale,
|
| 198 |
+
average_color: average_color,
|
| 199 |
+
patch_size: patch_size
|
| 200 |
+
))
|
| 201 |
+
) : color(nonrepeat_lookup (
|
| 202 |
+
texture: texture,
|
| 203 |
+
uvw: uvw,
|
| 204 |
+
texture_scale: texture_scale,
|
| 205 |
+
average_color: average_color,
|
| 206 |
+
patch_size: patch_size
|
| 207 |
+
));
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
float histogram_range(float input, float range = 1.0f, float position = 0.5f)
|
| 211 |
+
{
|
| 212 |
+
float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0);
|
| 213 |
+
float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0);
|
| 214 |
+
return ::math::lerp(low, high, input);
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
float remap_xy_to_0_1(float input, float x, float y)
|
| 218 |
+
{
|
| 219 |
+
return (input - x)/(y - x);
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
float histogram_scan_big(float input, float width, float position)
|
| 223 |
+
{
|
| 224 |
+
return ::math::clamp(
|
| 225 |
+
remap_xy_to_0_1(input,
|
| 226 |
+
::math::lerp(-width, 1.0, position),
|
| 227 |
+
::math::lerp(0.0, 1.0 + width, position)),
|
| 228 |
+
0.0,
|
| 229 |
+
1.0);
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
float3 normalmap_normal(
|
| 233 |
+
uniform texture_2d texture,
|
| 234 |
+
float factor = 1.0,
|
| 235 |
+
::base::texture_coordinate_info uvw = ::base::texture_coordinate_info()
|
| 236 |
+
)
|
| 237 |
+
{
|
| 238 |
+
float3 lookup = (::tex::lookup_float3(texture, float2(uvw.position.x, uvw.position.y)) - float3(0.5)) * (factor * 2.0);
|
| 239 |
+
return ::math::normalize(uvw.tangent_u * lookup.x + uvw.tangent_v * lookup.y + ::state::normal() * (lookup.z + (1.0 - factor)));
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
::base::texture_coordinate_info transform_coordinate_2(
|
| 243 |
+
float4x4 transform
|
| 244 |
+
[[ ::anno::description("A transformation to be applied to the source coordinates. rotation_translation_scale() is a suggested means to compute the transformation matrix") ]],
|
| 245 |
+
::base::texture_coordinate_info coordinate = ::base::texture_coordinate_info()
|
| 246 |
+
[[ ::anno::description("Coordinate, typically sourced from coordinate_source or coordinate_projection") ]]
|
| 247 |
+
) [[
|
| 248 |
+
::anno::description("Transform a texture coordinate by a matrix") ,
|
| 249 |
+
::anno::noinline()
|
| 250 |
+
]]
|
| 251 |
+
{
|
| 252 |
+
|
| 253 |
+
/*
|
| 254 |
+
// Version 1
|
| 255 |
+
float4 r_position = float4(coordinate.position.x,coordinate.position.y,coordinate.position.z,1)* transform;
|
| 256 |
+
float4 r_tangent_u = float4(coordinate.tangent_u.x,coordinate.tangent_u.y,coordinate.tangent_u.z,1)* transform;
|
| 257 |
+
float4 r_tangent_v = float4(coordinate.tangent_v.x,coordinate.tangent_v.y,coordinate.tangent_v.z,1)* transform;
|
| 258 |
+
return ::base::texture_coordinate_info(
|
| 259 |
+
float3(r_position.x,r_position.y,r_position.z),
|
| 260 |
+
float3(r_tangent_u.x,r_tangent_u.y,r_tangent_u.z), // orthogonalization
|
| 261 |
+
float3(r_tangent_v.x,r_tangent_v.y,r_tangent_v.z));// orthogonalization
|
| 262 |
+
*/
|
| 263 |
+
|
| 264 |
+
// Version 2
|
| 265 |
+
float4 r_position = transform * float4(coordinate.position.x,coordinate.position.y,coordinate.position.z,1);
|
| 266 |
+
//Try aproximating it for the case that the rotation is only aroud z and assuming the texture layout is nice and z is ~constant.
|
| 267 |
+
//just pretend there is no other rotation happening
|
| 268 |
+
//get rid of scaling and translation. Then extract fields where sin and cos would be in a simple 2d transform around z.
|
| 269 |
+
float4 u = transform[0];
|
| 270 |
+
float3 ru = ::math::normalize(float3(u.x,u.y,u.z));
|
| 271 |
+
float cos = ru.x;
|
| 272 |
+
float sin = -ru.y;
|
| 273 |
+
//TODO: at least also handle sign of z?
|
| 274 |
+
//TODO: handle tangent becoming 0
|
| 275 |
+
|
| 276 |
+
|
| 277 |
+
return ::base::texture_coordinate_info(
|
| 278 |
+
float3(r_position.x,r_position.y,r_position.z),
|
| 279 |
+
::math::normalize(cos * coordinate.tangent_u - sin * coordinate.tangent_v),
|
| 280 |
+
::math::normalize(cos * coordinate.tangent_v + sin * coordinate.tangent_u));
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
::base::texture_coordinate_info vmat_transform(
|
| 284 |
+
float2 translation = float2(0.0, 0.0),
|
| 285 |
+
float rotation = 0.0, // rotation in degrees
|
| 286 |
+
float2 scaling = float2(1.0, 1.0),
|
| 287 |
+
uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw,
|
| 288 |
+
uniform int uv_space = 0
|
| 289 |
+
)
|
| 290 |
+
{
|
| 291 |
+
float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f;
|
| 292 |
+
float4x4 scale =
|
| 293 |
+
float4x4(1.0 /scaling.x, 0. , 0. , 0.,
|
| 294 |
+
0. , 1.0 /scaling.y , 0. , 0.,
|
| 295 |
+
0. , 0. , 1.0, 0.,
|
| 296 |
+
translation.x , translation.y , 0.0, 1.);
|
| 297 |
+
|
| 298 |
+
float s = ::math::sin(rotation_rad);
|
| 299 |
+
float c = ::math::cos(rotation_rad);
|
| 300 |
+
float4x4 rotate =
|
| 301 |
+
float4x4( c , -s , 0.0 , 0.0,
|
| 302 |
+
s , c , 0.0 , 0.0,
|
| 303 |
+
0.0, 0.0 , 1.0 , 0.0,
|
| 304 |
+
0. , 0.0 , 0.0 , 1.);
|
| 305 |
+
|
| 306 |
+
return transform_coordinate_2(scale*rotate, ::base::coordinate_source(system, uv_space));
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
export material Semi_Aniline_Leather(
|
| 310 |
+
uniform bool infinite_tiling = true [[
|
| 311 |
+
::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."),
|
| 312 |
+
::anno::display_name("Infinite Tiling"),
|
| 313 |
+
::anno::in_group("Appearance")
|
| 314 |
+
]],
|
| 315 |
+
float bump_strength = 0.3f [[
|
| 316 |
+
::anno::description("Specifies the strength of the bump."),
|
| 317 |
+
::anno::display_name("Bump Strength"),
|
| 318 |
+
::anno::in_group("Appearance"),
|
| 319 |
+
::anno::hard_range(0.f, 1.f)
|
| 320 |
+
]],
|
| 321 |
+
color leather_color = color(0.176774f, 0.056374f, 0.012664f) [[
|
| 322 |
+
::anno::description("Choose the color of the front side."),
|
| 323 |
+
::anno::display_name("Color Front"),
|
| 324 |
+
::anno::in_group("Appearance", "Front")
|
| 325 |
+
]],
|
| 326 |
+
float diffuse_brightness_front = 0.3f [[
|
| 327 |
+
::anno::description("Adjusts the lightness of the material"),
|
| 328 |
+
::anno::display_name("Brightness Front"),
|
| 329 |
+
::anno::in_group("Appearance", "Front"),
|
| 330 |
+
::anno::hard_range(0.f, 1.f)
|
| 331 |
+
]],
|
| 332 |
+
float reflection_roughness_front = 0.15f [[
|
| 333 |
+
::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."),
|
| 334 |
+
::anno::display_name("Roughness Front"),
|
| 335 |
+
::anno::in_group("Appearance", "Front"),
|
| 336 |
+
::anno::hard_range(0.f, 1.f)
|
| 337 |
+
]],
|
| 338 |
+
float imperfections_dust = 0.07f [[
|
| 339 |
+
::anno::description("Adds specular variation to the roughness."),
|
| 340 |
+
::anno::display_name("Imperfection Dust"),
|
| 341 |
+
::anno::in_group("Appearance", "Front", "Imperfections"),
|
| 342 |
+
::anno::hard_range(0.f, 1.f)
|
| 343 |
+
]],
|
| 344 |
+
float imperfections_grunge = 0.13f [[
|
| 345 |
+
::anno::description("Adds specular variation to the roughness."),
|
| 346 |
+
::anno::display_name("Imperfection Grunge"),
|
| 347 |
+
::anno::in_group("Appearance", "Front", "Imperfections"),
|
| 348 |
+
::anno::hard_range(0.f, 1.f)
|
| 349 |
+
]],
|
| 350 |
+
float imperfections_smudges = 0.87f [[
|
| 351 |
+
::anno::description("Adds specular variation to the roughness."),
|
| 352 |
+
::anno::display_name("Imperfection Smudges"),
|
| 353 |
+
::anno::in_group("Appearance", "Front", "Imperfections"),
|
| 354 |
+
::anno::hard_range(0.f, 1.f)
|
| 355 |
+
]],
|
| 356 |
+
color color_back_leather = color(0.098689f, 0.046149f, 0.020951f) [[
|
| 357 |
+
::anno::description("Choose the color of the back side."),
|
| 358 |
+
::anno::display_name("Color Back"),
|
| 359 |
+
::anno::in_group("Appearance", "Back")
|
| 360 |
+
]],
|
| 361 |
+
float color_brightness_back = 0.5f [[
|
| 362 |
+
::anno::description("Adjusts the lightness of the material"),
|
| 363 |
+
::anno::display_name("Brightness Back"),
|
| 364 |
+
::anno::in_group("Appearance", "Back"),
|
| 365 |
+
::anno::hard_range(0.f, 1.f)
|
| 366 |
+
]],
|
| 367 |
+
float reflection_roughness_back = 0.65f [[
|
| 368 |
+
::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."),
|
| 369 |
+
::anno::display_name("Roughness Back"),
|
| 370 |
+
::anno::in_group("Appearance", "Back"),
|
| 371 |
+
::anno::hard_range(0.f, 1.f)
|
| 372 |
+
]],
|
| 373 |
+
uniform bool dirt_back_on_off = false [[
|
| 374 |
+
::anno::description("Switch on and off the dirt layer on the backside."),
|
| 375 |
+
::anno::display_name("Dirt Back"),
|
| 376 |
+
::anno::in_group("Appearance", "Dirt")
|
| 377 |
+
]],
|
| 378 |
+
color dirt_color = color(0.160444f, 0.016988f, 0.016988f) [[
|
| 379 |
+
::anno::description("Choose the color of the dirt layer."),
|
| 380 |
+
::anno::display_name("Dirt Color"),
|
| 381 |
+
::anno::in_group("Appearance", "Dirt")
|
| 382 |
+
]],
|
| 383 |
+
float softness = 0.66f [[
|
| 384 |
+
::anno::description("Adjust the transition between dirt and leather. From hard to soft."),
|
| 385 |
+
::anno::display_name("Dirt Softness"),
|
| 386 |
+
::anno::in_group("Appearance", "Dirt"),
|
| 387 |
+
::anno::hard_range(0.f, 1.f)
|
| 388 |
+
]],
|
| 389 |
+
float position = 0.25f [[
|
| 390 |
+
::anno::description("Adjust the intensity through position."),
|
| 391 |
+
::anno::display_name("Dirt Amount"),
|
| 392 |
+
::anno::in_group("Appearance", "Dirt"),
|
| 393 |
+
::anno::hard_range(0.f, 1.f)
|
| 394 |
+
]],
|
| 395 |
+
float2 texture_translate = float2(0.f) [[
|
| 396 |
+
::anno::description("Controls the position of the texture."),
|
| 397 |
+
::anno::display_name("Translate"),
|
| 398 |
+
::anno::in_group("Transform")
|
| 399 |
+
]],
|
| 400 |
+
float texture_rotate = 0.f [[
|
| 401 |
+
::anno::description("Rotates angle of the texture in degrees."),
|
| 402 |
+
::anno::display_name("Rotate"),
|
| 403 |
+
::anno::in_group("Transform")
|
| 404 |
+
]],
|
| 405 |
+
float2 texture_scale = float2(1.0f) [[
|
| 406 |
+
::anno::description("Larger numbers increase the size."),
|
| 407 |
+
::anno::display_name("Scale"),
|
| 408 |
+
::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)),
|
| 409 |
+
::preview_scale(2.5f),
|
| 410 |
+
::anno::in_group("Transform")
|
| 411 |
+
]],
|
| 412 |
+
uniform bool round_corners = false [[
|
| 413 |
+
::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are rquired to evaluate the round corner effect"),
|
| 414 |
+
::anno::display_name("Round Corners"),
|
| 415 |
+
::anno::in_group("Round Corners")
|
| 416 |
+
]],
|
| 417 |
+
uniform float radius = 1.5f [[
|
| 418 |
+
::anno::description("Radius of the rounded corners"),
|
| 419 |
+
::anno::display_name("Radius mm"),
|
| 420 |
+
::anno::in_group("Round Corners"),
|
| 421 |
+
::anno::soft_range(0.f, 10.f)
|
| 422 |
+
]],
|
| 423 |
+
uniform bool across_materials = true [[
|
| 424 |
+
::anno::description("Applies the round corner effect across different materials when enabled."),
|
| 425 |
+
::anno::display_name("Across Materials"),
|
| 426 |
+
::anno::in_group("Round Corners")
|
| 427 |
+
]],
|
| 428 |
+
uniform int uv_space_index = 0 [[
|
| 429 |
+
::anno::description("Use selected UV space for material"),
|
| 430 |
+
::anno::display_name("UV Space Index"),
|
| 431 |
+
::anno::in_group("Advanced")
|
| 432 |
+
]])
|
| 433 |
+
[[
|
| 434 |
+
::anno::description(DESCRIPTION),
|
| 435 |
+
::anno::display_name("Semi Aniline Leather"),
|
| 436 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 437 |
+
::anno::key_words(string[]("leather", "infinite", "tiling", "new", "natural", "bumped", "interior", "cloth", "warm", "soft", "aniline", "semi")),
|
| 438 |
+
::anno::author("Nvidia vMaterials"),
|
| 439 |
+
::anno::contributor("Maik Rohland"),
|
| 440 |
+
::anno::contributor("Ruediger Raab"),
|
| 441 |
+
::anno::thumbnail("./.thumbs/Semi_Aniline_Leather.Semi_Aniline_Leather.png")
|
| 442 |
+
]]
|
| 443 |
+
=
|
| 444 |
+
let {
|
| 445 |
+
float2 texture_scale_rescaled = texture_scale / 5.0f;
|
| 446 |
+
bool tmp0 = true;
|
| 447 |
+
|
| 448 |
+
material_surface tmp1(::df::weighted_layer(::math::pow(::math::lerp(0.f, 1.f, ::math::smoothstep(::math::lerp(1.f, 0.f, position) - softness, ::math::lerp(1.f, 0.f, position) + softness, float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.708999991f, 0.393999994f, 0.836000025f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1])), 2.43300009f), ::df::diffuse_reflection_bsdf(dirt_color, 0.800000012f), ::df::custom_curve_layer(0.0399999991f, 1.f, 5.f, histogram_scan_big(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.708999991f, 0.393999994f, 0.836000025f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 0.761000037f, 0.582000017f), ::df::microfacet_ggx_smith_bsdf(((float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[0] * imperfections_dust + histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.708999991f, 0.393999994f, 0.836000025f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.5f, ::math::lerp(0.286000013f, 0.75f, reflection_roughness_front)) + (float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[1] * imperfections_grunge + (float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[2] * imperfections_smudges) * ((float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[0] * imperfections_dust + histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.708999991f, 0.393999994f, 0.836000025f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.5f, ::math::lerp(0.286000013f, 0.75f, reflection_roughness_front)) + (float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[1] * imperfections_grunge + (float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[2] * imperfections_smudges), ((float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[0] * imperfections_dust + histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.708999991f, 0.393999994f, 0.836000025f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.5f, ::math::lerp(0.286000013f, 0.75f, reflection_roughness_front)) + (float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[1] * imperfections_grunge + (float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[2] * imperfections_smudges) * ((float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[0] * imperfections_dust + histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.708999991f, 0.393999994f, 0.836000025f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.5f, ::math::lerp(0.286000013f, 0.75f, reflection_roughness_front)) + (float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[1] * imperfections_grunge + (float3(infinite_tiling ? endless_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 10.f, float3(0.453999996f, 0.832000017f, 0.513999999f), 8.f, false) : ::base::file_texture(texture_2d("./textures/multi_R_dust_G_grunge_B_leather.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) - 0.5f)[2] * imperfections_smudges), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(1.f, ::df::diffuse_reflection_bsdf(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(leather_color, (infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_front_diff.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.363999993f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_front_diff.jpg", ::tex::gamma_srgb), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) * color(::math::lerp(0.f, 3.f, diffuse_brightness_front)), ::base::color_layer_overlay, histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.708999991f, 0.393999994f, 0.836000025f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 0.796000063f, 0.784000039f)).tint, color(histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.708999991f, 0.393999994f, 0.836000025f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.5f, ::math::lerp(0.286000013f, 0.75f, reflection_roughness_front))), ::base::color_layer_brightness, 0.449999988f).tint, 0.f), bsdf(), infinite_tiling ? endless_normal(texture_2d("./textures/semi_aniline_front_norm.jpg", ::tex::gamma_linear), ::math::lerp(0.f, 2.5f, bump_strength), false, false, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.476999998f, 0.474000007f, 0.987999976f), 8.f) : normalmap_normal(texture_2d("./textures/semi_aniline_front_norm.jpg", ::tex::gamma_linear), ::math::lerp(0.f, 2.5f, bump_strength), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index))), infinite_tiling ? endless_normal(texture_2d("./textures/semi_aniline_front_norm.jpg", ::tex::gamma_linear), ::math::lerp(0.f, 2.5f, bump_strength), false, false, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.476999998f, 0.474000007f, 0.987999976f), 8.f) : normalmap_normal(texture_2d("./textures/semi_aniline_front_norm.jpg", ::tex::gamma_linear), ::math::lerp(0.f, 2.5f, bump_strength), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index))), ::state::normal()), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance));
|
| 449 |
+
material_surface tmp2(dirt_back_on_off ? ::df::weighted_layer(::math::pow(::math::lerp(0.f, 1.f, ::math::smoothstep(::math::lerp(1.f, 0.f, position) - softness, ::math::lerp(1.f, 0.f, position) + softness, float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.708999991f, 0.393999994f, 0.836000025f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_front_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1])), 2.43300009f), ::df::diffuse_reflection_bsdf(dirt_color, 0.800000012f), ::df::custom_curve_layer(0.0399999991f, 1.f, 5.f, histogram_scan_big(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 0.421000034f, 0.625f), ::df::microfacet_ggx_smith_bsdf(histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 1.f, ::math::lerp(0.349999994f, 0.649999976f, reflection_roughness_back)) * histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 1.f, ::math::lerp(0.349999994f, 0.649999976f, reflection_roughness_back)), histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 1.f, ::math::lerp(0.349999994f, 0.649999976f, reflection_roughness_back)) * histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 1.f, ::math::lerp(0.349999994f, 0.649999976f, reflection_roughness_back)), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(1.f, ::df::diffuse_reflection_bsdf(nvidia::core_definitions::blend_colors(color_back_leather, (infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_diff.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.492000014f, 0.43900001f, 0.375f), 8.f, true) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_diff.jpg", ::tex::gamma_srgb), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) * color(::math::lerp(0.f, 2.f, color_brightness_back)), ::base::color_layer_overlay, histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1], 1.f, 0.754000008f)).tint, 0.f), bsdf(), infinite_tiling ? endless_normal(texture_2d("./textures/semi_aniline_back_norm.jpg", ::tex::gamma_linear), 1.f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.527999997f, 0.5f, 0.995999992f), 8.f) : normalmap_normal(texture_2d("./textures/semi_aniline_back_norm.jpg", ::tex::gamma_linear), ::math::lerp(0.f, 2.5f, bump_strength), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index))), infinite_tiling ? endless_normal(texture_2d("./textures/semi_aniline_back_norm.jpg", ::tex::gamma_linear), 1.f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.527999997f, 0.5f, 0.995999992f), 8.f) : normalmap_normal(texture_2d("./textures/semi_aniline_back_norm.jpg", ::tex::gamma_linear), ::math::lerp(0.f, 2.5f, bump_strength), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index))), ::state::normal()) : ::df::custom_curve_layer(0.0399999991f, 1.f, 5.f, histogram_scan_big(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 0.421000034f, 0.625f), ::df::microfacet_ggx_smith_bsdf(histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 1.f, ::math::lerp(0.349999994f, 0.649999976f, reflection_roughness_back)) * histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 1.f, ::math::lerp(0.349999994f, 0.649999976f, reflection_roughness_back)), histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 1.f, ::math::lerp(0.349999994f, 0.649999976f, reflection_roughness_back)) * histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 1.f, ::math::lerp(0.349999994f, 0.649999976f, reflection_roughness_back)), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(1.f, ::df::diffuse_reflection_bsdf(nvidia::core_definitions::blend_colors(color_back_leather, (infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_diff.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.492000014f, 0.43900001f, 0.375f), 8.f, true) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_diff.jpg", ::tex::gamma_srgb), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint) * color(::math::lerp(0.f, 2.f, color_brightness_back)), ::base::color_layer_overlay, histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.688000023f, 0.890999973f, 0.536000013f), 8.f, false) : ::base::file_texture(texture_2d("./textures/semi_aniline_back_multi_rough_ao_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1], 1.f, 0.754000008f)).tint, 0.f), bsdf(), infinite_tiling ? endless_normal(texture_2d("./textures/semi_aniline_back_norm.jpg", ::tex::gamma_linear), 1.f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.527999997f, 0.5f, 0.995999992f), 8.f) : normalmap_normal(texture_2d("./textures/semi_aniline_back_norm.jpg", ::tex::gamma_linear), ::math::lerp(0.f, 2.5f, bump_strength), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index))), infinite_tiling ? endless_normal(texture_2d("./textures/semi_aniline_back_norm.jpg", ::tex::gamma_linear), 1.f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.527999997f, 0.5f, 0.995999992f), 8.f) : normalmap_normal(texture_2d("./textures/semi_aniline_back_norm.jpg", ::tex::gamma_linear), ::math::lerp(0.f, 2.5f, bump_strength), vmat_transform(texture_translate, texture_rotate, texture_scale_rescaled, ::base::texture_coordinate_uvw, uv_space_index))), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance));
|
| 450 |
+
color tmp3 = color(1.f, 1.f, 1.f);
|
| 451 |
+
material_geometry tmp5(float3(0.f), 1.f, round_corners ? ::state::rounded_corner_normal(radius * 0.00100000005f, across_materials, 1.f) : ::state::normal());
|
| 452 |
+
} in
|
| 453 |
+
material(
|
| 454 |
+
thin_walled: tmp0,
|
| 455 |
+
surface: tmp1,
|
| 456 |
+
backface: tmp2,
|
| 457 |
+
ior: tmp3,
|
| 458 |
+
geometry: tmp5);
|
| 459 |
+
|
| 460 |
+
export material Semi_Aniline_Black(*)
|
| 461 |
+
[[
|
| 462 |
+
::anno::description(DESCRIPTION),
|
| 463 |
+
::anno::display_name("Black Semi Aniline Leather"),
|
| 464 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 465 |
+
::anno::key_words(string[]("black", "leather", "infinite", "tiling", "new", "natural", "bumped", "interior", "cloth", "warm", "soft", "aniline", "semi")),
|
| 466 |
+
::anno::author("Nvidia vMaterials"),
|
| 467 |
+
::anno::contributor("Maik Rohland"),
|
| 468 |
+
::anno::contributor("Ruediger Raab"),
|
| 469 |
+
::anno::thumbnail("./.thumbs/Semi_Aniline_Leather.Semi_Aniline_Black.png")
|
| 470 |
+
]]
|
| 471 |
+
= Semi_Aniline_Leather
|
| 472 |
+
(
|
| 473 |
+
infinite_tiling: true,
|
| 474 |
+
bump_strength: 0.3f,
|
| 475 |
+
leather_color: color(0.009021f, 0.009021f, 0.009021f),
|
| 476 |
+
diffuse_brightness_front: 0.3f,
|
| 477 |
+
reflection_roughness_front: 0.15f,
|
| 478 |
+
imperfections_dust: 0.07f,
|
| 479 |
+
imperfections_grunge: 0.13f,
|
| 480 |
+
imperfections_smudges: 0.87f,
|
| 481 |
+
color_back_leather: color(0.034230f, 0.034230f, 0.034230f),
|
| 482 |
+
color_brightness_back: 0.65f,
|
| 483 |
+
reflection_roughness_back: 0.65f,
|
| 484 |
+
dirt_back_on_off: true,
|
| 485 |
+
dirt_color: color(0.067725f, 0.067725f, 0.067725f),
|
| 486 |
+
softness: 0.66f,
|
| 487 |
+
position: 0.25f,
|
| 488 |
+
texture_translate: float2(0.0f),
|
| 489 |
+
texture_rotate: 0.0f,
|
| 490 |
+
texture_scale: float2(1.0f),
|
| 491 |
+
round_corners: false,
|
| 492 |
+
radius: 1.5f,
|
| 493 |
+
across_materials: true,
|
| 494 |
+
uv_space_index: 0
|
| 495 |
+
);
|
| 496 |
+
|
| 497 |
+
export material Semi_Aniline_Red(*)
|
| 498 |
+
[[
|
| 499 |
+
::anno::description(DESCRIPTION),
|
| 500 |
+
::anno::display_name("Red Semi Aniline Leather"),
|
| 501 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 502 |
+
::anno::key_words(string[]("red", "leather", "infinite", "tiling", "new", "natural", "bumped", "interior", "cloth", "warm", "soft", "aniline", "semi")),
|
| 503 |
+
::anno::author("Nvidia vMaterials"),
|
| 504 |
+
::anno::contributor("Maik Rohland"),
|
| 505 |
+
::anno::contributor("Ruediger Raab"),
|
| 506 |
+
::anno::thumbnail("./.thumbs/Semi_Aniline_Leather.Semi_Aniline_Red.png")
|
| 507 |
+
]]
|
| 508 |
+
= Semi_Aniline_Leather
|
| 509 |
+
(
|
| 510 |
+
infinite_tiling: true,
|
| 511 |
+
bump_strength: 0.3f,
|
| 512 |
+
leather_color: color(0.160444f, 0.007751f, 0.007751f),
|
| 513 |
+
diffuse_brightness_front: 0.3f,
|
| 514 |
+
reflection_roughness_front: 0.15f,
|
| 515 |
+
imperfections_dust: 0.07f,
|
| 516 |
+
imperfections_grunge: 0.13f,
|
| 517 |
+
imperfections_smudges: 0.87f,
|
| 518 |
+
color_back_leather: color(0.180144f,0.065754f,0.065754f),
|
| 519 |
+
color_brightness_back: 0.65f,
|
| 520 |
+
reflection_roughness_back: 0.65f,
|
| 521 |
+
dirt_back_on_off: true,
|
| 522 |
+
dirt_color: color(0.160444f, 0.007751f, 0.007751f),
|
| 523 |
+
softness: 0.66f,
|
| 524 |
+
position: 0.25f,
|
| 525 |
+
texture_translate: float2(0.0f),
|
| 526 |
+
texture_rotate: 0.0f,
|
| 527 |
+
texture_scale: float2(1.0f),
|
| 528 |
+
round_corners: false,
|
| 529 |
+
radius: 1.5f,
|
| 530 |
+
across_materials: true,
|
| 531 |
+
uv_space_index: 0
|
| 532 |
+
);
|
| 533 |
+
|
| 534 |
+
export material Semi_Aniline_Peach(*)
|
| 535 |
+
[[
|
| 536 |
+
::anno::description(DESCRIPTION),
|
| 537 |
+
::anno::display_name("Peach Semi Aniline Leather"),
|
| 538 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 539 |
+
::anno::key_words(string[]("peach", "leather", "infinite", "tiling", "new", "natural", "bumped", "interior", "cloth", "warm", "soft", "aniline", "semi")),
|
| 540 |
+
::anno::author("Nvidia vMaterials"),
|
| 541 |
+
::anno::contributor("Maik Rohland"),
|
| 542 |
+
::anno::contributor("Ruediger Raab"),
|
| 543 |
+
::anno::thumbnail("./.thumbs/Semi_Aniline_Leather.Semi_Aniline_Peach.png")
|
| 544 |
+
]]
|
| 545 |
+
= Semi_Aniline_Leather
|
| 546 |
+
(
|
| 547 |
+
infinite_tiling: true,
|
| 548 |
+
bump_strength: 0.4f,
|
| 549 |
+
leather_color: color(0.827726f, 0.103634f, 0.037029f),
|
| 550 |
+
diffuse_brightness_front: 0.5f,
|
| 551 |
+
reflection_roughness_front: 0.22f,
|
| 552 |
+
imperfections_dust: 0.074f,
|
| 553 |
+
imperfections_grunge: 0.124f,
|
| 554 |
+
imperfections_smudges: 0.342f,
|
| 555 |
+
color_back_leather: color(0.774227f,0.302125f,0.238828f),
|
| 556 |
+
color_brightness_back: 0.7f,
|
| 557 |
+
reflection_roughness_back: 0.533f,
|
| 558 |
+
dirt_back_on_off: true,
|
| 559 |
+
dirt_color: color(0.160444f, 0.007751f, 0.007751f),
|
| 560 |
+
softness: 0.807f,
|
| 561 |
+
position: 0.22f,
|
| 562 |
+
texture_translate: float2(0.0f),
|
| 563 |
+
texture_rotate: 0.0f,
|
| 564 |
+
texture_scale: float2(1.0f),
|
| 565 |
+
round_corners: false,
|
| 566 |
+
radius: 1.5f,
|
| 567 |
+
across_materials: true,
|
| 568 |
+
uv_space_index: 0
|
| 569 |
+
);
|
| 570 |
+
|
| 571 |
+
export material Semi_Aniline_Mint(*)
|
| 572 |
+
[[
|
| 573 |
+
::anno::description(DESCRIPTION),
|
| 574 |
+
::anno::display_name("Mint Semi Aniline Leather"),
|
| 575 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 576 |
+
::anno::key_words(string[]("mint", "leather", "infinite", "tiling", "new", "natural", "bumped", "interior", "cloth", "soft", "aniline", "semi")),
|
| 577 |
+
::anno::author("Nvidia vMaterials"),
|
| 578 |
+
::anno::contributor("Maik Rohland"),
|
| 579 |
+
::anno::contributor("Ruediger Raab"),
|
| 580 |
+
::anno::thumbnail("./.thumbs/Semi_Aniline_Leather.Semi_Aniline_Mint.png")
|
| 581 |
+
]]
|
| 582 |
+
= Semi_Aniline_Leather
|
| 583 |
+
(
|
| 584 |
+
infinite_tiling: true,
|
| 585 |
+
bump_strength: 0.4f,
|
| 586 |
+
leather_color: color(0.431340f, 0.453456f, 0.280124f),
|
| 587 |
+
diffuse_brightness_front: 0.696f,
|
| 588 |
+
reflection_roughness_front: 0.22f,
|
| 589 |
+
imperfections_dust: 0.074f,
|
| 590 |
+
imperfections_grunge: 0.124f,
|
| 591 |
+
imperfections_smudges: 0.342f,
|
| 592 |
+
color_back_leather: color(0.547994f,0.560499f,0.459080f),
|
| 593 |
+
color_brightness_back: 0.88f,
|
| 594 |
+
reflection_roughness_back: 0.533f,
|
| 595 |
+
dirt_back_on_off: true,
|
| 596 |
+
dirt_color: color(0.154152f, 0.160444f, 0.106156f),
|
| 597 |
+
softness: 0.8f,
|
| 598 |
+
position: 0.25f,
|
| 599 |
+
texture_translate: float2(0.0f),
|
| 600 |
+
texture_rotate: 0.0f,
|
| 601 |
+
texture_scale: float2(1.0f),
|
| 602 |
+
round_corners: false,
|
| 603 |
+
radius: 1.5f,
|
| 604 |
+
across_materials: true,
|
| 605 |
+
uv_space_index: 0
|
| 606 |
+
);
|
| 607 |
+
|
| 608 |
+
export material Semi_Aniline_Orange(*)
|
| 609 |
+
[[
|
| 610 |
+
::anno::description(DESCRIPTION),
|
| 611 |
+
::anno::display_name("Orange Semi Aniline Leather"),
|
| 612 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 613 |
+
::anno::key_words(string[]("orange", "leather", "infinite", "tiling", "new", "natural", "bumped", "interior", "cloth", "warm", "soft", "aniline", "semi")),
|
| 614 |
+
::anno::author("Nvidia vMaterials"),
|
| 615 |
+
::anno::contributor("Maik Rohland"),
|
| 616 |
+
::anno::contributor("Ruediger Raab"),
|
| 617 |
+
::anno::thumbnail("./.thumbs/Semi_Aniline_Leather.Semi_Aniline_Orange.png")
|
| 618 |
+
]]
|
| 619 |
+
= Semi_Aniline_Leather
|
| 620 |
+
(
|
| 621 |
+
infinite_tiling: true,
|
| 622 |
+
bump_strength: 0.45f,
|
| 623 |
+
leather_color: color(0.680020f, 0.130352f, 0.016988f),
|
| 624 |
+
diffuse_brightness_front: 0.5f,
|
| 625 |
+
reflection_roughness_front: 0.22f,
|
| 626 |
+
imperfections_dust: 0.074f,
|
| 627 |
+
imperfections_grunge: 0.124f,
|
| 628 |
+
imperfections_smudges: 0.342f,
|
| 629 |
+
color_back_leather: color(0.605484f,0.363604f,0.212044f),
|
| 630 |
+
color_brightness_back: 0.2f,
|
| 631 |
+
reflection_roughness_back: 0.533f,
|
| 632 |
+
dirt_back_on_off: true,
|
| 633 |
+
dirt_color: color(0.666117f, 0.409826f, 0.028991f),
|
| 634 |
+
softness: 0.615f,
|
| 635 |
+
position: 0.25f,
|
| 636 |
+
texture_translate: float2(0.0f),
|
| 637 |
+
texture_rotate: 0.0f,
|
| 638 |
+
texture_scale: float2(1.0f),
|
| 639 |
+
round_corners: false,
|
| 640 |
+
radius: 1.5f,
|
| 641 |
+
across_materials: true,
|
| 642 |
+
uv_space_index: 0
|
| 643 |
+
);
|
| 644 |
+
|
| 645 |
+
export material Semi_Aniline_Lemon(*)
|
| 646 |
+
[[
|
| 647 |
+
::anno::description(DESCRIPTION),
|
| 648 |
+
::anno::display_name("Lemon Semi Aniline Leather"),
|
| 649 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 650 |
+
::anno::key_words(string[]("lemon", "leather", "infinite", "tiling", "new", "natural", "bumped", "interior", "cloth", "warm", "soft", "aniline", "semi")),
|
| 651 |
+
::anno::author("Nvidia vMaterials"),
|
| 652 |
+
::anno::contributor("Maik Rohland"),
|
| 653 |
+
::anno::contributor("Ruediger Raab"),
|
| 654 |
+
::anno::thumbnail("./.thumbs/Semi_Aniline_Leather.Semi_Aniline_Lemon.png")
|
| 655 |
+
|
| 656 |
+
]]
|
| 657 |
+
= Semi_Aniline_Leather
|
| 658 |
+
(
|
| 659 |
+
infinite_tiling: true,
|
| 660 |
+
bump_strength: 0.4f,
|
| 661 |
+
leather_color: color(0.796917f, 0.585973f, 0.011126f),
|
| 662 |
+
diffuse_brightness_front: 0.3f,
|
| 663 |
+
reflection_roughness_front: 0.22f,
|
| 664 |
+
imperfections_dust: 0.074f,
|
| 665 |
+
imperfections_grunge: 0.124f,
|
| 666 |
+
imperfections_smudges: 0.342f,
|
| 667 |
+
color_back_leather: color(0.774227f,0.729919f,0.499505f),
|
| 668 |
+
color_brightness_back: 0.176f,
|
| 669 |
+
reflection_roughness_back: 0.533f,
|
| 670 |
+
dirt_back_on_off: true,
|
| 671 |
+
dirt_color: color(0.425905f, 0.054592f, 0.012664f),
|
| 672 |
+
softness: 0.615f,
|
| 673 |
+
position: 0.3f,
|
| 674 |
+
texture_translate: float2(0.0f),
|
| 675 |
+
texture_rotate: 0.0f,
|
| 676 |
+
texture_scale: float2(1.0f),
|
| 677 |
+
round_corners: false,
|
| 678 |
+
radius: 1.5f,
|
| 679 |
+
across_materials: true,
|
| 680 |
+
uv_space_index: 0
|
| 681 |
+
);
|
| 682 |
+
|
| 683 |
+
export material Semi_Aniline_Salmon(*)
|
| 684 |
+
[[
|
| 685 |
+
::anno::description(DESCRIPTION),
|
| 686 |
+
::anno::display_name("Salmon Semi Aniline Leather"),
|
| 687 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 688 |
+
::anno::key_words(string[]("salmon", "leather", "infinite", "tiling", "new", "natural", "bumped", "interior", "cloth", "warm", "soft", "aniline", "semi")),
|
| 689 |
+
::anno::author("Nvidia vMaterials"),
|
| 690 |
+
::anno::contributor("Maik Rohland"),
|
| 691 |
+
::anno::contributor("Ruediger Raab"),
|
| 692 |
+
::anno::thumbnail("./.thumbs/Semi_Aniline_Leather.Semi_Aniline_Salmon.png")
|
| 693 |
+
]]
|
| 694 |
+
= Semi_Aniline_Leather
|
| 695 |
+
(
|
| 696 |
+
infinite_tiling: true,
|
| 697 |
+
bump_strength: 0.4f,
|
| 698 |
+
leather_color: color(0.812241f, 0.204710f, 0.190463f),
|
| 699 |
+
diffuse_brightness_front: 0.5f,
|
| 700 |
+
reflection_roughness_front: 0.22f,
|
| 701 |
+
imperfections_dust: 0.074f,
|
| 702 |
+
imperfections_grunge: 0.124f,
|
| 703 |
+
imperfections_smudges: 0.342f,
|
| 704 |
+
color_back_leather: color(0.751895f,0.579547f,0.573159f),
|
| 705 |
+
color_brightness_back: 0.2f,
|
| 706 |
+
reflection_roughness_back: 0.533f,
|
| 707 |
+
dirt_back_on_off: true,
|
| 708 |
+
dirt_color: color(0.592438f, 0.124741f, 0.069727f),
|
| 709 |
+
softness: 0.801f,
|
| 710 |
+
position: 0.25f,
|
| 711 |
+
texture_translate: float2(0.0f),
|
| 712 |
+
texture_rotate: 0.0f,
|
| 713 |
+
texture_scale: float2(1.0f),
|
| 714 |
+
round_corners: false,
|
| 715 |
+
radius: 1.5f,
|
| 716 |
+
across_materials: true,
|
| 717 |
+
uv_space_index: 0
|
| 718 |
+
);
|
EXLS1/simready_usd/materials/Stainless_Steel.mdl
ADDED
|
@@ -0,0 +1,1543 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/******************************************************************************
|
| 2 |
+
* Copyright 2022 NVIDIA Corporation. All rights reserved. *
|
| 3 |
+
******************************************************************************
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge,
|
| 6 |
+
to any person obtaining a copy of the sample definition code that uses our
|
| 7 |
+
Material Definition Language (the "MDL Materials"), to reproduce and distribute
|
| 8 |
+
the MDL Materials, including without limitation the rights to use, copy, merge,
|
| 9 |
+
publish, distribute, and sell modified and unmodified copies of the MDL
|
| 10 |
+
Materials, and to permit persons to whom the MDL Materials is furnished to do
|
| 11 |
+
so, in all cases solely for use with NVIDIA's Material Definition Language,
|
| 12 |
+
subject to the following further conditions:
|
| 13 |
+
|
| 14 |
+
1. The above copyright notices, this list of conditions, and the disclaimer
|
| 15 |
+
that follows shall be retained in all copies of one or more of the MDL
|
| 16 |
+
Materials, including in any software with which the MDL Materials are bundled,
|
| 17 |
+
redistributed, and/or sold, and included either as stand-alone text files,
|
| 18 |
+
human-readable headers or in the appropriate machine-readable metadata fields
|
| 19 |
+
within text or binary files as long as those fields can be easily viewed by the
|
| 20 |
+
user, as applicable.
|
| 21 |
+
2. The name of NVIDIA shall not be used to promote, endorse or advertise any
|
| 22 |
+
Modified Version without specific prior written permission, except a) to comply
|
| 23 |
+
with the notice requirements otherwise contained herein; or b) to acknowledge
|
| 24 |
+
the contribution(s) of NVIDIA.
|
| 25 |
+
|
| 26 |
+
THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
| 27 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
|
| 28 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
|
| 29 |
+
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR
|
| 30 |
+
ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL,
|
| 31 |
+
INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF
|
| 32 |
+
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE
|
| 33 |
+
THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.
|
| 34 |
+
*/
|
| 35 |
+
|
| 36 |
+
mdl 1.6;
|
| 37 |
+
|
| 38 |
+
import ::anno::*;
|
| 39 |
+
import ::base::*;
|
| 40 |
+
import ::df::*;
|
| 41 |
+
import ::math::*;
|
| 42 |
+
import ::state::*;
|
| 43 |
+
import ::tex::*;
|
| 44 |
+
import ::nvidia::core_definitions::blend_colors;
|
| 45 |
+
import ::nvidia::core_definitions::dimension;
|
| 46 |
+
|
| 47 |
+
const string COPYRIGHT =
|
| 48 |
+
" Copyright 2022 NVIDIA Corporation. All rights reserved.\n"
|
| 49 |
+
" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n"
|
| 50 |
+
" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n"
|
| 51 |
+
" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n"
|
| 52 |
+
" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n"
|
| 53 |
+
" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n"
|
| 54 |
+
" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n"
|
| 55 |
+
" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n"
|
| 56 |
+
" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n"
|
| 57 |
+
" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n"
|
| 58 |
+
" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n";
|
| 59 |
+
|
| 60 |
+
const string DESCRIPTION =
|
| 61 |
+
"A stainless steel material with adjustable roughness and controls to add secondary effects \n"
|
| 62 |
+
"such as stains, smudges and mechanical damage";
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
float4 tile_select(uniform int select = 0)
|
| 66 |
+
{
|
| 67 |
+
switch (select)
|
| 68 |
+
{
|
| 69 |
+
case 0: return float4(0.000, 0.333, 0.666, 1.000);
|
| 70 |
+
case 1: return float4(0.333, 0.666, 0.666, 1.000);
|
| 71 |
+
case 2: return float4(0.666, 1.000, 0.666, 1.000);
|
| 72 |
+
|
| 73 |
+
case 3: return float4(0.000, 0.333, 0.333, 0.666);
|
| 74 |
+
case 4: return float4(0.333, 0.666, 0.333, 0.666);
|
| 75 |
+
case 5: return float4(0.666, 1.000, 0.333, 0.666);
|
| 76 |
+
|
| 77 |
+
case 6: return float4(0.000, 0.333, 0.000, 0.333);
|
| 78 |
+
case 7: return float4(0.333, 0.666, 0.000, 0.333);
|
| 79 |
+
case 8: return float4(0.666, 1.000, 0.000, 0.333);
|
| 80 |
+
|
| 81 |
+
default: return float4(0.000, 0.333, 0.000, 0.333);
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
export struct vm_coordinates
|
| 86 |
+
[[
|
| 87 |
+
::anno::hidden()
|
| 88 |
+
]]
|
| 89 |
+
{
|
| 90 |
+
float2 uv;
|
| 91 |
+
float rotation;
|
| 92 |
+
int uv_space_index;
|
| 93 |
+
float4 carry;
|
| 94 |
+
};
|
| 95 |
+
|
| 96 |
+
enum vm_mono_select
|
| 97 |
+
[[
|
| 98 |
+
anno::description("Modes for the creation of a gray-scale value from a color"),
|
| 99 |
+
anno::hidden()
|
| 100 |
+
]]
|
| 101 |
+
{
|
| 102 |
+
mono_r = 0,
|
| 103 |
+
mono_g = 1,
|
| 104 |
+
mono_b = 2,
|
| 105 |
+
mono_a = 3,
|
| 106 |
+
mono_average = 4
|
| 107 |
+
};
|
| 108 |
+
|
| 109 |
+
vm_coordinates vm_coord
|
| 110 |
+
(
|
| 111 |
+
float2 translation = float2(0.0f, 0.0) [[
|
| 112 |
+
::anno::display_name("Translation"),
|
| 113 |
+
::anno::description("Translates the coordinates")
|
| 114 |
+
]],
|
| 115 |
+
float rotation = 0.0f [[
|
| 116 |
+
::anno::display_name("Rotation"),
|
| 117 |
+
::anno::description("Rotates the coordinates in degrees")
|
| 118 |
+
]],
|
| 119 |
+
float2 scaling = float2(1.0f, 1.0f) [[
|
| 120 |
+
::anno::display_name("Scaling"),
|
| 121 |
+
::anno::description("Scales the coordinates")
|
| 122 |
+
]],
|
| 123 |
+
uniform int uv_space = 0 [[
|
| 124 |
+
::anno::display_name("UV Space"),
|
| 125 |
+
::anno::description("Chose the UV space")
|
| 126 |
+
]]
|
| 127 |
+
)
|
| 128 |
+
[[
|
| 129 |
+
::anno::display_name("vm Transform"),
|
| 130 |
+
::anno::description("Generates coordinates to be used in vm_lookup functions")
|
| 131 |
+
]]
|
| 132 |
+
{
|
| 133 |
+
vm_coordinates uv;
|
| 134 |
+
::base::texture_coordinate_info info = ::base::coordinate_source( ::base::texture_coordinate_uvw, uv_space);
|
| 135 |
+
uv.rotation = (rotation * 3.1415926535897932384626433832f) / 180.f;
|
| 136 |
+
uv.uv = float2(info.position.x, info.position.y);
|
| 137 |
+
float sine = ::math::sin(uv.rotation);
|
| 138 |
+
float cosine = ::math::cos(uv.rotation);
|
| 139 |
+
float2x2 rot = float2x2(cosine, -sine, sine, cosine);
|
| 140 |
+
uv.uv = rot * uv.uv;
|
| 141 |
+
uv.uv /= scaling;
|
| 142 |
+
uv.uv += translation;
|
| 143 |
+
return uv;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
vm_coordinates vm_coord_hex(
|
| 148 |
+
vm_coordinates uv,
|
| 149 |
+
float scale = 1.0f)
|
| 150 |
+
{
|
| 151 |
+
vm_coordinates uv_return;
|
| 152 |
+
float2 uv_ = float2(uv.uv.x, uv.uv.y);
|
| 153 |
+
|
| 154 |
+
// same as from function get_hex above
|
| 155 |
+
float2 s = float2(1.0f, 1.7320508f);
|
| 156 |
+
float2 n = uv_ - float2(0.5f, 1.0f);
|
| 157 |
+
float4 c = ::math::floor(float4(uv_.x, uv_.y, n.x, n.y)/float4(s.x, s.y, s.x, s.y)) + 0.5f;
|
| 158 |
+
float2 h_1 = uv_ - float2(c.x, c.y) * s;
|
| 159 |
+
float2 h_2 = uv_ - (float2(c.z, c.w) + float2(0.5f)) * s;
|
| 160 |
+
float4 uv_id = ::math::dot(h_1, h_1) < ::math::dot(h_2, h_2) ? float4(h_1.x, h_1.y, c.x, c.y) : float4(h_2.x, h_2.y, c.z, c.w);
|
| 161 |
+
|
| 162 |
+
uv_return.uv = float2(uv_id.x*scale+0.5, uv_id.y*scale+0.5);
|
| 163 |
+
// unless we introduce random cell rotations where we need to compensate for this in the rotation
|
| 164 |
+
// we can just plain copy the rotation value
|
| 165 |
+
uv_return.rotation = uv.rotation;
|
| 166 |
+
return uv_return;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
// Offsets a set of uv coordinates in either row (u) or column (v) direction
|
| 170 |
+
vm_coordinates vm_coord_rowcol_offset(
|
| 171 |
+
vm_coordinates uv,
|
| 172 |
+
float offset,
|
| 173 |
+
bool horizontal_offset = true
|
| 174 |
+
)
|
| 175 |
+
{
|
| 176 |
+
int index = horizontal_offset ? 0 : 1;
|
| 177 |
+
uv.uv[index] += ::math::floor(uv.uv[index ^ 1]) * offset;
|
| 178 |
+
return uv;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
vm_coordinates vm_coord_grid(
|
| 182 |
+
vm_coordinates uv,
|
| 183 |
+
float scale = 1.0f
|
| 184 |
+
)
|
| 185 |
+
{
|
| 186 |
+
float2x2 scal = float2x2(scale, 0., 0., scale);
|
| 187 |
+
uv.uv = ::math::frac(uv.uv);
|
| 188 |
+
uv.uv -= 0.5f;
|
| 189 |
+
uv.uv = scal * uv.uv;
|
| 190 |
+
uv.uv = uv.uv + 0.5f;
|
| 191 |
+
return uv;
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
::base::texture_return vm_tex_lookup(
|
| 195 |
+
uniform texture_2d tex,
|
| 196 |
+
vm_coordinates uv = vm_coord(),
|
| 197 |
+
uniform vm_mono_select mono_source = mono_a,
|
| 198 |
+
float4 scale = float4(1.0f),
|
| 199 |
+
|
| 200 |
+
uniform ::tex::wrap_mode wrap_u = ::tex::wrap_repeat,
|
| 201 |
+
uniform ::tex::wrap_mode wrap_v = ::tex::wrap_repeat,
|
| 202 |
+
uniform float2 crop_u = float2(0.0, 1.0),
|
| 203 |
+
uniform float2 crop_v = float2(0.0, 1.0)
|
| 204 |
+
)
|
| 205 |
+
{
|
| 206 |
+
float mono;
|
| 207 |
+
float4 lookup = ::tex::lookup_float4(tex, uv.uv, wrap_u, wrap_v, crop_u, crop_v) * scale;
|
| 208 |
+
switch( mono_source ) {
|
| 209 |
+
case mono_r: mono = lookup.x;
|
| 210 |
+
break;
|
| 211 |
+
case mono_g: mono = lookup.y;
|
| 212 |
+
break;
|
| 213 |
+
case mono_b: mono = lookup.z;
|
| 214 |
+
break;
|
| 215 |
+
case mono_a: mono = lookup.w;
|
| 216 |
+
break;
|
| 217 |
+
case mono_average: mono = ::math::average(float3(lookup.x, lookup.y, lookup.z));
|
| 218 |
+
break;
|
| 219 |
+
}
|
| 220 |
+
return ::base::texture_return(color(lookup.x, lookup.y, lookup.z), mono);
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
// *** SET CUTOUT ENUM NAMES ***
|
| 224 |
+
export enum cutout_pattern
|
| 225 |
+
[[
|
| 226 |
+
::anno::description("Cutout Pattern"),
|
| 227 |
+
::anno::hidden()
|
| 228 |
+
]]
|
| 229 |
+
{
|
| 230 |
+
pattern_circle = 0
|
| 231 |
+
[[ ::anno::display_name("Circle")]],
|
| 232 |
+
pattern_hexagon = 1
|
| 233 |
+
[[ ::anno::display_name("Hexagon")]],
|
| 234 |
+
pattern_line = 2
|
| 235 |
+
[[ ::anno::display_name("Line") ]],
|
| 236 |
+
|
| 237 |
+
pattern_square = 3
|
| 238 |
+
[[ ::anno::display_name("Square")]],
|
| 239 |
+
pattern_rectangle = 4
|
| 240 |
+
[[ ::anno::display_name("Rectangle")]],
|
| 241 |
+
pattern_cross = 5
|
| 242 |
+
[[ ::anno::display_name("Cross")]],
|
| 243 |
+
|
| 244 |
+
pattern_rhombus = 6
|
| 245 |
+
[[ ::anno::display_name("Rhombus")]],
|
| 246 |
+
pattern_triangle = 7
|
| 247 |
+
[[ ::anno::display_name("Triangle")]],
|
| 248 |
+
pattern_star = 8
|
| 249 |
+
[[ ::anno::display_name("Star")]]
|
| 250 |
+
};
|
| 251 |
+
|
| 252 |
+
::base::texture_coordinate_info vmat_transform_post_scale(
|
| 253 |
+
::base::texture_coordinate_info uvw,
|
| 254 |
+
float2 scale = float2(1.0f)
|
| 255 |
+
)
|
| 256 |
+
{
|
| 257 |
+
return ::base::texture_coordinate_info(
|
| 258 |
+
position: float3(uvw.position.x / scale.x,
|
| 259 |
+
uvw.position.y / scale.y,
|
| 260 |
+
uvw.position.z),
|
| 261 |
+
tangent_u: uvw.tangent_u,
|
| 262 |
+
tangent_v: uvw.tangent_v
|
| 263 |
+
);
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
float3 normalmap_normal(
|
| 267 |
+
uniform texture_2d texture,
|
| 268 |
+
float factor = 1.0,
|
| 269 |
+
::base::texture_coordinate_info uvw = ::base::texture_coordinate_info()
|
| 270 |
+
)
|
| 271 |
+
{
|
| 272 |
+
float3 lookup = (::tex::lookup_float3(texture, float2(uvw.position.x, uvw.position.y)) - float3(0.5)) * (factor * 2.0);
|
| 273 |
+
return ::math::normalize(uvw.tangent_u * lookup.x + uvw.tangent_v * lookup.y + state::normal() * (lookup.z + (1.0 - factor)));
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
float overlay(float base, float layer, float weight)
|
| 277 |
+
{
|
| 278 |
+
return base + (1.0f - base) * layer * weight;
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
// Returns the normal n in tangent space, given n is in internal space.
|
| 282 |
+
float3 transform_internal_to_tangent(float3 n)
|
| 283 |
+
[[
|
| 284 |
+
anno::hidden()
|
| 285 |
+
]]
|
| 286 |
+
{
|
| 287 |
+
return
|
| 288 |
+
n.x* float3(state::texture_tangent_u(0).x,state::texture_tangent_v(0).x,state::normal().x)+
|
| 289 |
+
n.y* float3(state::texture_tangent_u(0).y,state::texture_tangent_v(0).y,state::normal().y)+
|
| 290 |
+
n.z* float3(state::texture_tangent_u(0).z,state::texture_tangent_v(0).z,state::normal().z);
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
// Returns the normal n in internal space, given n is in tangent space.
|
| 294 |
+
float3 transform_tangent_to_internal(float3 n)
|
| 295 |
+
[[
|
| 296 |
+
anno::hidden()
|
| 297 |
+
]]
|
| 298 |
+
{
|
| 299 |
+
return state::texture_tangent_u(0) * n.x +
|
| 300 |
+
state::texture_tangent_v(0) * n.y +
|
| 301 |
+
state::normal() * n.z ;
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
// Returns a normal by adding a detail normal to a global normal.
|
| 307 |
+
// If detail blending of two normal maps gives visual artifacts, check if texture_2d are loaded
|
| 308 |
+
// correctly with tex::gamma_linear
|
| 309 |
+
float3 add_detail_normal(float3 nd = state::normal(), float3 n = state::normal())
|
| 310 |
+
{
|
| 311 |
+
// http://blog.selfshadow.com/publications/blending-in-detail/
|
| 312 |
+
float3 n_t = transform_internal_to_tangent(n);
|
| 313 |
+
float3 nd_t = transform_internal_to_tangent(nd);
|
| 314 |
+
|
| 315 |
+
n_t=n_t + float3(0.,0.,1.);
|
| 316 |
+
nd_t = nd_t * float3(-1.,-1.,1.);
|
| 317 |
+
n = n_t*math::dot(n_t, nd_t)/n_t.z - nd_t;
|
| 318 |
+
return ::math::normalize(transform_tangent_to_internal(n));
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
|
| 322 |
+
|
| 323 |
+
float3 srgb2rgb(float3 val)
|
| 324 |
+
{
|
| 325 |
+
return ::math::pow(::math::max(val, float3(0.0f)), 2.2);
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
|
| 329 |
+
float uint2float(int x)
|
| 330 |
+
{
|
| 331 |
+
return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0);
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
int lowbias32(int x)
|
| 335 |
+
{
|
| 336 |
+
x ^= x >>> 16;
|
| 337 |
+
x *= 0x7feb352d;
|
| 338 |
+
x ^= x >>> 15;
|
| 339 |
+
x *= 0x846ca68b;
|
| 340 |
+
x ^= x >>> 16;
|
| 341 |
+
return x;
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
float2 rnd22(int2 p) {
|
| 345 |
+
float2 ret_val = float2(
|
| 346 |
+
uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f,
|
| 347 |
+
uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f
|
| 348 |
+
);
|
| 349 |
+
return ret_val;
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
::base::texture_coordinate_info vmat_transform(
|
| 353 |
+
uniform float2 translation = float2(0.0, 0.0),
|
| 354 |
+
uniform float rotation = 0.0,
|
| 355 |
+
uniform float2 scaling = float2(1.0, 1.0),
|
| 356 |
+
uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw,
|
| 357 |
+
uniform int uv_space = 0
|
| 358 |
+
)
|
| 359 |
+
{
|
| 360 |
+
float4x4 scale =
|
| 361 |
+
float4x4(1.0 /scaling.x, 0. , 0. , 0.,
|
| 362 |
+
0. , 1.0 /scaling.y , 0. , 0.,
|
| 363 |
+
0. , 0. , 1.0, 0.,
|
| 364 |
+
translation.x , translation.y , 0.0, 1.);
|
| 365 |
+
|
| 366 |
+
float s = ::math::sin(rotation);
|
| 367 |
+
float c = ::math::cos(rotation);
|
| 368 |
+
float4x4 rotate =
|
| 369 |
+
float4x4( c , -s , 0.0 , 0.0,
|
| 370 |
+
s , c , 0.0 , 0.0,
|
| 371 |
+
0.0, 0.0 , 1.0 , 0.0,
|
| 372 |
+
0. , 0.0 , 0.0 , 1.);
|
| 373 |
+
|
| 374 |
+
return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space));
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
+
float2x2 invert_2x2(float2x2 M)
|
| 378 |
+
{
|
| 379 |
+
float det = M[0][0]*M[1][1] - M[0][1]*M[1][0];
|
| 380 |
+
//https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/
|
| 381 |
+
return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]);
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
float3 nonrepeat_lookup(
|
| 385 |
+
uniform texture_2d texture = texture_2d(),
|
| 386 |
+
::base::texture_coordinate_info uvw = ::base::coordinate_source(),
|
| 387 |
+
float texture_scale = 1.0,
|
| 388 |
+
float3 average_color = float3(0.5),
|
| 389 |
+
float patch_size = 8.0
|
| 390 |
+
)
|
| 391 |
+
{
|
| 392 |
+
|
| 393 |
+
float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale;
|
| 394 |
+
float Z = patch_size; // patch scale inside example texture
|
| 395 |
+
float CON = 1.0f;
|
| 396 |
+
|
| 397 |
+
float3 O = float3(0.f);
|
| 398 |
+
float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f);
|
| 399 |
+
float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space
|
| 400 |
+
|
| 401 |
+
float2 U = uv_in;
|
| 402 |
+
float2 V = M * uv_in; //pre-tilted hexa coordinates
|
| 403 |
+
int2 I = int2(::math::floor(V)); // hexa-tile id
|
| 404 |
+
|
| 405 |
+
// The mean color needs to be determined in Photoshop then to make the
|
| 406 |
+
// average color work out, take the float value and calculate the apropriate
|
| 407 |
+
// mean value as (value^(1/2.2))
|
| 408 |
+
|
| 409 |
+
float3 m = average_color;
|
| 410 |
+
|
| 411 |
+
float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W;
|
| 412 |
+
F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates
|
| 413 |
+
|
| 414 |
+
if( F[2] > 0.f )
|
| 415 |
+
|
| 416 |
+
O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON))
|
| 417 |
+
+ (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON))
|
| 418 |
+
+ (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON));
|
| 419 |
+
else
|
| 420 |
+
O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON))
|
| 421 |
+
+ (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON))
|
| 422 |
+
+ (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON));
|
| 423 |
+
O = m + O/::math::length(W);
|
| 424 |
+
O = ::math::clamp( (O), 0.0, 1.0);
|
| 425 |
+
|
| 426 |
+
return float3(O);
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
|
| 430 |
+
float histogram_range(float input, float range, float position)
|
| 431 |
+
{
|
| 432 |
+
float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0);
|
| 433 |
+
float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0);
|
| 434 |
+
return ::math::lerp(low, high, input);
|
| 435 |
+
}
|
| 436 |
+
|
| 437 |
+
|
| 438 |
+
color endless_texture(
|
| 439 |
+
uniform texture_2d texture = texture_2d(),
|
| 440 |
+
::base::texture_coordinate_info uvw = ::base::coordinate_source(),
|
| 441 |
+
float texture_scale = 10.0,
|
| 442 |
+
float3 average_color = float3(0.5, 0.5, 1.0),
|
| 443 |
+
float patch_size = 8.0,
|
| 444 |
+
bool gamma_correct_lookup = true
|
| 445 |
+
)
|
| 446 |
+
{
|
| 447 |
+
return gamma_correct_lookup ? color(srgb2rgb(
|
| 448 |
+
nonrepeat_lookup (
|
| 449 |
+
texture: texture,
|
| 450 |
+
uvw: uvw,
|
| 451 |
+
texture_scale: texture_scale,
|
| 452 |
+
average_color: average_color,
|
| 453 |
+
patch_size: patch_size
|
| 454 |
+
))
|
| 455 |
+
) : color(nonrepeat_lookup (
|
| 456 |
+
texture: texture,
|
| 457 |
+
uvw: uvw,
|
| 458 |
+
texture_scale: texture_scale,
|
| 459 |
+
average_color: average_color,
|
| 460 |
+
patch_size: patch_size
|
| 461 |
+
));
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
float3 endless_normal(
|
| 465 |
+
uniform texture_2d texture = texture_2d(),
|
| 466 |
+
float factor = 1.0,
|
| 467 |
+
bool flip_tangent_u = false,
|
| 468 |
+
bool flip_tangent_v = false,
|
| 469 |
+
::base::texture_coordinate_info uvw = ::base::coordinate_source(),
|
| 470 |
+
float texture_scale = 1.0,
|
| 471 |
+
float3 average_color = float3(0.5, 0.5, 1.0),
|
| 472 |
+
float patch_size = 8.0
|
| 473 |
+
)
|
| 474 |
+
{
|
| 475 |
+
float3 transformed_tangent_u = flip_tangent_u ? uvw.tangent_u : - uvw.tangent_u;
|
| 476 |
+
float3 transformed_tangent_v = flip_tangent_v ? uvw.tangent_v : - uvw.tangent_v;
|
| 477 |
+
|
| 478 |
+
if (flip_tangent_u)
|
| 479 |
+
transformed_tangent_u=-transformed_tangent_u;
|
| 480 |
+
if (flip_tangent_v)
|
| 481 |
+
transformed_tangent_v=-transformed_tangent_v;
|
| 482 |
+
|
| 483 |
+
// normalized Lookup
|
| 484 |
+
float3 tangent_space_normal =
|
| 485 |
+
(nonrepeat_lookup (
|
| 486 |
+
texture: texture,
|
| 487 |
+
uvw: uvw,
|
| 488 |
+
texture_scale: texture_scale,
|
| 489 |
+
average_color: average_color,
|
| 490 |
+
patch_size: patch_size
|
| 491 |
+
) - 0.5) * (2.0 * factor);
|
| 492 |
+
|
| 493 |
+
return ::math::normalize(uvw.tangent_u * tangent_space_normal.x +
|
| 494 |
+
uvw.tangent_v * tangent_space_normal.y +
|
| 495 |
+
::state::normal()*1.0);
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
|
| 499 |
+
export material Stainless_Steel(
|
| 500 |
+
uniform bool infinite_tiling = true [[
|
| 501 |
+
::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."),
|
| 502 |
+
::anno::display_name("Infinite Tiling"),
|
| 503 |
+
::anno::in_group("Appearance"),
|
| 504 |
+
::anno::ui_order(0)
|
| 505 |
+
]],
|
| 506 |
+
float roughness = 0.f [[
|
| 507 |
+
::anno::description("Higher values lead to blurrier reflections."),
|
| 508 |
+
::anno::display_name("Roughness"),
|
| 509 |
+
::anno::in_group("Appearance"),
|
| 510 |
+
::anno::hard_range(0.f, 1.f),
|
| 511 |
+
::anno::ui_order(1)
|
| 512 |
+
]],
|
| 513 |
+
float roughness_variation = 0.21f [[
|
| 514 |
+
::anno::description("Adds variation to the roughness following the shape of the milling bump map."),
|
| 515 |
+
::anno::display_name("Roughness Variation"),
|
| 516 |
+
::anno::in_group("Appearance"),
|
| 517 |
+
::anno::hard_range(0.f, 1.f),
|
| 518 |
+
::anno::ui_order(2)
|
| 519 |
+
]],
|
| 520 |
+
float cloudiness = 0.3f [[
|
| 521 |
+
::anno::description("Adds a cloudy reflection to the metal material."),
|
| 522 |
+
::anno::display_name("Cloudiness"),
|
| 523 |
+
::anno::in_group("Appearance"),
|
| 524 |
+
::anno::hard_range(0.f, 1.f),
|
| 525 |
+
::anno::ui_order(3)
|
| 526 |
+
]],
|
| 527 |
+
float brightness = 0.5f [[
|
| 528 |
+
::anno::description("Low values make the metal darker and add slight variation to the brightness while a high value gives it a bright uniform look."),
|
| 529 |
+
::anno::display_name("Brightness"),
|
| 530 |
+
::anno::in_group("Appearance"),
|
| 531 |
+
::anno::hard_range(0.f, 1.f),
|
| 532 |
+
::anno::ui_order(4)
|
| 533 |
+
]],
|
| 534 |
+
float milling_bump_strength = 0.0f [[
|
| 535 |
+
::anno::description("Adds milled grooves on the metal."),
|
| 536 |
+
::anno::display_name("Milling Bump Strength"),
|
| 537 |
+
::anno::in_group("Appearance", "Bump"),
|
| 538 |
+
::anno::hard_range(0.f, 1.f),
|
| 539 |
+
::anno::ui_order(5)
|
| 540 |
+
]],
|
| 541 |
+
float dents_bump_strength = 0.01f [[
|
| 542 |
+
::anno::description("Adds dents and bumps."),
|
| 543 |
+
::anno::display_name("Dents Bump Strength"),
|
| 544 |
+
::anno::in_group("Appearance", "Bump"),
|
| 545 |
+
::anno::hard_range(0.f, 1.f),
|
| 546 |
+
::anno::ui_order(6)
|
| 547 |
+
]],
|
| 548 |
+
float dents_scale = 1.f [[
|
| 549 |
+
::anno::description("Scales the size of the dents pattern on the material."),
|
| 550 |
+
::anno::display_name("Dents Scale"),
|
| 551 |
+
::anno::in_group("Appearance", "Bump"),
|
| 552 |
+
::anno::ui_order(7)
|
| 553 |
+
]],
|
| 554 |
+
float smudges_1_weight = 0.f [[
|
| 555 |
+
::anno::description("Adds smudges on the material which impact the reflectivity."),
|
| 556 |
+
::anno::display_name("Smudges Weight"),
|
| 557 |
+
::anno::in_group("Appearance", "Imperfections"),
|
| 558 |
+
::anno::hard_range(0.f, 1.f),
|
| 559 |
+
::anno::ui_order(8)
|
| 560 |
+
]],
|
| 561 |
+
float smudges_2_weight = 0.f [[
|
| 562 |
+
::anno::description("Adds imperfections that resemble stains on the material which impact the reflectivity."),
|
| 563 |
+
::anno::display_name("Stains Weight"),
|
| 564 |
+
::anno::in_group("Appearance", "Imperfections"),
|
| 565 |
+
::anno::hard_range(0.f, 1.f),
|
| 566 |
+
::anno::ui_order(9)
|
| 567 |
+
]],
|
| 568 |
+
float smudges_falloff = .45f [[
|
| 569 |
+
::anno::description("Controls the falloff of the smudges and stains on the surface. Low values make the smudges wide and soft while high values make them small."),
|
| 570 |
+
::anno::display_name("Smudges Falloff"),
|
| 571 |
+
::anno::in_group("Appearance", "Imperfections"),
|
| 572 |
+
::anno::hard_range(0.f, 1.f),
|
| 573 |
+
::anno::ui_order(10)
|
| 574 |
+
]],
|
| 575 |
+
float smudges_scale = 1.f [[
|
| 576 |
+
::anno::description("Scales the smudges relative to the overal scale of the material."),
|
| 577 |
+
::anno::display_name("Smudges and Stains Scale"),
|
| 578 |
+
::anno::in_group("Appearance", "Imperfections"),
|
| 579 |
+
::anno::soft_range(0.f, 1.f),
|
| 580 |
+
::anno::ui_order(11)
|
| 581 |
+
]],
|
| 582 |
+
uniform float2 texture_translate = float2(0.f) [[
|
| 583 |
+
::anno::description("Controls the position of the texture."),
|
| 584 |
+
::anno::display_name("Texture Translate"),
|
| 585 |
+
::anno::in_group("Transform"),
|
| 586 |
+
::anno::ui_order(12)
|
| 587 |
+
]],
|
| 588 |
+
uniform float texture_rotate = 0.f [[
|
| 589 |
+
::anno::description("Rotates angle of the texture in degrees."),
|
| 590 |
+
::anno::display_name("Texture Rotate"),
|
| 591 |
+
::anno::in_group("Transform"),
|
| 592 |
+
::anno::soft_range(0.f, 360.f),
|
| 593 |
+
::anno::ui_order(13)
|
| 594 |
+
]],
|
| 595 |
+
uniform float2 texture_scale = float2(1.f) [[
|
| 596 |
+
::anno::description("Larger numbers increase the size."),
|
| 597 |
+
::anno::display_name("Texture Scale"),
|
| 598 |
+
::anno::in_group("Transform"),
|
| 599 |
+
::nvidia::core_definitions::dimension(float2(0.70f, 0.70f)),
|
| 600 |
+
::anno::ui_order(14)
|
| 601 |
+
]],
|
| 602 |
+
uniform bool roundcorners_enable = false [[
|
| 603 |
+
::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are rquired to evaluate the round corner effect."),
|
| 604 |
+
::anno::display_name("Enable Round Corners"),
|
| 605 |
+
::anno::in_group("Round Corners"),
|
| 606 |
+
::anno::ui_order(15)
|
| 607 |
+
]],
|
| 608 |
+
uniform float roundcorners_radius_mm = 0.5f [[
|
| 609 |
+
::anno::description("Radius of the rounded corners in millimeters."),
|
| 610 |
+
::anno::display_name("Round Corner Radius (mm)"),
|
| 611 |
+
::anno::in_group("Round Corners"),
|
| 612 |
+
::anno::soft_range(0.f, 10.f),
|
| 613 |
+
::anno::ui_order(16)
|
| 614 |
+
]],
|
| 615 |
+
uniform bool roundcorners_across_materials = false [[
|
| 616 |
+
::anno::description("Applies the round corner effect across different materials when enabled."),
|
| 617 |
+
::anno::display_name("Across Materials"),
|
| 618 |
+
::anno::in_group("Round Corners"),
|
| 619 |
+
::anno::ui_order(17)
|
| 620 |
+
]],
|
| 621 |
+
uniform int uv_space_index = 0 [[
|
| 622 |
+
::anno::description("Uses selected UV space for material."),
|
| 623 |
+
::anno::display_name("UV Space Index"),
|
| 624 |
+
::anno::in_group("Advanced"),
|
| 625 |
+
::anno::hard_range(0, 10),
|
| 626 |
+
::anno::ui_order(18)
|
| 627 |
+
]])
|
| 628 |
+
[[
|
| 629 |
+
::anno::author("NVIDIA vMaterials"),
|
| 630 |
+
::anno::contributor("Rüdiger Raab"),
|
| 631 |
+
::anno::contributor("Maik Rohland"),
|
| 632 |
+
::anno::display_name("Stainless Steel"),
|
| 633 |
+
::anno::description(DESCRIPTION),
|
| 634 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 635 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel.png"),
|
| 636 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "new", "shiny", "smooth", "reflective", "plain", "gray"))
|
| 637 |
+
]]
|
| 638 |
+
=
|
| 639 |
+
let {
|
| 640 |
+
bool tmp0 = false;
|
| 641 |
+
float2 texture_rescale = texture_scale * float2(0.55f);
|
| 642 |
+
|
| 643 |
+
material_surface tmp1(::df::custom_curve_layer(0.799999952f, 1.f, 3.0999999f, 1.f, ::df::weighted_layer(cloudiness * 0.330000013f, ::df::microfacet_ggx_smith_bsdf(0.159999996f, 0.159999996f, color(brightness * 0.300000012f + 0.600000024f), color(brightness * 0.300000012f + 0.600000024f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(0.799999952f, ::df::microfacet_ggx_smith_bsdf(overlay((histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).y, ::math::lerp(0.f, 0.430000007f, roughness_variation), ::math::lerp(0.0299999993f, 0.349999994f, roughness)) - float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).z * ::math::lerp(0.0299999993f, 0.349999994f, roughness) * dents_bump_strength) * (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).y, ::math::lerp(0.f, 0.430000007f, roughness_variation), ::math::lerp(0.0299999993f, 0.349999994f, roughness)) - float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).z * ::math::lerp(0.0299999993f, 0.349999994f, roughness) * dents_bump_strength), overlay(smudges_1_weight * ::math::pow(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), 9.13999939f, float3(0.0599999987f, 0.0500000007f, 0.f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint), smudges_falloff + 1.f).x, ::math::pow(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), 9.13999939f, float3(0.0599999987f, 0.0500000007f, 0.f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint), smudges_falloff + 1.f).y, smudges_2_weight), 0.429999977f), overlay((histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).y, ::math::lerp(0.f, 0.430000007f, roughness_variation), ::math::lerp(0.0299999993f, 0.349999994f, roughness)) - float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).z * ::math::lerp(0.0299999993f, 0.349999994f, roughness) * dents_bump_strength) * (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).y, ::math::lerp(0.f, 0.430000007f, roughness_variation), ::math::lerp(0.0299999993f, 0.349999994f, roughness)) - float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).z * ::math::lerp(0.0299999993f, 0.349999994f, roughness) * dents_bump_strength), overlay(smudges_1_weight * ::math::pow(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), 9.13999939f, float3(0.0599999987f, 0.0500000007f, 0.f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint), smudges_falloff + 1.f).x, ::math::pow(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), 9.13999939f, float3(0.0599999987f, 0.0500000007f, 0.f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint), smudges_falloff + 1.f).y, smudges_2_weight), 0.429999977f), color(brightness * 0.300000012f + 0.600000024f), color(brightness * 0.300000012f + 0.600000024f), ::state::texture_tangent_u(0), ::df::scatter_reflect), bsdf(), add_detail_normal(infinite_tiling ? endless_normal(texture_2d("./textures/stainless_damages_norm.jpg", ::tex::gamma_linear), dents_bump_strength, false, false, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(dents_scale)), 9.13999939f, float3(0.5f, 0.5f, 0.999000013f), 8.38000011f) : normalmap_normal(texture_2d("./textures/stainless_damages_norm.jpg", ::tex::gamma_linear), dents_bump_strength, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(dents_scale))), infinite_tiling ? endless_normal(texture_2d("./textures/stainless_norm.jpg", ::tex::gamma_linear), milling_bump_strength, false, false, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.5f)), 9.13999939f, float3(0.5f, 0.5f, 0.999000013f), 8.38000011f) : normalmap_normal(texture_2d("./textures/stainless_norm.jpg", ::tex::gamma_linear), milling_bump_strength, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.5f))))), add_detail_normal(infinite_tiling ? endless_normal(texture_2d("./textures/stainless_damages_norm.jpg", ::tex::gamma_linear), dents_bump_strength, false, false, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(dents_scale)), 9.13999939f, float3(0.5f, 0.5f, 0.999000013f), 8.38000011f) : normalmap_normal(texture_2d("./textures/stainless_damages_norm.jpg", ::tex::gamma_linear), dents_bump_strength, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(dents_scale))), infinite_tiling ? endless_normal(texture_2d("./textures/stainless_norm.jpg", ::tex::gamma_linear), milling_bump_strength, false, false, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.5f)), 9.13999939f, float3(0.5f, 0.5f, 0.999000013f), 8.38000011f) : normalmap_normal(texture_2d("./textures/stainless_norm.jpg", ::tex::gamma_linear), milling_bump_strength, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.5f))))), ::df::tint(color(0.f, 0.f, 0.f), ::df::weighted_layer(cloudiness * 0.330000013f, ::df::microfacet_ggx_smith_bsdf(0.159999996f, 0.159999996f, color(brightness * 0.300000012f + 0.600000024f), color(brightness * 0.300000012f + 0.600000024f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(0.799999952f, ::df::microfacet_ggx_smith_bsdf(overlay((histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).y, ::math::lerp(0.f, 0.430000007f, roughness_variation), ::math::lerp(0.0299999993f, 0.349999994f, roughness)) - float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).z * ::math::lerp(0.0299999993f, 0.349999994f, roughness) * dents_bump_strength) * (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).y, ::math::lerp(0.f, 0.430000007f, roughness_variation), ::math::lerp(0.0299999993f, 0.349999994f, roughness)) - float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).z * ::math::lerp(0.0299999993f, 0.349999994f, roughness) * dents_bump_strength), overlay(smudges_1_weight * ::math::pow(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), 9.13999939f, float3(0.0599999987f, 0.0500000007f, 0.f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint), smudges_falloff + 1.f).x, ::math::pow(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), 9.13999939f, float3(0.0599999987f, 0.0500000007f, 0.f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint), smudges_falloff + 1.f).y, smudges_2_weight), 0.429999977f), overlay((histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).y, ::math::lerp(0.f, 0.430000007f, roughness_variation), ::math::lerp(0.0299999993f, 0.349999994f, roughness)) - float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).z * ::math::lerp(0.0299999993f, 0.349999994f, roughness) * dents_bump_strength) * (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).y, ::math::lerp(0.f, 0.430000007f, roughness_variation), ::math::lerp(0.0299999993f, 0.349999994f, roughness)) - float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), 9.13999939f, float3(0.430000007f, 0.552999973f, 0.0460000001f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_multi_R_diff_G_rough_B_dents.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint).z * ::math::lerp(0.0299999993f, 0.349999994f, roughness) * dents_bump_strength), overlay(smudges_1_weight * ::math::pow(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), 9.13999939f, float3(0.0599999987f, 0.0500000007f, 0.f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint), smudges_falloff + 1.f).x, ::math::pow(float3(infinite_tiling ? endless_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), 9.13999939f, float3(0.0599999987f, 0.0500000007f, 0.f), 8.38000011f, false) : ::base::file_texture(texture_2d("./textures/stainless_smudges.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(smudges_scale)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 0.f, int2(0), ::tex::wrap_repeat, 30.f).tint), smudges_falloff + 1.f).y, smudges_2_weight), 0.429999977f), color(brightness * 0.300000012f + 0.600000024f), color(brightness * 0.300000012f + 0.600000024f), ::state::texture_tangent_u(0), ::df::scatter_reflect), bsdf(), add_detail_normal(infinite_tiling ? endless_normal(texture_2d("./textures/stainless_damages_norm.jpg", ::tex::gamma_linear), dents_bump_strength, false, false, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(dents_scale)), 9.13999939f, float3(0.5f, 0.5f, 0.999000013f), 8.38000011f) : normalmap_normal(texture_2d("./textures/stainless_damages_norm.jpg", ::tex::gamma_linear), dents_bump_strength, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(dents_scale))), infinite_tiling ? endless_normal(texture_2d("./textures/stainless_norm.jpg", ::tex::gamma_linear), milling_bump_strength, false, false, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.5f)), 9.13999939f, float3(0.5f, 0.5f, 0.999000013f), 8.38000011f) : normalmap_normal(texture_2d("./textures/stainless_norm.jpg", ::tex::gamma_linear), milling_bump_strength, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.5f))))), add_detail_normal(infinite_tiling ? endless_normal(texture_2d("./textures/stainless_damages_norm.jpg", ::tex::gamma_linear), dents_bump_strength, false, false, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(dents_scale)), 9.13999939f, float3(0.5f, 0.5f, 0.999000013f), 8.38000011f) : normalmap_normal(texture_2d("./textures/stainless_damages_norm.jpg", ::tex::gamma_linear), dents_bump_strength, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(dents_scale))), infinite_tiling ? endless_normal(texture_2d("./textures/stainless_norm.jpg", ::tex::gamma_linear), milling_bump_strength, false, false, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.5f)), 9.13999939f, float3(0.5f, 0.5f, 0.999000013f), 8.38000011f) : normalmap_normal(texture_2d("./textures/stainless_norm.jpg", ::tex::gamma_linear), milling_bump_strength, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_rescale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.5f)))))), ::state::normal()), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance));
|
| 644 |
+
material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance));
|
| 645 |
+
color tmp3 = color(1.f, 1.f, 1.f);
|
| 646 |
+
material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f));
|
| 647 |
+
material_geometry tmp5(float3(0.f), 1.f, roundcorners_enable ? ::state::rounded_corner_normal(roundcorners_radius_mm * 0.00100000005f, roundcorners_across_materials, 1.f) : ::state::normal());
|
| 648 |
+
hair_bsdf tmp6 = hair_bsdf();
|
| 649 |
+
} in
|
| 650 |
+
material(
|
| 651 |
+
thin_walled: tmp0,
|
| 652 |
+
surface: tmp1,
|
| 653 |
+
backface: tmp2,
|
| 654 |
+
ior: tmp3,
|
| 655 |
+
volume: tmp4,
|
| 656 |
+
geometry: tmp5,
|
| 657 |
+
hair: tmp6);
|
| 658 |
+
|
| 659 |
+
|
| 660 |
+
export material Stainless_Steel_Punched(
|
| 661 |
+
// Cutout parameters
|
| 662 |
+
|
| 663 |
+
uniform cutout_pattern shape_select = pattern_circle //select atlas tile here
|
| 664 |
+
[[
|
| 665 |
+
::anno::description("Select a cutout shape."),
|
| 666 |
+
::anno::display_name("Cutout Shape"),
|
| 667 |
+
::anno::in_group("Appearance", "Cutout"),
|
| 668 |
+
::anno::ui_order(1)
|
| 669 |
+
]],
|
| 670 |
+
float2 punching_grid_size = float2(1.0f)
|
| 671 |
+
[[
|
| 672 |
+
::anno::description("Scales the size of the punching grid."),
|
| 673 |
+
::anno::display_name("Punching Grid Size"),
|
| 674 |
+
::anno::in_group("Appearance", "Cutout"),
|
| 675 |
+
::anno::ui_order(1)
|
| 676 |
+
]],
|
| 677 |
+
float cutout_size = .92f
|
| 678 |
+
[[
|
| 679 |
+
::anno::description("Scales the size of the cutout pattern independently from the base material."),
|
| 680 |
+
::anno::display_name("Cutout Size"),
|
| 681 |
+
::anno::hard_range(0.f, 1.2f),
|
| 682 |
+
::anno::soft_range(0.f, 1.0f),
|
| 683 |
+
::anno::in_group("Appearance", "Cutout"),
|
| 684 |
+
::anno::ui_order(2)
|
| 685 |
+
]],
|
| 686 |
+
float cutout_roundness = .4f
|
| 687 |
+
[[
|
| 688 |
+
::anno::description("At low values it makes the cutouts sharper. Higher values give the shapes a more rounded look."),
|
| 689 |
+
::anno::display_name("Cutout Roundness"),
|
| 690 |
+
::anno::hard_range(0.f, 1.f),
|
| 691 |
+
::anno::in_group("Appearance", "Cutout"),
|
| 692 |
+
::anno::ui_order(3)
|
| 693 |
+
]],
|
| 694 |
+
float cutout_bevel_width = 0.8f
|
| 695 |
+
[[
|
| 696 |
+
::anno::description("Adjusts the width of the bevel transition."),
|
| 697 |
+
::anno::display_name("Cutout Bevel Width"),
|
| 698 |
+
::anno::hard_range(0.f, 1.f),
|
| 699 |
+
::anno::in_group("Appearance", "Cutout"),
|
| 700 |
+
::anno::ui_order(4)
|
| 701 |
+
]],
|
| 702 |
+
float cutout_bump_strength = 2.0f
|
| 703 |
+
[[
|
| 704 |
+
::anno::description("Sets the strength of the bevelled normal around the cutout."),
|
| 705 |
+
::anno::display_name("Cutout Bevel Strength"),
|
| 706 |
+
::anno::soft_range(0.0f, 1.0f),
|
| 707 |
+
::anno::hard_range(0.0f, 2.0f),
|
| 708 |
+
::anno::in_group("Appearance", "Cutout"),
|
| 709 |
+
::anno::ui_order(5)
|
| 710 |
+
]],
|
| 711 |
+
// Grid Layout parameters
|
| 712 |
+
bool hexagonal_grid = true
|
| 713 |
+
[[
|
| 714 |
+
::anno::description("When enabled, the punching will occur on a hexagonal grid, otherwise a square grid"),
|
| 715 |
+
::anno::display_name("Enable Hexagonal Grid"),
|
| 716 |
+
::anno::in_group("Appearance", "Cutout Layout"),
|
| 717 |
+
::anno::ui_order(6)
|
| 718 |
+
]],
|
| 719 |
+
float square_grid_offset = 0.0f
|
| 720 |
+
[[
|
| 721 |
+
::anno::description("Offsets each row of the grid by a certain amount."),
|
| 722 |
+
::anno::display_name("Square Grid Offset"),
|
| 723 |
+
::anno::in_group("Appearance", "Cutout Layout"),
|
| 724 |
+
::anno::enable_if("hexagonal_grid==false"),
|
| 725 |
+
::anno::ui_order(7)
|
| 726 |
+
]],
|
| 727 |
+
bool horizontal_offset = true
|
| 728 |
+
[[
|
| 729 |
+
::anno::description("Choose whether to offset either in row or column direction."),
|
| 730 |
+
::anno::display_name("Horizontal Offset"),
|
| 731 |
+
::anno::in_group("Appearance", "Cutout Layout"),
|
| 732 |
+
::anno::enable_if("hexagonal_grid==false"),
|
| 733 |
+
::anno::ui_order(8)
|
| 734 |
+
]],
|
| 735 |
+
|
| 736 |
+
|
| 737 |
+
|
| 738 |
+
// Stainless Steel parameters
|
| 739 |
+
uniform bool infinite_tiling = true [[
|
| 740 |
+
::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."),
|
| 741 |
+
::anno::display_name("Infinite Tiling"),
|
| 742 |
+
::anno::in_group("Appearance"),
|
| 743 |
+
::anno::ui_order(9)
|
| 744 |
+
]],
|
| 745 |
+
float roughness = 0.f [[
|
| 746 |
+
::anno::description("Higher values lead to blurrier reflections."),
|
| 747 |
+
::anno::display_name("Roughness"),
|
| 748 |
+
::anno::in_group("Appearance"),
|
| 749 |
+
::anno::hard_range(0.f, 1.f),
|
| 750 |
+
::anno::ui_order(10)
|
| 751 |
+
]],
|
| 752 |
+
float roughness_variation = 0.21f [[
|
| 753 |
+
::anno::description("Adds variation to the roughness following the shape of the milling bump map."),
|
| 754 |
+
::anno::display_name("Roughness Variation"),
|
| 755 |
+
::anno::in_group("Appearance"),
|
| 756 |
+
::anno::hard_range(0.f, 1.f),
|
| 757 |
+
::anno::ui_order(11)
|
| 758 |
+
]],
|
| 759 |
+
float cloudiness = 0.3f [[
|
| 760 |
+
::anno::description("Adds a cloudy reflection to the metal material."),
|
| 761 |
+
::anno::display_name("Cloudiness"),
|
| 762 |
+
::anno::in_group("Appearance"),
|
| 763 |
+
::anno::hard_range(0.f, 1.f),
|
| 764 |
+
::anno::ui_order(12)
|
| 765 |
+
]],
|
| 766 |
+
float brightness = 0.5f [[
|
| 767 |
+
::anno::description("Low values make the metal darker and add slight variation to the brightness while a high value gives it a bright uniform look."),
|
| 768 |
+
::anno::display_name("Brightness"),
|
| 769 |
+
::anno::in_group("Appearance"),
|
| 770 |
+
::anno::hard_range(0.f, 1.f),
|
| 771 |
+
::anno::ui_order(13)
|
| 772 |
+
]],
|
| 773 |
+
float milling_bump_strength = 0.0f [[
|
| 774 |
+
::anno::description("Adds milled grooves on the metal."),
|
| 775 |
+
::anno::display_name("Milling Bump Strength"),
|
| 776 |
+
::anno::in_group("Appearance", "Bump"),
|
| 777 |
+
::anno::hard_range(0.f, 1.f),
|
| 778 |
+
::anno::ui_order(14)
|
| 779 |
+
]],
|
| 780 |
+
float dents_bump_strength = 0.01f [[
|
| 781 |
+
::anno::description("Adds dents and bumps."),
|
| 782 |
+
::anno::display_name("Dents Bump Strength"),
|
| 783 |
+
::anno::in_group("Appearance", "Bump"),
|
| 784 |
+
::anno::hard_range(0.f, 1.f),
|
| 785 |
+
::anno::ui_order(15)
|
| 786 |
+
]],
|
| 787 |
+
float dents_scale = 1.f [[
|
| 788 |
+
::anno::description("Scales the size of the dents pattern on the material."),
|
| 789 |
+
::anno::display_name("Dents Scale"),
|
| 790 |
+
::anno::in_group("Appearance", "Bump"),
|
| 791 |
+
::anno::ui_order(16)
|
| 792 |
+
]],
|
| 793 |
+
float smudges_1_weight = 0.f [[
|
| 794 |
+
::anno::description("Adds smudges on the material which impact the reflectivity."),
|
| 795 |
+
::anno::display_name("Smudges Weight"),
|
| 796 |
+
::anno::in_group("Appearance", "Imperfections"),
|
| 797 |
+
::anno::hard_range(0.f, 1.f),
|
| 798 |
+
::anno::ui_order(17)
|
| 799 |
+
]],
|
| 800 |
+
float smudges_2_weight = 0.f [[
|
| 801 |
+
::anno::description("Adds imperfections that resemble stains on the material which impact the reflectivity."),
|
| 802 |
+
::anno::display_name("Stains Weight"),
|
| 803 |
+
::anno::in_group("Appearance", "Imperfections"),
|
| 804 |
+
::anno::hard_range(0.f, 1.f),
|
| 805 |
+
::anno::ui_order(18)
|
| 806 |
+
]],
|
| 807 |
+
float smudges_falloff = .45f [[
|
| 808 |
+
::anno::description("Controls the falloff of the smudges and stains on the surface. Low values make the smudges wide and soft while high values make them small."),
|
| 809 |
+
::anno::display_name("Smudges Falloff"),
|
| 810 |
+
::anno::in_group("Appearance", "Imperfections"),
|
| 811 |
+
::anno::hard_range(0.f, 1.f),
|
| 812 |
+
::anno::ui_order(19)
|
| 813 |
+
]],
|
| 814 |
+
float smudges_scale = 1.f [[
|
| 815 |
+
::anno::description("Scales the smudges relative to the overal scale of the material."),
|
| 816 |
+
::anno::display_name("Smudges and Stains Scale"),
|
| 817 |
+
::anno::in_group("Appearance", "Imperfections"),
|
| 818 |
+
::anno::soft_range(0.f, 1.f),
|
| 819 |
+
::anno::ui_order(20)
|
| 820 |
+
]],
|
| 821 |
+
uniform float2 texture_translate = float2(0.f) [[
|
| 822 |
+
::anno::description("Controls the position of the texture."),
|
| 823 |
+
::anno::display_name("Texture Translate"),
|
| 824 |
+
::anno::in_group("Transform"),
|
| 825 |
+
::anno::ui_order(21)
|
| 826 |
+
]],
|
| 827 |
+
uniform float texture_rotate = 0.f [[
|
| 828 |
+
::anno::description("Rotates angle of the texture in degrees."),
|
| 829 |
+
::anno::display_name("Texture Rotate"),
|
| 830 |
+
::anno::in_group("Transform"),
|
| 831 |
+
::anno::soft_range(0.f, 360.f),
|
| 832 |
+
::anno::ui_order(22)
|
| 833 |
+
]],
|
| 834 |
+
uniform float2 texture_scale = float2(1.f) [[
|
| 835 |
+
::anno::description("Larger numbers increase the size."),
|
| 836 |
+
::anno::display_name("Texture Scale"),
|
| 837 |
+
::anno::in_group("Transform"),
|
| 838 |
+
::nvidia::core_definitions::dimension(float2(0.70f, 0.70f)),
|
| 839 |
+
::anno::ui_order(23)
|
| 840 |
+
]],
|
| 841 |
+
uniform int uv_space_index = 0 [[
|
| 842 |
+
::anno::description("Uses selected UV space for material."),
|
| 843 |
+
::anno::display_name("UV Space Index"),
|
| 844 |
+
::anno::in_group("Transform"),
|
| 845 |
+
::anno::hard_range(0, 10),
|
| 846 |
+
::anno::ui_order(24)
|
| 847 |
+
]],
|
| 848 |
+
uniform bool roundcorners_enable = false [[
|
| 849 |
+
::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are rquired to evaluate the round corner effect."),
|
| 850 |
+
::anno::display_name("Enable Round Corners"),
|
| 851 |
+
::anno::in_group("Round Corners"),
|
| 852 |
+
::anno::ui_order(25)
|
| 853 |
+
]],
|
| 854 |
+
uniform float roundcorners_radius_mm = 0.5f [[
|
| 855 |
+
::anno::description("Radius of the rounded corners in millimeters."),
|
| 856 |
+
::anno::display_name("Round Corner Radius (mm)"),
|
| 857 |
+
::anno::in_group("Round Corners"),
|
| 858 |
+
::anno::soft_range(0.f, 10.f),
|
| 859 |
+
::anno::ui_order(26)
|
| 860 |
+
]],
|
| 861 |
+
uniform bool roundcorners_across_materials = false [[
|
| 862 |
+
::anno::description("Applies the round corner effect across different materials when enabled."),
|
| 863 |
+
::anno::display_name("Across Materials"),
|
| 864 |
+
::anno::in_group("Round Corners"),
|
| 865 |
+
::anno::ui_order(27)
|
| 866 |
+
]]
|
| 867 |
+
)
|
| 868 |
+
[[
|
| 869 |
+
::anno::author("NVIDIA vMaterials"),
|
| 870 |
+
::anno::contributor("Rüdiger Raab"),
|
| 871 |
+
::anno::contributor("Maik Rohland"),
|
| 872 |
+
::anno::display_name("Stainless Steel - Circular Punch"),
|
| 873 |
+
::anno::description(DESCRIPTION),
|
| 874 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 875 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched.png"),
|
| 876 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "new", "shiny", "smooth", "reflective", "plain", "gray"))
|
| 877 |
+
]] = let
|
| 878 |
+
{
|
| 879 |
+
material base_mat = Stainless_Steel(
|
| 880 |
+
infinite_tiling: infinite_tiling,
|
| 881 |
+
roughness: roughness,
|
| 882 |
+
roughness_variation: roughness_variation,
|
| 883 |
+
cloudiness: cloudiness,
|
| 884 |
+
brightness: brightness,
|
| 885 |
+
milling_bump_strength: milling_bump_strength,
|
| 886 |
+
dents_bump_strength: dents_bump_strength,
|
| 887 |
+
dents_scale: dents_scale,
|
| 888 |
+
smudges_1_weight: smudges_1_weight,
|
| 889 |
+
smudges_2_weight: smudges_2_weight,
|
| 890 |
+
smudges_falloff: smudges_falloff,
|
| 891 |
+
smudges_scale: smudges_scale,
|
| 892 |
+
texture_translate: texture_translate,
|
| 893 |
+
texture_rotate: texture_rotate,
|
| 894 |
+
texture_scale: texture_scale,
|
| 895 |
+
roundcorners_enable: roundcorners_enable,
|
| 896 |
+
roundcorners_radius_mm: roundcorners_radius_mm,
|
| 897 |
+
roundcorners_across_materials: roundcorners_across_materials,
|
| 898 |
+
uv_space_index: uv_space_index
|
| 899 |
+
);
|
| 900 |
+
|
| 901 |
+
// remap range of slider to avoid artifacts in the bevelling
|
| 902 |
+
float2 punching_scale = texture_scale * 0.01f * punching_grid_size;
|
| 903 |
+
float cutout_roundness_ = cutout_roundness*0.6f+0.4f;
|
| 904 |
+
float cutout_size_lin = (1.0f/cutout_size);
|
| 905 |
+
texture_2d punching_cutout = texture_2d("./textures/atlas_02_norm_dist.png", ::tex::gamma_linear);
|
| 906 |
+
|
| 907 |
+
vm_coordinates uv = vm_coord(
|
| 908 |
+
translation: texture_translate,
|
| 909 |
+
rotation: texture_rotate,
|
| 910 |
+
scaling: punching_scale,
|
| 911 |
+
uv_space: uv_space_index
|
| 912 |
+
);
|
| 913 |
+
|
| 914 |
+
vm_coordinates punching_uv = hexagonal_grid ? vm_coord_hex(
|
| 915 |
+
uv: uv,
|
| 916 |
+
scale: cutout_roundness_ * cutout_size_lin
|
| 917 |
+
) : vm_coord_grid(
|
| 918 |
+
uv: vm_coord_rowcol_offset(
|
| 919 |
+
uv: uv,
|
| 920 |
+
offset: square_grid_offset,
|
| 921 |
+
horizontal_offset: horizontal_offset
|
| 922 |
+
),
|
| 923 |
+
scale: cutout_roundness_ * cutout_size_lin
|
| 924 |
+
);
|
| 925 |
+
// select the correct subtile from the atlas
|
| 926 |
+
float4 crop = tile_select(shape_select);
|
| 927 |
+
|
| 928 |
+
::base::texture_return lookup = vm_tex_lookup(
|
| 929 |
+
tex: punching_cutout,
|
| 930 |
+
uv: punching_uv,
|
| 931 |
+
mono_source: mono_a,
|
| 932 |
+
scale: float4(1.0f),
|
| 933 |
+
crop_u: float2(crop.x, crop.y),
|
| 934 |
+
crop_v: float2(crop.z, crop.w),
|
| 935 |
+
wrap_u: ::tex::wrap_clamp,
|
| 936 |
+
wrap_v: ::tex::wrap_clamp
|
| 937 |
+
);
|
| 938 |
+
|
| 939 |
+
float low = (1.0 - cutout_roundness_);
|
| 940 |
+
float high = (cutout_size_lin * (cutout_bevel_width * 0.2f) * cutout_roundness_) + (1.0 - cutout_roundness_);
|
| 941 |
+
// remap x...y to (clamped) 0...1
|
| 942 |
+
float x = ::math::clamp((lookup.mono - low)/(high - low), 0.0, 1.0);
|
| 943 |
+
// spherical falloff
|
| 944 |
+
float falloff=::math::sqrt(1.0-x*x);
|
| 945 |
+
// masking falloff as the center of the cutout is flat
|
| 946 |
+
float masked_falloff=falloff<=0.0?1.0:falloff;
|
| 947 |
+
|
| 948 |
+
// where base material is still there, use the value of the base material
|
| 949 |
+
float cutout= ::math::min(falloff<=0.0?0.0:1.0, base_mat.geometry.cutout_opacity);
|
| 950 |
+
|
| 951 |
+
// bring in -.5 ... +.5 range and lerp between lookup and flat normal
|
| 952 |
+
float3 remap_norm = ::math::lerp(float3(lookup.tint), float3(0.5, 0.5, 1.0), masked_falloff) - float3(0.5);
|
| 953 |
+
float3 t_norm = ::math::normalize(remap_norm * float3(cutout_bump_strength, cutout_bump_strength, 1.0));
|
| 954 |
+
|
| 955 |
+
float3 rotfix_norm = float3(::math::cos(punching_uv.rotation) * t_norm.x - ::math::sin(punching_uv.rotation) * t_norm.y,
|
| 956 |
+
::math::sin(punching_uv.rotation) * t_norm.x + ::math::cos(punching_uv.rotation) * t_norm.y,
|
| 957 |
+
t_norm.z);
|
| 958 |
+
|
| 959 |
+
float3 normal = ::state::texture_tangent_u(punching_uv.uv_space_index) * rotfix_norm.x +
|
| 960 |
+
::state::texture_tangent_v(punching_uv.uv_space_index) * rotfix_norm.y +
|
| 961 |
+
::state::normal() * rotfix_norm.z;
|
| 962 |
+
|
| 963 |
+
float3 final_normal = ::base::blend_normals(
|
| 964 |
+
base_normal: normal,
|
| 965 |
+
base_normal_weight: 1.0f,
|
| 966 |
+
detail_normal: base_mat.geometry.normal,
|
| 967 |
+
detail_normal_weight: 1.0f
|
| 968 |
+
);
|
| 969 |
+
|
| 970 |
+
} in material(
|
| 971 |
+
surface: material_surface(
|
| 972 |
+
scattering: base_mat.surface.scattering
|
| 973 |
+
),
|
| 974 |
+
volume: base_mat.volume,
|
| 975 |
+
ior: base_mat.ior,
|
| 976 |
+
thin_walled: true,
|
| 977 |
+
geometry: material_geometry(
|
| 978 |
+
displacement: base_mat.geometry.displacement,
|
| 979 |
+
normal: final_normal,
|
| 980 |
+
cutout_opacity: cutout
|
| 981 |
+
)
|
| 982 |
+
);
|
| 983 |
+
|
| 984 |
+
|
| 985 |
+
|
| 986 |
+
// ----------------------- Stainless Steel Presets -----------------------
|
| 987 |
+
// 2 Shiny Worn
|
| 988 |
+
export material Stainless_Steel_Shiny_Worn(*)
|
| 989 |
+
[[
|
| 990 |
+
::anno::author("NVIDIA vMaterials"),
|
| 991 |
+
::anno::contributor("Rüdiger Raab"),
|
| 992 |
+
::anno::contributor("Maik Rohland"),
|
| 993 |
+
::anno::display_name("Stainless Steel - Shiny Worn"),
|
| 994 |
+
::anno::description("Shiny stainless steel with signs of mechanical wear"),
|
| 995 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 996 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Shiny_Worn.png"),
|
| 997 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "dented", "worn", "shiny", "reflective", "plain", "gray"))
|
| 998 |
+
]] = Stainless_Steel(
|
| 999 |
+
infinite_tiling: true,
|
| 1000 |
+
roughness: 0.0f,
|
| 1001 |
+
roughness_variation: 0.21f,
|
| 1002 |
+
cloudiness: 0.3f,
|
| 1003 |
+
brightness: 0.5f,
|
| 1004 |
+
milling_bump_strength: 0.0f,
|
| 1005 |
+
dents_bump_strength: 0.9f,
|
| 1006 |
+
dents_scale: 1.00f,
|
| 1007 |
+
smudges_1_weight: 0.0f,
|
| 1008 |
+
smudges_2_weight: 0.0f,
|
| 1009 |
+
smudges_falloff: 0.45f,
|
| 1010 |
+
smudges_scale: 1.0f,
|
| 1011 |
+
texture_translate: float2(0.0f),
|
| 1012 |
+
texture_rotate: 0.0f,
|
| 1013 |
+
texture_scale: float2(1.0f),
|
| 1014 |
+
roundcorners_enable: false,
|
| 1015 |
+
roundcorners_radius_mm: 0.5f,
|
| 1016 |
+
roundcorners_across_materials: false,
|
| 1017 |
+
uv_space_index: 0
|
| 1018 |
+
);
|
| 1019 |
+
|
| 1020 |
+
|
| 1021 |
+
// 3 Shiny Smudged
|
| 1022 |
+
export material Stainless_Steel_Shiny_Smudged(*)
|
| 1023 |
+
[[
|
| 1024 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1025 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1026 |
+
::anno::contributor("Maik Rohland"),
|
| 1027 |
+
::anno::display_name("Stainless Steel - Shiny Smudged"),
|
| 1028 |
+
::anno::description("Shiny stainless steel with signs of mechanical wear. Material offers optional controls \n"
|
| 1029 |
+
"to add secondary effects such as stains, smudges and mechanical damage"),
|
| 1030 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1031 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Shiny_Smudged.png"),
|
| 1032 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "smudged", "dirty", "shiny", "smooth", "reflective", "plain", "gray"))
|
| 1033 |
+
]] = Stainless_Steel(
|
| 1034 |
+
infinite_tiling: true,
|
| 1035 |
+
roughness: 0.0f,
|
| 1036 |
+
roughness_variation: 0.25f,
|
| 1037 |
+
cloudiness: 0.3f,
|
| 1038 |
+
brightness: 0.5f,
|
| 1039 |
+
milling_bump_strength: 0.0f,
|
| 1040 |
+
dents_bump_strength: 0.0f,
|
| 1041 |
+
dents_scale: 1.0f,
|
| 1042 |
+
smudges_1_weight: 0.7f,
|
| 1043 |
+
smudges_2_weight: 0.58f,
|
| 1044 |
+
smudges_falloff: 0.45f,
|
| 1045 |
+
smudges_scale: 1.0f,
|
| 1046 |
+
texture_translate: float2(0.0f),
|
| 1047 |
+
texture_rotate: 0.0f,
|
| 1048 |
+
texture_scale: float2(1.0f),
|
| 1049 |
+
roundcorners_enable: false,
|
| 1050 |
+
roundcorners_radius_mm: 0.5f,
|
| 1051 |
+
roundcorners_across_materials: false,
|
| 1052 |
+
uv_space_index: 0
|
| 1053 |
+
);
|
| 1054 |
+
|
| 1055 |
+
|
| 1056 |
+
|
| 1057 |
+
// 4 Glossy
|
| 1058 |
+
export material Stainless_Steel_Glossy(*)
|
| 1059 |
+
[[
|
| 1060 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1061 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1062 |
+
::anno::contributor("Maik Rohland"),
|
| 1063 |
+
::anno::display_name("Stainless Steel - Glossy"),
|
| 1064 |
+
::anno::description("Glossy stainless steel with optional controls for secondary effects \n"
|
| 1065 |
+
"such as stains, smudges and mechanical damage"),
|
| 1066 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1067 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Glossy.png"),
|
| 1068 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "smudged", "dirty", "glossy", "smooth", "reflective", "plain", "gray"))
|
| 1069 |
+
]] = Stainless_Steel(
|
| 1070 |
+
infinite_tiling: true,
|
| 1071 |
+
roughness: 0.44f,
|
| 1072 |
+
roughness_variation: 0.05f,
|
| 1073 |
+
cloudiness: 0.44f,
|
| 1074 |
+
brightness: 0.5f,
|
| 1075 |
+
milling_bump_strength: 0.24f,
|
| 1076 |
+
dents_bump_strength: 0.0f,
|
| 1077 |
+
dents_scale: 1.0f,
|
| 1078 |
+
smudges_1_weight: 0.0f,
|
| 1079 |
+
smudges_2_weight: 0.0f,
|
| 1080 |
+
smudges_falloff: 0.45f,
|
| 1081 |
+
smudges_scale: 1.0f,
|
| 1082 |
+
texture_translate: float2(0.0f),
|
| 1083 |
+
texture_rotate: 0.0f,
|
| 1084 |
+
texture_scale: float2(1.0f),
|
| 1085 |
+
roundcorners_enable: false,
|
| 1086 |
+
roundcorners_radius_mm: 0.5f,
|
| 1087 |
+
roundcorners_across_materials: false,
|
| 1088 |
+
uv_space_index: 0
|
| 1089 |
+
);
|
| 1090 |
+
|
| 1091 |
+
|
| 1092 |
+
|
| 1093 |
+
// 5 Matte
|
| 1094 |
+
export material Stainless_Steel_Matte(*)
|
| 1095 |
+
[[
|
| 1096 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1097 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1098 |
+
::anno::contributor("Maik Rohland"),
|
| 1099 |
+
::anno::display_name("Stainless Steel - Matte"),
|
| 1100 |
+
::anno::description("Matte stainless steel with optional controls for secondary effects \n"
|
| 1101 |
+
"such as stains, smudges and mechanical damage"),
|
| 1102 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1103 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Matte.png"),
|
| 1104 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "smudged", "dirty", "matte", "smooth", "reflective", "plain", "gray"))
|
| 1105 |
+
]] = Stainless_Steel(
|
| 1106 |
+
infinite_tiling: true,
|
| 1107 |
+
roughness: 1.00f,
|
| 1108 |
+
roughness_variation: 0.0f,
|
| 1109 |
+
cloudiness: 1.0f,
|
| 1110 |
+
brightness: 0.5f,
|
| 1111 |
+
milling_bump_strength: 0.4f,
|
| 1112 |
+
dents_bump_strength: 0.0f,
|
| 1113 |
+
dents_scale: 1.0f,
|
| 1114 |
+
smudges_1_weight: 0.0f,
|
| 1115 |
+
smudges_2_weight: 0.0f,
|
| 1116 |
+
smudges_falloff: 0.45f,
|
| 1117 |
+
smudges_scale: 1.0f,
|
| 1118 |
+
texture_translate: float2(0.0f),
|
| 1119 |
+
texture_rotate: 0.0f,
|
| 1120 |
+
texture_scale: float2(1.0f),
|
| 1121 |
+
roundcorners_enable: false,
|
| 1122 |
+
roundcorners_radius_mm: 0.5f,
|
| 1123 |
+
roundcorners_across_materials: false,
|
| 1124 |
+
uv_space_index: 0
|
| 1125 |
+
);
|
| 1126 |
+
|
| 1127 |
+
|
| 1128 |
+
|
| 1129 |
+
// ------------------ Stainless Steel Punched Presets ------------------
|
| 1130 |
+
|
| 1131 |
+
|
| 1132 |
+
export material Stainless_Steel_Punched_Small_Circular(*)
|
| 1133 |
+
[[
|
| 1134 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1135 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1136 |
+
::anno::contributor("Maik Rohland"),
|
| 1137 |
+
::anno::display_name("Stainless Steel - Small Circular Punch"),
|
| 1138 |
+
::anno::description("Punched stainless steel"),
|
| 1139 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1140 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Small_Circular.png"),
|
| 1141 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "circular", "gray"))
|
| 1142 |
+
]] = Stainless_Steel_Punched(
|
| 1143 |
+
// Punching parameters
|
| 1144 |
+
shape_select: pattern_circle,
|
| 1145 |
+
punching_grid_size: float2(1.0f),
|
| 1146 |
+
cutout_size: 0.5f,
|
| 1147 |
+
cutout_roundness: 0.4f,
|
| 1148 |
+
cutout_bevel_width: 0.5f,
|
| 1149 |
+
cutout_bump_strength: 0.8f,
|
| 1150 |
+
hexagonal_grid: true,
|
| 1151 |
+
square_grid_offset: 0.0f,
|
| 1152 |
+
horizontal_offset: true,
|
| 1153 |
+
|
| 1154 |
+
// Material Parameters
|
| 1155 |
+
infinite_tiling: true,
|
| 1156 |
+
roughness: 0.3f,
|
| 1157 |
+
roughness_variation: 0.2f,
|
| 1158 |
+
cloudiness: 0.44f,
|
| 1159 |
+
brightness: 0.5f,
|
| 1160 |
+
milling_bump_strength: 0.05f,
|
| 1161 |
+
dents_bump_strength: 0.02f,
|
| 1162 |
+
dents_scale: 1.0f,
|
| 1163 |
+
smudges_1_weight: 0.04f,
|
| 1164 |
+
smudges_2_weight: 0.05f,
|
| 1165 |
+
smudges_falloff: 0.0f,
|
| 1166 |
+
smudges_scale: 1.0f,
|
| 1167 |
+
texture_translate: float2(0.0f),
|
| 1168 |
+
texture_rotate: 0.0f,
|
| 1169 |
+
texture_scale: float2(1.0f),
|
| 1170 |
+
uv_space_index: 0,
|
| 1171 |
+
roundcorners_enable: false,
|
| 1172 |
+
roundcorners_radius_mm: 0.5f,
|
| 1173 |
+
roundcorners_across_materials: false
|
| 1174 |
+
);
|
| 1175 |
+
|
| 1176 |
+
|
| 1177 |
+
export material Stainless_Steel_Punched_Hexagonal(*)
|
| 1178 |
+
[[
|
| 1179 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1180 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1181 |
+
::anno::contributor("Maik Rohland"),
|
| 1182 |
+
::anno::display_name("Stainless Steel - Hexagonal Punch"),
|
| 1183 |
+
::anno::description("Punched stainless steel"),
|
| 1184 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1185 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Hexagonal.png"),
|
| 1186 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "hexagon", "hexagonal", "gray"))
|
| 1187 |
+
]] = Stainless_Steel_Punched(
|
| 1188 |
+
// Punching parameters
|
| 1189 |
+
shape_select: pattern_hexagon,
|
| 1190 |
+
punching_grid_size: float2(1.5f),
|
| 1191 |
+
cutout_size: .95f,
|
| 1192 |
+
cutout_roundness: 0.4f,
|
| 1193 |
+
cutout_bevel_width: 0.5f,
|
| 1194 |
+
cutout_bump_strength: 1.5f,
|
| 1195 |
+
hexagonal_grid: true,
|
| 1196 |
+
square_grid_offset: 0.0f,
|
| 1197 |
+
horizontal_offset: true,
|
| 1198 |
+
|
| 1199 |
+
// Material Parameters
|
| 1200 |
+
infinite_tiling: true,
|
| 1201 |
+
roughness: 0.3f,
|
| 1202 |
+
roughness_variation: 0.2f,
|
| 1203 |
+
cloudiness: 0.44f,
|
| 1204 |
+
brightness: 0.5f,
|
| 1205 |
+
milling_bump_strength: 0.05f,
|
| 1206 |
+
dents_bump_strength: 0.02f,
|
| 1207 |
+
dents_scale: 1.0f,
|
| 1208 |
+
smudges_1_weight: 0.04f,
|
| 1209 |
+
smudges_2_weight: 0.05f,
|
| 1210 |
+
smudges_falloff: 0.0f,
|
| 1211 |
+
smudges_scale: 1.0f,
|
| 1212 |
+
texture_translate: float2(0.0f),
|
| 1213 |
+
texture_rotate: 0.0f,
|
| 1214 |
+
texture_scale: float2(1.0f),
|
| 1215 |
+
uv_space_index: 0,
|
| 1216 |
+
roundcorners_enable: false,
|
| 1217 |
+
roundcorners_radius_mm: 0.5f,
|
| 1218 |
+
roundcorners_across_materials: false
|
| 1219 |
+
);
|
| 1220 |
+
|
| 1221 |
+
|
| 1222 |
+
export material Stainless_Steel_Punched_Hexagonal_Small(*)
|
| 1223 |
+
[[
|
| 1224 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1225 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1226 |
+
::anno::contributor("Maik Rohland"),
|
| 1227 |
+
::anno::display_name("Stainless Steel - Small Hexagonal Punch"),
|
| 1228 |
+
::anno::description("Punched stainless steel"),
|
| 1229 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1230 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Hexagonal_Small.png"),
|
| 1231 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "hexagon", "hexagonal", "gray"))
|
| 1232 |
+
]] = Stainless_Steel_Punched(
|
| 1233 |
+
// Punching parameters
|
| 1234 |
+
shape_select: pattern_hexagon,
|
| 1235 |
+
punching_grid_size: float2(.75f),
|
| 1236 |
+
cutout_size: .58f,
|
| 1237 |
+
cutout_roundness: 0.4f,
|
| 1238 |
+
cutout_bevel_width: 0.3f,
|
| 1239 |
+
cutout_bump_strength: 1.5f,
|
| 1240 |
+
hexagonal_grid: true,
|
| 1241 |
+
square_grid_offset: 0.0f,
|
| 1242 |
+
horizontal_offset: true,
|
| 1243 |
+
|
| 1244 |
+
// Material Parameters
|
| 1245 |
+
infinite_tiling: true,
|
| 1246 |
+
roughness: 0.3f,
|
| 1247 |
+
roughness_variation: 0.2f,
|
| 1248 |
+
cloudiness: 0.44f,
|
| 1249 |
+
brightness: 0.5f,
|
| 1250 |
+
milling_bump_strength: 0.05f,
|
| 1251 |
+
dents_bump_strength: 0.02f,
|
| 1252 |
+
dents_scale: 1.0f,
|
| 1253 |
+
smudges_1_weight: 0.04f,
|
| 1254 |
+
smudges_2_weight: 0.05f,
|
| 1255 |
+
smudges_falloff: 0.0f,
|
| 1256 |
+
smudges_scale: 1.0f,
|
| 1257 |
+
texture_translate: float2(0.0f),
|
| 1258 |
+
texture_rotate: 0.0f,
|
| 1259 |
+
texture_scale: float2(1.0f),
|
| 1260 |
+
uv_space_index: 0,
|
| 1261 |
+
roundcorners_enable: false,
|
| 1262 |
+
roundcorners_radius_mm: 0.5f,
|
| 1263 |
+
roundcorners_across_materials: false
|
| 1264 |
+
);
|
| 1265 |
+
|
| 1266 |
+
|
| 1267 |
+
export material Stainless_Steel_Punched_Square(*)
|
| 1268 |
+
[[
|
| 1269 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1270 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1271 |
+
::anno::contributor("Maik Rohland"),
|
| 1272 |
+
::anno::display_name("Stainless Steel - Square Punch"),
|
| 1273 |
+
::anno::description("Punched stainless steel"),
|
| 1274 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1275 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Square.png"),
|
| 1276 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "square", "gray"))
|
| 1277 |
+
]] = Stainless_Steel_Punched(
|
| 1278 |
+
// Punching parameters
|
| 1279 |
+
shape_select: pattern_square,
|
| 1280 |
+
punching_grid_size: float2(1.2f),
|
| 1281 |
+
cutout_size: 0.56f,
|
| 1282 |
+
cutout_roundness: 0.1f,
|
| 1283 |
+
cutout_bevel_width: 0.5f,
|
| 1284 |
+
cutout_bump_strength: 1.5f,
|
| 1285 |
+
hexagonal_grid: false,
|
| 1286 |
+
square_grid_offset: 0.5f,
|
| 1287 |
+
horizontal_offset: true,
|
| 1288 |
+
|
| 1289 |
+
// Material Parameters
|
| 1290 |
+
infinite_tiling: true,
|
| 1291 |
+
roughness: 0.3f,
|
| 1292 |
+
roughness_variation: 0.2f,
|
| 1293 |
+
cloudiness: 0.44f,
|
| 1294 |
+
brightness: 0.5f,
|
| 1295 |
+
milling_bump_strength: 0.05f,
|
| 1296 |
+
dents_bump_strength: 0.02f,
|
| 1297 |
+
dents_scale: 1.0f,
|
| 1298 |
+
smudges_1_weight: 0.04f,
|
| 1299 |
+
smudges_2_weight: 0.05f,
|
| 1300 |
+
smudges_falloff: 0.0f,
|
| 1301 |
+
smudges_scale: 1.0f,
|
| 1302 |
+
texture_translate: float2(0.0f),
|
| 1303 |
+
texture_rotate: 0.0f,
|
| 1304 |
+
texture_scale: float2(1.0f),
|
| 1305 |
+
uv_space_index: 0,
|
| 1306 |
+
roundcorners_enable: false,
|
| 1307 |
+
roundcorners_radius_mm: 0.5f,
|
| 1308 |
+
roundcorners_across_materials: false
|
| 1309 |
+
);
|
| 1310 |
+
|
| 1311 |
+
|
| 1312 |
+
export material Stainless_Steel_Punched_Line(*)
|
| 1313 |
+
[[
|
| 1314 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1315 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1316 |
+
::anno::contributor("Maik Rohland"),
|
| 1317 |
+
::anno::display_name("Stainless Steel - Line Punch"),
|
| 1318 |
+
::anno::description("Punched stainless steel"),
|
| 1319 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1320 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Line.png"),
|
| 1321 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "line", "gray"))
|
| 1322 |
+
]] = Stainless_Steel_Punched(
|
| 1323 |
+
// Punching parameters
|
| 1324 |
+
shape_select: pattern_line,
|
| 1325 |
+
punching_grid_size: float2(1.3f),
|
| 1326 |
+
cutout_size: 0.59f,
|
| 1327 |
+
cutout_roundness: 0.4f,
|
| 1328 |
+
cutout_bevel_width: 0.3f,
|
| 1329 |
+
cutout_bump_strength: 1.5f,
|
| 1330 |
+
hexagonal_grid: false,
|
| 1331 |
+
square_grid_offset: 0.3333f,
|
| 1332 |
+
horizontal_offset: true,
|
| 1333 |
+
|
| 1334 |
+
// Material Parameters
|
| 1335 |
+
infinite_tiling: true,
|
| 1336 |
+
roughness: 0.3f,
|
| 1337 |
+
roughness_variation: 0.2f,
|
| 1338 |
+
cloudiness: 0.44f,
|
| 1339 |
+
brightness: 0.5f,
|
| 1340 |
+
milling_bump_strength: 0.05f,
|
| 1341 |
+
dents_bump_strength: 0.02f,
|
| 1342 |
+
dents_scale: 1.0f,
|
| 1343 |
+
smudges_1_weight: 0.04f,
|
| 1344 |
+
smudges_2_weight: 0.05f,
|
| 1345 |
+
smudges_falloff: 0.0f,
|
| 1346 |
+
smudges_scale: 1.0f,
|
| 1347 |
+
texture_translate: float2(0.0f),
|
| 1348 |
+
texture_rotate: 0.0f,
|
| 1349 |
+
texture_scale: float2(1.0f),
|
| 1350 |
+
uv_space_index: 0,
|
| 1351 |
+
roundcorners_enable: false,
|
| 1352 |
+
roundcorners_radius_mm: 0.5f,
|
| 1353 |
+
roundcorners_across_materials: false
|
| 1354 |
+
);
|
| 1355 |
+
|
| 1356 |
+
|
| 1357 |
+
export material Stainless_Steel_Punched_Cross(*)
|
| 1358 |
+
[[
|
| 1359 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1360 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1361 |
+
::anno::contributor("Maik Rohland"),
|
| 1362 |
+
::anno::display_name("Stainless Steel - Cross Punch"),
|
| 1363 |
+
::anno::description("Punched stainless steel"),
|
| 1364 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1365 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Cross.png"),
|
| 1366 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "cross", "gray"))
|
| 1367 |
+
]] = Stainless_Steel_Punched(
|
| 1368 |
+
// Punching parameters
|
| 1369 |
+
shape_select: pattern_cross,
|
| 1370 |
+
punching_grid_size: float2(2.0f),
|
| 1371 |
+
cutout_size: 0.59f,
|
| 1372 |
+
cutout_roundness: 0.1f,
|
| 1373 |
+
cutout_bevel_width: 0.44f,
|
| 1374 |
+
cutout_bump_strength: 1.5f,
|
| 1375 |
+
hexagonal_grid: true,
|
| 1376 |
+
square_grid_offset: 0.0f,
|
| 1377 |
+
horizontal_offset: true,
|
| 1378 |
+
|
| 1379 |
+
// Material Parameters
|
| 1380 |
+
infinite_tiling: true,
|
| 1381 |
+
roughness: 0.3f,
|
| 1382 |
+
roughness_variation: 0.2f,
|
| 1383 |
+
cloudiness: 0.44f,
|
| 1384 |
+
brightness: 0.5f,
|
| 1385 |
+
milling_bump_strength: 0.05f,
|
| 1386 |
+
dents_bump_strength: 0.02f,
|
| 1387 |
+
dents_scale: 1.0f,
|
| 1388 |
+
smudges_1_weight: 0.04f,
|
| 1389 |
+
smudges_2_weight: 0.05f,
|
| 1390 |
+
smudges_falloff: 0.0f,
|
| 1391 |
+
smudges_scale: 1.0f,
|
| 1392 |
+
texture_translate: float2(0.0f),
|
| 1393 |
+
texture_rotate: 0.0f,
|
| 1394 |
+
texture_scale: float2(1.0f),
|
| 1395 |
+
uv_space_index: 0,
|
| 1396 |
+
roundcorners_enable: false,
|
| 1397 |
+
roundcorners_radius_mm: 0.5f,
|
| 1398 |
+
roundcorners_across_materials: false
|
| 1399 |
+
);
|
| 1400 |
+
|
| 1401 |
+
|
| 1402 |
+
export material Stainless_Steel_Punched_Rhombus(*)
|
| 1403 |
+
[[
|
| 1404 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1405 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1406 |
+
::anno::contributor("Maik Rohland"),
|
| 1407 |
+
::anno::display_name("Stainless Steel - Rhombus Punch"),
|
| 1408 |
+
::anno::description("Punched stainless steel"),
|
| 1409 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1410 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Rhombus.png"),
|
| 1411 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "rhombus", "gray"))
|
| 1412 |
+
]] = Stainless_Steel_Punched(
|
| 1413 |
+
// Punching parameters
|
| 1414 |
+
shape_select: pattern_rhombus,
|
| 1415 |
+
punching_grid_size: float2(1.4f),
|
| 1416 |
+
cutout_size: 1.0f,
|
| 1417 |
+
cutout_roundness: 0.8f,
|
| 1418 |
+
cutout_bevel_width: 0.5f,
|
| 1419 |
+
cutout_bump_strength: 1.5f,
|
| 1420 |
+
hexagonal_grid: true,
|
| 1421 |
+
square_grid_offset: 0.0f,
|
| 1422 |
+
horizontal_offset: true,
|
| 1423 |
+
|
| 1424 |
+
// Material Parameters
|
| 1425 |
+
infinite_tiling: true,
|
| 1426 |
+
roughness: 0.3f,
|
| 1427 |
+
roughness_variation: 0.2f,
|
| 1428 |
+
cloudiness: 0.44f,
|
| 1429 |
+
brightness: 0.5f,
|
| 1430 |
+
milling_bump_strength: 0.05f,
|
| 1431 |
+
dents_bump_strength: 0.02f,
|
| 1432 |
+
dents_scale: 1.0f,
|
| 1433 |
+
smudges_1_weight: 0.04f,
|
| 1434 |
+
smudges_2_weight: 0.05f,
|
| 1435 |
+
smudges_falloff: 0.0f,
|
| 1436 |
+
smudges_scale: 1.0f,
|
| 1437 |
+
texture_translate: float2(0.0f),
|
| 1438 |
+
texture_rotate: 0.0f,
|
| 1439 |
+
texture_scale: float2(1.0f),
|
| 1440 |
+
uv_space_index: 0,
|
| 1441 |
+
roundcorners_enable: false,
|
| 1442 |
+
roundcorners_radius_mm: 0.5f,
|
| 1443 |
+
roundcorners_across_materials: false
|
| 1444 |
+
);
|
| 1445 |
+
|
| 1446 |
+
|
| 1447 |
+
export material Stainless_Steel_Punched_Triangle(*)
|
| 1448 |
+
[[
|
| 1449 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1450 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1451 |
+
::anno::contributor("Maik Rohland"),
|
| 1452 |
+
::anno::display_name("Stainless Steel - Triangle Punch"),
|
| 1453 |
+
::anno::description("Punched stainless steel"),
|
| 1454 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1455 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Triangle.png"),
|
| 1456 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "triangle", "gray"))
|
| 1457 |
+
]] = Stainless_Steel_Punched(
|
| 1458 |
+
shape_select: pattern_triangle,
|
| 1459 |
+
punching_grid_size: float2(1.3f),
|
| 1460 |
+
cutout_size: 1.08f,
|
| 1461 |
+
cutout_roundness: 1.0f,
|
| 1462 |
+
cutout_bevel_width: 1.0f,
|
| 1463 |
+
cutout_bump_strength: 1.5f,
|
| 1464 |
+
hexagonal_grid: true,
|
| 1465 |
+
square_grid_offset: 0.0f,
|
| 1466 |
+
horizontal_offset: true,
|
| 1467 |
+
|
| 1468 |
+
// Material Parameters
|
| 1469 |
+
infinite_tiling: true,
|
| 1470 |
+
roughness: 0.3f,
|
| 1471 |
+
roughness_variation: 0.2f,
|
| 1472 |
+
cloudiness: 0.44f,
|
| 1473 |
+
brightness: 0.5f,
|
| 1474 |
+
milling_bump_strength: 0.05f,
|
| 1475 |
+
dents_bump_strength: 0.02f,
|
| 1476 |
+
dents_scale: 1.0f,
|
| 1477 |
+
smudges_1_weight: 0.04f,
|
| 1478 |
+
smudges_2_weight: 0.05f,
|
| 1479 |
+
smudges_falloff: 0.0f,
|
| 1480 |
+
smudges_scale: 1.0f,
|
| 1481 |
+
texture_translate: float2(0.0f),
|
| 1482 |
+
texture_rotate: 0.0f,
|
| 1483 |
+
texture_scale: float2(1.0f),
|
| 1484 |
+
uv_space_index: 0,
|
| 1485 |
+
roundcorners_enable: false,
|
| 1486 |
+
roundcorners_radius_mm: 0.5f,
|
| 1487 |
+
roundcorners_across_materials: false
|
| 1488 |
+
);
|
| 1489 |
+
|
| 1490 |
+
|
| 1491 |
+
export material Stainless_Steel_Punched_Star(*)
|
| 1492 |
+
[[
|
| 1493 |
+
::anno::author("NVIDIA vMaterials"),
|
| 1494 |
+
::anno::contributor("Rüdiger Raab"),
|
| 1495 |
+
::anno::contributor("Maik Rohland"),
|
| 1496 |
+
::anno::display_name("Stainless Steel - Star Punch"),
|
| 1497 |
+
::anno::description("Punched stainless steel"),
|
| 1498 |
+
::anno::copyright_notice(COPYRIGHT),
|
| 1499 |
+
::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Star.png"),
|
| 1500 |
+
::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "star", "gray"))
|
| 1501 |
+
]] = Stainless_Steel_Punched(
|
| 1502 |
+
shape_select: pattern_star,
|
| 1503 |
+
punching_grid_size: float2(1.5f),
|
| 1504 |
+
cutout_size: 0.68f,
|
| 1505 |
+
cutout_roundness: 0.5f,
|
| 1506 |
+
cutout_bevel_width: 0.44f,
|
| 1507 |
+
cutout_bump_strength: 1.5f,
|
| 1508 |
+
hexagonal_grid: true,
|
| 1509 |
+
square_grid_offset: 0.0f,
|
| 1510 |
+
horizontal_offset: true,
|
| 1511 |
+
|
| 1512 |
+
// Material Parameters
|
| 1513 |
+
infinite_tiling: true,
|
| 1514 |
+
roughness: 0.3f,
|
| 1515 |
+
roughness_variation: 0.2f,
|
| 1516 |
+
cloudiness: 0.44f,
|
| 1517 |
+
brightness: 0.5f,
|
| 1518 |
+
milling_bump_strength: 0.05f,
|
| 1519 |
+
dents_bump_strength: 0.02f,
|
| 1520 |
+
dents_scale: 1.0f,
|
| 1521 |
+
smudges_1_weight: 0.04f,
|
| 1522 |
+
smudges_2_weight: 0.05f,
|
| 1523 |
+
smudges_falloff: 0.0f,
|
| 1524 |
+
smudges_scale: 1.0f,
|
| 1525 |
+
texture_translate: float2(0.0f),
|
| 1526 |
+
texture_rotate: 0.0f,
|
| 1527 |
+
texture_scale: float2(1.0f),
|
| 1528 |
+
uv_space_index: 0,
|
| 1529 |
+
roundcorners_enable: false,
|
| 1530 |
+
roundcorners_radius_mm: 0.5f,
|
| 1531 |
+
roundcorners_across_materials: false
|
| 1532 |
+
);
|
| 1533 |
+
|
| 1534 |
+
|
| 1535 |
+
|
| 1536 |
+
|
| 1537 |
+
|
| 1538 |
+
|
| 1539 |
+
|
| 1540 |
+
|
| 1541 |
+
|
| 1542 |
+
|
| 1543 |
+
|
EXLS1/simready_usd/materials/Stainless_Steel_Brushed.mdl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
EXLS1/simready_usd/materials/WhiteMode.mdl
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
//
|
| 3 |
+
// NVIDIA CORPORATION and its licensors retain all intellectual property
|
| 4 |
+
// and proprietary rights in and to this software, related documentation
|
| 5 |
+
// and any modifications thereto. Any use, reproduction, disclosure or
|
| 6 |
+
// distribution of this software and related documentation without an express
|
| 7 |
+
// license agreement from NVIDIA CORPORATION is strictly prohibited.
|
| 8 |
+
//
|
| 9 |
+
|
| 10 |
+
// adjusted to be alittle darker, not harsh white, changed name to Whitemode
|
| 11 |
+
|
| 12 |
+
mdl 1.5;
|
| 13 |
+
import ::anno::*;
|
| 14 |
+
import ::df::diffuse_reflection_bsdf;
|
| 15 |
+
import ::state::normal;
|
| 16 |
+
|
| 17 |
+
export material WhiteMode(
|
| 18 |
+
|
| 19 |
+
color diffuse_color_constant = color(.99f)
|
| 20 |
+
[[
|
| 21 |
+
anno::display_name("Base Color"),
|
| 22 |
+
anno::description("This is the base color")
|
| 23 |
+
]]
|
| 24 |
+
)
|
| 25 |
+
=
|
| 26 |
+
let {
|
| 27 |
+
material_surface surface(
|
| 28 |
+
::df::diffuse_reflection_bsdf(diffuse_color_constant));
|
| 29 |
+
} in material(
|
| 30 |
+
thin_walled: false,
|
| 31 |
+
surface: surface);
|
EXLS1/simready_usd/payloads/.thumbs/256x256/external.usd.png
ADDED
|
|
Git LFS Details
|
EXLS1/simready_usd/payloads/.thumbs/256x256/internal.usd.png
ADDED
|
|
Git LFS Details
|
EXLS1/simready_usd/payloads/external.usd
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c66fac6d2aacdd279f2434cb288d686f632a8b4c9ba047e4cb6843c6bc0479c
|
| 3 |
+
size 62167662
|
EXLS1/simready_usd/payloads/internal.usd
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8a04e9bdd921c18afc8e1a9cdf1a2d17df5e6158d45d45ca765557aad4d9a9e
|
| 3 |
+
size 44772932
|
EXLS1/simready_usd/textures/image screen.png
ADDED
|
Git LFS Details
|