Add SimReady package: ACS_8000
Browse filesFiles changed (34)
- .gitattributes+3
- ACS_8000/.metadata/ACS_8000_benchmark.jsonAdded+510
- ACS_8000/.metadata/ACS_8000_validation.jsonAdded+62
- ACS_8000/.metadata/com.nvidia.simready.conformance.Package@1.0.0.jsonAdded+35
- ACS_8000/.metadata/com.nvidia.simready.packaging.bom.jsonAdded+231
- ACS_8000/com.nvidia.simready.packaging.jsonAdded+31
- ACS_8000/simready_usd/.simready/validation.jsonAdded+60
- ACS_8000/simready_usd/.thumbs/256x256/ACS_8000_main.usd.pngAdded
- ACS_8000/simready_usd/.thumbs/256x256/ACS_8000_main.usd_light.pngAdded
- ACS_8000/simready_usd/.thumbs/256x256/ACS_8000_main.usd_transparent.pngAdded
- ACS_8000/simready_usd/ACS_8000_main.jsonAdded+17
- ACS_8000/simready_usd/ACS_8000_main.usdAdded+3
- ACS_8000/simready_usd/layers/ACS_8000_ConnectionPoints.usdaAdded+45
- ACS_8000/simready_usd/layers/ACS_8000__Properties.jsonAdded+243
- ACS_8000/simready_usd/layers/ACS_8000__Properties.usdaAdded+469
- ACS_8000/simready_usd/materials/Aging_Copper.mdlAdded
- ACS_8000/simready_usd/materials/Carpaint_Solid.mdlAdded+1112
- ACS_8000/simready_usd/materials/OmniPBR.mdlAdded+396
- ACS_8000/simready_usd/materials/OmniPBRBase.mdlAdded+470
- ACS_8000/simready_usd/materials/OmniPBR_ClearCoat.mdlAdded+711
- ACS_8000/simready_usd/materials/OmniPBR_ClearCoat_Opacity.mdlAdded+860
- ACS_8000/simready_usd/materials/OmniPBR_Opacity.mdlAdded+404
- ACS_8000/simready_usd/materials/Plastic_Thick_Translucent.mdlAdded+673
- ACS_8000/simready_usd/materials/Stainless_Steel.mdlAdded+1543
- ACS_8000/simready_usd/materials/Stainless_Steel_Brushed.mdlAdded
- ACS_8000/simready_usd/materials/WhiteMode.mdlAdded+31
- ACS_8000/simready_usd/payloads/external.usdAdded+3
- ACS_8000/simready_usd/payloads/internal.usdAdded+3
- ACS_8000/simready_usd/textures/ACS8000_inverted.pngAdded
- ACS_8000/simready_usd/textures/ACS8000_inverted_01.pngAdded
- ACS_8000/simready_usd/textures/ACS8000_inverted_02.pngAdded
- ACS_8000/simready_usd/textures/ACS8000_inverted_03.pngAdded
- ACS_8000/simready_usd/textures/ACS8000_inverted_ACS.pngAdded
- ACS_8000/simready_usd/textures/ACS8000_inverted_Logo.pngAdded
154 unmodified lines155156157158159160154 unmodified linesPowerUPS_9000_480V_1250KVA/simready_usd/payloads/internal.usd filter=lfs diff=lfs merge=lfs -textPowerUPS_9000_415V_1250KVA/simready_usd/payloads/external.usd filter=lfs diff=lfs merge=lfs -textPowerUPS_9000_415V_1250KVA/simready_usd/payloads/internal.usd filter=lfs diff=lfs merge=lfs -textACS_8000/simready_usd/ACS_8000_main.usd filter=lfs diff=lfs merge=lfs -textACS_8000/simready_usd/payloads/external.usd filter=lfs diff=lfs merge=lfs -textACS_8000/simready_usd/payloads/internal.usd filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510{
"schema_version": "1.0",
"asset": "ACS_8000",
"run_timestamp": "2026-11-16T12:01:54Z",
"passed": true,
"results": [
{
"test_name": "culling_xz",
"engine": "isaac_sim",
"engine_version": "6.2.0.0",
"status": "pass",
"passed": true,
"duration": 25.265,
"message": "",
"metrics": {
"_timing_capture_frame_total_s": {
"value": 2.186,
"unit": null
},
"_timing_capture_frame_count": {
"value": 16,
"unit": null
},
"_timing_capture_frame_avg_ms": {
"value": 136.62,
"unit": null
},
"_timing_encode_video_total_s": {
"value": 0.968,
"unit": null
},
"_timing_encode_video_count": {
"value": 2,
"unit": null
},
"_render_blank_retry_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_unrecovered": {
"value": 0,
"unit": null
},
"culling_xz_max_diff": {
"value": 0.000771,
"unit": null
},
"culling_xz_mean_diff": {
"value": 0.000239,
"unit": null
},
"culling_xz_worst_angle": {
"value": 225.0,
"unit": null
},
"culling_xz_passed": {
"value": 1,
"unit": null
}
},
"kit_logs": []
},
{
"test_name": "light_response",
"engine": "isaac_sim",
"engine_version": "6.2.0.0",
"status": "pass",
"passed": true,
"duration": 11.593,
"message": "",
"metrics": {
"_timing_capture_frame_total_s": {
"value": 4.079,
"unit": null
},
"_timing_capture_frame_count": {
"value": 30,
"unit": null
},
"_timing_capture_frame_avg_ms": {
"value": 135.97,
"unit": null
},
"_timing_encode_video_total_s": {
"value": 0.796,
"unit": null
},
"_timing_encode_video_count": {
"value": 1,
"unit": null
},
"_render_blank_retry_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_unrecovered": {
"value": 0,
"unit": null
},
"light_response_variation_ratio": {
"value": 0.310345,
"unit": null
},
"light_response_blank_ratio": {
"value": 0.0,
"unit": null
},
"light_response_blank_frames": {
"value": 0,
"unit": null
},
"light_response_total_frames": {
"value": 30,
"unit": null
},
"light_response_total_pairs": {
"value": 29,
"unit": null
},
"light_response_different_pairs": {
"value": 9,
"unit": null
},
"light_response_passed": {
"value": 1,
"unit": null
},
"light_response_max_pair_change": {
"value": 0.677129,
"unit": null
},
"light_response_min_pair_change": {
"value": 0.001239,
"unit": null
}
},
"kit_logs": []
},
{
"test_name": "normals_xz",
"engine": "isaac_sim",
"engine_version": "6.2.0.0",
"status": "pass",
"passed": true,
"duration": 4.719,
"message": "",
"metrics": {
"_timing_capture_frame_total_s": {
"value": 1.172,
"unit": null
},
"_timing_capture_frame_count": {
"value": 8,
"unit": null
},
"_timing_capture_frame_avg_ms": {
"value": 146.5,
"unit": null
},
"_timing_encode_video_total_s": {
"value": 0.266,
"unit": null
},
"_timing_encode_video_count": {
"value": 1,
"unit": null
},
"_render_blank_retry_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_unrecovered": {
"value": 0,
"unit": null
},
"normals_xz_avg_dark": {
"value": 0.000753,
"unit": null
},
"normals_xz_max_dark": {
"value": 0.005539,
"unit": null
},
"normals_xz_problem_frames": {
"value": 0,
"unit": null
},
"normals_xz_passed": {
"value": 1,
"unit": null
}
},
"kit_logs": [
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: Traceback (most recent call last):"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/impl/texture.py\", line 429, in on_drawable_changed"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: self.__drawable_changed_fn(texture[\"rp_resource\"], presentation_key)"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/widget.py\", line 516, in __set_image_data"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: vp_api._sync_viewport_api(camera, canvas_size, vp_api.time, view, projection, force_update=True) # noqa PLW0212"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/api.py\", line 546, in _sync_viewport_api"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: self.__projection = self._conform_projection(policy, camera, image_aspect, canvas_aspect, projection)"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/api.py\", line 476, in _conform_projection"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: gf_camera = camera.GetCamera(self.__time)"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: ^^^^^^^^^^^^^^^^"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: AttributeError: 'NoneType' object has no attribute 'GetCamera'"
}
]
},
{
"test_name": "pivot",
"engine": "isaac_sim",
"engine_version": "6.2.0.0",
"status": "pass",
"passed": true,
"duration": 9.765,
"message": "",
"metrics": {
"_timing_capture_frame_total_s": {
"value": 3.143,
"unit": null
},
"_timing_capture_frame_count": {
"value": 20,
"unit": null
},
"_timing_capture_frame_avg_ms": {
"value": 157.15,
"unit": null
},
"_timing_encode_video_total_s": {
"value": 0.64,
"unit": null
},
"_timing_encode_video_count": {
"value": 2,
"unit": null
},
"_render_blank_retry_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_unrecovered": {
"value": 0,
"unit": null
},
"pivot_score": {
"value": 0.9,
"unit": null
},
"pivot_pivot_height_pct": {
"value": 0.4,
"unit": null
},
"pivot_pivot_at_base": {
"value": 1,
"unit": null
},
"pivot_pivot_centered_xy": {
"value": 1,
"unit": null
},
"pivot_ground_penetration": {
"value": 1,
"unit": null
},
"pivot_orbital_motion": {
"value": 0,
"unit": null
},
"pivot_passed": {
"value": 1,
"unit": null
}
},
"kit_logs": [
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: Traceback (most recent call last):"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/impl/texture.py\", line 429, in on_drawable_changed"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: self.__drawable_changed_fn(texture[\"rp_resource\"], presentation_key)"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/widget.py\", line 516, in __set_image_data"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: vp_api._sync_viewport_api(camera, canvas_size, vp_api.time, view, projection, force_update=True) # noqa PLW0212"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/api.py\", line 546, in _sync_viewport_api"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: self.__projection = self._conform_projection(policy, camera, image_aspect, canvas_aspect, projection)"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/api.py\", line 476, in _conform_projection"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: gf_camera = camera.GetCamera(self.__time)"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: ^^^^^^^^^^^^^^^^"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: AttributeError: 'NoneType' object has no attribute 'GetCamera'"
}
]
},
{
"test_name": "presence",
"engine": "isaac_sim",
"engine_version": "6.2.0.0",
"status": "pass",
"passed": true,
"duration": 1.938,
"message": "",
"metrics": {
"_timing_capture_frame_total_s": {
"value": 0.249,
"unit": null
},
"_timing_capture_frame_count": {
"value": 2,
"unit": null
},
"_timing_capture_frame_avg_ms": {
"value": 124.5,
"unit": null
},
"_timing_encode_video_total_s": {
"value": 0.0,
"unit": null
},
"_timing_encode_video_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_unrecovered": {
"value": 0,
"unit": null
},
"presence_diff_ratio": {
"value": 0.180892,
"unit": null
},
"presence_passed": {
"value": 1,
"unit": null
}
},
"kit_logs": [
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: Traceback (most recent call last):"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/impl/texture.py\", line 429, in on_drawable_changed"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: self.__drawable_changed_fn(texture[\"rp_resource\"], presentation_key)"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/widget.py\", line 516, in __set_image_data"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: vp_api._sync_viewport_api(camera, canvas_size, vp_api.time, view, projection, force_update=True) # noqa PLW0212"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/api.py\", line 546, in _sync_viewport_api"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: self.__projection = self._conform_projection(policy, camera, image_aspect, canvas_aspect, projection)"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: File \"../iv/lib/site-packages/isaacsim/extscache/omni.kit.widget.viewport-110.0.1+187cf21b/omni/kit/widget/viewport/api.py\", line 476, in _conform_projection"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: gf_camera = camera.GetCamera(self.__time)"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: ^^^^^^^^^^^^^^^^"
},
{
"level": "error",
"channel": "omni.kit.app._impl",
"message": "[py stderr]: AttributeError: 'NoneType' object has no attribute 'GetCamera'"
}
]
}
]
}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162{
"simready_usd/ACS_8000_main.usd": {
"features_summary": {
"FET200_AIF": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "0.1.0"
},
"FET201_AIF": {
"blocking_failure": false,
"dependencies": "[{'FET200_AIF': {'version': '0.1.0'}}]",
"passed": true,
"version": "0.2.0"
},
"FET202_AIF": {
"blocking_failure": false,
"dependencies": "[{'FET201_AIF': {'version': '0.2.0'}}]",
"passed": true,
"version": "0.2.0"
},
"FET203_AIF": {
"blocking_failure": false,
"dependencies": "[{'FET201_AIF': {'version': '0.2.0'}}]",
"passed": true,
"version": "0.2.0"
},
"FET_000_STANDARD": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "0.2.0"
},
"FET_001_STANDARD": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "1.0.0"
},
"FET_031_STANDARD": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "0.1.0"
},
"FET_033_STANDARD": {
"blocking_failure": false,
"dependencies": "[{'FET_031_STANDARD': {'version': '0.1.0'}}]",
"passed": true,
"version": "0.4.0"
}
},
"profile_id": "AIF-Entity",
"profile_version": "0.2.0",
"simready_validate_version": "2026.8.0",
"tier_versions": {
"sensors": "2026.8.0",
"tier_aif": "2026.8.0",
"tier_core": "2026.8.0"
}
}
}1234567891011121314151617181920212223242526272829303132333435{ "format_version": "1.0", "profile": "Package", "profile_version": "1.0.0", "timestamp": "2026-11-16T12:02:04", "assets": [ { "asset": "com.nvidia.simready.packaging.json", "features": [ { "FET_030_STANDARD": { "version": "0.1.0", "passed": true, "failing_requirements": [], "dependencies": [] } }, { "FET_032_STANDARD": { "version": "0.1.0", "passed": true, "failing_requirements": [], "dependencies": [ { "FET_030_STANDARD": { "version": "0.1.0" } } ] } } ] } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231{ "format_version": "1.0", "items": [ { "relative_path": "simready_usd/.simready/validation.json", "size": 1797, "hash": { "sha256-flat-1mb": "5d49f7935526610a3b795bba7e07e11662432e524af803797de2f98b4a847f35", "sha256": "eccb35cb192f88c1f6a4cafe83e72dfa37d467985ea04030b0dc7d22b03214eb" } }, { "relative_path": "simready_usd/.thumbs/256x256/ACS_8000_main.usd.png", "size": 599477, "hash": { "sha256-flat-1mb": "b435bd459244fe7279a832b7333af69799e09a77e23958b1be9b75dbd81963a3", "sha256": "4911a28d6654375497c475cc460522caf425db13cadd355714bed3068095f27a" } }, { "relative_path": "simready_usd/.thumbs/256x256/ACS_8000_main.usd_light.png", "size": 365024, "hash": { "sha256-flat-1mb": "00ce5031d05a21179df0930db53d5593e58567342a9685d2343fbb2199c90b93", "sha256": "4ff4791468adec8f066e928a1d9e3b91ca46412924c5b62404f9021a2fadc9af" } }, { "relative_path": "simready_usd/.thumbs/256x256/ACS_8000_main.usd_transparent.png", "size": 267753, "hash": { "sha256-flat-1mb": "fe080b6f6b61c76f0d061e6192cbfc3c69441d7ef017428d9df59735b28cd66b", "sha256": "6566efe889fc424e479c119d29e56c6f6ef7a23117edb739636c7522911e33a1" } }, { "relative_path": "simready_usd/ACS_8000_main.json", "size": 396, "hash": { "sha256-flat-1mb": "f02c2359fb40e63b05de83353fb6586a2643376a27b3d1ef663f7bbdda124903", "sha256": "199fcea7ef088ba27ac34cda4863689ee783e61f2829c391942d6d72b7de62be" } }, { "relative_path": "simready_usd/ACS_8000_main.usd", "size": 254732, "hash": { "sha256-flat-1mb": "75960d18896c6de49e37a97465ab122c99ad6b06515ba5290c4eb509662b58ab", "sha256": "b110898003a93c0a82ed063ac2cb4b90506384b36cfbff906da6996f4374b7f1" } }, { "relative_path": "simready_usd/layers/ACS_8000_ConnectionPoints.usda", "size": 2410, "hash": { "sha256-flat-1mb": "35af36e022e614780d60a7dd5e7470ed7abefa694890abb56a0d1b92fb57146d", "sha256": "d1d6af1b5abc8d0b61ea5eedac0f019021c707688feec4c052adaa2bc5201367" } }, { "relative_path": "simready_usd/layers/ACS_8000__Properties.json", "size": 7607, "hash": { "sha256-flat-1mb": "39155c8fd7d891c2e143deffd2a1ac3216e8c0fbfc0688dce00bb3942d561d9a", "sha256": "7b455c70c89fe17c44d87130abdfe38dcb4b25c3393a10c6e0c3077ae879da2b" } }, { "relative_path": "simready_usd/layers/ACS_8000__Properties.usda", "size": 13935, "hash": { "sha256-flat-1mb": "94792f13bd76a08544029f37cfdbde0c33236aa438005cae9b86de8f549d499b", "sha256": "4897b4b204f41c004599104d81dce115e677cc3a1b1e00b7c9123c48f6ce3cab" } }, { "relative_path": "simready_usd/materials/Aging_Copper.mdl", "size": 120899, "hash": { "sha256-flat-1mb": "fc9cda483abfed683fa555826887597eac859bb92552fc29cf698cfb15a2e138", "sha256": "66ebb12aa2d73225c2930a1262b4cd80ac8929c475d00ee92d5e7d9e710f4f4e" } }, { "relative_path": "simready_usd/materials/Carpaint_Solid.mdl", "size": 44585, "hash": { "sha256-flat-1mb": "26159d8a8bbbc4ea913351f189b2eb1146ab7c2e51d9a8285262ecb0ab2964d7", "sha256": "e51996b5c78df239742fcf76ed3475002328afd0c5ba7922932bca89330a3b56" } }, { "relative_path": "simready_usd/materials/OmniPBR.mdl", "size": 13989, "hash": { "sha256-flat-1mb": "4d0f54d47017bfbe22cc483cb02c4fe7e2254ddd1119cd618cbaea553639d52c", "sha256": "d384fc800f120e3cad1b7ca8837f9c554f9c34343d194813fca27caa493001f2" } }, { "relative_path": "simready_usd/materials/OmniPBRBase.mdl", "size": 17274, "hash": { "sha256-flat-1mb": "4b54e7fb8bc92191512851b3acc6fc6fa9863f80d98ffece8f0cb9b99f5f4535", "sha256": "701f37299b44106842bdbe025de52eedec391e35b038f61c4ed4d25bd98e7db1" } }, { "relative_path": "simready_usd/materials/OmniPBR_ClearCoat.mdl", "size": 27453, "hash": { "sha256-flat-1mb": "0e35217542eb4ece0205fc09f74eb71aaa6bfb75b3b861d64693d317282df424", "sha256": "687fce3f0693146b91495f04407a7c38c78f6b9262b63621f44b4b1f09110469" } }, { "relative_path": "simready_usd/materials/OmniPBR_ClearCoat_Opacity.mdl", "size": 29425, "hash": { "sha256-flat-1mb": "46f3ebf0c910e680227e4103af7b57468998cfa5f9d333aab28596ec69e31e85", "sha256": "894492f8118d6bf798b88a45843ead2202f1852a8741de337e33a842215edcbe" } }, { "relative_path": "simready_usd/materials/OmniPBR_Opacity.mdl", "size": 12793, "hash": { "sha256-flat-1mb": "1f3a1b6efd60aaeee8f538664d2005d6c3ab1ed1db673b5726caafb9792cab01", "sha256": "e4d56fda91f3dfadfb67f8a14120219ad7493418656ad19fabc10b55ee2fa565" } }, { "relative_path": "simready_usd/materials/Plastic_Thick_Translucent.mdl", "size": 30015, "hash": { "sha256-flat-1mb": "94779fc778fbfb109243127729938f1e4834767b5b42257a06c70e2cfab35b4a", "sha256": "81f86d0ed3fbfa87812de56055cbcafc27f68b925d4d5e769633973e9c3c892a" } }, { "relative_path": "simready_usd/materials/Stainless_Steel.mdl", "size": 80870, "hash": { "sha256-flat-1mb": "960e7293aad88d47776fc05b37835ec6397f31c40c9d192a50d2c428a01e382c", "sha256": "c36448744a96ab3e6972de06287dedb6f85c0d735d6c6f5df028a0f4cc89bce9" } }, { "relative_path": "simready_usd/materials/Stainless_Steel_Brushed.mdl", "size": 106167, "hash": { "sha256-flat-1mb": "28dcd13a2ac6fce0073b1b9a96f30edba96c18375acbfb5d2cbfb9b0c6cd3198", "sha256": "0898730d0c187f7400ca0d35ed97261dec41d0dda10fd47a371684bf71873597" } }, { "relative_path": "simready_usd/materials/WhiteMode.mdl", "size": 998, "hash": { "sha256-flat-1mb": "c07b0292c81dd4217326e9f2c755ff2d7ff470422fa974e6e03d907a2b62cc2f", "sha256": "3bc76f53a19cada6acc1c4f9463264f0934f3dd45805cbe6af56c7b7df895b5d" } }, { "relative_path": "simready_usd/payloads/external.usd", "size": 9825840, "hash": { "sha256-flat-1mb": "ef06075ffd0f12d58b9112102da395b30aa37bcb0623d54e55487ee21939abff", "sha256": "de1b1fd5334e8fc240b4740a8f48d730caccedd7b298b403eb7d760e14e4f2bb", "sha256-first1m": "a2e88117de6fe8b8e46b3577c3dfa566b622fb69da6607b5e3adf0d71f3b6327" } }, { "relative_path": "simready_usd/payloads/internal.usd", "size": 7316265, "hash": { "sha256-flat-1mb": "64d4c33aac33861e530a7a5089d4fc55e98ccb6d1ccd2a21cab5a6fcd56af22a", "sha256": "a7d9d20f785355a3775010f3c6f8d54b7142a907b0fad80b1f5db29c2255e2d7", "sha256-first1m": "abf3751ddd86601be2ecd6a53e641f46ad55bccbbce9addeb4f09a22a558266c" } }, { "relative_path": "simready_usd/textures/ACS8000_inverted.png", "size": 6792, "hash": { "sha256-flat-1mb": "74738e10641f2b06f9c75426a426a941ed221758f25a38857b30d700f60bfe19", "sha256": "211c3d6cdd1bd0628d97010b5cf7f1c67c33e418ba6269c08273205611d0c506" } }, { "relative_path": "simready_usd/textures/ACS8000_inverted_01.png", "size": 18991, "hash": { "sha256-flat-1mb": "ab6b264334976f344560f45deeb7a887b6b80df1d38bd05f8ba757a6cbdae310", "sha256": "956166c4ed52dc93fcf5f231062a5e4f8e59bbbc5f0f0c771f3ae0a1f7f8dcdd" } }, { "relative_path": "simready_usd/textures/ACS8000_inverted_02.png", "size": 32873, "hash": { "sha256-flat-1mb": "5d0c25b32c692fa33d81c5e6d458834bb7fae37d9c6e8fc161e0425158690b2e", "sha256": "f2bc05523ec9f029108825c45959ce73ba3c6a2615b9cd2224b7669e4262309a" } }, { "relative_path": "simready_usd/textures/ACS8000_inverted_03.png", "size": 6350, "hash": { "sha256-flat-1mb": "38add9cc4eaf5b50acd2823ed6bdf5d8aac26c9c8a5872ec8f50287217f1b723", "sha256": "115406f305f04ebe495808d45166cba1bd251610b2e1ae62c5a516edc271da2b" } }, { "relative_path": "simready_usd/textures/ACS8000_inverted_ACS.png", "size": 25138, "hash": { "sha256-flat-1mb": "641e4fd94cc1ae57ee9fd649f5d3c081912913692cb24abfa35c73a30eb027f0", "sha256": "170a5464140f2c1d8a9f38e2c1132f21b6b7c3fc9b04a6556e22f868aec6b4d3" } }, { "relative_path": "simready_usd/textures/ACS8000_inverted_Logo.png", "size": 36997, "hash": { "sha256-flat-1mb": "15b432a0f7c5e495005d532d30e67e5e8e7c299d5922326b6b1eda975cb2e1d8", "sha256": "8b176a41cccdb511582aa563a73bace104d11ca6da88cfc452470c71bcde898a" } } ]}12345678910111213141516171819202122232425262728293031{ "format_version": "1.0", "package_id": "simready.hf.Vertiv.simready-assets.ACS_8000.2026.11.16_00", "license": "cc-by-4.0", "metadata": [ { "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", "hash": { "sha256": "71df77fc8208d6f695a24a58289daae6fc6d377a356b593df2a9e28f56197688" } }, { "name": "com.nvidia.simready.packaging.bom.json", "hash": { "sha256": "cb9b266e2819b2ca25a7b7c0a6e950c53b0b63ab3e50d790858519600dc36bde" } }, { "name": "com.nvidia.simready.root_usds.json", "hash": { "sha256": "ca6b4716e67d0bcb17c765463364f1ebce348a17594d10a719a488ada95a6d1e" } } ], "content_hash": { "sha256": "786b8de6700f66d658e3f0aefd84f87b405a99166e0fad0ee1a0fa33877b38d6" }, "package_hash": { "sha256": "ee1eb10d2d8e3eed85c156ac516c7eec0fd3eb378311fdd0c7626c34702ff03d" }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960{
"SimReady_Metadata": {
"validation": {
"profile": "AIF-Entity",
"profile_version": "0.2.0",
"validated_features": {
"2026-11-16": {
"FET200_AIF": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "0.1.0"
},
"FET201_AIF": {
"blocking_failure": false,
"dependencies": "[{'FET200_AIF': {'version': '0.1.0'}}]",
"passed": true,
"version": "0.2.0"
},
"FET202_AIF": {
"blocking_failure": false,
"dependencies": "[{'FET201_AIF': {'version': '0.2.0'}}]",
"passed": true,
"version": "0.2.0"
},
"FET203_AIF": {
"blocking_failure": false,
"dependencies": "[{'FET201_AIF': {'version': '0.2.0'}}]",
"passed": true,
"version": "0.2.0"
},
"FET_000_STANDARD": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "0.2.0"
},
"FET_001_STANDARD": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "1.0.0"
},
"FET_031_STANDARD": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "0.1.0"
},
"FET_033_STANDARD": {
"blocking_failure": false,
"dependencies": "[{'FET_031_STANDARD': {'version': '0.1.0'}}]",
"passed": true,
"version": "0.4.0"
}
}
}
}
}
}1234567891011121314151617{
"author": "Vertiv",
"asset_name": "ACS_8000",
"asset_type": "prop",
"asset_license": "CC-BY-4.0",
"category": "console server",
"source_file": "ACS_8000_main.usd",
"usd_date_generated": "2026-11-05",
"qcode": "Q1425344",
"rigid_body_count": 0,
"asset_extents": [
0.4392387568950653,
0.25049328804016113,
0.04333240166306496
],
"mass": 3.0
}123version https://git-lfs.github.com/spec/v1oid sha256:b110898003a93c0a82ed063ac2cb4b90506384b36cfbff906da6996f4374b7f1size 254732123456789101112131415161718192021222324252627282930313233343536373839404142434445#usda 1.0( defaultPrim = "ACS_8000_")
def Xform "ACS_8000_"{ def Scope "ConnectionPoints" { def Xform "Vertiv_Power_Supply_Input" { token purpose = "guide" token simready:connectionPoint:direction = "input" token simready:connectionPoint:disconnectType = "hardwired" token simready:connectionPoint:domain = "electrical" token simready:connectionPoint:electrical:connectorType = "hardwired" float simready:connectionPoint:electrical:frequency = 50 float simready:connectionPoint:electrical:matingDepth = 0 float simready:connectionPoint:electrical:nominalVoltage = 240 int simready:connectionPoint:electrical:phases = 1 float simready:connectionPoint:serviceClearance = 0 token simready:connectionPoint:system = "power" matrix4d xformOp:transform = ( (-3.650487308589181e-18, -5.8769564762769936e-18, 0.0264674589966337, 0), (-0.016440333282682965, 1.3049464789365288e-33, -5.8769564762769936e-18, 0), (0, -1, -2.2204460492503126e-16, 0), (-0.1994253959455768, -0.12199812085526933, 0.015479314646065598, 1) ) token[] xformOpOrder = ["xformOp:transform"] }
def Xform "Vertiv_Power_Supply_Input_01" { token purpose = "guide" token simready:connectionPoint:direction = "input" token simready:connectionPoint:disconnectType = "hardwired" token simready:connectionPoint:domain = "electrical" token simready:connectionPoint:electrical:connectorType = "hardwired" float simready:connectionPoint:electrical:frequency = 50 float simready:connectionPoint:electrical:matingDepth = 0 float simready:connectionPoint:electrical:nominalVoltage = 240 int simready:connectionPoint:electrical:phases = 1 float simready:connectionPoint:serviceClearance = 0 token simready:connectionPoint:system = "power" matrix4d xformOp:transform = ( (-3.650487308589181e-18, -5.8769564762769936e-18, 0.0264674589966337, 0), (-0.016440333282682965, 1.3049464789365288e-33, -5.8769564762769936e-18, 0), (0, -1, -2.2204460492503126e-16, 0), (-0.17508060439003065, -0.12199812085526933, 0.015479314646065598, 1) ) token[] xformOpOrder = ["xformOp:transform"] } }}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243{
"properties": {
"aif:spec:outputActivePower": {
"type": "string",
"value": "",
"description": "Output Active Power in (kW)"
},
"aif:spec:electricalInputVoltage": {
"type": "string",
"value": "240",
"description": "Electrical Nominal Voltage in V"
},
"aif:spec:electricalCurrent": {
"type": "string",
"value": "",
"description": "Electrical Current in Amp"
},
"aif:spec:inputCurrentDistortion": {
"type": "string",
"value": "",
"description": "Input Current Distortion (THDi) at Nominal Voltage at Full Load in %"
},
"aif:spec:electricalInputFrequency": {
"type": "string",
"value": "50/60",
"description": "Electrical Input Frequency in HZ"
},
"aif:spec:electricalInputPhase": {
"type": "string",
"value": "",
"description": "Electrical Input Phase"
},
"aif:spec:inputPowerFactor": {
"type": "string",
"value": "",
"description": "Electrical Power Factor"
},
"aif:spec:electricalPowerWalkIn": {
"type": "string",
"value": "",
"description": "Power Walk-in (seconds)"
},
"aif:spec:dcRippleVoltage": {
"type": "string",
"value": "",
"description": "DC Ripple Voltage (RMS) in %"
},
"aif:spec:loadPowerFactor": {
"type": "string",
"value": "",
"description": "Load Power Factor Supported (Without Derating)"
},
"aif:spec:outputVoltage": {
"type": "string",
"value": "",
"description": "Output Voltage in VDC"
},
"aif:spec:electricalOutputFrequency": {
"type": "string",
"value": "",
"description": "Electrical Output Frequency in HZ"
},
"aif:spec:electricalOutputPhase": {
"type": "string",
"value": "",
"description": "Electrical Output Phase"
},
"aif:spec:outputThdNominalVoltage": {
"type": "string",
"value": "",
"description": "Output THD at Nominal Voltage in %"
},
"aif:spec:outputThdNominalVoltageWithNonLinearLoad": {
"type": "string",
"value": "",
"description": "Output THD at Nominal Voltage including a 100kVA Non Linear Load per RMS Value in %"
},
"aif:spec:transientRecoveryLoad": {
"type": "string",
"value": "",
"description": "Transient Recovery 100% Load Step has +/- tolerance shown in %"
},
"aif:spec:voltageDisplacement": {
"type": "string",
"value": "",
"description": "Voltage Displacement in deg C"
},
"aif:spec:overloadAtNominalVoltage": {
"type": "string",
"value": "",
"description": "Overload at Nominal Voltage in % and 77degF (25degC)"
},
"aif:spec:color": {
"type": "string",
"value": "",
"description": "Product Color"
},
"aif:spec:operatingTemperature": {
"type": "string",
"value": "263.15 - 333.15",
"description": "Operating Temperature in kelvin"
},
"aif:spec:relativeHumidity": {
"type": "string",
"value": "20 - 80",
"description": "Relative Humidity non-condensing in %"
},
"aif:spec:operatingAltitude": {
"type": "string",
"value": "",
"description": "Operating Altitude in meter without derating"
},
"aif:spec:communicationOptions": {
"type": "string",
"value": "Ethernet 10/100/1000, Gigabit Fiber SFP, RS-232 Serial, USB 2.0, Cellular 4G/LTE, Analog Modem, SD Card",
"description": "Communication Options"
},
"aif:spec:cardCompatibility": {
"type": "string",
"value": "SFP Fiber Modules, SD Card, SIM Card (2FF/mini)",
"description": "Card Compatibility"
},
"aif:spec:protocolsAvailable": {
"type": "string",
"value": "SSH, Telnet, HTTP/HTTPS, SNMP v1/v2/v3, IPSec, FTP, TFTP, RADIUS, TACACS+, LDAP, Kerberos, PPP, DHCP, NTP, Syslog, REST API",
"description": "Protocols Available"
},
"aif:spec:mountStyle": {
"type": "string",
"value": "In Rack",
"description": "Mount Style: In Row, In Rack"
},
"aif:core:manufacturer": {
"type": "string",
"value": "Vertiv",
"description": "Equipment manufacturer name"
},
"aif:core:modelNumber": {
"type": "string",
"value": "ACS8000",
"description": "Equipment model number"
},
"aif:core:overallGeometryDimensions": {
"type": "vector3f",
"value": [
438.2,
241.3,
44.5
],
"description": "Overall Geometry (WXDXH) (metric)"
},
"aif:core:height": {
"type": "float",
"value": 44.5,
"description": "Equipment height in mm"
},
"aif:core:width": {
"type": "int",
"value": 438,
"description": "Equipment width in mm"
},
"aif:core:depth": {
"type": "float",
"value": 241.3,
"description": "Equipment depth in mm"
},
"aif:core:overallWeight": {
"type": "int",
"value": 3,
"description": "Equipment weight in kilograms"
},
"aif:core:connectsToModelDocumentation": {
"type": "string",
"value": "https://www.vertiv.com/en-emea/products-catalog/monitoring-control-and-management/serial-console-and-gateways/avocent-acs-8000-serial-consoles/",
"description": "Url to online documentation"
},
"aif:core:assetVersion": {
"type": "string",
"value": "0.1",
"description": "Asset version"
},
"aif:core:simreadyVersion": {
"type": "string",
"value": "0.1",
"description": "SimReady version"
},
"aif:core:sceneOptimizerVersion": {
"type": "string",
"value": "get_scene_optimizer_id()",
"description": "Scene Optimizer version"
},
"aif:core:assetValidatorVersion": {
"type": "string",
"value": "get_asset_validator_id()",
"description": "Asset Validator version"
},
"aif:core:assetDescription": {
"type": "string",
"value": "Avocent ACS8000 Advanced Console Server - A next-generation console management solution for secure remote data center management and out-of-band management of IT assets",
"description": "Human Readable Description of Asset"
},
"aif:core:assetClass": {
"type": "string",
"value": "compute rack",
"description": "Class of AI Factory Equipment"
},
"aif:core:installationClearance": {
"type": "string",
"value": "",
"description": "Installation Clearance in mm"
},
"aif:core:accessibilityRequirement": {
"type": "string",
"value": "",
"description": "Service clearance in mm"
},
"aif:core:geometryMpv": {
"type": "string",
"value": "",
"description": "Geometry_MPV"
},
"aif:core:aifThermal": {
"type": "string",
"value": "",
"description": "AIF_Thermal"
},
"aif:core:aifElectrical": {
"type": "string",
"value": "",
"description": "AIF_Electrical"
},
"aif:core:assetCreationDate": {
"type": "string",
"value": "2026-11-05 00:00:00",
"description": "Creation Date of Revision of Asset ISO 8601 format (YYYY-MM-DD)"
}
},
"metadata": {
"description": "AIF properties for USD equipment models",
"version": "1.0",
"created": "2025-12-02"
}
}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469#usda 1.0( defaultPrim = "ACS_8000_")
over "ACS_8000_"{ custom string aif:core:accessibilityRequirement = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Service clearance in mm [AIF-MANAGED]" ) custom string aif:core:aifElectrical = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "AIF_Electrical [AIF-MANAGED]" ) custom string aif:core:aifThermal = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "AIF_Thermal [AIF-MANAGED]" ) custom string aif:core:assetClass = "compute rack" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Class of AI Factory Equipment [AIF-MANAGED]" ) custom string aif:core:assetCreationDate = "2026-11-16" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Creation Date of Revision of Asset ISO 8601 format (YYYY-MM-DD) [AIF-MANAGED]" ) custom string aif:core:assetDescription = "Avocent ACS8000 Advanced Console Server - A next-generation console management solution for secure remote data center management and out-of-band management of IT assets" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Human Readable Description of Asset [AIF-MANAGED]" ) custom string aif:core:assetValidatorVersion = "1.18.0" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Asset Validator version [AIF-MANAGED]" ) custom string aif:core:assetVersion = "0.1" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Asset version [AIF-MANAGED]" ) custom string aif:core:connectsToModelDocumentation = "https://www.vertiv.com/en-emea/products-catalog/monitoring-control-and-management/serial-console-and-gateways/avocent-acs-8000-serial-consoles/" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Url to online documentation [AIF-MANAGED]" ) custom float aif:core:depth = 241.3 ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Equipment depth in mm [AIF-MANAGED]" ) custom string aif:core:geometryMpv = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Geometry_MPV [AIF-MANAGED]" ) custom float aif:core:height = 44.5 ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Equipment height in mm [AIF-MANAGED]" ) custom string aif:core:installationClearance = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Installation Clearance in mm [AIF-MANAGED]" ) custom string aif:core:manufacturer = "Vertiv" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Equipment manufacturer name [AIF-MANAGED]" ) custom string aif:core:modelNumber = "ACS8000" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Equipment model number [AIF-MANAGED]" ) float3 aif:core:overallGeometryDimensions = (438.2, 241.3, 44.5) ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Overall Geometry (WXDXH) (metric) [AIF-MANAGED]" ) custom string aif:core:sceneOptimizerVersion = "110.1.0" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Scene Optimizer version [AIF-MANAGED]" ) custom string aif:core:simreadyVersion = "0.2.0" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "SimReady version [AIF-MANAGED]" ) float aif:core:weight = 3 ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Equipment weight in kilograms [AIF-MANAGED]" ) float aif:core:width = 438 ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Equipment width in mm [AIF-MANAGED]" ) custom string aif:spec:cardCompatibility = "SFP Fiber Modules, SD Card, SIM Card (2FF/mini)" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Card Compatibility [AIF-MANAGED]" ) custom string aif:spec:color = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Product Color [AIF-MANAGED]" ) custom string aif:spec:communicationOptions = "Ethernet 10/100/1000, Gigabit Fiber SFP, RS-232 Serial, USB 2.0, Cellular 4G/LTE, Analog Modem, SD Card" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Communication Options [AIF-MANAGED]" ) custom string aif:spec:dcRippleVoltage = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "DC Ripple Voltage (RMS) in % [AIF-MANAGED]" ) custom string aif:spec:electricalCurrent = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Electrical Current in Amp [AIF-MANAGED]" ) custom string aif:spec:electricalInputFrequency = "50/60" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Electrical Input Frequency in HZ [AIF-MANAGED]" ) custom string aif:spec:electricalInputPhase = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Electrical Input Phase [AIF-MANAGED]" ) custom string aif:spec:electricalInputVoltage = "240" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Electrical Nominal Voltage in V [AIF-MANAGED]" ) custom string aif:spec:electricalOutputFrequency = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Electrical Output Frequency in HZ [AIF-MANAGED]" ) custom string aif:spec:electricalOutputPhase = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Electrical Output Phase [AIF-MANAGED]" ) custom string aif:spec:electricalPowerWalkIn = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Power Walk-in (seconds) [AIF-MANAGED]" ) custom string aif:spec:inputCurrentDistortion = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Input Current Distortion (THDi) at Nominal Voltage at Full Load in % [AIF-MANAGED]" ) custom string aif:spec:inputPowerFactor = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Electrical Power Factor [AIF-MANAGED]" ) custom string aif:spec:loadPowerFactor = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Load Power Factor Supported (Without Derating) [AIF-MANAGED]" ) custom string aif:spec:mountStyle = "In Rack" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Mount Style: In Row, In Rack [AIF-MANAGED]" ) custom string aif:spec:operatingAltitude = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Operating Altitude in meter without derating [AIF-MANAGED]" ) custom string aif:spec:operatingTemperature = "263.15 - 333.15" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Operating Temperature in kelvin [AIF-MANAGED]" ) custom string aif:spec:outputActivePower = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Output Active Power in (kW) [AIF-MANAGED]" ) custom string aif:spec:outputThdNominalVoltage = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Output THD at Nominal Voltage in % [AIF-MANAGED]" ) custom string aif:spec:outputThdNominalVoltageWithNonLinearLoad = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Output THD at Nominal Voltage including a 100kVA Non Linear Load per RMS Value in % [AIF-MANAGED]" ) custom string aif:spec:outputVoltage = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Output Voltage in VDC [AIF-MANAGED]" ) custom string aif:spec:overloadAtNominalVoltage = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Overload at Nominal Voltage in % and 77degF (25degC) [AIF-MANAGED]" ) custom string aif:spec:protocolsAvailable = "SSH, Telnet, HTTP/HTTPS, SNMP v1/v2/v3, IPSec, FTP, TFTP, RADIUS, TACACS+, LDAP, Kerberos, PPP, DHCP, NTP, Syslog, REST API" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Protocols Available [AIF-MANAGED]" ) custom string aif:spec:relativeHumidity = "20 - 80" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Relative Humidity non-condensing in % [AIF-MANAGED]" ) custom string aif:spec:transientRecoveryLoad = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Transient Recovery 100% Load Step has +/- tolerance shown in % [AIF-MANAGED]" ) custom string aif:spec:voltageDisplacement = "" ( customData = { dictionary omni = { dictionary kit = { bool locked = 1 } } } doc = "Voltage Displacement in deg C [AIF-MANAGED]" )}
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112/****************************************************************************** * Copyright 2023 NVIDIA Corporation. All rights reserved. * ****************************************************************************** Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge,to any person obtaining a copy of the sample definition code that uses our Material Definition Language (the "MDL Materials"), to reproduce and distributethe MDL Materials, including without limitation the rights to use, copy, merge,publish, distribute, and sell modified and unmodified copies of the MDL Materials, and to permit persons to whom the MDL Materials is furnished to doso, in all cases solely for use with NVIDIA's Material Definition Language,subject to the following further conditions:
1. The above copyright notices, this list of conditions, and the disclaimerthat follows shall be retained in all copies of one or more of the MDLMaterials, including in any software with which the MDL Materials are bundled,redistributed, and/or sold, and included either as stand-alone text files,human-readable headers or in the appropriate machine-readable metadata fieldswithin text or binary files as long as those fields can be easily viewed by theuser, as applicable.2. The name of NVIDIA shall not be used to promote, endorse or advertise any Modified Version without specific prior written permission, except a) to comply with the notice requirements otherwise contained herein; or b) to acknowledgethe contribution(s) of NVIDIA.
THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USETHE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.*/
mdl 1.6;import ::df::*;import ::math::*;import ::anno::*;import ::state::*;import ::base::*;import ::tex::*;import ::nvidia::core_definitions::dimension;import ::nvidia::core_definitions::blend_colors;
const string COPYRIGHT = " Copyright 2023 NVIDIA Corporation. All rights reserved.\n"" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n"" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" " THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n"" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n"" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" " COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n"" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n"" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n"" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n"" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n";
::base::texture_coordinate_info transform_coordinate_2( float4x4 transform [[ ::anno::description("A transformation to be applied to the source coordinates. rotation_translation_scale() is a suggested means to compute the transformation matrix") ]], ::base::texture_coordinate_info coordinate = ::base::texture_coordinate_info() [[ ::anno::description("Coordinate, typically sourced from coordinate_source or coordinate_projection") ]]) [[ ::anno::description("Transform a texture coordinate by a matrix") , ::anno::noinline() ]]{ // Version 2 float4 r_position = transform * float4(coordinate.position.x,coordinate.position.y,coordinate.position.z,1); //Try aproximating it for the case that the rotation is only aroud z and assuming the texture layout is nice and z is ~constant. //just pretend there is no other rotation happening //get rid of scaling and translation. Then extract fields where sin and cos would be in a simple 2d transform around z. float4 u = transform[0]; float3 ru = ::math::normalize(float3(u.x,u.y,u.z)); float cos = ru.x; float sin = -ru.y; return ::base::texture_coordinate_info( float3(r_position.x,r_position.y,r_position.z), ::math::normalize(cos * coordinate.tangent_u - sin * coordinate.tangent_v), ::math::normalize(cos * coordinate.tangent_v + sin * coordinate.tangent_u));}
// Takes the standard input that every material has. It combines a couple of// functions in one convenience function.::base::texture_coordinate_info vmat_transform( float2 translation = float2(0.0f, 0.0f), float rotation = 0.0f, // rotation in degrees float2 scaling = float2(1.0f, 1.0f), uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, uniform int uv_space = 0){ float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; float4x4 scale = float4x4(1.0f /scaling.x, 0.f , 0.f , 0.f, 0.f , 1.0f /scaling.y , 0.f , 0.f, 0.f , 0.f , 1.0f, 0.f, translation.x , translation.y , 0.0f, 1.f);
float s = ::math::sin(rotation_rad); float c = ::math::cos(rotation_rad); float4x4 rotate = float4x4( c , -s , 0.0f , 0.0f, s , c , 0.0f , 0.0f, 0.0f, 0.0f , 1.0f , 0.0f, 0.f , 0.0f , 0.0f , 1.f); return transform_coordinate_2(scale*rotate, ::base::coordinate_source(system, uv_space));}
float histogram_range(float input, float range = 1.0f, float position = 0.5f){ float low = ::math::clamp(1.0f - ::math::min(((1.0f - position) + range * 0.5f), (1.0f - position) * 2), 0.0f, 1.0f); float high = ::math::clamp(::math::min((position + range * 0.5f ), position * 2.0f), 0.0f, 1.0f); return ::math::lerp(low, high, input);}
//// flake noise utilities//int hash(int seed, int i){ return (i ^ seed) * 1075385539;}int rnd_init(int3 pos){ return hash(hash(hash(0, pos.x), pos.y), pos.z);}
int rnd_next(int seed) { // xorshift32 using signed int seed ^= seed << 13; seed ^= seed >>> 17; seed ^= seed << 5; return seed;}
float rnd_value(int seed){ //return ::math::abs(float(seed) * 4.6566fe-10f); return ::math::abs(float(seed) * 0.00000000046566f);}
// apply random rotation (using "Fast Random Rotation Matrices" by James Arvo)float3 rotate_pos(float3 pos, float3 xi){ float theta = ::math::PI * 2.0f * xi.x; float phi = ::math::PI * 2.0f * xi.y; float z = xi.z * 2.0f;
float r = ::math::sqrt(z); float[2] sp_cp = ::math::sincos(phi); float Vx = sp_cp[0] * r; float Vy = sp_cp[1] * r; float Vz = ::math::sqrt(2.0f - z);
float[2] st_ct = ::math::sincos(theta); float Sx = Vx * st_ct[1] - Vy * st_ct[0]; float Sy = Vx * st_ct[0] + Vy * st_ct[1];
float3x3 M( Vx * Sx - st_ct[1], Vx * Sy - st_ct[0], Vx * Vz, Vy * Sx + st_ct[0], Vy * Sy - st_ct[1], Vy * Vz, Vz * Sx, Vz * Sy, 1.0f - z);
return M * pos;}
struct flake_noise_value { // flake priority (in [0..1], 0: no flake, flakes with higher priority shadow flakes "below" them) float priority; // Stores values from the functions (once normal, another time the color) // current pseudo random number generator seed int rnd_seed; float4 carrier; };
// flake noise function with controllable regularity, flake size, and probabilityflake_noise_value flake_noise( float3 pos, float jitter_scale = 1.0f, float flake_diameter = 0.75f, float flake_probability = 1.0f){ float3 base_pos = ::math::floor(pos); int3 base_pos_i = int3(base_pos);
// limit the flake size to the allowed maximum (such that looking at all neighbors is sufficient) flake_diameter = ::math::min(flake_diameter, (1.5f - 0.5f * jitter_scale) / ::math::sqrt(3.0f)); flake_noise_value val(0.0f, 0, float4(0.0f));
for (int i = -1; i < 2; ++i) { for (int j = -1; j < 2; ++j) { for (int k = -1; k < 2; ++k) {
int seed = rnd_init(base_pos_i + int3(i, j, k));
seed = rnd_next(seed); if (rnd_value(seed) > flake_probability) continue;
seed = rnd_next(seed); float priority = rnd_value(seed); if (priority < val.priority) continue;
float3 flake_pos = base_pos + float3(i, j, k) + float3(0.5f);
if (jitter_scale > 0.0f) { seed = rnd_next(seed); flake_pos.x += (rnd_value(seed) - 0.5f) * jitter_scale; seed = rnd_next(seed); flake_pos.y += (rnd_value(seed) - 0.5f) * jitter_scale; seed = rnd_next(seed); flake_pos.z += (rnd_value(seed) - 0.5f) * jitter_scale; }
float3 p = pos - flake_pos; if (::math::dot(p, p) >= flake_diameter * flake_diameter * 4.0f) continue;
float3 xi_rot; seed = rnd_next(seed); xi_rot.x = rnd_value(seed); seed = rnd_next(seed); xi_rot.y = rnd_value(seed); seed = rnd_next(seed); xi_rot.z = rnd_value(seed); p = rotate_pos(p, xi_rot); if (::math::abs(p.x) <= flake_diameter && ::math::abs(p.y) <= flake_diameter && ::math::abs(p.z) <= flake_diameter) { val.priority = priority; val.rnd_seed = seed; } } } }
return val;}
// create a flake normal by importance sampling the Beckmann distribution with given roughnessflake_noise_value flake_normal( flake_noise_value val, float spread){ if (val.priority <= 0.0f) { val.carrier = float4(::state::normal().x, ::state::normal().y, ::state::normal().z, 1.0f); return val; } int seed = rnd_next(val.rnd_seed); float xi0 = rnd_value(seed); seed = rnd_next(seed); float xi1 = rnd_value(seed); float phi = ::math::PI * 2.0f * xi0;
float roughness = spread * spread;
float tantheta = ::math::sqrt(-roughness * roughness * ::math::log(1.0f - xi1)); float sintheta = tantheta / ::math::sqrt(1.0f + tantheta * tantheta); float costheta = ::math::sqrt(1.0f - sintheta * sintheta);
float[2] scphi = ::math::sincos(phi); val.rnd_seed = seed;
float3 normal = ::state::texture_tangent_u(0) * scphi[1] * sintheta + ::state::texture_tangent_v(0) * scphi[0] * sintheta + ::state::normal() * costheta; val.carrier = float4(normal.x, normal.y, normal.z, 1.0f); return val; }
export material Carpaint_Solid( color base_color = color(0.002125f, 0.051269f, 0.046665f) [[ ::anno::description("Sets the base color of the carpaint"), ::anno::display_name("Base "), ::anno::in_group("Appearance"), ::anno::ui_order(0) ]], float ground_coat_influence = 0.9f [[ ::anno::description("The ground coat layer is a metallic base layer over which the base color coat, the flakes and the clearcoat are applied. Use the parameter 'Ground Coat Brightness' to adjust its brightness."), ::anno::display_name("Base Coat Influence"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(1) ]], float ground_coat_brightness = 0.24f [[ ::anno::description("Adjusts the brightness of the metallic ground coat over which the base color coat, the flakes and the clearcoat are applied. Only has an effect, if the Ground Coat Influence is greater than 0.0"), ::anno::display_name("Base Coat Brightness"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(2) ]], float edge_darkening = 0.96f [[ ::anno::description("The amount how much colors fade to darker color when looking at the carpaint at grazing angles. Low values make the carpaint look more flat"), ::anno::display_name("Edge Darkening"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(3) ]], color flakes_tint = color(0.016807f, 0.171441f, 0.417885f) [[ ::anno::description("The color of the flakes"), ::anno::display_name("Flakes Tint"), ::anno::in_group("Flakes"), ::anno::ui_order(4) ]], uniform float flakes_density = 0.29f [[ ::anno::description("Adjusts the density of the flakes. Lower number means less flake particles being applied."), ::anno::display_name("Flakes Density"), ::anno::in_group("Flakes"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(5) ]], float spread = 0.12f [[ ::anno::description("The amount how much flakes are pointing to random directions. It is strongly discouraged using a value of 0.0 as the flakes will be oriented exactly as the surface normal, which will result in an unnatural look. Higher values lead to a more scintillating look of the flakes."), ::anno::display_name("Flakes Spread"), ::anno::enable_if("flakes_density > 0.0f"), ::anno::in_group("Flakes"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(6) ]], float flakes_roughness = 0.46f [[ ::anno::description("The roughness of the flakes itself. Higher values smoothen out the look of the flakes. Depending on the flakes being used in carpaints, use low values for a sparkling flake effect while mica flakes tend to have a higher roughness, leading to a smoother more pearlescent look on the final carpaint"), ::anno::display_name("Flakes Roughness"), ::anno::enable_if("flakes_density > 0.0f"), ::anno::in_group("Flakes"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(7) ]], float flakes_size = 0.1f [[ ::anno::description("Size of the metal flakes in millimeters."), ::anno::display_name("Flakes Size (mm)"), ::anno::enable_if("flakes_density > 0.0f"), ::anno::soft_range(0.f, 1.f), ::anno::in_group("Flakes"), ::anno::ui_order(8) ]], float candy_flip = 0.f [[ ::anno::description("Changes the tint of the coating to fade towards the flake color to produce a candy paint effect. "), ::anno::display_name("Candy Coating"), ::anno::in_group("Flakes"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(9) ]], float flake_layer_visibility = 0.f [[ ::anno::description("Adjusts how much the flakes contribute to the final look. Lowering the value makes the flakes appear more transparent. At value of 0.0 no flakes are not rendered at all"), ::anno::display_name("Flakes Visibility"), ::anno::enable_if("flakes_density > 0.0f"), ::anno::in_group("Flakes"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(10) ]], uniform texture_2d roughness_texture = texture_2d("./textures/smudges_scratches_A_rough.jpg", ::tex::gamma_linear) [[ ::anno::description("Texture to use for adding variation to the roughness on the clearcoat"), ::anno::display_name("Roughness Texture"), ::anno::in_group("Clearcoat"), ::anno::ui_order(11) ]], float clearcoat_rough = 0.f [[ ::anno::description("The roughness of the clearcoat"), ::anno::display_name("Clearcoat Roughness"), ::anno::in_group("Clearcoat"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(12) ]], float roughness_variation = 0.f [[ ::anno::description("The amount of variation to apply to the roughness. This parameter only has an effect when the clearcoat roughness is not zero or one"), ::anno::display_name("Clearcoat Roughness Variation"), ::anno::in_group("Clearcoat"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(13) ]], float clearcoat_ior = 1.600f [[ ::anno::description("The index of refraction for the clearcoat layer"), ::anno::display_name("Clearcoat Index of Refraction"), ::anno::in_group("Clearcoat"), ::anno::soft_range(1.f, 3.f), ::anno::hard_range(1.f, 5.f), ::anno::ui_order(14) ]], float clearcoat_visibility = 1.f [[ ::anno::description("While the full value is the correct physical behavior of the clearcoat, lowering the value to reduce the amount of reflection for artistic purposes"), ::anno::display_name("Clearcoat Visibility"), ::anno::in_group("Clearcoat"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(15) ]], uniform float orange_peel_strength = 0.f [[ ::anno::description("Strength of the bump mapping effect"), ::anno::display_name("Coat Orange Peel Strength"), ::anno::in_group("Clearcoat"), ::anno::soft_range(0.f, 1.f), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(16) ]], uniform float orange_peel_size = 1.f [[ ::anno::description("Size of the biggest feature of the pattern"), ::anno::display_name("Coat Orange Peel Size"), ::anno::soft_range(0.f, 1.f), ::anno::in_group("Clearcoat"), ::anno::ui_order(17) ]], float2 texture_translate = float2(0.f) [[ ::anno::description("Controls the position of the texture."), ::anno::display_name("Texture Translate"), ::anno::in_group("Transform"), ::anno::ui_order(18) ]], float texture_rotate = 0.f [[ ::anno::description("Rotates angle of the texture in degrees."), ::anno::display_name("Texture Rotate"), ::anno::in_group("Transform"), ::anno::soft_range(0.f, 360.f), ::anno::ui_order(19) ]], float2 texture_scale = float2(1.f) [[ ::anno::description("Larger numbers increase the size."), ::anno::display_name("Texture Scale"), ::anno::in_group("Transform"), ::nvidia::core_definitions::dimension(float2(1.0, 1.0)), ::anno::ui_order(20) ]], uniform bool roundcorners_enable = false [[ ::anno::description("Enables the round corneer effect. Comes at a slight performance cost as additional raytracing calls are rquired to evaluate the round corner effect"), ::anno::display_name("Enable Round Corners"), ::anno::in_group("Round Corners"), ::anno::ui_order(22) ]], uniform float roundcorners_radius_mm = 1.5f [[ ::anno::description("Radius of the rounded corners in millimeters"), ::anno::display_name("Round Corner Radius (mm)"), ::anno::in_group("Round Corners"), ::anno::soft_range(0.f, 10.f), ::anno::ui_order(23) ]], uniform bool roundcorners_across_materials = false [[ ::anno::description("Applies the round corner effect across different materials when enabled."), ::anno::display_name("Across Materials"), ::anno::in_group("Round Corners"), ::anno::ui_order(27) ]], uniform int uv_space_index = 0 [[ ::anno::description("Use selected UV space for material."), ::anno::display_name("UV Space Index"), ::anno::in_group("Advanced"), ::anno::ui_order(28) ]] )[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "shiny", "flakes", "metallic", "glitter", "pigment", "clearcoat", "automotive", "design")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Carpaint_Solid.png"), ::anno::copyright_notice(COPYRIGHT)]] = let { bool tmp0 = false; // Tried Scaling factors for flakes to fit 1mm size both in Substance Designer and (Iray for) Rhino // Rhino scaling factor: 1492.537313432835 // Substance Designer Scaling factor: 1158.6829010512 float flakes_size_m = (1492.537313432835f/flakes_size); // Flake scaling adjustment, so that flake size is in mm float flake_layer_visibility_m = 1.0f - flake_layer_visibility; ::base::texture_coordinate_info coord_info = ::base::coordinate_source(::base::texture_coordinate_object, 0); float scale_trans = ::state::transform_scale(::state::coordinate_object, ::state::coordinate_world, 1.0f); float3 source_coord = coord_info.position * ::state::meters_per_scene_unit() * scale_trans; ::base::texture_coordinate_info transformed_coord = ::base::transform_coordinate( ::base::rotation_translation_scale(float3(0.0f), float3(0.0f), float3(scale_trans)), coord_info ); material_surface tmp1(::df::fresnel_layer(clearcoat_ior, clearcoat_visibility, ::df::simple_glossy_bsdf(histogram_range(::base::file_texture(roughness_texture, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).mono, roughness_variation, clearcoat_rough) * histogram_range(::base::file_texture(roughness_texture, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).mono, roughness_variation, clearcoat_rough), histogram_range(::base::file_texture(roughness_texture, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).mono, roughness_variation, clearcoat_rough) * histogram_range(::base::file_texture(roughness_texture, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).mono, roughness_variation, clearcoat_rough), nvidia::core_definitions::blend_colors(color(1.f, 1.f, 1.f), flakes_tint, ::base::color_layer_blend, candy_flip).tint, nvidia::core_definitions::blend_colors(color(1.f, 1.f, 1.f), flakes_tint, ::base::color_layer_blend, candy_flip).tint, ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::directional_factor(color(1.f, 1.f, 1.f), color(1.f - edge_darkening), 1.f, flakes_density > 0.f ? ::df::weighted_layer(::math::lerp(flake_noise(source_coord * flakes_size_m, 0.5f, 1.f, flakes_density * flakes_density).priority > 0.001f ? 1.0f : 0.0f , 0.f, flake_layer_visibility_m), ::df::microfacet_ggx_smith_bsdf(flakes_roughness * 0.340000004f, flakes_roughness * 0.340000004f, flakes_tint, color(0.f, 0.f, 0.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::directional_factor(base_color, color(1.f - edge_darkening), 1.f, ::df::weighted_layer(ground_coat_influence * 0.5f, ::df::microfacet_ggx_vcavities_bsdf(0.40959999f, 0.40959999f, color(ground_coat_brightness * 0.949999988f + 0.0500000007f), color(ground_coat_brightness * 0.949999988f + 0.0500000007f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::diffuse_reflection_bsdf(base_color, 0.f), ::state::normal())), float3(flake_normal(flake_noise(source_coord * flakes_size_m, 0.5f, 1.f, flakes_density * flakes_density ), spread).carrier.x, flake_normal(flake_noise(source_coord * flakes_size_m, 0.5f, 1.f, flakes_density * flakes_density ), spread).carrier.y, flake_normal(flake_noise(source_coord * flakes_size_m, 0.5f, 1.f, flakes_density * flakes_density ), spread).carrier.z)) : ::df::directional_factor(base_color, color(1.f - edge_darkening), 1.f, ::df::weighted_layer(ground_coat_influence * 0.5f, ::df::microfacet_ggx_vcavities_bsdf(0.40959999f, 0.40959999f, color(ground_coat_brightness * 0.949999988f + 0.0500000007f), color(ground_coat_brightness * 0.949999988f + 0.0500000007f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::diffuse_reflection_bsdf(base_color, 0.f), ::state::normal()))), orange_peel_strength > 0.f ? ::base::perlin_noise_bump_texture(transformed_coord, orange_peel_strength, orange_peel_size, false, false, 0.f, 2, false, false, float3(0.f), 1.f, 0.f, 1.f, ::state::normal()) : ::state::normal()), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); color tmp3 = color(1.f, 1.f, 1.f); 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)); 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()); hair_bsdf tmp6 = hair_bsdf(); } in material( thin_walled: tmp0, surface: tmp1, backface: tmp2, ior: tmp3, volume: tmp4, geometry: tmp5, hair: tmp6);
// ------------------- 2 (Plain White) -------------------export material White(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - White"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "white", "light", "neutral")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.White.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.768151f, 0.768151f, 0.768151f), ground_coat_influence: 0.0f, ground_coat_brightness: 0.24f, edge_darkening: 0.56f, flakes_tint: color(0.552011f, 0.552011f, 0.552011f), flakes_density: 0.0f, spread: 0.47f, flakes_roughness: 0.34f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 1.0f, // roughness_texture: clearcoat_rough: 0.05f, roughness_variation: 0.34f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 3 (vintage White) -------------------export material Vintage_White(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Vintage White"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "vintage", "white", "light", "neutral")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Vintage_White.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.672443f, 0.630757f, 0.502886f), ground_coat_influence: 0.0f, ground_coat_brightness: 0.24f, edge_darkening: 0.28f, flakes_tint: color(0.603827f, 0.665387f, 0.693872f), flakes_density: 0.0f, spread: 0.41f, flakes_roughness: 0.32f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.05f, roughness_variation: 0.34f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.06f, orange_peel_size: 0.01f);
// ------------------- 4 (Black) -------------------export material Black(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Black"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "black", "dark", "neutral")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Black.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.006049f, 0.006049f, 0.006049f), ground_coat_influence: 0.97f, ground_coat_brightness: 0.17f, edge_darkening: 0.57f, flakes_tint: color(0.552011f, 0.552011f, 0.552011f), flakes_density: 0.0f, spread: 0.47f, flakes_roughness: 0.34f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.05f, roughness_variation: 0.36f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 5 (Black Matte) -------------------export material Black_Matte(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Black Matte"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "black", "dark", "neutral")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Black_Matte.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.006995f, 0.006995f, 0.006995f), ground_coat_influence: 0.11f, ground_coat_brightness: 0.64f, edge_darkening: 0.0f, flakes_tint: color(0.577580f, 0.577580f, 0.577580f), flakes_density: 0.12f, spread: 0.39f, flakes_roughness: 0.5f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.48f, roughness_variation: 0.14f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 6 -------------------export material Agent_Gray(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Agent Gray"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "gray", "neutral")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Agent_Gray.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.234551f, 0.254152f, 0.234551f), ground_coat_influence: 0.11f, ground_coat_brightness: 0.64f, edge_darkening: 0.0f, flakes_tint: color(0.644480f, 0.701102f, 0.644480f), flakes_density: 0.2f, spread: 0.25f, flakes_roughness: 0.5f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.06f, roughness_variation: 0.36f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 7 (Agent Gray Matte)-------------------export material Agent_Gray_Matte(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Agent Gray Matte"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "matte", "gray", "neutral")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Agent_Gray_Matte.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.234551f, 0.254152f, 0.234551f), ground_coat_influence: 0.11f, ground_coat_brightness: 0.64f, edge_darkening: 0.0f, flakes_tint: color(0.644480f, 0.701102f, 0.644480f), flakes_density: 0.21f, spread: 0.25f, flakes_roughness: 0.5f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.4f, roughness_variation: 0.14f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 8 (Blood Red)-------------------export material Blood_Red(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Blood Red"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "red", "warm", "saturated")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Blood_Red.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.462077f, 0.022174f, 0.015209f), ground_coat_influence: 0.03f, ground_coat_brightness: 0.24f, edge_darkening: 0.56f, flakes_tint: color(0.552011f, 0.552011f, 0.552011f), flakes_density: 0.0f, spread: 0.47f, flakes_roughness: 0.34f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.05f, roughness_variation: 0.36f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 9 (Tarreri Red)-------------------export material Tarreri_Red(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Tarreri Red"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "red", "warm", "saturated")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Tarreri_Red.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.672443f, 0.038204f, 0.026241f), ground_coat_influence: 0.03f, ground_coat_brightness: 0.24f, edge_darkening: 0.56f, flakes_tint: color(0.672443f, 0.095307f, 0.078187f), flakes_density: 0.0f, spread: 0.47f, flakes_roughness: 0.34f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.05f, roughness_variation: 0.36f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 10 (Dark Decent Red)-------------------export material Dark_Decent_Red(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Dark Decent Red"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "red", "warm", "dark")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Dark_Decent_Red.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.135633f, 0.012983f, 0.027321f), ground_coat_influence: 0.19f, ground_coat_brightness: 0.24f, edge_darkening: 0.1f, flakes_tint: color(0.135633f, 0.012983f, 0.027321f), flakes_density: 0.0f, spread: 0.38f, flakes_roughness: 0.18f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.05f, roughness_variation: 0.36f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 11 (Vintage Maroon)-------------------export material Vintage_Maroon(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Vintage Maroon"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "dark", "brown", "red")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Vintage_Maroon.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.283149f, 0.054480f, 0.063010f), ground_coat_influence: 0.19f, ground_coat_brightness: 0.24f, edge_darkening: 0.1f, flakes_tint: color(0.283149f, 0.054480f, 0.063010f), flakes_density: 0.0f, spread: 0.38f, flakes_roughness: 0.3f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.05f, roughness_variation: 0.36f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 12 -------------------export material Orange(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Orange"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "orange", "warm", "saturated")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Orange.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.623960f, 0.262251f, 0.022174f), ground_coat_influence: 0.11f, ground_coat_brightness: 0.64f, edge_darkening: 0.0f, flakes_tint: color(0.017642f, 0.262251f, 0.623960f), flakes_density: 0.59f, spread: 0.25f, flakes_roughness: 0.5f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.06f, roughness_variation: 0.36f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 13 (Brown Matte) -------------------export material Brown_Matte(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Brown Matte"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "brown", "matte")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Brown_Matte.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.300544f, 0.250158f, 0.187821f), ground_coat_influence: 0.11f, ground_coat_brightness: 0.64f, edge_darkening: 0.0f, flakes_tint: color(0.300544f, 0.250158f, 0.187821f), flakes_density: 0.0f, spread: 0.39f, flakes_roughness: 0.5f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.5f, roughness_variation: 0.14f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 14 (Bumblebee) -------------------export material Bumblebee(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Bumblebee"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "yellow", "warm", "light", "saturated")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Bumblebee.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.775822f, 0.564712f, 0.030713f), ground_coat_influence: 0.09f, ground_coat_brightness: 0.64f, edge_darkening: 0.1f, flakes_tint: color(1.000000f, 0.479320f, 0.095307f), flakes_density: 0.0f, spread: 0.54f, flakes_roughness: 0.37f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.06f, roughness_variation: 0.14f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 15 (Wasp) -------------------export material Wasp(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Wasp"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "yellow", "warm", "light", "saturated")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Wasp.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.701102f, 0.603827f, 0.022174f), ground_coat_influence: 0.0f, ground_coat_brightness: 0.5f, edge_darkening: 0.12f, flakes_tint: color(1.000000f, 0.479320f, 0.076185f), flakes_density: 0.0f, spread: 0.54f, flakes_roughness: 0.37f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.06f, roughness_variation: 0.14f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 16 (Feline Dark Green)-------------------export material Feline_Dark_Green(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Feline Dark Green"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "green", "dark")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Feline_Dark_Green.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.010330f, 0.099899f, 0.043735f), ground_coat_influence: 0.19f, ground_coat_brightness: 0.24f, edge_darkening: 0.1f, flakes_tint: color(0.010330f, 0.099899f, 0.043735f), flakes_density: 0.0f, spread: 0.38f, flakes_roughness: 0.3f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.05f, roughness_variation: 0.36f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 17 (Hunting Green Matte) -------------------export material Hunting_Green_Matte(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Hunting Green Matte"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "green", "dark", "matte")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Hunting_Green_Matte.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.162029f, 0.187821f, 0.114435f), ground_coat_influence: 0.11f, ground_coat_brightness: 0.64f, edge_darkening: 0.0f, flakes_tint: color(0.318547f, 0.456411f, 0.127438f), flakes_density: 0.0f, spread: 0.3f, flakes_roughness: 0.5f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.4f, roughness_variation: 0.14f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 18 (Vintage Sky Blue) -------------------export material Vintage_Sky_Blue(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Vintage Sky Blue"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "blue", "light", "cool")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Vintage_Sky_Blue.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.318547f, 0.564712f, 0.603827f), ground_coat_influence: 0.06f, ground_coat_brightness: 0.24f, edge_darkening: 0.0f, flakes_tint: color(0.603827f, 127.338437f, 0.693872f), flakes_density: 0.0f, spread: 0.41f, flakes_roughness: 0.32f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.06f, roughness_variation: 0.34f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.06f, orange_peel_size: 0.01f);
// ------------------- 19 (Blue)-------------------export material Blue(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Blue"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "blue", "cool", "saturated")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Blue.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.012983f, 0.296138f, 0.462077f), ground_coat_influence: 0.00f, ground_coat_brightness: 0.24f, edge_darkening: 0.0f, flakes_tint: color(0.012983f, 0.234551f, 0.665387f), flakes_density: 0.5f, spread: 0.47f, flakes_roughness: 0.34f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.06f, roughness_variation: 0.36f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);
// ------------------- 20 (Dark Decent Blue) -------------------export material Dark_Decent_Blue(*)[[ ::anno::author("NVIDIA"), ::anno::display_name("Carpaint Solid - Dark Decent Blue"), ::anno::description("Multilayered carpaint material with metallic flakes"), ::anno::key_words(string[]("carpaint", "reflective", "artificial", "multilayer", "new", "flat", "clearcoat", "automotive", "design", "blue", "cool", "dark")), ::anno::thumbnail("./.thumbs/Carpaint_Solid.Dark_Decent_Blue.png"), ::anno::copyright_notice(COPYRIGHT)]] = Carpaint_Solid( base_color: color(0.013702f, 0.046665f, 0.147027f), ground_coat_influence: 0.19f, ground_coat_brightness: 0.24f, edge_darkening: 0.1f, flakes_tint: color(0.012983f, 0.234551f, 0.665387f), flakes_density: 0.5f, spread: 0.25f, flakes_roughness: 0.34f, flakes_size: 0.5f, candy_flip: 0.0f, flake_layer_visibility: 0.0f, // roughness_texture: clearcoat_rough: 0.06f, roughness_variation: 0.36f, clearcoat_ior: 1.6f, clearcoat_visibility: 1.0f, orange_peel_strength: 0.0f, orange_peel_size: 0.01f);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396/* * SPDX-FileCopyrightText: Copyright (c) 2022-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause */
mdl 1.7;
import ::df::*;import ::state::*;import ::math::*;import ::base::*;import ::state::*;import ::tex::*;import ::anno::*;
import ::debug::*;
import ::nvidia::core_definitions::file_texture;import ::nvidia::core_definitions::normalmap_texture;
import OmniPBR_ClearCoat::*;
// OmniPBR //
export material OmniPBR(
// Albdeo //
color diffuse_color_constant = color(0.2) [[ anno::display_name("Albedo Color"), anno::description("This is the albedo base color"), anno::in_group("Albedo") ]], uniform texture_2d diffuse_texture = texture_2d() [[ anno::display_name("Albedo Map"), anno::in_group("Albedo") ]], float albedo_desaturation = float(0.0) [[ anno::display_name("Albedo Map Desaturation"), anno::description("Desaturates the albedo map"), anno::in_group("Albedo"), anno::soft_range(float(0.0), float(1.0)) ]], float albedo_add = float(0.0) [[ anno::display_name("Albedo Add"), anno::description("Adds a constant value to the diffuse color "), anno::in_group("Albedo"), anno::soft_range(float(-1.0), float(1.0)) ]], float albedo_brightness = float(1.0) [[ anno::display_name("Albedo Brightness"), anno::description("Multiplier for the diffuse color "), anno::in_group("Albedo"), anno::soft_range(float(0.0), float(1.0)) ]], color diffuse_tint = color(1.0) [[ anno::display_name("Color Tint"), anno::description("When enabled, this color value is multiplied over the final albedo color"), anno::in_group("Albedo") ]],
// Reflectivity // float reflection_roughness_constant = float(0.5) [[ anno::display_name("Roughness Amount"), anno::description("Higher roughness values lead to more blurry reflections"), anno::in_group("Reflectivity"), anno::hard_range(float(0.0), float(1.0)) ]], float reflection_roughness_texture_influence = float(0.0) [[ anno::display_name("Roughness Map Influence"), anno::description("Blends between the constant value and the lookup of the roughness texture"), anno::in_group("Reflectivity"), anno::hard_range(float(0.0), float(1.0)) ]], uniform texture_2d reflectionroughness_texture = texture_2d() [[ anno::display_name("Roughness Map"), anno::in_group("Reflectivity"), anno::usage("roughness") ]], float metallic_constant = float(0.0) [[ anno::display_name("Metallic Amount"), anno::description("Metallic Material"), anno::in_group("Reflectivity"), anno::hard_range(float(0.0), float(1.0)) ]], float metallic_texture_influence = float(0.0) [[ anno::display_name("Metallic Map Influence"), anno::description("Blends between the constant value and the lookup of the metallic texture"), anno::in_group("Reflectivity"), anno::hard_range(float(0.0), float(1.0)) ]], uniform texture_2d metallic_texture = texture_2d() [[ anno::display_name("Metallic Map"), anno::in_group("Reflectivity"), anno::usage("metalness") ]], float specular_level = float(0.5) [[ anno::display_name("Specular"), anno::description("The specular level (intensity) of the material"), anno::in_group("Reflectivity"), anno::soft_range(float(0.0), float(1.0)) ]],
// ORM // uniform bool enable_ORM_texture = false [[ anno::display_name("Enable ORM Texture"), anno::description("The ORM texture will be used to extract the Occlusion, Roughness and Metallic textures from R,G,B channels"), anno::in_group("Reflectivity") ]], uniform texture_2d ORM_texture = texture_2d() [[ anno::display_name("ORM Map"), anno::description("Texture that has Occlusion, Roughness and Metallic maps stored in their respective R, G and B channels"), anno::in_group("Reflectivity"), anno::usage("roughness") ]],
// AO Group //
float ao_to_diffuse = 0.0 [[ anno::display_name("AO to diffuse"), anno::description("Controls the amount of ambient occlusion multiplied against the diffuse color channel"), anno::in_group("AO"), anno::hard_range(float(0.0), float(1.0)) ]], uniform texture_2d ao_texture = texture_2d() [[ anno::display_name("Ambient Occlusion Map"), anno::description("The ambient occlusion texture for the material"), anno::in_group("AO"), anno::usage("occlusion") ]], // Emission //
uniform bool enable_emission = false [[ anno::display_name("Enable Emission"), anno::description("Enables the emission of light from the material"), anno::in_group("Emissive") ]], color emissive_color = color(1.0,0.1,0.1) [[ anno::display_name("Emissive Color"), anno::description("The emission color"), anno::in_group("Emissive"), anno::enable_if("enable_emission == true") ]], uniform texture_2d emissive_color_texture = texture_2d() [[ anno::display_name("Emissive Color map"), anno::in_group("Emissive"), anno::description("The emissive color texture"), anno::enable_if("enable_emission == true") ]], uniform texture_2d emissive_mask_texture = texture_2d() [[ anno::display_name("Emissive Mask map"), anno::description("The texture masking the emissive color"), anno::in_group("Emissive"), anno::enable_if("enable_emission == true"), anno::usage("occlusion") ]], float emissive_intensity = float(40.0) [[ anno::display_name("Emissive Intensity"), anno::description("Intensity of the emission"), anno::in_group("Emissive"), anno::enable_if("enable_emission == true") ]],
// Cutout Opacity // uniform bool enable_opacity = false [[ anno::display_name("Enable Opacity"), anno::description("Enables the use of cutout opacity"), anno::in_group("Opacity") ]], uniform texture_2d opacity_texture = texture_2d() [[ anno::display_name("Opacity Map"), anno::in_group("Opacity"), anno::usage("opacity") ]], float opacity_constant = float(1.0) [[ anno::display_name("Opacity Amount"), anno::description("Opacity value between 0 and 1, when Opacity Map is not valid"), anno::in_group("Opacity"), anno::hard_range(float(0.0), float(1.0)) ]], uniform bool enable_opacity_texture = false [[ anno::display_name("Enable Opacity Texture"), anno::description("Enables or disables the usage of the opacity texture map"), anno::in_group("Opacity") ]], uniform base::mono_mode opacity_mode = base::mono_average [[ anno::display_name("Opacity Mono Source"), anno::description("Determines how to lookup opacity from the supplied texture. mono_alpha, mono_average, mono_luminance, mono_maximum"), anno::in_group("Opacity") ]], uniform float opacity_threshold = float(0.0) [[ anno::hard_range(0.0, 1.0), anno::display_name("Opacity Threshold"), anno::description("If 0, use fractional opacity values 'as is'; if > 0, remap opacity values to 1 when >= threshold and to 0 otherwise"), anno::in_group("Opacity") ]],
// Normal // uniform float geometry_normal_roughness_strength = 1.f [[ anno::hard_range(0.0, 1.0), anno::display_name("Normal map to roughness weight"), anno::description("Enables and weights roughness induced by normal maps"), anno::in_group("Normal") ]], uniform float bump_factor = float(1.0) [[ anno::display_name("Normal Strength"), anno::description("Strength of normal map"), anno::in_group("Normal"), anno::soft_range(float(0.0), float(1.0)) ]], uniform texture_2d normalmap_texture = texture_2d() [[ anno::display_name("Normal Map"), anno::in_group("Normal"), anno::usage("normal") ]], uniform float detail_bump_factor = float(0.3) [[ anno::display_name("Detail Normal Strength"), anno::in_group("Normal"), anno::description("Strength of the detail normal"), anno::soft_range(float(0.0), float(1.0)) ]], uniform texture_2d detail_normalmap_texture = texture_2d() [[ anno::display_name("Detail Normal Map"), anno::in_group("Normal"), anno::usage("normal") ]], uniform bool flip_tangent_u = false [[ anno::display_name("Normal Map Flip U Tangent"), anno::in_group("Normal") ]], uniform bool flip_tangent_v = true [[ anno::display_name("Normal Map Flip V Tangent"), anno::in_group("Normal") ]],
// UVW Projection Group //
uniform bool project_uvw = false [[ anno::display_name("Enable Project UVW Coordinates"), anno::description("When enabled, UV coordinates will be generated by projecting them from a coordinate system"), anno::in_group("UV") ]], uniform bool world_or_object = false [[ anno::display_name("Enable World Space"), anno::description("When enabled, uses world space for projection, otherwise object space is used"), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform int uv_space_index = 0 [[ anno::display_name("UV Space Index"), anno::description("UV Space Index."), anno::in_group("UV"), anno::enable_if("project_uvw == true"), anno::hard_range(int(0), int(3)) ]],
// UVW Adjustments Group //
uniform float2 texture_translate = float2(0.0) [[ anno::display_name("Texture Translate"), anno::description("Controls position of texture."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform float texture_rotate = float(0.0) [[ anno::display_name("Texture Rotate"), anno::description("Rotates angle of texture in degrees."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform float2 texture_scale = float2(1.0) [[ anno::display_name("Texture Tiling"), anno::description("Controls the repetition of the texture."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform float2 detail_texture_translate = float2(0.0) [[ anno::display_name("Detail Texture Translate"), anno::description("Controls the position of the detail texture."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform float detail_texture_rotate = float(0.0) [[ anno::display_name("Detail Texture Rotate"), anno::description("Rotates angle of the detail texture in degrees."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform float2 detail_texture_scale = float2(1.0) [[ anno::display_name("Detail Texture Tiling"), anno::description("Controls the repetition of the detail texture."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]],
// Geometry //
uniform float round_edges_radius = float(0.0) [[ anno::display_name("Round Edge Radius"), anno::description("Influence radius around the edges in meters"), anno::in_group("Geometry"), anno::soft_range(0.0, 1.0) ]], uniform float round_edges_roundness = float(1.0) [[ anno::display_name("Round Edge Roundness"), anno::description("Determines how round the edge will look"), anno::in_group("Geometry"), anno::hard_range(0.0, 1.0) ]], uniform bool round_edges_across_materials = false [[ anno::display_name("Round Edge Across Materials"), anno::description("Normal smoothing happens only between facets of equal material, \n" "\t\tunless this parameter is set true, in which case the smoothing \n" "\t\thappens between facets irrespective of their materials"), anno::in_group("Geometry") ]]) [[ anno::display_name("OmniPBR"), anno::description("OmniPBR Base with support for clear coat, opacity and ORM textures."), anno::in_group("Base"), anno::version( 2, 1, 2), anno::author("NVIDIA CORPORATION"), anno::key_words(string[]("omni", "PBR", "opacity", "omniverse", "generic"))]] = let {
material base = OmniPBR_ClearCoat::OmniPBR_ClearCoat( diffuse_color_constant: diffuse_color_constant, diffuse_texture: diffuse_texture, albedo_desaturation: albedo_desaturation, albedo_add: albedo_add, albedo_brightness: albedo_brightness, diffuse_tint: diffuse_tint, reflection_roughness_constant: reflection_roughness_constant, reflection_roughness_texture_influence: reflection_roughness_texture_influence, reflectionroughness_texture: reflectionroughness_texture, metallic_constant: metallic_constant, metallic_texture_influence: metallic_texture_influence, metallic_texture: metallic_texture, specular_level: specular_level, enable_ORM_texture: enable_ORM_texture, ORM_texture: ORM_texture, ao_to_diffuse: ao_to_diffuse, ao_texture: ao_texture, enable_emission: enable_emission, emissive_color: emissive_color, emissive_color_texture: emissive_color_texture, emissive_mask_texture: emissive_mask_texture, emissive_intensity: emissive_intensity, enable_opacity: enable_opacity, opacity_texture: opacity_texture, opacity_constant: opacity_constant, enable_opacity_texture: enable_opacity_texture, opacity_mode: opacity_mode, opacity_threshold: opacity_threshold, geometry_normal_roughness_strength: geometry_normal_roughness_strength, bump_factor: bump_factor, normalmap_texture: normalmap_texture, detail_bump_factor: detail_bump_factor, detail_normalmap_texture: detail_normalmap_texture, flip_tangent_u: flip_tangent_u, flip_tangent_v: flip_tangent_v, project_uvw: project_uvw, world_or_object: world_or_object, uv_space_index: uv_space_index, texture_translate: texture_translate, texture_rotate: texture_rotate, texture_scale: texture_scale, detail_texture_translate: detail_texture_translate, detail_texture_rotate: detail_texture_rotate, detail_texture_scale: detail_texture_scale, round_edges_radius: round_edges_radius, round_edges_roundness: round_edges_roundness, round_edges_across_materials: round_edges_across_materials);
} in material(surface: base.surface,geometry: base.geometry);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470/* * SPDX-FileCopyrightText: Copyright (c) 2022-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause */
mdl 1.7;
import ::df::*;import ::state::*;import ::math::*;import ::base::*;import ::tex::*;import ::anno::*;import ::anno::*;
export float3 HemiOctahedronToUnitVector( float2 Oct ) [[ anno::hidden()]]{ Oct = float2( Oct.x + Oct.y, Oct.x - Oct.y ) * 0.5; float3 N = float3( Oct.x, Oct.y, 1.0 - math::dot( float2(1.0), math::abs(Oct) ) ); return math::normalize(N);}
export struct NormalData [[ anno::hidden()]]{ float3 normal; float2 roughness;};
export NormalData tangent_space_normal_roughness_texture( uniform texture_2d texture [[ anno::description("The input texture"), anno::usage("normal") ]], uniform float factor = 1.0f [[ anno::description("Determines the degree of bumpiness") ]], uniform bool flip_tangent_u = false [[ anno::description("Can be used to fix mismatches between the object's tangent space and the normal map's tangent space") ]], uniform bool flip_tangent_v = false [[ anno::description("Can be used to fix mismatches between the object's tangent space and the normal map's tangent space") ]], base::texture_coordinate_info uvw = base::texture_coordinate_info() [[ anno::description("Parameterization to be used for texture mapping. Defaults to texture channel 0.") ]], uniform float2 crop_u = float2( 0.0, 1.0) [[ anno::description("Restricts the texture access to sub-domain of the texture in the u direction") ]], uniform float2 crop_v = float2( 0.0, 1.0) [[ anno::description("Restricts the texture access to sub-domain of the texture in the v direction") ]], uniform tex::wrap_mode wrap_u = tex::wrap_repeat [[ anno::description("Wrapping mode in the u direction") ]], uniform tex::wrap_mode wrap_v = tex::wrap_repeat [[ anno::description("Wrapping mode in the v direction") ]], uniform bool clip = false [[ anno::description("deprecated, usewrap_mode=tex::wrap_clip. Defines wrap_clamp behavior. If true, lookup outside [0,1] results in no bump"), anno::hidden() ]], uniform float scale = 1. [[ anno::description("Scales the value red from the texture file. Can be used to adapt to different normal map formats"), anno::unused() ]], uniform float offset = 0. [[ anno::description("Offset applied to the value red from the texture file. Can be used to adapt to different normal map formats"), anno::unused() ]], uniform float animation_start_time = 0. [[ anno::description("When to start playing first frame of the animation ") ]], uniform int2 animation_crop = int2(0, 0) [[ anno::description("If the texture is an animation, the range of frames to be played can be specified.") ]], uniform tex::wrap_mode animation_wrap = tex::wrap_repeat [[ anno::description("Defines what to do outside of regular animation time") ]], uniform float animation_fps = 30 [[ anno::description("Framerate to use for animation playback") ]])[[ anno::description("Interprets the color values of a bitmap as a vector in tangent space"), anno::hidden(), anno::noinline()]]{ NormalData normalData; normalData.roughness = float2(0); normalData.normal = state::normal();
float frame = 0.0; if(animation_crop != int2(0,0)) //only if we have an animation { frame = (::state::animation_time()-animation_start_time) * animation_fps ; //start playing at first frame of the animation switch ( animation_wrap) { case tex::wrap_repeat: frame=frame>0? math::fmod(frame,animation_crop.y-animation_crop.x)+animation_crop.x: math::fmod(frame,animation_crop.y-animation_crop.x)+animation_crop.y; break; case tex::wrap_mirrored_repeat: float animation_crop_2y = 2.0*animation_crop.y; frame=frame>0? math::fmod(frame,(animation_crop.y-animation_crop.x)*2.0)+animation_crop.x: math::fmod(frame,(animation_crop.y-animation_crop.x)*2.0)+animation_crop_2y-animation_crop.x; if(frame>animation_crop.y) frame = animation_crop_2y-frame; break; case tex::wrap_clamp: frame = math::clamp( frame+animation_crop.x, animation_crop.x, animation_crop.y); break; case tex::wrap_clip: frame += animation_crop.x; if(frame < animation_crop.x || frame > animation_crop.y) return normalData; break; } }
if (tex::width(texture) == 0 || tex::height(texture) == 0 || // avoid division by zero in texremapu for invalid resource factor == 0.0f) return normalData; { if (clip) { if (wrap_u == tex::wrap_clamp && (uvw.position.x < 0. || uvw.position.x > 1.)) { return normalData; } if (wrap_v == tex::wrap_clamp && (uvw.position.y < 0. || uvw.position.y > 1.)) { return normalData; } } if (wrap_u == tex::wrap_clip && (uvw.position.x < 0. || uvw.position.x > 1.)) { return normalData; } if (wrap_v == tex::wrap_clip && (uvw.position.y < 0. || uvw.position.y > 1.)) { return normalData; } } bool pixel_flip_u = flip_tangent_u; bool pixel_flip_v = flip_tangent_v; //if we mirror repeat a tangent space texture, tangent space needs to be flipped for every other tile if (wrap_u == tex::wrap_mirrored_repeat) { if( uvw.position.x > 0. && int(uvw.position.x) % 2 == 1) pixel_flip_u = ! pixel_flip_u; else if( uvw.position.x < 0. && int(uvw.position.x) % 2 == 0) pixel_flip_u = ! pixel_flip_u; } if (wrap_v == tex::wrap_mirrored_repeat) { if( uvw.position.y > 0. && int(uvw.position.y) % 2 == 1) pixel_flip_v = ! pixel_flip_v; else if( uvw.position.y < 0. && int(uvw.position.y) % 2 == 0) pixel_flip_v = ! pixel_flip_v; }
float3 transformed_tangent_u = uvw.tangent_u; float3 transformed_tangent_v = uvw.tangent_v;
if (pixel_flip_u) transformed_tangent_u=-transformed_tangent_u; if (pixel_flip_v) transformed_tangent_v=-transformed_tangent_v;
float3 tangent_space_normal; float4 normal_raw = tex::lookup_float4(texture,float2(uvw.position.x,uvw.position.y), wrap_u, wrap_v, crop_u, crop_v, frame); if(normal_raw.x > 1.5) { // octahedron packed by OV normal_raw.x -= 2.0; normal_raw.x -= 0.5; normal_raw.y -= 0.5; tangent_space_normal = HemiOctahedronToUnitVector(float2(normal_raw.x, normal_raw.y) * 2.0); normalData.roughness = float2(normal_raw.z, normal_raw.w); } else { // regular tangent_space_normal = (float3(normal_raw.x, normal_raw.y, normal_raw.z) - float3(0.5)) * 2.0; normalData.roughness = float2(0); }
normalData.normal = math::normalize( transformed_tangent_u * tangent_space_normal.x * factor + transformed_tangent_v * tangent_space_normal.y * factor + state::normal() * tangent_space_normal.z);
return normalData;}
export material OmniPBRBase(
// Albdeo //
color diffuse_reflection_color = color(0.2) [[ anno::display_name("Albedo Color"), anno::description("This is the albedo base color"), anno::in_group("Albedo") ]], color diffuse_tint = color(1.0) [[ anno::display_name("Albedo Tint"), anno::description("When enabled, this color value is multiplied over the final albedo color"), anno::in_group("Albedo") ]],
// Reflecitivity // float specular_reflection_roughness = float(0.0) [[ anno::display_name("Roughness"), anno::description("Higher roughness values lead to more blurry reflections"), anno::in_group("Reflectivity"), anno::hard_range(0.0, 1.0) ]], float2 specular_reflection_aniso_roughness = float2(0.0, 0.0) [[ anno::display_name("Aniso roughness"), anno::description("Higher roughness values lead to more blurry reflections"), anno::in_group("Reflectivity"), anno::hidden() ]], float metalness = float(0.0) [[ anno::display_name("Metalness"), anno::description("Bias towards pure specular reflection"), anno::in_group("Reflectivity"), anno::hard_range(0.0, 1.0) ]], float specular_level = float(0.5) [[ anno::display_name("Specular"), anno::description("The specular level (intensity) of the material"), anno::in_group("Reflectivity"), anno::soft_range(0.0, 1.0) ]],
// Emission // uniform bool enable_emission = false [[ anno::display_name("Enable Emission"), anno::description("Enables the emission of light from the material"), anno::in_group("Emissive") ]], color emission_color = color(1.0,0.1,0.1) [[ anno::display_name("Emissive Color"), anno::description("The emission color"), anno::in_group("Emissive"), anno::enable_if("enable_emission == true") ]], float emission_intensity = float(40.0) [[ anno::display_name("Emissive Intensity"), anno::description("Intensity of the emission"), anno::in_group("Emissive"), anno::soft_range(0.0, 1000.0), anno::enable_if("enable_emission == true") ]],
// Geometry Opacity // uniform bool enable_opacity = false [[ anno::display_name("Enable Opacity"), anno::description("Enables the use of cutout opacity"), anno::in_group("Opacity") ]], float geometry_opacity = float(1.0) [[ anno::display_name("Opacity Amount"), anno::description("Opacity value between 0 and 1, when Opacity Map is not valid"), anno::in_group("Opacity"), anno::hard_range(0.0, 1.0) ]], uniform float geometry_opacity_threshold = 0.f [[ anno::display_name("Opacity Threshold"), anno::description("If 0, use fractional opacity values 'as is'; if > 0, remap opacity values to 1 when >= threshold and to 0 otherwise"), anno::in_group("Opacity"), anno::hard_range(0.0, 1.0) ]],
// Clearcoat // uniform bool enable_coat = false [[ anno::display_name("Enable Clearcoat Layer"), anno::description("Adds a coat layer on top of the material when enabled"), anno::in_group("Clearcoat") ]], float coat_weight = float(1.0) [[ anno::display_name("Clearcoat Weight"), anno::description("Sets the weight for coat layer"), anno::in_group("Clearcoat"), anno::hard_range(0.0, 1.0) ]], color coat_color = color(1.0) [[ anno::display_name("Clearcoat Tint"), anno::description("Clearcoat is tinted and affects the underlying material"), anno::in_group("Clearcoat") ]], float coat_transparency = float(1.0) [[ anno::display_name("Clearcoat Transparency"), anno::description("Adjusts the transparency of the coat. Can be turned into a fully opaque coat covering the underlying layer"), anno::in_group("Clearcoat"), anno::hard_range(0.0, 1.0) ]], float coat_roughness = float(0.0) [[ anno::display_name("Clearcoat Roughness"), anno::description("Higher roughness values lead to more blurry reflections"), anno::in_group("Clearcoat"), anno::hard_range(0.0, 1.0) ]], float2 coat_aniso_roughness = float2(0.0, 0.0) [[ anno::display_name("Clearcoat aniso roughness"), anno::description("Higher roughness values lead to more blurry reflections"), anno::in_group("Clearcoat"), anno::hidden() ]], float coat_ior = float(1.56) [[ anno::display_name("Clearcoat IOR"), anno::description("Sets the Index of refraction for the coat layer"), anno::in_group("Clearcoat"), anno::soft_range(0.0, 4.0) ]], float3 clearcoat_geometry_normal = state::normal() [[ anno::display_name("Clearcoat Normal"), anno::in_group("Clearcoat"), anno::usage("normal") ]],
// Geometry //
uniform float round_edges_radius = float(0.0) [[ anno::display_name("Round Edge Radius"), anno::description("Influence radius around the edges in meters"), anno::in_group("Geometry"), anno::soft_range(0.0, 1.0) ]], uniform float round_edges_roundness = float(1.0) [[ anno::display_name("Round Edge Roundness"), anno::description("Determines how round the edge will look"), anno::in_group("Geometry"), anno::hard_range(0.0, 1.0) ]], uniform bool round_edges_across_materials = false [[ anno::display_name("Round Edge Across Materials"), anno::description("Normal smoothing happens only between facets of equal material, \n" "\t\tunless this parameter is set true, in which case the smoothing \n" "\t\thappens between facets irrespective of their materials"), anno::in_group("Geometry") ]], float3 geometry_normal = state::normal() [[ anno::display_name("Geometry Normal"), anno::in_group("Geometry"), anno::usage("normal") ]]
) [[ anno::display_name("OmniPBR Base"), anno::description("OmniPBR Base with support for clear coat, opacity and ORM textures."), anno::in_group("Omni Materials"), anno::version( 2, 1, 1), anno::author("NVIDIA CORPORATION"), anno::key_words(string[]("omni", "PBR", "opacity", "omniverse", "generic"))]] = let{
// Diffuse Bsdf // color tinted_diffuse_color = diffuse_reflection_color * diffuse_tint;
color base_color = tinted_diffuse_color;
bsdf diffuse_bsdf = df::weighted_layer( weight: 1.0, layer: df::diffuse_reflection_bsdf( tint: base_color, roughness: float(0.0) ), base: bsdf(), normal: geometry_normal );
// Glossy Reflection Bsdf //
float roughness_u = math::clamp(specular_reflection_roughness * specular_reflection_roughness + specular_reflection_aniso_roughness.x * specular_reflection_aniso_roughness.x, 0, 1); float roughness_v = math::clamp(specular_reflection_roughness * specular_reflection_roughness + specular_reflection_aniso_roughness.y * specular_reflection_aniso_roughness.y, 0, 1); bsdf ggx_smith_bsdf = df::microfacet_ggx_smith_bsdf( roughness_u: roughness_u, roughness_v: roughness_v, tint: color(1.0), mode: df::scatter_reflect ); bsdf custom_curve_layer_bsdf = df::custom_curve_layer( normal_reflectivity: 0.08, grazing_reflectivity: 1.0, exponent: 5.0, weight: specular_level, layer: ggx_smith_bsdf, base: diffuse_bsdf, normal: geometry_normal ); bsdf directional_factor_bsdf = df::tint(base_color, ggx_smith_bsdf); bsdf omni_PBR_bsdf = df::weighted_layer( weight: metalness, layer: directional_factor_bsdf, base: custom_curve_layer_bsdf, normal: geometry_normal ); // Clear Coat //
float coat_roughness_u = math::clamp(coat_roughness * coat_roughness + coat_aniso_roughness.x * coat_aniso_roughness.x, 0, 1); float coat_roughness_v = math::clamp(coat_roughness * coat_roughness + coat_aniso_roughness.y * coat_aniso_roughness.y, 0, 1); bsdf coat_bsdf = df::microfacet_ggx_smith_bsdf( roughness_u: coat_roughness_u, roughness_v: coat_roughness_v, tint: color(1.0), mode: df::scatter_reflect ); bsdf opaque_coat = df::weighted_layer( weight: coat_transparency, layer: ::df::tint( tint: coat_color, base: omni_PBR_bsdf ), base: ::df::diffuse_reflection_bsdf( tint: coat_color ) ); bsdf omni_PBR_coated_bsdf = df::fresnel_layer( ior: coat_ior, weight: coat_weight, layer: coat_bsdf, base: opaque_coat, normal: clearcoat_geometry_normal ); bsdf final_bsdf = enable_coat ? omni_PBR_coated_bsdf : omni_PBR_bsdf; color emission_value = enable_emission ? emission_color * color(emission_intensity) : color(0.0); float opacity_value = geometry_opacity; float cutout_opacity = enable_opacity ? ((geometry_opacity_threshold == 0.0) ? opacity_value : ((opacity_value >= geometry_opacity_threshold) ? 1.0 : 0)) : 1.0; material_emission emission = material_emission( df::diffuse_edf(), intensity: emission_value );
material_surface surface = material_surface( scattering: final_bsdf, emission: emission );
material_geometry geometry = material_geometry( normal: state::rounded_corner_normal( radius: round_edges_radius, across_materials: round_edges_across_materials, roundness: round_edges_roundness ), cutout_opacity: cutout_opacity );
} in material( surface: surface, geometry: geometry);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711/* * SPDX-FileCopyrightText: Copyright (c) 2022-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause */
mdl 1.7;
import ::df::*;import ::state::*;import ::math::*;import ::base::*;import ::state::*;import ::tex::*;import ::anno::*;
import ::debug::*;
import ::nvidia::core_definitions::file_texture;import ::nvidia::core_definitions::normalmap_texture;
import OmniPBRBase::*;
// Functions //
// Returns a matrix from R,T,S. inputs //
uniform float4x4 rotation_translation_scale( uniform float3 rotation = float3(0.) [[ anno::description("Rotation applied to every UVW coordinate") ]], uniform float3 translation = float3(0.) [[ anno::description("Offset applied to every UVW coordinate") ]], uniform float3 scaling = float3(1.) [[ anno::description("Scale applied to every UVW coordinate") ]])[[ anno::description("Construct a transformation matrix from euler rotation, translation and scale"), anno::hidden()]]{ float4x4 scale = float4x4(scaling.x , 0.0 , 0.0 , 0.0, 0.0 , scaling.y , 0.0 , 0.0, 0.0 , 0.0 , scaling.z , 0.0, translation.x , translation.y , translation.z , 1.0);
float3 s = math::sin(rotation); float3 c = math::cos(rotation); float4x4 rotate = 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, 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, -s.y , s.x*c.y , c.x*c.y , 0.0, 0.0 , 0.0 , 0 , 1.0);
return scale * rotate;}
// Returns the normal n in tangent space, given n is in internal space. //
float3 transform_internal_to_tangent(float3 n){ /* flip_tangent_v */ return n.x* float3(state::texture_tangent_u(0).x,-state::texture_tangent_v(0).x,state::normal().x)+ n.y* float3(state::texture_tangent_u(0).y,-state::texture_tangent_v(0).y,state::normal().y)+ n.z* float3(state::texture_tangent_u(0).z,-state::texture_tangent_v(0).z,state::normal().z);}
// Returns the normal n in internal space, given n is in tangent space.float3 transform_tangent_to_internal(float3 n){ return state::texture_tangent_u(0) * n.x - state::texture_tangent_v(0) * n.y + /* flip_tangent_v */ state::normal() * n.z;}
// Returns a normal by adding a detail normal to a global normal.export float3 add_detail_normal(float3 nd = state::normal(), float3 n = state::normal()){ // http://blog.selfshadow.com/publications/blending-in-detail/ float3 n_t = transform_internal_to_tangent(n); float3 nd_t = transform_internal_to_tangent(nd); n_t = n_t + float3(0.,0.,1.); nd_t = nd_t * float3(-1.,-1.,1.); n = n_t * math::dot(n_t, nd_t)/n_t.z - nd_t; return math::normalize(transform_tangent_to_internal(n));}
base::texture_return multiply_colors( color color_1 = color(1.0, 1.0, 1.0), color color_2 = color(.5, .5, .5), float weight = 1.0 ) [[ anno::hidden() ]]{ return base::blend_color_layers( layers: base::color_layer[]( base::color_layer( layer_color: color_2, weight: weight, mode: base::color_layer_multiply )), base: color_1 );}
// OmniPBR Clearcoat //
export material OmniPBR_ClearCoat(
// Albdeo //
color diffuse_color_constant = color(0.2) [[ anno::display_name("Albedo Color"), anno::description("This is the albedo base color"), anno::in_group("Albedo") ]], uniform texture_2d diffuse_texture = texture_2d() [[ anno::display_name("Albedo Map"), anno::in_group("Albedo") ]], float albedo_desaturation = float(0.0) [[ anno::display_name("Albedo Map Desaturation"), anno::description("Desaturates the albedo map"), anno::in_group("Albedo"), anno::soft_range(float(0.0), float(1.0)) ]], float albedo_add = float(0.0) [[ anno::display_name("Albedo Add"), anno::description("Adds a constant value to the diffuse color "), anno::in_group("Albedo"), anno::soft_range(float(-1.0), float(1.0)) ]], float albedo_brightness = float(1.0) [[ anno::display_name("Albedo Brightness"), anno::description("Multiplier for the diffuse color "), anno::in_group("Albedo"), anno::soft_range(float(0.0), float(1.0)) ]], color diffuse_tint = color(1.0) [[ anno::display_name("Color Tint"), anno::description("When enabled, this color value is multiplied over the final albedo color"), anno::in_group("Albedo") ]],
// Reflectivity // float reflection_roughness_constant = float(0.5) [[ anno::display_name("Roughness Amount"), anno::description("Higher roughness values lead to more blurry reflections"), anno::in_group("Reflectivity"), anno::hard_range(float(0.0), float(1.0)) ]], float reflection_roughness_texture_influence = float(0.0) [[ anno::display_name("Roughness Map Influence"), anno::description("Blends between the constant value and the lookup of the roughness texture"), anno::in_group("Reflectivity"), anno::hard_range(float(0.0), float(1.0)) ]], uniform texture_2d reflectionroughness_texture = texture_2d() [[ anno::display_name("Roughness Map"), anno::in_group("Reflectivity"), anno::usage("roughness") ]], float metallic_constant = float(0.0) [[ anno::display_name("Metallic Amount"), anno::description("Metallic Material"), anno::in_group("Reflectivity"), anno::hard_range(float(0.0), float(1.0)) ]], float metallic_texture_influence = float(0.0) [[ anno::display_name("Metallic Map Influence"), anno::description("Blends between the constant value and the lookup of the metallic texture"), anno::in_group("Reflectivity"), anno::hard_range(float(0.0), float(1.0)) ]], uniform texture_2d metallic_texture = texture_2d() [[ anno::display_name("Metallic Map"), anno::in_group("Reflectivity"), anno::usage("metalness") ]], float specular_level = float(0.5) [[ anno::display_name("Specular"), anno::description("The specular level (intensity) of the material"), anno::in_group("Reflectivity"), anno::soft_range(float(0.0), float(1.0)) ]],
// ORM // uniform bool enable_ORM_texture = false [[ anno::display_name("Enable ORM Texture"), anno::description("The ORM texture will be used to extract the Occlusion, Roughness and Metallic textures from R,G,B channels"), anno::in_group("Reflectivity") ]], uniform texture_2d ORM_texture = texture_2d() [[ anno::display_name("ORM Map"), anno::description("Texture that has Occlusion, Roughness and Metallic maps stored in their respective R, G and B channels"), anno::in_group("Reflectivity"), anno::usage("roughness") ]],
// AO Group //
float ao_to_diffuse = 0.0 [[ anno::display_name("AO to diffuse"), anno::description("Controls the amount of ambient occlusion multiplied against the diffuse color channel"), anno::in_group("AO"), anno::hard_range(float(0.0), float(1.0)) ]], uniform texture_2d ao_texture = texture_2d() [[ anno::display_name("Ambient Occlusion Map"), anno::description("The ambient occlusion texture for the material"), anno::in_group("AO"), anno::usage("occlusion") ]], // Emission //
uniform bool enable_emission = false [[ anno::display_name("Enable Emission"), anno::description("Enables the emission of light from the material"), anno::in_group("Emissive") ]], color emissive_color = color(1.0,0.1,0.1) [[ anno::display_name("Emissive Color"), anno::description("The emission color"), anno::in_group("Emissive"), anno::enable_if("enable_emission == true") ]], uniform texture_2d emissive_color_texture = texture_2d() [[ anno::display_name("Emissive Color map"), anno::in_group("Emissive"), anno::description("The emissive color texture"), anno::enable_if("enable_emission == true") ]], uniform texture_2d emissive_mask_texture = texture_2d() [[ anno::display_name("Emissive Mask map"), anno::description("The texture masking the emissive color"), anno::in_group("Emissive"), anno::enable_if("enable_emission == true"), anno::usage("occlusion") ]], float emissive_intensity = float(40.0) [[ anno::display_name("Emissive Intensity"), anno::description("Intensity of the emission"), anno::in_group("Emissive"), anno::enable_if("enable_emission == true") ]],
// Cutout Opacity // uniform bool enable_opacity = false [[ anno::display_name("Enable Opacity"), anno::description("Enables the use of cutout opacity"), anno::in_group("Opacity") ]], uniform texture_2d opacity_texture = texture_2d() [[ anno::display_name("Opacity Map"), anno::in_group("Opacity"), anno::usage("opacity") ]], float opacity_constant = float(1.0) [[ anno::display_name("Opacity Amount"), anno::description("Opacity value between 0 and 1, when Opacity Map is not valid"), anno::in_group("Opacity"), anno::hard_range(float(0.0), float(1.0)) ]], uniform bool enable_opacity_texture = false [[ anno::display_name("Enable Opacity Texture"), anno::description("Enables or disables the usage of the opacity texture map"), anno::in_group("Opacity") ]], uniform base::mono_mode opacity_mode = base::mono_average [[ anno::display_name("Opacity Mono Source"), anno::description("Determines how to lookup opacity from the supplied texture. mono_alpha, mono_average, mono_luminance, mono_maximum"), anno::in_group("Opacity") ]], uniform float opacity_threshold = float(0.0) [[ anno::display_name("Opacity Threshold"), anno::description("If 0, use fractional opacity values 'as is'; if > 0, remap opacity values to 1 when >= threshold and to 0 otherwise"), anno::in_group("Opacity"), anno::hard_range(float(0.0), float(1.0)) ]],
// Clearcoat // uniform bool enable_clearcoat = false [[ anno::display_name("Enable Clearcoat Layer"), anno::description("Adds a clearcoat layer on top of the material when enabled"), anno::in_group("Clearcoat") ]], float clearcoat_weight = float(1.0) [[ anno::display_name("Clearcoat Weight"), anno::description("Sets the weight for clearcoat layer"), anno::in_group("Clearcoat"), anno::hard_range(float(0.0), float(1.0)) ]], color clearcoat_tint = color(1.0) [[ anno::display_name("Clearcoat Tint"), anno::description("Clearcoat is tinted and affects the underlying material"), anno::in_group("Clearcoat") ]], float clearcoat_transparency = float(1.0) [[ anno::display_name("Clearcoat Transparency"), anno::description("Adjusts the transparency of the clearcoat. Can be turned into a fully opaque clearcoat covering the underlying layer"), anno::in_group("Clearcoat"), anno::hard_range(float(0.0), float(1.0)) ]], float clearcoat_reflection_roughness = float(0.0) [[ anno::display_name("Clearcoat Roughness"), anno::description("Higher roughness values lead to more blurry reflections"), anno::in_group("Clearcoat"), anno::hard_range(float(0.0), float(1.0)) ]], float clearcoat_ior = float(1.56) [[ anno::display_name("Clearcoat IOR"), anno::description("Sets the Index of refraction for the clearcoat layer"), anno::in_group("Clearcoat"), anno::soft_range(float(0.0), float(4.0)) ]], uniform float clearcoat_bump_factor = float(1.0) [[ anno::display_name("Clearcoat Normal Map Strength"), anno::description("Strength of normal map."), anno::in_group("Clearcoat"), anno::soft_range(float(0.0), float(1.0)) ]], uniform texture_2d clearcoat_normalmap_texture = texture_2d() [[ anno::display_name("Clearcoat Normal Map"), anno::description("Enables the usage of the normalmap texture"), anno::in_group("Clearcoat"), anno::usage("normal") ]], uniform float2 clearcoat_texture_translate = float2(0.0) [[ anno::display_name("Clearcoat Texture Translate"), anno::description("Controls the position of the clearcoat texture"), anno::ui_order(1), anno::in_group("UV") ]], uniform float clearcoat_texture_rotate = float(0.0) [[ anno::display_name("Clearcoat Texture Rotate"), anno::description("Rotates angle of the clearcoat texture in degrees"), anno::ui_order(2), anno::in_group("UV") ]], uniform float2 clearcoat_texture_scale = float2(1.0) [[ anno::display_name("Clearcoat Texture Tiling"), anno::description("Controls the repetition of the clearcoat texture"), anno::ui_order(3), anno::in_group("UV") ]], float clearcoat_flatten = float(1.0) [[ anno::display_name("Clearcoat Flatten"), anno::description("Flattens the clearcoat to even out the underlying bump maps"), anno::in_group("Clearcoat"), anno::hard_range(float(0.0), float(1.0)) ]],
// Normal // uniform float geometry_normal_roughness_strength = 1.f [[ anno::hard_range(0.0, 1.0), anno::display_name("Normal map to roughness weight"), anno::description("Enables and weights roughness induced by normal maps"), anno::in_group("Normal") ]], uniform float bump_factor = float(1.0) [[ anno::display_name("Normal Strength"), anno::description("Strength of normal map"), anno::in_group("Normal"), anno::soft_range(float(0.0), float(1.0)) ]], uniform texture_2d normalmap_texture = texture_2d() [[ anno::display_name("Normal Map"), anno::in_group("Normal"), anno::usage("normal") ]], uniform float detail_bump_factor = float(0.3) [[ anno::display_name("Detail Normal Strength"), anno::in_group("Normal"), anno::description("Strength of the detail normal"), anno::soft_range(float(0.0), float(1.0)) ]], uniform texture_2d detail_normalmap_texture = texture_2d() [[ anno::display_name("Detail Normal Map"), anno::in_group("Normal"), anno::usage("normal") ]], uniform bool flip_tangent_u = false [[ anno::display_name("Normal Map Flip U Tangent"), anno::in_group("Normal") ]], uniform bool flip_tangent_v = true [[ anno::display_name("Normal Map Flip V Tangent"), anno::in_group("Normal") ]],
// UVW Projection Group //
uniform bool project_uvw = false [[ anno::display_name("Enable Project UVW Coordinates"), anno::description("When enabled, UV coordinates will be generated by projecting them from a coordinate system"), anno::in_group("UV") ]], uniform bool world_or_object = false [[ anno::display_name("Enable World Space"), anno::description("When enabled, uses world space for projection, otherwise object space is used"), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform int uv_space_index = 0 [[ anno::display_name("UV Space Index"), anno::description("UV Space Index"), anno::in_group("UV"), anno::enable_if("project_uvw == true"), anno::hard_range(int(0), int(3)) ]],
// UVW Adjustments Group //
uniform float2 texture_translate = float2(0.0) [[ anno::display_name("Texture Translate"), anno::description("Controls position of texture."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform float texture_rotate = float(0.0) [[ anno::display_name("Texture Rotate"), anno::description("Rotates angle of texture in degrees."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform float2 texture_scale = float2(1.0) [[ anno::display_name("Texture Tiling"), anno::description("Controls repetition of the texture."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform float2 detail_texture_translate = float2(0.0) [[ anno::display_name("Detail Texture Translate"), anno::description("Controls the position of the detail texture."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform float detail_texture_rotate = float(0.0) [[ anno::display_name("Detail Texture Rotate"), anno::description("Rotates angle of the detail texture in degrees."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]], uniform float2 detail_texture_scale = float2(1.0) [[ anno::display_name("Detail Texture Tiling"), anno::description("Controls repetition of the detail texture."), anno::in_group("UV"), anno::enable_if("project_uvw == true") ]],
// Geometry //
uniform float round_edges_radius = float(0.0) [[ anno::display_name("Round Edge Radius"), anno::description("Influence radius around the edges in meters"), anno::in_group("Geometry"), anno::soft_range(0.0, 1.0) ]], uniform float round_edges_roundness = float(1.0) [[ anno::display_name("Round Edge Roundness"), anno::description("Determines how round the edge will look"), anno::in_group("Geometry"), anno::hard_range(0.0, 1.0) ]], uniform bool round_edges_across_materials = false [[ anno::display_name("Round Edge Across Materials"), anno::description("Normal smoothing happens only between facets of equal material, \n" "\t\tunless this parameter is set true, in which case the smoothing \n" "\t\thappens between facets irrespective of their materials"), anno::in_group("Geometry") ]]) [[ anno::display_name("OmniPBR ClearCoat "), anno::description("OmniPBR Base with support for clear coat, opacity and ORM textures."), anno::in_group("Base"), anno::version( 2, 1, 1), anno::author("NVIDIA CORPORATION"), anno::key_words(string[]("omni", "PBR", "opacity", "clearcoat", "omniverse", "generic"))]] = let {
// UVW lookup and transformation // base::texture_coordinate_system the_system = world_or_object ? base::texture_coordinate_world : base::texture_coordinate_object; base::texture_coordinate_info uvw = project_uvw ? base::coordinate_projection( coordinate_system: the_system, texture_space: uv_space_index, projection_type: base::projection_cubic ) : base::coordinate_source( coordinate_system: base::texture_coordinate_uvw, texture_space: uv_space_index ); base::texture_coordinate_info transformed_uvw = base::transform_coordinate( transform: rotation_translation_scale( scaling: float3(texture_scale.x, texture_scale.y, 1.0), rotation: float3(0.0, 0.0, texture_rotate/180.*math::PI ), translation: float3(texture_translate.x, texture_translate.y, 0.0) ), coordinate: uvw ); base::texture_coordinate_info detail_transformed_uvw = base::transform_coordinate( transform: rotation_translation_scale( scaling: float3(detail_texture_scale.x, detail_texture_scale.y, 1.0), rotation: float3(0.0, 0.0, detail_texture_rotate/180.*math::PI ), translation: float3(detail_texture_translate.x, detail_texture_translate.y, 0.0) ), coordinate: uvw );
base::texture_coordinate_info clearcoat_transformed_uvw = base::transform_coordinate( transform: rotation_translation_scale( scaling: float3(clearcoat_texture_scale.x, clearcoat_texture_scale.y, 1.0), rotation: float3(0.0, 0.0, clearcoat_texture_rotate/180.*math::PI ), translation: float3(clearcoat_texture_translate.x, clearcoat_texture_translate.y, 0.f) ), coordinate: uvw );
// Normal calculations // OmniPBRBase::NormalData defaultData = OmniPBRBase::NormalData(state::normal(), float2(0));
OmniPBRBase::NormalData normal_data = tex::texture_isvalid(normalmap_texture) ? OmniPBRBase::tangent_space_normal_roughness_texture( texture: normalmap_texture, factor: bump_factor, uvw: transformed_uvw, flip_tangent_u: flip_tangent_u, flip_tangent_v: flip_tangent_v // true for dx, false for opengl //flip_tangent_v: true
) : defaultData; float3 the_normal = normal_data.normal;
OmniPBRBase::NormalData detail_normal_data = tex::texture_isvalid(detail_normalmap_texture) ? OmniPBRBase::tangent_space_normal_roughness_texture( texture: detail_normalmap_texture, factor: detail_bump_factor, uvw: detail_transformed_uvw, flip_tangent_u: flip_tangent_u, flip_tangent_v: flip_tangent_v // true for dx, false for opengl ) : defaultData; float3 detail_normal = detail_normal_data.normal;
OmniPBRBase::NormalData clearcoat_normal_data = tex::texture_isvalid(clearcoat_normalmap_texture) ? OmniPBRBase::tangent_space_normal_roughness_texture( texture: clearcoat_normalmap_texture, factor: clearcoat_bump_factor, uvw: clearcoat_transformed_uvw, flip_tangent_u: flip_tangent_u, flip_tangent_v: flip_tangent_v // true for dx, false for opengl ) : defaultData; float3 clearcoat_normal = clearcoat_normal_data.normal;
float3 diffuse_gloss_normal = tex::texture_isvalid(detail_normalmap_texture) ? add_detail_normal(detail_normal, the_normal) : the_normal; float3 flattened_clearcoat_normal = ::math::lerp(diffuse_gloss_normal, ::state::normal(), clearcoat_flatten); float3 final_clearcoat_normal = tex::texture_isvalid(clearcoat_normalmap_texture) ? add_detail_normal(flattened_clearcoat_normal, clearcoat_normal) : flattened_clearcoat_normal;
// ORM Handling //
float3 ORM_lookup = tex::lookup_float3( tex: ORM_texture, coord: float2(transformed_uvw.position.x, transformed_uvw.position.y) );
float3 roughness_lookup = tex::lookup_float3( tex: reflectionroughness_texture, coord: float2(transformed_uvw.position.x, transformed_uvw.position.y) ); float roughness_selection = enable_ORM_texture ? ORM_lookup.y : roughness_lookup.x; float reflection_roughness_s = math::lerp(reflection_roughness_constant, roughness_selection, reflection_roughness_texture_influence); float2 reflection_roughness = float2(math::sqrt(reflection_roughness_s*reflection_roughness_s + (geometry_normal_roughness_strength * normal_data.roughness.x * normal_data.roughness.x)), math::sqrt(reflection_roughness_s*reflection_roughness_s + (geometry_normal_roughness_strength * normal_data.roughness.y * normal_data.roughness.y)));
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)), math::sqrt(clearcoat_reflection_roughness*clearcoat_reflection_roughness + (geometry_normal_roughness_strength * clearcoat_normal_data.roughness.y * clearcoat_normal_data.roughness.y)));
// Diffuse Color Lookup and AO // base::texture_return base_lookup = base::file_texture( texture: diffuse_texture, color_offset: color(albedo_add), color_scale: color(albedo_brightness), mono_source: base::mono_luminance, uvw: transformed_uvw, clip: false ); base::texture_return ao_lookup = base::file_texture( texture: ao_texture, color_offset: color(0.0, 0.0, 0.0), color_scale: color(1.0, 1.0, 1.0), mono_source: base::mono_average, uvw: transformed_uvw, clip: false );
color ao_color = enable_ORM_texture ? color(ORM_lookup.x) : ao_lookup.tint; color desaturated_base = math::lerp(base_lookup.tint, color(base_lookup.mono), albedo_desaturation); color diffuse = tex::texture_isvalid(diffuse_texture)? desaturated_base : diffuse_color_constant; color tinted_diffuse = multiply_colors(diffuse, diffuse_tint, 1.0).tint; color base_color = multiply_colors( color_1: tinted_diffuse, color_2: ao_color, weight: ao_to_diffuse ).tint;
// Metalness //
float3 metallic_lookup = tex::lookup_float3( tex: metallic_texture, coord: float2(transformed_uvw.position.x, transformed_uvw.position.y) ); float metallic_selection = enable_ORM_texture ? ORM_lookup.z : metallic_lookup.x; float metallic = math::lerp(metallic_constant, metallic_selection, metallic_texture_influence);
// Emission //
color emission_color_texture = tex::texture_isvalid(emissive_color_texture) ? base::file_texture( texture: emissive_color_texture, color_offset: color(0.0, 0.0, 0.0), color_scale: color(1.0, 1.0, 1.0), mono_source: base::mono_average, uvw: transformed_uvw, clip: false ).tint : emissive_color;
color emission_mask_texture = tex::texture_isvalid(emissive_mask_texture) ? base::file_texture( texture: emissive_mask_texture, color_offset: color(0.0, 0.0, 0.0), color_scale: color(1.0, 1.0, 1.0), mono_source: base::mono_average, uvw: transformed_uvw, clip: false ).tint : color(1.0); color final_emission_color = enable_emission ? emission_color_texture * emission_mask_texture: color(0.0);
// Opacity // float opacity_value = enable_opacity_texture ? base::file_texture( texture: opacity_texture, mono_source: opacity_mode, uvw: transformed_uvw ).mono : opacity_constant;
float cutout_opacity = enable_opacity ? ((opacity_threshold == 0.0) ? opacity_value : ((opacity_value >= opacity_threshold) ? 1.0 : 0)) : 1.0;
material base = OmniPBRBase::OmniPBRBase( diffuse_reflection_color: base_color, specular_reflection_aniso_roughness: reflection_roughness, specular_level: specular_level, metalness: metallic, enable_emission: enable_emission, emission_color: final_emission_color, emission_intensity: emissive_intensity, enable_coat: enable_clearcoat, coat_weight: clearcoat_weight, coat_color: clearcoat_tint, coat_transparency: clearcoat_transparency, coat_aniso_roughness: clearcoat_reflection_roughness2, coat_ior: clearcoat_ior, enable_opacity: enable_opacity, geometry_opacity: cutout_opacity, clearcoat_geometry_normal: final_clearcoat_normal, round_edges_radius: round_edges_radius, round_edges_roundness: round_edges_roundness, round_edges_across_materials: round_edges_across_materials, geometry_normal: diffuse_gloss_normal );
} in material(surface: base.surface,geometry: base.geometry);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860/* * SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause */
mdl 1.7;import ::df::*;import ::state::*;import ::math::*;import ::base::*;import ::tex::*;import ::anno::*;
import ::nvidia::core_definitions::file_texture;import ::nvidia::core_definitions::normalmap_texture;
import OmniPBRBase::*;
uniform float4x4 rotation_translation_scale( uniform float3 rotation = float3(0.) [[ anno::description("Rotation applied to every UVW coordinate") ]], uniform float3 translation = float3(0.) [[ anno::description("Offset applied to every UVW coordinate") ]], uniform float3 scaling = float3(1.) [[ anno::description("Scale applied to every UVW coordinate") ]])[[ anno::description("Construct transformation matrix from Euler rotation, translation and scale"), anno::hidden()]]{ float4x4 scale = float4x4(scaling.x , 0. , 0. , 0., 0. , scaling.y , 0. , 0., 0. , 0. , scaling.z , 0., translation.x, translation.y, translation.z, 1.);
float3 s = math::sin(rotation); float3 c = math::cos(rotation); float4x4 rotate = 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, 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, -s.y , s.x*c.y , c.x*c.y , 0.0, 0. , 0 , 0 , 1.);
return scale*rotate;}
// Returns the normal n in tangent space, given n is in internal space.float3 transform_internal_to_tangent(float3 n){ /* flip_tangent_v */ return n.x* float3(state::texture_tangent_u(0).x,-state::texture_tangent_v(0).x,state::normal().x)+ n.y* float3(state::texture_tangent_u(0).y,-state::texture_tangent_v(0).y,state::normal().y)+ n.z* float3(state::texture_tangent_u(0).z,-state::texture_tangent_v(0).z,state::normal().z);}
// Returns the normal n in internal space, given n is in tangent space.float3 transform_tangent_to_internal(float3 n){ return state::texture_tangent_u(0) * n.x - state::texture_tangent_v(0) * n.y + /* flip_tangent_v */ state::normal() * n.z ;}
// Returns a normal by adding a detail normal to a global normal.export float3 add_detail_normal(float3 nd = state::normal(), float3 n = state::normal()){ // http://blog.selfshadow.com/publications/blending-in-detail/ float3 n_t = transform_internal_to_tangent(n); float3 nd_t = transform_internal_to_tangent(nd);
n_t=n_t + float3(0.,0.,1.); nd_t = nd_t * float3(-1.,-1.,1.);
n = n_t*math::dot(n_t, nd_t)/n_t.z - nd_t; return math::normalize(transform_tangent_to_internal(n));}
base::texture_return multiply_colors( color color_1 = color(1.0, 1.0, 1.0), color color_2 = color(.5, .5, .5), float weight = 1.0) [[ anno::hidden() ]]{ return base::blend_color_layers( layers: base::color_layer[]( base::color_layer( layer_color: color_2, weight: weight, mode: base::color_layer_multiply )), base: color_1 );}
base::texture_return add_colors( color color_1 = color(.5, .5, .5), color color_2 = color(.5, .5, .5), float weight = 1.0) [[ anno::hidden(), anno::unused()]]{ return base::blend_color_layers( layers: base::color_layer[]( base::color_layer( layer_color: color_2, weight: weight, mode: base::color_layer_add )), base: color_1 );}
base::texture_return blend_colors( color color_1 = color(1.0, 1.0, 1.0), color color_2 = color(.5, .5, .5), float weight = 1.0) [[ anno::hidden(), anno::unused()]]{ return base::blend_color_layers( layers: base::color_layer[]( base::color_layer( layer_color: color_2, weight: weight, mode: base::color_layer_blend )), base: color_1 );}
export material OmniPBR_ClearCoat_Opacity(
color diffuse_color_constant = color(0.2f) [[ anno::display_name("Base Color"), anno::description("This is the base color"), anno::in_group("Albedo") ]], uniform texture_2d diffuse_texture = texture_2d() [[ anno::display_name("Albedo Map"), anno::in_group("Albedo") ]], float albedo_desaturation = float(0.0) [[ anno::display_name("Albedo Map Desaturation"), anno::soft_range(float(0.0f), float(1.0f)), anno::description("Desaturates the albedo map"), anno::in_group("Albedo") ]], float albedo_add = float(0.0) [[ anno::display_name("Albedo Add"), anno::soft_range(float(-1.0f), float(1.0f)), anno::description("Adds a constant value to the diffuse color "), anno::in_group("Albedo") ]], float albedo_brightness = float(1.0) [[ anno::display_name("Albedo Brightness"), anno::soft_range(float(0.0f), float(1.0f)), anno::description("Multiplier for the diffuse color "), anno::in_group("Albedo") ]], color diffuse_tint = color(1.0f) [[ anno::display_name("Color Tint"), anno::description("When enabled, this color value is multiplied over the final albedo color"), anno::in_group("Albedo") ]],
// -------------------- REFLECTIVITY ---------------------- float reflection_roughness_constant = 0.5f [[ anno::display_name("Roughness Amount"), anno::hard_range(0.0,1.), anno::description("Higher roughness values lead to more blurry reflections"), anno::in_group("Reflectivity") ]], float reflection_roughness_texture_influence = 0.0f [[ anno::display_name("Roughness Map Influence"), anno::hard_range(0.0, 1.), anno::description("Blends between the constant value and the lookup of the roughness texture"), anno::in_group("Reflectivity") ]], uniform texture_2d reflectionroughness_texture = texture_2d() [[ anno::display_name("Roughness Map"), anno::in_group("Reflectivity") ]], float metallic_constant = 0.f [[ anno::display_name("Metallic Amount"), anno::hard_range(0.0,1.), anno::description("Metallic Material"), anno::in_group("Reflectivity") ]], float metallic_texture_influence = 0.0f [[ anno::display_name("Metallic Map Influence"), anno::hard_range(0.0, 1.), anno::description("Blends between the constant value and the lookup of the metallic texture"), anno::in_group("Reflectivity") ]], uniform texture_2d metallic_texture = texture_2d() [[ anno::display_name("Metallic Map"), anno::in_group("Reflectivity") ]], float specular_level = float(0.5) [[ anno::display_name("Specular"), anno::soft_range(float(0.0f), float(1.0f)), anno::description("The specular level (intensity) of the material"), anno::in_group("Reflectivity") ]], // -------------------- ORM ---------------------- uniform bool enable_ORM_texture = false [[ anno::display_name("Enable ORM Texture"), anno::description("When True the ORM texture will be used to extract the Occlusion, Roughness and Metallic Map"), anno::in_group("Reflectivity") ]], uniform texture_2d ORM_texture = texture_2d() [[ anno::display_name("ORM Map"), anno::description("Texture that hae Occlusion, Roughness and Metallic map stored in the respective r, g and b channels"), anno::in_group("Reflectivity") ]], // -------------------- AO Group ----------------------
float ao_to_diffuse = 0.0 [[ anno::display_name("AO to Diffuse"), anno::description("Controls the amount of ambient occlusion multiplied into the diffuse color channel"), anno::in_group("AO"), anno::hard_range(0.0f, 1.0f) ]], uniform texture_2d ao_texture = texture_2d() [[ anno::display_name("Ambient Occlusion Map"), anno::description("The Ambient Occlusion texture for the material"), anno::in_group("AO") ]], // -------------------- EMISSIVE ---------------------- uniform bool enable_emission = false [[ anno::display_name("Enable Emission"), anno::description("Enables the emission of light from the material"), anno::in_group("Emissive") ]], color emissive_color = color(1.0, 0.1, 0.1) [[ anno::enable_if("enable_emission == true"), anno::display_name("Emissive Color"), anno::description("The emission color"), anno::in_group("Emissive") ]],
uniform texture_2d emissive_color_texture = texture_2d() [[ anno::enable_if("enable_emission == true"), anno::display_name("Emissive Color map"), anno::in_group("Emissive"), anno::description("The emissive color texture") ]],
uniform texture_2d emissive_mask_texture = texture_2d() [[ anno::enable_if("enable_emission == true"), anno::display_name("Emissive Mask map"), anno::description("The texture masking the emissive color"), anno::in_group("Emissive") ]], uniform float emissive_intensity = 40.f [[ anno::enable_if("enable_emission == true"), anno::display_name("Emissive Intensity"), anno::description("Intensity of the emission"), anno::in_group("Emissive") ]],
// Cutout Opacity uniform bool enable_opacity = true [[ anno::display_name("Enable Opacity"), anno::description("Enables the use of cutout opacity"), anno::in_group("Opacity") ]], uniform bool enable_opacity_texture = false [[ anno::display_name("Enable Opacity Texture"), anno::description("Enables or disables the usage of the opacity texture map"), anno::in_group("Opacity") ]], uniform float opacity_constant = 1.f [[ anno::hard_range(0.0, 1.0), anno::display_name("Opacity Amount"), anno::description("Opacity value between 0 and 1, when Opacity Map is not valid"), anno::in_group("Opacity") ]], uniform texture_2d opacity_texture = texture_2d() [[ anno::display_name("Opacity Map"), anno::in_group("Opacity") ]], uniform base::mono_mode opacity_mode = base::mono_average [[ anno::display_name("Opacity Mono Source"), anno::in_group("Opacity"), anno::description("Determines how to lookup opacity from the supplied texture. mono_alpha, mono_average, mono_luminance, mono_maximum") ]], uniform float opacity_threshold = 0.f [[ anno::hard_range(0.0, 1.0), anno::display_name("Opacity Threshold"), anno::description("If 0, use fractional opacity values 'as is'; if > 0, remap opacity values to 1 when >= threshold and to 0 otherwise"), anno::in_group("Opacity") ]], // -------------------- Clearcoat ---------------------- uniform bool enable_clearcoat = false [[ anno::display_name("Enable Clearcoat Layer"), anno::description("Adds a clearcoat layer on top of the material when enabled"), anno::in_group("Clearcoat") ]], color clearcoat_tint = color(1.0f) [[ anno::display_name("Clearcoat Tint"), anno::description("Clearcoat is tinted and affects the underlying material"), anno::in_group("Clearcoat") ]], float clearcoat_transparency = 1.0f [[ anno::display_name("Clearcoat Transparency"), anno::description("Adjusts the transparency of the clearcoat. Can be turned into a fully opaque clearcoat " "covering the underlying layer"), anno::in_group("Clearcoat"), anno::hard_range(0.0f, 1.0f) ]], float clearcoat_reflection_roughness = 0.0f [[ anno::display_name("Clearcoat Roughness"), anno::description("Higher roughness values lead to more blurry reflections"), anno::hard_range(0.0f, 1.0f), anno::in_group("Clearcoat") ]], float clearcoat_weight = 1.0f [[ anno::display_name("Clearcoat Weight"), anno::description("Sets the weight for clearcoat layer"), anno::hard_range(0.0f, 1.0f), anno::in_group("Clearcoat") ]], float clearcoat_flatten = 1.0f [[ anno::display_name("Clearcoat Flatten"), anno::description("Flattens the clearcoat to even out the underlying bump maps"), anno::hard_range(0.0f, 1.0f), anno::in_group("Clearcoat") ]], float clearcoat_ior = 1.56f [[ anno::display_name("Clearcoat IOR"), anno::description("Sets the Index of refraction for the clearcoat layer"), anno::soft_range(1.0f, 4.0f), anno::in_group("Clearcoat") ]], uniform float clearcoat_bump_factor = 1.f [[ anno::display_name("Clearcoat Normal Map Strength"), anno::description("Strength of normal map."), anno::in_group("Clearcoat"), anno::soft_range(0.0f, 1.0f) ]], uniform texture_2d clearcoat_normalmap_texture = texture_2d() [[ anno::display_name("Clearcoat Normal Map"), anno::description("Enables the usage of the normalmap texture"), anno::in_group("Clearcoat") ]], // -------------------- Normal ---------------------- uniform float geometry_normal_roughness_strength = 1.f [[ anno::hard_range(0.0, 1.0), anno::display_name("Normal map to roughness weight"), anno::description("Enables and weights roughness induced by normal maps"), anno::in_group("Normal") ]], /* uniform bool enable_normalmap_texture = false [[ anno::display_name("Enable Normal Texture"), anno::description("Enables the usage of the normalmap texture"), anno::in_group("Features") ]], */ uniform float bump_factor = 1.f [[ anno::display_name("Normal Map Strength"), anno::description("Strength of normal map."), anno::in_group("Normal"), anno::soft_range(0.0f, 1.0f) ]], uniform texture_2d normalmap_texture = texture_2d() [[ anno::display_name("Normal Map"), anno::description("Enables the usage of the normalmap texture"), anno::in_group("Normal") ]],
/* uniform bool enable_detail_normalmap_texture = false [[ anno::display_name("Enable Detail Normal Texture"), anno::in_group("Features"), anno::description("Enables the usage of the detail normalmap texture") ]],*/ uniform float detail_bump_factor = .3f [[ anno::display_name("Detail Normal Strength"), anno::in_group("Normal"), anno::soft_range(0.0f, 1.0f), anno::description("Strength of the detail normal") ]], uniform texture_2d detail_normalmap_texture = texture_2d() [[ anno::display_name("Detail Normal Map"), anno::in_group("Normal") ]], uniform bool flip_tangent_u = false [[ anno::display_name("Normal Map Flip U Tangent"), anno::in_group("Normal") ]], uniform bool flip_tangent_v = true [[ anno::display_name("Normal Map Flip V Tangent"), anno::in_group("Normal") ]],
// UV Projection Group uniform bool project_uvw = false [[ anno::display_name("Enable Project UVW Coordinates"), anno::description("When enabled, UV coordinates will be generated by projecting them from a coordinate system"), anno::in_group("UV") ]], uniform bool world_or_object = false [[ anno::enable_if("project_uvw == true"), anno::display_name("Enable World Space"), anno::description("When set to 'true' uses world space for projection, when 'false' object space is used"), anno::in_group("UV") ]], uniform int uv_space_index = 0 [[ anno::enable_if("project_uvw == true"), anno::display_name("UV Space Index"), anno::description("UV Space Index."), anno::in_group("UV"), anno::hard_range(0, 3) ]], // Adjustments Group uniform float2 texture_translate = float2(0.0f) [[ anno::enable_if("project_uvw == true"), anno::display_name("Texture Translate"), anno::description("Controls position of texture."), anno::in_group("UV") ]], uniform float texture_rotate = 0.f [[ anno::enable_if("project_uvw == true"), anno::display_name("Texture Rotate"), anno::description("Rotates angle of texture in degrees."), anno::in_group("UV") ]], uniform float2 texture_scale = float2(1.0f) [[ anno::enable_if("project_uvw == true"), anno::display_name("Texture Scale"), anno::description("Larger number increases size of texture."), anno::in_group("UV") ]], uniform float2 detail_texture_translate = float2(0.0f) [[ anno::enable_if("project_uvw == true"), anno::display_name("Detail Texture Translate"), anno::description("Controls the position of the detail texture."), anno::in_group("UV") ]], uniform float detail_texture_rotate = 0.f [[ anno::enable_if("project_uvw == true"), anno::display_name("Detail Texture Rotate"), anno::description("Rotates angle of the detail texture in degrees."), anno::in_group("UV") ]], uniform float2 detail_texture_scale = float2(1.0f) [[ anno::enable_if("project_uvw == true"), anno::display_name("Detail Texture Scale"), anno::description("Larger numbers increase the size of the detail texture"), anno::in_group("UV") ]], uniform float2 clearcoat_texture_translate = float2(0.0f) [[ anno::display_name("Clearcoat Texture Translate"), anno::description("Controls the position of the detail texture."), anno::in_group("UV") ]], uniform float clearcoat_texture_rotate = 0.f [[ anno::display_name("Clearcoat Texture Rotate"), anno::description("Rotates angle of the detail texture in degrees."), anno::in_group("UV") ]], uniform float2 clearcoat_texture_scale = float2(1.0f) [[ anno::display_name("Clearcoat Texture Scale"), anno::description("Larger numbers increase the size of the detail texture"), anno::in_group("UV") ]] ) [[ anno::display_name("OmniPBR ClearCoat Opacity"), anno::description("OmniPBR with ClearCoat. Supports opacity and ORM textures."), anno::in_group("Base"), anno::version( 2, 1, 0), anno::author("NVIDIA CORPORATION"), anno::key_words(string[]("omni", "PBR", "opacity", "omniverse", "generic"))]] = let{
// UVW lookup and transformation base::texture_coordinate_system the_system = world_or_object ? base::texture_coordinate_world : base::texture_coordinate_object; base::texture_coordinate_info uvw = project_uvw ? base::coordinate_projection( coordinate_system: the_system, texture_space: uv_space_index, projection_type: base::projection_cubic ) : base::coordinate_source( coordinate_system: base::texture_coordinate_uvw, texture_space: uv_space_index ); base::texture_coordinate_info transformed_uvw = base::transform_coordinate( transform: rotation_translation_scale( scaling: float3(texture_scale.x, texture_scale.y, 1.0), rotation: float3(0.0, 0.0, texture_rotate/180.*math::PI ), translation: float3(texture_translate.x, texture_translate.y, 0.0) ), coordinate: uvw ); base::texture_coordinate_info detail_transformed_uvw = base::transform_coordinate( transform: rotation_translation_scale( scaling: float3(detail_texture_scale.x, detail_texture_scale.y, 1.0), rotation: float3(0.0, 0.0, detail_texture_rotate/180.*math::PI ), translation: float3(detail_texture_translate.x, detail_texture_translate.y, 0.0) ), coordinate: uvw ); base::texture_coordinate_info clearcoat_transformed_uvw = base::transform_coordinate( transform: rotation_translation_scale( scaling: float3(clearcoat_texture_scale.x, clearcoat_texture_scale.y, 1.0), rotation: float3(0.0, 0.0, clearcoat_texture_rotate/180.*math::PI ), translation: float3(clearcoat_texture_translate.x, clearcoat_texture_translate.y, 0.f) ), coordinate: uvw ); // Normal calculations OmniPBRBase::NormalData defaultData = OmniPBRBase::NormalData(state::normal(), float2(0));
OmniPBRBase::NormalData normal_data = tex::texture_isvalid(normalmap_texture) ? OmniPBRBase::tangent_space_normal_roughness_texture( texture: normalmap_texture, factor: bump_factor, uvw: transformed_uvw, flip_tangent_u: flip_tangent_u, flip_tangent_v: flip_tangent_v // true for dx, false for opengl //flip_tangent_v: true
) : defaultData; float3 the_normal = normal_data.normal;
OmniPBRBase::NormalData detail_normal_data = tex::texture_isvalid(detail_normalmap_texture) ? OmniPBRBase::tangent_space_normal_roughness_texture( texture: detail_normalmap_texture, factor: detail_bump_factor, uvw: detail_transformed_uvw, flip_tangent_u: flip_tangent_u, flip_tangent_v: flip_tangent_v // true for dx, false for opengl ) : defaultData; float3 detail_normal = detail_normal_data.normal;
OmniPBRBase::NormalData clearcoat_normal_data = tex::texture_isvalid(clearcoat_normalmap_texture) ? OmniPBRBase::tangent_space_normal_roughness_texture( texture: clearcoat_normalmap_texture, factor: clearcoat_bump_factor, uvw: clearcoat_transformed_uvw, flip_tangent_u: flip_tangent_u, flip_tangent_v: flip_tangent_v // true for dx, false for opengl ) : defaultData; float3 clearcoat_normal = clearcoat_normal_data.normal;
float3 diffuse_gloss_normal = tex::texture_isvalid(detail_normalmap_texture) ? add_detail_normal(detail_normal, the_normal) : the_normal; float3 flattened_clearcoat_normal = ::math::lerp(diffuse_gloss_normal, ::state::normal(), clearcoat_flatten); float3 final_clearcoat_normal = tex::texture_isvalid(clearcoat_normalmap_texture) ? add_detail_normal(flattened_clearcoat_normal, clearcoat_normal) : flattened_clearcoat_normal;
// -------------------- ORM Handling -------------------- float3 ORM_lookup = tex::lookup_float3( tex: ORM_texture, coord: float2(transformed_uvw.position.x, transformed_uvw.position.y) ); float3 roughness_lookup = tex::lookup_float3( tex: reflectionroughness_texture, coord: float2(transformed_uvw.position.x, transformed_uvw.position.y) ); float roughness_selection = enable_ORM_texture ? ORM_lookup.y : roughness_lookup.x; float reflection_roughness_1 = math::lerp(reflection_roughness_constant, roughness_selection, reflection_roughness_texture_influence); // Diffuse Color Lookup and AO base::texture_return base_lookup = base::file_texture( texture: diffuse_texture, color_offset: color(albedo_add), color_scale: color(albedo_brightness), mono_source: base::mono_luminance, uvw: transformed_uvw, clip: false ); base::texture_return ao_lookup = base::file_texture( texture: ao_texture, color_offset: color(0.0, 0.0, 0.0), color_scale: color(1.0, 1.0, 1.0), mono_source: base::mono_average, uvw: transformed_uvw, clip: false ); // checking whether the ORM texture or the AO texture is supposed to be used color ao_color = enable_ORM_texture ? color(ORM_lookup.x) : ao_lookup.tint; color desaturated_base = math::lerp(base_lookup.tint, color(base_lookup.mono), albedo_desaturation); color diffuse_color = tex::texture_isvalid(diffuse_texture)? desaturated_base : diffuse_color_constant; //color diffuse_color = desaturated_base ; color tinted_diffuse_color = multiply_colors(diffuse_color, diffuse_tint, 1.0).tint ; color base_color = multiply_colors( color_1: tinted_diffuse_color, color_2: ao_color, weight: ao_to_diffuse ).tint; float3 metallic_lookup = tex::lookup_float3( tex: metallic_texture, coord: float2(transformed_uvw.position.x, transformed_uvw.position.y) ); // Choose between ORM or metallic map float metallic_selection = enable_ORM_texture ? ORM_lookup.z : metallic_lookup.x; // blend between the constant metallic value and the map lookup float metallic = math::lerp(metallic_constant, metallic_selection, metallic_texture_influence); bsdf diffuse_bsdf = df::weighted_layer( weight: 1.0, layer: df::diffuse_reflection_bsdf( tint: base_color, roughness: 0.f ), base: bsdf(), normal: enable_clearcoat ? diffuse_gloss_normal : state::normal() );
// The glossy reflection BSDF // TODO: Clearcoat's induced roughness from normal map should also apply here, but right now avoiding it due to confusing relationship in the normals bsdf ggx_smith_bsdf = df::microfacet_ggx_smith_bsdf( roughness_u:reflection_roughness_1 * reflection_roughness_1 + (geometry_normal_roughness_strength * normal_data.roughness.x * normal_data.roughness.x), roughness_v:reflection_roughness_1 * reflection_roughness_1 + (geometry_normal_roughness_strength * normal_data.roughness.y * normal_data.roughness.y), tint: color(1.0, 1.0, 1.0), mode: df::scatter_reflect ); bsdf custom_curve_layer_bsdf = df::custom_curve_layer( normal_reflectivity: 0.08, grazing_reflectivity: 1.0, exponent: 5.0, weight: specular_level, layer: ggx_smith_bsdf, base: diffuse_bsdf, normal: enable_clearcoat ? diffuse_gloss_normal : state::normal() ); // Replaced by tinting as this reproduces the UE4 behavior more faithfully // bsdf directional_factor_bsdf = df::directional_factor( // normal_tint: base_color, // grazing_tint: base_color, //color(1.0, 1.0, 1.0), // exponent: 3.0f, // base: ggx_smith_bsdf // ); bsdf directional_factor_bsdf = df::tint(base_color, ggx_smith_bsdf); // CLEARCOAT
bsdf omni_PBR_bsdf = df::weighted_layer( weight: metallic, layer: directional_factor_bsdf, base: custom_curve_layer_bsdf, normal: enable_clearcoat ? diffuse_gloss_normal : state::normal() ); bsdf clearcoat_bsdf = df::microfacet_ggx_smith_bsdf( roughness_u: clearcoat_reflection_roughness * clearcoat_reflection_roughness + (geometry_normal_roughness_strength * clearcoat_normal_data.roughness.x * clearcoat_normal_data.roughness.x), roughness_v: clearcoat_reflection_roughness * clearcoat_reflection_roughness + (geometry_normal_roughness_strength * clearcoat_normal_data.roughness.y * clearcoat_normal_data.roughness.y), tint: color(1.0f), mode: df::scatter_reflect ); // bsdf omni_PBR_coated_bsdf = df::custom_curve_layer( // normal_reflectivity: clearcoat_reflectivity * 0.08, // grazing_reflectivity: 1.0, // weight: clearcoat_weight, // layer: clearcoat_bsdf, // base: omni_PBR_bsdf, // normal: final_clearcoat_normal // ); bsdf opaque_clearcoat = df::weighted_layer( weight: clearcoat_transparency, layer: ::df::tint( tint: clearcoat_tint, base: omni_PBR_bsdf), base: ::df::diffuse_reflection_bsdf( tint: clearcoat_tint) ); bsdf omni_PBR_coated_bsdf = df::fresnel_layer( ior: clearcoat_ior, weight: clearcoat_weight, layer: clearcoat_bsdf, base: opaque_clearcoat, normal: final_clearcoat_normal ); bsdf final_bsdf = enable_clearcoat ? omni_PBR_coated_bsdf : omni_PBR_bsdf;
// Emission color emissive_color_tx = tex::texture_isvalid(emissive_color_texture) ? base::file_texture( texture: emissive_color_texture, color_offset: color(0.0, 0.0, 0.0), color_scale: color(1.0, 1.0, 1.0), mono_source: base::mono_average, uvw: transformed_uvw, clip: false ).tint : emissive_color;
color emissive_mask = tex::texture_isvalid(emissive_mask_texture) ? base::file_texture( texture: emissive_mask_texture, color_offset: color(0.0, 0.0, 0.0), color_scale: color(1.0, 1.0, 1.0), mono_source: base::mono_average, uvw: transformed_uvw, clip: false ).tint : color(1.0); float opacity_value = enable_opacity_texture ? base::file_texture( texture: opacity_texture, mono_source: opacity_mode, uvw: transformed_uvw ).mono : opacity_constant;
// The opacity_threshold is interpreted as follows: // 1. opacity_threshold > 0: binary opacity masking mode // i.e.: if opacity_value > opacity_threshold we remap opacity_value to 1.0, otherwise to 0.0 // 2. opacity_threshold == 0: fractional opacity mode. Leaves the opacity_value untouched, // allowing the renderer to use fractional cutout_opacity values, if it supports this feature // // NOTE: when the renderer does not enable 'fractional cutout opacity' it interprets // cutout_opacity values of 1.0 as opaque and anything below as fully transparent float local_cutout_opacity = enable_opacity ? ((opacity_threshold == 0.0) ? opacity_value : ((opacity_value >= opacity_threshold) ? 1.0 : 0)) : 1.0;
} in material( surface: material_surface( scattering: final_bsdf, emission: material_emission ( df::diffuse_edf(), intensity: enable_emission? emissive_color_tx * emissive_mask * color(emissive_intensity) : color(0) ) ), geometry: material_geometry( normal: enable_clearcoat ? state::normal() : diffuse_gloss_normal, cutout_opacity: local_cutout_opacity ));123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404/* * SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause */
mdl 1.4;
import ::base::*;import ::anno::*;
using OmniPBR_ClearCoat_Opacity import OmniPBR_ClearCoat_Opacity;
export material OmniPBR_Opacity(
color diffuse_color_constant = color(0.2f) [[ anno::display_name("Base Color"), anno::description("This is the base color"), anno::in_group("Albedo") ]], uniform texture_2d diffuse_texture = texture_2d() [[ anno::display_name("Albedo Map"), anno::in_group("Albedo") ]], float albedo_desaturation = float(0.0) [[ anno::display_name("Albedo Map Desaturation"), anno::soft_range(float(0.0f), float(1.0f)), anno::description("Desaturates the albedo map"), anno::in_group("Albedo") ]], float albedo_add = float(0.0) [[ anno::display_name("Albedo Add"), anno::soft_range(float(-1.0f), float(1.0f)), anno::description("Adds a constant value to the diffuse color "), anno::in_group("Albedo") ]], float albedo_brightness = float(1.0) [[ anno::display_name("Albedo Brightness"), anno::soft_range(float(0.0f), float(1.0f)), anno::description("Multiplier for the diffuse color "), anno::in_group("Albedo") ]], color diffuse_tint = color(1.0f) [[ anno::display_name("Color Tint"), anno::description("When enabled, this color value is multiplied over the final albedo color"), anno::in_group("Albedo") ]],
// -------------------- REFLECTIVITY ---------------------- float reflection_roughness_constant = 0.5f [[ anno::display_name("Roughness Amount"), anno::hard_range(0.0,1.), anno::description("Higher roughness values lead to more blurry reflections"), anno::in_group("Reflectivity") ]], float reflection_roughness_texture_influence = 0.0f [[ anno::display_name("Roughness Map Influence"), anno::hard_range(0.0, 1.), anno::description("Blends between the constant value and the lookup of the roughness texture"), anno::in_group("Reflectivity") ]], uniform texture_2d reflectionroughness_texture = texture_2d() [[ anno::display_name("Roughness Map"), anno::in_group("Reflectivity") ]], float metallic_constant = 0.f [[ anno::display_name("Metallic Amount"), anno::hard_range(0.0,1.), anno::description("Metallic Material"), anno::in_group("Reflectivity") ]], float metallic_texture_influence = 0.0f [[ anno::display_name("Metallic Map Influence"), anno::hard_range(0.0, 1.), anno::description("Blends between the constant value and the lookup of the metallic texture"), anno::in_group("Reflectivity") ]], uniform texture_2d metallic_texture = texture_2d() [[ anno::display_name("Metallic Map"), anno::in_group("Reflectivity") ]], float specular_level = float(0.5) [[ anno::display_name("Specular"), anno::soft_range(float(0.0f), float(1.0f)), anno::description("The specular level (intensity) of the material"), anno::in_group("Reflectivity") ]], // -------------------- ORM ---------------------- uniform bool enable_ORM_texture = false [[ anno::display_name("Enable ORM Texture"), anno::description("When True the ORM texture will be used to extract the Occlusion, Roughness and Metallic Map"), anno::in_group("Reflectivity") ]], uniform texture_2d ORM_texture = texture_2d() [[ anno::display_name("ORM Map"), anno::description("Texture that hae Occlusion, Roughness and Metallic map stored in the respective r, g and b channels"), anno::in_group("Reflectivity") ]], // -------------------- AO Group ----------------------
float ao_to_diffuse = 0.0 [[ anno::display_name("AO to Diffuse"), anno::description("Controls the amount of ambient occlusion multiplied into the diffuse color channel"), anno::in_group("AO"), anno::hard_range(0.0f, 1.0f) ]], uniform texture_2d ao_texture = texture_2d() [[ anno::display_name("Ambient Occlusion Map"), anno::description("The Ambient Occlusion texture for the material"), anno::in_group("AO") ]], // -------------------- EMISSIVE ---------------------- uniform bool enable_emission = false [[ anno::display_name("Enable Emission"), anno::description("Enables the emission of light from the material"), anno::in_group("Emissive") ]], color emissive_color = color(1.0, 0.1, 0.1) [[ anno::enable_if("enable_emission == true"), anno::display_name("Emissive Color"), anno::description("The emission color"), anno::in_group("Emissive") ]], uniform texture_2d emissive_color_texture = texture_2d() [[ anno::enable_if("enable_emission == true"), anno::display_name("Emissive Color map"), anno::in_group("Emissive"), anno::description("The emissive color texture") ]], uniform texture_2d emissive_mask_texture = texture_2d() [[ anno::enable_if("enable_emission == true"), anno::display_name("Emissive Mask map"), anno::description("The texture masking the emissive color"), anno::in_group("Emissive") ]], uniform float emissive_intensity = 40.f [[ anno::enable_if("enable_emission == true"), anno::display_name("Emissive Intensity"), anno::description("Intensity of the emission"), anno::in_group("Emissive") ]],
// Cutout Opacity uniform bool enable_opacity = true [[ anno::display_name("Enable Opacity"), anno::description("Enables the use of cutout opacity"), anno::in_group("Opacity") ]], uniform bool enable_opacity_texture = false [[ anno::display_name("Enable Opacity Texture"), anno::description("Enables or disables the usage of the opacity texture map"), anno::in_group("Opacity") ]], uniform float opacity_constant = 1.f [[ anno::hard_range(0.0, 1.0), anno::display_name("Opacity Amount"), anno::description("Opacity value between 0 and 1, when Opacity Map is not valid"), anno::in_group("Opacity") ]], uniform texture_2d opacity_texture = texture_2d() [[ anno::display_name("Opacity Map"), anno::in_group("Opacity") ]], uniform base::mono_mode opacity_mode = base::mono_average [[ anno::display_name("Opacity Mono Source"), anno::in_group("Opacity"), anno::description("Determines how to lookup opacity from the supplied texture. mono_alpha, mono_average, mono_luminance, mono_maximum") ]], uniform float opacity_threshold = 0.f [[ anno::hard_range(0.0, 1.0), anno::display_name("Opacity Threshold"), anno::description("If negative, disable cutout_opacity; if 0, use fractional opacity values 'as is'; if > 0, remap opacity values to 1 when >= threshold and to 0 otherwise"), anno::in_group("Opacity") ]], // -------------------- Normal ---------------------- /* uniform bool enable_normalmap_texture = false [[ anno::display_name("Enable Normal Texture"), anno::description("Enables the usage of the normalmap texture"), anno::in_group("Features") ]], */ uniform float bump_factor = 1.f [[ anno::display_name("Normal Map Strength"), anno::description("Strength of normal map."), anno::in_group("Normal"), anno::soft_range(0.0f, 1.0f) ]], uniform texture_2d normalmap_texture = texture_2d() [[ anno::display_name("Normal Map"), anno::description("Enables the usage of the normalmap texture"), anno::in_group("Normal") ]],
/* uniform bool enable_detail_normalmap_texture = false [[ anno::display_name("Enable Detail Normal Texture"), anno::in_group("Features"), anno::description("Enables the usage of the detail normalmap texture") ]],*/ uniform float detail_bump_factor = .3f [[ anno::display_name("Detail Normal Strength"), anno::in_group("Normal"), anno::soft_range(0.0f, 1.0f), anno::description("Strength of the detail normal") ]], uniform texture_2d detail_normalmap_texture = texture_2d() [[ anno::display_name("Detail Normal Map"), anno::in_group("Normal") ]], // UV Projection Group uniform bool project_uvw = false [[ anno::display_name("Enable Project UVW Coordinates"), anno::description("When enabled, UV coordinates will be generated by projecting them from a coordinate system"), anno::in_group("UV") ]], uniform bool world_or_object = false [[ anno::enable_if("project_uvw == true"), anno::display_name("Enable World Space"), anno::description("When set to 'true' uses world space for projection, when 'false' object space is used"), anno::in_group("UV") ]], uniform int uv_space_index = 0 [[ anno::enable_if("project_uvw == true"), anno::display_name("UV Space Index"), anno::description("UV Space Index."), anno::in_group("UV"), anno::hard_range(0, 3) ]], // Adjustments Group uniform float2 texture_translate = float2(0.0f) [[ anno::enable_if("project_uvw == true"), anno::display_name("Texture Translate"), anno::description("Controls position of texture."), anno::in_group("UV") ]], uniform float texture_rotate = 0.f [[ anno::enable_if("project_uvw == true"), anno::display_name("Texture Rotate"), anno::description("Rotates angle of texture in degrees."), anno::in_group("UV") ]], uniform float2 texture_scale = float2(1.0f) [[ anno::enable_if("project_uvw == true"), anno::display_name("Texture Scale"), anno::description("Larger number increases size of texture."), anno::in_group("UV") ]], uniform float2 detail_texture_translate = float2(0.0f) [[ anno::enable_if("project_uvw == true"), anno::display_name("Detail Texture Translate"), anno::description("Controls the position of the detail texture."), anno::in_group("UV") ]], uniform float detail_texture_rotate = 0.f [[ anno::enable_if("project_uvw == true"), anno::display_name("Detail Texture Rotate"), anno::description("Rotates angle of the detail texture in degrees."), anno::in_group("UV") ]], uniform float2 detail_texture_scale = float2(1.0f) [[ anno::enable_if("project_uvw == true"), anno::display_name("Detail Texture Scale"), anno::description("Larger numbers increase the size of the detail texture"), anno::in_group("UV") ]] ) [[ anno::display_name("OmniPBR Opacity"), anno::description("OmniPBR supports opacity and ORM textures"), anno::in_group("Base"), anno::version( 2, 1, 0), anno::author("NVIDIA CORPORATION"), anno::key_words(string[]("omni", "PBR", "opacity", "omniverse", "generic"))]] = OmniPBR_ClearCoat_Opacity( diffuse_texture: diffuse_texture, albedo_desaturation: albedo_desaturation, albedo_add: albedo_add, albedo_brightness: albedo_brightness, diffuse_color_constant: diffuse_color_constant, diffuse_tint: diffuse_tint, //ao ao_texture: ao_texture, ao_to_diffuse: ao_to_diffuse, //ORM ORM_texture: ORM_texture, enable_ORM_texture: enable_ORM_texture, //reflectivity reflection_roughness_constant: reflection_roughness_constant, reflectionroughness_texture: reflectionroughness_texture, reflection_roughness_texture_influence: reflection_roughness_texture_influence, metallic_constant: metallic_constant, metallic_texture: metallic_texture, metallic_texture_influence: metallic_texture_influence, specular_level: specular_level, //opacity enable_opacity: enable_opacity, enable_opacity_texture: enable_opacity_texture, opacity_texture: opacity_texture, opacity_constant: opacity_constant, opacity_mode: opacity_mode, opacity_threshold: opacity_threshold, //emissive enable_emission: enable_emission, emissive_color: emissive_color, emissive_color_texture: emissive_color_texture, emissive_mask_texture: emissive_mask_texture, emissive_intensity: emissive_intensity, //clearcoat enable_clearcoat: false, clearcoat_tint: color(1.0f), clearcoat_transparency: 1.0f, clearcoat_reflection_roughness: 0.0f, clearcoat_weight: 1.0f, clearcoat_flatten: 1.0f, clearcoat_ior: 1.56f, clearcoat_bump_factor: 1.f, clearcoat_normalmap_texture: texture_2d(), //normal normalmap_texture: normalmap_texture, bump_factor: bump_factor, detail_normalmap_texture: detail_normalmap_texture, detail_bump_factor: detail_bump_factor, project_uvw: project_uvw, world_or_object: world_or_object, uv_space_index: uv_space_index, texture_translate: texture_translate, texture_rotate: texture_rotate, texture_scale: texture_scale, detail_texture_translate: detail_texture_translate, detail_texture_rotate: detail_texture_rotate, detail_texture_scale: detail_texture_scale, clearcoat_texture_translate: float2(0.0f), clearcoat_texture_rotate: 0.0f, clearcoat_texture_scale: float2(1.0f) );123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673/****************************************************************************** Copyright 2023 NVIDIA Corporation. All rights reserved.******************************************************************************
MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT, WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR, THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.*/
// This file contains samples of very fast rendering SSS plastics for iray//
mdl 1.4;import ::df::*;import ::math::*;import ::anno::*;
const string COPYRIGHT = " Copyright 2023 NVIDIA Corporation. All rights reserved.\n"" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n"" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" " THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n"" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n"" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" " COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n"" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n"" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n"" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n"" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n";
// Template for absorption and scattering, do not use directlymaterial volume_absorption( color absorption = color(0.8665f, 0.7769f, 0.1559f), color scattering = color(.5f), float distance_scale = .03f, float directional_bias = 0.0f, uniform float ior = 1.2f ) [[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Volume Absorption"), ::anno::description("Pure volume absorption material"), ::anno::author("NVIDIA"), ::anno::copyright_notice(COPYRIGHT), ::anno::hidden() ]] = material ( ior: color(ior), surface: material_surface ( scattering: ::df::specular_bsdf ( tint: color (1.0f, 1.0f, 1.0f), mode: ::df::scatter_reflect_transmit ) ), volume: material_volume ( scattering: ::df::anisotropic_vdf( directional_bias: directional_bias ), absorption_coefficient: (distance_scale <= 0)? color(0): ::math::log(absorption) / -distance_scale, scattering_coefficient: (distance_scale <= 0)? color(0): ::math::log(scattering) / -distance_scale ));
// plastic_full_weighted_mix// Plastic material using diffuse reflection, diffuse transmission// and SSS. Due to the diffuse transmission the volume absorption will// render faster and converge smoother than when using specular transmission.export material Plastic_Thick_Translucent( color diffuse_color = color(0.6940f, 0.5831f, 0.0493f) [[ ::anno::display_name("Diffuse Color"), ::anno::description("The diffuse color of the plastic material"), ::anno::in_group("Appearance") ]], float diffuse_weight = 0.3f [[ ::anno::display_name("Diffuse Weight"), ::anno::description("The weight of the diffuse color of the plastic material. It is recommended to keep " "the value around 0.5, lower values make the material appear more transparent while higher values make " "it more opaque."), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f) ]], color absorption = color(0.8665f, 0.7769f, 0.1559f) [[ ::anno::display_name("Absorption Color"), ::anno::description("Sets the absorption color (this is color when light goes extinct)of the plastic material"), ::anno::in_group("Appearance") ]], color scattering = color(.5f) [[ ::anno::display_name("Scattering Color"), ::anno::description("Sets the absorption color (this is color when light goes extinct)of the plastic material"), ::anno::in_group("Appearance") ]], float distance_scale = 1.5f [[ ::anno::display_name("Distance Scale"), ::anno::description("Scales how quickly light is absorbed. Set this value low enough to see " "some light extinction taking place. Tip: Set 'diffuse_weight' to 0.0 while adjusting this " "material parameter for your scene"), ::anno::in_group("Appearance") ]], color diffuse_transmission_tint = color(1.0000f, 0.7249f, 0.1972f) [[ ::anno::display_name("Diffuse Transmission Color"), ::anno::description("The tinting of light scattering through the plastic material"), ::anno::in_group("Appearance") ]],
float reflection_roughness = 0.0f [[ ::anno::display_name("Roughness"), ::anno::description("The roughness of the reflection on the plastic"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f) ]]) [[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Full Control"), ::anno::description("Plastic Material finegrained controls of its appearance"), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.Plastic_Thick_Translucent.png"), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny")), ::anno::copyright_notice(COPYRIGHT), ::anno::hidden()]] = let { float reflection_weight = 1.0f; float normal_reflectivity = 0.04f; float grazing_reflectivity = 1.0f; float reflectivity_exponent = 5.0f; uniform float ior = 1.4f;
material plastic = volume_absorption( absorption: absorption, scattering: scattering, distance_scale: distance_scale, ior: ior ); bsdf transdiff = ::df::diffuse_transmission_bsdf( tint: diffuse_transmission_tint ); bsdf diffuse = ::df::diffuse_reflection_bsdf( tint: diffuse_color ); bsdf diffuse_mix_layer = ::df::weighted_layer( base: transdiff, layer: diffuse, weight: diffuse_weight );
bsdf glossy_reflection = ::df::simple_glossy_bsdf( tint: color(1.0f), roughness_u: reflection_roughness, mode: ::df::scatter_reflect ); bsdf final_layer = ::df::custom_curve_layer( normal_reflectivity: normal_reflectivity, grazing_reflectivity: grazing_reflectivity, layer: glossy_reflection, base: diffuse_mix_layer, weight: reflection_weight, exponent: reflectivity_exponent ); } in material ( surface: material_surface( scattering: final_layer ), volume: plastic.volume);
export material plastic_simple_controls( color diffuse_color = color(0.6940f, 0.5831f, 0.0493f) [[ ::anno::display_name("Diffuse Color"), ::anno::description("The diffuse color of the plastic material"), ::anno::in_group("Appearance") ]], float diffuse_weight = 0.5f [[ ::anno::display_name("Diffuse Weight"), ::anno::description("The weight of the diffuse color of the plastic material. It is recommended to keep " "the value around 0.5, lower values make the material appear more transparent while higher values make " "it more opaque."), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f) ]], color transmissive_color = color(0.8665f, 0.7769f, 0.1559f) [[ ::anno::display_name("Transmissive Color"), ::anno::description("The tinting of light scattering through the plastic material"), ::anno::in_group("Appearance") ]], float reflection_roughness = 0.0f [[ ::anno::display_name("Roughness"), ::anno::description("The roughness of the reflection on the plastic"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f) ]], float distance_scale = 0.005f [[ ::anno::display_name("Distance Scale"), ::anno::description("Scales how quickly light is absorbed. Set this value low enough to see " "some light extinction taking place. Tip: Set 'diffuse_weight' to 0.0 while adjusting this " "material parameter for your scene"), ::anno::in_group("Appearance") ]] )[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Weight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_simple_controls.png"), ::anno::copyright_notice(COPYRIGHT), ::anno::hidden()]] = Plastic_Thick_Translucent( absorption: ::math::pow(transmissive_color, 0.2f), scattering: color(0.5f), distance_scale: distance_scale, diffuse_transmission_tint: ::math::pow(transmissive_color, 0.2f), diffuse_color: diffuse_color, diffuse_weight: diffuse_weight, reflection_roughness: reflection_roughness
);
// 01 - Blackexport material plastic_black(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Black"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "dark", "black", "neutral")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_black.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.034230f), diffuse_weight: .5f, transmissive_color: color(0.034230f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 02 - Dark Grayexport material plastic_dark_gray(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Dark Gray"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "dark", "gray", "neutral")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_dark_gray.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.127530f), diffuse_weight: .5f, transmissive_color: color(0.089194f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 03 - Light Grayexport material plastic_light_gray(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Light Gray"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "light", "gray", "neutral")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_light_gray.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.464741f), diffuse_weight: .5f, transmissive_color: color(0.358654f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 04 - Whiteexport material plastic_white(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic White"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "light", "white", "neutral")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_white.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.915750f), diffuse_weight: .5f, transmissive_color: color(0.812241f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 05 - Ivory Whiteexport material plastic_ivory_white(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Ivory White"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "white", "bright", "ivory", "warm")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_ivory_white.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.899385f, 0.843370f, 0.694081f), diffuse_weight: .5f, transmissive_color: color(0.722672f, 0.708298f, 0.547994f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 06 - Lemonexport material plastic_lemon(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Lemon"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "lemon", "yellow", "light", "warm")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_lemon.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.859174f, 0.875138f, 0.039947f), diffuse_weight: .5f, transmissive_color: color(0.98211f, 0.843370f, 0.031551f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 07 - Yellow Orangeexport material plastic_yellow_orange(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Yellow"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "light", "orange", "yellow", "warm")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_yellow_orange.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.875138f, 0.612066f, 0.039947f), diffuse_weight: .5f, transmissive_color: color(0.899385f, 0.373615f, 0.030257f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 08 - Orangeexport material plastic_orange(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Orange"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "orange", "warm")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_orange.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.875138f, 0.353741f, 0.030257f), diffuse_weight: .5f, transmissive_color: color(0.891262f, 0.420508f, 0.022013f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 09 - Dark Orangeexport material plastic_dark_orange(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Dark Orange"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "dark", "orange", "warm")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_dark_orange.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.535642f, 0.127530f, 0.022013f), diffuse_weight: .5f, transmissive_color: color(0.827726f, 0.267358f, 0.022013f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 10 - Redexport material plastic_red(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Red"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "red", "cherry", "warm")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_red.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.547994f, 0.027755f, 0.027755f), diffuse_weight: .5f, transmissive_color: color(0.875138f, 0.022013f, 0.022013f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 11 - Magentaexport material plastic_magenta(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Magenta"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "magenta")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_magenta.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.547994f, 0.047776f, 0.554227f), diffuse_weight: .5f, transmissive_color: color(0.722672f, 0.030257f, 0.566810f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 12 - Purpleexport material plastic_purple(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Purple"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "purple")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_purple.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.193972f, 0.017936f, 0.464741f), diffuse_weight: .5f, transmissive_color: color(0.701170f, 0.018913f, 0.645555f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 13 - Dark Blueexport material plastic_dark_blue(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Dark Blue"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "dark", "blue", "cool")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_dark_blue.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.027755f, 0.058187f, 0.311180f), diffuse_weight: .5f, transmissive_color: color(0.027755f, 0.058187f, 0.311180f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 14 - Blueexport material plastic_blue(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Blue"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "blue", "cool")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_blue.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.034230f, 0.173439f, 0.843370f), diffuse_weight: .5f, transmissive_color: color(0.034230f, 0.124741f, 0.659224f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 15 - Sky Blueexport material plastic_sky_blue(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Sky Blue"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "blue", "sky", "cool")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_sky_blue.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.061907f, 0.535642f, 0.875138f), diffuse_weight: .5f, transmissive_color: color(0.028991f, 0.358654f, 0.673049f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 16 - Light Blueexport material plastic_light_blue(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Light Blue"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "light", "blue", "cool")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_light_blue.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.263175f, 0.774227f, 0.827726f), diffuse_weight: .5f, transmissive_color: color(0.163641f, 0.592438f, 0.759300f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 17 - Tealexport material plastic_teal(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Teal"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "teal", "cool")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_teal.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.037029f, 0.579547f, 0.329729f), diffuse_weight: .5f, transmissive_color: color(0.022013f, 0.476177f, 0.353741f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 18 - Dark Greenexport material plastic_dark_green(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Dark Green"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "dark", "green")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_dark_green.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.034230f, 0.141980f, 0.034230f), diffuse_weight: .5f, transmissive_color: color(0.016988f, 0.141980f, 0.016988f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 19 - Greenexport material plastic_green(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Green"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "green")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_green.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.016988f, 0.311180f, 0.016988f), diffuse_weight: .5f, transmissive_color: color(0.012664f, 0.358654f, 0.012664f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 20 - Light Greenexport material plastic_light_green(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Light Green"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "light", "green")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_light_green.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.030257f, 0.687031f, 0.027755f), diffuse_weight: .5f, transmissive_color: color(0.030257f, 0.701170f, 0.027755f), distance_scale: 0.002f, reflection_roughness: 0.05f);
// 21 - Lime Greenexport material plastic_lime_green(*)[[ ::anno::author("NVIDIA ARC"), ::anno::display_name("Plastic Lime Green"), ::anno::description("Plastic material with a simple but fast light scattering for dense scattering plastic materials. " "The material was built to scatter light within the range of a few centimeters. If light scattering cannot be seen " "(which can be verified by setting 'Diffuse Wight' to 0.0), check the scene units scale or increase 'Distance Scale'."), ::anno::key_words(string[]("plastic", "artificial", "scattering", "SSS", "diffuse", "translucent", "new", "shiny", "lime", "green", "light")), ::anno::thumbnail("./.thumbs/Plastic_Thick_Translucent.plastic_lime_green.png"), ::anno::copyright_notice(COPYRIGHT)]] = plastic_simple_controls( diffuse_color: color(0.186989f, 0.605484f, 0.027755f), diffuse_weight: .5f, transmissive_color: color(0.204710f, 0.701170f, 0.022013f), distance_scale: 0.002f, reflection_roughness: 0.05f);1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543/****************************************************************************** * Copyright 2022 NVIDIA Corporation. All rights reserved. * ****************************************************************************** Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge,to any person obtaining a copy of the sample definition code that uses our Material Definition Language (the "MDL Materials"), to reproduce and distributethe MDL Materials, including without limitation the rights to use, copy, merge,publish, distribute, and sell modified and unmodified copies of the MDL Materials, and to permit persons to whom the MDL Materials is furnished to doso, in all cases solely for use with NVIDIA's Material Definition Language,subject to the following further conditions:
1. The above copyright notices, this list of conditions, and the disclaimerthat follows shall be retained in all copies of one or more of the MDLMaterials, including in any software with which the MDL Materials are bundled,redistributed, and/or sold, and included either as stand-alone text files,human-readable headers or in the appropriate machine-readable metadata fieldswithin text or binary files as long as those fields can be easily viewed by theuser, as applicable.2. The name of NVIDIA shall not be used to promote, endorse or advertise any Modified Version without specific prior written permission, except a) to comply with the notice requirements otherwise contained herein; or b) to acknowledgethe contribution(s) of NVIDIA.
THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USETHE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.*/
mdl 1.6;
import ::anno::*;import ::base::*;import ::df::*;import ::math::*;import ::state::*;import ::tex::*;import ::nvidia::core_definitions::blend_colors;import ::nvidia::core_definitions::dimension;
const string COPYRIGHT = " Copyright 2022 NVIDIA Corporation. All rights reserved.\n"" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n"" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" " THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n"" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n"" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" " COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n"" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n"" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n"" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n"" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n";
const string DESCRIPTION = "A stainless steel material with adjustable roughness and controls to add secondary effects \n""such as stains, smudges and mechanical damage";
float4 tile_select(uniform int select = 0){ switch (select) { case 0: return float4(0.000, 0.333, 0.666, 1.000); case 1: return float4(0.333, 0.666, 0.666, 1.000); case 2: return float4(0.666, 1.000, 0.666, 1.000); case 3: return float4(0.000, 0.333, 0.333, 0.666); case 4: return float4(0.333, 0.666, 0.333, 0.666); case 5: return float4(0.666, 1.000, 0.333, 0.666); case 6: return float4(0.000, 0.333, 0.000, 0.333); case 7: return float4(0.333, 0.666, 0.000, 0.333); case 8: return float4(0.666, 1.000, 0.000, 0.333); default: return float4(0.000, 0.333, 0.000, 0.333); }}
export struct vm_coordinates[[ ::anno::hidden()]]{ float2 uv; float rotation; int uv_space_index; float4 carry;};
enum vm_mono_select [[ anno::description("Modes for the creation of a gray-scale value from a color"), anno::hidden()]]{ mono_r = 0, mono_g = 1, mono_b = 2, mono_a = 3, mono_average = 4};
vm_coordinates vm_coord( float2 translation = float2(0.0f, 0.0) [[ ::anno::display_name("Translation"), ::anno::description("Translates the coordinates") ]], float rotation = 0.0f [[ ::anno::display_name("Rotation"), ::anno::description("Rotates the coordinates in degrees") ]], float2 scaling = float2(1.0f, 1.0f) [[ ::anno::display_name("Scaling"), ::anno::description("Scales the coordinates") ]], uniform int uv_space = 0 [[ ::anno::display_name("UV Space"), ::anno::description("Chose the UV space") ]])[[ ::anno::display_name("vm Transform"), ::anno::description("Generates coordinates to be used in vm_lookup functions")]]{ vm_coordinates uv; ::base::texture_coordinate_info info = ::base::coordinate_source( ::base::texture_coordinate_uvw, uv_space); uv.rotation = (rotation * 3.1415926535897932384626433832f) / 180.f; uv.uv = float2(info.position.x, info.position.y); float sine = ::math::sin(uv.rotation); float cosine = ::math::cos(uv.rotation); float2x2 rot = float2x2(cosine, -sine, sine, cosine); uv.uv = rot * uv.uv; uv.uv /= scaling; uv.uv += translation; return uv;}
vm_coordinates vm_coord_hex( vm_coordinates uv, float scale = 1.0f){ vm_coordinates uv_return; float2 uv_ = float2(uv.uv.x, uv.uv.y); // same as from function get_hex above float2 s = float2(1.0f, 1.7320508f); float2 n = uv_ - float2(0.5f, 1.0f); float4 c = ::math::floor(float4(uv_.x, uv_.y, n.x, n.y)/float4(s.x, s.y, s.x, s.y)) + 0.5f; float2 h_1 = uv_ - float2(c.x, c.y) * s; float2 h_2 = uv_ - (float2(c.z, c.w) + float2(0.5f)) * s; 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); uv_return.uv = float2(uv_id.x*scale+0.5, uv_id.y*scale+0.5); // unless we introduce random cell rotations where we need to compensate for this in the rotation // we can just plain copy the rotation value uv_return.rotation = uv.rotation; return uv_return;}
// Offsets a set of uv coordinates in either row (u) or column (v) directionvm_coordinates vm_coord_rowcol_offset( vm_coordinates uv, float offset, bool horizontal_offset = true){ int index = horizontal_offset ? 0 : 1; uv.uv[index] += ::math::floor(uv.uv[index ^ 1]) * offset; return uv;}
vm_coordinates vm_coord_grid( vm_coordinates uv, float scale = 1.0f){ float2x2 scal = float2x2(scale, 0., 0., scale); uv.uv = ::math::frac(uv.uv); uv.uv -= 0.5f; uv.uv = scal * uv.uv; uv.uv = uv.uv + 0.5f; return uv;}
::base::texture_return vm_tex_lookup( uniform texture_2d tex, vm_coordinates uv = vm_coord(), uniform vm_mono_select mono_source = mono_a, float4 scale = float4(1.0f), uniform ::tex::wrap_mode wrap_u = ::tex::wrap_repeat, uniform ::tex::wrap_mode wrap_v = ::tex::wrap_repeat, uniform float2 crop_u = float2(0.0, 1.0), uniform float2 crop_v = float2(0.0, 1.0)){ float mono; float4 lookup = ::tex::lookup_float4(tex, uv.uv, wrap_u, wrap_v, crop_u, crop_v) * scale; switch( mono_source ) { case mono_r: mono = lookup.x; break; case mono_g: mono = lookup.y; break; case mono_b: mono = lookup.z; break; case mono_a: mono = lookup.w; break; case mono_average: mono = ::math::average(float3(lookup.x, lookup.y, lookup.z)); break; } return ::base::texture_return(color(lookup.x, lookup.y, lookup.z), mono);}
// *** SET CUTOUT ENUM NAMES ***export enum cutout_pattern[[ ::anno::description("Cutout Pattern"), ::anno::hidden()]]{ pattern_circle = 0 [[ ::anno::display_name("Circle")]], pattern_hexagon = 1 [[ ::anno::display_name("Hexagon")]], pattern_line = 2 [[ ::anno::display_name("Line") ]], pattern_square = 3 [[ ::anno::display_name("Square")]], pattern_rectangle = 4 [[ ::anno::display_name("Rectangle")]], pattern_cross = 5 [[ ::anno::display_name("Cross")]], pattern_rhombus = 6 [[ ::anno::display_name("Rhombus")]], pattern_triangle = 7 [[ ::anno::display_name("Triangle")]], pattern_star = 8 [[ ::anno::display_name("Star")]] };
::base::texture_coordinate_info vmat_transform_post_scale( ::base::texture_coordinate_info uvw, float2 scale = float2(1.0f)){ return ::base::texture_coordinate_info( position: float3(uvw.position.x / scale.x, uvw.position.y / scale.y, uvw.position.z), tangent_u: uvw.tangent_u, tangent_v: uvw.tangent_v );}
float3 normalmap_normal( uniform texture_2d texture, float factor = 1.0, ::base::texture_coordinate_info uvw = ::base::texture_coordinate_info()){ float3 lookup = (::tex::lookup_float3(texture, float2(uvw.position.x, uvw.position.y)) - float3(0.5)) * (factor * 2.0); return ::math::normalize(uvw.tangent_u * lookup.x + uvw.tangent_v * lookup.y + state::normal() * (lookup.z + (1.0 - factor)));}
float overlay(float base, float layer, float weight){ return base + (1.0f - base) * layer * weight;}
// Returns the normal n in tangent space, given n is in internal space.float3 transform_internal_to_tangent(float3 n)[[ anno::hidden() ]]{ return n.x* float3(state::texture_tangent_u(0).x,state::texture_tangent_v(0).x,state::normal().x)+ n.y* float3(state::texture_tangent_u(0).y,state::texture_tangent_v(0).y,state::normal().y)+ n.z* float3(state::texture_tangent_u(0).z,state::texture_tangent_v(0).z,state::normal().z);}
// Returns the normal n in internal space, given n is in tangent space.float3 transform_tangent_to_internal(float3 n)[[ anno::hidden() ]]{ return state::texture_tangent_u(0) * n.x + state::texture_tangent_v(0) * n.y + state::normal() * n.z ;}
// Returns a normal by adding a detail normal to a global normal.// If detail blending of two normal maps gives visual artifacts, check if texture_2d are loaded// correctly with tex::gamma_linearfloat3 add_detail_normal(float3 nd = state::normal(), float3 n = state::normal()){ // http://blog.selfshadow.com/publications/blending-in-detail/ float3 n_t = transform_internal_to_tangent(n); float3 nd_t = transform_internal_to_tangent(nd);
n_t=n_t + float3(0.,0.,1.); nd_t = nd_t * float3(-1.,-1.,1.); n = n_t*math::dot(n_t, nd_t)/n_t.z - nd_t; return ::math::normalize(transform_tangent_to_internal(n));}
float3 srgb2rgb(float3 val){ return ::math::pow(::math::max(val, float3(0.0f)), 2.2);}
float uint2float(int x){ return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0);}
int lowbias32(int x){ x ^= x >>> 16; x *= 0x7feb352d; x ^= x >>> 15; x *= 0x846ca68b; x ^= x >>> 16; return x;}
float2 rnd22(int2 p) { float2 ret_val = float2( uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f ); return ret_val;}
::base::texture_coordinate_info vmat_transform( uniform float2 translation = float2(0.0, 0.0), uniform float rotation = 0.0, uniform float2 scaling = float2(1.0, 1.0), uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, uniform int uv_space = 0){ float4x4 scale = float4x4(1.0 /scaling.x, 0. , 0. , 0., 0. , 1.0 /scaling.y , 0. , 0., 0. , 0. , 1.0, 0., translation.x , translation.y , 0.0, 1.);
float s = ::math::sin(rotation); float c = ::math::cos(rotation); float4x4 rotate = float4x4( c , -s , 0.0 , 0.0, s , c , 0.0 , 0.0, 0.0, 0.0 , 1.0 , 0.0, 0. , 0.0 , 0.0 , 1.); return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space));}
float2x2 invert_2x2(float2x2 M){ float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]);}
float3 nonrepeat_lookup( uniform texture_2d texture = texture_2d(), ::base::texture_coordinate_info uvw = ::base::coordinate_source(), float texture_scale = 1.0, float3 average_color = float3(0.5), float patch_size = 8.0){ float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale; float Z = patch_size; // patch scale inside example texture float CON = 1.0f; float3 O = float3(0.f); float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space float2 U = uv_in; float2 V = M * uv_in; //pre-tilted hexa coordinates int2 I = int2(::math::floor(V)); // hexa-tile id // The mean color needs to be determined in Photoshop then to make the // average color work out, take the float value and calculate the apropriate // mean value as (value^(1/2.2))
float3 m = average_color; float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates if( F[2] > 0.f )
O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON)) + (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON)) + (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON)); else O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON)) + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON)) + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON)); O = m + O/::math::length(W); O = ::math::clamp( (O), 0.0, 1.0); return float3(O);}
float histogram_range(float input, float range, float position){ float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); return ::math::lerp(low, high, input);}
color endless_texture( uniform texture_2d texture = texture_2d(), ::base::texture_coordinate_info uvw = ::base::coordinate_source(), float texture_scale = 10.0, float3 average_color = float3(0.5, 0.5, 1.0), float patch_size = 8.0, bool gamma_correct_lookup = true){ return gamma_correct_lookup ? color(srgb2rgb( nonrepeat_lookup ( texture: texture, uvw: uvw, texture_scale: texture_scale, average_color: average_color, patch_size: patch_size )) ) : color(nonrepeat_lookup ( texture: texture, uvw: uvw, texture_scale: texture_scale, average_color: average_color, patch_size: patch_size ));}
float3 endless_normal( uniform texture_2d texture = texture_2d(), float factor = 1.0, bool flip_tangent_u = false, bool flip_tangent_v = false, ::base::texture_coordinate_info uvw = ::base::coordinate_source(), float texture_scale = 1.0, float3 average_color = float3(0.5, 0.5, 1.0), float patch_size = 8.0){ float3 transformed_tangent_u = flip_tangent_u ? uvw.tangent_u : - uvw.tangent_u; float3 transformed_tangent_v = flip_tangent_v ? uvw.tangent_v : - uvw.tangent_v; if (flip_tangent_u) transformed_tangent_u=-transformed_tangent_u; if (flip_tangent_v) transformed_tangent_v=-transformed_tangent_v;
// normalized Lookup float3 tangent_space_normal = (nonrepeat_lookup ( texture: texture, uvw: uvw, texture_scale: texture_scale, average_color: average_color, patch_size: patch_size ) - 0.5) * (2.0 * factor); return ::math::normalize(uvw.tangent_u * tangent_space_normal.x + uvw.tangent_v * tangent_space_normal.y + ::state::normal()*1.0); }
export material Stainless_Steel( uniform bool infinite_tiling = true [[ ::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."), ::anno::display_name("Infinite Tiling"), ::anno::in_group("Appearance"), ::anno::ui_order(0) ]], float roughness = 0.f [[ ::anno::description("Higher values lead to blurrier reflections."), ::anno::display_name("Roughness"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(1) ]], float roughness_variation = 0.21f [[ ::anno::description("Adds variation to the roughness following the shape of the milling bump map."), ::anno::display_name("Roughness Variation"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(2) ]], float cloudiness = 0.3f [[ ::anno::description("Adds a cloudy reflection to the metal material."), ::anno::display_name("Cloudiness"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(3) ]], float brightness = 0.5f [[ ::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."), ::anno::display_name("Brightness"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(4) ]], float milling_bump_strength = 0.0f [[ ::anno::description("Adds milled grooves on the metal."), ::anno::display_name("Milling Bump Strength"), ::anno::in_group("Appearance", "Bump"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(5) ]], float dents_bump_strength = 0.01f [[ ::anno::description("Adds dents and bumps."), ::anno::display_name("Dents Bump Strength"), ::anno::in_group("Appearance", "Bump"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(6) ]], float dents_scale = 1.f [[ ::anno::description("Scales the size of the dents pattern on the material."), ::anno::display_name("Dents Scale"), ::anno::in_group("Appearance", "Bump"), ::anno::ui_order(7) ]], float smudges_1_weight = 0.f [[ ::anno::description("Adds smudges on the material which impact the reflectivity."), ::anno::display_name("Smudges Weight"), ::anno::in_group("Appearance", "Imperfections"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(8) ]], float smudges_2_weight = 0.f [[ ::anno::description("Adds imperfections that resemble stains on the material which impact the reflectivity."), ::anno::display_name("Stains Weight"), ::anno::in_group("Appearance", "Imperfections"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(9) ]], float smudges_falloff = .45f [[ ::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."), ::anno::display_name("Smudges Falloff"), ::anno::in_group("Appearance", "Imperfections"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(10) ]], float smudges_scale = 1.f [[ ::anno::description("Scales the smudges relative to the overal scale of the material."), ::anno::display_name("Smudges and Stains Scale"), ::anno::in_group("Appearance", "Imperfections"), ::anno::soft_range(0.f, 1.f), ::anno::ui_order(11) ]], uniform float2 texture_translate = float2(0.f) [[ ::anno::description("Controls the position of the texture."), ::anno::display_name("Texture Translate"), ::anno::in_group("Transform"), ::anno::ui_order(12) ]], uniform float texture_rotate = 0.f [[ ::anno::description("Rotates angle of the texture in degrees."), ::anno::display_name("Texture Rotate"), ::anno::in_group("Transform"), ::anno::soft_range(0.f, 360.f), ::anno::ui_order(13) ]], uniform float2 texture_scale = float2(1.f) [[ ::anno::description("Larger numbers increase the size."), ::anno::display_name("Texture Scale"), ::anno::in_group("Transform"), ::nvidia::core_definitions::dimension(float2(0.70f, 0.70f)), ::anno::ui_order(14) ]], uniform bool roundcorners_enable = false [[ ::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."), ::anno::display_name("Enable Round Corners"), ::anno::in_group("Round Corners"), ::anno::ui_order(15) ]], uniform float roundcorners_radius_mm = 0.5f [[ ::anno::description("Radius of the rounded corners in millimeters."), ::anno::display_name("Round Corner Radius (mm)"), ::anno::in_group("Round Corners"), ::anno::soft_range(0.f, 10.f), ::anno::ui_order(16) ]], uniform bool roundcorners_across_materials = false [[ ::anno::description("Applies the round corner effect across different materials when enabled."), ::anno::display_name("Across Materials"), ::anno::in_group("Round Corners"), ::anno::ui_order(17) ]], uniform int uv_space_index = 0 [[ ::anno::description("Uses selected UV space for material."), ::anno::display_name("UV Space Index"), ::anno::in_group("Advanced"), ::anno::hard_range(0, 10), ::anno::ui_order(18) ]])[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel"), ::anno::description(DESCRIPTION), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "new", "shiny", "smooth", "reflective", "plain", "gray"))]] = let { bool tmp0 = false; float2 texture_rescale = texture_scale * float2(0.55f); 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)); material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); color tmp3 = color(1.f, 1.f, 1.f); 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)); 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()); hair_bsdf tmp6 = hair_bsdf(); } in material( thin_walled: tmp0, surface: tmp1, backface: tmp2, ior: tmp3, volume: tmp4, geometry: tmp5, hair: tmp6);
export material Stainless_Steel_Punched( // Cutout parameters
uniform cutout_pattern shape_select = pattern_circle //select atlas tile here [[ ::anno::description("Select a cutout shape."), ::anno::display_name("Cutout Shape"), ::anno::in_group("Appearance", "Cutout"), ::anno::ui_order(1) ]], float2 punching_grid_size = float2(1.0f) [[ ::anno::description("Scales the size of the punching grid."), ::anno::display_name("Punching Grid Size"), ::anno::in_group("Appearance", "Cutout"), ::anno::ui_order(1) ]], float cutout_size = .92f [[ ::anno::description("Scales the size of the cutout pattern independently from the base material."), ::anno::display_name("Cutout Size"), ::anno::hard_range(0.f, 1.2f), ::anno::soft_range(0.f, 1.0f), ::anno::in_group("Appearance", "Cutout"), ::anno::ui_order(2) ]], float cutout_roundness = .4f [[ ::anno::description("At low values it makes the cutouts sharper. Higher values give the shapes a more rounded look."), ::anno::display_name("Cutout Roundness"), ::anno::hard_range(0.f, 1.f), ::anno::in_group("Appearance", "Cutout"), ::anno::ui_order(3) ]], float cutout_bevel_width = 0.8f [[ ::anno::description("Adjusts the width of the bevel transition."), ::anno::display_name("Cutout Bevel Width"), ::anno::hard_range(0.f, 1.f), ::anno::in_group("Appearance", "Cutout"), ::anno::ui_order(4) ]], float cutout_bump_strength = 2.0f [[ ::anno::description("Sets the strength of the bevelled normal around the cutout."), ::anno::display_name("Cutout Bevel Strength"), ::anno::soft_range(0.0f, 1.0f), ::anno::hard_range(0.0f, 2.0f), ::anno::in_group("Appearance", "Cutout"), ::anno::ui_order(5) ]],// Grid Layout parameters bool hexagonal_grid = true [[ ::anno::description("When enabled, the punching will occur on a hexagonal grid, otherwise a square grid"), ::anno::display_name("Enable Hexagonal Grid"), ::anno::in_group("Appearance", "Cutout Layout"), ::anno::ui_order(6) ]], float square_grid_offset = 0.0f [[ ::anno::description("Offsets each row of the grid by a certain amount."), ::anno::display_name("Square Grid Offset"), ::anno::in_group("Appearance", "Cutout Layout"), ::anno::enable_if("hexagonal_grid==false"), ::anno::ui_order(7) ]], bool horizontal_offset = true [[ ::anno::description("Choose whether to offset either in row or column direction."), ::anno::display_name("Horizontal Offset"), ::anno::in_group("Appearance", "Cutout Layout"), ::anno::enable_if("hexagonal_grid==false"), ::anno::ui_order(8) ]],
// Stainless Steel parameters uniform bool infinite_tiling = true [[ ::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."), ::anno::display_name("Infinite Tiling"), ::anno::in_group("Appearance"), ::anno::ui_order(9) ]], float roughness = 0.f [[ ::anno::description("Higher values lead to blurrier reflections."), ::anno::display_name("Roughness"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(10) ]], float roughness_variation = 0.21f [[ ::anno::description("Adds variation to the roughness following the shape of the milling bump map."), ::anno::display_name("Roughness Variation"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(11) ]], float cloudiness = 0.3f [[ ::anno::description("Adds a cloudy reflection to the metal material."), ::anno::display_name("Cloudiness"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(12) ]], float brightness = 0.5f [[ ::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."), ::anno::display_name("Brightness"), ::anno::in_group("Appearance"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(13) ]], float milling_bump_strength = 0.0f [[ ::anno::description("Adds milled grooves on the metal."), ::anno::display_name("Milling Bump Strength"), ::anno::in_group("Appearance", "Bump"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(14) ]], float dents_bump_strength = 0.01f [[ ::anno::description("Adds dents and bumps."), ::anno::display_name("Dents Bump Strength"), ::anno::in_group("Appearance", "Bump"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(15) ]], float dents_scale = 1.f [[ ::anno::description("Scales the size of the dents pattern on the material."), ::anno::display_name("Dents Scale"), ::anno::in_group("Appearance", "Bump"), ::anno::ui_order(16) ]], float smudges_1_weight = 0.f [[ ::anno::description("Adds smudges on the material which impact the reflectivity."), ::anno::display_name("Smudges Weight"), ::anno::in_group("Appearance", "Imperfections"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(17) ]], float smudges_2_weight = 0.f [[ ::anno::description("Adds imperfections that resemble stains on the material which impact the reflectivity."), ::anno::display_name("Stains Weight"), ::anno::in_group("Appearance", "Imperfections"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(18) ]], float smudges_falloff = .45f [[ ::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."), ::anno::display_name("Smudges Falloff"), ::anno::in_group("Appearance", "Imperfections"), ::anno::hard_range(0.f, 1.f), ::anno::ui_order(19) ]], float smudges_scale = 1.f [[ ::anno::description("Scales the smudges relative to the overal scale of the material."), ::anno::display_name("Smudges and Stains Scale"), ::anno::in_group("Appearance", "Imperfections"), ::anno::soft_range(0.f, 1.f), ::anno::ui_order(20) ]], uniform float2 texture_translate = float2(0.f) [[ ::anno::description("Controls the position of the texture."), ::anno::display_name("Texture Translate"), ::anno::in_group("Transform"), ::anno::ui_order(21) ]], uniform float texture_rotate = 0.f [[ ::anno::description("Rotates angle of the texture in degrees."), ::anno::display_name("Texture Rotate"), ::anno::in_group("Transform"), ::anno::soft_range(0.f, 360.f), ::anno::ui_order(22) ]], uniform float2 texture_scale = float2(1.f) [[ ::anno::description("Larger numbers increase the size."), ::anno::display_name("Texture Scale"), ::anno::in_group("Transform"), ::nvidia::core_definitions::dimension(float2(0.70f, 0.70f)), ::anno::ui_order(23) ]], uniform int uv_space_index = 0 [[ ::anno::description("Uses selected UV space for material."), ::anno::display_name("UV Space Index"), ::anno::in_group("Transform"), ::anno::hard_range(0, 10), ::anno::ui_order(24) ]], uniform bool roundcorners_enable = false [[ ::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."), ::anno::display_name("Enable Round Corners"), ::anno::in_group("Round Corners"), ::anno::ui_order(25) ]], uniform float roundcorners_radius_mm = 0.5f [[ ::anno::description("Radius of the rounded corners in millimeters."), ::anno::display_name("Round Corner Radius (mm)"), ::anno::in_group("Round Corners"), ::anno::soft_range(0.f, 10.f), ::anno::ui_order(26) ]], uniform bool roundcorners_across_materials = false [[ ::anno::description("Applies the round corner effect across different materials when enabled."), ::anno::display_name("Across Materials"), ::anno::in_group("Round Corners"), ::anno::ui_order(27) ]])[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Circular Punch"), ::anno::description(DESCRIPTION), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "new", "shiny", "smooth", "reflective", "plain", "gray"))]] = let{ material base_mat = Stainless_Steel( infinite_tiling: infinite_tiling, roughness: roughness, roughness_variation: roughness_variation, cloudiness: cloudiness, brightness: brightness, milling_bump_strength: milling_bump_strength, dents_bump_strength: dents_bump_strength, dents_scale: dents_scale, smudges_1_weight: smudges_1_weight, smudges_2_weight: smudges_2_weight, smudges_falloff: smudges_falloff, smudges_scale: smudges_scale, texture_translate: texture_translate, texture_rotate: texture_rotate, texture_scale: texture_scale, roundcorners_enable: roundcorners_enable, roundcorners_radius_mm: roundcorners_radius_mm, roundcorners_across_materials: roundcorners_across_materials, uv_space_index: uv_space_index );
// remap range of slider to avoid artifacts in the bevelling float2 punching_scale = texture_scale * 0.01f * punching_grid_size; float cutout_roundness_ = cutout_roundness*0.6f+0.4f; float cutout_size_lin = (1.0f/cutout_size); texture_2d punching_cutout = texture_2d("./textures/atlas_02_norm_dist.png", ::tex::gamma_linear);
vm_coordinates uv = vm_coord( translation: texture_translate, rotation: texture_rotate, scaling: punching_scale, uv_space: uv_space_index );
vm_coordinates punching_uv = hexagonal_grid ? vm_coord_hex( uv: uv, scale: cutout_roundness_ * cutout_size_lin ) : vm_coord_grid( uv: vm_coord_rowcol_offset( uv: uv, offset: square_grid_offset, horizontal_offset: horizontal_offset ), scale: cutout_roundness_ * cutout_size_lin ); // select the correct subtile from the atlas float4 crop = tile_select(shape_select);
::base::texture_return lookup = vm_tex_lookup( tex: punching_cutout, uv: punching_uv, mono_source: mono_a, scale: float4(1.0f), crop_u: float2(crop.x, crop.y), crop_v: float2(crop.z, crop.w), wrap_u: ::tex::wrap_clamp, wrap_v: ::tex::wrap_clamp );
float low = (1.0 - cutout_roundness_); float high = (cutout_size_lin * (cutout_bevel_width * 0.2f) * cutout_roundness_) + (1.0 - cutout_roundness_); // remap x...y to (clamped) 0...1 float x = ::math::clamp((lookup.mono - low)/(high - low), 0.0, 1.0); // spherical falloff float falloff=::math::sqrt(1.0-x*x); // masking falloff as the center of the cutout is flat float masked_falloff=falloff<=0.0?1.0:falloff;
// where base material is still there, use the value of the base material float cutout= ::math::min(falloff<=0.0?0.0:1.0, base_mat.geometry.cutout_opacity);
// bring in -.5 ... +.5 range and lerp between lookup and flat normal float3 remap_norm = ::math::lerp(float3(lookup.tint), float3(0.5, 0.5, 1.0), masked_falloff) - float3(0.5); float3 t_norm = ::math::normalize(remap_norm * float3(cutout_bump_strength, cutout_bump_strength, 1.0)); float3 rotfix_norm = float3(::math::cos(punching_uv.rotation) * t_norm.x - ::math::sin(punching_uv.rotation) * t_norm.y, ::math::sin(punching_uv.rotation) * t_norm.x + ::math::cos(punching_uv.rotation) * t_norm.y, t_norm.z); float3 normal = ::state::texture_tangent_u(punching_uv.uv_space_index) * rotfix_norm.x + ::state::texture_tangent_v(punching_uv.uv_space_index) * rotfix_norm.y + ::state::normal() * rotfix_norm.z;
float3 final_normal = ::base::blend_normals( base_normal: normal, base_normal_weight: 1.0f, detail_normal: base_mat.geometry.normal, detail_normal_weight: 1.0f );
} in material( surface: material_surface( scattering: base_mat.surface.scattering ), volume: base_mat.volume, ior: base_mat.ior, thin_walled: true, geometry: material_geometry( displacement: base_mat.geometry.displacement, normal: final_normal, cutout_opacity: cutout ));
// ----------------------- Stainless Steel Presets -----------------------// 2 Shiny Wornexport material Stainless_Steel_Shiny_Worn(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Shiny Worn"), ::anno::description("Shiny stainless steel with signs of mechanical wear"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Shiny_Worn.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "dented", "worn", "shiny", "reflective", "plain", "gray"))]] = Stainless_Steel( infinite_tiling: true, roughness: 0.0f, roughness_variation: 0.21f, cloudiness: 0.3f, brightness: 0.5f, milling_bump_strength: 0.0f, dents_bump_strength: 0.9f, dents_scale: 1.00f, smudges_1_weight: 0.0f, smudges_2_weight: 0.0f, smudges_falloff: 0.45f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false, uv_space_index: 0);
// 3 Shiny Smudgedexport material Stainless_Steel_Shiny_Smudged(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Shiny Smudged"), ::anno::description("Shiny stainless steel with signs of mechanical wear. Material offers optional controls \n" "to add secondary effects such as stains, smudges and mechanical damage"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Shiny_Smudged.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "smudged", "dirty", "shiny", "smooth", "reflective", "plain", "gray"))]] = Stainless_Steel( infinite_tiling: true, roughness: 0.0f, roughness_variation: 0.25f, cloudiness: 0.3f, brightness: 0.5f, milling_bump_strength: 0.0f, dents_bump_strength: 0.0f, dents_scale: 1.0f, smudges_1_weight: 0.7f, smudges_2_weight: 0.58f, smudges_falloff: 0.45f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false, uv_space_index: 0);
// 4 Glossyexport material Stainless_Steel_Glossy(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Glossy"), ::anno::description("Glossy stainless steel with optional controls for secondary effects \n""such as stains, smudges and mechanical damage"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Glossy.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "smudged", "dirty", "glossy", "smooth", "reflective", "plain", "gray"))]] = Stainless_Steel( infinite_tiling: true, roughness: 0.44f, roughness_variation: 0.05f, cloudiness: 0.44f, brightness: 0.5f, milling_bump_strength: 0.24f, dents_bump_strength: 0.0f, dents_scale: 1.0f, smudges_1_weight: 0.0f, smudges_2_weight: 0.0f, smudges_falloff: 0.45f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false, uv_space_index: 0);
// 5 Matteexport material Stainless_Steel_Matte(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Matte"), ::anno::description("Matte stainless steel with optional controls for secondary effects \n""such as stains, smudges and mechanical damage"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Matte.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "smudged", "dirty", "matte", "smooth", "reflective", "plain", "gray"))]] = Stainless_Steel( infinite_tiling: true, roughness: 1.00f, roughness_variation: 0.0f, cloudiness: 1.0f, brightness: 0.5f, milling_bump_strength: 0.4f, dents_bump_strength: 0.0f, dents_scale: 1.0f, smudges_1_weight: 0.0f, smudges_2_weight: 0.0f, smudges_falloff: 0.45f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false, uv_space_index: 0);
// ------------------ Stainless Steel Punched Presets ------------------
export material Stainless_Steel_Punched_Small_Circular(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Small Circular Punch"), ::anno::description("Punched stainless steel"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Small_Circular.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "circular", "gray"))]] = Stainless_Steel_Punched( // Punching parameters shape_select: pattern_circle, punching_grid_size: float2(1.0f), cutout_size: 0.5f, cutout_roundness: 0.4f, cutout_bevel_width: 0.5f, cutout_bump_strength: 0.8f, hexagonal_grid: true, square_grid_offset: 0.0f, horizontal_offset: true, // Material Parameters infinite_tiling: true, roughness: 0.3f, roughness_variation: 0.2f, cloudiness: 0.44f, brightness: 0.5f, milling_bump_strength: 0.05f, dents_bump_strength: 0.02f, dents_scale: 1.0f, smudges_1_weight: 0.04f, smudges_2_weight: 0.05f, smudges_falloff: 0.0f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), uv_space_index: 0, roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false);
export material Stainless_Steel_Punched_Hexagonal(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Hexagonal Punch"), ::anno::description("Punched stainless steel"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Hexagonal.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "hexagon", "hexagonal", "gray"))]] = Stainless_Steel_Punched( // Punching parameters shape_select: pattern_hexagon, punching_grid_size: float2(1.5f), cutout_size: .95f, cutout_roundness: 0.4f, cutout_bevel_width: 0.5f, cutout_bump_strength: 1.5f, hexagonal_grid: true, square_grid_offset: 0.0f, horizontal_offset: true, // Material Parameters infinite_tiling: true, roughness: 0.3f, roughness_variation: 0.2f, cloudiness: 0.44f, brightness: 0.5f, milling_bump_strength: 0.05f, dents_bump_strength: 0.02f, dents_scale: 1.0f, smudges_1_weight: 0.04f, smudges_2_weight: 0.05f, smudges_falloff: 0.0f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), uv_space_index: 0, roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false);
export material Stainless_Steel_Punched_Hexagonal_Small(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Small Hexagonal Punch"), ::anno::description("Punched stainless steel"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Hexagonal_Small.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "hexagon", "hexagonal", "gray"))]] = Stainless_Steel_Punched( // Punching parameters shape_select: pattern_hexagon, punching_grid_size: float2(.75f), cutout_size: .58f, cutout_roundness: 0.4f, cutout_bevel_width: 0.3f, cutout_bump_strength: 1.5f, hexagonal_grid: true, square_grid_offset: 0.0f, horizontal_offset: true, // Material Parameters infinite_tiling: true, roughness: 0.3f, roughness_variation: 0.2f, cloudiness: 0.44f, brightness: 0.5f, milling_bump_strength: 0.05f, dents_bump_strength: 0.02f, dents_scale: 1.0f, smudges_1_weight: 0.04f, smudges_2_weight: 0.05f, smudges_falloff: 0.0f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), uv_space_index: 0, roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false);
export material Stainless_Steel_Punched_Square(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Square Punch"), ::anno::description("Punched stainless steel"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Square.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "square", "gray"))]] = Stainless_Steel_Punched( // Punching parameters shape_select: pattern_square, punching_grid_size: float2(1.2f), cutout_size: 0.56f, cutout_roundness: 0.1f, cutout_bevel_width: 0.5f, cutout_bump_strength: 1.5f, hexagonal_grid: false, square_grid_offset: 0.5f, horizontal_offset: true, // Material Parameters infinite_tiling: true, roughness: 0.3f, roughness_variation: 0.2f, cloudiness: 0.44f, brightness: 0.5f, milling_bump_strength: 0.05f, dents_bump_strength: 0.02f, dents_scale: 1.0f, smudges_1_weight: 0.04f, smudges_2_weight: 0.05f, smudges_falloff: 0.0f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), uv_space_index: 0, roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false);
export material Stainless_Steel_Punched_Line(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Line Punch"), ::anno::description("Punched stainless steel"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Line.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "line", "gray"))]] = Stainless_Steel_Punched( // Punching parameters shape_select: pattern_line, punching_grid_size: float2(1.3f), cutout_size: 0.59f, cutout_roundness: 0.4f, cutout_bevel_width: 0.3f, cutout_bump_strength: 1.5f, hexagonal_grid: false, square_grid_offset: 0.3333f, horizontal_offset: true, // Material Parameters infinite_tiling: true, roughness: 0.3f, roughness_variation: 0.2f, cloudiness: 0.44f, brightness: 0.5f, milling_bump_strength: 0.05f, dents_bump_strength: 0.02f, dents_scale: 1.0f, smudges_1_weight: 0.04f, smudges_2_weight: 0.05f, smudges_falloff: 0.0f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), uv_space_index: 0, roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false);
export material Stainless_Steel_Punched_Cross(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Cross Punch"), ::anno::description("Punched stainless steel"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Cross.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "cross", "gray"))]] = Stainless_Steel_Punched( // Punching parameters shape_select: pattern_cross, punching_grid_size: float2(2.0f), cutout_size: 0.59f, cutout_roundness: 0.1f, cutout_bevel_width: 0.44f, cutout_bump_strength: 1.5f, hexagonal_grid: true, square_grid_offset: 0.0f, horizontal_offset: true, // Material Parameters infinite_tiling: true, roughness: 0.3f, roughness_variation: 0.2f, cloudiness: 0.44f, brightness: 0.5f, milling_bump_strength: 0.05f, dents_bump_strength: 0.02f, dents_scale: 1.0f, smudges_1_weight: 0.04f, smudges_2_weight: 0.05f, smudges_falloff: 0.0f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), uv_space_index: 0, roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false);
export material Stainless_Steel_Punched_Rhombus(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Rhombus Punch"), ::anno::description("Punched stainless steel"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Rhombus.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "rhombus", "gray"))]] = Stainless_Steel_Punched( // Punching parameters shape_select: pattern_rhombus, punching_grid_size: float2(1.4f), cutout_size: 1.0f, cutout_roundness: 0.8f, cutout_bevel_width: 0.5f, cutout_bump_strength: 1.5f, hexagonal_grid: true, square_grid_offset: 0.0f, horizontal_offset: true, // Material Parameters infinite_tiling: true, roughness: 0.3f, roughness_variation: 0.2f, cloudiness: 0.44f, brightness: 0.5f, milling_bump_strength: 0.05f, dents_bump_strength: 0.02f, dents_scale: 1.0f, smudges_1_weight: 0.04f, smudges_2_weight: 0.05f, smudges_falloff: 0.0f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), uv_space_index: 0, roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false);
export material Stainless_Steel_Punched_Triangle(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Triangle Punch"), ::anno::description("Punched stainless steel"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Triangle.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "triangle", "gray"))]] = Stainless_Steel_Punched( shape_select: pattern_triangle, punching_grid_size: float2(1.3f), cutout_size: 1.08f, cutout_roundness: 1.0f, cutout_bevel_width: 1.0f, cutout_bump_strength: 1.5f, hexagonal_grid: true, square_grid_offset: 0.0f, horizontal_offset: true, // Material Parameters infinite_tiling: true, roughness: 0.3f, roughness_variation: 0.2f, cloudiness: 0.44f, brightness: 0.5f, milling_bump_strength: 0.05f, dents_bump_strength: 0.02f, dents_scale: 1.0f, smudges_1_weight: 0.04f, smudges_2_weight: 0.05f, smudges_falloff: 0.0f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), uv_space_index: 0, roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false);
export material Stainless_Steel_Punched_Star(*)[[ ::anno::author("NVIDIA vMaterials"), ::anno::contributor("Rüdiger Raab"), ::anno::contributor("Maik Rohland"), ::anno::display_name("Stainless Steel - Star Punch"), ::anno::description("Punched stainless steel"), ::anno::copyright_notice(COPYRIGHT), ::anno::thumbnail("./.thumbs/Stainless_Steel.Stainless_Steel_Punched_Star.png"), ::anno::key_words(string[]("metal", "steel", "stainless", "design", "kitchen", "sanitary", "construction", "automotive", "architecture", "interior", "exterior", "decorative", "shiny", "reflective", "plain", "punched", "punching", "star", "gray"))]] = Stainless_Steel_Punched( shape_select: pattern_star, punching_grid_size: float2(1.5f), cutout_size: 0.68f, cutout_roundness: 0.5f, cutout_bevel_width: 0.44f, cutout_bump_strength: 1.5f, hexagonal_grid: true, square_grid_offset: 0.0f, horizontal_offset: true, // Material Parameters infinite_tiling: true, roughness: 0.3f, roughness_variation: 0.2f, cloudiness: 0.44f, brightness: 0.5f, milling_bump_strength: 0.05f, dents_bump_strength: 0.02f, dents_scale: 1.0f, smudges_1_weight: 0.04f, smudges_2_weight: 0.05f, smudges_falloff: 0.0f, smudges_scale: 1.0f, texture_translate: float2(0.0f), texture_rotate: 0.0f, texture_scale: float2(1.0f), uv_space_index: 0, roundcorners_enable: false, roundcorners_radius_mm: 0.5f, roundcorners_across_materials: false);
12345678910111213141516171819202122232425262728293031// Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
// adjusted to be alittle darker, not harsh white, changed name to Whitemode
mdl 1.5;
import ::anno::*;
import ::df::diffuse_reflection_bsdf;
import ::state::normal;
export material WhiteMode(
color diffuse_color_constant = color(.99f)
[[
anno::display_name("Base Color"),
anno::description("This is the base color")
]]
)
=
let {
material_surface surface(
::df::diffuse_reflection_bsdf(diffuse_color_constant));
} in material(
thin_walled: false,
surface: surface);123version https://git-lfs.github.com/spec/v1oid sha256:de1b1fd5334e8fc240b4740a8f48d730caccedd7b298b403eb7d760e14e4f2bbsize 9825840123version https://git-lfs.github.com/spec/v1oid sha256:a7d9d20f785355a3775010f3c6f8d54b7142a907b0fad80b1f5db29c2255e2d7size 7316265.gitattributes+3
ACS_8000/.metadata/ACS_8000_benchmark.jsonAdded+510
ACS_8000/.metadata/ACS_8000_validation.jsonAdded+62
ACS_8000/.metadata/com.nvidia.simready.conformance.Package@1.0.0.jsonAdded+35
ACS_8000/.metadata/com.nvidia.simready.packaging.bom.jsonAdded+231
ACS_8000/com.nvidia.simready.packaging.jsonAdded+31
ACS_8000/simready_usd/.simready/validation.jsonAdded+60
ACS_8000/simready_usd/.thumbs/256x256/ACS_8000_main.usd.pngAdded
Large File Pointer Details
- SHA256: 4911a28d6654375497c475cc460522caf425db13cadd355714bed3068095f27a
- Pointer size: 131 Bytes
- Size of remote file: 599 kB
ACS_8000/simready_usd/.thumbs/256x256/ACS_8000_main.usd_light.pngAdded
Large File Pointer Details
- SHA256: 4ff4791468adec8f066e928a1d9e3b91ca46412924c5b62404f9021a2fadc9af
- Pointer size: 131 Bytes
- Size of remote file: 365 kB
ACS_8000/simready_usd/.thumbs/256x256/ACS_8000_main.usd_transparent.pngAdded
Large File Pointer Details
- SHA256: 6566efe889fc424e479c119d29e56c6f6ef7a23117edb739636c7522911e33a1
- Pointer size: 131 Bytes
- Size of remote file: 268 kB
ACS_8000/simready_usd/ACS_8000_main.jsonAdded+17
ACS_8000/simready_usd/ACS_8000_main.usdAdded+3
ACS_8000/simready_usd/layers/ACS_8000_ConnectionPoints.usdaAdded+45
ACS_8000/simready_usd/layers/ACS_8000__Properties.jsonAdded+243
ACS_8000/simready_usd/layers/ACS_8000__Properties.usdaAdded+469
ACS_8000/simready_usd/materials/Aging_Copper.mdlAdded
ACS_8000/simready_usd/materials/Carpaint_Solid.mdlAdded+1112
ACS_8000/simready_usd/materials/OmniPBR.mdlAdded+396
ACS_8000/simready_usd/materials/OmniPBRBase.mdlAdded+470
ACS_8000/simready_usd/materials/OmniPBR_ClearCoat.mdlAdded+711
ACS_8000/simready_usd/materials/OmniPBR_ClearCoat_Opacity.mdlAdded+860
ACS_8000/simready_usd/materials/OmniPBR_Opacity.mdlAdded+404
ACS_8000/simready_usd/materials/Plastic_Thick_Translucent.mdlAdded+673
ACS_8000/simready_usd/materials/Stainless_Steel.mdlAdded+1543
ACS_8000/simready_usd/materials/Stainless_Steel_Brushed.mdlAdded
ACS_8000/simready_usd/materials/WhiteMode.mdlAdded+31
ACS_8000/simready_usd/payloads/external.usdAdded+3
ACS_8000/simready_usd/payloads/internal.usdAdded+3
ACS_8000/simready_usd/textures/ACS8000_inverted.pngAdded

Large File Pointer Details
- SHA256: 211c3d6cdd1bd0628d97010b5cf7f1c67c33e418ba6269c08273205611d0c506
- Pointer size: 129 Bytes
- Size of remote file: 6.79 kB
ACS_8000/simready_usd/textures/ACS8000_inverted_01.pngAdded

Large File Pointer Details
- SHA256: 956166c4ed52dc93fcf5f231062a5e4f8e59bbbc5f0f0c771f3ae0a1f7f8dcdd
- Pointer size: 130 Bytes
- Size of remote file: 19 kB
ACS_8000/simready_usd/textures/ACS8000_inverted_02.pngAdded

Large File Pointer Details
- SHA256: f2bc05523ec9f029108825c45959ce73ba3c6a2615b9cd2224b7669e4262309a
- Pointer size: 130 Bytes
- Size of remote file: 32.9 kB
ACS_8000/simready_usd/textures/ACS8000_inverted_03.pngAdded

Large File Pointer Details
- SHA256: 115406f305f04ebe495808d45166cba1bd251610b2e1ae62c5a516edc271da2b
- Pointer size: 129 Bytes
- Size of remote file: 6.35 kB
ACS_8000/simready_usd/textures/ACS8000_inverted_ACS.pngAdded

Large File Pointer Details
- SHA256: 170a5464140f2c1d8a9f38e2c1132f21b6b7c3fc9b04a6556e22f868aec6b4d3
- Pointer size: 130 Bytes
- Size of remote file: 25.1 kB
ACS_8000/simready_usd/textures/ACS8000_inverted_Logo.pngAdded

Large File Pointer Details
- SHA256: 8b176a41cccdb511582aa563a73bace104d11ca6da88cfc452470c71bcde898a
- Pointer size: 130 Bytes
- Size of remote file: 37 kB