diff --git a/.gitattributes b/.gitattributes index 6bfd2812a271fd17b70b8bee190b721b21cb5235..9e7afa0f7a6abe54c50791fd291cea05279a44d5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -232,3 +232,16 @@ universalrobots_ur3/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text universalrobots_ur30/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text universalrobots_ur3e/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text universalrobots_ur5/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd filter=lfs diff=lfs merge=lfs -text +universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd filter=lfs diff=lfs merge=lfs -text +universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd filter=lfs diff=lfs merge=lfs -text +universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd filter=lfs diff=lfs merge=lfs -text +universalrobots_ur5e/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd filter=lfs diff=lfs merge=lfs -text +universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd filter=lfs diff=lfs merge=lfs -text +universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd filter=lfs diff=lfs merge=lfs -text +universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd filter=lfs diff=lfs merge=lfs -text +universalrobots_ur7e/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +yahboom_dofbot/dofbot.usda filter=lfs diff=lfs merge=lfs -text +yahboom_dofbot/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +yaskawa_motoman_next_nex10/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text diff --git a/universalrobots_ur5e/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/universalrobots_ur5e/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..95d47689540d667c192770686f1c1ee4932f903f --- /dev/null +++ b/universalrobots_ur5e/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json @@ -0,0 +1,35 @@ +{ + "format_version": "1.0", + "profile": "Package-Candidate", + "profile_version": "1.0.0", + "timestamp": "2026-10-23T23:04:34", + "assets": [ + { + "asset": "ur5e.usda", + "features": [ + { + "FET_031_STANDARD": { + "version": "0.1.0", + "passed": true, + "failing_requirements": [], + "dependencies": [] + } + }, + { + "FET_033_STANDARD": { + "version": "0.1.0", + "passed": true, + "failing_requirements": [], + "dependencies": [ + { + "FET_031_STANDARD": { + "version": "0.1.0" + } + } + ] + } + } + ] + } + ] +} diff --git a/universalrobots_ur5e/.metadata/com.nvidia.simready.packaging.bom.json b/universalrobots_ur5e/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..db4ee6e54c16a770a6e58d173e8df0d53ba769f8 --- /dev/null +++ b/universalrobots_ur5e/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,327 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7545, + "hash": { + "sha256-flat-1mb": "6ba959657ebe5029b98529867c7946e518e08513360f7be7a38ee3c7f055377b", + "sha256": "a8689352e668e642b8c43cba339b0c0270a5ce45b614cf83dcf1370b4efd7c56" + } + }, + { + "relative_path": ".thumbs/256x256/.ur5e.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "93ec8ac475aae745f33af8c660346d7fe0eb5c522bfb00704731e25f6f91a0f5", + "sha256": "fa2c088f7556a6e0244d21dea1f8eba252a8545dcd72893293e50fddda571048" + } + }, + { + "relative_path": ".thumbs/256x256/ur5e.usda.png", + "size": 44686, + "hash": { + "sha256-flat-1mb": "6e58dd3c2929e29fc5fade0a510b7c1f60f9a8426d6b0e483084883e37361165", + "sha256": "8306cde91bcda412c48b2455f316346e376eb5201bfedb172dca2a5558ef7ed1" + } + }, + { + "relative_path": ".thumbs/ur5e.thumb.usd", + "size": 6121, + "hash": { + "sha256-flat-1mb": "ad2f448c25b429f9b08219bf06527d19729dde74d376f107f53fe14d79265cd6", + "sha256": "293a67b005a68b1845855af2ef840a1c350aa1e91ed52a8102328f3088bc0341" + } + }, + { + "relative_path": "materials/mdl/LICENSE.md", + "size": 3220, + "hash": { + "sha256-flat-1mb": "d54635995b7794c6549d0f7c70586e739c1e24cb671ce966e64a8c1a6703a452", + "sha256": "d62e1bd5e34d0ca6f92f0e9f10670ee0cd586695e20f0a838a8f859119589683" + } + }, + { + "relative_path": "materials/mdl/OmniPBR.mdl", + "size": 13969, + "hash": { + "sha256-flat-1mb": "1c58f77068df165a71676dfde42a4b7e4932a82cacacfc7a205ae94fc0332aaf", + "sha256": "c902cc38dc97ff6a89fe94dca94edfb523a30e3749d3708610a136867c3357bf" + } + }, + { + "relative_path": "materials/mdl/OmniPBRBase.mdl", + "size": 17274, + "hash": { + "sha256-flat-1mb": "4b54e7fb8bc92191512851b3acc6fc6fa9863f80d98ffece8f0cb9b99f5f4535", + "sha256": "701f37299b44106842bdbe025de52eedec391e35b038f61c4ed4d25bd98e7db1" + } + }, + { + "relative_path": "materials/mdl/OmniPBR_ClearCoat.mdl", + "size": 27433, + "hash": { + "sha256-flat-1mb": "b1f146a3767a5012936e3d246f2697c3536c2f72b5c5963d3bca0998d02f8931", + "sha256": "085ba661b49042570e24cda09c939e5aebf312ae332af92744a99bd3abbfbee4" + } + }, + { + "relative_path": "materials/mdl/aux_definitions.mdl", + "size": 101769, + "hash": { + "sha256-flat-1mb": "6a5ffcb49e18ade213c3a4d79cf171d66612f9eee045074a0b937dbe4cf01ef6", + "sha256": "ebb81c8977aeb30790399ec7aaa7f2f76cb23afb434f56201ef152aba45a6e81" + } + }, + { + "relative_path": "materials/mdl/core_definitions.mdl", + "size": 201537, + "hash": { + "sha256-flat-1mb": "54bdc55e3899f126b1e271eef4de9c5966b1390fb3143872846f29f0ca68378d", + "sha256": "052aec260e8dfef5d671545fc2fc28c0c478a5b043041c65a833b2a6d81bf950" + } + }, + { + "relative_path": "materials/mdl/support_definitions.mdl", + "size": 147454, + "hash": { + "sha256-flat-1mb": "2b93c649c03f3ef48fb24cc6baba953df1f9dd4e7e860719bc3322fc3e789aba", + "sha256": "bb372f21b6e81d293b99fea6819a8309e2c33c732c7151752b4b33dade177f2e" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_Finger1step_JFT.usd", + "size": 78260, + "hash": { + "sha256-flat-1mb": "b5bb107aba831bdf3f516b50e41ff0b2b7568a758d565add949a667ca03e66ec", + "sha256": "8807edf2d1568889779e6da5cd89b97d7230311ad167755a791ff7034610f1d2" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd", + "size": 3373601, + "hash": { + "sha256-flat-1mb": "bceba3bb0779bfb158536826aaf2f6ba98ce75b493ab3261a9b63b87ca6f8a2d", + "sha256": "b849add675a959bf108b04281a4283632388698d82b34ab5c4ec9d42dcf8f4c1", + "sha256-first1m": "f2861d776cf587d47746c9073c826169267b5067194eb4b2b6c9987557b4d5e4" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd", + "size": 230495, + "hash": { + "sha256-flat-1mb": "d64c245fdc66207d7a968a13ba72d0288bd46d93d9fb5b569e154925e1bab8e6", + "sha256": "865e828faa230a75c97016c1cc647ce236db6a3d84199c109923287cb5ef683c" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd", + "size": 143957, + "hash": { + "sha256-flat-1mb": "a4264af7734c8b8adbd6133f78208392098e816830ca737184f12bafd75851a2", + "sha256": "3922f86499bd9b399182dca876a0e4295780a33b611267988d6a4570237ba11b" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd", + "size": 136079, + "hash": { + "sha256-flat-1mb": "e560e9106c162743200b2dd534b3e55051bc9a9c003fde00689c2bd2d5ee5d85", + "sha256": "1ea3296bde39458b1dd01323d391115e6d6535065247df6c4d2108ee7f44f1ea" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_fingertipsstep_JFD.usd", + "size": 43439, + "hash": { + "sha256-flat-1mb": "136b847081926f25fe07a2182ac485f2e793fa81e835e431ddef8d7afcebf142", + "sha256": "72de83fb98d4e677ff303f253ccd13d6ef7f8ce2485e5dc0b41dd600c7502506" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Robotiq_2F_85_base.usda", + "size": 13422, + "hash": { + "sha256-flat-1mb": "15360e29a232bd8a68f78eb983c32aa9a4be4f99ee0b8f3b2b7ece12735dbd08", + "sha256": "0fe4fe5b3da2a45baf7bfc8a35c93bcf30243f160fc53f4bf3050fc2466631d0" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Robotiq_2F_85_edit.usd", + "size": 8132, + "hash": { + "sha256-flat-1mb": "f862a1b91d855edfa12222b107f7352ad254c3d06fdd169fa05d745353e2b3d4", + "sha256": "801358a61becc95f8c8af7ac6b22140383782fc14a32a4a41691a3be482396b0" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_loop.usda", + "size": 12923, + "hash": { + "sha256-flat-1mb": "3eb472a3aed84fec2c7bea1120f1a511fb8d8b254986ffb1e502141ef6ed4bbb", + "sha256": "728cd15ca08b500a52ceb012240d203cefe81739054d5a54f18d52d05110bbb0" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_mimic.usda", + "size": 13266, + "hash": { + "sha256-flat-1mb": "d58848e647600a0f4cd398c2c370c10fbea481f26b6d4136a8db44ce5032fac8", + "sha256": "96da1b55f7f9ff2c3e6e840633d627c4820634caffac5e99512ba4b10d0b4f71" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Robotiq_2F_85_robot.usd", + "size": 3776, + "hash": { + "sha256-flat-1mb": "ad59f3ddaeefbdd1f18d616c95166812b016e519da47f8275fa15aedb8e67d85", + "sha256": "97858ffd93e4209d3ec020fa64043dfc7ed82df95d3da584d84033e43e5d6414" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/materials.usd", + "size": 4830, + "hash": { + "sha256-flat-1mb": "3e63d6ecf7ac5e2a0ebb7dfa1a68fd39540838ee99703f1a0aa0c6ec298a930e", + "sha256": "d34144f42f980ea2fad091bb6c1fbf8dd64d40149d526dd999c5b4f0c31691e0" + } + }, + { + "relative_path": "payloads/Gripper/none.usda", + "size": 168, + "hash": { + "sha256-flat-1mb": "8290b709c447579a84d06e15f2173b8c22ec10da3167ffa4f83e03fefa60c9e3", + "sha256": "13fe805083d8cb2a75a8dbc55d00c839dc79d091c0a55b4d0cf9c04b40413b52" + } + }, + { + "relative_path": "payloads/Gripper/robotiq_2f_85.usda", + "size": 699, + "hash": { + "sha256-flat-1mb": "6159c8f280ebe1f5c773614a7575d0af4bfc2aca43d775574a3d783e57e2704e", + "sha256": "ca7f16d3e8f79e29298be0e5889278f89a0c3f10112110a2998b4935b8f3f8af" + } + }, + { + "relative_path": "payloads/Physics/mujoco.usda", + "size": 3084, + "hash": { + "sha256-flat-1mb": "68879696e7fa14f0c106a70ea0c5f1cbace693d87bd64323429fb166cefb3055", + "sha256": "e9036ede4bc3de09d1d8c5ac3f7f6b08a14265f1073b64bd3855a53b8a47091e" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 168, + "hash": { + "sha256-flat-1mb": "8290b709c447579a84d06e15f2173b8c22ec10da3167ffa4f83e03fefa60c9e3", + "sha256": "13fe805083d8cb2a75a8dbc55d00c839dc79d091c0a55b4d0cf9c04b40413b52" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 12376, + "hash": { + "sha256-flat-1mb": "793fe0ffcc605d961287e8a0fb22f23a0bb8acef6d09a286bf3769cd3ada8391", + "sha256": "b65baeff370e8ae6a8208a9355f342348644bd5f90e3a40ef248c0ab59f9b780" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 1526, + "hash": { + "sha256-flat-1mb": "0817c181169d9a1f4a09a56eb76c6d4346a152df7dc5ef539061f3a3987dc697", + "sha256": "6e5c2c0bbca7374d1031c45d38ebbfb6677fefe6a5527bab652db81a8a4d651a" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 168, + "hash": { + "sha256-flat-1mb": "8290b709c447579a84d06e15f2173b8c22ec10da3167ffa4f83e03fefa60c9e3", + "sha256": "13fe805083d8cb2a75a8dbc55d00c839dc79d091c0a55b4d0cf9c04b40413b52" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 188, + "hash": { + "sha256-flat-1mb": "743e857453522d68328bf78f147e35261e8a42312c0c2a1ad4cf8cf34acf14be", + "sha256": "491d1ce99286d559b2b499990e4ddb610c511c9a586d2d6ae85c9c27f7f36be5" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 13216, + "hash": { + "sha256-flat-1mb": "ac3d9d286d7505e3f9859e1fb82237c040fba29c9cf67dee32d8fc809fe7861c", + "sha256": "54a34a8be65a531acb8c4759b25069a2db9781f511f4d9221a1e1a464939ca4d" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 9321381, + "hash": { + "sha256-flat-1mb": "7c8c022f916ad859317badf280e656df5b9efa6eaa2c203631b66ac26c540d05", + "sha256": "34692050bf417a8848956718fd1b79a0393d86de0ca28b051f260f26d91c4391", + "sha256-first1m": "09be516f56927dac9e26dbaf98b0f0d8552330531514df0d349b8286dd86306f" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 37762, + "hash": { + "sha256-flat-1mb": "91cc54f89b6fb11c663463b432726ff8156ffb8d893d9fe0b2e180822c6b3332", + "sha256": "63d3ae004cfc21104735349919742774818d30a7616fe7d04fca98152809c4db" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 28997, + "hash": { + "sha256-flat-1mb": "d4426a219937807c5c134dc13a7cc4121973d45b87f2c32cb8cc2db73f0daf81", + "sha256": "80b7d508071ddb5cb55319615a8b90ba2169fadddc5c764728ae3023f1fc889e" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 6974, + "hash": { + "sha256-flat-1mb": "bb8d186a4b2b6d6a0bae0e53cb1e7bb8ae9bc5b31b7726adc5c04a046b3e7754", + "sha256": "249a1b2ae1d33eb1a14d628b8c7b6eee8beb84d0a90747fa9a84c9be92648543" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 8366, + "hash": { + "sha256-flat-1mb": "088694259e3e2442be06ebf4fdcd4fb052135eb5133d3bd9df853260bbf94afe", + "sha256": "f406e0eb17ed921bec97ddd80c3724b1503df0c2b00ef67f7090acd32efb5eba" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 5059, + "hash": { + "sha256-flat-1mb": "dcd1bbae6c23f4afa88576964dab35cfc6f2df0b5cc164eb86d1f27cfbe86a9c", + "sha256": "86c3e66596ede10db0d0f15f5766910bdc74833d90fda36bc811f8d839afbe61" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 6154, + "hash": { + "sha256-flat-1mb": "07843db8b2a265c360717f6c35a7608cd85d540c4856e7a793af43bd99e11975", + "sha256": "152ece9eea6f3e01a16454b6f3bed6f1c8c9de5f3bc38fe50720397e780eb774" + } + }, + { + "relative_path": "ur5e.usda", + "size": 16386, + "hash": { + "sha256-flat-1mb": "fd38ba8b15b05eb32ee6a178619a25cc354081fe6711521bebc2f90fb2083016", + "sha256": "b531d33081f3e3e3b5fa51b0aef3eef353829dcfcf050dca8d90bf77f5262246" + } + } + ] +} \ No newline at end of file diff --git a/universalrobots_ur5e/.metadata/com.nvidia.simready.root_usds.json b/universalrobots_ur5e/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..162e3ea2429c8b1e273e59dcf8556d8e42f6cdbe --- /dev/null +++ b/universalrobots_ur5e/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "ur5e.usda" + ] +} diff --git a/universalrobots_ur5e/.metadata/license.txt b/universalrobots_ur5e/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..574ef07902908574cba9a471d7e5eb0b684691e4 --- /dev/null +++ b/universalrobots_ur5e/.metadata/license.txt @@ -0,0 +1,25 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/universalrobots_ur5e/.simready/validation.json b/universalrobots_ur5e/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..c6ab69b310886bd9bc5b35c3d6f829fb7cbecc45 --- /dev/null +++ b/universalrobots_ur5e/.simready/validation.json @@ -0,0 +1,223 @@ +{ + "SimReady_Metadata": { + "validation": { + "profile": "Robot-Body", + "profile_version": "3.0.0", + "validated_features": { + "2026-10-20": { + "CAP000_Core.Isaac.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.PhysX.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP003_RigidBody.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP004_Multibody.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP003_RigidBody.MuJoCo.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP004_Multibody.RobotMuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP021_RobotCore.Isaac.0-3-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-3-0" + }, + "CAP022_DrivenJoints.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP004_Multibody.RobotMuJoCo.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP023_RobotMaterials.Isaac.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.PhysX.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP025_RosBridge.Ros.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "optional requirements": "['com.nvidia.simready.ROS.001']", + "passed": false, + "version": "0-1-0" + }, + "CAP031_SelfContainedPackage.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP033_SimReadyPackage.OpenUSD.0-4-0": { + "blocking_failure": false, + "dependencies": "['CAP031_SelfContainedPackage.OpenUSD.0-1-0']", + "passed": true, + "version": "0-4-0" + }, + "CAP100_IsaacComposition.Isaac.0-3-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-3-0" + }, + "FET001_MinimalPlaceableVisual.OpenUSD.1-0-1": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "1-0-1" + }, + "FET003_RigidBody.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET003_RigidBody.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET003_RigidBody.PhysX.0-4-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-4-0" + }, + "FET004_Multibody.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.Newton.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "FET004_Multibody.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.OpenUSD.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET004_Multibody.PhysX.0-4-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.PhysX.0-4-0']", + "passed": true, + "version": "0-4-0" + }, + "FET004_Multibody.RobotNewton.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET006_Materials.MDL.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET006_Materials.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET006_Materials.Openpbr.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET010_DisplayColor.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET022_DrivenJoints.Isaac.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET022_DrivenJoints.PhysX.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET022_DrivenJoints.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.RobotNewton.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "FET022_DrivenJoints.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.OpenUSD.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET022_DrivenJoints.PhysX.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.PhysX.0-4-0']", + "passed": true, + "version": "0-2-0" + } + } + } + } + } +} diff --git a/universalrobots_ur5e/.thumbs/256x256/.ur5e.usda.last_generated b/universalrobots_ur5e/.thumbs/256x256/.ur5e.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..4265c81f162d457c31da7d08d06530f59aafcec6 --- /dev/null +++ b/universalrobots_ur5e/.thumbs/256x256/.ur5e.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:48:43 \ No newline at end of file diff --git a/universalrobots_ur5e/.thumbs/256x256/ur5e.usda.png b/universalrobots_ur5e/.thumbs/256x256/ur5e.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..b91c1167fcf1f0c20ed83ccb5af5c314c0199c31 --- /dev/null +++ b/universalrobots_ur5e/.thumbs/256x256/ur5e.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8306cde91bcda412c48b2455f316346e376eb5201bfedb172dca2a5558ef7ed1 +size 44686 diff --git a/universalrobots_ur5e/.thumbs/ur5e.thumb.usd b/universalrobots_ur5e/.thumbs/ur5e.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..fd472ac520f448aaa949e93ce4e83b384dabe812 Binary files /dev/null and b/universalrobots_ur5e/.thumbs/ur5e.thumb.usd differ diff --git a/universalrobots_ur5e/com.nvidia.simready.packaging.json b/universalrobots_ur5e/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..b1504cc33d3a5eaabc93dfa2a9f5c785a261210f --- /dev/null +++ b/universalrobots_ur5e/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "universalrobots_ur5e.1.0.0", + "license": "BSD-3-Clause", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "d780761b29efef8f6950102cc3ebff8e4c20b6576bb8720d9fde88a6487abab2" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "d9ba43dcec8a1d71dd632dc78a951aa9f18d8a2dabc12e982c4d9e98aa820bb7" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "56143ca4bf07b53d922920608a6d1bc508fc3947b433673424613a72334b4ada" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "143077f9f6a8de5a99f78c2c2472801fb53cf240277ef661642f079b9acdfff8" + } + } + ], + "content_hash": { + "sha256": "fee68458025275a14d988ef88889681ec86237abe2c7d6d6d83dd7c74b468338" + }, + "package_hash": { + "sha256": "f5fb6dda6804b3945807573b6b8e8d357a46ee4531d58b15359d5a92276e01f0" + } +} diff --git a/universalrobots_ur5e/materials/mdl/LICENSE.md b/universalrobots_ur5e/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/universalrobots_ur5e/materials/mdl/LICENSE.md @@ -0,0 +1,73 @@ +# NVIDIA Omniverse Core Materials Licenses + +## Primary License +This project is primarily licensed under the BSD-3-Clause License. + +``` +Copyright (c) 1986-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + +## Third-Party Licenses + +### Apache License 2.0 +The following components are licensed under the Apache License 2.0: + +#### MaterialX Components +Files in `/source/mdl/materialx` are licensed under Apache License 2.0 per the MaterialX project: +https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/LICENSE + +``` +Copyright Contributors to the MaterialX Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` + +## SPDX License Identifiers +Files in this project use the following SPDX license identifiers: +- `SPDX-License-Identifier: BSD-3-Clause` - Used for NVIDIA-owned code +- `SPDX-License-Identifier: Apache-2.0` - Used for MaterialX components + +## License Attribution +This project contains code from multiple sources: +1. NVIDIA Corporation (BSD-3-Clause) - Primary codebase +2. Academy Software Foundation (Apache-2.0) - MaterialX components + +## License Scope +- All files in the project are licensed under BSD-3-Clause unless explicitly stated otherwise +- Files in `/source/mdl/materialx` are licensed under Apache-2.0 +- All other files are licensed under BSD-3-Clause \ No newline at end of file diff --git a/universalrobots_ur5e/materials/mdl/OmniPBR.mdl b/universalrobots_ur5e/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/universalrobots_ur5e/materials/mdl/OmniPBR.mdl @@ -0,0 +1,396 @@ +/* + * 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 core_definitions::file_texture; +import 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 +); diff --git a/universalrobots_ur5e/materials/mdl/OmniPBRBase.mdl b/universalrobots_ur5e/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/universalrobots_ur5e/materials/mdl/OmniPBRBase.mdl @@ -0,0 +1,470 @@ +/* + * 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 +); diff --git a/universalrobots_ur5e/materials/mdl/OmniPBR_ClearCoat.mdl b/universalrobots_ur5e/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/universalrobots_ur5e/materials/mdl/OmniPBR_ClearCoat.mdl @@ -0,0 +1,711 @@ +/* + * 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 core_definitions::file_texture; +import 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 +); diff --git a/universalrobots_ur5e/materials/mdl/aux_definitions.mdl b/universalrobots_ur5e/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/universalrobots_ur5e/materials/mdl/aux_definitions.mdl @@ -0,0 +1,3464 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + + +mdl 1.4; + +import ::anno::*; +export using ::base import texture_return; + +module +[[ + anno::version( 1, 2, 0), + anno::hidden(), + anno::display_name("NVIDIA auxillary definitions") +]]; + +// Support functions to simplify conversions between vector types with swizzles +// Supported argument types: float2, float3, float4, color, texture_return (as RGB and RGBA) +// Supported return types: float, float2, float3 color + + +export annotation icon(string path); + + +//*********************************************************************************************************************** +// Constructor wrappers + +export float construct_float( + texture_return a [[ + anno::description("Input texture sample container; the mono channel is returned.") + ]]) +[[ + anno::display_name("Float from texture_return"), + anno::description("Constructs a float from the mono channel of a texture_return value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float"), + icon(".icons/constructor.svg"), + anno::ui_order(10000) +]] +{ return a.mono; } + +export color construct_color( + float a [[ + anno::description("Scalar value replicated into all color channels.") + ]]) +[[ + anno::display_name("Color from float"), + anno::description("Constructs a color from a single float value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10001) +]] +{ return color(a); } + +export color construct_color( + float3 a [[ + anno::description("RGB source components.") + ]]) +[[ + anno::display_name("Color from float3"), + anno::description("Constructs a color from a float3 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10002) +]] +{ return color(a); } + +export color construct_color( + float r [[ + anno::description("Red channel value.") + ]], + float g [[ + anno::description("Green channel value.") + ]], + float b [[ + anno::description("Blue channel value.") + ]]) +[[ + anno::display_name("Color from floats"), + anno::description("Constructs a color from explicit red, green, and blue components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10003) +]] +{ return color(r,g,b); } + +export color construct_color( + texture_return a [[ + anno::description("Input texture sample container; the tint (RGB) channels are returned.") + ]]) +[[ + anno::display_name("Color from texture_return"), + anno::description("Constructs a color from the tint (RGB) channels of a texture_return value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10004) +]] +{ return a.tint; } + +export float4 construct_float4( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]], + float z [[ + anno::description("Z component value.") + ]], + float w [[ + anno::description("W component value.") + ]]) +[[ + anno::display_name("Float4 from floats"), + anno::description("Constructs a float4 from explicit x, y, z, and w components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float4"), + icon(".icons/constructor.svg"), + anno::ui_order(10005) +]] +{ return float4(x,y,z,w); } + +export float4 construct_float4( + float3 xyz [[ + anno::description("Source xyz components.") + ]], + float w [[ + anno::description("W component value.") + ]]) +[[ + anno::display_name("Float4 from float3,float"), + anno::description("Constructs a float4 from a float3 xyz value and a separate w component."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float4"), + icon(".icons/constructor.svg"), + anno::ui_order(10006) +]] +{ return float4(xyz.x,xyz.y,xyz.z,w); } + +export float3 construct_float3( + color a [[ + anno::description("Input color whose RGB channels are converted to float3.") + ]]) +[[ + anno::display_name("Float3 from color"), + anno::description("Constructs a float3 from a color value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10007) +]] +{ return float3(a); } + +export float3 construct_float3( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]], + float z [[ + anno::description("Z component value.") + ]]) +[[ + anno::display_name("Float3 from floats"), + anno::description("Constructs a float3 from explicit x, y, and z components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10008) +]] +{ return float3(x,y,z); } + +export float3 construct_float3( + int3 a [[ + anno::description("Input int3 converted component-wise to float3.") + ]]) +[[ + anno::display_name("Float3 from int3"), + anno::description("Constructs a float3 from an int3 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10009) +]] +{ return float3(a); } + +export float2 construct_float2( + float a [[ + anno::description("Scalar value replicated into both components.") + ]]) +[[ + anno::display_name("Float2 from float"), + anno::description("Constructs a float2 from a single float value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10010) +]] +{ return float2(a); } + +export float2 construct_float2( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]]) +[[ + anno::display_name("Float2 from floats"), + anno::description("Constructs a float2 from explicit x and y components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10011) +]] +{ return float2(x,y); } + +export float2 construct_float2( + int2 a [[ + anno::description("Input int2 converted component-wise to float2.") + ]]) +[[ + anno::display_name("Float2 from int2"), + anno::description("Constructs a float2 from an int2 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10012) +]] +{ return float2(a); } + +export int3 construct_int3( + int a [[ + anno::description("Scalar value replicated into all int3 components.") + ]]) +[[ + anno::display_name("Int3 from int"), + anno::description("Constructs an int3 from a single int value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Int3"), + icon(".icons/constructor.svg"), + anno::ui_order(10013) +]] +{ return int3(a); } + +export int2 construct_int2( + int a [[ + anno::description("Scalar value replicated into both int2 components.") + ]]) +[[ + anno::display_name("Int2 from int"), + anno::description("Constructs an int2 from a single int value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Int2"), + icon(".icons/constructor.svg"), + anno::ui_order(10014) +]] +{ return int2(a); } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float return type + +export float x( float2 a) +[[ + anno::display_name("X from float2"), + anno::description("Returns x from float2."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11000) +]] +{ return a.x; } + +export float y( float2 a) +[[ + anno::display_name("Y from float2"), + anno::description("Returns y from float2."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11010) +]] +{ return a.y; } + +export float x( float3 a) +[[ + anno::display_name("X from float3"), + anno::description("Returns x from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11001) +]] +{ return a.x; } + +export float y( float3 a) +[[ + anno::display_name("Y from float3"), + anno::description("Returns y from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11011) +]] +{ return a.y; } + +export float z( float3 a) +[[ + anno::display_name("Z from float3"), + anno::description("Returns z from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Z"), + icon(".icons/component_extract.svg"), + anno::ui_order(11020) +]] +{ return a.z; } + +export float x( float4 a) +[[ + anno::display_name("X from float4"), + anno::description("Returns x from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11002) +]] +{ return a.x; } + +export float y( float4 a) +[[ + anno::display_name("Y from float4"), + anno::description("Returns y from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11012) +]] +{ return a.y; } + +export float z( float4 a) +[[ + anno::display_name("Z from float4"), + anno::description("Returns z from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Z"), + icon(".icons/component_extract.svg"), + anno::ui_order(11021) +]] +{ return a.z; } + +export float w( float4 a) +[[ + anno::display_name("W from float4"), + anno::description("Returns w from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "W"), + icon(".icons/component_extract.svg"), + anno::ui_order(11025) +]] +{ return a.w; } + +export float x( color a) +[[ + anno::display_name("R from color"), + anno::description("Returns r from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "R"), + icon(".icons/component_extract.svg"), + anno::ui_order(11003) +]] +{ return x( float3(a)); } + +export float y( color a) +[[ + anno::display_name("G from color"), + anno::description("Returns g from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "G"), + icon(".icons/component_extract.svg"), + anno::ui_order(11013) +]] +{ return y( float3(a)); } + +export float z( color a) +[[ + anno::display_name("B from color"), + anno::description("Returns b from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "B"), + icon(".icons/component_extract.svg"), + anno::ui_order(11021) +]] +{ return z( float3(a)); } + +export float x( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("R from texture_return"), + anno::description("Returns r from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "R"), + icon(".icons/component_extract.svg"), + anno::ui_order(11004) +]] +{ return float3( a.tint).x; } + +export float y( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("G from texture_return"), + anno::description("Returns g from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "G"), + icon(".icons/component_extract.svg"), + anno::ui_order(11014) +]] +{ return float3( a.tint).y; } + +export float z( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("B from texture_return"), + anno::description("Returns b from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "B"), + icon(".icons/component_extract.svg"), + anno::ui_order(11022) +]] +{ return float3( a.tint).z; } + +export float w( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("Mono from texture_return"), + anno::description("Returns mono/alpha from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "W"), + icon(".icons/component_extract.svg"), + anno::ui_order(11026) +]] +{ return a.mono; } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Conversions of texture_return +// All are hidden +export float4 texture_return_float4( + texture_return a [[ + anno::description("Input texture sample container to unpack as float4 (r, g, b, mono).") + ]]) +[[ + anno::display_name("float4 from texture_return"), + anno::description("Converts texture_return to float4 using tint RGB and mono as W."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float4"), + icon(".icons/component_extract.svg"), + anno::ui_order(10108) +]] +{ return float4(x(a),y(a),z(a),w(a)); } + +export float3 texture_return_float3( + texture_return a [[ + anno::description("Input texture sample container to unpack as float3 (r, g, b).") + ]]) +[[ + anno::display_name("float3 from texture_return"), + anno::description("Converts texture_return to float3 using the tint RGB channels."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + icon(".icons/component_extract.svg"), + anno::ui_order(10109) +]] +{ return float3(x(a),y(a),z(a)); } + +export color texture_return_color( + texture_return a [[ + anno::description("Input texture sample container; tint RGB is returned as color.") + ]]) +[[ + anno::display_name("color from texture_return"), + anno::description("Converts texture_return to color using the tint RGB channels."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Color"), + icon(".icons/component_extract.svg"), + anno::ui_order(10110) +]] +{ return a.tint; } + +export float texture_return_float( + texture_return a [[ + anno::description("Input texture sample container; mono channel is returned.") + ]]) +[[ + anno::display_name("float from texture_return"), + anno::description("Converts texture_return to float using the mono channel."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float"), + icon(".icons/component_extract.svg"), + anno::ui_order(10111) +]] +{ return a.mono; } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float2 return type + +export float2 xy( float2 a) +[[ + anno::display_name("XY from float2"), + anno::description("Returns float2(x,y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11040) +]] +{ return float2( a.x, a.y); } + +export float2 xy( float3 a) +[[ + anno::display_name("XY from float3"), + anno::description("Returns float2(x,y) from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11041) +]] +{ return float2( a.x, a.y); } + +export float2 xy( float4 a) +[[ + anno::display_name("XY from float4"), + anno::description("Returns float2(x,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11044) +]] +{ return float2( a.x, a.y); } + +export float2 xy( color a) +[[ + anno::display_name("XY from color"), + anno::description("Returns float2(x,y) from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11043) +]] +{ return xy( float3(a)); } + +export float2 xy( + texture_return a [[ + anno::description("Input texture sample container; returns the first two tint channels.") + ]]) +[[ + anno::display_name("XY from texture_return"), + anno::description("Returns float2(r, g) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11044) +]] +{ return xy(texture_return_float4(a)); } + + +// The remaining are hidden +export float2 xx( float2 a) +[[ + anno::display_name("XX from float2"), + anno::description("Returns float2(x,x)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11030) +]] +{ return float2( a.x, a.x); } + +export float2 yx( float2 a) +[[ + anno::display_name("YX from float2"), + anno::description("Returns float2(y,x)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11050) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float2 a) +[[ + anno::display_name("YY from float2"), + anno::description("Returns float2(y,y)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11060) +]] +{ return float2( a.y, a.y); } + +export float2 xx( float3 a) +[[ + anno::display_name("XX from float3"), + anno::description("Returns float2(x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11031) +]] +{ return float2( a.x, a.x); } + +export float2 xz( float3 a) +[[ + anno::display_name("XZ from float3"), + anno::description("Returns float2(x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11042) +]] +{ return float2( a.x, a.z); } + +export float2 yz( float3 a) +[[ + anno::display_name("YZ from float3"), + anno::description("Returns float2(y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11043) +]] +{ return float2( a.y, a.z); } + +export float2 yx( float3 a) +[[ + anno::display_name("YX from float3"), + anno::description("Returns float2(y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11051) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float3 a) +[[ + anno::display_name("YY from float3"), + anno::description("Returns float2(y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11061) +]] +{ return float2( a.y, a.y); } + +export float2 zx( float3 a) +[[ + anno::display_name("ZX from float3"), + anno::description("Returns float2(z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11090) +]] +{ return float2( a.z, a.x); } + +export float2 zy( float3 a) +[[ + anno::display_name("ZY from float3"), + anno::description("Returns float2(z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11100) +]] +{ return float2( a.z, a.y); } + +export float2 zz( float3 a) +[[ + anno::display_name("ZZ from float3"), + anno::description("Returns float2(z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11110) +]] +{ return float2( a.z, a.z); } + +export float2 xx( float4 a) +[[ + anno::display_name("XX from float4"), + anno::description("Returns float2(x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11032) +]] +{ return float2( a.x, a.x); } + +export float2 xz( float4 a) +[[ + anno::display_name("XZ from float4"), + anno::description("Returns float2(x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11071) +]] +{ return float2( a.x, a.z); } + +export float2 xw( float4 a) +[[ + anno::display_name("XW from float4"), + anno::description("Returns float2(x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11120) +]] +{ return float2( a.x, a.w); } + +export float2 yx( float4 a) +[[ + anno::display_name("YX from float4"), + anno::description("Returns float2(y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11052) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float4 a) +[[ + anno::display_name("YY from float4"), + anno::description("Returns float2(y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11062) +]] +{ return float2( a.y, a.y); } + +export float2 yz( float4 a) +[[ + anno::display_name("YZ from float4"), + anno::description("Returns float2(y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11081) +]] +{ return float2( a.y, a.z); } + +export float2 yw( float4 a) +[[ + anno::display_name("YW from float4"), + anno::description("Returns float2(y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11125) +]] +{ return float2( a.y, a.w); } + +export float2 zx( float4 a) +[[ + anno::display_name("ZX from float4"), + anno::description("Returns float2(z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11091) +]] +{ return float2( a.z, a.x); } + +export float2 zy( float4 a) +[[ + anno::display_name("ZY from float4"), + anno::description("Returns float2(z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11101) +]] +{ return float2( a.z, a.y); } + +export float2 zz( float4 a) +[[ + anno::display_name("ZZ from float4"), + anno::description("Returns float2(z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11111) +]] +{ return float2( a.z, a.z); } + +export float2 zw( float4 a) +[[ + anno::display_name("ZW from float4"), + anno::description("Returns float2(z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11127) +]] +{ return float2( a.z, a.w); } + +export float2 wx( float4 a) +[[ + anno::display_name("WX from float4"), + anno::description("Returns float2(w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11129) +]] +{ return float2( a.w, a.x); } + +export float2 wy( float4 a) +[[ + anno::display_name("WX from loat4"), + anno::description("Returns float2(w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11131) +]] +{ return float2( a.w, a.y); } + +export float2 wz( float4 a) +[[ + anno::display_name("WZ from float4"), + anno::description("Returns float2(w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11133) +]] +{ return float2( a.w, a.z); } + +export float2 ww( float4 a) +[[ + anno::display_name("WW from float4"), + anno::description("Returns float2(w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11135) +]] +{ return float2( a.w, a.w); } + +export float2 xx( color a) +[[ + anno::display_name("XX from color"), + anno::description("Returns float2(x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11033) +]] +{ return xx( float3(a)); } + +export float2 xz( color a) +[[ + anno::display_name("XZ from color"), + anno::description("Returns float2(x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11072) +]] +{ return xz( float3(a)); } + +export float2 yx( color a) +[[ + anno::display_name("YX from color"), + anno::description("Returns float2(y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11053) +]] +{ return yx( float3(a)); } + +export float2 yy( color a) +[[ + anno::display_name("YY from color"), + anno::description("Returns float2(y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11063) +]] +{ return yy( float3(a)); } + +export float2 yz( color a) +[[ + anno::display_name("YZ from color"), + anno::description("Returns float2(y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11082) +]] +{ return yz( float3(a)); } + +export float2 zx( color a) +[[ + anno::display_name("ZX from color"), + anno::description("Returns float2(z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11092) +]] +{ return zx( float3(a)); } + +export float2 zy( color a) +[[ + anno::display_name("ZY from color"), + anno::description("Returns float2(z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11102) +]] +{ return zy( float3(a)); } + +export float2 zz( color a) +[[ + anno::display_name("ZZ from color"), + anno::description("Returns float2(z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11112) +]] +{ return zz( float3(a)); } + +export float2 xx( texture_return a) +[[ + anno::display_name("XX from color"), + anno::description("Returns float2(x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11034) +]] +{ return xx(texture_return_float4(a)); } + +export float2 xz( texture_return a) +[[ + anno::display_name("XZ from texture_return"), + anno::description("Returns float2(x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11073) +]] +{ return xz(texture_return_float4(a)); } + +export float2 xw( texture_return a) +[[ + anno::display_name("XW from texture_return"), + anno::description("Returns float2(x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11121) +]] +{ return xw(texture_return_float4(a)); } + +export float2 yx( texture_return a) +[[ + anno::display_name("YX from texture_return"), + anno::description("Returns float2(y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11054) +]] +{ return yx(texture_return_float4(a)); } + +export float2 yy( texture_return a) +[[ + anno::display_name("YY from texture_return"), + anno::description("Returns float2(y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11064) +]] +{ return yy(texture_return_float4(a)); } + +export float2 yz( texture_return a) +[[ + anno::display_name("YZ from texture_return"), + anno::description("Returns float2(y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11083) +]] +{ return yz(texture_return_float4(a)); } + +export float2 yw( texture_return a) +[[ + anno::display_name("YW from texture_return"), + anno::description("Returns float2(y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11126) +]] +{ return yw(texture_return_float4(a)); } + +export float2 zx( texture_return a) +[[ + anno::display_name("ZX from texture_return"), + anno::description("Returns float2(z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11093) +]] +{ return zx(texture_return_float4(a)); } + +export float2 zy( texture_return a) +[[ + anno::display_name("ZY from texture_return"), + anno::description("Returns float2(z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11103) +]] +{ return zy(texture_return_float4(a)); } + +export float2 zz( texture_return a) +[[ + anno::display_name("ZZ from texture_return"), + anno::description("Returns float2(z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11113) +]] +{ return zz(texture_return_float4(a)); } + +export float2 zw( texture_return a) +[[ + anno::display_name("ZW from texture_return"), + anno::description("Returns float2(z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11128) +]] +{ return zw(texture_return_float4(a)); } + +export float2 wx( texture_return a) +[[ + anno::display_name("WX from texture_return.WX"), + anno::description("Returns float2(w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11130) +]] +{ return wx(texture_return_float4(a)); } + +export float2 wy( texture_return a) +[[ + anno::display_name("WY from texture_return"), + anno::description("Returns float2(w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11132) +]] +{ return wy(texture_return_float4(a)); } + +export float2 wz( texture_return a) +[[ + anno::display_name("WZ from texture_return"), + anno::description("Returns float2(w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11134) +]] +{ return wz(texture_return_float4(a)); } + +export float2 ww( texture_return a) +[[ + anno::display_name("WW from texture_return"), + anno::description("Returns float2(w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11136) +]] +{ return ww(texture_return_float4(a)); } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float3 return type + +export float3 xyz( float3 a) +[[ + anno::display_name("XYZ from float3"), + anno::description("Returns float3(x,y,z) from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11290) +]] +{ return float3( a.x, a.y, a.z); } + +export float3 xyz( float4 a) +[[ + anno::display_name("XYZ from float4"), + anno::description("Returns float3(x,y,z) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11291) +]] +{ return float3( a.x, a.y, a.z); } + + +// The remaining are hidden +export float3 yyw( float4 a) +[[ + anno::display_name("YYW from float4"), + anno::description("Returns float3(y,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11640) +]] +{ return float3( a.y, a.y, a.w); } + +export float3 xxx( float2 a) +[[ + anno::display_name("XXX from float2"), + anno::description("Returns float3(x,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11200) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float2 a) +[[ + anno::display_name("XXY from float2"), + anno::description("Returns float3(x,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11210) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xyx( float2 a) +[[ + anno::display_name("XYX from float2"), + anno::description("Returns float3(x,y,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11230) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float2 a) +[[ + anno::display_name("XYY from float2"), + anno::description("Returns float3(x,y,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11240) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 yxx( float2 a) +[[ + anno::display_name("YXX from float2"), + anno::description("Returns float3(y,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11250) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float2 a) +[[ + anno::display_name("YXY from float2"), + anno::description("Returns float3(y,x,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11260) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yyx( float2 a) +[[ + anno::display_name("YYX from float2"), + anno::description("Returns float3(y,y,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11270) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float2 a) +[[ + anno::display_name("YYY from float2"), + anno::description("Returns float3(y,y,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11280) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 xxx( float3 a) +[[ + anno::display_name("XXX from float3"), + anno::description("Returns float3(x,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11201) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float3 a) +[[ + anno::display_name("XXY from float3"), + anno::description("Returns float3(x,x,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11211) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xxz( float3 a) +[[ + anno::display_name("XXZ from float3"), + anno::description("Returns float3(x,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11220) +]] +{ return float3( a.x, a.x, a.z); } + +export float3 xyx( float3 a) +[[ + anno::display_name("XYX from float3"), + anno::description("Returns float3(x,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11231) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float3 a) +[[ + anno::display_name("XYY from float3"), + anno::description("Returns float3(x,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11241) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 xzx( float3 a) +[[ + anno::display_name("XZX from float3"), + anno::description("Returns float3(x,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11300) +]] +{ return float3( a.x, a.z, a.x); } + +export float3 xzy( float3 a) +[[ + anno::display_name("XZY from float3"), + anno::description("Returns float3(x,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11310) +]] +{ return float3( a.x, a.z, a.y); } + +export float3 xzz( float3 a) +[[ + anno::display_name("XZZ from float3"), + anno::description("Returns float3(x,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11320) +]] +{ return float3( a.x, a.z, a.z); } + +export float3 yxx( float3 a) +[[ + anno::display_name("YXX from float3"), + anno::description("Returns float3(y,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11251) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float3 a) +[[ + anno::display_name("YXY from float3"), + anno::description("Returns float3(y,x,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11261) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yxz( float3 a) +[[ + anno::display_name("YXZ from float3"), + anno::description("Returns float3(y,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11330) +]] +{ return float3( a.y, a.x, a.z); } + +export float3 yyx( float3 a) +[[ + anno::display_name("YYX from float3"), + anno::description("Returns float3(y,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11271) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float3 a) +[[ + anno::display_name("YYY from float3"), + anno::description("Returns float3(y,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11281) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 yyz( float3 a) +[[ + anno::display_name("YYZ from float3"), + anno::description("Returns float3(y,y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11340) +]] +{ return float3( a.y, a.y, a.z); } + +export float3 yzx( float3 a) +[[ + anno::display_name("YZX from float3"), + anno::description("Returns float3(y,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11350) +]] +{ return float3( a.y, a.z, a.x); } + +export float3 yzy( float3 a) +[[ + anno::display_name("YZY from float3.YZY"), + anno::description("Returns float3(y,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11360) +]] +{ return float3( a.y, a.z, a.y); } + +export float3 yzz( float3 a) +[[ + anno::display_name("YZZ from float3"), + anno::description("Returns float3(y,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11370) +]] +{ return float3( a.y, a.z, a.z); } + +export float3 zxx( float3 a) +[[ + anno::display_name("ZXX from float3"), + anno::description("Returns float3(z,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11380) +]] +{ return float3( a.z, a.x, a.x); } + +export float3 zxy( float3 a) +[[ + anno::display_name("float3.ZXY"), + anno::description("Returns float3(z,x,y)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11390) +]] +{ return float3( a.z, a.x, a.y); } + +export float3 zxz( float3 a) +[[ + anno::display_name("ZXZ from float3"), + anno::description("Returns float3(z,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11400) +]] +{ return float3( a.z, a.x, a.z); } + +export float3 zyx( float3 a) +[[ + anno::display_name("ZYX from float3"), + anno::description("Returns float3(z,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11410) +]] +{ return float3( a.z, a.y, a.x); } + +export float3 zyy( float3 a) +[[ + anno::display_name("ZYY from float3"), + anno::description("Returns float3(z,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11420) +]] +{ return float3( a.z, a.y, a.y); } + +export float3 zyz( float3 a) +[[ + anno::display_name("ZYZ from float3"), + anno::description("Returns float3(z,y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11430) +]] +{ return float3( a.z, a.y, a.z); } + +export float3 zzx( float3 a) +[[ + anno::display_name("ZZX from float3"), + anno::description("Returns float3(z,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11440) +]] +{ return float3( a.z, a.z, a.x); } + +export float3 zzy( float3 a) +[[ + anno::display_name("ZZY from float3"), + anno::description("Returns float3(z,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11450) +]] +{ return float3( a.z, a.z, a.y); } + +export float3 zzz( float3 a) +[[ + anno::display_name("ZZZ from float3"), + anno::description("Returns float3(z,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11460) +]] +{ return float3( a.z, a.z, a.z); } + +export float3 xxx( float4 a) +[[ + anno::display_name("XXX from float4"), + anno::description("Returns float3(x,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11202) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float4 a) +[[ + anno::display_name("XXY from float4"), + anno::description("Returns float3(x,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11212) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xxz( float4 a) +[[ + anno::display_name("XXZ from float4"), + anno::description("Returns float3(x,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11222) +]] +{ return float3( a.x, a.x, a.z); } + +export float3 xxw( float4 a) +[[ + anno::display_name("XXW from float4"), + anno::description("Returns float3(x,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11227) +]] +{ return float3( a.x, a.x, a.w); } + +export float3 xyx( float4 a) +[[ + anno::display_name("XYX from float4"), + anno::description("Returns float3(x,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11232) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float4 a) +[[ + anno::display_name("XYY from float4"), + anno::description("Returns float3(x,y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11242) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 xyw( float4 a) +[[ + anno::display_name("XYW from float4"), + anno::description("Returns float3(x,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11295) +]] +{ return float3( a.x, a.y, a.w); } + +export float3 xzx( float4 a) +[[ + anno::display_name("XZX from float4"), + anno::description("Returns float3(x,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11301) +]] +{ return float3( a.x, a.z, a.x); } + +export float3 xzy( float4 a) +[[ + anno::display_name("XZY from float4"), + anno::description("Returns float3(x,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11311) +]] +{ return float3( a.x, a.z, a.y); } + +export float3 xzz( float4 a) +[[ + anno::display_name("XZZ from float4"), + anno::description("Returns float3(x,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11321) +]] +{ return float3( a.x, a.z, a.z); } + +export float3 xzw( float4 a) +[[ + anno::display_name("XZW from float4"), + anno::description("Returns float3(x,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11600) +]] +{ return float3( a.x, a.z, a.w); } + +export float3 xwx( float4 a) +[[ + anno::display_name("XWX from float4"), + anno::description("Returns float3(x,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11604) +]] +{ return float3( a.x, a.w, a.x); } + +export float3 xwy( float4 a) +[[ + anno::display_name("XWY from float4"), + anno::description("Returns float3(x,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11608) +]] +{ return float3( a.x, a.w, a.y); } + +export float3 xwz( float4 a) +[[ + anno::display_name("XWZ from float4"), + anno::description("Returns float3(x,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11612) +]] +{ return float3( a.x, a.w, a.z); } + +export float3 xww( float4 a) +[[ + anno::display_name("XWW from float4"), + anno::description("Returns float3(x,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11616) +]] +{ return float3( a.x, a.w, a.w); } + +export float3 yxx( float4 a) +[[ + anno::display_name("YXX from float4"), + anno::description("Returns float3(y,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11252) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float4 a) +[[ + anno::display_name("YXY from float4"), + anno::hidden(), + anno::description("Returns float3(y,x,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11262) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yxz( float4 a) +[[ + anno::display_name("YXZ from float4"), + anno::description("Returns float3(y,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11331) +]] +{ return float3( a.y, a.x, a.z); } + +export float3 yxw( float4 a) +[[ + anno::display_name("YXW from float4"), + anno::description("Returns float3(y,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11630) +]] +{ return float3( a.y, a.x, a.w); } + +export float3 yyx( float4 a) +[[ + anno::display_name("YYX from float4"), + anno::description("Returns float3(y,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11272) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float4 a) +[[ + anno::display_name("YYY from float4"), + anno::description("Returns float3(y,y,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11282) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 yyz( float4 a) +[[ + anno::display_name("YYZ from float4"), + anno::description("Returns float3(y,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11341) +]] +{ return float3( a.y, a.y, a.z); } + +export float3 yzx( float4 a) +[[ + anno::display_name("YZX from float4"), + anno::description("Returns float3(y,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11351) +]] +{ return float3( a.y, a.z, a.x); } + +export float3 yzy( float4 a) +[[ + anno::display_name("YZY from float4"), + anno::description("Returns float3(y,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11361) +]] +{ return float3( a.y, a.z, a.y); } + +export float3 yzz( float4 a) +[[ + anno::display_name("YZZ from float4"), + anno::description("Returns float3(y,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11371) +]] +{ return float3( a.y, a.z, a.z); } + +export float3 yzw( float4 a) +[[ + anno::display_name("YZW from float4"), + anno::description("Returns float3(y,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11650) +]] +{ return float3( a.y, a.z, a.w); } + +export float3 ywx( float4 a) +[[ + anno::display_name("YWX from float4"), + anno::description("Returns float3(y,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11653) +]] +{ return float3( a.y, a.w, a.x); } + +export float3 ywy( float4 a) +[[ + anno::display_name("YWY from float4"), + anno::description("Returns float3(y,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11656) +]] +{ return float3( a.y, a.w, a.y); } + +export float3 ywz( float4 a) +[[ + anno::display_name("YWZ from float4"), + anno::description("Returns float3(y,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11658) +]] +{ return float3( a.y, a.w, a.z); } + +export float3 yww( float4 a) +[[ + anno::display_name("YWW from float4"), + anno::description("Returns float3(y,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11661) +]] +{ return float3( a.y, a.w, a.w); } + +export float3 zxx( float4 a) +[[ + anno::display_name("ZXX from float4"), + anno::description("Returns float3(z,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11381) +]] +{ return float3( a.z, a.x, a.x); } + +export float3 zxy( float4 a) +[[ + anno::display_name("ZXY from float4"), + anno::description("Returns float3(z,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11391) +]] +{ return float3( a.z, a.x, a.y); } + +export float3 zxz( float4 a) +[[ + anno::display_name("ZXZ from float4"), + anno::description("Returns float3(z,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11401) +]] +{ return float3( a.z, a.x, a.z); } + +export float3 zxw( float4 a) +[[ + anno::display_name("ZXW from float4"), + anno::description("Returns float3(z,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11671) +]] +{ return float3( a.z, a.x, a.w); } + +export float3 zyx( float4 a) +[[ + anno::display_name("ZYX from float4"), + anno::description("Returns float3(z,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11411) +]] +{ return float3( a.z, a.y, a.x); } + +export float3 zyy( float4 a) +[[ + anno::display_name("ZYY from float4"), + anno::description("Returns float3(z,y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11421) +]] +{ return float3( a.z, a.y, a.y); } + +export float3 zyz( float4 a) +[[ + anno::display_name("ZYZ from float4"), + anno::description("Returns float3(z,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11431) +]] +{ return float3( a.z, a.y, a.z); } + +export float3 zyw( float4 a) +[[ + anno::display_name("ZYW from float4"), + anno::description("Returns float3(z,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11432) +]] +{ return float3( a.z, a.y, a.w); } + +export float3 zzx( float4 a) +[[ + anno::display_name("ZZX from float4"), + anno::description("Returns float3(z,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11441) +]] +{ return float3( a.z, a.z, a.x); } + +export float3 zzy( float4 a) +[[ + anno::display_name("ZZY from float4"), + anno::description("Returns float3(z,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11451) +]] +{ return float3( a.z, a.z, a.y); } + +export float3 zzz( float4 a) +[[ + anno::display_name("ZZZ from float4"), + anno::hidden(), + anno::description("Returns float3(z,z,z) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11461) +]] +{ return float3( a.z, a.z, a.z); } + +export float3 zzw( float4 a) +[[ + anno::display_name("ZZW from float4"), + anno::description("Returns float3(z,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11465) +]] +{ return float3( a.z, a.z, a.w); } + +export float3 zwx( float4 a) +[[ + anno::display_name("ZWX from float4"), + anno::description("Returns float3(z,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11468) +]] +{ return float3( a.z, a.w, a.x); } + +export float3 zwy( float4 a) +[[ + anno::display_name("ZWY from float4"), + anno::description("Returns float3(z,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11471) +]] +{ return float3( a.z, a.w, a.y); } + +export float3 zwz( float4 a) +[[ + anno::display_name("ZWZ from float4"), + anno::description("Returns float3(z,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11475) +]] +{ return float3( a.z, a.w, a.z); } + +export float3 zww( float4 a) +[[ + anno::display_name("ZWW from float4"), + anno::description("Returns float3(z,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11479) +]] +{ return float3( a.z, a.w, a.w); } + +export float3 wxx( float4 a) +[[ + anno::display_name("WXX from float4"), + anno::description("Returns float3(w,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11483) +]] +{ return float3( a.w, a.x, a.x); } + +export float3 wxy( float4 a) +[[ + anno::display_name("WXY from float4"), + anno::description("Returns float3(w,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11487) +]] +{ return float3( a.w, a.x, a.y); } + +export float3 wxz( float4 a) +[[ + anno::display_name("WXZ from float4"), + anno::description("Returns float3(w,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11490) +]] +{ return float3( a.w, a.x, a.z); } + +export float3 wxw( float4 a) +[[ + anno::display_name("WXW from float4"), + anno::description("Returns float3(w,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11496) +]] +{ return float3( a.w, a.x, a.w); } + +export float3 wyx( float4 a) +[[ + anno::display_name("WYX from float4"), + anno::description("Returns float3(w,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11503) +]] +{ return float3( a.w, a.y, a.x); } + +export float3 wyy( float4 a) +[[ + anno::display_name("WYY from float4"), + anno::description("Returns float3(w,y,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11507) +]] +{ return float3( a.w, a.y, a.y); } + +export float3 wyz( float4 a) +[[ + anno::display_name("WYZ from float4"), + anno::description("Returns float3(w,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11510) +]] +{ return float3( a.w, a.y, a.z); } + +export float3 wyw( float4 a) +[[ + anno::display_name("WYW from float4"), + anno::description("Returns float3(w,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11514) +]] +{ return float3( a.w, a.y, a.w); } + +export float3 wzx( float4 a) +[[ + anno::display_name("WZX from float4"), + anno::description("Returns float3(w,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11518) +]] +{ return float3( a.w, a.z, a.x); } + +export float3 wzy( float4 a) +[[ + anno::display_name("WZY from float4"), + anno::description("Returns float3(w,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11521) +]] +{ return float3( a.w, a.z, a.y); } + +export float3 wzz( float4 a) +[[ + anno::display_name("WZZ from float4"), + anno::description("Returns float3(w,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11524) +]] +{ return float3( a.w, a.z, a.z); } + +export float3 wzw( float4 a) +[[ + anno::display_name("WZW from float4"), + anno::description("Returns float3(w,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11529) +]] +{ return float3( a.w, a.z, a.w); } + +export float3 wwx( float4 a) +[[ + anno::display_name("WWX from float4"), + anno::description("Returns float3(w,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11533) +]] +{ return float3( a.w, a.w, a.x); } + +export float3 wwy( float4 a) +[[ + anno::display_name("WWY from float4"), + anno::hidden(), + anno::description("Returns float3(w,w,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11537) +]] +{ return float3( a.w, a.w, a.y); } + +export float3 wwz( float4 a) +[[ + anno::display_name("WWZ from float4"), + anno::description("Returns float3(w,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11541) +]] +{ return float3( a.w, a.w, a.z); } + +export float3 www( float4 a) +[[ + anno::display_name("WWW from float4"), + anno::description("Returns float3(w,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11544) +]] +{ return float3( a.w, a.w, a.w); } + +export float3 xxx( color a) +[[ + anno::display_name("XXX from color"), + anno::description("Returns float3(x,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11203) +]] +{ return xxx( float3(a)); } + +export float3 xxy( color a) +[[ + anno::display_name("XXY from color"), + anno::description("Returns float3(x,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11213) +]] +{ return xxy( float3(a)); } + +export float3 xxz( color a) +[[ + anno::display_name("XXZ from color"), + anno::description("Returns float3(x,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11223) +]] +{ return xxz( float3(a)); } + +export float3 xyx( color a) +[[ + anno::display_name("XYX from color"), + anno::description("Returns float3(x,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11233) +]] +{ return xyx( float3(a)); } + +export float3 xyy( color a) +[[ + anno::display_name("XYY from color"), + anno::description("Returns float3(x,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11243) +]] +{ return xyy( float3(a)); } + +export float3 xyz( color a) +[[ + anno::display_name("XYZ from color"), + anno::description("Returns float3(x,y,z) from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11292) +]] +{ return xyz( float3(a)); } + +export float3 xzx( color a) +[[ + anno::display_name("XZX from color"), + anno::description("Returns float3(x,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11302) +]] +{ return xzx( float3(a)); } + +export float3 xzy( color a) +[[ + anno::display_name("XZY from color"), + anno::description("Returns float3(x,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11312) +]] +{ return xzy( float3(a)); } + +export float3 xzz( color a) +[[ + anno::display_name("XZZ from color"), + anno::description("Returns float3(x,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11323) +]] +{ return xzz( float3(a)); } + +export float3 yxx( color a) +[[ + anno::display_name("YXX from color"), + anno::description("Returns float3(y,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11253) +]] +{ return yxx( float3(a)); } + +export float3 yxy( color a) +[[ + anno::display_name("YXY from color"), + anno::description("Returns float3(y,x,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11263) +]] +{ return yxy( float3(a)); } + +export float3 yxz( color a) +[[ + anno::display_name("YXZ from color"), + anno::description("Returns float3(y,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11332) +]] +{ return yxz( float3(a)); } + +export float3 yyx( color a) +[[ + anno::display_name("YYX from color"), + anno::description("Returns float3(y,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11273) +]] +{ return yyx( float3(a)); } + +export float3 yyy( color a) +[[ + anno::display_name("YYY from color"), + anno::description("Returns float3(y,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11283) +]] +{ return yyy( float3(a)); } + +export float3 yyz( color a) +[[ + anno::display_name("YYZ from color"), + anno::description("Returns float3(y,y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11342) +]] +{ return yyz( float3(a)); } + +export float3 yzx( color a) +[[ + anno::display_name("YZX from color"), + anno::description("Returns float3(y,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11352) +]] +{ return yzx( float3(a)); } + +export float3 yzy( color a) +[[ + anno::display_name("YZY from color"), + anno::description("Returns float3(y,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11362) +]] +{ return yzy( float3(a)); } + +export float3 yzz( color a) +[[ + anno::display_name("YZZ from color"), + anno::description("Returns float3(y,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11372) +]] +{ return yzz( float3(a)); } + +export float3 zxx( color a) +[[ + anno::display_name("ZXX from color"), + anno::description("Returns float3(z,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11382) +]] +{ return zxx( float3(a)); } + +export float3 zxy( color a) +[[ + anno::display_name("ZXY from color"), + anno::description("Returns float3(z,x,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11392) +]] +{ return zxy( float3(a)); } + +export float3 zxz( color a) +[[ + anno::display_name("ZXZ from color"), + anno::description("Returns float3(z,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11402) +]] +{ return zxz( float3(a)); } + +export float3 zyx( color a) +[[ + anno::display_name("ZYX from color"), + anno::description("Returns float3(z,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11412) +]] +{ return zyx( float3(a)); } + +export float3 zyy( color a) +[[ + anno::display_name("ZYY from color"), + anno::description("Returns float3(z,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11422) +]] +{ return zyy( float3(a)); } + +export float3 zyz( color a) +[[ + anno::display_name("ZYZ from color"), + anno::description("Returns float3(z,y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11432) +]] +{ return zyz( float3(a)); } + +export float3 zzx( color a) +[[ + anno::display_name("ZZX from color"), + anno::description("Returns float3(z,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11442) +]] +{ return zzx( float3(a)); } + +export float3 zzy( color a) +[[ + anno::display_name("ZZY from color"), + anno::description("Returns float3(z,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11452) +]] +{ return zzy( float3(a)); } + +export float3 zzz( color a) +[[ + anno::display_name("ZZZ from color"), + anno::description("Returns float3(z,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11462) +]] +{ return zzz( float3(a)); } + +export float3 xxx( texture_return a) +[[ + anno::display_name("XXX from texture_return"), + anno::description("Returns float3(x,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11204) +]] +{ return xxx(texture_return_float4(a)); } + +export float3 xxy( texture_return a) +[[ + anno::display_name("XXY from texture_return"), + anno::description("Returns float3(x,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11214) +]] +{ return xxy(texture_return_float4(a)); } + +export float3 xxz( texture_return a) +[[ + anno::display_name("XXZ from texture_return"), + anno::description("Returns float3(x,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11224) +]] +{ return xxz(texture_return_float4(a)); } + +export float3 xxw( texture_return a) +[[ + anno::display_name("XXW from texture_return"), + anno::description("Returns float3(x,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11229) +]] +{ return xxw(texture_return_float4(a)); } + +export float3 xyx( texture_return a) +[[ + anno::display_name("XYX from texture_return"), + anno::description("Returns float3(x,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11234) +]] +{ return xyx(texture_return_float4(a)); } + +export float3 xyy( texture_return a) +[[ + anno::display_name("XYY from texture_return"), + anno::description("Returns float3(x,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11244) +]] +{ return xyy(texture_return_float4(a)); } + +export float3 xyz( texture_return a) +[[ + anno::display_name("XYZ from texture_return"), + anno::description("Returns float3(x,y,z) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11293) +]] +{ return xyz(texture_return_float4(a)); } + +export float3 xyw( texture_return a) +[[ + anno::display_name("XYW from texture_return"), + anno::description("Returns float3(x,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11296) +]] +{ return xyw(texture_return_float4(a)); } + +export float3 xzx( texture_return a) +[[ + anno::display_name("XZX from texture_return"), + anno::description("Returns float3(x,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11303) +]] +{ return xzx(texture_return_float4(a)); } + +export float3 xzy( texture_return a) +[[ + anno::display_name("XZY from texture_return"), + anno::description("Returns float3(x,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(1131) +]] +{ return xzy(texture_return_float4(a)); } + +export float3 xzz( texture_return a) +[[ + anno::display_name("XZZ from texture_return"), + anno::description("Returns float3(x,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11321) +]] +{ return xzz(texture_return_float4(a)); } + +export float3 xzw( texture_return a) +[[ + anno::display_name("XZW from texture_return"), + anno::description("Returns float3(x,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11601) +]] +{ return xzw(texture_return_float4(a)); } + +export float3 xwx( texture_return a) +[[ + anno::display_name("XWX from texture_return"), + anno::description("Returns float3(x,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11605) +]] +{ return xwx(texture_return_float4(a)); } + +export float3 xwy( texture_return a) +[[ + anno::display_name("XWY from texture_return"), + anno::description("Returns float3(x,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11609) +]] +{ return xwy(texture_return_float4(a)); } + +export float3 xwz( texture_return a) +[[ + anno::display_name("XWZ from texture_return"), + anno::description("Returns float3(x,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11613) +]] +{ return xwz(texture_return_float4(a)); } + +export float3 xww( texture_return a) +[[ + anno::display_name("XWW from texture_return"), + anno::description("Returns float3(x,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11617) +]] +{ return xww(texture_return_float4(a)); } + +export float3 yxx( texture_return a) +[[ + anno::display_name("YXX from texture_return"), + anno::description("Returns float3(y,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11254) +]] +{ return yxx(texture_return_float4(a)); } + +export float3 yxy( texture_return a) +[[ + anno::display_name("YXY from texture_return"), + anno::description("Returns float3(y,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11264) +]] +{ return yxy(texture_return_float4(a)); } + +export float3 yxz( texture_return a) +[[ + anno::display_name("YXZ from texture_return"), + anno::description("Returns float3(y,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11333) +]] +{ return yxz(texture_return_float4(a)); } + +export float3 yxw( texture_return a) +[[ + anno::display_name("YXW from texture_return"), + anno::description("Returns float3(y,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11631) +]] +{ return yxw(texture_return_float4(a)); } + +export float3 yyx( texture_return a) +[[ + anno::display_name("YYX from texture_return"), + anno::description("Returns float3(y,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11274) +]] +{ return yyx(texture_return_float4(a)); } + +export float3 yyy( texture_return a) +[[ + anno::display_name("YYY from texture_return"), + anno::description("Returns float3(y,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11284) +]] +{ return yyy(texture_return_float4(a)); } + +export float3 yyz( texture_return a) +[[ + anno::display_name("YYZ from texture_return"), + anno::description("Returns float3(y,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11344) +]] +{ return yyz(texture_return_float4(a)); } + +export float3 yyw( texture_return a) +[[ + anno::display_name("YYW from texture_return"), + anno::description("Returns float3(y,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11641) +]] +{ return yyw(texture_return_float4(a)); } + +export float3 yzx( texture_return a) +[[ + anno::display_name("YZX from texture_return"), + anno::description("Returns float3(y,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11354) +]] +{ return yzx(texture_return_float4(a)); } + +export float3 yzy( texture_return a) +[[ + anno::display_name("YZY from texture_return"), + anno::description("Returns float3(y,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11363) +]] +{ return yzy(texture_return_float4(a)); } + +export float3 yzz( texture_return a) +[[ + anno::display_name("YZZ from texture_return"), + anno::description("Returns float3(y,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11373) +]] +{ return yzz(texture_return_float4(a)); } + +export float3 yzw( texture_return a) +[[ + anno::display_name("YZW from texture_return"), + anno::description("Returns float3(y,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11651) +]] +{ return yzw(texture_return_float4(a)); } + +export float3 ywx( texture_return a) +[[ + anno::display_name("YWX from texture_return"), + anno::description("Returns float3(y,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11654) +]] +{ return ywx(texture_return_float4(a)); } + +export float3 ywy( texture_return a) +[[ + anno::display_name("YWY from texture_return"), + anno::description("Returns float3(y,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11657) +]] +{ return ywy(texture_return_float4(a)); } + +export float3 ywz( texture_return a) +[[ + anno::display_name("YXZ from texture_return"), + anno::description("Returns float3(y,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11659) +]] +{ return ywz(texture_return_float4(a)); } + +export float3 yww( texture_return a) +[[ + anno::display_name("YWW from texture_return"), + anno::description("Returns float3(y,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11662) +]] +{ return yww(texture_return_float4(a)); } + +export float3 zxx( texture_return a) +[[ + anno::display_name("ZXX from texture_return"), + anno::description("Returns float3(z,x,x) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11383) +]] +{ return zxx(texture_return_float4(a)); } + +export float3 zxy( texture_return a) +[[ + anno::display_name("ZXY from texture_return"), + anno::description("Returns float3(z,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11394) +]] +{ return zxy(texture_return_float4(a)); } + +export float3 zxz( texture_return a) +[[ + anno::display_name("ZXZ from texture_return"), + anno::description("Returns float3(z,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11403) +]] +{ return zxz(texture_return_float4(a)); } + +export float3 zxw( texture_return a) +[[ + anno::display_name("ZXW from texture_return"), + anno::description("Returns float3(z,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11672) +]] +{ return zxw(texture_return_float4(a)); } + +export float3 zyx( texture_return a) +[[ + anno::display_name("ZYX from texture_return"), + anno::description("Returns float3(z,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11413) +]] +{ return zyx(texture_return_float4(a)); } + +export float3 zyy( texture_return a) +[[ + anno::display_name("ZYY from texture_return"), + anno::description("Returns float3(z,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11423) +]] +{ return zyy(texture_return_float4(a)); } + +export float3 zyz( texture_return a) +[[ + anno::display_name("ZYZ from texture_return"), + anno::description("Returns float3(z,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11433) +]] +{ return zyz(texture_return_float4(a)); } + +export float3 zyw( texture_return a) +[[ + anno::display_name("ZYW from texture_return"), + anno::description("Returns float3(z,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11433) +]] +{ return zyw(texture_return_float4(a)); } + +export float3 zzx( texture_return a) +[[ + anno::display_name("ZZX from texture_return"), + anno::description("Returns float3(z,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11443) +]] +{ return zzx(texture_return_float4(a)); } + +export float3 zzy( texture_return a) +[[ + anno::display_name("ZZY from texture_return"), + anno::description("Returns float3(z,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11453) +]] +{ return zzy(texture_return_float4(a)); } + +export float3 zzz( texture_return a) +[[ + anno::display_name("ZZZ from texture_return"), + anno::description("Returns float3(z,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11463) +]] +{ return zzz(texture_return_float4(a)); } + +export float3 zzw( texture_return a) +[[ + anno::display_name("ZZW from texture_return"), + anno::description("Returns float3(z,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11466) +]] +{ return zzw(texture_return_float4(a)); } + +export float3 zwx( texture_return a) +[[ + anno::display_name("ZWX from texture_return"), + anno::description("Returns float3(z,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11468) +]] +{ return zwx(texture_return_float4(a)); } + +export float3 zwy( texture_return a) +[[ + anno::display_name("ZWY from texture_return"), + anno::description("Returns float3(z,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11472) +]] +{ return zwy(texture_return_float4(a)); } + +export float3 zwz( texture_return a) +[[ + anno::display_name("ZWZ from texture_return"), + anno::description("Returns float3(z,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11476) +]] +{ return zwz(texture_return_float4(a)); } + +export float3 zww( texture_return a) +[[ + anno::display_name("texture_return.ZWW"), + anno::description("Returns float3(z,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11480) +]] +{ return zww(texture_return_float4(a)); } + +export float3 wxx( texture_return a) +[[ + anno::display_name("WXX from texture_return"), + anno::description("Returns float3(w,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11484) +]] +{ return wxx(texture_return_float4(a)); } + +export float3 wxy( texture_return a) +[[ + anno::display_name("WXY from texture_return"), + anno::description("Returns float3(w,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11488) +]] +{ return wxy(texture_return_float4(a)); } + +export float3 wxz( texture_return a) +[[ + anno::display_name("WXZ from texture_return"), + anno::description("Returns float3(w,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11493) +]] +{ return wxz(texture_return_float4(a)); } + +export float3 wxw( texture_return a) +[[ + anno::display_name("WXW from texture_return"), + anno::description("Returns float3(w,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11500) +]] +{ return wxw(texture_return_float4(a)); } + +export float3 wyx( texture_return a) +[[ + anno::display_name("WYX from texture_return"), + anno::description("Returns float3(w,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(1150) +]] +{ return wyx(texture_return_float4(a)); } + +export float3 wyy( texture_return a) +[[ + anno::display_name("WYY from texture_return"), + anno::description("Returns float3(w,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11508) +]] +{ return wyy(texture_return_float4(a)); } + +export float3 wyz( texture_return a) +[[ + anno::display_name("WYZ from texture_return"), + anno::description("Returns float3(w,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11511) +]] +{ return wyz(texture_return_float4(a)); } + +export float3 wyw( texture_return a) +[[ + anno::display_name("WYW from texture_return"), + anno::description("Returns float3(w,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11515) +]] +{ return wyw(texture_return_float4(a)); } + +export float3 wzx( texture_return a) +[[ + anno::display_name("WZX from texture_return"), + anno::description("Returns float3(w,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11519) +]] +{ return wzx(texture_return_float4(a)); } + +export float3 wzy( texture_return a) +[[ + anno::display_name("WZY from texture_return"), + anno::description("Returns float3(w,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11522) +]] +{ return wzy(texture_return_float4(a)); } + +export float3 wzz( texture_return a) +[[ + anno::display_name("WZZ from texture_return"), + anno::description("Returns float3(w,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11525) +]] +{ return wzz(texture_return_float4(a)); } + +export float3 wzw( texture_return a) +[[ + anno::display_name("WZW from texture_return"), + anno::description("Returns float3(w,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11530) +]] +{ return wzw(texture_return_float4(a)); } + +export float3 wwx( texture_return a) +[[ + anno::display_name("WWWX from texture_return"), + anno::description("Returns float3(w,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11533) +]] +{ return wwx(texture_return_float4(a)); } + +export float3 wwy( texture_return a) +[[ + anno::display_name("WWY from texture_return"), + anno::description("Returns float3(w,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11538) +]] +{ return wwy(texture_return_float4(a)); } + +export float3 wwz( texture_return a) +[[ + anno::display_name("WWZ from texture_return"), + anno::description("Returns float3(w,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11541) +]] +{ return wwz(texture_return_float4(a)); } + +export float3 www( texture_return a) +[[ + anno::display_name("WWW from texture_return"), + anno::description("Returns float3(w,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11545) +]] +{ return www(texture_return_float4(a)); } diff --git a/universalrobots_ur5e/materials/mdl/core_definitions.mdl b/universalrobots_ur5e/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/universalrobots_ur5e/materials/mdl/core_definitions.mdl @@ -0,0 +1,5806 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + + +// The "//group ... //endgroup" comments are used during the +// procedural creation of this module's documentation. +mdl 1.8; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::limits::*; +import ::base::*; +import ::tex::*; +import ::anno::*; +export using ::base import texture_return; +export using ::base import mono_mode; +export using ::base import color_layer_mode; +import support_definitions::*; +module [[ + anno::version( 2, 2, 0), + anno::display_name("NVIDIA core definitions") +]]; + +export annotation icon(string path); + +const string COPYRIGHT = "Copyright 2023 NVIDIA Corporation. All rights reserved."; + +//some local functions, dont document + +// https://www.shadertoy.com/view/4djSRW +float2 hash22(float2 p) +{ + float3 p3 = math::frac(float3(p.x, p.y, p.x) * float3(0.1031, 0.1030, 0.0973)); + p3 += math::dot(p3, float3(p3.y, p3.z, p3.x) + 33.33); + return math::frac((float2(p3.x, p3.x) + float2(p3.y, p3.z)) * float2(p3.z, p3.y)); +} + +// Christophe Schlick. “Fast Alternatives to Perlin’s Bias and Gain Functions”. +// In Graphics Gems IV, Morgan Kaufmann, 1994, pages 401–403. +// https://dept-info.labri.fr/~schlick/DOC/gem2.html +float schlick_gain(float x, float r) +{ + float rr = math::clamp(r, 0.001, 0.999); // to avoid glitch + float a = (1.0 / rr - 2.0) * (1.0 - 2.0 * x); + return (x < 0.5) ? x / (a + 1.0) : (a - x) / (a - 1.0); +} + +// blend two normals, similar to +// http://blog.selfshadow.com/publications/blending-in-detail/ +export float3 blend_normals( + float3 base_normal = state::normal() + [[ + anno::description("The base normal") + ]], + float base_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the base normal using a linear blend between state::normal and \"base_normal\""), + anno::soft_range(0.0,1.0) + ]], + float3 detail_normal = state::normal() + [[ + anno::description("The detail normal") + ]], + float detail_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\""), + anno::soft_range(0.0,1.0) + ]] +) +[[ + anno::description("Blend two normals or apply a detail normal map"), + anno::display_name("Blend normals"), + anno::thumbnail(".thumbs/blend_normals.png"), + anno::in_group("Texturing", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(33), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT)]] +{ + return base::blend_normals(base_normal,base_normal_weight,detail_normal,detail_normal_weight); +} +// blend 3 normals, similar to +// http://blog.selfshadow.com/publications/blending-in-detail/ +//TODO: make public? +float3 blend_3_normals( + float3 base_normal = state::normal() + [[ + anno::description("The base normal") + ]], + float base_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the base normal using a linear blend between state::normal and \"base_normal\"") + ]], + float3 detail_normal = state::normal() + [[ + anno::description("The detail normal") + ]], + float detail_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\"") + ]], + float3 detail_normal2 = state::normal() + [[ + anno::description("The detail normal2") + ]], + float detail_normal_weight2 = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\"") + ]] +) +[[ + anno::description("Blend three normals for sticker-like situations where a detail normal map is applied to a base normal map"), + anno::noinline() +]] +{ + float3 tu = state::texture_tangent_u(0); + float3 tv = state::texture_tangent_v(0); + float3 n = state::normal(); + + float w1 = math::saturate(base_normal_weight); + float w2 = math::saturate(detail_normal_weight); + float w3 = math::saturate(detail_normal_weight2); + + float3 n1_t = math::normalize( + float3(math::dot(tu, base_normal) * w1, + math::dot(tv, base_normal) * w1, + math::dot(n, base_normal) * w1 + 1.0f - w1)); + float3 n2_t = math::normalize( + float3(math::dot(tu, detail_normal) * w2, + math::dot(tv, detail_normal) * w2, + math::dot(n, detail_normal) * w2 + 1.0f - w2)); + float3 n3_t = math::normalize( + float3(math::dot(tu, detail_normal2) * w3, + math::dot(tv, detail_normal2) * w3, + math::dot(n, detail_normal2) * w3 + 1.0f - w3)); + + n1_t.z += 1.0f; + n2_t.x = -n2_t.x; + n2_t.y = -n2_t.y; + + float3 n12_t = n1_t * math::dot(n1_t, n2_t) / n1_t.z - n2_t; + + n12_t.z+= 1.0f; + n3_t.x = -n3_t.x; + n3_t.y = -n3_t.y; + float3 n_t = n12_t * math::dot(n12_t, n3_t) / n12_t.z - n3_t; + + return math::normalize( + tu * n_t.x + + tv * n_t.y + + n * n_t.z); +} + +// blend 3 normals by blending the gradients +// Morten S. Mikkelsen, Surface Gradient–Based Bump Mapping Framework, Journal of +// Computer Graphics Techniques (JCGT), vol. 9, no. 3, 60–90, 2020 +// http://jcgt.org/published/0009/03/04/ +float3 gradient_blend_3_normals( + float3 normal1 = state::normal(), + float normal1_weight = 1.0, + float3 normal2 = state::normal(), + float normal2_weight = 1.0, + float3 normal3 = state::normal(), + float normal3_weight = 1.0 +) +{ + float w1 = math::saturate(normal1_weight); + float w2 = math::saturate(normal2_weight); + float w3 = math::saturate(normal3_weight); + + // normal to gradient + float3 n = state::normal(); + float d1 = math::dot(n, normal1); + float d2 = math::dot(n, normal2); + float d3 = math::dot(n, normal3); + float3 g1 = (d1 * n - normal1) / math::max(limits::FLOAT_MIN, math::abs(d1)); + float3 g2 = (d2 * n - normal2) / math::max(limits::FLOAT_MIN, math::abs(d2)); + float3 g3 = (d3 * n - normal3) / math::max(limits::FLOAT_MIN, math::abs(d3)); + + // blend + float3 gg = w1 * g1 + w2 * g2 + w3 * g3; + + // gradient to normal + return math::normalize(n - gg); +} + +struct complex_ior +{ + color n; //refractive index + color k; //extinction coefficient +}; + + +//[Gulbrandsen2014] Ole Gulbrandsen, 2014. Artist friendly metallic fresnel. +complex_ior artistic_metal_to_complex_ior( + color reflectivity, + color edge_tint) +{ + float epsilon = 1.e-2; + color r = math::lerp(color(epsilon), color(1.0 - epsilon), reflectivity); + color g = edge_tint; + + color r_sqrt = math::sqrt(r); + color n_min = (1.0f - r) / (1.0f + r); + color n_max = (1.0f + r_sqrt) / (1.0f - r_sqrt); + + color n = math::lerp(n_max, n_min, g); + + color k2 = ((n + 1.0f) * (n + 1.0f) * r - (n - 1.0f) * (n - 1.0f)) / (1.0f - r); + k2 = math::max(k2, 0.0f); + color k = math::sqrt(k2); + + return complex_ior(n, k); +} + + + +float3x3 axis_rotation_matrix(float3 a, float r) +{ + float[2] sc = math::sincos(r); + float s = sc[0]; + float c = sc[1]; + float omc = 1.0 - c; + return float3x3( + a.x * a.x * omc + c, a.x * a.y * omc - a.x * s, a.x * a.z * omc + a.y * s, + a.y * a.x * omc + a.z * s, a.y * a.y * omc + c, a.y * a.z * omc - a.x * s, + a.z * a.x * omc - a.y * s, a.z * a.y * omc + a.x * s, a.z * a.z * omc + c + ); +} +float3 transform_rotate(float3 p, float3 r) +{ + // Euler rotation matrix xyz order to stay compatible with ::base + float3 s = math::sin(r); + float3 c = math::cos(r); + float3x3 rotate = + float3x3( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , + c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , + -s.y , s.x*c.y , c.x*c.y ); + return p*rotate; + +} +float3 transform_rotate_inv(float3 p, float3 r) +{ + // Euler rotation matrix xyz order to stay compatible with ::base + float3 s = math::sin(r); + float3 c = math::cos(r); + float3x3 rotate = + float3x3( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , + c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , + -s.y , s.x*c.y , c.x*c.y ); + return rotate*p; + +} + +//group Enumerations + +export enum material_type +[[ + anno::display_name("User interface group"), + anno::description("User interface grouping hint for materials"), + anno::hidden() +]] +{ + simple_material + [[ anno::description("Simple material") ]], + complex_material + [[ anno::description("Complex material") ]], + combiner_material + [[ anno::description("Combiner material") ]], + modifier_material + [[ anno::description("Material modifier") ]] +}; + +export enum emission_type +[[ + anno::display_name("Emission mode"), + anno::description("Emission mode definition for light sources"), + anno::hidden() +]] +{ + lumen_m2 + [[ anno::description("lumen/m2") ]], + lumen + [[ anno::description("lumen") ]], + candela + [[ anno::description("candela") ]], + nit + [[ anno::description("nit (candela/m2)") ]] +}; + +export enum cell_type +[[ + anno::display_name("Worley noise cell type"), + anno::description("Behavior of the Worley noise cell"), + anno::hidden() +]] +{ + simple_cells = 0 + [[ anno::description("Simple cells") ]], + crystal_cells = 1 + [[ anno::description("Crystal cells") ]], + bordered_cells = 2 + [[ anno::description("Bordered cells") ]] +}; + +export enum cell_base +[[ + anno::display_name("Worley noise cell shape"), + anno::description("Shape of the Worley noise cell"), + anno::hidden() +]] +{ + circular_cells = 0 + [[ anno::description("Circle base") ]], + diamond_cells = 1 + [[ anno::description("Diamond base") ]] +}; + +export enum displacement_vector_space +[[ + anno::display_name("Displacement mode"), + anno::description("Displacement Mode"), + anno::hidden() +]] +{ + // displacement_height = 0 // reserve this for now + // [[ anno::display_name("Height") ]], + + displacement_vector_tangent_space = 1 + [[ anno::display_name("Vector, Tangent Space") ]], + + displacement_vector_object_space = 2 + [[ anno::display_name("Vector, Object Space") ]], + + displacement_vector_world_space = 3 + [[ anno::display_name("Vector, World Space") ]] +}; + +//endgroup + +float3 transform_displacement_vector( + float3 displacement = float3(0.0) + [[ anno::description("Displacement vector") ]], + uniform displacement_vector_space space = displacement_vector_tangent_space + [[ anno::description("Space of the displacement vector") ]], + float scale = 1.0f + [[ anno::description("Displacement scale") ]] +) +[[ + anno::description("Transform input displacement vector to dispacement offset"), + anno::hidden() +]] +{ + float3 result; + switch (space) + { + // case displacement_height: + // result = state::normal() * displacement * scale; + // break; + + case displacement_vector_tangent_space: + result = state::texture_tangent_u(0) * displacement[0] * scale + + state::texture_tangent_v(0) * displacement[2] * scale + + state::normal() * displacement[1] * scale; + break; + + case displacement_vector_object_space: + result = state::transform_point( + state::coordinate_internal, + state::coordinate_object, + displacement * scale + ); + break; + + case displacement_vector_world_space: + result = state::transform_point( + state::coordinate_internal, + state::coordinate_world, + displacement * scale + ); + break; + + default: + result = state::position(); + break; + } + + return result; +} + +float4x4 rotation_translation_scale( + float3 rotation = float3(0.) + [[ anno::description("Rotation applied to every UVW coordinate") ]], + float3 translation = float3(0.) + [[ anno::description("Offset applied to every UVW coordinate") ]], + 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; +} + +export annotation suitable_as_light(); +export annotation type_of_material(material_type type); +export annotation dimension(float dimension); +export annotation dimension(float2 dimension); +export annotation dimension(float3 dimension); + + +//group Texturing functions + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +blend_colors( + color color_1 = color(0.0) + [[ anno::display_name("Color 1") ]], + color color_2 = color(1.0) + [[ anno::display_name("Color 2") ]], + uniform color_layer_mode mode = color_layer_blend + [[ + anno::description("Describes how Color 1 and Color 2 are combined"), + anno::display_name("Blend mode") + ]], + float weight = 1. + [[ + anno::description("Defines strength of the effect. At weight 0, only color 1 will be visible. At weight 1, the blend function will have full effect."), + anno::display_name("Blend weight"), + anno::soft_range(0.0,1.0) + ]], + uniform bool linear_blend = true + [[ + anno::description("The blend opperation can either be applied in linear or gamma (2.2) color space"), + anno::display_name("Linear blend") + ]] +) +[[ + anno::display_name("Blend colors"), + anno::description("Allows combining textures and colors in varied ways"), + anno::thumbnail(".thumbs/blend_colors.png"), + anno::in_group("Texturing", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(33), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + color c1 = linear_blend? color_1: math::pow(color_1,0.45); + color c2 = linear_blend? color_2: math::pow(color_2,0.45); + float w = linear_blend? weight: math::pow(weight,0.45); + texture_return r = base::blend_color_layers( + layers: base::color_layer[]( + base::color_layer( + layer_color: c2, + weight: w, + mode: mode + )), + base: c1 + ); + return linear_blend? r: texture_return(math::pow(r.tint,2.2),math::pow(r.mono,2.2)); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +file_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(0) + ]], + uniform mono_mode mono_source = mono_average + [[ + anno::display_name("Scalar mode"), + anno::description("Defines how the texture applies to scalar parameters"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(1) + ]], + uniform float brightness = 1. + [[ + anno::display_name("Brightness"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(2), + anno::soft_range(0.0,1.0) + ]], + uniform float contrast = 1. + [[ + anno::display_name("Contrast"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,1.0) + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture, color will be black and the scalar value will be 0."), + anno::display_name("Clip"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(9) + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(5) + ]], + uniform bool invert = false + [[ + anno::description("Invert image"), + anno::display_name("Invert image"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("Bitmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(30), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return invert == false? base::file_texture( + texture: texture, + mono_source: mono_source, + color_offset: color(0.5*brightness-0.5*contrast*brightness), + color_scale: color(brightness*contrast), + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clip:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clip:tex::wrap_repeat + ): base::file_texture( + texture: texture, + mono_source: mono_source, + color_offset: color(1.0-0.5*brightness+0.5*contrast*brightness), + color_scale: color(-brightness*contrast), + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clip:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clip:tex::wrap_repeat + ); +} +export color triplanar_file_texture( + uniform texture_2d texture_1 + [[ + anno::display_name("Bitmap file"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(0), + anno::description("Primary texture used for triplanar projection (X axis, and fallback for missing optional textures).") + ]], + float2 scaling_1 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(1) + ]], + float2 translation_1 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(2) + ]], + float rotation_1 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,360.0) + ]], + uniform texture_2d texture_2 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(4), + anno::description("Optional texture used for the second triplanar projection axis (Y axis).") + ]], + float2 scaling_2 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(5) + ]], + float2 translation_2 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(6) + ]], + float rotation_2 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(7), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::soft_range(0.0,360.0) + ]], + uniform texture_2d texture_3 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8), + anno::description("Optional texture used for the third triplanar projection axis (Z axis).") + ]], + float2 scaling_3 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(9) + ]], + float2 translation_3 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(10) + ]], + float rotation_3 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(11), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::soft_range(0.0,360.0) + ]], + float blend_range = 0.5 + [[ + anno::description("Defines the size of the transition area. 0 means hard transition, 1 means blending happens very softly."), + anno::display_name("Blend range"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(14), + anno::hard_range(0.0,1.0) + ]], + uniform color mean = color(0.0) + [[ + anno::description("Allows tweaking of the blend function. A value of 0 disables the function."), + anno::display_name("Mean color"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(15), + anno::hard_range(color(0.0),color(1.0)) + ]], + uniform float3 rotate_origin = float3(0.0) + [[ + anno::description("Allows manual alignment of the projection with an object"), + anno::display_name("Rotation of origin"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(13), + anno::soft_range(float3(0.0),float3(360.0)) + ]], + uniform bool object_space = true + [[ + anno::description("If off, world space will be used for generating texture coordinates. If on, object space will apply."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(12) + ]] +) +[[ + anno::display_name("Triplanar Bitmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Triplanar"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(30), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + state::coordinate_space space = object_space?state::coordinate_object:state::coordinate_world; + + float3 normal = state::transform_normal(state::coordinate_internal, space, state::normal()); + float3 position = state::transform_point(state::coordinate_internal, space, state::position()); + //TODO: pretransform the space? At least rotating the original space seems desireable and more is not feasible without dedicated ui (gizmo) + normal = transform_rotate(normal, math::radians(rotate_origin)); + position = transform_rotate(position, math::radians(rotate_origin)); + + float3 weights = math::abs(normal); + + //TODO: blendrange through pow or is there something better? pow has the drawback of needing 3 lookups nearly always + weights /=math::max_value(weights); + weights = math::pow(weights,1./math::max(blend_range, 0.001)); + //weights = math::saturate(weights-float3(1.-blend_range)); + + weights /=float3(weights.x+weights.y+weights.z); + + + float2 st1 = normal.x>0?float2(-position.z,position.y):float2(-position.z,-position.y); + float2 st2 = normal.y>0?float2(-position.z,-position.x):float2(-position.z,position.x); + float2 st3 = normal.z>0?float2(-position.y,position.x):float2(-position.y,-position.x); + + color c1 = weights.x>0? + support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st1)) + :color(0.); + color c2 = weights.y>0? tex::texture_isvalid(texture_2)? + support_definitions::lookup_color( + texture_2, + support_definitions::transform_st(math::radians(rotation_2),translation_2,scaling_2,st2)) + :support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st2)) + :color(0.); + color c3 = weights.z>0? tex::texture_isvalid(texture_3)? + support_definitions::lookup_color( + texture_3, + support_definitions::transform_st(math::radians(rotation_3),translation_3,scaling_3,st3)) + :support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st3)) + :color(0.); + return mean == color(0.0)? + c1*weights.x + c2*weights.y+ c3*weights.z: + support_definitions::biased_color_blend(weights.x,c1,weights.y,c2,weights.z,c3,mean); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +perlin_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(1) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(2) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform int noise_levels = 3 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(6) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(5) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(11) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(10) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Perlin noise texture"), + anno::description("Enable texturing with a random noise pattern"), + anno::thumbnail(".thumbs/perlin_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Perlin"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(34), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::perlin_noise_texture( + color1: color1, + color2: color2, + noise_levels: noise_levels, + absolute_noise: absolute_noise, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 perlin_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,5.0), + anno::description("Overall bump intensity applied to the generated Perlin noise normal perturbation.") + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform int noise_levels = 1 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(2), + anno::description("Enables billowing noise by folding negative noise values into the positive range.") + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(3) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(8) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(6) + ]] +) +[[ + anno::display_name("Perlin noise texture -- bump mapping"), + anno::description("Enable bump-map texturing with a random noise pattern"), + anno::thumbnail(".thumbs/perlin_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Perlin"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(35), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::perlin_noise_bump_texture( + factor: factor, + noise_levels: noise_levels, + absolute_noise: absolute_noise, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +worley_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space") , + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(6) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform cell_type mode = simple_cells + [[ + anno::display_name("Cell type") , + anno::description("Cell pattern type"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(2) + ]], + uniform cell_base metric = circular_cells + [[ + anno::display_name("Cell shape") , + anno::description("The shape of the cell form"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(4) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(10) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(9) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(8) + ]]) +[[ + anno::display_name("Cellular noise texture"), + anno::description("Allow texturing with a cell forming pattern"), + anno::thumbnail(".thumbs/worley_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Worley"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(36), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::worley_noise_texture( + color1: color1, + color2: color2, + mode: mode==crystal_cells?2:mode==bordered_cells?3:0, + metric: metric, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 worley_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the generated Worley noise normal perturbation.") + ]], + uniform cell_base metric = circular_cells + [[ + anno::display_name("Cell shape") , + anno::description("The shape of the cell form"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(2) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(8) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(7) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(6) + ]]) +[[ + anno::display_name("Cellular noise texture -- bump mapping"), + anno::description("Allow texturing with a cell forming pattern"), + anno::thumbnail(".thumbs/worley_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Worley"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(37), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::worley_noise_bump_texture( + factor: factor, + metric: metric, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +flow_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(10) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(11) + ]], + uniform int noise_levels = 3 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(3) + + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(4) + + ]], + uniform float phase = 0.0 + [[ + anno::display_name("Phase offset"), + anno::description("Controls the third dimension of the function"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(5), + anno::soft_range(0.0,1.0) + ]], + uniform float level_gain = 0.5 + [[ + anno::display_name("Level intensity gain"), + anno::description("If multiple levels are used, this parameter specifies a weighting factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,1.0) + ]], + uniform float level_scale = 2.0 + [[ + anno::display_name("Level scaling"), + anno::description("If multiple levels are used, this parameter specifies a global scaling factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(7), + anno::soft_range(0.0,4.0) + ]], + uniform float level_progressive_u_scale = 1. + [[ + anno::display_name("Progressive u scale"), + anno::description("If multiple levels are used, this parameter specifies an additional scaling factor in the \"u\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(8), + anno::soft_range(0.0,1.0) + ]], + uniform float level_progressive_v_motion = 0. + [[ + anno::display_name("Progressive v offset"), + anno::description("If multiple levels are used, this parameter specifies an offset for subsequent levels in the \"v\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(9), + anno::soft_range(0.0,1.0) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(15) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(14) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(13) + ]]) +[[ + anno::display_name("Flow noise texture"), + anno::description("Allow texturing with a 2D noise pattern suitable for waves"), + anno::thumbnail(".thumbs/flow_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Flow"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(38), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::flow_noise_texture( + color1: color1, + color2: color2, + levels: noise_levels, + phase: phase, + level_gain: level_gain, + level_scale: level_scale, + level_progressive_u_scale: level_progressive_u_scale, + level_progressive_v_motion: level_progressive_v_motion, + absolute_noise: absolute_noise, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 flow_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the generated flow-noise normal perturbation.") + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(12) + ]], + uniform int noise_levels = 1 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(8) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(2), + anno::description("Enables billowing noise by folding negative noise values into the positive range.") + ]], + uniform float phase = 0.0 + [[ + anno::display_name("Phase offset"), + anno::description("Controls the 3rd dimension of the function"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,1.0) + ]], + uniform float level_gain = 0.5 + [[ + anno::display_name("Level intensity gain"), + anno::description("If multiple levels are used, this parameter specifies a weighting factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(4), + anno::soft_range(0.0,1.0) + ]], + uniform float level_scale = 2.0 + [[ + anno::display_name("Level scaling"), + anno::description("If multiple levels are used, this parameter specifies a global scaling factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(5), + anno::soft_range(0.0,4.0) + ]], + uniform float level_progressive_u_scale = 1. + [[ + anno::display_name("Progressive u scale"), + anno::description("If multiple levels are used, this parameter specifies an additional scaling factor in the \"u\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,1.0) + ]], + uniform float level_progressive_v_motion = 0. + [[ + anno::display_name("Progressive v offset"), + anno::description("If multiple levels are used, this parameter specifies an offset for subsequent levels in the \"v\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(7), + anno::soft_range(0.0,1.0) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(11) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(10) + ]] +) +[[ + anno::display_name("Flow noise texture -- bump mapping"), + anno::description("Allow texturing with a 2D noise pattern suitable for waves"), + anno::thumbnail(".thumbs/flow_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Flow"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(39), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::flow_noise_bump_texture( + factor: factor, + levels: noise_levels, + phase: phase, + level_gain: level_gain, + level_scale: level_scale, + level_progressive_u_scale: level_progressive_u_scale, + level_progressive_v_motion: level_progressive_v_motion, + absolute_noise: absolute_noise, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +checker_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(1) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(7) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(6) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(3) + ]], + uniform float blur = 0 + [[ + anno::hard_range(0.0,1.0), + anno::display_name("Blur"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(2) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(5) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("3D checker texture"), + anno::description("Allows texturing a checkerboard pattern"), + anno::thumbnail(".thumbs/checker_texture.png"), + anno::in_group("Texturing", "Checker"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(40), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::checker_texture( + color1: color1, + color2: color2, + blur: blur/4., + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 checker_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the checker pattern.") + ]], + uniform float blur = 0 + [[ + anno::hard_range(0.0,1.0), + anno::display_name("Blur"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(1), + anno::description("Amount of softening applied to checker cell boundaries.") + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(2) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(6) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(5) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(4) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(3) + ]] +) +[[ + anno::display_name("3D checker texture -- bump mapping"), + anno::description("Allows texturing a checkerboard pattern"), + anno::thumbnail(".thumbs/checker_bump_texture.png"), + anno::in_group("Texturing", "Checker"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(41), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::checker_bump_texture( + factor: factor, + blur: blur/4., + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 file_bump_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + anno::usage("normal"), + anno::ui_order(1), + anno::description("Bitmap texture used as the bump source.") + ]], + uniform mono_mode bump_source = mono_average + [[ + anno::display_name("Bump mode"), + anno::description("Defines how the texture is evaluated to create the bumps"), + anno::in_group("Bitmap parameters"), + anno::ui_order(2) + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture the surface will be flat"), + anno::display_name("Clip"), + anno::in_group("Placement"), + anno::ui_order(5) + + ]], + uniform float factor = 1 + [[ + anno::display_name("Bump strength"), + anno::in_group("Bitmap parameters"), + anno::ui_order(3), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the sampled bitmap bump values.") + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("Bitmap texture, bump"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_bump_texture.png"), + anno::in_group("Texturing"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(31), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::file_bump_texture( + texture: texture, + bump_source: bump_source, + factor: factor, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clamp:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clamp:tex::wrap_repeat, + clip: clip + ); +} + +export float3 normalmap_texture( + uniform texture_2d texture + [[ + anno::display_name("Normalmap file"), + anno::in_group("Normalmap parameters"), + icon(".icons/normal_map_texture.svg"), + anno::usage("normal"), + anno::ui_order(1), + anno::description("Tangent-space normal map texture.") + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture the surface will be flat."), + anno::display_name("Clip"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(4) + + ]], + uniform float factor = 1 + [[ + anno::display_name("Strength"), + anno::in_group("Normal map parameters"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(2), + anno::soft_range(0.0,1.0), + anno::description("Strength multiplier applied to the sampled normal-map perturbation.") + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(3) + ]], + uniform bool flip = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(6) + ]] +) +[[ + anno::display_name("Normal map texture"), + anno::description("Allows the use of tangent space normal maps"), + anno::thumbnail(".thumbs/normalmap_texture.png"), + anno::in_group("Texturing"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::tangent_space_normal_texture( + texture: texture, + factor: factor, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clamp:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clamp:tex::wrap_repeat, + flip_tangent_v: flip, + clip: clip + ); +} +export float3 triplanar_normalmap_texture( + uniform texture_2d texture_1 + [[ + anno::usage("normal"), + anno::display_name("Bitmap file"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(0), + anno::description("Primary normal map used for triplanar projection (X axis, and fallback for missing optional textures).") + ]], + float2 scaling_1 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(1) + ]], + float2 translation_1 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(2) + ]], + float rotation_1 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_1 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(4) + ]], + uniform texture_2d texture_2 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::usage("normal"), + anno::ui_order(4), + anno::description("Optional normal map used for the second triplanar projection axis (Y axis).") + ]], + float2 scaling_2 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(5) + ]], + float2 translation_2 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(6) + ]], + float rotation_2 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(7), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_2 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8) + ]], + uniform texture_2d texture_3 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8), + anno::usage("normal"), + anno::description("Optional normal map used for the third triplanar projection axis (Z axis).") + ]], + float2 scaling_3 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(9) + ]], + float2 translation_3 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(10) + ]], + float rotation_3 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(11), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_3 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(12) + ]], + float blend_range = 0.5 + [[ + anno::description("Defines the size of the transition area. 0 means hard transition, 1 means blending happens very softly."), + anno::display_name("Blend range"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(13), + anno::hard_range(0.0,1.0) + ]], + float strength = 1.0 + [[ + anno::description("Overall strength of the normalmap"), + anno::display_name("Strength"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(14), + anno::soft_range(0.0,10.0) + ]], + uniform float3 rotate_origin = float3(0.0) + [[ + anno::description("Allows manual alignment of the projection with an object"), + anno::display_name("Rotation of origin"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(16), + anno::soft_range(float3(0.0),float3(360.0)) + ]], + uniform bool object_space = true + [[ + anno::description("If off, world space will be used for generating texture coordinates. If on, object space will apply."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Triplanar Normalmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Triplanar"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + state::coordinate_space space = object_space?state::coordinate_object:state::coordinate_world; + + float3 normal = state::transform_normal(state::coordinate_internal, space, state::normal()); + float3 position_original = state::transform_point(state::coordinate_internal, space, state::position()); + float3 rotation_origin_rad = math::radians(rotate_origin); + normal = transform_rotate(normal, rotation_origin_rad); + float3 position = transform_rotate(position_original, rotation_origin_rad); + float3 ty = + math::normalize( + transform_rotate_inv(state::transform_vector(space,state::coordinate_internal,float3(0.,-1.,0.)),rotation_origin_rad)); + float3 tz = + math::normalize( + transform_rotate_inv(state::transform_vector(space,state::coordinate_internal,float3(0.,0.,-1.)),rotation_origin_rad)); + + float3 weights = math::abs(normal); + + //TODO: blendrange through pow or is there something better? Pow means relatively little area where only 1 texture is looked up + weights /=math::max_value(weights); + weights = math::pow(weights,1./math::max(blend_range, 0.001)); + + + + float2 st1 = normal.x>0.0?float2(-position.z,position.y):float2(-position.z,-position.y); + float3 ts = math::normalize(math::cross(state::normal(),tz)); + float3 tt1 = math::normalize(math::cross(state::normal(),ts)); + + float2 st2 = normal.y>0?float2(-position.z,-position.x):float2(-position.z,position.x); + + float2 st3 = normal.z>0?float2(-position.y,position.x):float2(-position.y,-position.x); + float3 ts3 = math::normalize(math::cross(state::normal(),ty)); + float3 tt3 = math::normalize(math::cross(state::normal(),ts3)); + + tt3 = ( (tex::texture_isvalid(texture_3) && flip_3) || flip_1)? -tt3: tt3; + float3 tt2 = ( (tex::texture_isvalid(texture_2) && flip_2) || flip_1)? -tt1: tt1; + tt1 = flip_1? -tt1: tt1; + + float rotation_1_rad = math::radians(rotation_1); + float3x3 tan_rotation_mat_1 = axis_rotation_matrix(state::normal(), -rotation_1_rad); + float3 n1 = weights.x>0 && tex::texture_isvalid(texture_1)? + (support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st1))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength); + n1 = math::normalize( + ts * tan_rotation_mat_1 * n1.x + + tt1 * tan_rotation_mat_1 * n1.y + + state::normal() * (n1.z + (1.0 - strength))); + + float rotation_2_rad = math::radians(rotation_2); + float3x3 tan_rotation_mat_2 = tex::texture_isvalid(texture_2) + ? axis_rotation_matrix(state::normal(), -rotation_2_rad) + : tan_rotation_mat_1; + float3 n2 = weights.y>0? tex::texture_isvalid(texture_2)? + (support_definitions::lookup_float3( + texture_2, + support_definitions::transform_st(rotation_2_rad,translation_2,scaling_2,st2))- float3(0.5)) * (2.0 * strength) + :tex::texture_isvalid(texture_1)?(support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st2))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength):float3(0.,0.,strength); + n2 = math::normalize( + ts * tan_rotation_mat_2 * n2.x + + tt2 * tan_rotation_mat_2 * n2.y + + state::normal() * (n2.z + (1.0 - strength))); + + float rotation_3_rad = math::radians(rotation_3); + float3x3 tan_rotation_mat_3 = tex::texture_isvalid(texture_3) + ? axis_rotation_matrix(state::normal(), -rotation_3_rad) + : tan_rotation_mat_1; + float3 n3 = weights.z>0? tex::texture_isvalid(texture_3)? + (support_definitions::lookup_float3( + texture_3, + support_definitions::transform_st(rotation_3_rad,translation_3,scaling_3,st3))- float3(0.5)) * (2.0 * strength) + :tex::texture_isvalid(texture_1)?(support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st3))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength):float3(0.,0.,strength); + n3 = math::normalize( + ts3 * tan_rotation_mat_3 * n3.x + + tt3 * tan_rotation_mat_3 * n3.y + + state::normal() * (n3.z + (1.0 - strength))); + + return blend_3_normals(n1,weights.x,n2,weights.y,n3,weights.z); +} + +// Morten S. Mikkelsen, Practical Real-Time Hex-Tiling, Journal of Computer Graphics +// Techniques (JCGT), vol. 11, no. 2, 77-94, 2022 +// http://jcgt.org/published/0011/03/05/ +struct hextile_data { + float2 coord1; + float2 coord2; + float2 coord3; + float3 weights; + float3x3 tangent_rot_mat1; + float3x3 tangent_rot_mat2; + float3x3 tangent_rot_mat3; +}; + +hextile_data hextile_coord( + float2 coord, + float rotation, + float2 rotation_range, + float scale, + float2 scale_range, + float offset, + float2 offset_range) +{ + float sqrt3_2 = math::sqrt(3.0) * 2.0; + + // scale coord to maintain the original fit + float2 st = coord * sqrt3_2; + + // skew input space into simplex triangle grid + // (1, 0, -tan(30), 2*tan(30)) + float2x2 to_skewed = float2x2(1.0, 0.0, -0.57735027, 1.15470054); + float2 st_skewed = to_skewed * st; + + // barycentric weights + float2 st_frac = math::frac(st_skewed); + float3 temp = float3(st_frac.x, st_frac.y, 0.0); + temp.z = 1.0 - temp.x - temp.y; + + float s = math::step(0.0, -temp.z); + float s2 = 2.0 * s - 1.0; + + float w1 = -temp.z * s2; + float w2 = s - temp.y * s2; + float w3 = s - temp.x * s2; + + // vertex IDs + int2 base_id = int2(math::floor(st_skewed)); + int si = int(s); + int2 id1 = base_id + int2(si, si); + int2 id2 = base_id + int2(si, 1 - si); + int2 id3 = base_id + int2(1 - si, si); + + // tile center + float2x2 inv_skewed = float2x2(1.0, 0.0, 0.5, 1.0 / 1.15470054); + float2 ctr1 = inv_skewed * float2(id1) / float2(sqrt3_2); + float2 ctr2 = inv_skewed * float2(id2) / float2(sqrt3_2); + float2 ctr3 = inv_skewed * float2(id3) / float2(sqrt3_2); + + // reuse hash for performance + float2 seed_offset = float2(0.12345); // to avoid some zeros + float2 rand1 = hash22(float2(id1) + seed_offset); + float2 rand2 = hash22(float2(id2) + seed_offset); + float2 rand3 = hash22(float2(id3) + seed_offset); + + // randomized rotation matrix + float2 rr = math::radians(rotation_range); + float rrr1 = math::lerp(rr.x, rr.y, rand1.x * rotation); + float rrr2 = math::lerp(rr.x, rr.y, rand2.x * rotation); + float rrr3 = math::lerp(rr.x, rr.y, rand3.x * rotation); + float[2] sc1 = math::sincos(rrr1); + float[2] sc2 = math::sincos(rrr2); + float[2] sc3 = math::sincos(rrr3); + float2x2 rm1 = float2x2(sc1[1], -sc1[0], sc1[0], sc1[1]); + float2x2 rm2 = float2x2(sc2[1], -sc2[0], sc2[0], sc2[1]); + float2x2 rm3 = float2x2(sc3[1], -sc3[0], sc3[0], sc3[1]); + + // rotation matrix for tangent vectors + float3x3 trm1 = axis_rotation_matrix(state::normal(), -rrr1); + float3x3 trm2 = axis_rotation_matrix(state::normal(), -rrr2); + float3x3 trm3 = axis_rotation_matrix(state::normal(), -rrr3); + + // randomized scale + float2 sr = scale_range; + float2 scale1 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand1.y), scale); + float2 scale2 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand2.y), scale); + float2 scale3 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand3.y), scale); + + // randomized offset + float2 offset1 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand1 * offset); + float2 offset2 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand2 * offset); + float2 offset3 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand3 * offset); + + // get coord + float2 st1 = ((coord - ctr1) * rm1 / scale1) + ctr1 + offset1; + float2 st2 = ((coord - ctr2) * rm2 / scale2) + ctr2 + offset2; + float2 st3 = ((coord - ctr3) * rm3 / scale3) + ctr3 + offset3; + + hextile_data tile_data = hextile_data(st1, st2, st3, float3(w1, w2, w3), trm1, trm2, trm3); + + return tile_data; +} + +export color hextiling_file_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(0), + anno::description("Bitmap texture sampled by the hextiling algorithm.") + ]], + uniform int texture_space = 0 + [[ + anno::display_name("UV space index"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(1), + anno::description("UV set index used for texture-coordinate lookup.") + ]], + color default_color = color(0.0) + [[ + anno::display_name("Default color"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(2), + anno::description("Fallback color returned when no valid texture is provided.") + ]], + float2 repeat = float2(1.0, 1.0) + [[ + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/hextiling.svg"), + anno::ui_order(3), + anno::description("UV tiling multiplier applied before hextiling.") + ]], + float rotation = 1.0 + [[ + anno::display_name("Rotation"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(4), + anno::description("Random rotation amount; 0 disables random rotation and 1 uses the full rotation range.") + ]], + float2 rotation_range = float2(0.0, 360.0) + [[ + anno::display_name("Rotation Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(5), + anno::description("Minimum and maximum random rotation in degrees.") + ]], + float scale = 1.0 + [[ + anno::display_name("Scale"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(6), + anno::description("Random scale amount; 0 disables random scaling and 1 uses the full scale range.") + ]], + float2 scale_range = float2(0.5, 2.0) + [[ + anno::display_name("Scale Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(7), + anno::description("Minimum and maximum random tile scale.") + ]], + float offset = 1.0 + [[ + anno::display_name("Offset"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(8), + anno::description("Random offset amount; 0 disables random offsets and 1 uses the full offset range.") + ]], + float2 offset_range = float2(0.0, 1.0) + [[ + anno::display_name("Offset Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(9), + anno::description("Minimum and maximum random UV offset applied per tile.") + ]], + float falloff = 0.5 + [[ + anno::display_name("Falloff"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(10), + anno::description("Controls how quickly tile blending transitions between neighboring tiles.") + ]], + float falloff_contrast = 0.5 + [[ + anno::display_name("Falloff Contrast"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(11), + anno::description("Controls how strongly luminance influences blending weights.") + ]] +) +[[ + anno::display_name("Hextiling Bitmap texture"), + anno::description("Allows infinite texturing without obvious repeat patterns."), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Hextiling"), + icon(".icons/hextiling.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + if (!tex::texture_isvalid(texture)) + return default_color; + + + float3 uvw = state::texture_coordinate(texture_space); + float2 coord = float2(uvw.x, uvw.y) * repeat; + + // get triangle coord + hextile_data tile_data = hextile_coord( + coord: coord, + rotation: rotation, + rotation_range: rotation_range, + scale: scale, + scale_range: scale_range, + offset: offset, + offset_range: offset_range + ); + + // lookup texture + color c1 = tex::lookup_color(texture, tile_data.coord1); + color c2 = tex::lookup_color(texture, tile_data.coord2); + color c3 = tex::lookup_color(texture, tile_data.coord3); + + // luminance as weight + float3 cw = float3(math::luminance(c1), math::luminance(c2), math::luminance(c3)); + cw = math::lerp(float3(1.0), cw, float3(falloff_contrast)); + + // blend weights + float3 w = cw * math::pow(tile_data.weights, 7.0); + w /= (w.x + w.y + w.z); + + // apply s-curve gain + if (falloff != 0.5) + { + w.x = schlick_gain(w.x, falloff); + w.y = schlick_gain(w.y, falloff); + w.z = schlick_gain(w.z, falloff); + w /= (w.x + w.y + w.z); + } + + // blend + color out_color = w.x * c1 + w.y * c2 + w.z * c3; + + return out_color; +} + +export float3 hextiling_normalmap_texture( + uniform texture_2d texture + [[ + anno::usage("normal"), + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(0), + anno::description("Normal map texture sampled by the hextiling algorithm.") + ]], + uniform int texture_space = 0 + [[ + anno::display_name("UV space index"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(1), + anno::description("UV set index used for texture-coordinate lookup.") + ]], + float3 default_normal = state::normal() + [[ + anno::display_name("Default normal"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(2), + anno::description("Fallback normal returned when no valid normal map is provided.") + ]], + float2 repeat = float2(1.0, 1.0) + [[ + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/hextiling.svg"), + anno::ui_order(3), + anno::description("UV tiling multiplier applied before hextiling.") + ]], + float rotation = 1.0 + [[ + anno::display_name("Rotation"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(4), + anno::description("Random rotation amount; 0 disables random rotation and 1 uses the full rotation range.") + ]], + float2 rotation_range = float2(0.0, 360.0) + [[ + anno::display_name("Rotation Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(5), + anno::description("Minimum and maximum random rotation in degrees.") + ]], + float scale = 1.0 + [[ + anno::display_name("Scale"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(6), + anno::description("Random scale amount; 0 disables random scaling and 1 uses the full scale range.") + ]], + float2 scale_range = float2(0.5, 2.0) + [[ + anno::display_name("Scale Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(7), + anno::description("Minimum and maximum random tile scale.") + ]], + float offset = 1.0 + [[ + anno::display_name("Offset"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(8), + anno::description("Random offset amount; 0 disables random offsets and 1 uses the full offset range.") + ]], + float2 offset_range = float2(0.0, 1.0) + [[ + anno::display_name("Offset Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(9), + anno::description("Minimum and maximum random UV offset applied per tile.") + ]], + float falloff = 0.5 + [[ + anno::display_name("Falloff"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(10), + anno::description("Controls how quickly tile blending transitions between neighboring tiles.") + ]], + float strength = 1.0 + [[ + anno::display_name("Strength"), + anno::in_group("Normal map parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(11), + anno::soft_range(0.0, 1.0), + anno::description("Strength multiplier applied to sampled normal-map perturbations.") + ]], + uniform bool flip_g = false + [[ + anno::display_name("Flip V"), + anno::in_group("Normal map parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(12), + anno::description("Flips the green (Y) channel of the sampled normal maps.") + ]] +) +[[ + anno::display_name("Hextiling Normalmap texture"), + anno::description("Allows infinite texturing without obvious repeat patterns."), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Hextiling"), + icon(".icons/hextiling.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + if (!tex::texture_isvalid(texture)) + return default_normal; + + + float3 uvw = state::texture_coordinate(texture_space); + float2 coord = float2(uvw.x, uvw.y) * repeat; + + // get triangle coord + hextile_data tile_data = hextile_coord( + coord: coord, + rotation: rotation, + rotation_range: rotation_range, + scale: scale, + scale_range: scale_range, + offset: offset, + offset_range: offset_range + ); + + // lookup normalmap + float3 nm1 = tex::lookup_float3(texture, tile_data.coord1); + float3 nm2 = tex::lookup_float3(texture, tile_data.coord2); + float3 nm3 = tex::lookup_float3(texture, tile_data.coord3); + nm1.y = flip_g ? 1.0 - nm1.y : nm1.y; + nm2.y = flip_g ? 1.0 - nm2.y : nm2.y; + nm3.y = flip_g ? 1.0 - nm3.y : nm3.y; + + // transform to geometry normals + nm1 = 2.0 * nm1 - 1.0; + nm2 = 2.0 * nm2 - 1.0; + nm3 = 2.0 * nm3 - 1.0; + float3 sn = state::normal(); + float3 tu1 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat1 * strength; + float3 tu2 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat2 * strength; + float3 tu3 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat3 * strength; + float3 tv1 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat1 * strength; + float3 tv2 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat2 * strength; + float3 tv3 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat3 * strength; + float3 n1 = math::normalize(tu1 * nm1.x + tv1 * nm1.y + sn * nm1.z); + float3 n2 = math::normalize(tu2 * nm2.x + tv2 * nm2.y + sn * nm2.z); + float3 n3 = math::normalize(tu3 * nm3.x + tv3 * nm3.y + sn * nm3.z); + + // belnd weights + float3 w = math::pow(tile_data.weights, 7.0); + w /= (w.x + w.y + w.z); + + // apply s-curve gain + if (falloff != 0.5) + { + w.x = schlick_gain(w.x, falloff); + w.y = schlick_gain(w.y, falloff); + w.z = schlick_gain(w.z, falloff); + w /= (w.x + w.y + w.z); + } + + // blend + float3 out_normal = gradient_blend_3_normals(n1, w.x, n2, w.y, n3, w.z); + + return out_normal; +} + +//endgroup + +//material section----------------------------------------------------------------------------------------------- + +//group Simple materials + +export material diffuse( + color diffuse_color = color(.8) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead a powdery appearance") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple diffuse"), + anno::description("A basic diffuse material"), + anno::thumbnail(".thumbs/diffuse.png"), + anno::in_group("Materials", "Diffuse"), + anno::ui_order(0), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic")) +]] + = material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::diffuse_reflection_bsdf( + roughness: roughness, + tint: diffuse_color + ) + ) + ) +); + +export material dusty_diffuse( + color diffuse_color = color(.8) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Dusty diffuse"), + anno::description("A dusty diffuse material"), + anno::thumbnail(".thumbs/diffuse.png"), + anno::in_group("Materials", "Diffuse"), + anno::ui_order(1), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic")) +]] + = material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::dusty_diffuse_reflection_bsdf( + tint: diffuse_color + ) + ) + ) +); + +export material scratched_metal_v2( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::ui_order(1), + anno::description("The color of the metal") + ]], + float roughness = 0.2 + [[ + anno::display_name("Roughness"), + anno::ui_order(3), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflection weight"), + anno::ui_order(4), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::ui_order(5), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight") + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::ui_order(6), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees.") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::ui_order(7), + anno::description("Attach bump or normal maps here") + ]], + color edge_color = color(1.0) + [[ + anno::display_name("Edge color"), + anno::ui_order(2), + anno::description("The color of the metal towards the edge") + ]] +) +[[ + anno::display_name("Metal"), + anno::description("A metallic material with stretched reflections"), + anno::thumbnail(".thumbs/scratched_metal.png"), + anno::in_group("Materials"), + anno::ui_order(1), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness*roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + complex_ior ior = artistic_metal_to_complex_ior(metal_color, edge_color); + bsdf glossy_bsdf = df::fresnel_factor( + ior: ior.n, + extinction_coefficient: ior.k, + base: df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ) + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_plastic_v2( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float roughness = 0.2 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(2) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(4) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(5) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Additional reflectivity control"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Plastic"), + anno::description("A basic dielectric, works for everything opaque that is not metallic. Supports stretched highlights."), + anno::thumbnail(".thumbs/scratched_plastic.png"), + anno::in_group("Materials"), + anno::ui_order(2), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness*roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material retroreflective( + color base_color = color(.2,.03,.03) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + color reflection_color = color(.8,.8,.03) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the retroreflection"), + anno::ui_order(2) + ]], + float roughness = 0.15 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(3) + ]], + float normal_reflectivity = .05 + [[ + anno::display_name("Reflection weight facing"), + anno::hard_range(0.0,1.), + anno::description("Reflectivity control for geometry facing the viewer"), + anno::ui_order(4) + ]], + float grazing_reflectivity = 1. + [[ + anno::display_name("Reflection weight edge"), + anno::hard_range(0.0,1.), + anno::description("Reflectivity control for the reflectivity at geometry edges"), + anno::ui_order(5) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Retroreflective"), + anno::description("A material with a retroreflective component, works well for road signs and retroreflective stickers"), + anno::thumbnail(".thumbs/retroreflective.png"), + anno::in_group("Materials"), + anno::ui_order(3), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","retroreflective","roadsign","stone")) +]] + = let{ + bsdf glossy_bsdf = df::backscattering_glossy_reflection_bsdf( + tint: reflection_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::custom_curve_layer( + normal_reflectivity: 1.-normal_reflectivity, + grazing_reflectivity: 1.-grazing_reflectivity, + base: glossy_bsdf, + layer: df::diffuse_reflection_bsdf( + roughness: 1.0, + tint: base_color + ), + normal: normal + ) + ) + ) +); + +export material flex_material_v2( + color base_color = color(.5) + [[ + anno::display_name("Base color"), + anno::in_group("Base"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float diffuse_roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to a more \"powdery\" look"), + anno::ui_order(2) + ]], + float is_metal = 0.0 + [[ + anno::display_name("Metallic material"), + anno::in_group("Base"), + anno::description("If 1.0, reflection will be colored and independent of view direction. If 0.0, reflection will be white and direction dependent. Directional dependence is in this case based on the IOR (Fresnel effect)."), + anno::ui_order(3) + ]], + float reflectivity = 1.0 + [[ + anno::display_name("Reflection weight"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Controls the amount of reflection"), + anno::ui_order(5) + ]], + float reflection_roughness = 0.3 + [[ + anno::display_name("Reflection roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to more blurry reflections"), + anno::ui_order(4) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Reflection anisotropy"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(6) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(7) + ]], + float transparency = 0.0 + [[ + anno::display_name("Transmission weight"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("Weights how much light passes through the object compared to its diffuse reflectivity."), + anno::ui_order(12) + ]], + color transmission_color = color(1.) + [[ + anno::display_name("Transmission color"), + anno::in_group("Transmission"), + anno::description("Color effect for transmission independent of thickness of the object, similar to stained glass."), + anno::ui_order(8) + ]], + uniform color volume_color = color(1.0) + [[ + anno::display_name("Volume color"), + anno::in_group("Transmission"), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at \"Volume reference distance\" (m)."), + anno::ui_order(9) + ]], + float transmission_roughness = 0.0 + [[ + anno::display_name("Transmission roughness"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("higher values lead to objects seen through the material to appear blurry"), + anno::ui_order(11) + ]], + uniform float base_thickness = 0.1 + [[ + anno::display_name("Volume reference distance"), + anno::in_group("Transmission"), + anno::soft_range(0.0,10.0), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(10) + ]], + uniform float ior = 1.5 + [[ + anno::display_name("IOR"), + anno::in_group("Global"), + anno::soft_range(1.0,4.0), + anno::description("Determines refraction in the volume. It also influences the reflectivity for materials that are not metallic."), + anno::ui_order(14) + ]], + uniform bool thin_walled = false + [[ + anno::display_name("Thin walled"), + anno::in_group("Global"), + anno::description("Thin walled materials do not refract and do not have volume effects. Good for soap bubbles or window glass."), + anno::ui_order(13) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::in_group("Global"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(16) + ]], + uniform float abbe_number = 0.0 + [[ + anno::in_group("Global"), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85"), + anno::soft_range(0.0,100.0), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Flexible material model"), + anno::description("A complex material that can be configured to a wide variety of looks"), + anno::thumbnail(".thumbs/flex_material.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials"), + anno::ui_order(5), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("generic","complex")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: reflection_roughness*reflection_roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); + bsdf diffuse_bsdf = df::diffuse_reflection_bsdf( + tint: base_color, + roughness: diffuse_roughness + ); + bsdf transmission_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: transmission_roughness*transmission_roughness + ); + bsdf add_transparency = df::weighted_layer( + weight: transparency, + layer: transmission_bsdf, + base: diffuse_bsdf, + normal: normal + ); + bsdf add_reflection = df::weighted_layer( + is_metal, + df::weighted_layer( + weight: reflectivity, + layer: df::directional_factor(base_color,color(1.0),5.,glossy_bsdf), + base: add_transparency, + normal: normal + ), + df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ) + ); + bsdf add_normal = df::weighted_layer( + normal: normal, + weight: 1., + layer: add_reflection + ); +} in material( + thin_walled: thin_walled, + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number), + surface: material_surface( + scattering: add_normal + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ) +); + +export material thin_glass_v2( + color glass_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin glass"), + anno::description("A basic transmissive dielectric without refraction or volume"), + anno::thumbnail(".thumbs/thin_glass.png"), + anno::in_group("Materials", "Glass"), + anno::ui_order(6), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf glossy_transmission_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: glass_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + layer: glossy_transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) +); + +export material thin_translucent_v2( + color surface_color = color(.95) + [[ + anno::display_name("Diffuse color"), + anno::description("The color of the material") + ]], + color translucent_color = color(.95) + [[ + anno::display_name("Translucence color"), + anno::description("The color of the volume of the material") + ]], + float translucency = 0.5 + [[ + anno::display_name("Translucence weight"), + anno::hard_range(0.0,1.), + anno::description("Fraction of the incoming light that should be visible on the backside") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin translucent"), + anno::description("A diffuse transmissive dielectric material"), + anno::thumbnail(".thumbs/thin_translucent.png"), + anno::in_group("Materials", "Translucent"), + anno::ui_order(7), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","leaves","paper","sheets")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf transmission_bsdf = df::diffuse_transmission_bsdf( + tint: translucent_color + ); + bsdf base_bsdf = df::diffuse_reflection_bsdf( + tint: surface_color + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + weight: translucency, + normal: normal, + base: base_bsdf, + layer: df::weighted_layer( + layer: transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) + ) +); + +export material thick_glass_v2( + color transmission_color = color(1.0) + [[ + anno::ui_order(1), + anno::display_name("Transmission color"), + anno::description("Colors the light entering the volume, similar to stained glass") + ]], + uniform color glass_color = color(.95) + [[ + anno::ui_order(2), + anno::display_name("Volume color"), + anno::description("The color of the glass body") + ]], + float roughness = 0.0 + [[ + anno::ui_order(4), + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::ui_order(5), + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction") + ]], + uniform float base_thickness = .1 + [[ + anno::ui_order(3), + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here.") + + ]], + float3 normal = state::normal() + [[ + anno::ui_order(7), + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]], + uniform float abbe_number = 0.0 + [[ + anno::ui_order(6), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0) + ]] +) +[[ + anno::display_name("Thick glass"), + anno::description("A basic transmissive dielectric with refraction and coloring in the volume"), + anno::thumbnail(".thumbs/thick_glass.png"), + anno::in_group("Materials", "Glass"), + anno::ui_order(8), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf glossy_bsdf_transmission = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: roughness*roughness + ); +} in material( + thin_walled: false, + surface: material_surface( + df::weighted_layer( + normal: normal, + weight: 1., + layer: df::fresnel_layer( + layer: glossy_bsdf, + base: glossy_bsdf_transmission, + ior: ior, + normal: normal + ) + ) + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(glass_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material thick_translucent_v2( + color transmission_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + uniform color volume_color = color(.95) + [[ + anno::display_name("Volume color"), + anno::description("The color of the volume at \"Volume reference distance\""), + anno::ui_order(2) + ]], + uniform float volume_scattering = 0.5 + [[ + anno::display_name("Volume scattering"), + anno::hard_range(0.0,.99999), + anno::description("Amount of scattering for objects at \"Volume reference distance\""), + anno::ui_order(3) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(5) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Overall reflectivity of the material"), + anno::ui_order(6) + ]], + uniform float base_thickness = .1 + [[ + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" and \"Volume scattering\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(4) + + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(9) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction"), + anno::ui_order(7) + ]], + uniform float abbe_number = 0.0 + [[ + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off, Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Thick translucent"), + anno::description("A subsurface scattering material"), + anno::thumbnail(".thumbs/thick_translucent.png"), + anno::in_group("Materials", "Translucent"), + anno::ui_order(9), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","wax","milk")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf transmission_bsdf = df::specular_bsdf( + mode: df::scatter_transmit, + tint: transmission_color + ); + +} in material( + thin_walled: false, + surface: material_surface( + df::fresnel_layer( + normal: normal, + weight: reflectivity, + ior: ior, + layer: glossy_bsdf, + base: df::weighted_layer( + normal: normal, + weight: 1., + layer: transmission_bsdf + ) + ) + ), + volume: material_volume( + scattering_coefficient: (base_thickness <= 0)? color(0): math::log(color(1.-volume_scattering)) / - base_thickness, + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +//endgroup + +//group Modifier materials + +export material blend( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material the blend is based on") + ]], + material blend = scratched_metal_v2() + [[ + anno::display_name("Blend Material"), + anno::description("Surface properties to use for the blend") + ]], + float weight = 0. + [[ + anno::display_name("Blend weight"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]] +) +[[ + anno::display_name("Blend materials"), + anno::description("Blend characteristics of 2 materials or mask them using a texture"), + anno::thumbnail(".thumbs/blend.png"), + anno::in_group("Material modifiers", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = let { + float inv_weight = 1.0f - weight; +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: weight, + layer: blend.surface.scattering, + base: base.surface.scattering + ), + emission: material_emission( + mode: base.surface.emission.mode, //cant vary + intensity: math::lerp(base.surface.emission.intensity,blend.surface.emission.intensity, weight), + emission: df::unbounded_mix( + df::edf_component[] + ( + df::edf_component(inv_weight,base.surface.emission.emission), + df::edf_component(weight,blend.surface.emission.emission) + ) + ) + ) + ), + volume: material_volume( + scattering: df::unbounded_mix( + df::vdf_component[] + ( + df::vdf_component(inv_weight,base.volume.scattering), + df::vdf_component(weight,blend.volume.scattering) + ) + ), + absorption_coefficient: math::lerp(base.volume.absorption_coefficient,base.volume.absorption_coefficient,weight), + scattering_coefficient: math::lerp(base.volume.scattering_coefficient,base.volume.scattering_coefficient,weight), + emission_intensity: math::lerp(base.volume.emission_intensity,blend.volume.emission_intensity, weight) + + ), + ior: base.ior, //can't vary + thin_walled: base.thin_walled, //can't vary + geometry: material_geometry( + displacement: math::lerp(base.geometry.displacement, blend.geometry.displacement, weight), + cutout_opacity: math::lerp(base.geometry.cutout_opacity, blend.geometry.cutout_opacity, weight), + normal: blend_normals(base.geometry.normal, inv_weight, blend.geometry.normal, weight) + ) +); + +export material twosided( + material front = scratched_plastic_v2() + [[ + anno::display_name("Front material"), + anno::description("The material on the front faces.") + ]], + material back = scratched_metal_v2() + [[ + anno::display_name("Back material"), + anno::description("The material on the back faces.") + ]] +) +[[ + anno::display_name("Two-sided materials"), + anno::description("Allows you to apply a material to front and back surfaces."), + anno::thumbnail(".thumbs/twosided.png"), + anno::in_group("Material modifiers"), + icon(".icons/two_sided_materials.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = material( + thin_walled: true, + ior: front.ior, + surface: front.surface, + backface: back.surface, + geometry: front.geometry +); + +export material surface_falloff( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material the blend is based on") + ]], + material blend = scratched_metal_v2() + [[ + anno::display_name("Blend Material"), + anno::description("Surface properties to use for the blend") + ]], + float facing_weight = 0.0 + [[ + anno::display_name("Blend weight facing"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]], + float edge_weight = 1.0 + [[ + anno::display_name("Blend weight edge"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]], + float blend_bias = 1. + [[ + anno::display_name("Blend bias"), + anno::soft_range(0.0,10.), + anno::description("Controls how fast the transition should happen. 5.0 results in fresnel like transition.") + ]] +) +[[ + anno::display_name("Surface falloff"), + anno::description("Blend surface characteristics of 2 materials or mask them using a texture"), + anno::thumbnail(".thumbs/surface_falloff.png"), + anno::in_group("Material modifiers", "Blend"), + icon(".icons/surface_falloff.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = material( + surface: material_surface( + scattering: df::custom_curve_layer( + weight: 1., + exponent: blend_bias, + normal_reflectivity: facing_weight, + grazing_reflectivity: edge_weight, + layer: blend.surface.scattering, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_clearcoat_v2( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied"), + anno::ui_order(1) + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat"), + anno::ui_order(5) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat"), + anno::ui_order(3) + ]], + float visibility = 1.0 + [[ + anno::display_name("Coat visibility"), + anno::hard_range(0.0,1.0), + anno::description("Determines visibility of the clear coat"), + anno::ui_order(4) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(6) + ]], + color coat_filter_color = color(1.) + [[ + anno::display_name("Coat filter color"), + anno::description("For simulating coatings with colored resins that modulate the color of underlying layers"), + anno::ui_order(2) + ]] +) +[[ + anno::display_name("Apply clear coating"), + anno::description("Apply clear coat to an existing material"), + anno::author("NVIDIA Corporation"), + anno::thumbnail(".thumbs/apply_clearcoat.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_clear_coating.svg"), + anno::ui_order(16), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness*roughness, + tint: color(1.) + ); + color base_tint = blend_colors(color(1.), coat_filter_color, color_layer_blend, visibility).tint; +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: normal, + weight: visibility, + layer: glossy_bsdf, + base: df::tint(tint: base_tint, base: base.surface.scattering) + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_thinfilm( + material base = scratched_metal_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get shows a thin film effect") + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("The IOR of the thin film interface") + ]], + float thickness = 400.0 + [[ + anno::display_name("Thickness"), + anno::soft_range(10.0,5000.0), + anno::description("Thickness of the thin film in nm") + ]] +) +[[ + anno::display_name("Apply thin film"), + anno::description("Apply thin film to an existing material"), + anno::thumbnail(".thumbs/apply_thinfilm.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_thin_film.svg"), + anno::ui_order(17), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::thin_film( + ior: color(ior), + thickness: thickness, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_metalcoat_v2( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a metallic coating applied"), + anno::ui_order(1) + ]], + color metal_color = color(.95) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the metal"), + anno::ui_order(2) + ]], + float visibility = .3 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the coat"), + anno::ui_order(4) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metal coat"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(5) + ]] +) +[[ + anno::display_name("Apply thin metal coating"), + anno::description("Apply metal coat to an existing material"), + anno::thumbnail(".thumbs/apply_metalcoat.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_thin_metal_coating.svg"), + anno::ui_order(18), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness*roughness, + tint: metal_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: visibility, + normal: normal, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_dustcover( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + color dust_color = color(.7) + [[ + anno::display_name("Dust color"), + anno::description("The color of the dust") + ]], + float visibility = 1. + [[ + anno::display_name("Dust density"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the cover") + ]], + uniform float dust_density = .5 + [[ + anno::display_name("Dust amount"), + anno::hard_range(.01,1), + anno::description("How dusty the material is") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Apply a cover of dust"), + anno::description("Apply a diffuse cover of dust or dirt"), + anno::thumbnail(".thumbs/apply_dustcover.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_dust_cover.svg"), + anno::ui_order(19), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf dust_bsdf = df::diffuse_reflection_bsdf( + roughness: 1., + tint: dust_color + ); +} in material( + surface: material_surface( + scattering: df::custom_curve_layer( + weight: visibility, + normal_reflectivity: dust_density*dust_density*dust_density, + exponent: (1.05-dust_density)*2., + normal: normal, + layer: dust_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_colorfalloff_v2( + material base = scratched_metal_v2(metal_color: color(1.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + uniform color color_0 = color(1.,0.,0.) + [[ + anno::display_name("Color 1"), + anno::description("Color 1 (facing direction)") + ]], + uniform color color_1 = color(0.,1.,0.) + [[ + anno::display_name("Color 2"), + anno::description("Color 2") + ]], + uniform color color_2 = color(0.,0.,1.) + [[ + anno::display_name("Color 3"), + anno::description("Color 3") + ]], + uniform color color_3 = color(1.,0.,0.) + [[ + anno::display_name("Color 4"), + anno::description("Color 4") + ]], + uniform color color_4 = color(0.,1.,0.) + [[ + anno::display_name("Color 5"), + anno::description("Color 5 (object edges)") + ]] +) +[[ + anno::display_name("Apply a color falloff"), + anno::description("Makes the color view dependent"), + anno::thumbnail(".thumbs/apply_colorfalloff.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/apply_color_falloff.svg"), + anno::ui_order(20), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::measured_curve_factor( + curve_values: color[](color_0,color_1,color_2,color_3,color_4), + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); +//JAN: TODO fix from here +export material apply_metallicflakes( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a flake layer applied") + ]], + color flake_color = color(.9,.7,.5) + [[ + anno::display_name("Color"), + anno::description("The color of the flakes") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metallic flakes") + ]], + uniform float size = 1. + [[ + anno::display_name("Flake size"), + anno::description("Determines size of the metallic flakes, in mm") + ]], + uniform float amount = 0.5 + [[ + anno::display_name("Flake amount"), + anno::hard_range(0.0,1.), + anno::description("Determines amount of visible metallic flakes") + ]], + uniform float opacity = 0.5 + [[ + anno::display_name("Flake opacity"), + anno::hard_range(0.0,1.), + anno::description("Determines visibility of the metallic flakes") + ]], + uniform float bump = 1. + [[ + anno::display_name("Flake orientation randomness"), + anno::description("Larger numbers will increase the sparkle radius around highlights") + ]] +) +[[ + anno::display_name("Apply flake coating"), + anno::description("Apply layer of metallic flakes to an existing material"), + anno::thumbnail(".thumbs/apply_metallicflakes.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_flake_coating.svg"), + anno::ui_order(21), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + float3 flake_normal = base::flake_noise_bump_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + strength: bump, + scale: size * 0.001 + ); + float flake_opacity = base::flake_noise_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + intensity: opacity, + scale: size * 0.001, + density: amount + ).mono; + + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: flake_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + normal: flake_normal, + weight: flake_opacity, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material flake_paint( + color base_color = color(.3,.01,.01) + [[ + anno::display_name("Base color"), + anno::description("The color of the base paint") + ]], + color flake_color = color(.6,1,.1) + [[ + anno::display_name("Flake color"), + anno::description("The color of the flakes") + ]], + float roughness = 0.15 + [[ + anno::display_name("Flake roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metallic flakes") + ]], + uniform float size = 1. + [[ + anno::display_name("Flake size"), + anno::description("Determines size of the metallic flakes, in mm") + ]], + uniform float amount = 0.4 + [[ + anno::display_name("Flake amount"), + anno::hard_range(0.0,1.), + anno::description("Determines amount of visible metallic flakes") + ]], + uniform float opacity = .8 + [[ + anno::display_name("Flake weight"), + anno::hard_range(0.0,1.), + anno::description("Determines visibility of the metallic flakes") + ]], + uniform float bump = 1. + [[ + anno::display_name("Flake orientation randomness"), + anno::description("Larger numbers will increase the sparkle radius around highlights") + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat") + ]], + float coat_roughness = 0.0 + [[ + anno::display_name("Coat roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat") + ]], + float3 coat_bump = state::normal() + [[ + anno::display_name("Coat bump"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Flaky paint"), + anno::description("A multi layer paint material containing flakes"), + anno::thumbnail(".thumbs/flake_paint.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials"), + anno::ui_order(14), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("complex","carpaint")) +]] + = let{ + float3 flake_normal = base::flake_noise_bump_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + strength: bump, + scale: size * 0.001 + ); + float flake_opacity = base::flake_noise_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + intensity: opacity, + scale: size * 0.001, + density: amount + ).mono; + + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: flake_color + ); +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: coat_bump, + layer: df::simple_glossy_bsdf(roughness_u: coat_roughness), + base: df::weighted_layer( + normal: flake_normal, + weight: flake_opacity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf(tint: base_color) + ) + ) + ), + thin_walled: true +); + +export material add_cutout( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a cut-out") + ]], + float cutout = 1.0 + [[ + anno::display_name("Cutout"), + anno::hard_range(0.0,1.0), + anno::description("Determines where the object is visible") + ]] +) [[ + anno::display_name("Add cut-outs"), + anno::description("Adds cut-outs to existing materials. Also forces material to be thin-walled. Good for modeling leaves, grass or fences."), + anno::thumbnail(".thumbs/add_cutout.png"), + anno::in_group("Material modifiers"), + icon(".icons/add_cutouts.svg"), + anno::ui_order(22), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: true, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: base.geometry.normal, + cutout_opacity: cutout + ) +); + +export material add_simple_sticker( + color diffuse_color = color(.5) + [[ + anno::display_name("Sticker color"), + anno::description("The color of the material"), + anno::ui_order(2) + ]], + float roughness = 0.05 + [[ + anno::display_name("Sticker roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(3) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("Sticker IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Sticker reflectivity"), + anno::hard_range(0.0,1.), + anno::description("Additional Reflectivity control"), + anno::ui_order(4) + ]], + float3 sticker_normal = state::normal() + [[ + anno::display_name("Sticker bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]], + float sticker_mask = 0.0 + [[ + anno::display_name("Sticker mask"), + anno::hard_range(0.0,1.0), + anno::description("Determines extent of the sticker"), + anno::ui_order(5) + ]], + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a sticker added"), + anno::ui_order(1) + ]] +) [[ + anno::display_name("Add simple sticker"), + anno::description("A quick way for adding simple stickers to a material. The sticker is a simple dielectric and needs a mask to define its extent."), + anno::thumbnail(".thumbs/add_simple_sticker.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_simple_sticker.svg"), + anno::ui_order(23), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = let{ + material blend_material = blend( + blend: scratched_plastic_v2( + diffuse_color: diffuse_color, + roughness: roughness, + ior: ior, + reflectivity: reflectivity, + normal: sticker_normal), + base: base, + weight: sticker_mask + ); +} in material( + surface: blend_material.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_globalbump( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a bump map") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bump"), + anno::description("An additional global bump map for the material. Local bump map of the base material is preserved.") + ]] +) [[ + anno::display_name("Add global bumpmap"), + anno::description("Adds global bumpmap to existing materials. Local bump map of the base material is preserved."), + anno::thumbnail(".thumbs/add_globalbump.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_global_bumpmap.svg"), + anno::ui_order(24), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_displacement( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a bump map") + ]], + float displacement = 0.0 + [[ + anno::display_name("Displacement amount"), + anno::description("Attach displacement texture here. Note that the object needs to be set up correctly to have good displacement results.") + ]], + uniform float displacement_scale = 1.0 + [[ + anno::display_name("Displacement scale"), + anno::description("A global scale factor for the displacement amount") + ]] +) [[ + anno::display_name("Add displacement"), + anno::description("Adds displacement to existing materials"), + anno::thumbnail(".thumbs/add_displacement.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Displacement"), + icon(".icons/add_displacement.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: displacement*displacement_scale*state::scene_units_per_meter()*state::normal(), + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_vector_displacement( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get displacement") + ]], + float3 displacement = float3(0.0) + [[ + anno::display_name("Displacement amount"), + anno::description("Attach displacement texture here. Note that the object needs to be set up correctly to have good displacement results") + ]], + uniform displacement_vector_space space = displacement_vector_tangent_space + [[ + anno::display_name("Displacement vector mode"), + anno::description("Specify the space of the vector dispacement map") + ]], + uniform float displacement_scale = 1.0 + [[ + anno::display_name("Displacement scale"), + anno::description("A global scale factor for the displacement amount") + ]] +) [[ + anno::display_name("Add vector displacement"), + anno::description("Adds vector displacement to existing materials"), + anno::thumbnail(".thumbs/add_displacement.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Displacement"), + icon(".icons/add_vector_displacement.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: state::scene_units_per_meter()*transform_displacement_vector(displacement, space, displacement_scale), + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_round_edges( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get round edges") + ]], + uniform float round_edges_radius = 0.02 + [[ + anno::display_name("Round edge radius"), + anno::description("Influence radius around the edges in meters") + ]], + uniform float round_edges_roundness = 1.0 + [[ + anno::display_name("Round edge roundness"), + anno::description("Determines how round the edge will look"), + 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, unless + this parameter is set true, in which case the smoothing happens between + facets irrespective of their materials") + ]] +) [[ + anno::display_name("Add round edges"), + anno::description("Adds round edges to existing materials"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_round_edges.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: state::rounded_corner_normal( + radius: round_edges_radius, + roundness: round_edges_roundness, + across_materials: round_edges_across_materials + ), + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_emission( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get emission added") + ]], + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Add emission"), + anno::description("Adds emission to a material"), + anno::thumbnail(".thumbs/add_emission.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Emission"), + icon(".icons/add_emission.svg"), + anno::ui_order(26), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + suitable_as_light(), + anno::key_words(string[]("modifier","generic")) +]] = +let { + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} +in material( + surface: material_surface( + scattering: base.surface.scattering, + emission: material_emission( + emission: df::diffuse_edf(), + intensity: unit_intensity*tint*unit_scale, //for this mode, tint is assumes to be a color filter absorbing light + mode: imode + ) + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material add_thermal_emission( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get emission added") + ]], + uniform float temperature = 6500. + [[ + anno::display_name("Temperature"), + anno::description("The color temperature of the light in Kelvin") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Add thermal emission"), + anno::description("Adds emission to a material, color is based on a \"color temperature\""), + anno::thumbnail(".thumbs/add_thermal_emission.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Emission"), + icon(".icons/add_thermal_emission.svg"), + anno::ui_order(27), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + suitable_as_light(), + anno::key_words(string[]("modifier","generic")) +]] = +let { + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; + color emission_color = math::blackbody(temperature); + + color scaled_intensity = unit_intensity * (emission_color / math::luminance(emission_color));} +in material( + surface: material_surface( + scattering: base.surface.scattering, + emission: material_emission( + emission: df::diffuse_edf(), + intensity: scaled_intensity, + mode: imode + ) + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); +//endgroup + +/**-*/ + +//group Emissive materials + +export material light_omni ( + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Diffuse emission"), + anno::description("Emissive material emitting in all directions"), + anno::thumbnail(".thumbs/light_omni.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::ui_order(5000), + anno::hidden(), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = +let{ + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} in material ( + surface: material_surface ( + emission: material_emission ( + emission: df::diffuse_edf(), + intensity: tint*unit_intensity*unit_scale, + mode: imode + ) + ) +); + +export material light_spot ( + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform float spot_exponent = 30 + [[ + anno::display_name("Spot focus"), + anno::description("larger values lead to more focused spotlights") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Spotlight emission"), + anno::description("Emissive material emitting focused in one direction"), + anno::thumbnail(".thumbs/light_spot.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::hidden(), + anno::ui_order(5051), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = +let{ + //since this is a spotlight, we need the apex angle to convert from candela to lumen + //http://www.compuphase.com/electronics/candela_lumen.htm + //uniform float cos_apexangle_2 = math::pow(0.5,1./spot_exponent); //spot exponent 0 ->4pi + //uniform float apexfactor = 2*math::PI*(1.0-cos_apexangle_2); + + //correct integral + uniform float factor = (spot_exponent == 0)? 4*math::PI: 2*math::PI/(spot_exponent+1); + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*factor; + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} in material ( + surface: material_surface ( + emission: material_emission ( + emission: df::spot_edf(exponent: spot_exponent,global_distribution: true, global_frame: float3x3(1.,0,0, 0,1.,0., 0.,0,-1) ), + intensity: tint*unit_intensity*unit_scale, + mode: imode + ) + ) +); + +export material light_ies ( + uniform light_profile profile + [[ + anno::display_name("IES light profile data"), + anno::description("Data to describe the distribution of the light") + ]], + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(),//deprecated + anno::description("Modeling unit to meter conversion factor") + ]] +) [[ + anno::display_name("IES file based emission"), + anno::description("Emissive material emitting as described in an IES file"), + anno::thumbnail(".thumbs/light_ies.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::hidden(), + anno::ui_order(5052), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = material ( + surface: material_surface ( + emission: material_emission ( + emission: df::measured_edf(profile: profile,global_distribution: true, global_frame: float3x3(1.,0,0, 0,1.,0., 0.,0,-1) ), + intensity: tint*intensity*unit_scale + ) + ) +); + +//endgroup + +//group Deprecated + +//deprecated functionality=========================================================================================== +export annotation ui_position(int position); +export annotation typical_object_size(float size); + +export material metal( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::description("The color of the metal") + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflectivity"), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple metal, deprecated"), + anno::description("A basic metallic material"), + anno::thumbnail(".thumbs/metal.png"), + anno::author("NVIDIA Corporation"), + anno::hidden(), + //anno::deprecated("Use scratched_metal_v2"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: metal_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material plastic( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float roughness = 0.25 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple plastic, deprecated"), + anno::description("A basic dielectric, works for everything opaque that is not metallic"), + anno::thumbnail(".thumbs/plastic.png"), + anno::author("NVIDIA Corporation"), + anno::hidden(), + //anno::deprecated("Use scratched_plastic_v2"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_metal( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::description("The color of the metal") + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight") + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees.") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Metal , deprecated"), + anno::description("A metallic material with stretched reflections"), + anno::thumbnail(".thumbs/scratched_metal.png"), + anno::hidden(), + //anno::deprecated("Use scratched_metal_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: metal_color, + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_plastic( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(2) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(4) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(5) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Additional Reflectivity control"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Plastic, deprecated"), + anno::description("A basic dielectric, works for everything opaque that is not metallic. Supports stretched highlights."), + anno::thumbnail(".thumbs/scratched_plastic.png"), + anno::hidden(), + //anno::deprecated("Use scratched_plastic_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material apply_colorfalloff( + material base = scratched_metal(metal_color: color(1.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + color color_0 = color(1.,0.,0.) + [[ + anno::display_name("Color 1"), + anno::description("The color of the dust") + ]], + color color_1 = color(0.,1.,0.) + [[ + anno::display_name("Color 2"), + anno::description("The color of the dust") + ]], + color color_2 = color(0.,0.,1.) + [[ + anno::display_name("Color 3"), + anno::description("The color of the dust") + ]], + color color_3 = color(1.,0.,0.) + [[ + anno::display_name("Color 4"), + anno::description("The color of the dust") + ]], + color color_4 = color(0.,1.,0.) + [[ + anno::display_name("Color 5"), + anno::description("The color of the dust") + ]] +) +[[ + anno::display_name("Apply a color falloff, deprecated"), + anno::description("Makes the color view dependent"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + anno::thumbnail(".thumbs/apply_colorfalloff.png"), + anno::hidden(), + //anno::deprecated("Use apply_colorfalloff_v2 instead"), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::measured_curve_factor( + curve_values: color[](color_0,color_1,color_2,color_3,color_4), + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material flex_material( + color base_color = color(.5) + [[ + anno::display_name("Base color"), + anno::in_group("Base"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float diffuse_roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to a more \"powdery\" look"), + anno::ui_order(2) + ]], + uniform bool is_metal = false + [[ + anno::display_name("Metallic material"), + anno::in_group("Base"), + anno::description("If true, reflection will be colored and independent of view direction. If false, reflection will be white and direction dependent. Directional dependence is in this case based on the IOR (Fresnel effect)."), + anno::ui_order(3) + ]], + float reflectivity = 1.0 + [[ + anno::display_name("Reflection weight"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Controls the amount of reflection"), + anno::ui_order(5) + ]], + float reflection_roughness = 0.1 + [[ + anno::display_name("Reflection roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to more blurry reflections"), + anno::ui_order(4) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Reflection anisotropy"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(6) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(7) + ]], + float transparency = 0.0 + [[ + anno::display_name("Transmission weight"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("Weights how much light passes through the object vs. its diffuse reflectivity"), + anno::ui_order(12) + ]], + color transmission_color = color(1.) + [[ + anno::display_name("Transmission color"), + anno::in_group("Transmission"), + anno::description("Color effect for transmission independent of thickness of the object, similar to stained glass"), + anno::ui_order(8) + ]], + uniform color volume_color = color(1.0) + [[ + anno::display_name("Volume color"), + anno::in_group("Transmission"), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at \"Volume reference distance\"(m)"), + anno::ui_order(9) + ]], + float transmission_roughness = 0.0 + [[ + anno::display_name("Transmission roughness"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("higher values lead to objects seen through the material to appear blurry"), + anno::ui_order(11) + ]], + uniform float base_thickness = 0.1 + [[ + anno::display_name("Volume reference distance"), + anno::in_group("Transmission"), + anno::soft_range(0.0,10.0), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(10) + ]], + uniform float ior = 1.5 + [[ + anno::display_name("IOR"), + anno::in_group("Global"), + anno::soft_range(1.0,4.0), + anno::description("Determines refraction in the volume. It also influences the reflectivity for materials that are not metallic."), + anno::ui_order(14) + ]], + uniform bool thin_walled = false + [[ + anno::display_name("Thin walled"), + anno::in_group("Global"), + anno::description("Thin walled materials do not refract and do not have volume effects. Good for soap bubbles or window glass."), + anno::ui_order(13) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::in_group("Global"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(16) + ]], + uniform float abbe_number = 0.0 + [[ + anno::in_group("Global"), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off, Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Flexible material model, deprecated"), + anno::description("A complex material that can be configured to a wide variety of looks"), + anno::thumbnail(".thumbs/flex_material.png"), + anno::hidden(), + //anno::deprecated("Use flex_material_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("generic","complex")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: reflection_roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: is_metal? base_color: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); + bsdf diffuse_bsdf = df::diffuse_reflection_bsdf( + tint: base_color, + roughness: diffuse_roughness + ); + bsdf transmission_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: transmission_roughness + ); + bsdf add_transparency = df::weighted_layer( + weight: transparency, + layer: transmission_bsdf, + base: diffuse_bsdf, + normal: normal + ); + bsdf add_reflection = is_metal? df::weighted_layer( + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ): df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ); + bsdf add_normal = df::weighted_layer( + normal: normal, + weight: 1., + layer: add_reflection + ); +} in material( + thin_walled: thin_walled, + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number), + surface: material_surface( + scattering: add_normal + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ) +); + +export material thin_glass( + color glass_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin glass, deprecated"), + anno::description("A basic transmissive dielectric without refraction or volume"), + anno::thumbnail(".thumbs/thin_glass.png"), + anno::hidden(), + //anno::deprecated("Use thin_glass_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf glossy_transmission_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: glass_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + layer: glossy_transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) +); + +export material thin_translucent( + color surface_color = color(.95) + [[ + anno::display_name("Diffuse color"), + anno::description("The color of the material") + ]], + color translucent_color = color(.95) + [[ + anno::display_name("Translucence color"), + anno::description("The color of the volume of the material") + ]], + float translucency = 0.5 + [[ + anno::display_name("Translucence weight"), + anno::hard_range(0.0,1.), + anno::description("Fraction of the incoming light that should be visible on the backside") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin translucent, deprecated"), + anno::description("A diffuse transmissive dielectric material"), + anno::thumbnail(".thumbs/thin_translucent.png"), + anno::hidden(), + //anno::deprecated("Use thin_translucent_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","leaves","paper","sheets")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf transmission_bsdf = df::diffuse_transmission_bsdf( + tint: translucent_color + ); + bsdf base_bsdf = df::diffuse_reflection_bsdf( + tint: surface_color + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + weight: translucency, + normal: normal, + base: base_bsdf, + layer: df::weighted_layer( + layer: transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) + ) +); + +export material thick_glass( + color transmission_color = color(1.0) + [[ + anno::ui_order(1), + anno::display_name("Transmission color"), + anno::description("Colors the light entering the volume, similar to stained glass") + ]], + uniform color glass_color = color(.95) + [[ + anno::ui_order(2), + anno::display_name("Volume color"), + anno::description("The color of the glass body") + ]], + float roughness = 0.0 + [[ + anno::ui_order(4), + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::ui_order(5), + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction") + ]], + uniform float base_thickness = .1 + [[ + anno::ui_order(3), + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here.") + + ]], + float3 normal = state::normal() + [[ + anno::ui_order(7), + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]], + uniform float abbe_number = 0.0 + [[ + anno::ui_order(6), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0) + ]] +) +[[ + anno::display_name("Thick glass, deprecated"), + anno::description("A basic transmissive dielectric with refraction and coloring in the volume"), + anno::thumbnail(".thumbs/thick_glass.png"), + anno::hidden(), + //anno::deprecated("Use thick_glass_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf glossy_bsdf_transmission = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: roughness + ); +} in material( + thin_walled: false, + surface: material_surface( + df::weighted_layer( + normal: normal, + weight: 1., + layer: df::fresnel_layer( + layer: glossy_bsdf, + base: glossy_bsdf_transmission, + ior: ior, + normal: normal + ) + ) + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(glass_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material thick_translucent( + color transmission_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + uniform color volume_color = color(.95) + [[ + anno::display_name("Volume color"), + anno::description("The color of the volume at \"Volume reference distance\""), + anno::ui_order(2) + ]], + uniform float volume_scattering = 0.5 + [[ + anno::display_name("Volume scattering"), + anno::hard_range(0.0,.99999), + anno::description("Amount of scattering for objects at \"Volume reference distance\""), + anno::ui_order(3) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(5) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Overall reflectivity of the material"), + anno::ui_order(6) + ]], + uniform float base_thickness = .1 + [[ + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" and \"Volume scattering\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(4) + + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(9) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction"), + anno::ui_order(7) + ]], + uniform float abbe_number = 0.0 + [[ + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Thick translucent, deprecated"), + anno::description("A subsurface scattering material"), + anno::thumbnail(".thumbs/thick_translucent.png"), + anno::hidden(), + //anno::deprecated("Use thick_translucent_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","wax","milk")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf transmission_bsdf = df::specular_bsdf( + mode: df::scatter_transmit, + tint: transmission_color + ); + +} in material( + thin_walled: false, + surface: material_surface( + df::fresnel_layer( + normal: normal, + weight: reflectivity, + ior: ior, + layer: glossy_bsdf, + base: df::weighted_layer( + normal: normal, + weight: 1., + layer: transmission_bsdf + ) + ) + ), + volume: material_volume( + scattering_coefficient: (base_thickness <= 0)? color(0): math::log(color(1.-volume_scattering)) / - base_thickness, + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material apply_clearcoat( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied"), + anno::ui_order(1) + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat"), + anno::ui_order(5) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat"), + anno::ui_order(3) + ]], + float visibility = 1.0 + [[ + anno::display_name("Coat visibility"), + anno::hard_range(0.0,1.0), + anno::description("Determines visibility of the clear coat"), + anno::ui_order(4) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(6) + ]], + color coat_filter_color = color(1.) + [[ + anno::display_name("Coat filter color"), + anno::description("For simulating coatings with colored resins that modulate the color of underlying layers"), + anno::ui_order(2) + ]] +) +[[ + anno::display_name("Apply clear coating, deprecated"), + anno::description("Apply clear coat to an existing material"), + anno::author("NVIDIA Corporation"), + anno::thumbnail(".thumbs/apply_clearcoat.png"), + anno::hidden(), + //anno::deprecated("Use apply_clearcoat_v2 instead"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: color(1.) + ); + color base_tint = blend_colors(color(1.), coat_filter_color, color_layer_blend, visibility).tint; +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: normal, + weight: visibility, + layer: glossy_bsdf, + base: df::tint(tint: base_tint, base: base.surface.scattering) + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_metalcoat( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a metallic coating applied"), + anno::ui_order(1) + ]], + color metal_color = color(.95) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the metal"), + anno::ui_order(2) + ]], + float visibility = .3 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the coat"), + anno::ui_order(4) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metal coat"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(5) + ]] +) +[[ + anno::display_name("Apply thin metal coating, deprecated"), + anno::description("Apply metal coat to an existing material"), + anno::thumbnail(".thumbs/apply_metalcoat.png"), + anno::hidden(), + //anno::deprecated("Use apply_metalcoat_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: metal_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: visibility, + normal: normal, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +//endgroup + +/*-**/ diff --git a/universalrobots_ur5e/materials/mdl/support_definitions.mdl b/universalrobots_ur5e/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/universalrobots_ur5e/materials/mdl/support_definitions.mdl @@ -0,0 +1,4292 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + +mdl 1.8; + +import ::anno::*; +import ::math::*; + +using .::aux_definitions import xy; +import ::state::*; +import ::scene::*; + +export using ::state import coordinate_space; //enum type +import ::tex::*; +export using ::tex import gamma_mode; //enum type +export using ::tex import wrap_mode; //enum type + +module [[ + anno::version( 1, 2, 0), + anno::display_name("NVIDIA support definitions") +]]; + +export annotation icon(string path); + + +export float data_lookup_float( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float default_value = float() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float(name, default_value); +} + +export float2 data_lookup_float2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float2 default_value = float2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float2(name, default_value); +} + +export float3 data_lookup_float3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float3 default_value = float3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float3(name, default_value); +} + +export float4 data_lookup_float4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float4 default_value = float4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float4(name, default_value); +} + +export int data_lookup_int( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int default_value = int() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int(name, default_value); +} + +export int2 data_lookup_int2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int2 default_value = int2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int2(name, default_value); +} + +export int3 data_lookup_int3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int3 default_value = int3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int3(name, default_value); +} + +export int4 data_lookup_int4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int4 default_value = int4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int4(name, default_value); +} + +export color data_lookup_color( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + color default_value = color() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup color"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_color(name, default_value); +} + +export uniform float data_lookup_uniform_float( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float default_value = float() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup unfirom float"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float(name, default_value); +} + +export uniform float2 data_lookup_uniform_float2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float2 default_value = float2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform float2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float2(name, default_value); +} + +export uniform float3 data_lookup_uniform_float3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float3 default_value = float3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform float3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float3(name, default_value); +} + +export uniform float4 data_lookup_uniform_float4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float4 default_value = float4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup unfirom float4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float4(name, default_value); +} + +export uniform int data_lookup_uniform_int( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int default_value = int() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int(name, default_value); +} + +export uniform int2 data_lookup_uniform_int2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int2 default_value = int2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int2(name, default_value); +} + +export uniform int3 data_lookup_uniform_int3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int3 default_value = int3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int3(name, default_value); +} + +export uniform int4 data_lookup_uniform_int4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int4 default_value = int4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int4(name, default_value); +} + +export uniform color data_lookup_uniform_color( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform color default_value = color() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform color"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_color(name, default_value); +} + + + +// operator nodes +// Add +export int add(int a=0, int b=0) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(300) +]] +{ return a+b; } + +export float add(float a=0.0, float b=0.0) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(301) +]] +{ return a+b; } + +export float2 add(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(302) +]] +{ return a+b; } + +export float3 add(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(303) +]] +{ return a+b; } + +export float4 add(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(304) +]] +{ return a+b; } + +export color add(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(305) +]] +{ return a+b; } + +export int subtract(int a=0, int b=0) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(310) +]] +{ return a-b; } + +export float subtract(float a=0.0, float b=0.0) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(311) +]] +{ return a-b; } + +export float2 subtract(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(312) +]] +{ return a-b; } + +export float3 subtract(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(313) +]] +{ return a-b; } + +export float4 subtract(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(314) +]] +{ return a-b; } + +export color subtract(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(315) +]] +{ return a-b; } + +export int multiply(int a=0, int b=0) +[[ + anno::display_name("Multiply"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(320) +]] +{ return a*b; } + +export float multiply(float a=0.0, float b=0.0) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(321) +]] +{ return a*b; } + +export float2 multiply(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(322) +]] +{ return a*b; } + +export float3 multiply(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(323) +]] +{ return a*b; } + +export float4 multiply(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(324) +]] +{ return a*b; } + +export color multiply(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(325) +]] +{ return a*b; } + +export int divide(int a=0, int b=0) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(326) +]] +{ return a/b; } + +export float divide(float a=0.0, float b=0.0) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(327) +]] +{ return a/b; } + +export float2 divide(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(328) +]] +{ return a/b; } + +export float3 divide(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(329) +]] +{ return a/b; } + +export float4 divide(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(330) +]] +{ return a/b; } + +export color divide(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(331) +]] +{ return a/b; } + +export int condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + int a=0 [[ + anno::description("Value returned when the condition is true.") + ]], + int b=0 [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(332) +]] +{ return x?a:b; } + +export float condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float a=0.0 [[ + anno::description("Value returned when the condition is true.") + ]], + float b=0.0 [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(333) +]] +{ return x?a:b; } + +export float2 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float2 a=float2(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float2 b=float2(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(334) +]] +{ return x?a:b; } + +export float3 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float3 a=float3(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float3 b=float3(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(335) +]] +{ return x?a:b; } + +export float4 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float4 a=float4(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float4 b=float4(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(336) +]] +{ return x?a:b; } + +export color condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + color a=color(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + color b=color(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(337) +]] +{ return x?a:b; } + +export bool compare(float a, float b) +[[ + anno::display_name("Compare"), + anno::description("Returns true when a is greater than b; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Comparison"), + icon(".icons/compare.svg"), + anno::ui_order(338) +]] +{ return a>b; } + +export bool equality(bool a, bool b) +[[ + anno::display_name("Check equality bool"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(339) +]] +{ return a==b; } + +export bool equality(int a, int b) +[[ + anno::display_name("Check equality int"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(340) +]] +{ return a==b; } + +export bool equality(int2 a, int2 b) +[[ + anno::display_name("Check equality int2"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(341) +]] +{ return a==b; } + +export bool equality(int3 a, int3 b) +[[ + anno::display_name("Check equality int3"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(342) +]] +{ return a==b; } + +export bool equality(float a, float b) +[[ + anno::display_name("Check equality float"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(343) +]] +{ return a==b; } + +export bool equality(float2 a, float2 b) +[[ + anno::display_name("Check equality float2"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(344) +]] +{ return a==b; } + +export bool equality(float3 a, float3 b) +[[ + anno::display_name("Check equality float3"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(345) +]] +{ return a==b; } + +export bool equality(color a, color b) +[[ + anno::display_name("Check equality color"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(346) +]] +{ return a==b; } + +//constants nodes. +export bool bool_const(uniform bool b = true) +[[ + anno::display_name("Constant bool"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1000) +]] +{ return b; } + +export int int_const(uniform int i = 0) +[[ + anno::display_name("Constant int"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1001) +]] +{ return i; } + +export float float_const(uniform float f = 0.) +[[ + anno::display_name("Constant float"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1002) +]] +{ return f; } + +export float2 float2_const(uniform float2 f2 = float2(0.)) +[[ + anno::display_name("Constant float2"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1003) +]] +{ return f2; } + +export float3 float3_const(uniform float3 f3 = float3(0.)) +[[ + anno::display_name("Constant float3"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1004) +]] +{ return f3; } + +export float4 float4_const(uniform float4 f4 = float4(0.)) +[[ + anno::display_name("Constant float4"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1005) +]] +{ return f4; } + +export color color_const(uniform color c = color(0.)) +[[ + anno::display_name("Constant color"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1006) +]] +{ return c; } + +export uniform texture_2d texture_2d_const(uniform texture_2d tex = texture_2d())[[ + anno::display_name("Constant texture_2d"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1007) +]] +{ return tex; } + +//exports from tex: +export int texture_width( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose width is queried.") + ]]) uniform +[[ + anno::display_name("Width of texture"), + anno::description("Returns the width of the input texture in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Width"), + icon(".icons/texture_width.svg"), + anno::ui_order(141) +]] +{ return tex::width(tex); } + +export int texture_width( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose tile width is queried.") + ]], + int2 uv_tile = int2(0, 0) [[ + anno::description("UDIM tile index as (u, v).") + ]]) uniform +[[ + anno::display_name("Width of a texture tile"), + anno::description("Returns the width of the specified texture tile in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Width"), + icon(".icons/texture_width.svg"), + anno::ui_order(143) +]] +{ return tex::width(tex, uv_tile); } + +export int height( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose height is queried.") + ]]) uniform +[[ + anno::display_name("Height of texture"), + anno::description("Returns the height of the input texture in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Height"), + icon(".icons/texture_height.svg"), + anno::ui_order(142) +]] +{ return tex::height(tex); } + +export int height( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose tile height is queried.") + ]], + int2 uv_tile = int2(0, 0) [[ + anno::description("UDIM tile index as (u, v).") + ]]) uniform +[[ + anno::display_name("Height of a texture tile"), + anno::description("Returns the height of the specified texture tile in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Height"), + icon(".icons/texture_height.svg"), + anno::ui_order(144) +]] +{ return tex::height(tex,uv_tile); } + +export float2 transform_st( + float rotation = 0.0 [[ + anno::description("Rotation angle in radians.") + ]], + float2 translation = float2(0.0) [[ + anno::description("Translation offset applied after rotation and scaling.") + ]], + float2 scale = float2(1.0) [[ + anno::description("Scale factor applied per coordinate axis.") + ]], + float2 st = float2(0.0) [[ + anno::description("Input 2D coordinate to transform.") + ]] +) +[[ + anno::display_name("Transform 2D"), + anno::description("Applies rotation, scaling, and translation to a 2D coordinate."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform"), + icon(".icons/transform.svg"), + anno::ui_order(1019) +]] +{ + float s = math::sin(rotation); + float c = math::cos(rotation); + float2 st_t=st; + st_t = float2(s*st_t.x+c*st_t.y,s*st_t.y-c*st_t.x); + return st_t*scale+ translation; +} + +export color biased_color_blend( + float w1 = 0.0 [[ + anno::description("Weight for the first input color.") + ]], + color c1 = color(0.0) [[ + anno::description("First input color.") + ]], + float w2 = 0.0 [[ + anno::description("Weight for the second input color.") + ]], + color c2 = color(0.0) [[ + anno::description("Second input color.") + ]], + float w3 = 0.0 [[ + anno::description("Weight for the third input color.") + ]], + color c3 = color(0.0) [[ + anno::description("Third input color.") + ]], + color mean = color(0.5) [[ + anno::description("Expected average color used to preserve contrast in the biased blend.") + ]] +) +[[ + anno::display_name("Biased color blend"), + anno::description("Blends up to three colors using weights; set mean to the expected average to preserve contrast when mixing textures."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Blend"), + icon(".icons/biased_color_blend.svg"), + anno::ui_order(539) +]] +{ + color o=w1*c1+w2*c2+w3*c3; + float s=w1+w2+w3; + float s2=w1*w1+w2*w2+w3*w3; +return mean + (o-s*mean)/ math::sqrt(s2); +} + + +export float lookup_float( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(100) +]] +{ return tex::lookup_float( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + +export float3 lookup_float3( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float3"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(110) +]] +{ return tex::lookup_float3( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +export float4 lookup_float4( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float4"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(120) +]] { return tex::lookup_float4( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +export color lookup_color( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup color"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(130) +]] { return tex::lookup_color( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +// check for valid resource +export bool texture_isvalid( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to validate.") + ]]) uniform +[[ + anno::display_name("Is texture valid?"), + anno::description("Returns true when the provided texture handle is valid and can be sampled."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info"), + icon(".icons/texture_isvalid.svg"), + anno::ui_order(140) +]] +{ return tex::texture_isvalid(tex); } + + +//exports from state: +export float3 position() +[[ + anno::display_name("Hit position"), + anno::description("Returns the current shading position in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/position.svg"), + anno::ui_order(1012) +]] +{ return state::position(); } + +export float3 normal() +[[ + anno::display_name("Shade normal"), + anno::description("Returns the current shading normal in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/normal.svg"), + anno::ui_order(1013) +]] +{ return state::normal(); } + +//new: quick access to xy: +export float2 texture_coordinate_2d( + uniform int i = 0 [[ + anno::description("Texture coordinate set index.") + ]]) +[[ + anno::display_name("Texture coordinate 2D"), + anno::description("Returns authored texture coordinates from the selected texture coordinate set."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Coordinate"), + icon(".icons/texture_coordinate.svg"), + anno::ui_order(1010) +]] +{ return xy(state::texture_coordinate(i)); } + +export float3 texture_coordinate_3d( + uniform int i = 0 [[ + anno::description("Texture coordinate set index.") + ]]) +[[ + anno::display_name("Texture coordinate 3D"), + anno::description("Returns authored texture coordinates from the selected texture coordinate set."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Coordinate"), + icon(".icons/texture_coordinate.svg"), + anno::ui_order(1011) +]] +{ return state::texture_coordinate(i); } + +export float3 texture_tangent_u( + uniform int i = 0 [[ + anno::description("Texture coordinate set index used to derive the U tangent.") + ]]) +[[ + anno::display_name("Shade tangent"), + anno::description("Returns the current shading tangent (U direction) in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Tangent"), + icon(".icons/texture_tangent.svg"), + anno::ui_order(1014) +]] +{ return state::texture_tangent_u(i); } + +export float3 texture_tangent_v( + uniform int i = 0 [[ + anno::description("Texture coordinate set index used to derive the V tangent.") + ]]) +[[ + anno::display_name("Shade bi-tangent"), + anno::description("Returns the current shading bitangent (V direction) in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Tangent"), + icon(".icons/texture_tangent.svg"), + anno::ui_order(1015) +]] +{ return state::texture_tangent_v(i); } + +export float animation_time() +[[ + anno::display_name("Animation time"), + anno::description("Returns elapsed animation time in seconds from the start of the timeline."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene"), + icon(".icons/animation_time.svg"), + anno::ui_order(1030) +]] +{ return state::animation_time(); } + + +export float3 transform_point( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input point.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed point.") + ]], + float3 point=float3(0.) [[ + anno::description("Point to transform.") + ]]) +[[ + anno::display_name("Transform point"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1020) +]] +{ return state::transform_point(from, to, point); } + +export float3 transform_vector( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input vector.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed vector.") + ]], + float3 vector=float3(0.) [[ + anno::description("Vector to transform.") + ]]) +[[ + anno::display_name("Transform vector"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1021) +]] +{ return state::transform_vector(from, to, vector); } + +export float3 transform_normal( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input normal.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed normal.") + ]], + float3 normal=float3(0.,1.,0.) [[ + anno::description("Normal vector to transform.") + ]]) +[[ + anno::display_name("Transform normal"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1022) +]] +{ return state::transform_normal(from, to, normal); } + +export float transform_scale( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input scale value.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed scale value.") + ]], + float scale=0. [[ + anno::description("Scale value to transform.") + ]]) +[[ + anno::display_name("Transform scale"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1023) +]] +{ return state::transform_scale(from, to, scale); } + +float2 r2d(float2 x, float theta) +{ + theta *= math::acos(-1.0) * 2.0; + return float2( + math::cos(theta) * x[0] + math::sin(theta) * x[1], + math::cos(theta) * x[1] - math::sin(theta) * x[0]); +} + +export float3 rotate_around_x( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around X"), + anno::description("Rotates a 3D point around the X axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1024) +]] +{ + float2 v = r2d(float2(p.y, p.z), theta); + return float3(p.x, v[0], v[1]); +} + +export float3 rotate_around_y( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around Y"), + anno::description("Rotates a 3D point around the Y axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1025) +]] +{ + float2 v = r2d(float2(p.x, p.z), theta); + return float3(v[0], p.y, v[1]); +} + +export float3 rotate_around_z( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around Z"), + anno::description("Rotates a 3D point around the Z axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1026) +]] +{ + float2 v = r2d(float2(p.x, p.y), theta); + return float3(v[0], v[1], p.z); +} + +export float meters_per_scene_unit() +[[ + anno::display_name("Meters per scene unit"), + anno::description("Returns the conversion factor between scene units and meters."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene", "Units"), + icon(".icons/meters_per_scene_unit.svg"), + anno::ui_order(1031) +]] +{ return state::meters_per_scene_unit(); } + +export float scene_units_per_meter() +[[ + anno::display_name("Scene units per meter"), + anno::description("Returns the conversion factor between scene units and meters."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene", "Units"), + icon(".icons/scene_units_per_meter.svg"), + anno::ui_order(1032) +]] +{ return state::scene_units_per_meter(); } + +export int object_id() +[[ + anno::display_name("Object Id"), + anno::description("Returns the unique integer identifier of the currently shaded object."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/object_id.svg"), + anno::ui_order(1033) +]] +{ return state::object_id(); } + +//exported from math: +export color blackbody( + float temperature=6500. [[ + anno::description("Blackbody temperature in Kelvin used to compute the emitted color.") + ]]) +[[ + anno::display_name("Blackbody color"), + anno::description("Returns the RGB color of an ideal blackbody radiator at the specified temperature in Kelvin."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/blackbody.svg"), + anno::ui_order(409) +]] +{ return math::blackbody(temperature); } + +export float PI() +[[ + anno::display_name("Pi"), + anno::description("Returns the mathematical constant pi (approximately 3.141592653589793)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Constants"), + icon(".icons/PI.svg"), + anno::ui_order(1007) +]] +{ return math::PI; } + +export int abs(int a=0) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(350) +]] +{ return math::abs(a); } + +export float abs(float a=0.) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(351) +]] +{ return math::abs(a); } + +export float2 abs(float2 a=float2(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(352) +]] +{ return math::abs(a); } + +export float3 abs(float3 a=float3(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(353) +]] +{ return math::abs(a); } + +export float4 abs(float4 a=float4(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(354) +]] +{ return math::abs(a); } + +export color abs(color a=color(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(355) +]] +{ return math::abs(a); } + +export float acos(float a=0.) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(360) +]] +{ return math::acos(a); } + +export float2 acos(float2 a=float2(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(361) +]] +{ return math::acos(a); } + +export float3 acos(float3 a=float3(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(362) +]] +{ return math::acos(a); } + +export float4 acos(float4 a=float4(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(363) +]] +{ return math::acos(a); } + + +export float asin(float a=0.) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(370) +]] +{ return math::asin(a); } + +export float2 asin(float2 a=float2(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(371) +]] +{ return math::asin(a); } + +export float3 asin(float3 a=float3(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(372) +]] +{ return math::asin(a); } + +export float4 asin(float4 a=float4(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(373) +]] +{ return math::asin(a); } + +export float atan(float a=0.) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(380) +]] +{ return math::atan(a); } + +export float2 atan(float2 a=float2(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(381) +]] +{ return math::atan(a); } + +export float3 atan(float3 a=float3(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(382) +]] +{ return math::atan(a); } + +export float4 atan(float4 a=float4(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(383) +]] +{ return math::atan(a); } + +export float atan2( + float y=0. [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float x=0. [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(390) +]] +{ return math::atan2(y,x); } + +export float2 atan2( + float2 y=float2(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float2 x=float2(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(391) +]] +{ return math::atan2(y,x); } + +export float3 atan2( + float3 y=float3(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float3 x=float3(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(392) +]] +{ return math::atan2(y,x); } + +export float4 atan2( + float4 y=float4(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float4 x=float4(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(393) +]] +{ return math::atan2(y,x); } + +export float average(float2 a=float2(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(400) +]] +{ return math::average(a); } + +export float average(float3 a=float3(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(401) +]] +{ return math::average(a); } + +export float average(float4 a=float4(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(402) +]] +{ return math::average(a); } + +export float average(color a=color(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(403) +]] +{ return math::average(a); } + +export float ceil(float a=0.) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(410) +]] +{ return math::ceil(a); } + +export float2 ceil(float2 a=float2(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(411) +]] +{ return math::ceil(a); } + +export float3 ceil(float3 a=float3(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(411) +]] +{ return math::ceil(a); } + +export float4 ceil(float4 a=float4(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(412) +]] +{ return math::ceil(a); } + +export int clamp( + int a=0 [[anno::description("Input value to clamp.")]], + int min=0 [[anno::description("Lower bound of the output range.")]], + int max=1 [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(420) +]] +{ return math::clamp(a,min,max); } + +export float clamp( + float a=0. [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(421) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float2 min=float2(0.) [[anno::description("Lower bound of the output range.")]], + float2 max=float2(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(422) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float3 min=float3(0.) [[anno::description("Lower bound of the output range.")]], + float3 max=float3(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(423) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float4 min=float4(0.) [[anno::description("Lower bound of the output range.")]], + float4 max=float4(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(424) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + color min=color(0.) [[anno::description("Lower bound of the output range.")]], + color max=color(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(425) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float2 min=float2(0.) [[anno::description("Lower bound of the output range.")]], + float max=1. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(426) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float2 max=float2(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(427) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=1. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(428) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float3 min=float3(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(429) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float3 max=float3(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(430) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(431) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float4 min=float4(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(432) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float4 max=float4(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(433) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(434) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + color min=color(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(435) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + color max=color(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(436) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(437) +]] +{ return math::clamp(a,min,max); } + +export float cos(float a=0.) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(440) +]] +{ return math::cos(a); } + +export float2 cos(float2 a=float2(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(441) +]] +{ return math::cos(a); } + +export float3 cos(float3 a=float3(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(442) +]] +{ return math::cos(a); } + +export float4 cos(float4 a=float4(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(443) +]] +{ return math::cos(a); } + +export float3 cross(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Cross"), + anno::description("Returns the 3D cross product of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/cross_product.svg"), + anno::ui_order(449) +]] +{ return math::cross(a,b); } + +export float degrees( + float a=0. [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(450) +]] +{ return math::degrees(a); } + +export float2 degrees( + float2 a=float2(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(451) +]] +{ return math::degrees(a); } + +export float3 degrees( + float3 a=float3(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(452) +]] +{ return math::degrees(a); } + +export float4 degrees( + float4 a=float4(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(453) +]] +{ return math::degrees(a); } + +export float distance(float a=0., float b=0.) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(460) +]] +{ return math::distance(a,b); } + +export float distance(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(461) +]] +{ return math::distance(a,b); } + +export float distance(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(462) +]] +{ return math::distance(a,b); } + +export float distance(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(463) +]] +{ return math::distance(a,b); } + +export float dot(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(470) +]] +{ return math::dot(a,b); } + +export float dot(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(471) +]] +{ return math::dot(a,b); } + +export float dot(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(472) +]] +{ return math::dot(a,b); } + +export float exp(float a=0.) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(480) +]] +{ return math::exp(a); } + +export float2 exp(float2 a=float2(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(481) +]] +{ return math::exp(a); } + +export float3 exp(float3 a=float3(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(481) +]] +{ return math::exp(a); } + +export float4 exp(float4 a=float4(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(482) +]] +{ return math::exp(a); } + +export color exp(color a=color(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(483) +]] +{ return math::exp(a); } + +export float exp2(float a=0.) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(490) +]] +{ return math::exp2(a); } + +export float2 exp2(float2 a=float2(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(491) +]] +{ return math::exp2(a); } + +export float3 exp2(float3 a=float3(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(492) +]] +{ return math::exp2(a); } + +export float4 exp2(float4 a=float4(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(493) +]] +{ return math::exp2(a); } + +export color exp2(color a=color(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(494) +]] +{ return math::exp2(a); } + +export float floor(float a=0.) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(500) +]] +{ return math::floor(a); } + +export float2 floor(float2 a=float2(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(501) +]] +{ return math::floor(a); } + +export float3 floor(float3 a=float3(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(502) +]] +{ return math::floor(a); } + +export float4 floor(float4 a=float4(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(503) +]] +{ return math::floor(a); } + +export float fmod( + float a=0. [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(510) +]] +{ return math::fmod(a,b); } + +export float2 fmod( + float2 a=float2(0.) [[anno::description("Dividend input.")]], + float2 b=float2(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(511) +]] +{ return math::fmod(a,b); } + +export float3 fmod( + float3 a=float3(0.) [[anno::description("Dividend input.")]], + float3 b=float3(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(512) +]] +{ return math::fmod(a,b); } + +export float4 fmod( + float4 a=float4(0.) [[anno::description("Dividend input.")]], + float4 b=float4(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(513) +]] +{ return math::fmod(a,b); } + +export float2 fmod( + float2 a=float2(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(514) +]] +{ return math::fmod(a,b); } + +export float3 fmod( + float3 a=float3(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(515) +]] +{ return math::fmod(a,b); } + +export float4 fmod( + float4 a=float4(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(516) +]] +{ return math::fmod(a,b); } + +export float frac(float a=0.) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(520) +]] +{ return math::frac(a); } + +export float2 frac(float2 a=float2(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(521) +]] +{ return math::frac(a); } + +export float3 frac(float3 a=float3(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(522) +]] +{ return math::frac(a); } + +export float4 frac(float4 a=float4(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(523) +]] +{ return math::frac(a); } + +export float length(float2 a=float2(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(530) +]] +{ return math::length(a); } + +export float length(float3 a=float3(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(531) +]] +{ return math::length(a); } + +export float length(float4 a=float4(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(532) +]] +{ return math::length(a); } + +export float lerp( + float a=0. [[anno::description("Start value at interpolation factor 0.")]], + float b=1. [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(540) +]] +{ return math::lerp(a,b,l); } + +export float2 lerp( + float2 a=float2(0.) [[anno::description("Start value at interpolation factor 0.")]], + float2 b=float2(1.) [[anno::description("End value at interpolation factor 1.")]], + float2 l=float2(0.)[[anno::soft_range(float2(0.0),float2(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(541) +]] +{ return math::lerp(a,b,l); } + +export float3 lerp( + float3 a=float3(0.) [[anno::description("Start value at interpolation factor 0.")]], + float3 b=float3(1.) [[anno::description("End value at interpolation factor 1.")]], + float3 l=float3(0.)[[anno::soft_range(float3(0.0),float3(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(542) +]] +{ return math::lerp(a,b,l); } + +export float4 lerp( + float4 a=float4(0.) [[anno::description("Start value at interpolation factor 0.")]], + float4 b=float4(1.) [[anno::description("End value at interpolation factor 1.")]], + float4 l=float4(0.)[[anno::soft_range(float4(0.0),float4(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(543) +]] +{ return math::lerp(a,b,l); } + +export float2 lerp( + float2 a=float2(0.) [[anno::description("Start value at interpolation factor 0.")]], + float2 b=float2(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(544) +]] +{ return math::lerp(a,b,l); } + +export float3 lerp( + float3 a=float3(0.) [[anno::description("Start value at interpolation factor 0.")]], + float3 b=float3(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(545) +]] +{ return math::lerp(a,b,l); } + +export float4 lerp( + float4 a=float4(0.) [[anno::description("Start value at interpolation factor 0.")]], + float4 b=float4(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(546) +]] +{ return math::lerp(a,b,l); } + +export color lerp( + color a=color(0.) [[anno::description("Start value at interpolation factor 0.")]], + color b=color(1.) [[anno::description("End value at interpolation factor 1.")]], + color l=color(0.)[[anno::soft_range(color(0.0),color(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(547) +]] +{ return math::lerp(a,b,l); } + +export color lerp( + color a=color(0.) [[anno::description("Start value at interpolation factor 0.")]], + color b=color(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(548) +]] +{ return math::lerp(a,b,l); } + +export float log(float a=1.) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(550) +]] +{ return math::log(a); } + +export float2 log(float2 a=float2(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(551) +]] +{ return math::log(a); } + +export float3 log(float3 a=float3(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(552) +]] +{ return math::log(a); } + +export float4 log(float4 a=float4(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(553) +]] +{ return math::log(a); } + +export color log(color a=color(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(554) +]] +{ return math::log(a); } + +export float log2(float a=1.) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(560) +]] +{ return math::log2(a); } + +export float2 log2(float2 a=float2(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(561) +]] +{ return math::log2(a); } + +export float3 log2(float3 a=float3(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(562) +]] +{ return math::log2(a); } + +export float4 log2(float4 a=float4(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(563) +]] +{ return math::log2(a); } + +export color log2(color a=color(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(564) +]] +{ return math::log2(a); } + +export float log10(float a=1.) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(570) +]] +{ return math::log10(a); } + +export float2 log10(float2 a=float2(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(571) +]] +{ return math::log10(a); } + +export float3 log10(float3 a=float3(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(572) +]] +{ return math::log10(a); } + +export float4 log10(float4 a=float4(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(573) +]] +{ return math::log10(a); } + +export color log10(color a=color(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(574) +]] +{ return math::log10(a); } + +export float luminance(float3 a=float3(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(580) +]] +{ return math::luminance(a); } + +export float luminance(color a=color(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(581) +]] +{ return math::luminance(a); } + +export float luminance(float4 a=float4(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(582) +]] +{ return math::luminance(float3(a.x,a.y,a.z)); } + +export int max(int a=0, int b=0) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(590) +]] +{ return math::max(a,b); } + +export float max(float a=0., float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(591) +]] +{ return math::max(a,b); } + +export float2 max(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(592) +]] +{ return math::max(a,b); } + +export float3 max(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(593) +]] +{ return math::max(a,b); } + +export float4 max(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(594) +]] +{ return math::max(a,b); } + +export float2 max(float2 a=float2(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(595) +]] +{ return math::max(a,b); } + +export float3 max(float3 a=float3(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(596) +]] +{ return math::max(a,b); } + +export float4 max(float4 a=float4(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(597) +]] +{ return math::max(a,b); } + +export float2 max(float a=0., float2 b=float2(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(598) +]] +{ return math::max(a,b); } + +export float3 max(float a=0., float3 b=float3(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(599) +]] +{ return math::max(a,b); } + +export float4 max(float a=0., float4 b=float4(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(600) +]] +{ return math::max(a,b); } + +export color max(color a=color(0.), color b=color(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(601) +]] +{ return math::max(a,b); } + +export color max(float a=0., color b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(602) +]] +{ return math::max(a,b); } + +export color max(color a=color(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(603) +]] +{ return math::max(a,b); } + +export float max_value(float2 a=float2(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(610) +]] +{ return math::max_value(a); } + +export float max_value(float3 a=float3(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(611) +]] +{ return math::max_value(a); } + +export float max_value(float4 a=float4(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(612) +]] +{ return math::max_value(a); } + +export float max_value(color a=color(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest channel value in the input color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(613) +]] +{ return math::max_value(a); } + +export int min(int a=0, int b=0) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(620) +]] +{ return math::min(a,b); } + +export float min(float a=0., float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(621) +]] +{ return math::min(a,b); } + +export float2 min(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(622) +]] +{ return math::min(a,b); } + +export float3 min(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(623) +]] +{ return math::min(a,b); } + +export float4 min(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(624) +]] +{ return math::min(a,b); } + +export float2 min(float2 a=float2(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(625) +]] +{ return math::min(a,b); } + +export float3 min(float3 a=float3(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(626) +]] +{ return math::min(a,b); } + +export float4 min(float4 a=float4(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(627) +]] +{ return math::min(a,b); } + +export float2 min(float a=0., float2 b=float2(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(628) +]] +{ return math::min(a,b); } + +export float3 min(float a=0., float3 b=float3(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(629) +]] +{ return math::min(a,b); } + +export float4 min(float a=0., float4 b=float4(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(630) +]] +{ return math::min(a,b); } + +export color min(color a=color(0.), color b=color(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(631) +]] +{ return math::min(a,b); } + +export color min(float a=0., color b=color(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(632) +]] +{ return math::min(a,b); } + +export color min(color a=color(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(633) +]] +{ return math::min(a,b); } + +export float min_value(float a=0.) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(640) +]] +{ return math::min_value(a); } + +export float min_value(float2 a=float2(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(641) +]] +{ return math::min_value(a); } + +export float min_value(float3 a=float3(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(642) +]] +{ return math::min_value(a); } + +export float min_value(float4 a=float4(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(643) +]] +{ return math::min_value(a); } + +export float min_value(color a=color(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest channel value in the input color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(644) +]] +{ return math::min_value(a); } + +export float2 normalize( + float2 a=float2(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(650) +]] +{ return math::normalize(a); } + +export float3 normalize( + float3 a=float3(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(651) +]] +{ return math::normalize(a); } + +export float4 normalize( + float4 a=float4(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(652) +]] +{ return math::normalize(a); } + +export int pow( + int a=0 [[anno::description("Base value.")]], + int b=0 [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(660) +]] +{ return math::pow(a,b); } + +export float pow( + float a=0. [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(661) +]] +{ return math::pow(a,b); } + +export float2 pow( + float2 a=float2(0.) [[anno::description("Base value.")]], + float2 b=float2(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(662) +]] +{ return math::pow(a,b); } + +export float3 pow( + float3 a=float3(0.) [[anno::description("Base value.")]], + float3 b=float3(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(663) +]] +{ return math::pow(a,b); } + +export float4 pow( + float4 a=float4(0.) [[anno::description("Base value.")]], + float4 b=float4(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(664) +]] +{ return math::pow(a,b); } + +export float2 pow( + float2 a=float2(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(665) +]] +{ return math::pow(a,b); } + +export float3 pow( + float3 a=float3(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(666) +]] +{ return math::pow(a,b); } + +export float4 pow( + float4 a=float4(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(667) +]] +{ return math::pow(a,b); } + +export color pow( + color a=color(0.) [[anno::description("Base value.")]], + color b=color(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(668) +]] +{ return math::pow(a,b); } + +export color pow( + color a=color(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(669) +]] +{ return math::pow(a,b); } + +export float radians( + float a=0. [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(670) +]] +{ return math::radians(a); } + +export float2 radians( + float2 a=float2(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(671) +]] +{ return math::radians(a); } + +export float3 radians( + float3 a=float3(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(672) +]] +{ return math::radians(a); } + +export float4 radians( + float4 a=float4(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(673) +]] +{ return math::radians(a); } + +export float round(float a=0.) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(690) +]] +{ return math::round(a); } + +export float2 round(float2 a=float2(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(691) +]] +{ return math::round(a); } + +export float3 round(float3 a=float3(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(692) +]] +{ return math::round(a); } + +export float4 round(float4 a=float4(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(693) +]] +{ return math::round(a); } + +export float rsqrt(float a=0.) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(700) +]] +{ return math::rsqrt(a); } + +export float2 rsqrt(float2 a=float2(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(701) +]] +{ return math::rsqrt(a); } + +export float3 rsqrt(float3 a=float3(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(702) +]] +{ return math::rsqrt(a); } + +export float4 rsqrt(float4 a=float4(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(703) +]] +{ return math::rsqrt(a); } + +export color rsqrt(color a=color(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(704) +]] +{ return math::rsqrt(a); } + +export float saturate( + float a=0. [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(710) +]] +{ return math::saturate(a); } + +export float2 saturate( + float2 a=float2(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(711) +]] +{ return math::saturate(a); } + +export float3 saturate( + float3 a=float3(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(712) +]] +{ return math::saturate(a); } + +export float4 saturate( + float4 a=float4(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(713) +]] +{ return math::saturate(a); } + +export color saturate( + color a=color(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(714) +]] +{ return math::saturate(a); } + +export int sign(int a=0) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(720) +]] +{ return math::sign(a); } + +export float sign(float a=0.) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(721) +]] +{ return math::sign(a); } + +export float2 sign(float2 a=float2(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(722) +]] +{ return math::sign(a); } + +export float3 sign(float3 a=float3(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(723) +]] +{ return math::sign(a); } + +export float4 sign(float4 a=float4(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(724) +]] +{ return math::sign(a); } + +export float sin(float a=0.) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(730) +]] +{ return math::sin(a); } + +export float2 sin(float2 a=float2(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(731) +]] +{ return math::sin(a); } + +export float3 sin(float3 a=float3(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(732) +]] +{ return math::sin(a); } + +export float4 sin(float4 a=float4(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(733) +]] +{ return math::sin(a); } + +export float2 sincos( + float a=0. [[ + anno::description("Input angle in radians.") + ]]) +[[ + anno::display_name("SinCos"), + anno::description("Computes sine and cosine for the same input angle and returns float2(sin, cos)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/sincos.svg"), + anno::ui_order(739) +]] +{ float[]b = math::sincos(a); return float2(b[0],b[1]); } + +export float smoothstep( + float a=0. [[ + anno::description("Lower edge of the interpolation range.") + ]], + float b=1. [[ + anno::description("Upper edge of the interpolation range.") + ]], + float l=0. [[ + anno::description("Input value to evaluate against the interpolation range.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(740) +]] +{ return math::smoothstep(a,b,l); } + +export float2 smoothstep( + float2 a=float2(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float2 l=float2(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(741) +]] +{ return math::smoothstep(a,b,l); } + +export float3 smoothstep( + float3 a=float3(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float3 l=float3(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(742) +]] +{ return math::smoothstep(a,b,l); } + +export float4 smoothstep( + float4 a=float4(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float4 l=float4(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(743) +]] +{ return math::smoothstep(a,b,l); } + +export float2 smoothstep( + float2 a=float2(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(744) +]] +{ return math::smoothstep(a,b,l); } + +export float3 smoothstep( + float3 a=float3(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(745) +]] +{ return math::smoothstep(a,b,l); } + +export float4 smoothstep( + float4 a=float4(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(746) +]] +{ return math::smoothstep(a,b,l); } + +export float sqrt(float a=0.) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(750) +]] +{ return math::sqrt(a); } + +export float2 sqrt(float2 a=float2(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(751) +]] +{ return math::sqrt(a); } + +export float3 sqrt(float3 a=float3(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(752) +]] +{ return math::sqrt(a); } + +export float4 sqrt(float4 a=float4(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(753) +]] +{ return math::sqrt(a); } + +export color sqrt(color a=color(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(754) +]] +{ return math::sqrt(a); } + +export float step( + float a=0. [[ + anno::description("Threshold value.") + ]], + float b=0. [[ + anno::description("Input compared against the threshold.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(760) +]] +{ return math::step(a,b); } + +export float2 step( + float2 a=float2(0.) [[ + anno::description("Threshold value per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(761) +]] +{ return math::step(a,b); } + +export float3 step( + float3 a=float3(0.) [[ + anno::description("Threshold value per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(762) +]] +{ return math::step(a,b); } + +export float4 step( + float4 a=float4(0.) [[ + anno::description("Threshold value per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(763) +]] +{ return math::step(a,b); } + +export float tan(float a=0.) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(770) +]] +{ return math::tan(a); } + +export float2 tan(float2 a=float2(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(771) +]] +{ return math::tan(a); } + +export float3 tan(float3 a=float3(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(772) +]] +{ return math::tan(a); } + +export float4 tan(float4 a=float4(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(773) +]] +{ return math::tan(a); } + +export float remap( + float a=0. [[ + anno::description("Input value in the source range.") + ]], + float start_old=0. [[ + anno::description("Lower bound of the source range.") + ]], + float end_old=1. [[ + anno::description("Upper bound of the source range.") + ]], + float start_new=0. [[ + anno::description("Lower bound of the destination range.") + ]], + float end_new=1. [[ + anno::description("Upper bound of the destination range.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(680) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float2 remap( + float2 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float2 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float2 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float2 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float2 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(681) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float3 remap( + float3 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float3 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float3 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float3 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float3 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(682) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float4 remap( + float4 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float4 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float4 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float4 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float4 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(683) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_Finger1step_JFT.usd b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_Finger1step_JFT.usd new file mode 100644 index 0000000000000000000000000000000000000000..e6010dd47a09b1a0db1917fbadb721a9fc1169a0 Binary files /dev/null and b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_Finger1step_JFT.usd differ diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd new file mode 100644 index 0000000000000000000000000000000000000000..fd51438ea6c43c96a7a3ef8457d24330a31e0815 --- /dev/null +++ b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b849add675a959bf108b04281a4283632388698d82b34ab5c4ec9d42dcf8f4c1 +size 3373601 diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd new file mode 100644 index 0000000000000000000000000000000000000000..a2df6783760734add37dd0b41aab5c49bd7dcde8 --- /dev/null +++ b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:865e828faa230a75c97016c1cc647ce236db6a3d84199c109923287cb5ef683c +size 230495 diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd new file mode 100644 index 0000000000000000000000000000000000000000..fa1165704a30e865664c974651042cca5cf95f69 --- /dev/null +++ b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3922f86499bd9b399182dca876a0e4295780a33b611267988d6a4570237ba11b +size 143957 diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd new file mode 100644 index 0000000000000000000000000000000000000000..0f053d53eed65a7e87812bc8ad83faa19ea3e498 --- /dev/null +++ b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ea3296bde39458b1dd01323d391115e6d6535065247df6c4d2108ee7f44f1ea +size 136079 diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_fingertipsstep_JFD.usd b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_fingertipsstep_JFD.usd new file mode 100644 index 0000000000000000000000000000000000000000..4839d73ef712c53c92387d83c9e5339b268a03ee Binary files /dev/null and b/universalrobots_ur5e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_fingertipsstep_JFD.usd differ diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_base.usda b/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_base.usda new file mode 100644 index 0000000000000000000000000000000000000000..d81d7b2976d3dfe7d2ac2fe871ddfb479170aa4f --- /dev/null +++ b/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_base.usda @@ -0,0 +1,360 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "Robotiq_2F_85" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def Xform "Robotiq_2F_85" ( + kind = "assembly" +) +{ + def Xform "Robotiq_2F_85" ( + kind = "assembly" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "base_link" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + delete apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "PhysxConvexHullCollisionAPI", "PhysxConvexDecompositionCollisionAPI"] + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, 0.5000000000000001, 0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "grip_frame" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.13371706760793903) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "left_outer_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, 0.5000000000000001, 0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "left_outer_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, 0.5000000000000001, 0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "left_inner_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, 0.5000000000000001, 0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "left_inner_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, 0.5000000000000001, 0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "right_outer_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, -0.5000000000000001, -0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "right_outer_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, -0.5000000000000001, -0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "right_inner_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, -0.5000000000000001, -0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "right_inner_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, -0.5000000000000001, -0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } +} + +def Scope "Meshes" +{ + token visibility = "invisible" + + def Xform "base_link" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Defeatured_2F_85_PAD_OPEN_basestep_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "inner_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Defeatured_2F_85_PAD_OPEN_finger4step_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "Defeatured_2F_85_PAD_OPEN_fingertipsstep_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_fingertipsstep_JFD.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "inner_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Defeatured_2F_85_PAD_OPEN_finger3step_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "outer_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Defeatured_2F_85_PAD_OPEN_finger2step_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "outer_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Defeatured_2F_85_PAD_OPEN_Finger1step_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_Finger1step_JFT.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } +} + diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_edit.usd b/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_edit.usd new file mode 100644 index 0000000000000000000000000000000000000000..60771d4e67d017936fafb3ea4d1f75c1b918f2eb Binary files /dev/null and b/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_edit.usd differ diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_loop.usda b/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_loop.usda new file mode 100644 index 0000000000000000000000000000000000000000..50bbaffceaf844c95754294e3faa291504784c51 --- /dev/null +++ b/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_loop.usda @@ -0,0 +1,343 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "Robotiq_2F_85" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + subLayers = [ + @./Robotiq_2F_85_base.usda@ + ] + upAxis = "Z" +) + +def Xform "Robotiq_2F_85" ( + kind = "assembly" +) +{ + over Xform "Robotiq_2F_85" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + kind = "assembly" + ) + { + def Scope "Joints" + { + def PhysicsRevoluteJoint "finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0.0002 + float drive:angular:physics:maxForce = 16.5 + float drive:angular:physics:stiffness = 0.17 + float drive:angular:physics:targetPosition = 0 + float drive:angular:physics:targetVelocity = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.0306, 0.05466) + point3f physics:localPos1 = (0, -0.0306, 0.05466) + quatf physics:localRot0 = (0.5, 0.5, -0.5, -0.5) + quatf physics:localRot1 = (0.5, 0.5, -0.5, -0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 75 + } + + def PhysicsRevoluteJoint "right_outer_knuckle_joint" ( + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 5000 + float drive:angular:physics:maxForce = 5 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.0306, 0.05466) + point3f physics:localPos1 = (0, 0.0306, 0.05466) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 75 + } + + def PhysicsRevoluteJoint "right_outer_finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.06213, 0.0509) + point3f physics:localPos1 = (0, 0.06213, 0.0509) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "right_inner_finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0.00001 + float drive:angular:physics:maxForce = 0.5 + float drive:angular:physics:stiffness = 0.0002 + float drive:angular:physics:targetPosition = 45 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.06776, 0.09809) + point3f physics:localPos1 = (0, 0.06776, 0.09809) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -inf + float physics:upperLimit = inf + } + + def PhysicsRevoluteJoint "right_inner_knuckle_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + uniform bool physics:excludeFromArticulation = 1 + point3f physics:localPos0 = (0, 0.0127, 0.06118) + point3f physics:localPos1 = (0, 0.0127, 0.06118) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -inf + float physics:upperLimit = inf + } + + def PhysicsRevoluteJoint "right_inner_finger_knuckle_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.04986, 0.1046) + point3f physics:localPos1 = (0, 0.04986, 0.1046) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + } + + def PhysicsRevoluteJoint "left_outer_finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.06213, 0.0509) + point3f physics:localPos1 = (0, -0.06213, 0.0509) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "left_inner_finger_knuckle_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.04986, 0.1046) + point3f physics:localPos1 = (0, -0.04986, 0.1046) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -inf + float physics:upperLimit = inf + } + + def PhysicsRevoluteJoint "left_inner_finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0.00001 + float drive:angular:physics:maxForce = 0.5 + float drive:angular:physics:stiffness = 0.0002 + float drive:angular:physics:targetPosition = 45 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.06776, 0.09809) + point3f physics:localPos1 = (0, -0.06776, 0.09809) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -inf + float physics:upperLimit = inf + } + + def PhysicsRevoluteJoint "left_inner_knuckle_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + uniform bool physics:excludeFromArticulation = 1 + point3f physics:localPos0 = (0, -0.0127, 0.06118) + point3f physics:localPos1 = (0, -0.0127, 0.06118) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -inf + float physics:upperLimit = inf + } + } + + over "base_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + + over "left_outer_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "left_outer_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + + over "left_inner_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "left_inner_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "right_outer_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "right_outer_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + + over "right_inner_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + + over "right_inner_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + } +} + +over "Meshes" +{ + over "base_link" + { + over "Defeatured_2F_85_PAD_OPEN_basestep_01" + { + over "Defeatured_2F_85_PAD_OPEN_basestep" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "inner_finger" + { + over "Defeatured_2F_85_PAD_OPEN_finger4step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger4step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + + over "Defeatured_2F_85_PAD_OPEN_fingertipsstep_01" + { + over "Defeatured_2F_85_PAD_OPEN_fingertipsstep" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "inner_knuckle" + { + over "Defeatured_2F_85_PAD_OPEN_finger3step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger3step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "outer_finger" + { + over "Defeatured_2F_85_PAD_OPEN_finger2step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger2step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "outer_knuckle" + { + over "Defeatured_2F_85_PAD_OPEN_Finger1step_01" + { + over "Defeatured_2F_85_PAD_OPEN_Finger1step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } +} + diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_mimic.usda b/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_mimic.usda new file mode 100644 index 0000000000000000000000000000000000000000..a57110fc52b08970cfe8cf2e35b0d380cc20016f --- /dev/null +++ b/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_mimic.usda @@ -0,0 +1,343 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "Robotiq_2F_85" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + subLayers = [ + @./Robotiq_2F_85_base.usda@ + ] + upAxis = "Z" +) + +def Xform "Robotiq_2F_85" ( + kind = "assembly" +) +{ + over Xform "Robotiq_2F_85" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + kind = "assembly" + ) + { + def Scope "Joints" + { + def PhysicsRevoluteJoint "finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0.0002 + float drive:angular:physics:maxForce = 26 + float drive:angular:physics:stiffness = 3 + float drive:angular:physics:targetPosition = 0 + float drive:angular:physics:targetVelocity = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.0306, 0.05466) + point3f physics:localPos1 = (0, -0.0306, 0.05466) + quatf physics:localRot0 = (0.5, 0.5, -0.5, -0.5) + quatf physics:localRot1 = (0.5, 0.5, -0.5, -0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 47 + } + + def PhysicsRevoluteJoint "right_outer_knuckle_joint" ( + active = true + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.0306, 0.05466) + point3f physics:localPos1 = (0, 0.0306, 0.05466) + quatf physics:localRot0 = (0.5, -0.5, 0.5, -0.5) + quatf physics:localRot1 = (0.5, -0.5, 0.5, -0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 47 + } + + def PhysicsRevoluteJoint "right_inner_finger_joint" ( + active = true + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 0 + float drive:angular:physics:stiffness = 0 + float drive:angular:physics:targetPosition = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.06776, 0.09809) + point3f physics:localPos1 = (0, 0.06776, 0.09809) + quatf physics:localRot0 = (0.5, 0.5, -0.5, -0.5) + quatf physics:localRot1 = (0.5, 0.5, -0.5, -0.5) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "right_inner_finger_knuckle_joint" ( + active = true + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float drive:angular:physics:targetPosition = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.04986, 0.1046) + point3f physics:localPos1 = (0, 0.04986, 0.1046) + quatf physics:localRot0 = (0.5, 0.5, -0.5, -0.5) + quatf physics:localRot1 = (0.5, 0.5, -0.5, -0.5) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "left_inner_finger_knuckle_joint" ( + active = true + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.04986, 0.1046) + point3f physics:localPos1 = (0, -0.04986, 0.1046) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "left_inner_finger_joint" ( + active = true + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 0 + float drive:angular:physics:stiffness = 0 + float drive:angular:physics:targetPosition = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.06776, 0.09809) + point3f physics:localPos1 = (0, -0.06776, 0.09809) + quatf physics:localRot0 = (0.5, -0.5, -0.5, 0.5) + quatf physics:localRot1 = (0.5, -0.5, -0.5, 0.5) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + } + + over "base_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + + over "left_outer_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "left_outer_finger" ( + delete apiSchemas = ["PhysicsMassAPI"] + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + kind = "group" + ) + { + point3f physics:centerOfMass = (0.000005531254, -0.06595047, 0.06895309) + float3 physics:diagonalInertia = (0.0000132201985, 0.0000042931024, 0.000010880907) + float physics:mass = 0.039179202 + quatf physics:principalAxes = (0.76604444, -0.64278764, 0, 0) + + def PhysicsFixedJoint "FixedJoint" + { + rel physics:body0 = + rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + point3f physics:localPos0 = (7.4505797e-9, 7.45058e-9, 3.87445e-9) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, -5.531774e-8, -4.2146855e-8, 2.370759e-8) + quatf physics:localRot1 = (1, 0, 0, 0) + } + } + + over "left_inner_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (1.2590098e-8, -0.05424156, 0.11390199) + float3 physics:diagonalInertia = (0.000011577923, 0.00000896224, 0.0000039778333) + float physics:mass = 0.039254718 + quatf physics:principalAxes = (0.9914449, -0.13052619, 0, 0) + } + + over "left_inner_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-2.005321e-10, -0.03222066, 0.083420366) + float3 physics:diagonalInertia = (0.000011838778, 0.0000044877793, 0.00000800488) + float physics:mass = 0.027306942 + quatf physics:principalAxes = (0.9063078, -0.42261827, 0, 0) + } + + over "right_outer_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "right_outer_finger" ( + delete apiSchemas = ["PhysicsMassAPI"] + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + kind = "group" + ) + { + point3f physics:centerOfMass = (-0.000005531254, 0.06595047, 0.06895309) + float3 physics:diagonalInertia = (0.0000132201985, 0.0000042931024, 0.000010880907) + float physics:mass = 0.039179202 + quatf physics:principalAxes = (0.76604444, 0.64278764, 0, 0) + + def PhysicsFixedJoint "FixedJoint" + { + rel physics:body0 = + rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + point3f physics:localPos0 = (3.725291e-9, -7.45058e-9, -3.4324326e-9) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, -5.5317734e-8, 4.2146844e-8, -2.634178e-9) + quatf physics:localRot1 = (1, 0, 0, 0) + } + } + + over "right_inner_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + kind = "group" + ) + { + point3f physics:centerOfMass = (-1.2590098e-8, 0.05424156, 0.11390199) + float3 physics:diagonalInertia = (0.000011577923, 0.00000896224, 0.0000039778333) + float physics:mass = 0.039254718 + quatf physics:principalAxes = (0.9914449, 0.13052619, 0, 0) + } + + over "right_inner_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + kind = "group" + ) + { + point3f physics:centerOfMass = (2.005321e-10, 0.03222066, 0.083420366) + float3 physics:diagonalInertia = (0.000011838778, 0.0000044877793, 0.00000800488) + float physics:mass = 0.027306942 + quatf physics:principalAxes = (0.9063078, 0.42261827, 0, 0) + } + } +} + +over "Meshes" +{ + over "base_link" + { + over "Defeatured_2F_85_PAD_OPEN_basestep_01" + { + over "Defeatured_2F_85_PAD_OPEN_basestep" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "inner_finger" + { + over "Defeatured_2F_85_PAD_OPEN_finger4step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger4step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + + over "Defeatured_2F_85_PAD_OPEN_fingertipsstep_01" + { + over "Defeatured_2F_85_PAD_OPEN_fingertipsstep" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "inner_knuckle" + { + over "Defeatured_2F_85_PAD_OPEN_finger3step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger3step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "outer_finger" + { + over "Defeatured_2F_85_PAD_OPEN_finger2step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger2step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "outer_knuckle" + { + over "Defeatured_2F_85_PAD_OPEN_Finger1step_01" + { + over "Defeatured_2F_85_PAD_OPEN_Finger1step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + def PhysicsCollisionGroup "CollisionGroup" + { + rel collection:colliders:includes = + rel physics:filteredGroups + } + + def PhysicsCollisionGroup "CollisionGroup_01" + { + rel collection:colliders:includes = + rel physics:filteredGroups = + } +} + diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_robot.usd b/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_robot.usd new file mode 100644 index 0000000000000000000000000000000000000000..0ff97a5489cd1825914693aa191396a9d5dcc858 Binary files /dev/null and b/universalrobots_ur5e/payloads/Gripper/dependencies/Robotiq_2F_85_robot.usd differ diff --git a/universalrobots_ur5e/payloads/Gripper/dependencies/materials.usd b/universalrobots_ur5e/payloads/Gripper/dependencies/materials.usd new file mode 100644 index 0000000000000000000000000000000000000000..6774f7ccc75fa8e297a3d2befea402c9fe033923 Binary files /dev/null and b/universalrobots_ur5e/payloads/Gripper/dependencies/materials.usd differ diff --git a/universalrobots_ur5e/payloads/Gripper/none.usda b/universalrobots_ur5e/payloads/Gripper/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..bbbe4b5c48e65d17a294d8a429b60c0bf98b1b59 --- /dev/null +++ b/universalrobots_ur5e/payloads/Gripper/none.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def "ur5e" +{ +} + diff --git a/universalrobots_ur5e/payloads/Gripper/robotiq_2f_85.usda b/universalrobots_ur5e/payloads/Gripper/robotiq_2f_85.usda new file mode 100644 index 0000000000000000000000000000000000000000..5d49e75afef5a9617072c4e45bdbd698d2bd919e --- /dev/null +++ b/universalrobots_ur5e/payloads/Gripper/robotiq_2f_85.usda @@ -0,0 +1,37 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def "ur5e" ( + customData = { + string[] variantPrimPaths = ["Gripper", "Gripper/Robotiq_2F_85", "joints/robot_gripper_joint"] + } +) +{ + over "Gripper" ( + prepend payload = @./dependencies/Robotiq_2F_85_edit.usd@ + ) + { + over "Robotiq_2F_85" + { + } + } + + over "joints" + { + over "robot_gripper_joint" + { + custom rel physics:body1 + prepend rel physics:body1 = + bool physics:jointEnabled = 1 + } + } +} + diff --git a/universalrobots_ur5e/payloads/Physics/mujoco.usda b/universalrobots_ur5e/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..445c18098518facf0deda9ec6eb9dfe3f8c97e95 --- /dev/null +++ b/universalrobots_ur5e/payloads/Physics/mujoco.usda @@ -0,0 +1,203 @@ +#usda 1.0 +( + customLayerData = { + } + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +over "ur5e" +{ + over "joints" + { + over "robot_gripper_joint" + { + } + + over "shoulder_pan_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "shoulder_lift_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "elbow_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "wrist_1_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "wrist_2_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "wrist_3_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + } + + over "base_link" + { + over "base_link" + { + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "shoulder_link" + { + over "visuals" + { + over "shoulder" + { + } + } + + over "collisions" + { + over "shoulder" + { + } + } + } + + over "upper_arm_link" + { + over "visuals" + { + over "upperarm" + { + } + } + + over "collisions" + { + over "upperarm" + { + } + } + } + + over "forearm_link" + { + over "visuals" + { + over "forearm" + { + } + } + + over "collisions" + { + over "forearm" + { + } + } + } + + over "wrist_1_link" + { + over "visuals" + { + over "wrist1" + { + } + } + + over "collisions" + { + over "wrist1" + { + } + } + } + + over "wrist_2_link" + { + over "visuals" + { + over "wrist2" + { + } + } + + over "collisions" + { + over "wrist2" + { + } + } + } + + over "wrist_3_link" + { + over "flange" + { + } + + over "ft_frame" + { + } + + over "visuals" + { + over "wrist3" + { + } + } + + over "collisions" + { + over "wrist3" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "Gripper" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/universalrobots_ur5e/payloads/Physics/none.usda b/universalrobots_ur5e/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..bbbe4b5c48e65d17a294d8a429b60c0bf98b1b59 --- /dev/null +++ b/universalrobots_ur5e/payloads/Physics/none.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def "ur5e" +{ +} + diff --git a/universalrobots_ur5e/payloads/Physics/physics.usda b/universalrobots_ur5e/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..a8691c3bdd8b327ff6cfc92c4367831f31824303 --- /dev/null +++ b/universalrobots_ur5e/payloads/Physics/physics.usda @@ -0,0 +1,346 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +over "ur5e" +{ + over "joints" + { + def PhysicsRevoluteJoint "shoulder_pan_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 9.9614 + float drive:angular:physics:maxForce = 150 + float drive:angular:physics:stiffness = 9400.501 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.1512013 + point3f physics:localPos0 = (0, 0, 0.1625) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (-4.371139e-8, 0, 0, 1) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "shoulder_lift_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 10.7333 + float drive:angular:physics:maxForce = 150 + float drive:angular:physics:stiffness = 10020.92 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.16467163 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70710677, 0.70710677, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "elbow_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 34.1945 + float drive:angular:physics:maxForce = 150 + float drive:angular:physics:stiffness = 10230.221 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 1.6371533 + point3f physics:localPos0 = (-0.425, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "wrist_1_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 13.1797 + float drive:angular:physics:maxForce = 28 + float drive:angular:physics:stiffness = 3940.629 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.63140386 + point3f physics:localPos0 = (-0.3922, 0, 0.1333) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "wrist_2_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 2.5928 + float drive:angular:physics:maxForce = 28 + float drive:angular:physics:stiffness = 3940.629 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.024436664 + point3f physics:localPos0 = (0, -0.0997, -2.0448811e-11) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70710677, 0.70710677, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "wrist_3_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0.3475 + float drive:angular:physics:maxForce = 28 + float drive:angular:physics:stiffness = 1000.0809 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.0017293784 + point3f physics:localPos0 = (0, 0.0996, -2.0428301e-11) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70710677, -0.70710677, -6.181724e-8, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsFixedJoint "robot_gripper_joint" + { + custom rel physics:body0 = + float physics:breakForce = inf + float physics:breakTorque = inf + bool physics:jointEnabled = 0 + point3f physics:localPos0 = (5.054474e-9, -5.078315e-9, -3.836155e-8) + point3f physics:localPos1 = (0.8172, 0.2329, 0.0628) + quatf physics:localRot0 = (-0.5, 0.49999997, 0.5, 0.49999997) + quatf physics:localRot1 = (0.70710677, -9.835192e-9, -2.3884143e-8, 0.70710677) + } + } + + over "base_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0, 0, 0) + float3 physics:diagonalInertia = (0.0044333315, 0.0044333315, 0.0072) + float physics:mass = 4 + quatf physics:principalAxes = (1, 0, 0, 0) + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "shoulder_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0, 0, 0) + float3 physics:diagonalInertia = (0.010267496, 0.010267496, 0.00666) + float physics:mass = 3.7 + quatf physics:principalAxes = (1, 0, 0, 0) + + over "collisions" + { + over "shoulder" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "upper_arm_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.2125, 0, 0.138) + float3 physics:diagonalInertia = (0.13388579, 0.13388579, 0.0151074) + float physics:mass = 8.393 + quatf physics:principalAxes = (0.70710677, 0, 0.70710677, 0) + + over "collisions" + { + over "upperarm" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "forearm_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.1961, 0, 0.007) + float3 physics:diagonalInertia = (0.031209355, 0.031209355, 0.0040950007) + float physics:mass = 2.275 + quatf physics:principalAxes = (0.70710677, 0, 0.70710677, 0) + + over "collisions" + { + over "forearm" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "wrist_1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0, 0, 0) + float3 physics:diagonalInertia = (0.002559899, 0.002559899, 0.0021942) + float physics:mass = 1.219 + quatf physics:principalAxes = (1, 0, 0, 0) + + over "collisions" + { + over "wrist1" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "wrist_2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0, 0, 0) + float3 physics:diagonalInertia = (0.002559899, 0.002559899, 0.0021942) + float physics:mass = 1.219 + quatf physics:principalAxes = (1, 0, 0, 0) + + over "collisions" + { + over "wrist2" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "wrist_3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0, 0, -0.022899998) + float3 physics:diagonalInertia = (0.0000989041, 0.0000989041, 0.00013211719) + float physics:mass = 0.1879 + quatf physics:principalAxes = (1, 0, 0, 0) + + over "collisions" + { + over "wrist3" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } +} + diff --git a/universalrobots_ur5e/payloads/Physics/physx.usda b/universalrobots_ur5e/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..7ad9a5bbc4ee8f4b2a2f0df1727ecc3be18af02f --- /dev/null +++ b/universalrobots_ur5e/payloads/Physics/physx.usda @@ -0,0 +1,71 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "ur5e" +{ + over "joints" + { + over "shoulder_pan_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "shoulder_lift_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "elbow_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "wrist_1_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "wrist_2_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "wrist_3_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/universalrobots_ur5e/payloads/Sensor/none.usda b/universalrobots_ur5e/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..bbbe4b5c48e65d17a294d8a429b60c0bf98b1b59 --- /dev/null +++ b/universalrobots_ur5e/payloads/Sensor/none.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def "ur5e" +{ +} + diff --git a/universalrobots_ur5e/payloads/Sensor/sensors.usda b/universalrobots_ur5e/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..9b5c392f40b598c7c8d9460eae768406262bde97 --- /dev/null +++ b/universalrobots_ur5e/payloads/Sensor/sensors.usda @@ -0,0 +1,19 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def Xform "ur" +{ +} + +def "ur5e" +{ +} + diff --git a/universalrobots_ur5e/payloads/base.usda b/universalrobots_ur5e/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..574633b4b71f7483d1b9cc07d07a884a3d895037 --- /dev/null +++ b/universalrobots_ur5e/payloads/base.usda @@ -0,0 +1,367 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "ur5e" ( + customData = { + string[] variantPrimPaths = ["joints/robot_gripper_joint"] + } +) +{ + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Scope "joints" + { + } + + def Scope "Looks" + { + } + + def Xform "base_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "base_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.70711, 0.7071035624, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "shoulder_link" + { + quatd xformOp:orient = (-4.371138828673793e-8, -0, 0, 1) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.16249999403953552) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "shoulder" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0, 0, 0.7071035624, 0.70711) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "shoulder" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0, 0, 0, 1) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "upper_arm_link" + { + quatd xformOp:orient = (-3.0908619663705394e-8, -3.0908619663705394e-8, 0.7071067690849304, 0.7071067690849304) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.16249999403953552) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "upperarm" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.000003190722816, 0.7071067671, -0.7071067952, -0.000003218820843) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.1379999965) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "upperarm" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.4999999702, 0.5000000099, -0.5000000099, -0.5000000099) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.1379999965) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "forearm_link" + { + quatd xformOp:orient = (-3.0908619663705394e-8, -3.0908619663705394e-8, 0.7071067690849304, 0.7071067690849304) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.42500001192092896, 3.715468110954134e-8, 0.16249999403953552) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "forearm" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.000003190722816, 0.7071067671, -0.7071067952, -0.000003218820843) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.007000000216) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "forearm" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.4999999702, 0.5000000099, -0.5000000099, -0.5000000099) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.007000000216) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "wrist_1_link" + { + quatd xformOp:orient = (-3.0908619663705394e-8, -3.0908619663705394e-8, 0.7071067690849304, 0.7071067690849304) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.8172000050544739, 0.1333000659942627, 0.16249999403953552) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "wrist1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.000004534985729, 1, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.1270000041) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "wrist1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071067691, 0.7071067933, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.1270000041) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "wrist_2_link" + { + quatd xformOp:orient = (0, -4.371138828673793e-8, 0.9999999403953552, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.8172000050544739, 0.1333000659942627, 0.06280000507831573) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "wrist2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.70711, 0.7071035624, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.09969999641) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "wrist2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.09969999641) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "wrist_3_link" + { + quatd xformOp:orient = (3.090861255827804e-8, -3.0908619663705394e-8, 0.7071067094802856, 0.7071067094802856) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.8172000050544739, 0.23290003836154938, 0.06280000507831573) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "flange" + { + quatd xformOp:orient = (0.4999999701976776, -0.4999999701976776, -0.4999999701976776, -0.4999999701976776) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "ft_frame" + { + quatd xformOp:orient = (-4.371138828673793e-8, 1, 0, -0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "wrist3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.000004534985729, 1, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.09889999777) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "wrist3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071067691, 0.7071067933, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.09889999777) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "Gripper" + { + quatd xformOp:orient = (0.5000000000000001, -0.5, -0.49999999999999994, -0.5) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.8172, 0.2329, 0.0628) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/universalrobots_ur5e/payloads/geometries.usd b/universalrobots_ur5e/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..d2ceac19fabd586cd14b407d4c86ffa4c4ebffae --- /dev/null +++ b/universalrobots_ur5e/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34692050bf417a8848956718fd1b79a0393d86de0ca28b051f260f26d91c4391 +size 9321381 diff --git a/universalrobots_ur5e/payloads/instances.usda b/universalrobots_ur5e/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..f42bd270215d51aee7f14c7337246e2387e5936a --- /dev/null +++ b/universalrobots_ur5e/payloads/instances.usda @@ -0,0 +1,1089 @@ +#usda 1.0 +( + customLayerData = { + } + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_1" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_1" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_2" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_2" + { + over "subset_" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "URBlue" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_3" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_3" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_4" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_4" + { + over "subset_" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "subset_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "LinkGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "subset_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "URBlue" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "LinkGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8203922, 0.8203922, 0.8203922) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "URBlue" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_5" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_5" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_6" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_6" + { + over "URBlue" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Black0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "LinkGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Black1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "URBlue" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "LinkGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8203922, 0.8203922, 0.8203922) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_7" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_7" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_8" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_8" + { + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "subset_" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "URBlue" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_9" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_9" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_10" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_10" + { + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "URBlue" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "URBlue" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_11" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_11" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_12" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_12" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "LinkGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8203922, 0.8203922, 0.8203922) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_13" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_13" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } +} + diff --git a/universalrobots_ur5e/payloads/materials.usda b/universalrobots_ur5e/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..6668feea8fc0caf01e065ada80cf0a5584d39390 --- /dev/null +++ b/universalrobots_ur5e/payloads/materials.usda @@ -0,0 +1,823 @@ +#usda 1.0 +( + customLayerData = { + } + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Black" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Black" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.03310248, 0.03310248, 0.03310248) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "JointGrey" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "JointGrey" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.2784314, 0.2784314, 0.2784314) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "DefaultMaterial" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "DefaultMaterial" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "URBlue" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "plastic" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "URBlue" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.4901961, 0.6784314, 0.8) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "LinkGrey" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "LinkGrey" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.8203922, 0.8203922, 0.8203922) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8203922, 0.8203922, 0.8203922) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } +} + diff --git a/universalrobots_ur5e/payloads/robot.usda b/universalrobots_ur5e/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..6ccc0ebfae386ffff16348e39dc8abb9d3016392 --- /dev/null +++ b/universalrobots_ur5e/payloads/robot.usda @@ -0,0 +1,232 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +over "ur5e" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string isaac:description + string isaac:namespace + prepend rel isaac:physics:robotJoints = [ + , + , + , + , + , + , + , + , + ] + prepend rel isaac:physics:robotLinks = [ + , + , + , + , + , + , + , + , + , + , + ] + token isaac:robotType = "Manipulator" + + over "joints" + { + over "robot_gripper_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "shoulder_pan_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "shoulder_lift_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "elbow_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "wrist_1_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "wrist_2_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "wrist_3_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + } + + over "base_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + + over "base_link" ( + prepend apiSchemas = ["IsaacSiteAPI"] + ) + { + } + } + + over "shoulder_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "upper_arm_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "forearm_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "wrist_1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "wrist_2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "wrist_3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + + over "flange" ( + prepend apiSchemas = ["IsaacSiteAPI"] + ) + { + } + + over "ft_frame" ( + prepend apiSchemas = ["IsaacSiteAPI"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } +} + diff --git a/universalrobots_ur5e/runnables/physics/mujoco.usda b/universalrobots_ur5e/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..1f2a942c0c5042643b9fa6ba1601ea578041659a --- /dev/null +++ b/universalrobots_ur5e/runnables/physics/mujoco.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "ur5e" +) + +def "ur5e" +{ + over "base_link" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "shoulder_link" + { + over "collisions" + { + over "shoulder" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "upper_arm_link" + { + over "collisions" + { + over "upperarm" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "forearm_link" + { + over "collisions" + { + over "forearm" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "wrist_1_link" + { + over "collisions" + { + over "wrist1" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "wrist_2_link" + { + over "collisions" + { + over "wrist2" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "wrist_3_link" + { + over "collisions" + { + over "wrist3" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "shoulder_pan_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "shoulder_lift_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "elbow_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "wrist_1_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "wrist_2_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "wrist_3_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_ur5e_joints_shoulder_pan_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -538609.03126564, -570.7461798775731] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 150 + double mjc:forceRange:min = -150 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_ur5e_joints_shoulder_lift_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -574156.4183620041, -614.9728022251862] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 150 + double mjc:forceRange:min = -150 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_ur5e_joints_elbow_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -586148.46977642, -1959.2005308115652] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 150 + double mjc:forceRange:min = -150 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_ur5e_joints_wrist_1_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -225781.40495537876, -755.1411793910008] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 28 + double mjc:forceRange:min = -28 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_ur5e_joints_wrist_2_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -225781.40495537876, -148.55649150437227] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 28 + double mjc:forceRange:min = -28 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_ur5e_joints_wrist_3_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -57300.41311341526, -19.91028317589043] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 28 + double mjc:forceRange:min = -28 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/universalrobots_ur5e/runnables/physics/newton.usda b/universalrobots_ur5e/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..5d4d036615b0f4b86a0322e4cede94767a87fc99 --- /dev/null +++ b/universalrobots_ur5e/runnables/physics/newton.usda @@ -0,0 +1,190 @@ +#usda 1.0 +( + defaultPrim = "ur5e" +) + +over "ur5e" +{ + over "base_link" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "shoulder_link" + { + over "collisions" + { + over "shoulder" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "upper_arm_link" + { + over "collisions" + { + over "upperarm" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "forearm_link" + { + over "collisions" + { + over "forearm" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_1_link" + { + over "collisions" + { + over "wrist1" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_2_link" + { + over "collisions" + { + over "wrist2" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_3_link" + { + over "collisions" + { + over "wrist3" + { + over "mesh_13" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] + ) + { + bool newton:selfCollisionEnabled = 0 + } + + over "joints" + { + over "shoulder_pan_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 31.25 + float newton:damping = 1.041667 + float newton:velocityLimit = 180 + } + + over "shoulder_lift_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 260 + float newton:damping = 1.109092 + float newton:velocityLimit = 180 + } + + over "elbow_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 90 + float newton:damping = 1.16 + float newton:velocityLimit = 180 + } + + over "wrist_1_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 5.8333 + float newton:damping = 0.194444 + float newton:velocityLimit = 180 + } + + over "wrist_2_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 5.8333 + float newton:damping = 0.194444 + float newton:velocityLimit = 180 + } + + over "wrist_3_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 5.8333 + float newton:damping = 0.194444 + float newton:velocityLimit = 180 + } + } +} + diff --git a/universalrobots_ur5e/runnables/physics/physx.usda b/universalrobots_ur5e/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..b940d5245e2ccc0da0f3bfd216dcd0d7a4b972e7 --- /dev/null +++ b/universalrobots_ur5e/runnables/physics/physx.usda @@ -0,0 +1,250 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +over "ur5e" +{ + over "joints" + { + over "shoulder_pan_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "shoulder_lift_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "elbow_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "wrist_1_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "wrist_2_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "wrist_3_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "Gripper" + { + over "Robotiq_2F_85" ( + ) + { + bool physxArticulation:articulationEnabled = 0 + + over "finger_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "right_outer_knuckle_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "left_outer_finger_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "right_outer_finger_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "left_inner_finger_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "right_inner_finger_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "left_inner_finger_knuckle_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "right_inner_finger_knuckle_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + } + } + + over "base_link" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "shoulder_link" + { + over "collisions" + { + over "shoulder" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "upper_arm_link" + { + over "collisions" + { + over "upperarm" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "forearm_link" + { + over "collisions" + { + over "forearm" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_1_link" + { + over "collisions" + { + over "wrist1" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_2_link" + { + over "collisions" + { + over "wrist2" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_3_link" + { + over "collisions" + { + over "wrist3" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } +} + diff --git a/universalrobots_ur5e/ur5e.usda b/universalrobots_ur5e/ur5e.usda new file mode 100644 index 0000000000000000000000000000000000000000..4703ca682d756419ada1a5cb2e5b7acfd9a33f3e --- /dev/null +++ b/universalrobots_ur5e/ur5e.usda @@ -0,0 +1,435 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/ur5e" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/ur5e" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/ur5e" + string variantSetName = "PhysX" + } + } + } + dictionary validation = { + string profile = "Robot-Body" + string profile_version = "3.0.0" + dictionary validated_features = { + dictionary "2026-10-20" = { + dictionary "CAP000_Core.Isaac.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.PhysX.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP003_RigidBody.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP004_Multibody.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP003_RigidBody.MuJoCo.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP004_Multibody.RobotMuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP021_RobotCore.Isaac.0-3-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-3-0" + } + dictionary "CAP022_DrivenJoints.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP004_Multibody.RobotMuJoCo.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP023_RobotMaterials.Isaac.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP024_BaseArticulation.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP024_BaseArticulation.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.PhysX.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP024_BaseArticulation.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP025_RosBridge.Ros.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + string "optional requirements" = "['com.nvidia.simready.ROS.001']" + bool passed = 0 + string version = "0-1-0" + } + dictionary "CAP031_SelfContainedPackage.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP033_SimReadyPackage.OpenUSD.0-4-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP031_SelfContainedPackage.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-4-0" + } + dictionary "CAP100_IsaacComposition.Isaac.0-3-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-3-0" + } + dictionary "FET001_MinimalPlaceableVisual.OpenUSD.1-0-1" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "1-0-1" + } + dictionary "FET003_RigidBody.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET003_RigidBody.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET003_RigidBody.PhysX.0-4-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-4-0" + } + dictionary "FET004_Multibody.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['FET003_RigidBody.Newton.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET004_Multibody.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET003_RigidBody.OpenUSD.0-2-0']" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET004_Multibody.PhysX.0-4-0" = { + bool blocking_failure = 0 + string dependencies = "['FET003_RigidBody.PhysX.0-4-0']" + bool passed = 1 + string version = "0-4-0" + } + dictionary "FET004_Multibody.RobotNewton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET006_Materials.MDL.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET006_Materials.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET006_Materials.Openpbr.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET010_DisplayColor.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET022_DrivenJoints.Isaac.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET022_DrivenJoints.PhysX.0-2-0']" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET022_DrivenJoints.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['FET004_Multibody.RobotNewton.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET022_DrivenJoints.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET004_Multibody.OpenUSD.0-2-0']" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET022_DrivenJoints.PhysX.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET004_Multibody.PhysX.0-4-0']" + bool passed = 1 + string version = "0-2-0" + } + } + } + } + } + float3 asset_extents = (0.932046, 0.30846107, 0.23402505) + string asset_license = "BSD-3-Clause" + string asset_name = "ur5e" + string asset_type = "robot" + string author = "UniversalRobots" + string category = "robotic arm" + double mass = 20.993899762630463 + string qcode = "Q40687" + int rigid_body_count = 7 + string source_file = "UniversalRobots/ur5e/ur5e.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def Xform "ur5e" ( + kind = "component" + prepend references = [ + @./payloads/Physics/physics.usda@, + @./payloads/base.usda@ + ] + variants = { + string Gripper = "None" + string MuJoCo = "Disabled" + string Newton = "Disabled" + string PhysX = "Disabled" + string Sensor = "none" + } + variantSets = ["Sensor", "Gripper", "PhysX", "Newton", "MuJoCo"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "base_link" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "shoulder_link" + { + over "collisions" + { + over "shoulder" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "upper_arm_link" + { + over "collisions" + { + over "upperarm" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "forearm_link" + { + over "collisions" + { + over "forearm" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "wrist_1_link" + { + over "collisions" + { + over "wrist1" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "wrist_2_link" + { + over "collisions" + { + over "wrist2" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "wrist_3_link" + { + over "collisions" + { + over "wrist3" + { + over "mesh_13" + { + token visibility = "invisible" + } + } + } + } + variantSet "Sensor" = { + "none" ( + prepend payload = @./payloads/Sensor/none.usda@ + ) { + + } + "sensors" ( + prepend payload = @./payloads/Sensor/sensors.usda@ + ) { + + } + } + variantSet "Gripper" = { + "none" ( + prepend payload = @./payloads/Gripper/none.usda@ + ) { + + } + "robotiq_2f_85" ( + prepend payload = @./payloads/Gripper/robotiq_2f_85.usda@ + ) { + + } + } + variantSet "PhysX" = { + "Disabled" { + + } + "Enabled" ( + prepend payload = @./runnables/physics/physx.usda@ + ) { + + } + } + variantSet "Newton" = { + "Disabled" { + + } + "Enabled" ( + prepend payload = @./runnables/physics/newton.usda@ + ) { + + } + } + variantSet "MuJoCo" = { + "Disabled" { + + } + "Enabled" ( + prepend payload = @./runnables/physics/mujoco.usda@ + ) { + + } + } +} + diff --git a/universalrobots_ur7e/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/universalrobots_ur7e/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..a71287cd35f89423990712f9c9e380230fc91a63 --- /dev/null +++ b/universalrobots_ur7e/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json @@ -0,0 +1,35 @@ +{ + "format_version": "1.0", + "profile": "Package-Candidate", + "profile_version": "1.0.0", + "timestamp": "2026-10-23T23:04:34", + "assets": [ + { + "asset": "ur7e.usda", + "features": [ + { + "FET_031_STANDARD": { + "version": "0.1.0", + "passed": true, + "failing_requirements": [], + "dependencies": [] + } + }, + { + "FET_033_STANDARD": { + "version": "0.1.0", + "passed": true, + "failing_requirements": [], + "dependencies": [ + { + "FET_031_STANDARD": { + "version": "0.1.0" + } + } + ] + } + } + ] + } + ] +} diff --git a/universalrobots_ur7e/.metadata/com.nvidia.simready.packaging.bom.json b/universalrobots_ur7e/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..37d15bb7df48b0207df7200d23701944284e9066 --- /dev/null +++ b/universalrobots_ur7e/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,327 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7545, + "hash": { + "sha256-flat-1mb": "6ba959657ebe5029b98529867c7946e518e08513360f7be7a38ee3c7f055377b", + "sha256": "a8689352e668e642b8c43cba339b0c0270a5ce45b614cf83dcf1370b4efd7c56" + } + }, + { + "relative_path": ".thumbs/256x256/.ur7e.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "3ff824a5b7a61a720426d3a0acf314b49b9b98e8ac1fed8c0e3a92f56c4f1f10", + "sha256": "b480ec68a59b54acc13df46e932d6346d35a7b2d11433cb15ee4a1c8b88da48d" + } + }, + { + "relative_path": ".thumbs/256x256/ur7e.usda.png", + "size": 45063, + "hash": { + "sha256-flat-1mb": "1567895e6187902e6ef85e09e5f801773d622a28647aae4b616d862c72dd1482", + "sha256": "658bdfe63dcaba7755028dd396258b3762878abe978281afddc0c763ab3de15f" + } + }, + { + "relative_path": ".thumbs/ur7e.thumb.usd", + "size": 6121, + "hash": { + "sha256-flat-1mb": "2a4da598bf7ff49fa41099d8e08b916bb3ca7675d59feef53be0e6f203dbfa02", + "sha256": "da3e3482ccbb6c945146e4cbcf334ac0ad16648b8ab9b7a91bb94b56c66242a1" + } + }, + { + "relative_path": "materials/mdl/LICENSE.md", + "size": 3220, + "hash": { + "sha256-flat-1mb": "d54635995b7794c6549d0f7c70586e739c1e24cb671ce966e64a8c1a6703a452", + "sha256": "d62e1bd5e34d0ca6f92f0e9f10670ee0cd586695e20f0a838a8f859119589683" + } + }, + { + "relative_path": "materials/mdl/OmniPBR.mdl", + "size": 13969, + "hash": { + "sha256-flat-1mb": "1c58f77068df165a71676dfde42a4b7e4932a82cacacfc7a205ae94fc0332aaf", + "sha256": "c902cc38dc97ff6a89fe94dca94edfb523a30e3749d3708610a136867c3357bf" + } + }, + { + "relative_path": "materials/mdl/OmniPBRBase.mdl", + "size": 17274, + "hash": { + "sha256-flat-1mb": "4b54e7fb8bc92191512851b3acc6fc6fa9863f80d98ffece8f0cb9b99f5f4535", + "sha256": "701f37299b44106842bdbe025de52eedec391e35b038f61c4ed4d25bd98e7db1" + } + }, + { + "relative_path": "materials/mdl/OmniPBR_ClearCoat.mdl", + "size": 27433, + "hash": { + "sha256-flat-1mb": "b1f146a3767a5012936e3d246f2697c3536c2f72b5c5963d3bca0998d02f8931", + "sha256": "085ba661b49042570e24cda09c939e5aebf312ae332af92744a99bd3abbfbee4" + } + }, + { + "relative_path": "materials/mdl/aux_definitions.mdl", + "size": 101769, + "hash": { + "sha256-flat-1mb": "6a5ffcb49e18ade213c3a4d79cf171d66612f9eee045074a0b937dbe4cf01ef6", + "sha256": "ebb81c8977aeb30790399ec7aaa7f2f76cb23afb434f56201ef152aba45a6e81" + } + }, + { + "relative_path": "materials/mdl/core_definitions.mdl", + "size": 201537, + "hash": { + "sha256-flat-1mb": "54bdc55e3899f126b1e271eef4de9c5966b1390fb3143872846f29f0ca68378d", + "sha256": "052aec260e8dfef5d671545fc2fc28c0c478a5b043041c65a833b2a6d81bf950" + } + }, + { + "relative_path": "materials/mdl/support_definitions.mdl", + "size": 147454, + "hash": { + "sha256-flat-1mb": "2b93c649c03f3ef48fb24cc6baba953df1f9dd4e7e860719bc3322fc3e789aba", + "sha256": "bb372f21b6e81d293b99fea6819a8309e2c33c732c7151752b4b33dade177f2e" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_Finger1step_JFT.usd", + "size": 78260, + "hash": { + "sha256-flat-1mb": "b5bb107aba831bdf3f516b50e41ff0b2b7568a758d565add949a667ca03e66ec", + "sha256": "8807edf2d1568889779e6da5cd89b97d7230311ad167755a791ff7034610f1d2" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd", + "size": 3373601, + "hash": { + "sha256-flat-1mb": "bceba3bb0779bfb158536826aaf2f6ba98ce75b493ab3261a9b63b87ca6f8a2d", + "sha256": "b849add675a959bf108b04281a4283632388698d82b34ab5c4ec9d42dcf8f4c1", + "sha256-first1m": "f2861d776cf587d47746c9073c826169267b5067194eb4b2b6c9987557b4d5e4" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd", + "size": 230495, + "hash": { + "sha256-flat-1mb": "d64c245fdc66207d7a968a13ba72d0288bd46d93d9fb5b569e154925e1bab8e6", + "sha256": "865e828faa230a75c97016c1cc647ce236db6a3d84199c109923287cb5ef683c" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd", + "size": 143957, + "hash": { + "sha256-flat-1mb": "a4264af7734c8b8adbd6133f78208392098e816830ca737184f12bafd75851a2", + "sha256": "3922f86499bd9b399182dca876a0e4295780a33b611267988d6a4570237ba11b" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd", + "size": 136079, + "hash": { + "sha256-flat-1mb": "e560e9106c162743200b2dd534b3e55051bc9a9c003fde00689c2bd2d5ee5d85", + "sha256": "1ea3296bde39458b1dd01323d391115e6d6535065247df6c4d2108ee7f44f1ea" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_fingertipsstep_JFD.usd", + "size": 43439, + "hash": { + "sha256-flat-1mb": "136b847081926f25fe07a2182ac485f2e793fa81e835e431ddef8d7afcebf142", + "sha256": "72de83fb98d4e677ff303f253ccd13d6ef7f8ce2485e5dc0b41dd600c7502506" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Robotiq_2F_85_base.usda", + "size": 13422, + "hash": { + "sha256-flat-1mb": "15360e29a232bd8a68f78eb983c32aa9a4be4f99ee0b8f3b2b7ece12735dbd08", + "sha256": "0fe4fe5b3da2a45baf7bfc8a35c93bcf30243f160fc53f4bf3050fc2466631d0" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Robotiq_2F_85_edit.usd", + "size": 8132, + "hash": { + "sha256-flat-1mb": "f862a1b91d855edfa12222b107f7352ad254c3d06fdd169fa05d745353e2b3d4", + "sha256": "801358a61becc95f8c8af7ac6b22140383782fc14a32a4a41691a3be482396b0" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_loop.usda", + "size": 12923, + "hash": { + "sha256-flat-1mb": "3eb472a3aed84fec2c7bea1120f1a511fb8d8b254986ffb1e502141ef6ed4bbb", + "sha256": "728cd15ca08b500a52ceb012240d203cefe81739054d5a54f18d52d05110bbb0" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_mimic.usda", + "size": 13266, + "hash": { + "sha256-flat-1mb": "d58848e647600a0f4cd398c2c370c10fbea481f26b6d4136a8db44ce5032fac8", + "sha256": "96da1b55f7f9ff2c3e6e840633d627c4820634caffac5e99512ba4b10d0b4f71" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/Robotiq_2F_85_robot.usd", + "size": 3776, + "hash": { + "sha256-flat-1mb": "ad59f3ddaeefbdd1f18d616c95166812b016e519da47f8275fa15aedb8e67d85", + "sha256": "97858ffd93e4209d3ec020fa64043dfc7ed82df95d3da584d84033e43e5d6414" + } + }, + { + "relative_path": "payloads/Gripper/dependencies/materials.usd", + "size": 4830, + "hash": { + "sha256-flat-1mb": "3e63d6ecf7ac5e2a0ebb7dfa1a68fd39540838ee99703f1a0aa0c6ec298a930e", + "sha256": "d34144f42f980ea2fad091bb6c1fbf8dd64d40149d526dd999c5b4f0c31691e0" + } + }, + { + "relative_path": "payloads/Gripper/none.usda", + "size": 168, + "hash": { + "sha256-flat-1mb": "8290b709c447579a84d06e15f2173b8c22ec10da3167ffa4f83e03fefa60c9e3", + "sha256": "13fe805083d8cb2a75a8dbc55d00c839dc79d091c0a55b4d0cf9c04b40413b52" + } + }, + { + "relative_path": "payloads/Gripper/robotiq_2f_85.usda", + "size": 699, + "hash": { + "sha256-flat-1mb": "6159c8f280ebe1f5c773614a7575d0af4bfc2aca43d775574a3d783e57e2704e", + "sha256": "ca7f16d3e8f79e29298be0e5889278f89a0c3f10112110a2998b4935b8f3f8af" + } + }, + { + "relative_path": "payloads/Physics/mujoco.usda", + "size": 3084, + "hash": { + "sha256-flat-1mb": "68879696e7fa14f0c106a70ea0c5f1cbace693d87bd64323429fb166cefb3055", + "sha256": "e9036ede4bc3de09d1d8c5ac3f7f6b08a14265f1073b64bd3855a53b8a47091e" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 168, + "hash": { + "sha256-flat-1mb": "8290b709c447579a84d06e15f2173b8c22ec10da3167ffa4f83e03fefa60c9e3", + "sha256": "13fe805083d8cb2a75a8dbc55d00c839dc79d091c0a55b4d0cf9c04b40413b52" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 12376, + "hash": { + "sha256-flat-1mb": "74d23b2902eca1a59df885de93fce8db56f9575784a9e039d5669fa09c587d53", + "sha256": "6d6ddcb4cae01194b236276bfdba6bf49adfd9cb516926b27881faec9445ca55" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 1526, + "hash": { + "sha256-flat-1mb": "0cb3e0c14e3a3da8122a4e0c725318299e872e5799e4b95d525e49757849a5a3", + "sha256": "c0e1e31c4007a51af444345e35fdf69b9d0a789bacbe8073eea16d2c2105ecc1" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 168, + "hash": { + "sha256-flat-1mb": "8290b709c447579a84d06e15f2173b8c22ec10da3167ffa4f83e03fefa60c9e3", + "sha256": "13fe805083d8cb2a75a8dbc55d00c839dc79d091c0a55b4d0cf9c04b40413b52" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 188, + "hash": { + "sha256-flat-1mb": "743e857453522d68328bf78f147e35261e8a42312c0c2a1ad4cf8cf34acf14be", + "sha256": "491d1ce99286d559b2b499990e4ddb610c511c9a586d2d6ae85c9c27f7f36be5" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 13216, + "hash": { + "sha256-flat-1mb": "ac3d9d286d7505e3f9859e1fb82237c040fba29c9cf67dee32d8fc809fe7861c", + "sha256": "54a34a8be65a531acb8c4759b25069a2db9781f511f4d9221a1e1a464939ca4d" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 9321381, + "hash": { + "sha256-flat-1mb": "7c8c022f916ad859317badf280e656df5b9efa6eaa2c203631b66ac26c540d05", + "sha256": "34692050bf417a8848956718fd1b79a0393d86de0ca28b051f260f26d91c4391", + "sha256-first1m": "09be516f56927dac9e26dbaf98b0f0d8552330531514df0d349b8286dd86306f" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 37762, + "hash": { + "sha256-flat-1mb": "91cc54f89b6fb11c663463b432726ff8156ffb8d893d9fe0b2e180822c6b3332", + "sha256": "63d3ae004cfc21104735349919742774818d30a7616fe7d04fca98152809c4db" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 28997, + "hash": { + "sha256-flat-1mb": "d4426a219937807c5c134dc13a7cc4121973d45b87f2c32cb8cc2db73f0daf81", + "sha256": "80b7d508071ddb5cb55319615a8b90ba2169fadddc5c764728ae3023f1fc889e" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 6974, + "hash": { + "sha256-flat-1mb": "bb8d186a4b2b6d6a0bae0e53cb1e7bb8ae9bc5b31b7726adc5c04a046b3e7754", + "sha256": "249a1b2ae1d33eb1a14d628b8c7b6eee8beb84d0a90747fa9a84c9be92648543" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 8366, + "hash": { + "sha256-flat-1mb": "08c879b7daeb445a99ee2fa1fa019ad3dc8f5097275fd7b620b5f9c3ac81cce5", + "sha256": "0f9b9c7f289a4099ac7077bc1c84fb9902ac3e73460275d31514a8c78a55b69a" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 5060, + "hash": { + "sha256-flat-1mb": "fcd0b088ff3a49cf6063ad2f334c0228bcb1e5d508f26d892ad27b8bd8f9fbbe", + "sha256": "2cd414adf275ef037dcda7361e3558d57e2c216569d51d47c6aa1ed530af7d03" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 6154, + "hash": { + "sha256-flat-1mb": "0bf915829a2c93d937ee3d8ef9572ceed823bd5ce0f99e64a63d245c288600d8", + "sha256": "1d02d5e70e7afdca5c9bc683175b13b80dcabf980d0ab99099b61aca5e3ac0e1" + } + }, + { + "relative_path": "ur7e.usda", + "size": 16386, + "hash": { + "sha256-flat-1mb": "3f1f1d7ec98429588c79d42c53cef44fd38d743d33ce470897e6419358d0bd5a", + "sha256": "25caa0e47c7c7fc80acad269c2dfafc260e20b4e091eb3cd3fef71562fbd8e5e" + } + } + ] +} \ No newline at end of file diff --git a/universalrobots_ur7e/.metadata/com.nvidia.simready.root_usds.json b/universalrobots_ur7e/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..76b5fffd325090c3795b19569c4b01df02ad3eec --- /dev/null +++ b/universalrobots_ur7e/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "ur7e.usda" + ] +} diff --git a/universalrobots_ur7e/.metadata/license.txt b/universalrobots_ur7e/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..574ef07902908574cba9a471d7e5eb0b684691e4 --- /dev/null +++ b/universalrobots_ur7e/.metadata/license.txt @@ -0,0 +1,25 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/universalrobots_ur7e/.simready/validation.json b/universalrobots_ur7e/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..c6ab69b310886bd9bc5b35c3d6f829fb7cbecc45 --- /dev/null +++ b/universalrobots_ur7e/.simready/validation.json @@ -0,0 +1,223 @@ +{ + "SimReady_Metadata": { + "validation": { + "profile": "Robot-Body", + "profile_version": "3.0.0", + "validated_features": { + "2026-10-20": { + "CAP000_Core.Isaac.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.PhysX.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP003_RigidBody.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP004_Multibody.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP003_RigidBody.MuJoCo.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP004_Multibody.RobotMuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP021_RobotCore.Isaac.0-3-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-3-0" + }, + "CAP022_DrivenJoints.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP004_Multibody.RobotMuJoCo.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP023_RobotMaterials.Isaac.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.PhysX.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP025_RosBridge.Ros.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "optional requirements": "['com.nvidia.simready.ROS.001']", + "passed": false, + "version": "0-1-0" + }, + "CAP031_SelfContainedPackage.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP033_SimReadyPackage.OpenUSD.0-4-0": { + "blocking_failure": false, + "dependencies": "['CAP031_SelfContainedPackage.OpenUSD.0-1-0']", + "passed": true, + "version": "0-4-0" + }, + "CAP100_IsaacComposition.Isaac.0-3-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-3-0" + }, + "FET001_MinimalPlaceableVisual.OpenUSD.1-0-1": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "1-0-1" + }, + "FET003_RigidBody.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET003_RigidBody.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET003_RigidBody.PhysX.0-4-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-4-0" + }, + "FET004_Multibody.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.Newton.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "FET004_Multibody.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.OpenUSD.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET004_Multibody.PhysX.0-4-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.PhysX.0-4-0']", + "passed": true, + "version": "0-4-0" + }, + "FET004_Multibody.RobotNewton.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET006_Materials.MDL.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET006_Materials.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET006_Materials.Openpbr.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET010_DisplayColor.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET022_DrivenJoints.Isaac.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET022_DrivenJoints.PhysX.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET022_DrivenJoints.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.RobotNewton.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "FET022_DrivenJoints.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.OpenUSD.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET022_DrivenJoints.PhysX.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.PhysX.0-4-0']", + "passed": true, + "version": "0-2-0" + } + } + } + } + } +} diff --git a/universalrobots_ur7e/.thumbs/256x256/.ur7e.usda.last_generated b/universalrobots_ur7e/.thumbs/256x256/.ur7e.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..ce1137b9815545a8abf97fdf8711b1e6a67cca66 --- /dev/null +++ b/universalrobots_ur7e/.thumbs/256x256/.ur7e.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:48:54 \ No newline at end of file diff --git a/universalrobots_ur7e/.thumbs/256x256/ur7e.usda.png b/universalrobots_ur7e/.thumbs/256x256/ur7e.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..4fc6333002b395743fe58772e81dc7ab52f31816 --- /dev/null +++ b/universalrobots_ur7e/.thumbs/256x256/ur7e.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:658bdfe63dcaba7755028dd396258b3762878abe978281afddc0c763ab3de15f +size 45063 diff --git a/universalrobots_ur7e/.thumbs/ur7e.thumb.usd b/universalrobots_ur7e/.thumbs/ur7e.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..ec8f0f4cf86427bdceff2b9103c0473833411d2f Binary files /dev/null and b/universalrobots_ur7e/.thumbs/ur7e.thumb.usd differ diff --git a/universalrobots_ur7e/com.nvidia.simready.packaging.json b/universalrobots_ur7e/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..a232845baff0974b2644416643b4830229a25d24 --- /dev/null +++ b/universalrobots_ur7e/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "universalrobots_ur7e.1.0.0", + "license": "BSD-3-Clause", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "18c3f0a583db0e8bc80a558377a53cbdd9684eeddd0f740acc9b7bd42f254226" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "c0203a28ffa4759b28420996087d127287f75ff6294372d011042a3eb8eeca38" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "eeec2f23511fcefeeff48d4db6a3b8ba563fad68ced2f48690550b2aec953aaa" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "143077f9f6a8de5a99f78c2c2472801fb53cf240277ef661642f079b9acdfff8" + } + } + ], + "content_hash": { + "sha256": "2463aeacc4f780f214798b97a9569e923c71595af5edd8669788871da8930090" + }, + "package_hash": { + "sha256": "a1a23d2f1e480812648a40a80d7422f06d268595c8a396070fbd7103476bf48a" + } +} diff --git a/universalrobots_ur7e/materials/mdl/LICENSE.md b/universalrobots_ur7e/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/universalrobots_ur7e/materials/mdl/LICENSE.md @@ -0,0 +1,73 @@ +# NVIDIA Omniverse Core Materials Licenses + +## Primary License +This project is primarily licensed under the BSD-3-Clause License. + +``` +Copyright (c) 1986-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + +## Third-Party Licenses + +### Apache License 2.0 +The following components are licensed under the Apache License 2.0: + +#### MaterialX Components +Files in `/source/mdl/materialx` are licensed under Apache License 2.0 per the MaterialX project: +https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/LICENSE + +``` +Copyright Contributors to the MaterialX Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` + +## SPDX License Identifiers +Files in this project use the following SPDX license identifiers: +- `SPDX-License-Identifier: BSD-3-Clause` - Used for NVIDIA-owned code +- `SPDX-License-Identifier: Apache-2.0` - Used for MaterialX components + +## License Attribution +This project contains code from multiple sources: +1. NVIDIA Corporation (BSD-3-Clause) - Primary codebase +2. Academy Software Foundation (Apache-2.0) - MaterialX components + +## License Scope +- All files in the project are licensed under BSD-3-Clause unless explicitly stated otherwise +- Files in `/source/mdl/materialx` are licensed under Apache-2.0 +- All other files are licensed under BSD-3-Clause \ No newline at end of file diff --git a/universalrobots_ur7e/materials/mdl/OmniPBR.mdl b/universalrobots_ur7e/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/universalrobots_ur7e/materials/mdl/OmniPBR.mdl @@ -0,0 +1,396 @@ +/* + * 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 core_definitions::file_texture; +import 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 +); diff --git a/universalrobots_ur7e/materials/mdl/OmniPBRBase.mdl b/universalrobots_ur7e/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/universalrobots_ur7e/materials/mdl/OmniPBRBase.mdl @@ -0,0 +1,470 @@ +/* + * 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 +); diff --git a/universalrobots_ur7e/materials/mdl/OmniPBR_ClearCoat.mdl b/universalrobots_ur7e/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/universalrobots_ur7e/materials/mdl/OmniPBR_ClearCoat.mdl @@ -0,0 +1,711 @@ +/* + * 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 core_definitions::file_texture; +import 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 +); diff --git a/universalrobots_ur7e/materials/mdl/aux_definitions.mdl b/universalrobots_ur7e/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/universalrobots_ur7e/materials/mdl/aux_definitions.mdl @@ -0,0 +1,3464 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + + +mdl 1.4; + +import ::anno::*; +export using ::base import texture_return; + +module +[[ + anno::version( 1, 2, 0), + anno::hidden(), + anno::display_name("NVIDIA auxillary definitions") +]]; + +// Support functions to simplify conversions between vector types with swizzles +// Supported argument types: float2, float3, float4, color, texture_return (as RGB and RGBA) +// Supported return types: float, float2, float3 color + + +export annotation icon(string path); + + +//*********************************************************************************************************************** +// Constructor wrappers + +export float construct_float( + texture_return a [[ + anno::description("Input texture sample container; the mono channel is returned.") + ]]) +[[ + anno::display_name("Float from texture_return"), + anno::description("Constructs a float from the mono channel of a texture_return value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float"), + icon(".icons/constructor.svg"), + anno::ui_order(10000) +]] +{ return a.mono; } + +export color construct_color( + float a [[ + anno::description("Scalar value replicated into all color channels.") + ]]) +[[ + anno::display_name("Color from float"), + anno::description("Constructs a color from a single float value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10001) +]] +{ return color(a); } + +export color construct_color( + float3 a [[ + anno::description("RGB source components.") + ]]) +[[ + anno::display_name("Color from float3"), + anno::description("Constructs a color from a float3 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10002) +]] +{ return color(a); } + +export color construct_color( + float r [[ + anno::description("Red channel value.") + ]], + float g [[ + anno::description("Green channel value.") + ]], + float b [[ + anno::description("Blue channel value.") + ]]) +[[ + anno::display_name("Color from floats"), + anno::description("Constructs a color from explicit red, green, and blue components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10003) +]] +{ return color(r,g,b); } + +export color construct_color( + texture_return a [[ + anno::description("Input texture sample container; the tint (RGB) channels are returned.") + ]]) +[[ + anno::display_name("Color from texture_return"), + anno::description("Constructs a color from the tint (RGB) channels of a texture_return value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10004) +]] +{ return a.tint; } + +export float4 construct_float4( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]], + float z [[ + anno::description("Z component value.") + ]], + float w [[ + anno::description("W component value.") + ]]) +[[ + anno::display_name("Float4 from floats"), + anno::description("Constructs a float4 from explicit x, y, z, and w components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float4"), + icon(".icons/constructor.svg"), + anno::ui_order(10005) +]] +{ return float4(x,y,z,w); } + +export float4 construct_float4( + float3 xyz [[ + anno::description("Source xyz components.") + ]], + float w [[ + anno::description("W component value.") + ]]) +[[ + anno::display_name("Float4 from float3,float"), + anno::description("Constructs a float4 from a float3 xyz value and a separate w component."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float4"), + icon(".icons/constructor.svg"), + anno::ui_order(10006) +]] +{ return float4(xyz.x,xyz.y,xyz.z,w); } + +export float3 construct_float3( + color a [[ + anno::description("Input color whose RGB channels are converted to float3.") + ]]) +[[ + anno::display_name("Float3 from color"), + anno::description("Constructs a float3 from a color value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10007) +]] +{ return float3(a); } + +export float3 construct_float3( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]], + float z [[ + anno::description("Z component value.") + ]]) +[[ + anno::display_name("Float3 from floats"), + anno::description("Constructs a float3 from explicit x, y, and z components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10008) +]] +{ return float3(x,y,z); } + +export float3 construct_float3( + int3 a [[ + anno::description("Input int3 converted component-wise to float3.") + ]]) +[[ + anno::display_name("Float3 from int3"), + anno::description("Constructs a float3 from an int3 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10009) +]] +{ return float3(a); } + +export float2 construct_float2( + float a [[ + anno::description("Scalar value replicated into both components.") + ]]) +[[ + anno::display_name("Float2 from float"), + anno::description("Constructs a float2 from a single float value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10010) +]] +{ return float2(a); } + +export float2 construct_float2( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]]) +[[ + anno::display_name("Float2 from floats"), + anno::description("Constructs a float2 from explicit x and y components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10011) +]] +{ return float2(x,y); } + +export float2 construct_float2( + int2 a [[ + anno::description("Input int2 converted component-wise to float2.") + ]]) +[[ + anno::display_name("Float2 from int2"), + anno::description("Constructs a float2 from an int2 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10012) +]] +{ return float2(a); } + +export int3 construct_int3( + int a [[ + anno::description("Scalar value replicated into all int3 components.") + ]]) +[[ + anno::display_name("Int3 from int"), + anno::description("Constructs an int3 from a single int value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Int3"), + icon(".icons/constructor.svg"), + anno::ui_order(10013) +]] +{ return int3(a); } + +export int2 construct_int2( + int a [[ + anno::description("Scalar value replicated into both int2 components.") + ]]) +[[ + anno::display_name("Int2 from int"), + anno::description("Constructs an int2 from a single int value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Int2"), + icon(".icons/constructor.svg"), + anno::ui_order(10014) +]] +{ return int2(a); } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float return type + +export float x( float2 a) +[[ + anno::display_name("X from float2"), + anno::description("Returns x from float2."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11000) +]] +{ return a.x; } + +export float y( float2 a) +[[ + anno::display_name("Y from float2"), + anno::description("Returns y from float2."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11010) +]] +{ return a.y; } + +export float x( float3 a) +[[ + anno::display_name("X from float3"), + anno::description("Returns x from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11001) +]] +{ return a.x; } + +export float y( float3 a) +[[ + anno::display_name("Y from float3"), + anno::description("Returns y from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11011) +]] +{ return a.y; } + +export float z( float3 a) +[[ + anno::display_name("Z from float3"), + anno::description("Returns z from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Z"), + icon(".icons/component_extract.svg"), + anno::ui_order(11020) +]] +{ return a.z; } + +export float x( float4 a) +[[ + anno::display_name("X from float4"), + anno::description("Returns x from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11002) +]] +{ return a.x; } + +export float y( float4 a) +[[ + anno::display_name("Y from float4"), + anno::description("Returns y from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11012) +]] +{ return a.y; } + +export float z( float4 a) +[[ + anno::display_name("Z from float4"), + anno::description("Returns z from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Z"), + icon(".icons/component_extract.svg"), + anno::ui_order(11021) +]] +{ return a.z; } + +export float w( float4 a) +[[ + anno::display_name("W from float4"), + anno::description("Returns w from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "W"), + icon(".icons/component_extract.svg"), + anno::ui_order(11025) +]] +{ return a.w; } + +export float x( color a) +[[ + anno::display_name("R from color"), + anno::description("Returns r from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "R"), + icon(".icons/component_extract.svg"), + anno::ui_order(11003) +]] +{ return x( float3(a)); } + +export float y( color a) +[[ + anno::display_name("G from color"), + anno::description("Returns g from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "G"), + icon(".icons/component_extract.svg"), + anno::ui_order(11013) +]] +{ return y( float3(a)); } + +export float z( color a) +[[ + anno::display_name("B from color"), + anno::description("Returns b from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "B"), + icon(".icons/component_extract.svg"), + anno::ui_order(11021) +]] +{ return z( float3(a)); } + +export float x( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("R from texture_return"), + anno::description("Returns r from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "R"), + icon(".icons/component_extract.svg"), + anno::ui_order(11004) +]] +{ return float3( a.tint).x; } + +export float y( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("G from texture_return"), + anno::description("Returns g from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "G"), + icon(".icons/component_extract.svg"), + anno::ui_order(11014) +]] +{ return float3( a.tint).y; } + +export float z( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("B from texture_return"), + anno::description("Returns b from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "B"), + icon(".icons/component_extract.svg"), + anno::ui_order(11022) +]] +{ return float3( a.tint).z; } + +export float w( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("Mono from texture_return"), + anno::description("Returns mono/alpha from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "W"), + icon(".icons/component_extract.svg"), + anno::ui_order(11026) +]] +{ return a.mono; } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Conversions of texture_return +// All are hidden +export float4 texture_return_float4( + texture_return a [[ + anno::description("Input texture sample container to unpack as float4 (r, g, b, mono).") + ]]) +[[ + anno::display_name("float4 from texture_return"), + anno::description("Converts texture_return to float4 using tint RGB and mono as W."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float4"), + icon(".icons/component_extract.svg"), + anno::ui_order(10108) +]] +{ return float4(x(a),y(a),z(a),w(a)); } + +export float3 texture_return_float3( + texture_return a [[ + anno::description("Input texture sample container to unpack as float3 (r, g, b).") + ]]) +[[ + anno::display_name("float3 from texture_return"), + anno::description("Converts texture_return to float3 using the tint RGB channels."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + icon(".icons/component_extract.svg"), + anno::ui_order(10109) +]] +{ return float3(x(a),y(a),z(a)); } + +export color texture_return_color( + texture_return a [[ + anno::description("Input texture sample container; tint RGB is returned as color.") + ]]) +[[ + anno::display_name("color from texture_return"), + anno::description("Converts texture_return to color using the tint RGB channels."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Color"), + icon(".icons/component_extract.svg"), + anno::ui_order(10110) +]] +{ return a.tint; } + +export float texture_return_float( + texture_return a [[ + anno::description("Input texture sample container; mono channel is returned.") + ]]) +[[ + anno::display_name("float from texture_return"), + anno::description("Converts texture_return to float using the mono channel."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float"), + icon(".icons/component_extract.svg"), + anno::ui_order(10111) +]] +{ return a.mono; } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float2 return type + +export float2 xy( float2 a) +[[ + anno::display_name("XY from float2"), + anno::description("Returns float2(x,y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11040) +]] +{ return float2( a.x, a.y); } + +export float2 xy( float3 a) +[[ + anno::display_name("XY from float3"), + anno::description("Returns float2(x,y) from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11041) +]] +{ return float2( a.x, a.y); } + +export float2 xy( float4 a) +[[ + anno::display_name("XY from float4"), + anno::description("Returns float2(x,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11044) +]] +{ return float2( a.x, a.y); } + +export float2 xy( color a) +[[ + anno::display_name("XY from color"), + anno::description("Returns float2(x,y) from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11043) +]] +{ return xy( float3(a)); } + +export float2 xy( + texture_return a [[ + anno::description("Input texture sample container; returns the first two tint channels.") + ]]) +[[ + anno::display_name("XY from texture_return"), + anno::description("Returns float2(r, g) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11044) +]] +{ return xy(texture_return_float4(a)); } + + +// The remaining are hidden +export float2 xx( float2 a) +[[ + anno::display_name("XX from float2"), + anno::description("Returns float2(x,x)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11030) +]] +{ return float2( a.x, a.x); } + +export float2 yx( float2 a) +[[ + anno::display_name("YX from float2"), + anno::description("Returns float2(y,x)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11050) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float2 a) +[[ + anno::display_name("YY from float2"), + anno::description("Returns float2(y,y)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11060) +]] +{ return float2( a.y, a.y); } + +export float2 xx( float3 a) +[[ + anno::display_name("XX from float3"), + anno::description("Returns float2(x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11031) +]] +{ return float2( a.x, a.x); } + +export float2 xz( float3 a) +[[ + anno::display_name("XZ from float3"), + anno::description("Returns float2(x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11042) +]] +{ return float2( a.x, a.z); } + +export float2 yz( float3 a) +[[ + anno::display_name("YZ from float3"), + anno::description("Returns float2(y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11043) +]] +{ return float2( a.y, a.z); } + +export float2 yx( float3 a) +[[ + anno::display_name("YX from float3"), + anno::description("Returns float2(y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11051) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float3 a) +[[ + anno::display_name("YY from float3"), + anno::description("Returns float2(y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11061) +]] +{ return float2( a.y, a.y); } + +export float2 zx( float3 a) +[[ + anno::display_name("ZX from float3"), + anno::description("Returns float2(z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11090) +]] +{ return float2( a.z, a.x); } + +export float2 zy( float3 a) +[[ + anno::display_name("ZY from float3"), + anno::description("Returns float2(z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11100) +]] +{ return float2( a.z, a.y); } + +export float2 zz( float3 a) +[[ + anno::display_name("ZZ from float3"), + anno::description("Returns float2(z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11110) +]] +{ return float2( a.z, a.z); } + +export float2 xx( float4 a) +[[ + anno::display_name("XX from float4"), + anno::description("Returns float2(x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11032) +]] +{ return float2( a.x, a.x); } + +export float2 xz( float4 a) +[[ + anno::display_name("XZ from float4"), + anno::description("Returns float2(x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11071) +]] +{ return float2( a.x, a.z); } + +export float2 xw( float4 a) +[[ + anno::display_name("XW from float4"), + anno::description("Returns float2(x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11120) +]] +{ return float2( a.x, a.w); } + +export float2 yx( float4 a) +[[ + anno::display_name("YX from float4"), + anno::description("Returns float2(y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11052) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float4 a) +[[ + anno::display_name("YY from float4"), + anno::description("Returns float2(y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11062) +]] +{ return float2( a.y, a.y); } + +export float2 yz( float4 a) +[[ + anno::display_name("YZ from float4"), + anno::description("Returns float2(y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11081) +]] +{ return float2( a.y, a.z); } + +export float2 yw( float4 a) +[[ + anno::display_name("YW from float4"), + anno::description("Returns float2(y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11125) +]] +{ return float2( a.y, a.w); } + +export float2 zx( float4 a) +[[ + anno::display_name("ZX from float4"), + anno::description("Returns float2(z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11091) +]] +{ return float2( a.z, a.x); } + +export float2 zy( float4 a) +[[ + anno::display_name("ZY from float4"), + anno::description("Returns float2(z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11101) +]] +{ return float2( a.z, a.y); } + +export float2 zz( float4 a) +[[ + anno::display_name("ZZ from float4"), + anno::description("Returns float2(z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11111) +]] +{ return float2( a.z, a.z); } + +export float2 zw( float4 a) +[[ + anno::display_name("ZW from float4"), + anno::description("Returns float2(z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11127) +]] +{ return float2( a.z, a.w); } + +export float2 wx( float4 a) +[[ + anno::display_name("WX from float4"), + anno::description("Returns float2(w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11129) +]] +{ return float2( a.w, a.x); } + +export float2 wy( float4 a) +[[ + anno::display_name("WX from loat4"), + anno::description("Returns float2(w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11131) +]] +{ return float2( a.w, a.y); } + +export float2 wz( float4 a) +[[ + anno::display_name("WZ from float4"), + anno::description("Returns float2(w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11133) +]] +{ return float2( a.w, a.z); } + +export float2 ww( float4 a) +[[ + anno::display_name("WW from float4"), + anno::description("Returns float2(w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11135) +]] +{ return float2( a.w, a.w); } + +export float2 xx( color a) +[[ + anno::display_name("XX from color"), + anno::description("Returns float2(x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11033) +]] +{ return xx( float3(a)); } + +export float2 xz( color a) +[[ + anno::display_name("XZ from color"), + anno::description("Returns float2(x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11072) +]] +{ return xz( float3(a)); } + +export float2 yx( color a) +[[ + anno::display_name("YX from color"), + anno::description("Returns float2(y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11053) +]] +{ return yx( float3(a)); } + +export float2 yy( color a) +[[ + anno::display_name("YY from color"), + anno::description("Returns float2(y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11063) +]] +{ return yy( float3(a)); } + +export float2 yz( color a) +[[ + anno::display_name("YZ from color"), + anno::description("Returns float2(y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11082) +]] +{ return yz( float3(a)); } + +export float2 zx( color a) +[[ + anno::display_name("ZX from color"), + anno::description("Returns float2(z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11092) +]] +{ return zx( float3(a)); } + +export float2 zy( color a) +[[ + anno::display_name("ZY from color"), + anno::description("Returns float2(z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11102) +]] +{ return zy( float3(a)); } + +export float2 zz( color a) +[[ + anno::display_name("ZZ from color"), + anno::description("Returns float2(z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11112) +]] +{ return zz( float3(a)); } + +export float2 xx( texture_return a) +[[ + anno::display_name("XX from color"), + anno::description("Returns float2(x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11034) +]] +{ return xx(texture_return_float4(a)); } + +export float2 xz( texture_return a) +[[ + anno::display_name("XZ from texture_return"), + anno::description("Returns float2(x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11073) +]] +{ return xz(texture_return_float4(a)); } + +export float2 xw( texture_return a) +[[ + anno::display_name("XW from texture_return"), + anno::description("Returns float2(x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11121) +]] +{ return xw(texture_return_float4(a)); } + +export float2 yx( texture_return a) +[[ + anno::display_name("YX from texture_return"), + anno::description("Returns float2(y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11054) +]] +{ return yx(texture_return_float4(a)); } + +export float2 yy( texture_return a) +[[ + anno::display_name("YY from texture_return"), + anno::description("Returns float2(y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11064) +]] +{ return yy(texture_return_float4(a)); } + +export float2 yz( texture_return a) +[[ + anno::display_name("YZ from texture_return"), + anno::description("Returns float2(y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11083) +]] +{ return yz(texture_return_float4(a)); } + +export float2 yw( texture_return a) +[[ + anno::display_name("YW from texture_return"), + anno::description("Returns float2(y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11126) +]] +{ return yw(texture_return_float4(a)); } + +export float2 zx( texture_return a) +[[ + anno::display_name("ZX from texture_return"), + anno::description("Returns float2(z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11093) +]] +{ return zx(texture_return_float4(a)); } + +export float2 zy( texture_return a) +[[ + anno::display_name("ZY from texture_return"), + anno::description("Returns float2(z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11103) +]] +{ return zy(texture_return_float4(a)); } + +export float2 zz( texture_return a) +[[ + anno::display_name("ZZ from texture_return"), + anno::description("Returns float2(z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11113) +]] +{ return zz(texture_return_float4(a)); } + +export float2 zw( texture_return a) +[[ + anno::display_name("ZW from texture_return"), + anno::description("Returns float2(z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11128) +]] +{ return zw(texture_return_float4(a)); } + +export float2 wx( texture_return a) +[[ + anno::display_name("WX from texture_return.WX"), + anno::description("Returns float2(w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11130) +]] +{ return wx(texture_return_float4(a)); } + +export float2 wy( texture_return a) +[[ + anno::display_name("WY from texture_return"), + anno::description("Returns float2(w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11132) +]] +{ return wy(texture_return_float4(a)); } + +export float2 wz( texture_return a) +[[ + anno::display_name("WZ from texture_return"), + anno::description("Returns float2(w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11134) +]] +{ return wz(texture_return_float4(a)); } + +export float2 ww( texture_return a) +[[ + anno::display_name("WW from texture_return"), + anno::description("Returns float2(w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11136) +]] +{ return ww(texture_return_float4(a)); } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float3 return type + +export float3 xyz( float3 a) +[[ + anno::display_name("XYZ from float3"), + anno::description("Returns float3(x,y,z) from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11290) +]] +{ return float3( a.x, a.y, a.z); } + +export float3 xyz( float4 a) +[[ + anno::display_name("XYZ from float4"), + anno::description("Returns float3(x,y,z) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11291) +]] +{ return float3( a.x, a.y, a.z); } + + +// The remaining are hidden +export float3 yyw( float4 a) +[[ + anno::display_name("YYW from float4"), + anno::description("Returns float3(y,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11640) +]] +{ return float3( a.y, a.y, a.w); } + +export float3 xxx( float2 a) +[[ + anno::display_name("XXX from float2"), + anno::description("Returns float3(x,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11200) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float2 a) +[[ + anno::display_name("XXY from float2"), + anno::description("Returns float3(x,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11210) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xyx( float2 a) +[[ + anno::display_name("XYX from float2"), + anno::description("Returns float3(x,y,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11230) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float2 a) +[[ + anno::display_name("XYY from float2"), + anno::description("Returns float3(x,y,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11240) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 yxx( float2 a) +[[ + anno::display_name("YXX from float2"), + anno::description("Returns float3(y,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11250) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float2 a) +[[ + anno::display_name("YXY from float2"), + anno::description("Returns float3(y,x,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11260) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yyx( float2 a) +[[ + anno::display_name("YYX from float2"), + anno::description("Returns float3(y,y,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11270) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float2 a) +[[ + anno::display_name("YYY from float2"), + anno::description("Returns float3(y,y,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11280) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 xxx( float3 a) +[[ + anno::display_name("XXX from float3"), + anno::description("Returns float3(x,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11201) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float3 a) +[[ + anno::display_name("XXY from float3"), + anno::description("Returns float3(x,x,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11211) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xxz( float3 a) +[[ + anno::display_name("XXZ from float3"), + anno::description("Returns float3(x,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11220) +]] +{ return float3( a.x, a.x, a.z); } + +export float3 xyx( float3 a) +[[ + anno::display_name("XYX from float3"), + anno::description("Returns float3(x,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11231) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float3 a) +[[ + anno::display_name("XYY from float3"), + anno::description("Returns float3(x,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11241) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 xzx( float3 a) +[[ + anno::display_name("XZX from float3"), + anno::description("Returns float3(x,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11300) +]] +{ return float3( a.x, a.z, a.x); } + +export float3 xzy( float3 a) +[[ + anno::display_name("XZY from float3"), + anno::description("Returns float3(x,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11310) +]] +{ return float3( a.x, a.z, a.y); } + +export float3 xzz( float3 a) +[[ + anno::display_name("XZZ from float3"), + anno::description("Returns float3(x,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11320) +]] +{ return float3( a.x, a.z, a.z); } + +export float3 yxx( float3 a) +[[ + anno::display_name("YXX from float3"), + anno::description("Returns float3(y,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11251) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float3 a) +[[ + anno::display_name("YXY from float3"), + anno::description("Returns float3(y,x,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11261) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yxz( float3 a) +[[ + anno::display_name("YXZ from float3"), + anno::description("Returns float3(y,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11330) +]] +{ return float3( a.y, a.x, a.z); } + +export float3 yyx( float3 a) +[[ + anno::display_name("YYX from float3"), + anno::description("Returns float3(y,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11271) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float3 a) +[[ + anno::display_name("YYY from float3"), + anno::description("Returns float3(y,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11281) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 yyz( float3 a) +[[ + anno::display_name("YYZ from float3"), + anno::description("Returns float3(y,y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11340) +]] +{ return float3( a.y, a.y, a.z); } + +export float3 yzx( float3 a) +[[ + anno::display_name("YZX from float3"), + anno::description("Returns float3(y,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11350) +]] +{ return float3( a.y, a.z, a.x); } + +export float3 yzy( float3 a) +[[ + anno::display_name("YZY from float3.YZY"), + anno::description("Returns float3(y,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11360) +]] +{ return float3( a.y, a.z, a.y); } + +export float3 yzz( float3 a) +[[ + anno::display_name("YZZ from float3"), + anno::description("Returns float3(y,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11370) +]] +{ return float3( a.y, a.z, a.z); } + +export float3 zxx( float3 a) +[[ + anno::display_name("ZXX from float3"), + anno::description("Returns float3(z,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11380) +]] +{ return float3( a.z, a.x, a.x); } + +export float3 zxy( float3 a) +[[ + anno::display_name("float3.ZXY"), + anno::description("Returns float3(z,x,y)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11390) +]] +{ return float3( a.z, a.x, a.y); } + +export float3 zxz( float3 a) +[[ + anno::display_name("ZXZ from float3"), + anno::description("Returns float3(z,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11400) +]] +{ return float3( a.z, a.x, a.z); } + +export float3 zyx( float3 a) +[[ + anno::display_name("ZYX from float3"), + anno::description("Returns float3(z,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11410) +]] +{ return float3( a.z, a.y, a.x); } + +export float3 zyy( float3 a) +[[ + anno::display_name("ZYY from float3"), + anno::description("Returns float3(z,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11420) +]] +{ return float3( a.z, a.y, a.y); } + +export float3 zyz( float3 a) +[[ + anno::display_name("ZYZ from float3"), + anno::description("Returns float3(z,y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11430) +]] +{ return float3( a.z, a.y, a.z); } + +export float3 zzx( float3 a) +[[ + anno::display_name("ZZX from float3"), + anno::description("Returns float3(z,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11440) +]] +{ return float3( a.z, a.z, a.x); } + +export float3 zzy( float3 a) +[[ + anno::display_name("ZZY from float3"), + anno::description("Returns float3(z,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11450) +]] +{ return float3( a.z, a.z, a.y); } + +export float3 zzz( float3 a) +[[ + anno::display_name("ZZZ from float3"), + anno::description("Returns float3(z,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11460) +]] +{ return float3( a.z, a.z, a.z); } + +export float3 xxx( float4 a) +[[ + anno::display_name("XXX from float4"), + anno::description("Returns float3(x,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11202) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float4 a) +[[ + anno::display_name("XXY from float4"), + anno::description("Returns float3(x,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11212) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xxz( float4 a) +[[ + anno::display_name("XXZ from float4"), + anno::description("Returns float3(x,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11222) +]] +{ return float3( a.x, a.x, a.z); } + +export float3 xxw( float4 a) +[[ + anno::display_name("XXW from float4"), + anno::description("Returns float3(x,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11227) +]] +{ return float3( a.x, a.x, a.w); } + +export float3 xyx( float4 a) +[[ + anno::display_name("XYX from float4"), + anno::description("Returns float3(x,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11232) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float4 a) +[[ + anno::display_name("XYY from float4"), + anno::description("Returns float3(x,y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11242) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 xyw( float4 a) +[[ + anno::display_name("XYW from float4"), + anno::description("Returns float3(x,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11295) +]] +{ return float3( a.x, a.y, a.w); } + +export float3 xzx( float4 a) +[[ + anno::display_name("XZX from float4"), + anno::description("Returns float3(x,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11301) +]] +{ return float3( a.x, a.z, a.x); } + +export float3 xzy( float4 a) +[[ + anno::display_name("XZY from float4"), + anno::description("Returns float3(x,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11311) +]] +{ return float3( a.x, a.z, a.y); } + +export float3 xzz( float4 a) +[[ + anno::display_name("XZZ from float4"), + anno::description("Returns float3(x,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11321) +]] +{ return float3( a.x, a.z, a.z); } + +export float3 xzw( float4 a) +[[ + anno::display_name("XZW from float4"), + anno::description("Returns float3(x,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11600) +]] +{ return float3( a.x, a.z, a.w); } + +export float3 xwx( float4 a) +[[ + anno::display_name("XWX from float4"), + anno::description("Returns float3(x,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11604) +]] +{ return float3( a.x, a.w, a.x); } + +export float3 xwy( float4 a) +[[ + anno::display_name("XWY from float4"), + anno::description("Returns float3(x,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11608) +]] +{ return float3( a.x, a.w, a.y); } + +export float3 xwz( float4 a) +[[ + anno::display_name("XWZ from float4"), + anno::description("Returns float3(x,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11612) +]] +{ return float3( a.x, a.w, a.z); } + +export float3 xww( float4 a) +[[ + anno::display_name("XWW from float4"), + anno::description("Returns float3(x,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11616) +]] +{ return float3( a.x, a.w, a.w); } + +export float3 yxx( float4 a) +[[ + anno::display_name("YXX from float4"), + anno::description("Returns float3(y,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11252) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float4 a) +[[ + anno::display_name("YXY from float4"), + anno::hidden(), + anno::description("Returns float3(y,x,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11262) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yxz( float4 a) +[[ + anno::display_name("YXZ from float4"), + anno::description("Returns float3(y,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11331) +]] +{ return float3( a.y, a.x, a.z); } + +export float3 yxw( float4 a) +[[ + anno::display_name("YXW from float4"), + anno::description("Returns float3(y,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11630) +]] +{ return float3( a.y, a.x, a.w); } + +export float3 yyx( float4 a) +[[ + anno::display_name("YYX from float4"), + anno::description("Returns float3(y,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11272) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float4 a) +[[ + anno::display_name("YYY from float4"), + anno::description("Returns float3(y,y,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11282) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 yyz( float4 a) +[[ + anno::display_name("YYZ from float4"), + anno::description("Returns float3(y,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11341) +]] +{ return float3( a.y, a.y, a.z); } + +export float3 yzx( float4 a) +[[ + anno::display_name("YZX from float4"), + anno::description("Returns float3(y,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11351) +]] +{ return float3( a.y, a.z, a.x); } + +export float3 yzy( float4 a) +[[ + anno::display_name("YZY from float4"), + anno::description("Returns float3(y,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11361) +]] +{ return float3( a.y, a.z, a.y); } + +export float3 yzz( float4 a) +[[ + anno::display_name("YZZ from float4"), + anno::description("Returns float3(y,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11371) +]] +{ return float3( a.y, a.z, a.z); } + +export float3 yzw( float4 a) +[[ + anno::display_name("YZW from float4"), + anno::description("Returns float3(y,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11650) +]] +{ return float3( a.y, a.z, a.w); } + +export float3 ywx( float4 a) +[[ + anno::display_name("YWX from float4"), + anno::description("Returns float3(y,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11653) +]] +{ return float3( a.y, a.w, a.x); } + +export float3 ywy( float4 a) +[[ + anno::display_name("YWY from float4"), + anno::description("Returns float3(y,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11656) +]] +{ return float3( a.y, a.w, a.y); } + +export float3 ywz( float4 a) +[[ + anno::display_name("YWZ from float4"), + anno::description("Returns float3(y,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11658) +]] +{ return float3( a.y, a.w, a.z); } + +export float3 yww( float4 a) +[[ + anno::display_name("YWW from float4"), + anno::description("Returns float3(y,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11661) +]] +{ return float3( a.y, a.w, a.w); } + +export float3 zxx( float4 a) +[[ + anno::display_name("ZXX from float4"), + anno::description("Returns float3(z,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11381) +]] +{ return float3( a.z, a.x, a.x); } + +export float3 zxy( float4 a) +[[ + anno::display_name("ZXY from float4"), + anno::description("Returns float3(z,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11391) +]] +{ return float3( a.z, a.x, a.y); } + +export float3 zxz( float4 a) +[[ + anno::display_name("ZXZ from float4"), + anno::description("Returns float3(z,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11401) +]] +{ return float3( a.z, a.x, a.z); } + +export float3 zxw( float4 a) +[[ + anno::display_name("ZXW from float4"), + anno::description("Returns float3(z,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11671) +]] +{ return float3( a.z, a.x, a.w); } + +export float3 zyx( float4 a) +[[ + anno::display_name("ZYX from float4"), + anno::description("Returns float3(z,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11411) +]] +{ return float3( a.z, a.y, a.x); } + +export float3 zyy( float4 a) +[[ + anno::display_name("ZYY from float4"), + anno::description("Returns float3(z,y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11421) +]] +{ return float3( a.z, a.y, a.y); } + +export float3 zyz( float4 a) +[[ + anno::display_name("ZYZ from float4"), + anno::description("Returns float3(z,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11431) +]] +{ return float3( a.z, a.y, a.z); } + +export float3 zyw( float4 a) +[[ + anno::display_name("ZYW from float4"), + anno::description("Returns float3(z,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11432) +]] +{ return float3( a.z, a.y, a.w); } + +export float3 zzx( float4 a) +[[ + anno::display_name("ZZX from float4"), + anno::description("Returns float3(z,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11441) +]] +{ return float3( a.z, a.z, a.x); } + +export float3 zzy( float4 a) +[[ + anno::display_name("ZZY from float4"), + anno::description("Returns float3(z,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11451) +]] +{ return float3( a.z, a.z, a.y); } + +export float3 zzz( float4 a) +[[ + anno::display_name("ZZZ from float4"), + anno::hidden(), + anno::description("Returns float3(z,z,z) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11461) +]] +{ return float3( a.z, a.z, a.z); } + +export float3 zzw( float4 a) +[[ + anno::display_name("ZZW from float4"), + anno::description("Returns float3(z,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11465) +]] +{ return float3( a.z, a.z, a.w); } + +export float3 zwx( float4 a) +[[ + anno::display_name("ZWX from float4"), + anno::description("Returns float3(z,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11468) +]] +{ return float3( a.z, a.w, a.x); } + +export float3 zwy( float4 a) +[[ + anno::display_name("ZWY from float4"), + anno::description("Returns float3(z,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11471) +]] +{ return float3( a.z, a.w, a.y); } + +export float3 zwz( float4 a) +[[ + anno::display_name("ZWZ from float4"), + anno::description("Returns float3(z,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11475) +]] +{ return float3( a.z, a.w, a.z); } + +export float3 zww( float4 a) +[[ + anno::display_name("ZWW from float4"), + anno::description("Returns float3(z,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11479) +]] +{ return float3( a.z, a.w, a.w); } + +export float3 wxx( float4 a) +[[ + anno::display_name("WXX from float4"), + anno::description("Returns float3(w,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11483) +]] +{ return float3( a.w, a.x, a.x); } + +export float3 wxy( float4 a) +[[ + anno::display_name("WXY from float4"), + anno::description("Returns float3(w,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11487) +]] +{ return float3( a.w, a.x, a.y); } + +export float3 wxz( float4 a) +[[ + anno::display_name("WXZ from float4"), + anno::description("Returns float3(w,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11490) +]] +{ return float3( a.w, a.x, a.z); } + +export float3 wxw( float4 a) +[[ + anno::display_name("WXW from float4"), + anno::description("Returns float3(w,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11496) +]] +{ return float3( a.w, a.x, a.w); } + +export float3 wyx( float4 a) +[[ + anno::display_name("WYX from float4"), + anno::description("Returns float3(w,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11503) +]] +{ return float3( a.w, a.y, a.x); } + +export float3 wyy( float4 a) +[[ + anno::display_name("WYY from float4"), + anno::description("Returns float3(w,y,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11507) +]] +{ return float3( a.w, a.y, a.y); } + +export float3 wyz( float4 a) +[[ + anno::display_name("WYZ from float4"), + anno::description("Returns float3(w,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11510) +]] +{ return float3( a.w, a.y, a.z); } + +export float3 wyw( float4 a) +[[ + anno::display_name("WYW from float4"), + anno::description("Returns float3(w,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11514) +]] +{ return float3( a.w, a.y, a.w); } + +export float3 wzx( float4 a) +[[ + anno::display_name("WZX from float4"), + anno::description("Returns float3(w,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11518) +]] +{ return float3( a.w, a.z, a.x); } + +export float3 wzy( float4 a) +[[ + anno::display_name("WZY from float4"), + anno::description("Returns float3(w,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11521) +]] +{ return float3( a.w, a.z, a.y); } + +export float3 wzz( float4 a) +[[ + anno::display_name("WZZ from float4"), + anno::description("Returns float3(w,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11524) +]] +{ return float3( a.w, a.z, a.z); } + +export float3 wzw( float4 a) +[[ + anno::display_name("WZW from float4"), + anno::description("Returns float3(w,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11529) +]] +{ return float3( a.w, a.z, a.w); } + +export float3 wwx( float4 a) +[[ + anno::display_name("WWX from float4"), + anno::description("Returns float3(w,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11533) +]] +{ return float3( a.w, a.w, a.x); } + +export float3 wwy( float4 a) +[[ + anno::display_name("WWY from float4"), + anno::hidden(), + anno::description("Returns float3(w,w,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11537) +]] +{ return float3( a.w, a.w, a.y); } + +export float3 wwz( float4 a) +[[ + anno::display_name("WWZ from float4"), + anno::description("Returns float3(w,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11541) +]] +{ return float3( a.w, a.w, a.z); } + +export float3 www( float4 a) +[[ + anno::display_name("WWW from float4"), + anno::description("Returns float3(w,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11544) +]] +{ return float3( a.w, a.w, a.w); } + +export float3 xxx( color a) +[[ + anno::display_name("XXX from color"), + anno::description("Returns float3(x,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11203) +]] +{ return xxx( float3(a)); } + +export float3 xxy( color a) +[[ + anno::display_name("XXY from color"), + anno::description("Returns float3(x,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11213) +]] +{ return xxy( float3(a)); } + +export float3 xxz( color a) +[[ + anno::display_name("XXZ from color"), + anno::description("Returns float3(x,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11223) +]] +{ return xxz( float3(a)); } + +export float3 xyx( color a) +[[ + anno::display_name("XYX from color"), + anno::description("Returns float3(x,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11233) +]] +{ return xyx( float3(a)); } + +export float3 xyy( color a) +[[ + anno::display_name("XYY from color"), + anno::description("Returns float3(x,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11243) +]] +{ return xyy( float3(a)); } + +export float3 xyz( color a) +[[ + anno::display_name("XYZ from color"), + anno::description("Returns float3(x,y,z) from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11292) +]] +{ return xyz( float3(a)); } + +export float3 xzx( color a) +[[ + anno::display_name("XZX from color"), + anno::description("Returns float3(x,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11302) +]] +{ return xzx( float3(a)); } + +export float3 xzy( color a) +[[ + anno::display_name("XZY from color"), + anno::description("Returns float3(x,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11312) +]] +{ return xzy( float3(a)); } + +export float3 xzz( color a) +[[ + anno::display_name("XZZ from color"), + anno::description("Returns float3(x,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11323) +]] +{ return xzz( float3(a)); } + +export float3 yxx( color a) +[[ + anno::display_name("YXX from color"), + anno::description("Returns float3(y,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11253) +]] +{ return yxx( float3(a)); } + +export float3 yxy( color a) +[[ + anno::display_name("YXY from color"), + anno::description("Returns float3(y,x,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11263) +]] +{ return yxy( float3(a)); } + +export float3 yxz( color a) +[[ + anno::display_name("YXZ from color"), + anno::description("Returns float3(y,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11332) +]] +{ return yxz( float3(a)); } + +export float3 yyx( color a) +[[ + anno::display_name("YYX from color"), + anno::description("Returns float3(y,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11273) +]] +{ return yyx( float3(a)); } + +export float3 yyy( color a) +[[ + anno::display_name("YYY from color"), + anno::description("Returns float3(y,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11283) +]] +{ return yyy( float3(a)); } + +export float3 yyz( color a) +[[ + anno::display_name("YYZ from color"), + anno::description("Returns float3(y,y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11342) +]] +{ return yyz( float3(a)); } + +export float3 yzx( color a) +[[ + anno::display_name("YZX from color"), + anno::description("Returns float3(y,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11352) +]] +{ return yzx( float3(a)); } + +export float3 yzy( color a) +[[ + anno::display_name("YZY from color"), + anno::description("Returns float3(y,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11362) +]] +{ return yzy( float3(a)); } + +export float3 yzz( color a) +[[ + anno::display_name("YZZ from color"), + anno::description("Returns float3(y,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11372) +]] +{ return yzz( float3(a)); } + +export float3 zxx( color a) +[[ + anno::display_name("ZXX from color"), + anno::description("Returns float3(z,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11382) +]] +{ return zxx( float3(a)); } + +export float3 zxy( color a) +[[ + anno::display_name("ZXY from color"), + anno::description("Returns float3(z,x,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11392) +]] +{ return zxy( float3(a)); } + +export float3 zxz( color a) +[[ + anno::display_name("ZXZ from color"), + anno::description("Returns float3(z,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11402) +]] +{ return zxz( float3(a)); } + +export float3 zyx( color a) +[[ + anno::display_name("ZYX from color"), + anno::description("Returns float3(z,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11412) +]] +{ return zyx( float3(a)); } + +export float3 zyy( color a) +[[ + anno::display_name("ZYY from color"), + anno::description("Returns float3(z,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11422) +]] +{ return zyy( float3(a)); } + +export float3 zyz( color a) +[[ + anno::display_name("ZYZ from color"), + anno::description("Returns float3(z,y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11432) +]] +{ return zyz( float3(a)); } + +export float3 zzx( color a) +[[ + anno::display_name("ZZX from color"), + anno::description("Returns float3(z,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11442) +]] +{ return zzx( float3(a)); } + +export float3 zzy( color a) +[[ + anno::display_name("ZZY from color"), + anno::description("Returns float3(z,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11452) +]] +{ return zzy( float3(a)); } + +export float3 zzz( color a) +[[ + anno::display_name("ZZZ from color"), + anno::description("Returns float3(z,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11462) +]] +{ return zzz( float3(a)); } + +export float3 xxx( texture_return a) +[[ + anno::display_name("XXX from texture_return"), + anno::description("Returns float3(x,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11204) +]] +{ return xxx(texture_return_float4(a)); } + +export float3 xxy( texture_return a) +[[ + anno::display_name("XXY from texture_return"), + anno::description("Returns float3(x,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11214) +]] +{ return xxy(texture_return_float4(a)); } + +export float3 xxz( texture_return a) +[[ + anno::display_name("XXZ from texture_return"), + anno::description("Returns float3(x,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11224) +]] +{ return xxz(texture_return_float4(a)); } + +export float3 xxw( texture_return a) +[[ + anno::display_name("XXW from texture_return"), + anno::description("Returns float3(x,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11229) +]] +{ return xxw(texture_return_float4(a)); } + +export float3 xyx( texture_return a) +[[ + anno::display_name("XYX from texture_return"), + anno::description("Returns float3(x,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11234) +]] +{ return xyx(texture_return_float4(a)); } + +export float3 xyy( texture_return a) +[[ + anno::display_name("XYY from texture_return"), + anno::description("Returns float3(x,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11244) +]] +{ return xyy(texture_return_float4(a)); } + +export float3 xyz( texture_return a) +[[ + anno::display_name("XYZ from texture_return"), + anno::description("Returns float3(x,y,z) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11293) +]] +{ return xyz(texture_return_float4(a)); } + +export float3 xyw( texture_return a) +[[ + anno::display_name("XYW from texture_return"), + anno::description("Returns float3(x,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11296) +]] +{ return xyw(texture_return_float4(a)); } + +export float3 xzx( texture_return a) +[[ + anno::display_name("XZX from texture_return"), + anno::description("Returns float3(x,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11303) +]] +{ return xzx(texture_return_float4(a)); } + +export float3 xzy( texture_return a) +[[ + anno::display_name("XZY from texture_return"), + anno::description("Returns float3(x,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(1131) +]] +{ return xzy(texture_return_float4(a)); } + +export float3 xzz( texture_return a) +[[ + anno::display_name("XZZ from texture_return"), + anno::description("Returns float3(x,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11321) +]] +{ return xzz(texture_return_float4(a)); } + +export float3 xzw( texture_return a) +[[ + anno::display_name("XZW from texture_return"), + anno::description("Returns float3(x,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11601) +]] +{ return xzw(texture_return_float4(a)); } + +export float3 xwx( texture_return a) +[[ + anno::display_name("XWX from texture_return"), + anno::description("Returns float3(x,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11605) +]] +{ return xwx(texture_return_float4(a)); } + +export float3 xwy( texture_return a) +[[ + anno::display_name("XWY from texture_return"), + anno::description("Returns float3(x,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11609) +]] +{ return xwy(texture_return_float4(a)); } + +export float3 xwz( texture_return a) +[[ + anno::display_name("XWZ from texture_return"), + anno::description("Returns float3(x,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11613) +]] +{ return xwz(texture_return_float4(a)); } + +export float3 xww( texture_return a) +[[ + anno::display_name("XWW from texture_return"), + anno::description("Returns float3(x,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11617) +]] +{ return xww(texture_return_float4(a)); } + +export float3 yxx( texture_return a) +[[ + anno::display_name("YXX from texture_return"), + anno::description("Returns float3(y,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11254) +]] +{ return yxx(texture_return_float4(a)); } + +export float3 yxy( texture_return a) +[[ + anno::display_name("YXY from texture_return"), + anno::description("Returns float3(y,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11264) +]] +{ return yxy(texture_return_float4(a)); } + +export float3 yxz( texture_return a) +[[ + anno::display_name("YXZ from texture_return"), + anno::description("Returns float3(y,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11333) +]] +{ return yxz(texture_return_float4(a)); } + +export float3 yxw( texture_return a) +[[ + anno::display_name("YXW from texture_return"), + anno::description("Returns float3(y,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11631) +]] +{ return yxw(texture_return_float4(a)); } + +export float3 yyx( texture_return a) +[[ + anno::display_name("YYX from texture_return"), + anno::description("Returns float3(y,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11274) +]] +{ return yyx(texture_return_float4(a)); } + +export float3 yyy( texture_return a) +[[ + anno::display_name("YYY from texture_return"), + anno::description("Returns float3(y,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11284) +]] +{ return yyy(texture_return_float4(a)); } + +export float3 yyz( texture_return a) +[[ + anno::display_name("YYZ from texture_return"), + anno::description("Returns float3(y,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11344) +]] +{ return yyz(texture_return_float4(a)); } + +export float3 yyw( texture_return a) +[[ + anno::display_name("YYW from texture_return"), + anno::description("Returns float3(y,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11641) +]] +{ return yyw(texture_return_float4(a)); } + +export float3 yzx( texture_return a) +[[ + anno::display_name("YZX from texture_return"), + anno::description("Returns float3(y,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11354) +]] +{ return yzx(texture_return_float4(a)); } + +export float3 yzy( texture_return a) +[[ + anno::display_name("YZY from texture_return"), + anno::description("Returns float3(y,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11363) +]] +{ return yzy(texture_return_float4(a)); } + +export float3 yzz( texture_return a) +[[ + anno::display_name("YZZ from texture_return"), + anno::description("Returns float3(y,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11373) +]] +{ return yzz(texture_return_float4(a)); } + +export float3 yzw( texture_return a) +[[ + anno::display_name("YZW from texture_return"), + anno::description("Returns float3(y,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11651) +]] +{ return yzw(texture_return_float4(a)); } + +export float3 ywx( texture_return a) +[[ + anno::display_name("YWX from texture_return"), + anno::description("Returns float3(y,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11654) +]] +{ return ywx(texture_return_float4(a)); } + +export float3 ywy( texture_return a) +[[ + anno::display_name("YWY from texture_return"), + anno::description("Returns float3(y,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11657) +]] +{ return ywy(texture_return_float4(a)); } + +export float3 ywz( texture_return a) +[[ + anno::display_name("YXZ from texture_return"), + anno::description("Returns float3(y,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11659) +]] +{ return ywz(texture_return_float4(a)); } + +export float3 yww( texture_return a) +[[ + anno::display_name("YWW from texture_return"), + anno::description("Returns float3(y,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11662) +]] +{ return yww(texture_return_float4(a)); } + +export float3 zxx( texture_return a) +[[ + anno::display_name("ZXX from texture_return"), + anno::description("Returns float3(z,x,x) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11383) +]] +{ return zxx(texture_return_float4(a)); } + +export float3 zxy( texture_return a) +[[ + anno::display_name("ZXY from texture_return"), + anno::description("Returns float3(z,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11394) +]] +{ return zxy(texture_return_float4(a)); } + +export float3 zxz( texture_return a) +[[ + anno::display_name("ZXZ from texture_return"), + anno::description("Returns float3(z,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11403) +]] +{ return zxz(texture_return_float4(a)); } + +export float3 zxw( texture_return a) +[[ + anno::display_name("ZXW from texture_return"), + anno::description("Returns float3(z,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11672) +]] +{ return zxw(texture_return_float4(a)); } + +export float3 zyx( texture_return a) +[[ + anno::display_name("ZYX from texture_return"), + anno::description("Returns float3(z,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11413) +]] +{ return zyx(texture_return_float4(a)); } + +export float3 zyy( texture_return a) +[[ + anno::display_name("ZYY from texture_return"), + anno::description("Returns float3(z,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11423) +]] +{ return zyy(texture_return_float4(a)); } + +export float3 zyz( texture_return a) +[[ + anno::display_name("ZYZ from texture_return"), + anno::description("Returns float3(z,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11433) +]] +{ return zyz(texture_return_float4(a)); } + +export float3 zyw( texture_return a) +[[ + anno::display_name("ZYW from texture_return"), + anno::description("Returns float3(z,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11433) +]] +{ return zyw(texture_return_float4(a)); } + +export float3 zzx( texture_return a) +[[ + anno::display_name("ZZX from texture_return"), + anno::description("Returns float3(z,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11443) +]] +{ return zzx(texture_return_float4(a)); } + +export float3 zzy( texture_return a) +[[ + anno::display_name("ZZY from texture_return"), + anno::description("Returns float3(z,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11453) +]] +{ return zzy(texture_return_float4(a)); } + +export float3 zzz( texture_return a) +[[ + anno::display_name("ZZZ from texture_return"), + anno::description("Returns float3(z,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11463) +]] +{ return zzz(texture_return_float4(a)); } + +export float3 zzw( texture_return a) +[[ + anno::display_name("ZZW from texture_return"), + anno::description("Returns float3(z,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11466) +]] +{ return zzw(texture_return_float4(a)); } + +export float3 zwx( texture_return a) +[[ + anno::display_name("ZWX from texture_return"), + anno::description("Returns float3(z,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11468) +]] +{ return zwx(texture_return_float4(a)); } + +export float3 zwy( texture_return a) +[[ + anno::display_name("ZWY from texture_return"), + anno::description("Returns float3(z,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11472) +]] +{ return zwy(texture_return_float4(a)); } + +export float3 zwz( texture_return a) +[[ + anno::display_name("ZWZ from texture_return"), + anno::description("Returns float3(z,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11476) +]] +{ return zwz(texture_return_float4(a)); } + +export float3 zww( texture_return a) +[[ + anno::display_name("texture_return.ZWW"), + anno::description("Returns float3(z,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11480) +]] +{ return zww(texture_return_float4(a)); } + +export float3 wxx( texture_return a) +[[ + anno::display_name("WXX from texture_return"), + anno::description("Returns float3(w,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11484) +]] +{ return wxx(texture_return_float4(a)); } + +export float3 wxy( texture_return a) +[[ + anno::display_name("WXY from texture_return"), + anno::description("Returns float3(w,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11488) +]] +{ return wxy(texture_return_float4(a)); } + +export float3 wxz( texture_return a) +[[ + anno::display_name("WXZ from texture_return"), + anno::description("Returns float3(w,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11493) +]] +{ return wxz(texture_return_float4(a)); } + +export float3 wxw( texture_return a) +[[ + anno::display_name("WXW from texture_return"), + anno::description("Returns float3(w,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11500) +]] +{ return wxw(texture_return_float4(a)); } + +export float3 wyx( texture_return a) +[[ + anno::display_name("WYX from texture_return"), + anno::description("Returns float3(w,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(1150) +]] +{ return wyx(texture_return_float4(a)); } + +export float3 wyy( texture_return a) +[[ + anno::display_name("WYY from texture_return"), + anno::description("Returns float3(w,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11508) +]] +{ return wyy(texture_return_float4(a)); } + +export float3 wyz( texture_return a) +[[ + anno::display_name("WYZ from texture_return"), + anno::description("Returns float3(w,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11511) +]] +{ return wyz(texture_return_float4(a)); } + +export float3 wyw( texture_return a) +[[ + anno::display_name("WYW from texture_return"), + anno::description("Returns float3(w,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11515) +]] +{ return wyw(texture_return_float4(a)); } + +export float3 wzx( texture_return a) +[[ + anno::display_name("WZX from texture_return"), + anno::description("Returns float3(w,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11519) +]] +{ return wzx(texture_return_float4(a)); } + +export float3 wzy( texture_return a) +[[ + anno::display_name("WZY from texture_return"), + anno::description("Returns float3(w,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11522) +]] +{ return wzy(texture_return_float4(a)); } + +export float3 wzz( texture_return a) +[[ + anno::display_name("WZZ from texture_return"), + anno::description("Returns float3(w,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11525) +]] +{ return wzz(texture_return_float4(a)); } + +export float3 wzw( texture_return a) +[[ + anno::display_name("WZW from texture_return"), + anno::description("Returns float3(w,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11530) +]] +{ return wzw(texture_return_float4(a)); } + +export float3 wwx( texture_return a) +[[ + anno::display_name("WWWX from texture_return"), + anno::description("Returns float3(w,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11533) +]] +{ return wwx(texture_return_float4(a)); } + +export float3 wwy( texture_return a) +[[ + anno::display_name("WWY from texture_return"), + anno::description("Returns float3(w,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11538) +]] +{ return wwy(texture_return_float4(a)); } + +export float3 wwz( texture_return a) +[[ + anno::display_name("WWZ from texture_return"), + anno::description("Returns float3(w,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11541) +]] +{ return wwz(texture_return_float4(a)); } + +export float3 www( texture_return a) +[[ + anno::display_name("WWW from texture_return"), + anno::description("Returns float3(w,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11545) +]] +{ return www(texture_return_float4(a)); } diff --git a/universalrobots_ur7e/materials/mdl/core_definitions.mdl b/universalrobots_ur7e/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/universalrobots_ur7e/materials/mdl/core_definitions.mdl @@ -0,0 +1,5806 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + + +// The "//group ... //endgroup" comments are used during the +// procedural creation of this module's documentation. +mdl 1.8; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::limits::*; +import ::base::*; +import ::tex::*; +import ::anno::*; +export using ::base import texture_return; +export using ::base import mono_mode; +export using ::base import color_layer_mode; +import support_definitions::*; +module [[ + anno::version( 2, 2, 0), + anno::display_name("NVIDIA core definitions") +]]; + +export annotation icon(string path); + +const string COPYRIGHT = "Copyright 2023 NVIDIA Corporation. All rights reserved."; + +//some local functions, dont document + +// https://www.shadertoy.com/view/4djSRW +float2 hash22(float2 p) +{ + float3 p3 = math::frac(float3(p.x, p.y, p.x) * float3(0.1031, 0.1030, 0.0973)); + p3 += math::dot(p3, float3(p3.y, p3.z, p3.x) + 33.33); + return math::frac((float2(p3.x, p3.x) + float2(p3.y, p3.z)) * float2(p3.z, p3.y)); +} + +// Christophe Schlick. “Fast Alternatives to Perlin’s Bias and Gain Functions”. +// In Graphics Gems IV, Morgan Kaufmann, 1994, pages 401–403. +// https://dept-info.labri.fr/~schlick/DOC/gem2.html +float schlick_gain(float x, float r) +{ + float rr = math::clamp(r, 0.001, 0.999); // to avoid glitch + float a = (1.0 / rr - 2.0) * (1.0 - 2.0 * x); + return (x < 0.5) ? x / (a + 1.0) : (a - x) / (a - 1.0); +} + +// blend two normals, similar to +// http://blog.selfshadow.com/publications/blending-in-detail/ +export float3 blend_normals( + float3 base_normal = state::normal() + [[ + anno::description("The base normal") + ]], + float base_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the base normal using a linear blend between state::normal and \"base_normal\""), + anno::soft_range(0.0,1.0) + ]], + float3 detail_normal = state::normal() + [[ + anno::description("The detail normal") + ]], + float detail_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\""), + anno::soft_range(0.0,1.0) + ]] +) +[[ + anno::description("Blend two normals or apply a detail normal map"), + anno::display_name("Blend normals"), + anno::thumbnail(".thumbs/blend_normals.png"), + anno::in_group("Texturing", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(33), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT)]] +{ + return base::blend_normals(base_normal,base_normal_weight,detail_normal,detail_normal_weight); +} +// blend 3 normals, similar to +// http://blog.selfshadow.com/publications/blending-in-detail/ +//TODO: make public? +float3 blend_3_normals( + float3 base_normal = state::normal() + [[ + anno::description("The base normal") + ]], + float base_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the base normal using a linear blend between state::normal and \"base_normal\"") + ]], + float3 detail_normal = state::normal() + [[ + anno::description("The detail normal") + ]], + float detail_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\"") + ]], + float3 detail_normal2 = state::normal() + [[ + anno::description("The detail normal2") + ]], + float detail_normal_weight2 = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\"") + ]] +) +[[ + anno::description("Blend three normals for sticker-like situations where a detail normal map is applied to a base normal map"), + anno::noinline() +]] +{ + float3 tu = state::texture_tangent_u(0); + float3 tv = state::texture_tangent_v(0); + float3 n = state::normal(); + + float w1 = math::saturate(base_normal_weight); + float w2 = math::saturate(detail_normal_weight); + float w3 = math::saturate(detail_normal_weight2); + + float3 n1_t = math::normalize( + float3(math::dot(tu, base_normal) * w1, + math::dot(tv, base_normal) * w1, + math::dot(n, base_normal) * w1 + 1.0f - w1)); + float3 n2_t = math::normalize( + float3(math::dot(tu, detail_normal) * w2, + math::dot(tv, detail_normal) * w2, + math::dot(n, detail_normal) * w2 + 1.0f - w2)); + float3 n3_t = math::normalize( + float3(math::dot(tu, detail_normal2) * w3, + math::dot(tv, detail_normal2) * w3, + math::dot(n, detail_normal2) * w3 + 1.0f - w3)); + + n1_t.z += 1.0f; + n2_t.x = -n2_t.x; + n2_t.y = -n2_t.y; + + float3 n12_t = n1_t * math::dot(n1_t, n2_t) / n1_t.z - n2_t; + + n12_t.z+= 1.0f; + n3_t.x = -n3_t.x; + n3_t.y = -n3_t.y; + float3 n_t = n12_t * math::dot(n12_t, n3_t) / n12_t.z - n3_t; + + return math::normalize( + tu * n_t.x + + tv * n_t.y + + n * n_t.z); +} + +// blend 3 normals by blending the gradients +// Morten S. Mikkelsen, Surface Gradient–Based Bump Mapping Framework, Journal of +// Computer Graphics Techniques (JCGT), vol. 9, no. 3, 60–90, 2020 +// http://jcgt.org/published/0009/03/04/ +float3 gradient_blend_3_normals( + float3 normal1 = state::normal(), + float normal1_weight = 1.0, + float3 normal2 = state::normal(), + float normal2_weight = 1.0, + float3 normal3 = state::normal(), + float normal3_weight = 1.0 +) +{ + float w1 = math::saturate(normal1_weight); + float w2 = math::saturate(normal2_weight); + float w3 = math::saturate(normal3_weight); + + // normal to gradient + float3 n = state::normal(); + float d1 = math::dot(n, normal1); + float d2 = math::dot(n, normal2); + float d3 = math::dot(n, normal3); + float3 g1 = (d1 * n - normal1) / math::max(limits::FLOAT_MIN, math::abs(d1)); + float3 g2 = (d2 * n - normal2) / math::max(limits::FLOAT_MIN, math::abs(d2)); + float3 g3 = (d3 * n - normal3) / math::max(limits::FLOAT_MIN, math::abs(d3)); + + // blend + float3 gg = w1 * g1 + w2 * g2 + w3 * g3; + + // gradient to normal + return math::normalize(n - gg); +} + +struct complex_ior +{ + color n; //refractive index + color k; //extinction coefficient +}; + + +//[Gulbrandsen2014] Ole Gulbrandsen, 2014. Artist friendly metallic fresnel. +complex_ior artistic_metal_to_complex_ior( + color reflectivity, + color edge_tint) +{ + float epsilon = 1.e-2; + color r = math::lerp(color(epsilon), color(1.0 - epsilon), reflectivity); + color g = edge_tint; + + color r_sqrt = math::sqrt(r); + color n_min = (1.0f - r) / (1.0f + r); + color n_max = (1.0f + r_sqrt) / (1.0f - r_sqrt); + + color n = math::lerp(n_max, n_min, g); + + color k2 = ((n + 1.0f) * (n + 1.0f) * r - (n - 1.0f) * (n - 1.0f)) / (1.0f - r); + k2 = math::max(k2, 0.0f); + color k = math::sqrt(k2); + + return complex_ior(n, k); +} + + + +float3x3 axis_rotation_matrix(float3 a, float r) +{ + float[2] sc = math::sincos(r); + float s = sc[0]; + float c = sc[1]; + float omc = 1.0 - c; + return float3x3( + a.x * a.x * omc + c, a.x * a.y * omc - a.x * s, a.x * a.z * omc + a.y * s, + a.y * a.x * omc + a.z * s, a.y * a.y * omc + c, a.y * a.z * omc - a.x * s, + a.z * a.x * omc - a.y * s, a.z * a.y * omc + a.x * s, a.z * a.z * omc + c + ); +} +float3 transform_rotate(float3 p, float3 r) +{ + // Euler rotation matrix xyz order to stay compatible with ::base + float3 s = math::sin(r); + float3 c = math::cos(r); + float3x3 rotate = + float3x3( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , + c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , + -s.y , s.x*c.y , c.x*c.y ); + return p*rotate; + +} +float3 transform_rotate_inv(float3 p, float3 r) +{ + // Euler rotation matrix xyz order to stay compatible with ::base + float3 s = math::sin(r); + float3 c = math::cos(r); + float3x3 rotate = + float3x3( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , + c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , + -s.y , s.x*c.y , c.x*c.y ); + return rotate*p; + +} + +//group Enumerations + +export enum material_type +[[ + anno::display_name("User interface group"), + anno::description("User interface grouping hint for materials"), + anno::hidden() +]] +{ + simple_material + [[ anno::description("Simple material") ]], + complex_material + [[ anno::description("Complex material") ]], + combiner_material + [[ anno::description("Combiner material") ]], + modifier_material + [[ anno::description("Material modifier") ]] +}; + +export enum emission_type +[[ + anno::display_name("Emission mode"), + anno::description("Emission mode definition for light sources"), + anno::hidden() +]] +{ + lumen_m2 + [[ anno::description("lumen/m2") ]], + lumen + [[ anno::description("lumen") ]], + candela + [[ anno::description("candela") ]], + nit + [[ anno::description("nit (candela/m2)") ]] +}; + +export enum cell_type +[[ + anno::display_name("Worley noise cell type"), + anno::description("Behavior of the Worley noise cell"), + anno::hidden() +]] +{ + simple_cells = 0 + [[ anno::description("Simple cells") ]], + crystal_cells = 1 + [[ anno::description("Crystal cells") ]], + bordered_cells = 2 + [[ anno::description("Bordered cells") ]] +}; + +export enum cell_base +[[ + anno::display_name("Worley noise cell shape"), + anno::description("Shape of the Worley noise cell"), + anno::hidden() +]] +{ + circular_cells = 0 + [[ anno::description("Circle base") ]], + diamond_cells = 1 + [[ anno::description("Diamond base") ]] +}; + +export enum displacement_vector_space +[[ + anno::display_name("Displacement mode"), + anno::description("Displacement Mode"), + anno::hidden() +]] +{ + // displacement_height = 0 // reserve this for now + // [[ anno::display_name("Height") ]], + + displacement_vector_tangent_space = 1 + [[ anno::display_name("Vector, Tangent Space") ]], + + displacement_vector_object_space = 2 + [[ anno::display_name("Vector, Object Space") ]], + + displacement_vector_world_space = 3 + [[ anno::display_name("Vector, World Space") ]] +}; + +//endgroup + +float3 transform_displacement_vector( + float3 displacement = float3(0.0) + [[ anno::description("Displacement vector") ]], + uniform displacement_vector_space space = displacement_vector_tangent_space + [[ anno::description("Space of the displacement vector") ]], + float scale = 1.0f + [[ anno::description("Displacement scale") ]] +) +[[ + anno::description("Transform input displacement vector to dispacement offset"), + anno::hidden() +]] +{ + float3 result; + switch (space) + { + // case displacement_height: + // result = state::normal() * displacement * scale; + // break; + + case displacement_vector_tangent_space: + result = state::texture_tangent_u(0) * displacement[0] * scale + + state::texture_tangent_v(0) * displacement[2] * scale + + state::normal() * displacement[1] * scale; + break; + + case displacement_vector_object_space: + result = state::transform_point( + state::coordinate_internal, + state::coordinate_object, + displacement * scale + ); + break; + + case displacement_vector_world_space: + result = state::transform_point( + state::coordinate_internal, + state::coordinate_world, + displacement * scale + ); + break; + + default: + result = state::position(); + break; + } + + return result; +} + +float4x4 rotation_translation_scale( + float3 rotation = float3(0.) + [[ anno::description("Rotation applied to every UVW coordinate") ]], + float3 translation = float3(0.) + [[ anno::description("Offset applied to every UVW coordinate") ]], + 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; +} + +export annotation suitable_as_light(); +export annotation type_of_material(material_type type); +export annotation dimension(float dimension); +export annotation dimension(float2 dimension); +export annotation dimension(float3 dimension); + + +//group Texturing functions + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +blend_colors( + color color_1 = color(0.0) + [[ anno::display_name("Color 1") ]], + color color_2 = color(1.0) + [[ anno::display_name("Color 2") ]], + uniform color_layer_mode mode = color_layer_blend + [[ + anno::description("Describes how Color 1 and Color 2 are combined"), + anno::display_name("Blend mode") + ]], + float weight = 1. + [[ + anno::description("Defines strength of the effect. At weight 0, only color 1 will be visible. At weight 1, the blend function will have full effect."), + anno::display_name("Blend weight"), + anno::soft_range(0.0,1.0) + ]], + uniform bool linear_blend = true + [[ + anno::description("The blend opperation can either be applied in linear or gamma (2.2) color space"), + anno::display_name("Linear blend") + ]] +) +[[ + anno::display_name("Blend colors"), + anno::description("Allows combining textures and colors in varied ways"), + anno::thumbnail(".thumbs/blend_colors.png"), + anno::in_group("Texturing", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(33), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + color c1 = linear_blend? color_1: math::pow(color_1,0.45); + color c2 = linear_blend? color_2: math::pow(color_2,0.45); + float w = linear_blend? weight: math::pow(weight,0.45); + texture_return r = base::blend_color_layers( + layers: base::color_layer[]( + base::color_layer( + layer_color: c2, + weight: w, + mode: mode + )), + base: c1 + ); + return linear_blend? r: texture_return(math::pow(r.tint,2.2),math::pow(r.mono,2.2)); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +file_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(0) + ]], + uniform mono_mode mono_source = mono_average + [[ + anno::display_name("Scalar mode"), + anno::description("Defines how the texture applies to scalar parameters"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(1) + ]], + uniform float brightness = 1. + [[ + anno::display_name("Brightness"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(2), + anno::soft_range(0.0,1.0) + ]], + uniform float contrast = 1. + [[ + anno::display_name("Contrast"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,1.0) + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture, color will be black and the scalar value will be 0."), + anno::display_name("Clip"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(9) + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(5) + ]], + uniform bool invert = false + [[ + anno::description("Invert image"), + anno::display_name("Invert image"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("Bitmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(30), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return invert == false? base::file_texture( + texture: texture, + mono_source: mono_source, + color_offset: color(0.5*brightness-0.5*contrast*brightness), + color_scale: color(brightness*contrast), + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clip:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clip:tex::wrap_repeat + ): base::file_texture( + texture: texture, + mono_source: mono_source, + color_offset: color(1.0-0.5*brightness+0.5*contrast*brightness), + color_scale: color(-brightness*contrast), + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clip:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clip:tex::wrap_repeat + ); +} +export color triplanar_file_texture( + uniform texture_2d texture_1 + [[ + anno::display_name("Bitmap file"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(0), + anno::description("Primary texture used for triplanar projection (X axis, and fallback for missing optional textures).") + ]], + float2 scaling_1 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(1) + ]], + float2 translation_1 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(2) + ]], + float rotation_1 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,360.0) + ]], + uniform texture_2d texture_2 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(4), + anno::description("Optional texture used for the second triplanar projection axis (Y axis).") + ]], + float2 scaling_2 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(5) + ]], + float2 translation_2 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(6) + ]], + float rotation_2 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(7), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::soft_range(0.0,360.0) + ]], + uniform texture_2d texture_3 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8), + anno::description("Optional texture used for the third triplanar projection axis (Z axis).") + ]], + float2 scaling_3 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(9) + ]], + float2 translation_3 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(10) + ]], + float rotation_3 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(11), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::soft_range(0.0,360.0) + ]], + float blend_range = 0.5 + [[ + anno::description("Defines the size of the transition area. 0 means hard transition, 1 means blending happens very softly."), + anno::display_name("Blend range"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(14), + anno::hard_range(0.0,1.0) + ]], + uniform color mean = color(0.0) + [[ + anno::description("Allows tweaking of the blend function. A value of 0 disables the function."), + anno::display_name("Mean color"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(15), + anno::hard_range(color(0.0),color(1.0)) + ]], + uniform float3 rotate_origin = float3(0.0) + [[ + anno::description("Allows manual alignment of the projection with an object"), + anno::display_name("Rotation of origin"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(13), + anno::soft_range(float3(0.0),float3(360.0)) + ]], + uniform bool object_space = true + [[ + anno::description("If off, world space will be used for generating texture coordinates. If on, object space will apply."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(12) + ]] +) +[[ + anno::display_name("Triplanar Bitmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Triplanar"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(30), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + state::coordinate_space space = object_space?state::coordinate_object:state::coordinate_world; + + float3 normal = state::transform_normal(state::coordinate_internal, space, state::normal()); + float3 position = state::transform_point(state::coordinate_internal, space, state::position()); + //TODO: pretransform the space? At least rotating the original space seems desireable and more is not feasible without dedicated ui (gizmo) + normal = transform_rotate(normal, math::radians(rotate_origin)); + position = transform_rotate(position, math::radians(rotate_origin)); + + float3 weights = math::abs(normal); + + //TODO: blendrange through pow or is there something better? pow has the drawback of needing 3 lookups nearly always + weights /=math::max_value(weights); + weights = math::pow(weights,1./math::max(blend_range, 0.001)); + //weights = math::saturate(weights-float3(1.-blend_range)); + + weights /=float3(weights.x+weights.y+weights.z); + + + float2 st1 = normal.x>0?float2(-position.z,position.y):float2(-position.z,-position.y); + float2 st2 = normal.y>0?float2(-position.z,-position.x):float2(-position.z,position.x); + float2 st3 = normal.z>0?float2(-position.y,position.x):float2(-position.y,-position.x); + + color c1 = weights.x>0? + support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st1)) + :color(0.); + color c2 = weights.y>0? tex::texture_isvalid(texture_2)? + support_definitions::lookup_color( + texture_2, + support_definitions::transform_st(math::radians(rotation_2),translation_2,scaling_2,st2)) + :support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st2)) + :color(0.); + color c3 = weights.z>0? tex::texture_isvalid(texture_3)? + support_definitions::lookup_color( + texture_3, + support_definitions::transform_st(math::radians(rotation_3),translation_3,scaling_3,st3)) + :support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st3)) + :color(0.); + return mean == color(0.0)? + c1*weights.x + c2*weights.y+ c3*weights.z: + support_definitions::biased_color_blend(weights.x,c1,weights.y,c2,weights.z,c3,mean); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +perlin_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(1) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(2) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform int noise_levels = 3 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(6) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(5) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(11) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(10) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Perlin noise texture"), + anno::description("Enable texturing with a random noise pattern"), + anno::thumbnail(".thumbs/perlin_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Perlin"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(34), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::perlin_noise_texture( + color1: color1, + color2: color2, + noise_levels: noise_levels, + absolute_noise: absolute_noise, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 perlin_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,5.0), + anno::description("Overall bump intensity applied to the generated Perlin noise normal perturbation.") + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform int noise_levels = 1 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(2), + anno::description("Enables billowing noise by folding negative noise values into the positive range.") + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(3) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(8) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(6) + ]] +) +[[ + anno::display_name("Perlin noise texture -- bump mapping"), + anno::description("Enable bump-map texturing with a random noise pattern"), + anno::thumbnail(".thumbs/perlin_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Perlin"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(35), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::perlin_noise_bump_texture( + factor: factor, + noise_levels: noise_levels, + absolute_noise: absolute_noise, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +worley_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space") , + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(6) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform cell_type mode = simple_cells + [[ + anno::display_name("Cell type") , + anno::description("Cell pattern type"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(2) + ]], + uniform cell_base metric = circular_cells + [[ + anno::display_name("Cell shape") , + anno::description("The shape of the cell form"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(4) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(10) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(9) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(8) + ]]) +[[ + anno::display_name("Cellular noise texture"), + anno::description("Allow texturing with a cell forming pattern"), + anno::thumbnail(".thumbs/worley_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Worley"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(36), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::worley_noise_texture( + color1: color1, + color2: color2, + mode: mode==crystal_cells?2:mode==bordered_cells?3:0, + metric: metric, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 worley_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the generated Worley noise normal perturbation.") + ]], + uniform cell_base metric = circular_cells + [[ + anno::display_name("Cell shape") , + anno::description("The shape of the cell form"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(2) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(8) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(7) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(6) + ]]) +[[ + anno::display_name("Cellular noise texture -- bump mapping"), + anno::description("Allow texturing with a cell forming pattern"), + anno::thumbnail(".thumbs/worley_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Worley"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(37), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::worley_noise_bump_texture( + factor: factor, + metric: metric, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +flow_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(10) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(11) + ]], + uniform int noise_levels = 3 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(3) + + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(4) + + ]], + uniform float phase = 0.0 + [[ + anno::display_name("Phase offset"), + anno::description("Controls the third dimension of the function"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(5), + anno::soft_range(0.0,1.0) + ]], + uniform float level_gain = 0.5 + [[ + anno::display_name("Level intensity gain"), + anno::description("If multiple levels are used, this parameter specifies a weighting factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,1.0) + ]], + uniform float level_scale = 2.0 + [[ + anno::display_name("Level scaling"), + anno::description("If multiple levels are used, this parameter specifies a global scaling factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(7), + anno::soft_range(0.0,4.0) + ]], + uniform float level_progressive_u_scale = 1. + [[ + anno::display_name("Progressive u scale"), + anno::description("If multiple levels are used, this parameter specifies an additional scaling factor in the \"u\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(8), + anno::soft_range(0.0,1.0) + ]], + uniform float level_progressive_v_motion = 0. + [[ + anno::display_name("Progressive v offset"), + anno::description("If multiple levels are used, this parameter specifies an offset for subsequent levels in the \"v\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(9), + anno::soft_range(0.0,1.0) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(15) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(14) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(13) + ]]) +[[ + anno::display_name("Flow noise texture"), + anno::description("Allow texturing with a 2D noise pattern suitable for waves"), + anno::thumbnail(".thumbs/flow_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Flow"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(38), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::flow_noise_texture( + color1: color1, + color2: color2, + levels: noise_levels, + phase: phase, + level_gain: level_gain, + level_scale: level_scale, + level_progressive_u_scale: level_progressive_u_scale, + level_progressive_v_motion: level_progressive_v_motion, + absolute_noise: absolute_noise, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 flow_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the generated flow-noise normal perturbation.") + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(12) + ]], + uniform int noise_levels = 1 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(8) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(2), + anno::description("Enables billowing noise by folding negative noise values into the positive range.") + ]], + uniform float phase = 0.0 + [[ + anno::display_name("Phase offset"), + anno::description("Controls the 3rd dimension of the function"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,1.0) + ]], + uniform float level_gain = 0.5 + [[ + anno::display_name("Level intensity gain"), + anno::description("If multiple levels are used, this parameter specifies a weighting factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(4), + anno::soft_range(0.0,1.0) + ]], + uniform float level_scale = 2.0 + [[ + anno::display_name("Level scaling"), + anno::description("If multiple levels are used, this parameter specifies a global scaling factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(5), + anno::soft_range(0.0,4.0) + ]], + uniform float level_progressive_u_scale = 1. + [[ + anno::display_name("Progressive u scale"), + anno::description("If multiple levels are used, this parameter specifies an additional scaling factor in the \"u\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,1.0) + ]], + uniform float level_progressive_v_motion = 0. + [[ + anno::display_name("Progressive v offset"), + anno::description("If multiple levels are used, this parameter specifies an offset for subsequent levels in the \"v\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(7), + anno::soft_range(0.0,1.0) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(11) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(10) + ]] +) +[[ + anno::display_name("Flow noise texture -- bump mapping"), + anno::description("Allow texturing with a 2D noise pattern suitable for waves"), + anno::thumbnail(".thumbs/flow_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Flow"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(39), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::flow_noise_bump_texture( + factor: factor, + levels: noise_levels, + phase: phase, + level_gain: level_gain, + level_scale: level_scale, + level_progressive_u_scale: level_progressive_u_scale, + level_progressive_v_motion: level_progressive_v_motion, + absolute_noise: absolute_noise, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +checker_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(1) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(7) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(6) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(3) + ]], + uniform float blur = 0 + [[ + anno::hard_range(0.0,1.0), + anno::display_name("Blur"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(2) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(5) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("3D checker texture"), + anno::description("Allows texturing a checkerboard pattern"), + anno::thumbnail(".thumbs/checker_texture.png"), + anno::in_group("Texturing", "Checker"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(40), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::checker_texture( + color1: color1, + color2: color2, + blur: blur/4., + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 checker_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the checker pattern.") + ]], + uniform float blur = 0 + [[ + anno::hard_range(0.0,1.0), + anno::display_name("Blur"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(1), + anno::description("Amount of softening applied to checker cell boundaries.") + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(2) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(6) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(5) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(4) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(3) + ]] +) +[[ + anno::display_name("3D checker texture -- bump mapping"), + anno::description("Allows texturing a checkerboard pattern"), + anno::thumbnail(".thumbs/checker_bump_texture.png"), + anno::in_group("Texturing", "Checker"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(41), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::checker_bump_texture( + factor: factor, + blur: blur/4., + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 file_bump_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + anno::usage("normal"), + anno::ui_order(1), + anno::description("Bitmap texture used as the bump source.") + ]], + uniform mono_mode bump_source = mono_average + [[ + anno::display_name("Bump mode"), + anno::description("Defines how the texture is evaluated to create the bumps"), + anno::in_group("Bitmap parameters"), + anno::ui_order(2) + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture the surface will be flat"), + anno::display_name("Clip"), + anno::in_group("Placement"), + anno::ui_order(5) + + ]], + uniform float factor = 1 + [[ + anno::display_name("Bump strength"), + anno::in_group("Bitmap parameters"), + anno::ui_order(3), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the sampled bitmap bump values.") + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("Bitmap texture, bump"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_bump_texture.png"), + anno::in_group("Texturing"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(31), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::file_bump_texture( + texture: texture, + bump_source: bump_source, + factor: factor, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clamp:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clamp:tex::wrap_repeat, + clip: clip + ); +} + +export float3 normalmap_texture( + uniform texture_2d texture + [[ + anno::display_name("Normalmap file"), + anno::in_group("Normalmap parameters"), + icon(".icons/normal_map_texture.svg"), + anno::usage("normal"), + anno::ui_order(1), + anno::description("Tangent-space normal map texture.") + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture the surface will be flat."), + anno::display_name("Clip"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(4) + + ]], + uniform float factor = 1 + [[ + anno::display_name("Strength"), + anno::in_group("Normal map parameters"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(2), + anno::soft_range(0.0,1.0), + anno::description("Strength multiplier applied to the sampled normal-map perturbation.") + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(3) + ]], + uniform bool flip = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(6) + ]] +) +[[ + anno::display_name("Normal map texture"), + anno::description("Allows the use of tangent space normal maps"), + anno::thumbnail(".thumbs/normalmap_texture.png"), + anno::in_group("Texturing"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::tangent_space_normal_texture( + texture: texture, + factor: factor, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clamp:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clamp:tex::wrap_repeat, + flip_tangent_v: flip, + clip: clip + ); +} +export float3 triplanar_normalmap_texture( + uniform texture_2d texture_1 + [[ + anno::usage("normal"), + anno::display_name("Bitmap file"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(0), + anno::description("Primary normal map used for triplanar projection (X axis, and fallback for missing optional textures).") + ]], + float2 scaling_1 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(1) + ]], + float2 translation_1 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(2) + ]], + float rotation_1 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_1 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(4) + ]], + uniform texture_2d texture_2 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::usage("normal"), + anno::ui_order(4), + anno::description("Optional normal map used for the second triplanar projection axis (Y axis).") + ]], + float2 scaling_2 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(5) + ]], + float2 translation_2 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(6) + ]], + float rotation_2 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(7), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_2 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8) + ]], + uniform texture_2d texture_3 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8), + anno::usage("normal"), + anno::description("Optional normal map used for the third triplanar projection axis (Z axis).") + ]], + float2 scaling_3 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(9) + ]], + float2 translation_3 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(10) + ]], + float rotation_3 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(11), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_3 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(12) + ]], + float blend_range = 0.5 + [[ + anno::description("Defines the size of the transition area. 0 means hard transition, 1 means blending happens very softly."), + anno::display_name("Blend range"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(13), + anno::hard_range(0.0,1.0) + ]], + float strength = 1.0 + [[ + anno::description("Overall strength of the normalmap"), + anno::display_name("Strength"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(14), + anno::soft_range(0.0,10.0) + ]], + uniform float3 rotate_origin = float3(0.0) + [[ + anno::description("Allows manual alignment of the projection with an object"), + anno::display_name("Rotation of origin"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(16), + anno::soft_range(float3(0.0),float3(360.0)) + ]], + uniform bool object_space = true + [[ + anno::description("If off, world space will be used for generating texture coordinates. If on, object space will apply."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Triplanar Normalmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Triplanar"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + state::coordinate_space space = object_space?state::coordinate_object:state::coordinate_world; + + float3 normal = state::transform_normal(state::coordinate_internal, space, state::normal()); + float3 position_original = state::transform_point(state::coordinate_internal, space, state::position()); + float3 rotation_origin_rad = math::radians(rotate_origin); + normal = transform_rotate(normal, rotation_origin_rad); + float3 position = transform_rotate(position_original, rotation_origin_rad); + float3 ty = + math::normalize( + transform_rotate_inv(state::transform_vector(space,state::coordinate_internal,float3(0.,-1.,0.)),rotation_origin_rad)); + float3 tz = + math::normalize( + transform_rotate_inv(state::transform_vector(space,state::coordinate_internal,float3(0.,0.,-1.)),rotation_origin_rad)); + + float3 weights = math::abs(normal); + + //TODO: blendrange through pow or is there something better? Pow means relatively little area where only 1 texture is looked up + weights /=math::max_value(weights); + weights = math::pow(weights,1./math::max(blend_range, 0.001)); + + + + float2 st1 = normal.x>0.0?float2(-position.z,position.y):float2(-position.z,-position.y); + float3 ts = math::normalize(math::cross(state::normal(),tz)); + float3 tt1 = math::normalize(math::cross(state::normal(),ts)); + + float2 st2 = normal.y>0?float2(-position.z,-position.x):float2(-position.z,position.x); + + float2 st3 = normal.z>0?float2(-position.y,position.x):float2(-position.y,-position.x); + float3 ts3 = math::normalize(math::cross(state::normal(),ty)); + float3 tt3 = math::normalize(math::cross(state::normal(),ts3)); + + tt3 = ( (tex::texture_isvalid(texture_3) && flip_3) || flip_1)? -tt3: tt3; + float3 tt2 = ( (tex::texture_isvalid(texture_2) && flip_2) || flip_1)? -tt1: tt1; + tt1 = flip_1? -tt1: tt1; + + float rotation_1_rad = math::radians(rotation_1); + float3x3 tan_rotation_mat_1 = axis_rotation_matrix(state::normal(), -rotation_1_rad); + float3 n1 = weights.x>0 && tex::texture_isvalid(texture_1)? + (support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st1))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength); + n1 = math::normalize( + ts * tan_rotation_mat_1 * n1.x + + tt1 * tan_rotation_mat_1 * n1.y + + state::normal() * (n1.z + (1.0 - strength))); + + float rotation_2_rad = math::radians(rotation_2); + float3x3 tan_rotation_mat_2 = tex::texture_isvalid(texture_2) + ? axis_rotation_matrix(state::normal(), -rotation_2_rad) + : tan_rotation_mat_1; + float3 n2 = weights.y>0? tex::texture_isvalid(texture_2)? + (support_definitions::lookup_float3( + texture_2, + support_definitions::transform_st(rotation_2_rad,translation_2,scaling_2,st2))- float3(0.5)) * (2.0 * strength) + :tex::texture_isvalid(texture_1)?(support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st2))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength):float3(0.,0.,strength); + n2 = math::normalize( + ts * tan_rotation_mat_2 * n2.x + + tt2 * tan_rotation_mat_2 * n2.y + + state::normal() * (n2.z + (1.0 - strength))); + + float rotation_3_rad = math::radians(rotation_3); + float3x3 tan_rotation_mat_3 = tex::texture_isvalid(texture_3) + ? axis_rotation_matrix(state::normal(), -rotation_3_rad) + : tan_rotation_mat_1; + float3 n3 = weights.z>0? tex::texture_isvalid(texture_3)? + (support_definitions::lookup_float3( + texture_3, + support_definitions::transform_st(rotation_3_rad,translation_3,scaling_3,st3))- float3(0.5)) * (2.0 * strength) + :tex::texture_isvalid(texture_1)?(support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st3))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength):float3(0.,0.,strength); + n3 = math::normalize( + ts3 * tan_rotation_mat_3 * n3.x + + tt3 * tan_rotation_mat_3 * n3.y + + state::normal() * (n3.z + (1.0 - strength))); + + return blend_3_normals(n1,weights.x,n2,weights.y,n3,weights.z); +} + +// Morten S. Mikkelsen, Practical Real-Time Hex-Tiling, Journal of Computer Graphics +// Techniques (JCGT), vol. 11, no. 2, 77-94, 2022 +// http://jcgt.org/published/0011/03/05/ +struct hextile_data { + float2 coord1; + float2 coord2; + float2 coord3; + float3 weights; + float3x3 tangent_rot_mat1; + float3x3 tangent_rot_mat2; + float3x3 tangent_rot_mat3; +}; + +hextile_data hextile_coord( + float2 coord, + float rotation, + float2 rotation_range, + float scale, + float2 scale_range, + float offset, + float2 offset_range) +{ + float sqrt3_2 = math::sqrt(3.0) * 2.0; + + // scale coord to maintain the original fit + float2 st = coord * sqrt3_2; + + // skew input space into simplex triangle grid + // (1, 0, -tan(30), 2*tan(30)) + float2x2 to_skewed = float2x2(1.0, 0.0, -0.57735027, 1.15470054); + float2 st_skewed = to_skewed * st; + + // barycentric weights + float2 st_frac = math::frac(st_skewed); + float3 temp = float3(st_frac.x, st_frac.y, 0.0); + temp.z = 1.0 - temp.x - temp.y; + + float s = math::step(0.0, -temp.z); + float s2 = 2.0 * s - 1.0; + + float w1 = -temp.z * s2; + float w2 = s - temp.y * s2; + float w3 = s - temp.x * s2; + + // vertex IDs + int2 base_id = int2(math::floor(st_skewed)); + int si = int(s); + int2 id1 = base_id + int2(si, si); + int2 id2 = base_id + int2(si, 1 - si); + int2 id3 = base_id + int2(1 - si, si); + + // tile center + float2x2 inv_skewed = float2x2(1.0, 0.0, 0.5, 1.0 / 1.15470054); + float2 ctr1 = inv_skewed * float2(id1) / float2(sqrt3_2); + float2 ctr2 = inv_skewed * float2(id2) / float2(sqrt3_2); + float2 ctr3 = inv_skewed * float2(id3) / float2(sqrt3_2); + + // reuse hash for performance + float2 seed_offset = float2(0.12345); // to avoid some zeros + float2 rand1 = hash22(float2(id1) + seed_offset); + float2 rand2 = hash22(float2(id2) + seed_offset); + float2 rand3 = hash22(float2(id3) + seed_offset); + + // randomized rotation matrix + float2 rr = math::radians(rotation_range); + float rrr1 = math::lerp(rr.x, rr.y, rand1.x * rotation); + float rrr2 = math::lerp(rr.x, rr.y, rand2.x * rotation); + float rrr3 = math::lerp(rr.x, rr.y, rand3.x * rotation); + float[2] sc1 = math::sincos(rrr1); + float[2] sc2 = math::sincos(rrr2); + float[2] sc3 = math::sincos(rrr3); + float2x2 rm1 = float2x2(sc1[1], -sc1[0], sc1[0], sc1[1]); + float2x2 rm2 = float2x2(sc2[1], -sc2[0], sc2[0], sc2[1]); + float2x2 rm3 = float2x2(sc3[1], -sc3[0], sc3[0], sc3[1]); + + // rotation matrix for tangent vectors + float3x3 trm1 = axis_rotation_matrix(state::normal(), -rrr1); + float3x3 trm2 = axis_rotation_matrix(state::normal(), -rrr2); + float3x3 trm3 = axis_rotation_matrix(state::normal(), -rrr3); + + // randomized scale + float2 sr = scale_range; + float2 scale1 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand1.y), scale); + float2 scale2 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand2.y), scale); + float2 scale3 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand3.y), scale); + + // randomized offset + float2 offset1 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand1 * offset); + float2 offset2 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand2 * offset); + float2 offset3 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand3 * offset); + + // get coord + float2 st1 = ((coord - ctr1) * rm1 / scale1) + ctr1 + offset1; + float2 st2 = ((coord - ctr2) * rm2 / scale2) + ctr2 + offset2; + float2 st3 = ((coord - ctr3) * rm3 / scale3) + ctr3 + offset3; + + hextile_data tile_data = hextile_data(st1, st2, st3, float3(w1, w2, w3), trm1, trm2, trm3); + + return tile_data; +} + +export color hextiling_file_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(0), + anno::description("Bitmap texture sampled by the hextiling algorithm.") + ]], + uniform int texture_space = 0 + [[ + anno::display_name("UV space index"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(1), + anno::description("UV set index used for texture-coordinate lookup.") + ]], + color default_color = color(0.0) + [[ + anno::display_name("Default color"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(2), + anno::description("Fallback color returned when no valid texture is provided.") + ]], + float2 repeat = float2(1.0, 1.0) + [[ + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/hextiling.svg"), + anno::ui_order(3), + anno::description("UV tiling multiplier applied before hextiling.") + ]], + float rotation = 1.0 + [[ + anno::display_name("Rotation"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(4), + anno::description("Random rotation amount; 0 disables random rotation and 1 uses the full rotation range.") + ]], + float2 rotation_range = float2(0.0, 360.0) + [[ + anno::display_name("Rotation Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(5), + anno::description("Minimum and maximum random rotation in degrees.") + ]], + float scale = 1.0 + [[ + anno::display_name("Scale"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(6), + anno::description("Random scale amount; 0 disables random scaling and 1 uses the full scale range.") + ]], + float2 scale_range = float2(0.5, 2.0) + [[ + anno::display_name("Scale Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(7), + anno::description("Minimum and maximum random tile scale.") + ]], + float offset = 1.0 + [[ + anno::display_name("Offset"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(8), + anno::description("Random offset amount; 0 disables random offsets and 1 uses the full offset range.") + ]], + float2 offset_range = float2(0.0, 1.0) + [[ + anno::display_name("Offset Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(9), + anno::description("Minimum and maximum random UV offset applied per tile.") + ]], + float falloff = 0.5 + [[ + anno::display_name("Falloff"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(10), + anno::description("Controls how quickly tile blending transitions between neighboring tiles.") + ]], + float falloff_contrast = 0.5 + [[ + anno::display_name("Falloff Contrast"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(11), + anno::description("Controls how strongly luminance influences blending weights.") + ]] +) +[[ + anno::display_name("Hextiling Bitmap texture"), + anno::description("Allows infinite texturing without obvious repeat patterns."), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Hextiling"), + icon(".icons/hextiling.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + if (!tex::texture_isvalid(texture)) + return default_color; + + + float3 uvw = state::texture_coordinate(texture_space); + float2 coord = float2(uvw.x, uvw.y) * repeat; + + // get triangle coord + hextile_data tile_data = hextile_coord( + coord: coord, + rotation: rotation, + rotation_range: rotation_range, + scale: scale, + scale_range: scale_range, + offset: offset, + offset_range: offset_range + ); + + // lookup texture + color c1 = tex::lookup_color(texture, tile_data.coord1); + color c2 = tex::lookup_color(texture, tile_data.coord2); + color c3 = tex::lookup_color(texture, tile_data.coord3); + + // luminance as weight + float3 cw = float3(math::luminance(c1), math::luminance(c2), math::luminance(c3)); + cw = math::lerp(float3(1.0), cw, float3(falloff_contrast)); + + // blend weights + float3 w = cw * math::pow(tile_data.weights, 7.0); + w /= (w.x + w.y + w.z); + + // apply s-curve gain + if (falloff != 0.5) + { + w.x = schlick_gain(w.x, falloff); + w.y = schlick_gain(w.y, falloff); + w.z = schlick_gain(w.z, falloff); + w /= (w.x + w.y + w.z); + } + + // blend + color out_color = w.x * c1 + w.y * c2 + w.z * c3; + + return out_color; +} + +export float3 hextiling_normalmap_texture( + uniform texture_2d texture + [[ + anno::usage("normal"), + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(0), + anno::description("Normal map texture sampled by the hextiling algorithm.") + ]], + uniform int texture_space = 0 + [[ + anno::display_name("UV space index"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(1), + anno::description("UV set index used for texture-coordinate lookup.") + ]], + float3 default_normal = state::normal() + [[ + anno::display_name("Default normal"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(2), + anno::description("Fallback normal returned when no valid normal map is provided.") + ]], + float2 repeat = float2(1.0, 1.0) + [[ + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/hextiling.svg"), + anno::ui_order(3), + anno::description("UV tiling multiplier applied before hextiling.") + ]], + float rotation = 1.0 + [[ + anno::display_name("Rotation"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(4), + anno::description("Random rotation amount; 0 disables random rotation and 1 uses the full rotation range.") + ]], + float2 rotation_range = float2(0.0, 360.0) + [[ + anno::display_name("Rotation Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(5), + anno::description("Minimum and maximum random rotation in degrees.") + ]], + float scale = 1.0 + [[ + anno::display_name("Scale"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(6), + anno::description("Random scale amount; 0 disables random scaling and 1 uses the full scale range.") + ]], + float2 scale_range = float2(0.5, 2.0) + [[ + anno::display_name("Scale Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(7), + anno::description("Minimum and maximum random tile scale.") + ]], + float offset = 1.0 + [[ + anno::display_name("Offset"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(8), + anno::description("Random offset amount; 0 disables random offsets and 1 uses the full offset range.") + ]], + float2 offset_range = float2(0.0, 1.0) + [[ + anno::display_name("Offset Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(9), + anno::description("Minimum and maximum random UV offset applied per tile.") + ]], + float falloff = 0.5 + [[ + anno::display_name("Falloff"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(10), + anno::description("Controls how quickly tile blending transitions between neighboring tiles.") + ]], + float strength = 1.0 + [[ + anno::display_name("Strength"), + anno::in_group("Normal map parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(11), + anno::soft_range(0.0, 1.0), + anno::description("Strength multiplier applied to sampled normal-map perturbations.") + ]], + uniform bool flip_g = false + [[ + anno::display_name("Flip V"), + anno::in_group("Normal map parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(12), + anno::description("Flips the green (Y) channel of the sampled normal maps.") + ]] +) +[[ + anno::display_name("Hextiling Normalmap texture"), + anno::description("Allows infinite texturing without obvious repeat patterns."), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Hextiling"), + icon(".icons/hextiling.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + if (!tex::texture_isvalid(texture)) + return default_normal; + + + float3 uvw = state::texture_coordinate(texture_space); + float2 coord = float2(uvw.x, uvw.y) * repeat; + + // get triangle coord + hextile_data tile_data = hextile_coord( + coord: coord, + rotation: rotation, + rotation_range: rotation_range, + scale: scale, + scale_range: scale_range, + offset: offset, + offset_range: offset_range + ); + + // lookup normalmap + float3 nm1 = tex::lookup_float3(texture, tile_data.coord1); + float3 nm2 = tex::lookup_float3(texture, tile_data.coord2); + float3 nm3 = tex::lookup_float3(texture, tile_data.coord3); + nm1.y = flip_g ? 1.0 - nm1.y : nm1.y; + nm2.y = flip_g ? 1.0 - nm2.y : nm2.y; + nm3.y = flip_g ? 1.0 - nm3.y : nm3.y; + + // transform to geometry normals + nm1 = 2.0 * nm1 - 1.0; + nm2 = 2.0 * nm2 - 1.0; + nm3 = 2.0 * nm3 - 1.0; + float3 sn = state::normal(); + float3 tu1 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat1 * strength; + float3 tu2 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat2 * strength; + float3 tu3 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat3 * strength; + float3 tv1 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat1 * strength; + float3 tv2 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat2 * strength; + float3 tv3 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat3 * strength; + float3 n1 = math::normalize(tu1 * nm1.x + tv1 * nm1.y + sn * nm1.z); + float3 n2 = math::normalize(tu2 * nm2.x + tv2 * nm2.y + sn * nm2.z); + float3 n3 = math::normalize(tu3 * nm3.x + tv3 * nm3.y + sn * nm3.z); + + // belnd weights + float3 w = math::pow(tile_data.weights, 7.0); + w /= (w.x + w.y + w.z); + + // apply s-curve gain + if (falloff != 0.5) + { + w.x = schlick_gain(w.x, falloff); + w.y = schlick_gain(w.y, falloff); + w.z = schlick_gain(w.z, falloff); + w /= (w.x + w.y + w.z); + } + + // blend + float3 out_normal = gradient_blend_3_normals(n1, w.x, n2, w.y, n3, w.z); + + return out_normal; +} + +//endgroup + +//material section----------------------------------------------------------------------------------------------- + +//group Simple materials + +export material diffuse( + color diffuse_color = color(.8) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead a powdery appearance") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple diffuse"), + anno::description("A basic diffuse material"), + anno::thumbnail(".thumbs/diffuse.png"), + anno::in_group("Materials", "Diffuse"), + anno::ui_order(0), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic")) +]] + = material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::diffuse_reflection_bsdf( + roughness: roughness, + tint: diffuse_color + ) + ) + ) +); + +export material dusty_diffuse( + color diffuse_color = color(.8) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Dusty diffuse"), + anno::description("A dusty diffuse material"), + anno::thumbnail(".thumbs/diffuse.png"), + anno::in_group("Materials", "Diffuse"), + anno::ui_order(1), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic")) +]] + = material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::dusty_diffuse_reflection_bsdf( + tint: diffuse_color + ) + ) + ) +); + +export material scratched_metal_v2( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::ui_order(1), + anno::description("The color of the metal") + ]], + float roughness = 0.2 + [[ + anno::display_name("Roughness"), + anno::ui_order(3), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflection weight"), + anno::ui_order(4), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::ui_order(5), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight") + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::ui_order(6), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees.") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::ui_order(7), + anno::description("Attach bump or normal maps here") + ]], + color edge_color = color(1.0) + [[ + anno::display_name("Edge color"), + anno::ui_order(2), + anno::description("The color of the metal towards the edge") + ]] +) +[[ + anno::display_name("Metal"), + anno::description("A metallic material with stretched reflections"), + anno::thumbnail(".thumbs/scratched_metal.png"), + anno::in_group("Materials"), + anno::ui_order(1), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness*roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + complex_ior ior = artistic_metal_to_complex_ior(metal_color, edge_color); + bsdf glossy_bsdf = df::fresnel_factor( + ior: ior.n, + extinction_coefficient: ior.k, + base: df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ) + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_plastic_v2( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float roughness = 0.2 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(2) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(4) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(5) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Additional reflectivity control"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Plastic"), + anno::description("A basic dielectric, works for everything opaque that is not metallic. Supports stretched highlights."), + anno::thumbnail(".thumbs/scratched_plastic.png"), + anno::in_group("Materials"), + anno::ui_order(2), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness*roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material retroreflective( + color base_color = color(.2,.03,.03) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + color reflection_color = color(.8,.8,.03) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the retroreflection"), + anno::ui_order(2) + ]], + float roughness = 0.15 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(3) + ]], + float normal_reflectivity = .05 + [[ + anno::display_name("Reflection weight facing"), + anno::hard_range(0.0,1.), + anno::description("Reflectivity control for geometry facing the viewer"), + anno::ui_order(4) + ]], + float grazing_reflectivity = 1. + [[ + anno::display_name("Reflection weight edge"), + anno::hard_range(0.0,1.), + anno::description("Reflectivity control for the reflectivity at geometry edges"), + anno::ui_order(5) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Retroreflective"), + anno::description("A material with a retroreflective component, works well for road signs and retroreflective stickers"), + anno::thumbnail(".thumbs/retroreflective.png"), + anno::in_group("Materials"), + anno::ui_order(3), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","retroreflective","roadsign","stone")) +]] + = let{ + bsdf glossy_bsdf = df::backscattering_glossy_reflection_bsdf( + tint: reflection_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::custom_curve_layer( + normal_reflectivity: 1.-normal_reflectivity, + grazing_reflectivity: 1.-grazing_reflectivity, + base: glossy_bsdf, + layer: df::diffuse_reflection_bsdf( + roughness: 1.0, + tint: base_color + ), + normal: normal + ) + ) + ) +); + +export material flex_material_v2( + color base_color = color(.5) + [[ + anno::display_name("Base color"), + anno::in_group("Base"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float diffuse_roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to a more \"powdery\" look"), + anno::ui_order(2) + ]], + float is_metal = 0.0 + [[ + anno::display_name("Metallic material"), + anno::in_group("Base"), + anno::description("If 1.0, reflection will be colored and independent of view direction. If 0.0, reflection will be white and direction dependent. Directional dependence is in this case based on the IOR (Fresnel effect)."), + anno::ui_order(3) + ]], + float reflectivity = 1.0 + [[ + anno::display_name("Reflection weight"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Controls the amount of reflection"), + anno::ui_order(5) + ]], + float reflection_roughness = 0.3 + [[ + anno::display_name("Reflection roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to more blurry reflections"), + anno::ui_order(4) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Reflection anisotropy"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(6) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(7) + ]], + float transparency = 0.0 + [[ + anno::display_name("Transmission weight"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("Weights how much light passes through the object compared to its diffuse reflectivity."), + anno::ui_order(12) + ]], + color transmission_color = color(1.) + [[ + anno::display_name("Transmission color"), + anno::in_group("Transmission"), + anno::description("Color effect for transmission independent of thickness of the object, similar to stained glass."), + anno::ui_order(8) + ]], + uniform color volume_color = color(1.0) + [[ + anno::display_name("Volume color"), + anno::in_group("Transmission"), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at \"Volume reference distance\" (m)."), + anno::ui_order(9) + ]], + float transmission_roughness = 0.0 + [[ + anno::display_name("Transmission roughness"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("higher values lead to objects seen through the material to appear blurry"), + anno::ui_order(11) + ]], + uniform float base_thickness = 0.1 + [[ + anno::display_name("Volume reference distance"), + anno::in_group("Transmission"), + anno::soft_range(0.0,10.0), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(10) + ]], + uniform float ior = 1.5 + [[ + anno::display_name("IOR"), + anno::in_group("Global"), + anno::soft_range(1.0,4.0), + anno::description("Determines refraction in the volume. It also influences the reflectivity for materials that are not metallic."), + anno::ui_order(14) + ]], + uniform bool thin_walled = false + [[ + anno::display_name("Thin walled"), + anno::in_group("Global"), + anno::description("Thin walled materials do not refract and do not have volume effects. Good for soap bubbles or window glass."), + anno::ui_order(13) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::in_group("Global"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(16) + ]], + uniform float abbe_number = 0.0 + [[ + anno::in_group("Global"), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85"), + anno::soft_range(0.0,100.0), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Flexible material model"), + anno::description("A complex material that can be configured to a wide variety of looks"), + anno::thumbnail(".thumbs/flex_material.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials"), + anno::ui_order(5), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("generic","complex")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: reflection_roughness*reflection_roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); + bsdf diffuse_bsdf = df::diffuse_reflection_bsdf( + tint: base_color, + roughness: diffuse_roughness + ); + bsdf transmission_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: transmission_roughness*transmission_roughness + ); + bsdf add_transparency = df::weighted_layer( + weight: transparency, + layer: transmission_bsdf, + base: diffuse_bsdf, + normal: normal + ); + bsdf add_reflection = df::weighted_layer( + is_metal, + df::weighted_layer( + weight: reflectivity, + layer: df::directional_factor(base_color,color(1.0),5.,glossy_bsdf), + base: add_transparency, + normal: normal + ), + df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ) + ); + bsdf add_normal = df::weighted_layer( + normal: normal, + weight: 1., + layer: add_reflection + ); +} in material( + thin_walled: thin_walled, + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number), + surface: material_surface( + scattering: add_normal + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ) +); + +export material thin_glass_v2( + color glass_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin glass"), + anno::description("A basic transmissive dielectric without refraction or volume"), + anno::thumbnail(".thumbs/thin_glass.png"), + anno::in_group("Materials", "Glass"), + anno::ui_order(6), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf glossy_transmission_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: glass_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + layer: glossy_transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) +); + +export material thin_translucent_v2( + color surface_color = color(.95) + [[ + anno::display_name("Diffuse color"), + anno::description("The color of the material") + ]], + color translucent_color = color(.95) + [[ + anno::display_name("Translucence color"), + anno::description("The color of the volume of the material") + ]], + float translucency = 0.5 + [[ + anno::display_name("Translucence weight"), + anno::hard_range(0.0,1.), + anno::description("Fraction of the incoming light that should be visible on the backside") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin translucent"), + anno::description("A diffuse transmissive dielectric material"), + anno::thumbnail(".thumbs/thin_translucent.png"), + anno::in_group("Materials", "Translucent"), + anno::ui_order(7), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","leaves","paper","sheets")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf transmission_bsdf = df::diffuse_transmission_bsdf( + tint: translucent_color + ); + bsdf base_bsdf = df::diffuse_reflection_bsdf( + tint: surface_color + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + weight: translucency, + normal: normal, + base: base_bsdf, + layer: df::weighted_layer( + layer: transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) + ) +); + +export material thick_glass_v2( + color transmission_color = color(1.0) + [[ + anno::ui_order(1), + anno::display_name("Transmission color"), + anno::description("Colors the light entering the volume, similar to stained glass") + ]], + uniform color glass_color = color(.95) + [[ + anno::ui_order(2), + anno::display_name("Volume color"), + anno::description("The color of the glass body") + ]], + float roughness = 0.0 + [[ + anno::ui_order(4), + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::ui_order(5), + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction") + ]], + uniform float base_thickness = .1 + [[ + anno::ui_order(3), + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here.") + + ]], + float3 normal = state::normal() + [[ + anno::ui_order(7), + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]], + uniform float abbe_number = 0.0 + [[ + anno::ui_order(6), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0) + ]] +) +[[ + anno::display_name("Thick glass"), + anno::description("A basic transmissive dielectric with refraction and coloring in the volume"), + anno::thumbnail(".thumbs/thick_glass.png"), + anno::in_group("Materials", "Glass"), + anno::ui_order(8), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf glossy_bsdf_transmission = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: roughness*roughness + ); +} in material( + thin_walled: false, + surface: material_surface( + df::weighted_layer( + normal: normal, + weight: 1., + layer: df::fresnel_layer( + layer: glossy_bsdf, + base: glossy_bsdf_transmission, + ior: ior, + normal: normal + ) + ) + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(glass_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material thick_translucent_v2( + color transmission_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + uniform color volume_color = color(.95) + [[ + anno::display_name("Volume color"), + anno::description("The color of the volume at \"Volume reference distance\""), + anno::ui_order(2) + ]], + uniform float volume_scattering = 0.5 + [[ + anno::display_name("Volume scattering"), + anno::hard_range(0.0,.99999), + anno::description("Amount of scattering for objects at \"Volume reference distance\""), + anno::ui_order(3) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(5) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Overall reflectivity of the material"), + anno::ui_order(6) + ]], + uniform float base_thickness = .1 + [[ + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" and \"Volume scattering\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(4) + + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(9) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction"), + anno::ui_order(7) + ]], + uniform float abbe_number = 0.0 + [[ + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off, Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Thick translucent"), + anno::description("A subsurface scattering material"), + anno::thumbnail(".thumbs/thick_translucent.png"), + anno::in_group("Materials", "Translucent"), + anno::ui_order(9), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","wax","milk")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf transmission_bsdf = df::specular_bsdf( + mode: df::scatter_transmit, + tint: transmission_color + ); + +} in material( + thin_walled: false, + surface: material_surface( + df::fresnel_layer( + normal: normal, + weight: reflectivity, + ior: ior, + layer: glossy_bsdf, + base: df::weighted_layer( + normal: normal, + weight: 1., + layer: transmission_bsdf + ) + ) + ), + volume: material_volume( + scattering_coefficient: (base_thickness <= 0)? color(0): math::log(color(1.-volume_scattering)) / - base_thickness, + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +//endgroup + +//group Modifier materials + +export material blend( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material the blend is based on") + ]], + material blend = scratched_metal_v2() + [[ + anno::display_name("Blend Material"), + anno::description("Surface properties to use for the blend") + ]], + float weight = 0. + [[ + anno::display_name("Blend weight"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]] +) +[[ + anno::display_name("Blend materials"), + anno::description("Blend characteristics of 2 materials or mask them using a texture"), + anno::thumbnail(".thumbs/blend.png"), + anno::in_group("Material modifiers", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = let { + float inv_weight = 1.0f - weight; +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: weight, + layer: blend.surface.scattering, + base: base.surface.scattering + ), + emission: material_emission( + mode: base.surface.emission.mode, //cant vary + intensity: math::lerp(base.surface.emission.intensity,blend.surface.emission.intensity, weight), + emission: df::unbounded_mix( + df::edf_component[] + ( + df::edf_component(inv_weight,base.surface.emission.emission), + df::edf_component(weight,blend.surface.emission.emission) + ) + ) + ) + ), + volume: material_volume( + scattering: df::unbounded_mix( + df::vdf_component[] + ( + df::vdf_component(inv_weight,base.volume.scattering), + df::vdf_component(weight,blend.volume.scattering) + ) + ), + absorption_coefficient: math::lerp(base.volume.absorption_coefficient,base.volume.absorption_coefficient,weight), + scattering_coefficient: math::lerp(base.volume.scattering_coefficient,base.volume.scattering_coefficient,weight), + emission_intensity: math::lerp(base.volume.emission_intensity,blend.volume.emission_intensity, weight) + + ), + ior: base.ior, //can't vary + thin_walled: base.thin_walled, //can't vary + geometry: material_geometry( + displacement: math::lerp(base.geometry.displacement, blend.geometry.displacement, weight), + cutout_opacity: math::lerp(base.geometry.cutout_opacity, blend.geometry.cutout_opacity, weight), + normal: blend_normals(base.geometry.normal, inv_weight, blend.geometry.normal, weight) + ) +); + +export material twosided( + material front = scratched_plastic_v2() + [[ + anno::display_name("Front material"), + anno::description("The material on the front faces.") + ]], + material back = scratched_metal_v2() + [[ + anno::display_name("Back material"), + anno::description("The material on the back faces.") + ]] +) +[[ + anno::display_name("Two-sided materials"), + anno::description("Allows you to apply a material to front and back surfaces."), + anno::thumbnail(".thumbs/twosided.png"), + anno::in_group("Material modifiers"), + icon(".icons/two_sided_materials.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = material( + thin_walled: true, + ior: front.ior, + surface: front.surface, + backface: back.surface, + geometry: front.geometry +); + +export material surface_falloff( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material the blend is based on") + ]], + material blend = scratched_metal_v2() + [[ + anno::display_name("Blend Material"), + anno::description("Surface properties to use for the blend") + ]], + float facing_weight = 0.0 + [[ + anno::display_name("Blend weight facing"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]], + float edge_weight = 1.0 + [[ + anno::display_name("Blend weight edge"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]], + float blend_bias = 1. + [[ + anno::display_name("Blend bias"), + anno::soft_range(0.0,10.), + anno::description("Controls how fast the transition should happen. 5.0 results in fresnel like transition.") + ]] +) +[[ + anno::display_name("Surface falloff"), + anno::description("Blend surface characteristics of 2 materials or mask them using a texture"), + anno::thumbnail(".thumbs/surface_falloff.png"), + anno::in_group("Material modifiers", "Blend"), + icon(".icons/surface_falloff.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = material( + surface: material_surface( + scattering: df::custom_curve_layer( + weight: 1., + exponent: blend_bias, + normal_reflectivity: facing_weight, + grazing_reflectivity: edge_weight, + layer: blend.surface.scattering, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_clearcoat_v2( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied"), + anno::ui_order(1) + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat"), + anno::ui_order(5) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat"), + anno::ui_order(3) + ]], + float visibility = 1.0 + [[ + anno::display_name("Coat visibility"), + anno::hard_range(0.0,1.0), + anno::description("Determines visibility of the clear coat"), + anno::ui_order(4) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(6) + ]], + color coat_filter_color = color(1.) + [[ + anno::display_name("Coat filter color"), + anno::description("For simulating coatings with colored resins that modulate the color of underlying layers"), + anno::ui_order(2) + ]] +) +[[ + anno::display_name("Apply clear coating"), + anno::description("Apply clear coat to an existing material"), + anno::author("NVIDIA Corporation"), + anno::thumbnail(".thumbs/apply_clearcoat.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_clear_coating.svg"), + anno::ui_order(16), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness*roughness, + tint: color(1.) + ); + color base_tint = blend_colors(color(1.), coat_filter_color, color_layer_blend, visibility).tint; +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: normal, + weight: visibility, + layer: glossy_bsdf, + base: df::tint(tint: base_tint, base: base.surface.scattering) + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_thinfilm( + material base = scratched_metal_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get shows a thin film effect") + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("The IOR of the thin film interface") + ]], + float thickness = 400.0 + [[ + anno::display_name("Thickness"), + anno::soft_range(10.0,5000.0), + anno::description("Thickness of the thin film in nm") + ]] +) +[[ + anno::display_name("Apply thin film"), + anno::description("Apply thin film to an existing material"), + anno::thumbnail(".thumbs/apply_thinfilm.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_thin_film.svg"), + anno::ui_order(17), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::thin_film( + ior: color(ior), + thickness: thickness, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_metalcoat_v2( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a metallic coating applied"), + anno::ui_order(1) + ]], + color metal_color = color(.95) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the metal"), + anno::ui_order(2) + ]], + float visibility = .3 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the coat"), + anno::ui_order(4) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metal coat"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(5) + ]] +) +[[ + anno::display_name("Apply thin metal coating"), + anno::description("Apply metal coat to an existing material"), + anno::thumbnail(".thumbs/apply_metalcoat.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_thin_metal_coating.svg"), + anno::ui_order(18), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness*roughness, + tint: metal_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: visibility, + normal: normal, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_dustcover( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + color dust_color = color(.7) + [[ + anno::display_name("Dust color"), + anno::description("The color of the dust") + ]], + float visibility = 1. + [[ + anno::display_name("Dust density"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the cover") + ]], + uniform float dust_density = .5 + [[ + anno::display_name("Dust amount"), + anno::hard_range(.01,1), + anno::description("How dusty the material is") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Apply a cover of dust"), + anno::description("Apply a diffuse cover of dust or dirt"), + anno::thumbnail(".thumbs/apply_dustcover.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_dust_cover.svg"), + anno::ui_order(19), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf dust_bsdf = df::diffuse_reflection_bsdf( + roughness: 1., + tint: dust_color + ); +} in material( + surface: material_surface( + scattering: df::custom_curve_layer( + weight: visibility, + normal_reflectivity: dust_density*dust_density*dust_density, + exponent: (1.05-dust_density)*2., + normal: normal, + layer: dust_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_colorfalloff_v2( + material base = scratched_metal_v2(metal_color: color(1.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + uniform color color_0 = color(1.,0.,0.) + [[ + anno::display_name("Color 1"), + anno::description("Color 1 (facing direction)") + ]], + uniform color color_1 = color(0.,1.,0.) + [[ + anno::display_name("Color 2"), + anno::description("Color 2") + ]], + uniform color color_2 = color(0.,0.,1.) + [[ + anno::display_name("Color 3"), + anno::description("Color 3") + ]], + uniform color color_3 = color(1.,0.,0.) + [[ + anno::display_name("Color 4"), + anno::description("Color 4") + ]], + uniform color color_4 = color(0.,1.,0.) + [[ + anno::display_name("Color 5"), + anno::description("Color 5 (object edges)") + ]] +) +[[ + anno::display_name("Apply a color falloff"), + anno::description("Makes the color view dependent"), + anno::thumbnail(".thumbs/apply_colorfalloff.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/apply_color_falloff.svg"), + anno::ui_order(20), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::measured_curve_factor( + curve_values: color[](color_0,color_1,color_2,color_3,color_4), + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); +//JAN: TODO fix from here +export material apply_metallicflakes( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a flake layer applied") + ]], + color flake_color = color(.9,.7,.5) + [[ + anno::display_name("Color"), + anno::description("The color of the flakes") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metallic flakes") + ]], + uniform float size = 1. + [[ + anno::display_name("Flake size"), + anno::description("Determines size of the metallic flakes, in mm") + ]], + uniform float amount = 0.5 + [[ + anno::display_name("Flake amount"), + anno::hard_range(0.0,1.), + anno::description("Determines amount of visible metallic flakes") + ]], + uniform float opacity = 0.5 + [[ + anno::display_name("Flake opacity"), + anno::hard_range(0.0,1.), + anno::description("Determines visibility of the metallic flakes") + ]], + uniform float bump = 1. + [[ + anno::display_name("Flake orientation randomness"), + anno::description("Larger numbers will increase the sparkle radius around highlights") + ]] +) +[[ + anno::display_name("Apply flake coating"), + anno::description("Apply layer of metallic flakes to an existing material"), + anno::thumbnail(".thumbs/apply_metallicflakes.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_flake_coating.svg"), + anno::ui_order(21), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + float3 flake_normal = base::flake_noise_bump_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + strength: bump, + scale: size * 0.001 + ); + float flake_opacity = base::flake_noise_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + intensity: opacity, + scale: size * 0.001, + density: amount + ).mono; + + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: flake_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + normal: flake_normal, + weight: flake_opacity, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material flake_paint( + color base_color = color(.3,.01,.01) + [[ + anno::display_name("Base color"), + anno::description("The color of the base paint") + ]], + color flake_color = color(.6,1,.1) + [[ + anno::display_name("Flake color"), + anno::description("The color of the flakes") + ]], + float roughness = 0.15 + [[ + anno::display_name("Flake roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metallic flakes") + ]], + uniform float size = 1. + [[ + anno::display_name("Flake size"), + anno::description("Determines size of the metallic flakes, in mm") + ]], + uniform float amount = 0.4 + [[ + anno::display_name("Flake amount"), + anno::hard_range(0.0,1.), + anno::description("Determines amount of visible metallic flakes") + ]], + uniform float opacity = .8 + [[ + anno::display_name("Flake weight"), + anno::hard_range(0.0,1.), + anno::description("Determines visibility of the metallic flakes") + ]], + uniform float bump = 1. + [[ + anno::display_name("Flake orientation randomness"), + anno::description("Larger numbers will increase the sparkle radius around highlights") + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat") + ]], + float coat_roughness = 0.0 + [[ + anno::display_name("Coat roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat") + ]], + float3 coat_bump = state::normal() + [[ + anno::display_name("Coat bump"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Flaky paint"), + anno::description("A multi layer paint material containing flakes"), + anno::thumbnail(".thumbs/flake_paint.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials"), + anno::ui_order(14), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("complex","carpaint")) +]] + = let{ + float3 flake_normal = base::flake_noise_bump_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + strength: bump, + scale: size * 0.001 + ); + float flake_opacity = base::flake_noise_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + intensity: opacity, + scale: size * 0.001, + density: amount + ).mono; + + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: flake_color + ); +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: coat_bump, + layer: df::simple_glossy_bsdf(roughness_u: coat_roughness), + base: df::weighted_layer( + normal: flake_normal, + weight: flake_opacity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf(tint: base_color) + ) + ) + ), + thin_walled: true +); + +export material add_cutout( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a cut-out") + ]], + float cutout = 1.0 + [[ + anno::display_name("Cutout"), + anno::hard_range(0.0,1.0), + anno::description("Determines where the object is visible") + ]] +) [[ + anno::display_name("Add cut-outs"), + anno::description("Adds cut-outs to existing materials. Also forces material to be thin-walled. Good for modeling leaves, grass or fences."), + anno::thumbnail(".thumbs/add_cutout.png"), + anno::in_group("Material modifiers"), + icon(".icons/add_cutouts.svg"), + anno::ui_order(22), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: true, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: base.geometry.normal, + cutout_opacity: cutout + ) +); + +export material add_simple_sticker( + color diffuse_color = color(.5) + [[ + anno::display_name("Sticker color"), + anno::description("The color of the material"), + anno::ui_order(2) + ]], + float roughness = 0.05 + [[ + anno::display_name("Sticker roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(3) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("Sticker IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Sticker reflectivity"), + anno::hard_range(0.0,1.), + anno::description("Additional Reflectivity control"), + anno::ui_order(4) + ]], + float3 sticker_normal = state::normal() + [[ + anno::display_name("Sticker bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]], + float sticker_mask = 0.0 + [[ + anno::display_name("Sticker mask"), + anno::hard_range(0.0,1.0), + anno::description("Determines extent of the sticker"), + anno::ui_order(5) + ]], + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a sticker added"), + anno::ui_order(1) + ]] +) [[ + anno::display_name("Add simple sticker"), + anno::description("A quick way for adding simple stickers to a material. The sticker is a simple dielectric and needs a mask to define its extent."), + anno::thumbnail(".thumbs/add_simple_sticker.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_simple_sticker.svg"), + anno::ui_order(23), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = let{ + material blend_material = blend( + blend: scratched_plastic_v2( + diffuse_color: diffuse_color, + roughness: roughness, + ior: ior, + reflectivity: reflectivity, + normal: sticker_normal), + base: base, + weight: sticker_mask + ); +} in material( + surface: blend_material.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_globalbump( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a bump map") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bump"), + anno::description("An additional global bump map for the material. Local bump map of the base material is preserved.") + ]] +) [[ + anno::display_name("Add global bumpmap"), + anno::description("Adds global bumpmap to existing materials. Local bump map of the base material is preserved."), + anno::thumbnail(".thumbs/add_globalbump.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_global_bumpmap.svg"), + anno::ui_order(24), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_displacement( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a bump map") + ]], + float displacement = 0.0 + [[ + anno::display_name("Displacement amount"), + anno::description("Attach displacement texture here. Note that the object needs to be set up correctly to have good displacement results.") + ]], + uniform float displacement_scale = 1.0 + [[ + anno::display_name("Displacement scale"), + anno::description("A global scale factor for the displacement amount") + ]] +) [[ + anno::display_name("Add displacement"), + anno::description("Adds displacement to existing materials"), + anno::thumbnail(".thumbs/add_displacement.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Displacement"), + icon(".icons/add_displacement.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: displacement*displacement_scale*state::scene_units_per_meter()*state::normal(), + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_vector_displacement( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get displacement") + ]], + float3 displacement = float3(0.0) + [[ + anno::display_name("Displacement amount"), + anno::description("Attach displacement texture here. Note that the object needs to be set up correctly to have good displacement results") + ]], + uniform displacement_vector_space space = displacement_vector_tangent_space + [[ + anno::display_name("Displacement vector mode"), + anno::description("Specify the space of the vector dispacement map") + ]], + uniform float displacement_scale = 1.0 + [[ + anno::display_name("Displacement scale"), + anno::description("A global scale factor for the displacement amount") + ]] +) [[ + anno::display_name("Add vector displacement"), + anno::description("Adds vector displacement to existing materials"), + anno::thumbnail(".thumbs/add_displacement.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Displacement"), + icon(".icons/add_vector_displacement.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: state::scene_units_per_meter()*transform_displacement_vector(displacement, space, displacement_scale), + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_round_edges( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get round edges") + ]], + uniform float round_edges_radius = 0.02 + [[ + anno::display_name("Round edge radius"), + anno::description("Influence radius around the edges in meters") + ]], + uniform float round_edges_roundness = 1.0 + [[ + anno::display_name("Round edge roundness"), + anno::description("Determines how round the edge will look"), + 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, unless + this parameter is set true, in which case the smoothing happens between + facets irrespective of their materials") + ]] +) [[ + anno::display_name("Add round edges"), + anno::description("Adds round edges to existing materials"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_round_edges.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: state::rounded_corner_normal( + radius: round_edges_radius, + roundness: round_edges_roundness, + across_materials: round_edges_across_materials + ), + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_emission( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get emission added") + ]], + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Add emission"), + anno::description("Adds emission to a material"), + anno::thumbnail(".thumbs/add_emission.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Emission"), + icon(".icons/add_emission.svg"), + anno::ui_order(26), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + suitable_as_light(), + anno::key_words(string[]("modifier","generic")) +]] = +let { + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} +in material( + surface: material_surface( + scattering: base.surface.scattering, + emission: material_emission( + emission: df::diffuse_edf(), + intensity: unit_intensity*tint*unit_scale, //for this mode, tint is assumes to be a color filter absorbing light + mode: imode + ) + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material add_thermal_emission( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get emission added") + ]], + uniform float temperature = 6500. + [[ + anno::display_name("Temperature"), + anno::description("The color temperature of the light in Kelvin") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Add thermal emission"), + anno::description("Adds emission to a material, color is based on a \"color temperature\""), + anno::thumbnail(".thumbs/add_thermal_emission.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Emission"), + icon(".icons/add_thermal_emission.svg"), + anno::ui_order(27), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + suitable_as_light(), + anno::key_words(string[]("modifier","generic")) +]] = +let { + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; + color emission_color = math::blackbody(temperature); + + color scaled_intensity = unit_intensity * (emission_color / math::luminance(emission_color));} +in material( + surface: material_surface( + scattering: base.surface.scattering, + emission: material_emission( + emission: df::diffuse_edf(), + intensity: scaled_intensity, + mode: imode + ) + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); +//endgroup + +/**-*/ + +//group Emissive materials + +export material light_omni ( + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Diffuse emission"), + anno::description("Emissive material emitting in all directions"), + anno::thumbnail(".thumbs/light_omni.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::ui_order(5000), + anno::hidden(), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = +let{ + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} in material ( + surface: material_surface ( + emission: material_emission ( + emission: df::diffuse_edf(), + intensity: tint*unit_intensity*unit_scale, + mode: imode + ) + ) +); + +export material light_spot ( + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform float spot_exponent = 30 + [[ + anno::display_name("Spot focus"), + anno::description("larger values lead to more focused spotlights") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Spotlight emission"), + anno::description("Emissive material emitting focused in one direction"), + anno::thumbnail(".thumbs/light_spot.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::hidden(), + anno::ui_order(5051), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = +let{ + //since this is a spotlight, we need the apex angle to convert from candela to lumen + //http://www.compuphase.com/electronics/candela_lumen.htm + //uniform float cos_apexangle_2 = math::pow(0.5,1./spot_exponent); //spot exponent 0 ->4pi + //uniform float apexfactor = 2*math::PI*(1.0-cos_apexangle_2); + + //correct integral + uniform float factor = (spot_exponent == 0)? 4*math::PI: 2*math::PI/(spot_exponent+1); + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*factor; + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} in material ( + surface: material_surface ( + emission: material_emission ( + emission: df::spot_edf(exponent: spot_exponent,global_distribution: true, global_frame: float3x3(1.,0,0, 0,1.,0., 0.,0,-1) ), + intensity: tint*unit_intensity*unit_scale, + mode: imode + ) + ) +); + +export material light_ies ( + uniform light_profile profile + [[ + anno::display_name("IES light profile data"), + anno::description("Data to describe the distribution of the light") + ]], + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(),//deprecated + anno::description("Modeling unit to meter conversion factor") + ]] +) [[ + anno::display_name("IES file based emission"), + anno::description("Emissive material emitting as described in an IES file"), + anno::thumbnail(".thumbs/light_ies.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::hidden(), + anno::ui_order(5052), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = material ( + surface: material_surface ( + emission: material_emission ( + emission: df::measured_edf(profile: profile,global_distribution: true, global_frame: float3x3(1.,0,0, 0,1.,0., 0.,0,-1) ), + intensity: tint*intensity*unit_scale + ) + ) +); + +//endgroup + +//group Deprecated + +//deprecated functionality=========================================================================================== +export annotation ui_position(int position); +export annotation typical_object_size(float size); + +export material metal( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::description("The color of the metal") + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflectivity"), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple metal, deprecated"), + anno::description("A basic metallic material"), + anno::thumbnail(".thumbs/metal.png"), + anno::author("NVIDIA Corporation"), + anno::hidden(), + //anno::deprecated("Use scratched_metal_v2"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: metal_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material plastic( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float roughness = 0.25 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple plastic, deprecated"), + anno::description("A basic dielectric, works for everything opaque that is not metallic"), + anno::thumbnail(".thumbs/plastic.png"), + anno::author("NVIDIA Corporation"), + anno::hidden(), + //anno::deprecated("Use scratched_plastic_v2"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_metal( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::description("The color of the metal") + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight") + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees.") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Metal , deprecated"), + anno::description("A metallic material with stretched reflections"), + anno::thumbnail(".thumbs/scratched_metal.png"), + anno::hidden(), + //anno::deprecated("Use scratched_metal_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: metal_color, + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_plastic( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(2) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(4) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(5) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Additional Reflectivity control"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Plastic, deprecated"), + anno::description("A basic dielectric, works for everything opaque that is not metallic. Supports stretched highlights."), + anno::thumbnail(".thumbs/scratched_plastic.png"), + anno::hidden(), + //anno::deprecated("Use scratched_plastic_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material apply_colorfalloff( + material base = scratched_metal(metal_color: color(1.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + color color_0 = color(1.,0.,0.) + [[ + anno::display_name("Color 1"), + anno::description("The color of the dust") + ]], + color color_1 = color(0.,1.,0.) + [[ + anno::display_name("Color 2"), + anno::description("The color of the dust") + ]], + color color_2 = color(0.,0.,1.) + [[ + anno::display_name("Color 3"), + anno::description("The color of the dust") + ]], + color color_3 = color(1.,0.,0.) + [[ + anno::display_name("Color 4"), + anno::description("The color of the dust") + ]], + color color_4 = color(0.,1.,0.) + [[ + anno::display_name("Color 5"), + anno::description("The color of the dust") + ]] +) +[[ + anno::display_name("Apply a color falloff, deprecated"), + anno::description("Makes the color view dependent"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + anno::thumbnail(".thumbs/apply_colorfalloff.png"), + anno::hidden(), + //anno::deprecated("Use apply_colorfalloff_v2 instead"), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::measured_curve_factor( + curve_values: color[](color_0,color_1,color_2,color_3,color_4), + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material flex_material( + color base_color = color(.5) + [[ + anno::display_name("Base color"), + anno::in_group("Base"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float diffuse_roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to a more \"powdery\" look"), + anno::ui_order(2) + ]], + uniform bool is_metal = false + [[ + anno::display_name("Metallic material"), + anno::in_group("Base"), + anno::description("If true, reflection will be colored and independent of view direction. If false, reflection will be white and direction dependent. Directional dependence is in this case based on the IOR (Fresnel effect)."), + anno::ui_order(3) + ]], + float reflectivity = 1.0 + [[ + anno::display_name("Reflection weight"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Controls the amount of reflection"), + anno::ui_order(5) + ]], + float reflection_roughness = 0.1 + [[ + anno::display_name("Reflection roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to more blurry reflections"), + anno::ui_order(4) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Reflection anisotropy"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(6) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(7) + ]], + float transparency = 0.0 + [[ + anno::display_name("Transmission weight"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("Weights how much light passes through the object vs. its diffuse reflectivity"), + anno::ui_order(12) + ]], + color transmission_color = color(1.) + [[ + anno::display_name("Transmission color"), + anno::in_group("Transmission"), + anno::description("Color effect for transmission independent of thickness of the object, similar to stained glass"), + anno::ui_order(8) + ]], + uniform color volume_color = color(1.0) + [[ + anno::display_name("Volume color"), + anno::in_group("Transmission"), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at \"Volume reference distance\"(m)"), + anno::ui_order(9) + ]], + float transmission_roughness = 0.0 + [[ + anno::display_name("Transmission roughness"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("higher values lead to objects seen through the material to appear blurry"), + anno::ui_order(11) + ]], + uniform float base_thickness = 0.1 + [[ + anno::display_name("Volume reference distance"), + anno::in_group("Transmission"), + anno::soft_range(0.0,10.0), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(10) + ]], + uniform float ior = 1.5 + [[ + anno::display_name("IOR"), + anno::in_group("Global"), + anno::soft_range(1.0,4.0), + anno::description("Determines refraction in the volume. It also influences the reflectivity for materials that are not metallic."), + anno::ui_order(14) + ]], + uniform bool thin_walled = false + [[ + anno::display_name("Thin walled"), + anno::in_group("Global"), + anno::description("Thin walled materials do not refract and do not have volume effects. Good for soap bubbles or window glass."), + anno::ui_order(13) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::in_group("Global"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(16) + ]], + uniform float abbe_number = 0.0 + [[ + anno::in_group("Global"), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off, Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Flexible material model, deprecated"), + anno::description("A complex material that can be configured to a wide variety of looks"), + anno::thumbnail(".thumbs/flex_material.png"), + anno::hidden(), + //anno::deprecated("Use flex_material_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("generic","complex")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: reflection_roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: is_metal? base_color: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); + bsdf diffuse_bsdf = df::diffuse_reflection_bsdf( + tint: base_color, + roughness: diffuse_roughness + ); + bsdf transmission_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: transmission_roughness + ); + bsdf add_transparency = df::weighted_layer( + weight: transparency, + layer: transmission_bsdf, + base: diffuse_bsdf, + normal: normal + ); + bsdf add_reflection = is_metal? df::weighted_layer( + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ): df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ); + bsdf add_normal = df::weighted_layer( + normal: normal, + weight: 1., + layer: add_reflection + ); +} in material( + thin_walled: thin_walled, + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number), + surface: material_surface( + scattering: add_normal + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ) +); + +export material thin_glass( + color glass_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin glass, deprecated"), + anno::description("A basic transmissive dielectric without refraction or volume"), + anno::thumbnail(".thumbs/thin_glass.png"), + anno::hidden(), + //anno::deprecated("Use thin_glass_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf glossy_transmission_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: glass_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + layer: glossy_transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) +); + +export material thin_translucent( + color surface_color = color(.95) + [[ + anno::display_name("Diffuse color"), + anno::description("The color of the material") + ]], + color translucent_color = color(.95) + [[ + anno::display_name("Translucence color"), + anno::description("The color of the volume of the material") + ]], + float translucency = 0.5 + [[ + anno::display_name("Translucence weight"), + anno::hard_range(0.0,1.), + anno::description("Fraction of the incoming light that should be visible on the backside") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin translucent, deprecated"), + anno::description("A diffuse transmissive dielectric material"), + anno::thumbnail(".thumbs/thin_translucent.png"), + anno::hidden(), + //anno::deprecated("Use thin_translucent_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","leaves","paper","sheets")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf transmission_bsdf = df::diffuse_transmission_bsdf( + tint: translucent_color + ); + bsdf base_bsdf = df::diffuse_reflection_bsdf( + tint: surface_color + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + weight: translucency, + normal: normal, + base: base_bsdf, + layer: df::weighted_layer( + layer: transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) + ) +); + +export material thick_glass( + color transmission_color = color(1.0) + [[ + anno::ui_order(1), + anno::display_name("Transmission color"), + anno::description("Colors the light entering the volume, similar to stained glass") + ]], + uniform color glass_color = color(.95) + [[ + anno::ui_order(2), + anno::display_name("Volume color"), + anno::description("The color of the glass body") + ]], + float roughness = 0.0 + [[ + anno::ui_order(4), + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::ui_order(5), + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction") + ]], + uniform float base_thickness = .1 + [[ + anno::ui_order(3), + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here.") + + ]], + float3 normal = state::normal() + [[ + anno::ui_order(7), + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]], + uniform float abbe_number = 0.0 + [[ + anno::ui_order(6), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0) + ]] +) +[[ + anno::display_name("Thick glass, deprecated"), + anno::description("A basic transmissive dielectric with refraction and coloring in the volume"), + anno::thumbnail(".thumbs/thick_glass.png"), + anno::hidden(), + //anno::deprecated("Use thick_glass_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf glossy_bsdf_transmission = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: roughness + ); +} in material( + thin_walled: false, + surface: material_surface( + df::weighted_layer( + normal: normal, + weight: 1., + layer: df::fresnel_layer( + layer: glossy_bsdf, + base: glossy_bsdf_transmission, + ior: ior, + normal: normal + ) + ) + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(glass_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material thick_translucent( + color transmission_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + uniform color volume_color = color(.95) + [[ + anno::display_name("Volume color"), + anno::description("The color of the volume at \"Volume reference distance\""), + anno::ui_order(2) + ]], + uniform float volume_scattering = 0.5 + [[ + anno::display_name("Volume scattering"), + anno::hard_range(0.0,.99999), + anno::description("Amount of scattering for objects at \"Volume reference distance\""), + anno::ui_order(3) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(5) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Overall reflectivity of the material"), + anno::ui_order(6) + ]], + uniform float base_thickness = .1 + [[ + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" and \"Volume scattering\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(4) + + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(9) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction"), + anno::ui_order(7) + ]], + uniform float abbe_number = 0.0 + [[ + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Thick translucent, deprecated"), + anno::description("A subsurface scattering material"), + anno::thumbnail(".thumbs/thick_translucent.png"), + anno::hidden(), + //anno::deprecated("Use thick_translucent_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","wax","milk")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf transmission_bsdf = df::specular_bsdf( + mode: df::scatter_transmit, + tint: transmission_color + ); + +} in material( + thin_walled: false, + surface: material_surface( + df::fresnel_layer( + normal: normal, + weight: reflectivity, + ior: ior, + layer: glossy_bsdf, + base: df::weighted_layer( + normal: normal, + weight: 1., + layer: transmission_bsdf + ) + ) + ), + volume: material_volume( + scattering_coefficient: (base_thickness <= 0)? color(0): math::log(color(1.-volume_scattering)) / - base_thickness, + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material apply_clearcoat( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied"), + anno::ui_order(1) + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat"), + anno::ui_order(5) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat"), + anno::ui_order(3) + ]], + float visibility = 1.0 + [[ + anno::display_name("Coat visibility"), + anno::hard_range(0.0,1.0), + anno::description("Determines visibility of the clear coat"), + anno::ui_order(4) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(6) + ]], + color coat_filter_color = color(1.) + [[ + anno::display_name("Coat filter color"), + anno::description("For simulating coatings with colored resins that modulate the color of underlying layers"), + anno::ui_order(2) + ]] +) +[[ + anno::display_name("Apply clear coating, deprecated"), + anno::description("Apply clear coat to an existing material"), + anno::author("NVIDIA Corporation"), + anno::thumbnail(".thumbs/apply_clearcoat.png"), + anno::hidden(), + //anno::deprecated("Use apply_clearcoat_v2 instead"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: color(1.) + ); + color base_tint = blend_colors(color(1.), coat_filter_color, color_layer_blend, visibility).tint; +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: normal, + weight: visibility, + layer: glossy_bsdf, + base: df::tint(tint: base_tint, base: base.surface.scattering) + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_metalcoat( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a metallic coating applied"), + anno::ui_order(1) + ]], + color metal_color = color(.95) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the metal"), + anno::ui_order(2) + ]], + float visibility = .3 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the coat"), + anno::ui_order(4) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metal coat"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(5) + ]] +) +[[ + anno::display_name("Apply thin metal coating, deprecated"), + anno::description("Apply metal coat to an existing material"), + anno::thumbnail(".thumbs/apply_metalcoat.png"), + anno::hidden(), + //anno::deprecated("Use apply_metalcoat_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: metal_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: visibility, + normal: normal, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +//endgroup + +/*-**/ diff --git a/universalrobots_ur7e/materials/mdl/support_definitions.mdl b/universalrobots_ur7e/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/universalrobots_ur7e/materials/mdl/support_definitions.mdl @@ -0,0 +1,4292 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + +mdl 1.8; + +import ::anno::*; +import ::math::*; + +using .::aux_definitions import xy; +import ::state::*; +import ::scene::*; + +export using ::state import coordinate_space; //enum type +import ::tex::*; +export using ::tex import gamma_mode; //enum type +export using ::tex import wrap_mode; //enum type + +module [[ + anno::version( 1, 2, 0), + anno::display_name("NVIDIA support definitions") +]]; + +export annotation icon(string path); + + +export float data_lookup_float( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float default_value = float() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float(name, default_value); +} + +export float2 data_lookup_float2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float2 default_value = float2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float2(name, default_value); +} + +export float3 data_lookup_float3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float3 default_value = float3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float3(name, default_value); +} + +export float4 data_lookup_float4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float4 default_value = float4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float4(name, default_value); +} + +export int data_lookup_int( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int default_value = int() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int(name, default_value); +} + +export int2 data_lookup_int2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int2 default_value = int2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int2(name, default_value); +} + +export int3 data_lookup_int3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int3 default_value = int3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int3(name, default_value); +} + +export int4 data_lookup_int4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int4 default_value = int4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int4(name, default_value); +} + +export color data_lookup_color( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + color default_value = color() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup color"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_color(name, default_value); +} + +export uniform float data_lookup_uniform_float( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float default_value = float() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup unfirom float"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float(name, default_value); +} + +export uniform float2 data_lookup_uniform_float2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float2 default_value = float2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform float2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float2(name, default_value); +} + +export uniform float3 data_lookup_uniform_float3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float3 default_value = float3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform float3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float3(name, default_value); +} + +export uniform float4 data_lookup_uniform_float4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float4 default_value = float4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup unfirom float4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float4(name, default_value); +} + +export uniform int data_lookup_uniform_int( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int default_value = int() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int(name, default_value); +} + +export uniform int2 data_lookup_uniform_int2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int2 default_value = int2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int2(name, default_value); +} + +export uniform int3 data_lookup_uniform_int3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int3 default_value = int3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int3(name, default_value); +} + +export uniform int4 data_lookup_uniform_int4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int4 default_value = int4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int4(name, default_value); +} + +export uniform color data_lookup_uniform_color( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform color default_value = color() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform color"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_color(name, default_value); +} + + + +// operator nodes +// Add +export int add(int a=0, int b=0) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(300) +]] +{ return a+b; } + +export float add(float a=0.0, float b=0.0) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(301) +]] +{ return a+b; } + +export float2 add(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(302) +]] +{ return a+b; } + +export float3 add(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(303) +]] +{ return a+b; } + +export float4 add(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(304) +]] +{ return a+b; } + +export color add(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(305) +]] +{ return a+b; } + +export int subtract(int a=0, int b=0) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(310) +]] +{ return a-b; } + +export float subtract(float a=0.0, float b=0.0) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(311) +]] +{ return a-b; } + +export float2 subtract(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(312) +]] +{ return a-b; } + +export float3 subtract(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(313) +]] +{ return a-b; } + +export float4 subtract(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(314) +]] +{ return a-b; } + +export color subtract(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(315) +]] +{ return a-b; } + +export int multiply(int a=0, int b=0) +[[ + anno::display_name("Multiply"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(320) +]] +{ return a*b; } + +export float multiply(float a=0.0, float b=0.0) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(321) +]] +{ return a*b; } + +export float2 multiply(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(322) +]] +{ return a*b; } + +export float3 multiply(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(323) +]] +{ return a*b; } + +export float4 multiply(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(324) +]] +{ return a*b; } + +export color multiply(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(325) +]] +{ return a*b; } + +export int divide(int a=0, int b=0) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(326) +]] +{ return a/b; } + +export float divide(float a=0.0, float b=0.0) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(327) +]] +{ return a/b; } + +export float2 divide(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(328) +]] +{ return a/b; } + +export float3 divide(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(329) +]] +{ return a/b; } + +export float4 divide(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(330) +]] +{ return a/b; } + +export color divide(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(331) +]] +{ return a/b; } + +export int condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + int a=0 [[ + anno::description("Value returned when the condition is true.") + ]], + int b=0 [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(332) +]] +{ return x?a:b; } + +export float condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float a=0.0 [[ + anno::description("Value returned when the condition is true.") + ]], + float b=0.0 [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(333) +]] +{ return x?a:b; } + +export float2 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float2 a=float2(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float2 b=float2(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(334) +]] +{ return x?a:b; } + +export float3 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float3 a=float3(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float3 b=float3(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(335) +]] +{ return x?a:b; } + +export float4 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float4 a=float4(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float4 b=float4(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(336) +]] +{ return x?a:b; } + +export color condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + color a=color(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + color b=color(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(337) +]] +{ return x?a:b; } + +export bool compare(float a, float b) +[[ + anno::display_name("Compare"), + anno::description("Returns true when a is greater than b; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Comparison"), + icon(".icons/compare.svg"), + anno::ui_order(338) +]] +{ return a>b; } + +export bool equality(bool a, bool b) +[[ + anno::display_name("Check equality bool"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(339) +]] +{ return a==b; } + +export bool equality(int a, int b) +[[ + anno::display_name("Check equality int"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(340) +]] +{ return a==b; } + +export bool equality(int2 a, int2 b) +[[ + anno::display_name("Check equality int2"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(341) +]] +{ return a==b; } + +export bool equality(int3 a, int3 b) +[[ + anno::display_name("Check equality int3"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(342) +]] +{ return a==b; } + +export bool equality(float a, float b) +[[ + anno::display_name("Check equality float"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(343) +]] +{ return a==b; } + +export bool equality(float2 a, float2 b) +[[ + anno::display_name("Check equality float2"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(344) +]] +{ return a==b; } + +export bool equality(float3 a, float3 b) +[[ + anno::display_name("Check equality float3"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(345) +]] +{ return a==b; } + +export bool equality(color a, color b) +[[ + anno::display_name("Check equality color"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(346) +]] +{ return a==b; } + +//constants nodes. +export bool bool_const(uniform bool b = true) +[[ + anno::display_name("Constant bool"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1000) +]] +{ return b; } + +export int int_const(uniform int i = 0) +[[ + anno::display_name("Constant int"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1001) +]] +{ return i; } + +export float float_const(uniform float f = 0.) +[[ + anno::display_name("Constant float"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1002) +]] +{ return f; } + +export float2 float2_const(uniform float2 f2 = float2(0.)) +[[ + anno::display_name("Constant float2"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1003) +]] +{ return f2; } + +export float3 float3_const(uniform float3 f3 = float3(0.)) +[[ + anno::display_name("Constant float3"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1004) +]] +{ return f3; } + +export float4 float4_const(uniform float4 f4 = float4(0.)) +[[ + anno::display_name("Constant float4"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1005) +]] +{ return f4; } + +export color color_const(uniform color c = color(0.)) +[[ + anno::display_name("Constant color"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1006) +]] +{ return c; } + +export uniform texture_2d texture_2d_const(uniform texture_2d tex = texture_2d())[[ + anno::display_name("Constant texture_2d"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1007) +]] +{ return tex; } + +//exports from tex: +export int texture_width( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose width is queried.") + ]]) uniform +[[ + anno::display_name("Width of texture"), + anno::description("Returns the width of the input texture in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Width"), + icon(".icons/texture_width.svg"), + anno::ui_order(141) +]] +{ return tex::width(tex); } + +export int texture_width( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose tile width is queried.") + ]], + int2 uv_tile = int2(0, 0) [[ + anno::description("UDIM tile index as (u, v).") + ]]) uniform +[[ + anno::display_name("Width of a texture tile"), + anno::description("Returns the width of the specified texture tile in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Width"), + icon(".icons/texture_width.svg"), + anno::ui_order(143) +]] +{ return tex::width(tex, uv_tile); } + +export int height( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose height is queried.") + ]]) uniform +[[ + anno::display_name("Height of texture"), + anno::description("Returns the height of the input texture in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Height"), + icon(".icons/texture_height.svg"), + anno::ui_order(142) +]] +{ return tex::height(tex); } + +export int height( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose tile height is queried.") + ]], + int2 uv_tile = int2(0, 0) [[ + anno::description("UDIM tile index as (u, v).") + ]]) uniform +[[ + anno::display_name("Height of a texture tile"), + anno::description("Returns the height of the specified texture tile in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Height"), + icon(".icons/texture_height.svg"), + anno::ui_order(144) +]] +{ return tex::height(tex,uv_tile); } + +export float2 transform_st( + float rotation = 0.0 [[ + anno::description("Rotation angle in radians.") + ]], + float2 translation = float2(0.0) [[ + anno::description("Translation offset applied after rotation and scaling.") + ]], + float2 scale = float2(1.0) [[ + anno::description("Scale factor applied per coordinate axis.") + ]], + float2 st = float2(0.0) [[ + anno::description("Input 2D coordinate to transform.") + ]] +) +[[ + anno::display_name("Transform 2D"), + anno::description("Applies rotation, scaling, and translation to a 2D coordinate."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform"), + icon(".icons/transform.svg"), + anno::ui_order(1019) +]] +{ + float s = math::sin(rotation); + float c = math::cos(rotation); + float2 st_t=st; + st_t = float2(s*st_t.x+c*st_t.y,s*st_t.y-c*st_t.x); + return st_t*scale+ translation; +} + +export color biased_color_blend( + float w1 = 0.0 [[ + anno::description("Weight for the first input color.") + ]], + color c1 = color(0.0) [[ + anno::description("First input color.") + ]], + float w2 = 0.0 [[ + anno::description("Weight for the second input color.") + ]], + color c2 = color(0.0) [[ + anno::description("Second input color.") + ]], + float w3 = 0.0 [[ + anno::description("Weight for the third input color.") + ]], + color c3 = color(0.0) [[ + anno::description("Third input color.") + ]], + color mean = color(0.5) [[ + anno::description("Expected average color used to preserve contrast in the biased blend.") + ]] +) +[[ + anno::display_name("Biased color blend"), + anno::description("Blends up to three colors using weights; set mean to the expected average to preserve contrast when mixing textures."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Blend"), + icon(".icons/biased_color_blend.svg"), + anno::ui_order(539) +]] +{ + color o=w1*c1+w2*c2+w3*c3; + float s=w1+w2+w3; + float s2=w1*w1+w2*w2+w3*w3; +return mean + (o-s*mean)/ math::sqrt(s2); +} + + +export float lookup_float( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(100) +]] +{ return tex::lookup_float( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + +export float3 lookup_float3( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float3"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(110) +]] +{ return tex::lookup_float3( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +export float4 lookup_float4( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float4"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(120) +]] { return tex::lookup_float4( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +export color lookup_color( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup color"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(130) +]] { return tex::lookup_color( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +// check for valid resource +export bool texture_isvalid( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to validate.") + ]]) uniform +[[ + anno::display_name("Is texture valid?"), + anno::description("Returns true when the provided texture handle is valid and can be sampled."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info"), + icon(".icons/texture_isvalid.svg"), + anno::ui_order(140) +]] +{ return tex::texture_isvalid(tex); } + + +//exports from state: +export float3 position() +[[ + anno::display_name("Hit position"), + anno::description("Returns the current shading position in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/position.svg"), + anno::ui_order(1012) +]] +{ return state::position(); } + +export float3 normal() +[[ + anno::display_name("Shade normal"), + anno::description("Returns the current shading normal in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/normal.svg"), + anno::ui_order(1013) +]] +{ return state::normal(); } + +//new: quick access to xy: +export float2 texture_coordinate_2d( + uniform int i = 0 [[ + anno::description("Texture coordinate set index.") + ]]) +[[ + anno::display_name("Texture coordinate 2D"), + anno::description("Returns authored texture coordinates from the selected texture coordinate set."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Coordinate"), + icon(".icons/texture_coordinate.svg"), + anno::ui_order(1010) +]] +{ return xy(state::texture_coordinate(i)); } + +export float3 texture_coordinate_3d( + uniform int i = 0 [[ + anno::description("Texture coordinate set index.") + ]]) +[[ + anno::display_name("Texture coordinate 3D"), + anno::description("Returns authored texture coordinates from the selected texture coordinate set."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Coordinate"), + icon(".icons/texture_coordinate.svg"), + anno::ui_order(1011) +]] +{ return state::texture_coordinate(i); } + +export float3 texture_tangent_u( + uniform int i = 0 [[ + anno::description("Texture coordinate set index used to derive the U tangent.") + ]]) +[[ + anno::display_name("Shade tangent"), + anno::description("Returns the current shading tangent (U direction) in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Tangent"), + icon(".icons/texture_tangent.svg"), + anno::ui_order(1014) +]] +{ return state::texture_tangent_u(i); } + +export float3 texture_tangent_v( + uniform int i = 0 [[ + anno::description("Texture coordinate set index used to derive the V tangent.") + ]]) +[[ + anno::display_name("Shade bi-tangent"), + anno::description("Returns the current shading bitangent (V direction) in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Tangent"), + icon(".icons/texture_tangent.svg"), + anno::ui_order(1015) +]] +{ return state::texture_tangent_v(i); } + +export float animation_time() +[[ + anno::display_name("Animation time"), + anno::description("Returns elapsed animation time in seconds from the start of the timeline."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene"), + icon(".icons/animation_time.svg"), + anno::ui_order(1030) +]] +{ return state::animation_time(); } + + +export float3 transform_point( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input point.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed point.") + ]], + float3 point=float3(0.) [[ + anno::description("Point to transform.") + ]]) +[[ + anno::display_name("Transform point"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1020) +]] +{ return state::transform_point(from, to, point); } + +export float3 transform_vector( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input vector.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed vector.") + ]], + float3 vector=float3(0.) [[ + anno::description("Vector to transform.") + ]]) +[[ + anno::display_name("Transform vector"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1021) +]] +{ return state::transform_vector(from, to, vector); } + +export float3 transform_normal( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input normal.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed normal.") + ]], + float3 normal=float3(0.,1.,0.) [[ + anno::description("Normal vector to transform.") + ]]) +[[ + anno::display_name("Transform normal"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1022) +]] +{ return state::transform_normal(from, to, normal); } + +export float transform_scale( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input scale value.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed scale value.") + ]], + float scale=0. [[ + anno::description("Scale value to transform.") + ]]) +[[ + anno::display_name("Transform scale"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1023) +]] +{ return state::transform_scale(from, to, scale); } + +float2 r2d(float2 x, float theta) +{ + theta *= math::acos(-1.0) * 2.0; + return float2( + math::cos(theta) * x[0] + math::sin(theta) * x[1], + math::cos(theta) * x[1] - math::sin(theta) * x[0]); +} + +export float3 rotate_around_x( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around X"), + anno::description("Rotates a 3D point around the X axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1024) +]] +{ + float2 v = r2d(float2(p.y, p.z), theta); + return float3(p.x, v[0], v[1]); +} + +export float3 rotate_around_y( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around Y"), + anno::description("Rotates a 3D point around the Y axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1025) +]] +{ + float2 v = r2d(float2(p.x, p.z), theta); + return float3(v[0], p.y, v[1]); +} + +export float3 rotate_around_z( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around Z"), + anno::description("Rotates a 3D point around the Z axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1026) +]] +{ + float2 v = r2d(float2(p.x, p.y), theta); + return float3(v[0], v[1], p.z); +} + +export float meters_per_scene_unit() +[[ + anno::display_name("Meters per scene unit"), + anno::description("Returns the conversion factor between scene units and meters."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene", "Units"), + icon(".icons/meters_per_scene_unit.svg"), + anno::ui_order(1031) +]] +{ return state::meters_per_scene_unit(); } + +export float scene_units_per_meter() +[[ + anno::display_name("Scene units per meter"), + anno::description("Returns the conversion factor between scene units and meters."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene", "Units"), + icon(".icons/scene_units_per_meter.svg"), + anno::ui_order(1032) +]] +{ return state::scene_units_per_meter(); } + +export int object_id() +[[ + anno::display_name("Object Id"), + anno::description("Returns the unique integer identifier of the currently shaded object."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/object_id.svg"), + anno::ui_order(1033) +]] +{ return state::object_id(); } + +//exported from math: +export color blackbody( + float temperature=6500. [[ + anno::description("Blackbody temperature in Kelvin used to compute the emitted color.") + ]]) +[[ + anno::display_name("Blackbody color"), + anno::description("Returns the RGB color of an ideal blackbody radiator at the specified temperature in Kelvin."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/blackbody.svg"), + anno::ui_order(409) +]] +{ return math::blackbody(temperature); } + +export float PI() +[[ + anno::display_name("Pi"), + anno::description("Returns the mathematical constant pi (approximately 3.141592653589793)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Constants"), + icon(".icons/PI.svg"), + anno::ui_order(1007) +]] +{ return math::PI; } + +export int abs(int a=0) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(350) +]] +{ return math::abs(a); } + +export float abs(float a=0.) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(351) +]] +{ return math::abs(a); } + +export float2 abs(float2 a=float2(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(352) +]] +{ return math::abs(a); } + +export float3 abs(float3 a=float3(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(353) +]] +{ return math::abs(a); } + +export float4 abs(float4 a=float4(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(354) +]] +{ return math::abs(a); } + +export color abs(color a=color(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(355) +]] +{ return math::abs(a); } + +export float acos(float a=0.) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(360) +]] +{ return math::acos(a); } + +export float2 acos(float2 a=float2(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(361) +]] +{ return math::acos(a); } + +export float3 acos(float3 a=float3(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(362) +]] +{ return math::acos(a); } + +export float4 acos(float4 a=float4(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(363) +]] +{ return math::acos(a); } + + +export float asin(float a=0.) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(370) +]] +{ return math::asin(a); } + +export float2 asin(float2 a=float2(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(371) +]] +{ return math::asin(a); } + +export float3 asin(float3 a=float3(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(372) +]] +{ return math::asin(a); } + +export float4 asin(float4 a=float4(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(373) +]] +{ return math::asin(a); } + +export float atan(float a=0.) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(380) +]] +{ return math::atan(a); } + +export float2 atan(float2 a=float2(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(381) +]] +{ return math::atan(a); } + +export float3 atan(float3 a=float3(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(382) +]] +{ return math::atan(a); } + +export float4 atan(float4 a=float4(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(383) +]] +{ return math::atan(a); } + +export float atan2( + float y=0. [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float x=0. [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(390) +]] +{ return math::atan2(y,x); } + +export float2 atan2( + float2 y=float2(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float2 x=float2(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(391) +]] +{ return math::atan2(y,x); } + +export float3 atan2( + float3 y=float3(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float3 x=float3(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(392) +]] +{ return math::atan2(y,x); } + +export float4 atan2( + float4 y=float4(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float4 x=float4(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(393) +]] +{ return math::atan2(y,x); } + +export float average(float2 a=float2(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(400) +]] +{ return math::average(a); } + +export float average(float3 a=float3(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(401) +]] +{ return math::average(a); } + +export float average(float4 a=float4(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(402) +]] +{ return math::average(a); } + +export float average(color a=color(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(403) +]] +{ return math::average(a); } + +export float ceil(float a=0.) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(410) +]] +{ return math::ceil(a); } + +export float2 ceil(float2 a=float2(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(411) +]] +{ return math::ceil(a); } + +export float3 ceil(float3 a=float3(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(411) +]] +{ return math::ceil(a); } + +export float4 ceil(float4 a=float4(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(412) +]] +{ return math::ceil(a); } + +export int clamp( + int a=0 [[anno::description("Input value to clamp.")]], + int min=0 [[anno::description("Lower bound of the output range.")]], + int max=1 [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(420) +]] +{ return math::clamp(a,min,max); } + +export float clamp( + float a=0. [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(421) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float2 min=float2(0.) [[anno::description("Lower bound of the output range.")]], + float2 max=float2(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(422) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float3 min=float3(0.) [[anno::description("Lower bound of the output range.")]], + float3 max=float3(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(423) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float4 min=float4(0.) [[anno::description("Lower bound of the output range.")]], + float4 max=float4(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(424) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + color min=color(0.) [[anno::description("Lower bound of the output range.")]], + color max=color(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(425) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float2 min=float2(0.) [[anno::description("Lower bound of the output range.")]], + float max=1. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(426) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float2 max=float2(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(427) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=1. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(428) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float3 min=float3(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(429) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float3 max=float3(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(430) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(431) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float4 min=float4(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(432) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float4 max=float4(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(433) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(434) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + color min=color(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(435) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + color max=color(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(436) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(437) +]] +{ return math::clamp(a,min,max); } + +export float cos(float a=0.) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(440) +]] +{ return math::cos(a); } + +export float2 cos(float2 a=float2(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(441) +]] +{ return math::cos(a); } + +export float3 cos(float3 a=float3(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(442) +]] +{ return math::cos(a); } + +export float4 cos(float4 a=float4(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(443) +]] +{ return math::cos(a); } + +export float3 cross(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Cross"), + anno::description("Returns the 3D cross product of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/cross_product.svg"), + anno::ui_order(449) +]] +{ return math::cross(a,b); } + +export float degrees( + float a=0. [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(450) +]] +{ return math::degrees(a); } + +export float2 degrees( + float2 a=float2(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(451) +]] +{ return math::degrees(a); } + +export float3 degrees( + float3 a=float3(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(452) +]] +{ return math::degrees(a); } + +export float4 degrees( + float4 a=float4(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(453) +]] +{ return math::degrees(a); } + +export float distance(float a=0., float b=0.) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(460) +]] +{ return math::distance(a,b); } + +export float distance(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(461) +]] +{ return math::distance(a,b); } + +export float distance(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(462) +]] +{ return math::distance(a,b); } + +export float distance(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(463) +]] +{ return math::distance(a,b); } + +export float dot(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(470) +]] +{ return math::dot(a,b); } + +export float dot(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(471) +]] +{ return math::dot(a,b); } + +export float dot(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(472) +]] +{ return math::dot(a,b); } + +export float exp(float a=0.) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(480) +]] +{ return math::exp(a); } + +export float2 exp(float2 a=float2(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(481) +]] +{ return math::exp(a); } + +export float3 exp(float3 a=float3(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(481) +]] +{ return math::exp(a); } + +export float4 exp(float4 a=float4(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(482) +]] +{ return math::exp(a); } + +export color exp(color a=color(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(483) +]] +{ return math::exp(a); } + +export float exp2(float a=0.) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(490) +]] +{ return math::exp2(a); } + +export float2 exp2(float2 a=float2(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(491) +]] +{ return math::exp2(a); } + +export float3 exp2(float3 a=float3(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(492) +]] +{ return math::exp2(a); } + +export float4 exp2(float4 a=float4(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(493) +]] +{ return math::exp2(a); } + +export color exp2(color a=color(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(494) +]] +{ return math::exp2(a); } + +export float floor(float a=0.) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(500) +]] +{ return math::floor(a); } + +export float2 floor(float2 a=float2(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(501) +]] +{ return math::floor(a); } + +export float3 floor(float3 a=float3(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(502) +]] +{ return math::floor(a); } + +export float4 floor(float4 a=float4(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(503) +]] +{ return math::floor(a); } + +export float fmod( + float a=0. [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(510) +]] +{ return math::fmod(a,b); } + +export float2 fmod( + float2 a=float2(0.) [[anno::description("Dividend input.")]], + float2 b=float2(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(511) +]] +{ return math::fmod(a,b); } + +export float3 fmod( + float3 a=float3(0.) [[anno::description("Dividend input.")]], + float3 b=float3(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(512) +]] +{ return math::fmod(a,b); } + +export float4 fmod( + float4 a=float4(0.) [[anno::description("Dividend input.")]], + float4 b=float4(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(513) +]] +{ return math::fmod(a,b); } + +export float2 fmod( + float2 a=float2(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(514) +]] +{ return math::fmod(a,b); } + +export float3 fmod( + float3 a=float3(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(515) +]] +{ return math::fmod(a,b); } + +export float4 fmod( + float4 a=float4(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(516) +]] +{ return math::fmod(a,b); } + +export float frac(float a=0.) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(520) +]] +{ return math::frac(a); } + +export float2 frac(float2 a=float2(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(521) +]] +{ return math::frac(a); } + +export float3 frac(float3 a=float3(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(522) +]] +{ return math::frac(a); } + +export float4 frac(float4 a=float4(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(523) +]] +{ return math::frac(a); } + +export float length(float2 a=float2(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(530) +]] +{ return math::length(a); } + +export float length(float3 a=float3(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(531) +]] +{ return math::length(a); } + +export float length(float4 a=float4(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(532) +]] +{ return math::length(a); } + +export float lerp( + float a=0. [[anno::description("Start value at interpolation factor 0.")]], + float b=1. [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(540) +]] +{ return math::lerp(a,b,l); } + +export float2 lerp( + float2 a=float2(0.) [[anno::description("Start value at interpolation factor 0.")]], + float2 b=float2(1.) [[anno::description("End value at interpolation factor 1.")]], + float2 l=float2(0.)[[anno::soft_range(float2(0.0),float2(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(541) +]] +{ return math::lerp(a,b,l); } + +export float3 lerp( + float3 a=float3(0.) [[anno::description("Start value at interpolation factor 0.")]], + float3 b=float3(1.) [[anno::description("End value at interpolation factor 1.")]], + float3 l=float3(0.)[[anno::soft_range(float3(0.0),float3(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(542) +]] +{ return math::lerp(a,b,l); } + +export float4 lerp( + float4 a=float4(0.) [[anno::description("Start value at interpolation factor 0.")]], + float4 b=float4(1.) [[anno::description("End value at interpolation factor 1.")]], + float4 l=float4(0.)[[anno::soft_range(float4(0.0),float4(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(543) +]] +{ return math::lerp(a,b,l); } + +export float2 lerp( + float2 a=float2(0.) [[anno::description("Start value at interpolation factor 0.")]], + float2 b=float2(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(544) +]] +{ return math::lerp(a,b,l); } + +export float3 lerp( + float3 a=float3(0.) [[anno::description("Start value at interpolation factor 0.")]], + float3 b=float3(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(545) +]] +{ return math::lerp(a,b,l); } + +export float4 lerp( + float4 a=float4(0.) [[anno::description("Start value at interpolation factor 0.")]], + float4 b=float4(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(546) +]] +{ return math::lerp(a,b,l); } + +export color lerp( + color a=color(0.) [[anno::description("Start value at interpolation factor 0.")]], + color b=color(1.) [[anno::description("End value at interpolation factor 1.")]], + color l=color(0.)[[anno::soft_range(color(0.0),color(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(547) +]] +{ return math::lerp(a,b,l); } + +export color lerp( + color a=color(0.) [[anno::description("Start value at interpolation factor 0.")]], + color b=color(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(548) +]] +{ return math::lerp(a,b,l); } + +export float log(float a=1.) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(550) +]] +{ return math::log(a); } + +export float2 log(float2 a=float2(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(551) +]] +{ return math::log(a); } + +export float3 log(float3 a=float3(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(552) +]] +{ return math::log(a); } + +export float4 log(float4 a=float4(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(553) +]] +{ return math::log(a); } + +export color log(color a=color(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(554) +]] +{ return math::log(a); } + +export float log2(float a=1.) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(560) +]] +{ return math::log2(a); } + +export float2 log2(float2 a=float2(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(561) +]] +{ return math::log2(a); } + +export float3 log2(float3 a=float3(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(562) +]] +{ return math::log2(a); } + +export float4 log2(float4 a=float4(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(563) +]] +{ return math::log2(a); } + +export color log2(color a=color(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(564) +]] +{ return math::log2(a); } + +export float log10(float a=1.) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(570) +]] +{ return math::log10(a); } + +export float2 log10(float2 a=float2(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(571) +]] +{ return math::log10(a); } + +export float3 log10(float3 a=float3(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(572) +]] +{ return math::log10(a); } + +export float4 log10(float4 a=float4(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(573) +]] +{ return math::log10(a); } + +export color log10(color a=color(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(574) +]] +{ return math::log10(a); } + +export float luminance(float3 a=float3(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(580) +]] +{ return math::luminance(a); } + +export float luminance(color a=color(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(581) +]] +{ return math::luminance(a); } + +export float luminance(float4 a=float4(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(582) +]] +{ return math::luminance(float3(a.x,a.y,a.z)); } + +export int max(int a=0, int b=0) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(590) +]] +{ return math::max(a,b); } + +export float max(float a=0., float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(591) +]] +{ return math::max(a,b); } + +export float2 max(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(592) +]] +{ return math::max(a,b); } + +export float3 max(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(593) +]] +{ return math::max(a,b); } + +export float4 max(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(594) +]] +{ return math::max(a,b); } + +export float2 max(float2 a=float2(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(595) +]] +{ return math::max(a,b); } + +export float3 max(float3 a=float3(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(596) +]] +{ return math::max(a,b); } + +export float4 max(float4 a=float4(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(597) +]] +{ return math::max(a,b); } + +export float2 max(float a=0., float2 b=float2(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(598) +]] +{ return math::max(a,b); } + +export float3 max(float a=0., float3 b=float3(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(599) +]] +{ return math::max(a,b); } + +export float4 max(float a=0., float4 b=float4(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(600) +]] +{ return math::max(a,b); } + +export color max(color a=color(0.), color b=color(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(601) +]] +{ return math::max(a,b); } + +export color max(float a=0., color b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(602) +]] +{ return math::max(a,b); } + +export color max(color a=color(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(603) +]] +{ return math::max(a,b); } + +export float max_value(float2 a=float2(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(610) +]] +{ return math::max_value(a); } + +export float max_value(float3 a=float3(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(611) +]] +{ return math::max_value(a); } + +export float max_value(float4 a=float4(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(612) +]] +{ return math::max_value(a); } + +export float max_value(color a=color(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest channel value in the input color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(613) +]] +{ return math::max_value(a); } + +export int min(int a=0, int b=0) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(620) +]] +{ return math::min(a,b); } + +export float min(float a=0., float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(621) +]] +{ return math::min(a,b); } + +export float2 min(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(622) +]] +{ return math::min(a,b); } + +export float3 min(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(623) +]] +{ return math::min(a,b); } + +export float4 min(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(624) +]] +{ return math::min(a,b); } + +export float2 min(float2 a=float2(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(625) +]] +{ return math::min(a,b); } + +export float3 min(float3 a=float3(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(626) +]] +{ return math::min(a,b); } + +export float4 min(float4 a=float4(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(627) +]] +{ return math::min(a,b); } + +export float2 min(float a=0., float2 b=float2(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(628) +]] +{ return math::min(a,b); } + +export float3 min(float a=0., float3 b=float3(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(629) +]] +{ return math::min(a,b); } + +export float4 min(float a=0., float4 b=float4(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(630) +]] +{ return math::min(a,b); } + +export color min(color a=color(0.), color b=color(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(631) +]] +{ return math::min(a,b); } + +export color min(float a=0., color b=color(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(632) +]] +{ return math::min(a,b); } + +export color min(color a=color(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(633) +]] +{ return math::min(a,b); } + +export float min_value(float a=0.) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(640) +]] +{ return math::min_value(a); } + +export float min_value(float2 a=float2(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(641) +]] +{ return math::min_value(a); } + +export float min_value(float3 a=float3(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(642) +]] +{ return math::min_value(a); } + +export float min_value(float4 a=float4(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(643) +]] +{ return math::min_value(a); } + +export float min_value(color a=color(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest channel value in the input color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(644) +]] +{ return math::min_value(a); } + +export float2 normalize( + float2 a=float2(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(650) +]] +{ return math::normalize(a); } + +export float3 normalize( + float3 a=float3(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(651) +]] +{ return math::normalize(a); } + +export float4 normalize( + float4 a=float4(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(652) +]] +{ return math::normalize(a); } + +export int pow( + int a=0 [[anno::description("Base value.")]], + int b=0 [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(660) +]] +{ return math::pow(a,b); } + +export float pow( + float a=0. [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(661) +]] +{ return math::pow(a,b); } + +export float2 pow( + float2 a=float2(0.) [[anno::description("Base value.")]], + float2 b=float2(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(662) +]] +{ return math::pow(a,b); } + +export float3 pow( + float3 a=float3(0.) [[anno::description("Base value.")]], + float3 b=float3(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(663) +]] +{ return math::pow(a,b); } + +export float4 pow( + float4 a=float4(0.) [[anno::description("Base value.")]], + float4 b=float4(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(664) +]] +{ return math::pow(a,b); } + +export float2 pow( + float2 a=float2(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(665) +]] +{ return math::pow(a,b); } + +export float3 pow( + float3 a=float3(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(666) +]] +{ return math::pow(a,b); } + +export float4 pow( + float4 a=float4(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(667) +]] +{ return math::pow(a,b); } + +export color pow( + color a=color(0.) [[anno::description("Base value.")]], + color b=color(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(668) +]] +{ return math::pow(a,b); } + +export color pow( + color a=color(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(669) +]] +{ return math::pow(a,b); } + +export float radians( + float a=0. [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(670) +]] +{ return math::radians(a); } + +export float2 radians( + float2 a=float2(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(671) +]] +{ return math::radians(a); } + +export float3 radians( + float3 a=float3(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(672) +]] +{ return math::radians(a); } + +export float4 radians( + float4 a=float4(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(673) +]] +{ return math::radians(a); } + +export float round(float a=0.) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(690) +]] +{ return math::round(a); } + +export float2 round(float2 a=float2(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(691) +]] +{ return math::round(a); } + +export float3 round(float3 a=float3(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(692) +]] +{ return math::round(a); } + +export float4 round(float4 a=float4(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(693) +]] +{ return math::round(a); } + +export float rsqrt(float a=0.) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(700) +]] +{ return math::rsqrt(a); } + +export float2 rsqrt(float2 a=float2(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(701) +]] +{ return math::rsqrt(a); } + +export float3 rsqrt(float3 a=float3(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(702) +]] +{ return math::rsqrt(a); } + +export float4 rsqrt(float4 a=float4(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(703) +]] +{ return math::rsqrt(a); } + +export color rsqrt(color a=color(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(704) +]] +{ return math::rsqrt(a); } + +export float saturate( + float a=0. [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(710) +]] +{ return math::saturate(a); } + +export float2 saturate( + float2 a=float2(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(711) +]] +{ return math::saturate(a); } + +export float3 saturate( + float3 a=float3(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(712) +]] +{ return math::saturate(a); } + +export float4 saturate( + float4 a=float4(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(713) +]] +{ return math::saturate(a); } + +export color saturate( + color a=color(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(714) +]] +{ return math::saturate(a); } + +export int sign(int a=0) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(720) +]] +{ return math::sign(a); } + +export float sign(float a=0.) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(721) +]] +{ return math::sign(a); } + +export float2 sign(float2 a=float2(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(722) +]] +{ return math::sign(a); } + +export float3 sign(float3 a=float3(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(723) +]] +{ return math::sign(a); } + +export float4 sign(float4 a=float4(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(724) +]] +{ return math::sign(a); } + +export float sin(float a=0.) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(730) +]] +{ return math::sin(a); } + +export float2 sin(float2 a=float2(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(731) +]] +{ return math::sin(a); } + +export float3 sin(float3 a=float3(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(732) +]] +{ return math::sin(a); } + +export float4 sin(float4 a=float4(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(733) +]] +{ return math::sin(a); } + +export float2 sincos( + float a=0. [[ + anno::description("Input angle in radians.") + ]]) +[[ + anno::display_name("SinCos"), + anno::description("Computes sine and cosine for the same input angle and returns float2(sin, cos)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/sincos.svg"), + anno::ui_order(739) +]] +{ float[]b = math::sincos(a); return float2(b[0],b[1]); } + +export float smoothstep( + float a=0. [[ + anno::description("Lower edge of the interpolation range.") + ]], + float b=1. [[ + anno::description("Upper edge of the interpolation range.") + ]], + float l=0. [[ + anno::description("Input value to evaluate against the interpolation range.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(740) +]] +{ return math::smoothstep(a,b,l); } + +export float2 smoothstep( + float2 a=float2(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float2 l=float2(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(741) +]] +{ return math::smoothstep(a,b,l); } + +export float3 smoothstep( + float3 a=float3(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float3 l=float3(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(742) +]] +{ return math::smoothstep(a,b,l); } + +export float4 smoothstep( + float4 a=float4(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float4 l=float4(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(743) +]] +{ return math::smoothstep(a,b,l); } + +export float2 smoothstep( + float2 a=float2(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(744) +]] +{ return math::smoothstep(a,b,l); } + +export float3 smoothstep( + float3 a=float3(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(745) +]] +{ return math::smoothstep(a,b,l); } + +export float4 smoothstep( + float4 a=float4(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(746) +]] +{ return math::smoothstep(a,b,l); } + +export float sqrt(float a=0.) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(750) +]] +{ return math::sqrt(a); } + +export float2 sqrt(float2 a=float2(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(751) +]] +{ return math::sqrt(a); } + +export float3 sqrt(float3 a=float3(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(752) +]] +{ return math::sqrt(a); } + +export float4 sqrt(float4 a=float4(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(753) +]] +{ return math::sqrt(a); } + +export color sqrt(color a=color(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(754) +]] +{ return math::sqrt(a); } + +export float step( + float a=0. [[ + anno::description("Threshold value.") + ]], + float b=0. [[ + anno::description("Input compared against the threshold.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(760) +]] +{ return math::step(a,b); } + +export float2 step( + float2 a=float2(0.) [[ + anno::description("Threshold value per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(761) +]] +{ return math::step(a,b); } + +export float3 step( + float3 a=float3(0.) [[ + anno::description("Threshold value per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(762) +]] +{ return math::step(a,b); } + +export float4 step( + float4 a=float4(0.) [[ + anno::description("Threshold value per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(763) +]] +{ return math::step(a,b); } + +export float tan(float a=0.) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(770) +]] +{ return math::tan(a); } + +export float2 tan(float2 a=float2(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(771) +]] +{ return math::tan(a); } + +export float3 tan(float3 a=float3(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(772) +]] +{ return math::tan(a); } + +export float4 tan(float4 a=float4(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(773) +]] +{ return math::tan(a); } + +export float remap( + float a=0. [[ + anno::description("Input value in the source range.") + ]], + float start_old=0. [[ + anno::description("Lower bound of the source range.") + ]], + float end_old=1. [[ + anno::description("Upper bound of the source range.") + ]], + float start_new=0. [[ + anno::description("Lower bound of the destination range.") + ]], + float end_new=1. [[ + anno::description("Upper bound of the destination range.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(680) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float2 remap( + float2 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float2 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float2 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float2 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float2 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(681) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float3 remap( + float3 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float3 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float3 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float3 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float3 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(682) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float4 remap( + float4 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float4 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float4 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float4 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float4 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(683) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_Finger1step_JFT.usd b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_Finger1step_JFT.usd new file mode 100644 index 0000000000000000000000000000000000000000..e6010dd47a09b1a0db1917fbadb721a9fc1169a0 Binary files /dev/null and b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_Finger1step_JFT.usd differ diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd new file mode 100644 index 0000000000000000000000000000000000000000..fd51438ea6c43c96a7a3ef8457d24330a31e0815 --- /dev/null +++ b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b849add675a959bf108b04281a4283632388698d82b34ab5c4ec9d42dcf8f4c1 +size 3373601 diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd new file mode 100644 index 0000000000000000000000000000000000000000..a2df6783760734add37dd0b41aab5c49bd7dcde8 --- /dev/null +++ b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:865e828faa230a75c97016c1cc647ce236db6a3d84199c109923287cb5ef683c +size 230495 diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd new file mode 100644 index 0000000000000000000000000000000000000000..fa1165704a30e865664c974651042cca5cf95f69 --- /dev/null +++ b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3922f86499bd9b399182dca876a0e4295780a33b611267988d6a4570237ba11b +size 143957 diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd new file mode 100644 index 0000000000000000000000000000000000000000..0f053d53eed65a7e87812bc8ad83faa19ea3e498 --- /dev/null +++ b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ea3296bde39458b1dd01323d391115e6d6535065247df6c4d2108ee7f44f1ea +size 136079 diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_fingertipsstep_JFD.usd b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_fingertipsstep_JFD.usd new file mode 100644 index 0000000000000000000000000000000000000000..4839d73ef712c53c92387d83c9e5339b268a03ee Binary files /dev/null and b/universalrobots_ur7e/payloads/Gripper/dependencies/Defeatured_2F_85_PAD_OPEN_fingertipsstep_JFD.usd differ diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_base.usda b/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_base.usda new file mode 100644 index 0000000000000000000000000000000000000000..d81d7b2976d3dfe7d2ac2fe871ddfb479170aa4f --- /dev/null +++ b/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_base.usda @@ -0,0 +1,360 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "Robotiq_2F_85" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def Xform "Robotiq_2F_85" ( + kind = "assembly" +) +{ + def Xform "Robotiq_2F_85" ( + kind = "assembly" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "base_link" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + delete apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "PhysxConvexHullCollisionAPI", "PhysxConvexDecompositionCollisionAPI"] + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, 0.5000000000000001, 0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "grip_frame" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.13371706760793903) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "left_outer_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, 0.5000000000000001, 0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "left_outer_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, 0.5000000000000001, 0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "left_inner_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, 0.5000000000000001, 0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "left_inner_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, 0.5000000000000001, 0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "right_outer_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, -0.5000000000000001, -0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "right_outer_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, -0.5000000000000001, -0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "right_inner_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, -0.5000000000000001, -0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "right_inner_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + kind = "subcomponent" + prepend references = + ) + { + quatd xformOp:orient = (0.4999999999999999, 0.5000000000000001, -0.5000000000000001, -0.5000000000000001) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } +} + +def Scope "Meshes" +{ + token visibility = "invisible" + + def Xform "base_link" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Defeatured_2F_85_PAD_OPEN_basestep_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_basestep_JFX.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "inner_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Defeatured_2F_85_PAD_OPEN_finger4step_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_finger4step_JFH.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "Defeatured_2F_85_PAD_OPEN_fingertipsstep_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_fingertipsstep_JFD.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "inner_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Defeatured_2F_85_PAD_OPEN_finger3step_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_finger3step_JFL.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "outer_finger" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Defeatured_2F_85_PAD_OPEN_finger2step_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_finger2step_JFP.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "outer_knuckle" ( + kind = "group" + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Defeatured_2F_85_PAD_OPEN_Finger1step_01" ( + instanceable = false + kind = "subcomponent" + prepend references = @./Defeatured_2F_85_PAD_OPEN_Finger1step_JFT.usd@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } +} + diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_edit.usd b/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_edit.usd new file mode 100644 index 0000000000000000000000000000000000000000..60771d4e67d017936fafb3ea4d1f75c1b918f2eb Binary files /dev/null and b/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_edit.usd differ diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_loop.usda b/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_loop.usda new file mode 100644 index 0000000000000000000000000000000000000000..50bbaffceaf844c95754294e3faa291504784c51 --- /dev/null +++ b/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_loop.usda @@ -0,0 +1,343 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "Robotiq_2F_85" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + subLayers = [ + @./Robotiq_2F_85_base.usda@ + ] + upAxis = "Z" +) + +def Xform "Robotiq_2F_85" ( + kind = "assembly" +) +{ + over Xform "Robotiq_2F_85" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + kind = "assembly" + ) + { + def Scope "Joints" + { + def PhysicsRevoluteJoint "finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0.0002 + float drive:angular:physics:maxForce = 16.5 + float drive:angular:physics:stiffness = 0.17 + float drive:angular:physics:targetPosition = 0 + float drive:angular:physics:targetVelocity = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.0306, 0.05466) + point3f physics:localPos1 = (0, -0.0306, 0.05466) + quatf physics:localRot0 = (0.5, 0.5, -0.5, -0.5) + quatf physics:localRot1 = (0.5, 0.5, -0.5, -0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 75 + } + + def PhysicsRevoluteJoint "right_outer_knuckle_joint" ( + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 5000 + float drive:angular:physics:maxForce = 5 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.0306, 0.05466) + point3f physics:localPos1 = (0, 0.0306, 0.05466) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 75 + } + + def PhysicsRevoluteJoint "right_outer_finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.06213, 0.0509) + point3f physics:localPos1 = (0, 0.06213, 0.0509) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "right_inner_finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0.00001 + float drive:angular:physics:maxForce = 0.5 + float drive:angular:physics:stiffness = 0.0002 + float drive:angular:physics:targetPosition = 45 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.06776, 0.09809) + point3f physics:localPos1 = (0, 0.06776, 0.09809) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -inf + float physics:upperLimit = inf + } + + def PhysicsRevoluteJoint "right_inner_knuckle_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + uniform bool physics:excludeFromArticulation = 1 + point3f physics:localPos0 = (0, 0.0127, 0.06118) + point3f physics:localPos1 = (0, 0.0127, 0.06118) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -inf + float physics:upperLimit = inf + } + + def PhysicsRevoluteJoint "right_inner_finger_knuckle_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.04986, 0.1046) + point3f physics:localPos1 = (0, 0.04986, 0.1046) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + } + + def PhysicsRevoluteJoint "left_outer_finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.06213, 0.0509) + point3f physics:localPos1 = (0, -0.06213, 0.0509) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "left_inner_finger_knuckle_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.04986, 0.1046) + point3f physics:localPos1 = (0, -0.04986, 0.1046) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -inf + float physics:upperLimit = inf + } + + def PhysicsRevoluteJoint "left_inner_finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0.00001 + float drive:angular:physics:maxForce = 0.5 + float drive:angular:physics:stiffness = 0.0002 + float drive:angular:physics:targetPosition = 45 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.06776, 0.09809) + point3f physics:localPos1 = (0, -0.06776, 0.09809) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -inf + float physics:upperLimit = inf + } + + def PhysicsRevoluteJoint "left_inner_knuckle_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + uniform bool physics:excludeFromArticulation = 1 + point3f physics:localPos0 = (0, -0.0127, 0.06118) + point3f physics:localPos1 = (0, -0.0127, 0.06118) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -inf + float physics:upperLimit = inf + } + } + + over "base_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + + over "left_outer_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "left_outer_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + + over "left_inner_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "left_inner_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "right_outer_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "right_outer_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + + over "right_inner_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + + over "right_inner_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + } +} + +over "Meshes" +{ + over "base_link" + { + over "Defeatured_2F_85_PAD_OPEN_basestep_01" + { + over "Defeatured_2F_85_PAD_OPEN_basestep" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "inner_finger" + { + over "Defeatured_2F_85_PAD_OPEN_finger4step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger4step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + + over "Defeatured_2F_85_PAD_OPEN_fingertipsstep_01" + { + over "Defeatured_2F_85_PAD_OPEN_fingertipsstep" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "inner_knuckle" + { + over "Defeatured_2F_85_PAD_OPEN_finger3step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger3step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "outer_finger" + { + over "Defeatured_2F_85_PAD_OPEN_finger2step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger2step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "outer_knuckle" + { + over "Defeatured_2F_85_PAD_OPEN_Finger1step_01" + { + over "Defeatured_2F_85_PAD_OPEN_Finger1step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } +} + diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_mimic.usda b/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_mimic.usda new file mode 100644 index 0000000000000000000000000000000000000000..a57110fc52b08970cfe8cf2e35b0d380cc20016f --- /dev/null +++ b/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_phyisics_mimic.usda @@ -0,0 +1,343 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "Robotiq_2F_85" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + subLayers = [ + @./Robotiq_2F_85_base.usda@ + ] + upAxis = "Z" +) + +def Xform "Robotiq_2F_85" ( + kind = "assembly" +) +{ + over Xform "Robotiq_2F_85" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + kind = "assembly" + ) + { + def Scope "Joints" + { + def PhysicsRevoluteJoint "finger_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0.0002 + float drive:angular:physics:maxForce = 26 + float drive:angular:physics:stiffness = 3 + float drive:angular:physics:targetPosition = 0 + float drive:angular:physics:targetVelocity = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.0306, 0.05466) + point3f physics:localPos1 = (0, -0.0306, 0.05466) + quatf physics:localRot0 = (0.5, 0.5, -0.5, -0.5) + quatf physics:localRot1 = (0.5, 0.5, -0.5, -0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 47 + } + + def PhysicsRevoluteJoint "right_outer_knuckle_joint" ( + active = true + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.0306, 0.05466) + point3f physics:localPos1 = (0, 0.0306, 0.05466) + quatf physics:localRot0 = (0.5, -0.5, 0.5, -0.5) + quatf physics:localRot1 = (0.5, -0.5, 0.5, -0.5) + float physics:lowerLimit = 0 + float physics:upperLimit = 47 + } + + def PhysicsRevoluteJoint "right_inner_finger_joint" ( + active = true + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 0 + float drive:angular:physics:stiffness = 0 + float drive:angular:physics:targetPosition = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.06776, 0.09809) + point3f physics:localPos1 = (0, 0.06776, 0.09809) + quatf physics:localRot0 = (0.5, 0.5, -0.5, -0.5) + quatf physics:localRot1 = (0.5, 0.5, -0.5, -0.5) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "right_inner_finger_knuckle_joint" ( + active = true + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float drive:angular:physics:targetPosition = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, 0.04986, 0.1046) + point3f physics:localPos1 = (0, 0.04986, 0.1046) + quatf physics:localRot0 = (0.5, 0.5, -0.5, -0.5) + quatf physics:localRot1 = (0.5, 0.5, -0.5, -0.5) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "left_inner_finger_knuckle_joint" ( + active = true + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.04986, 0.1046) + point3f physics:localPos1 = (0, -0.04986, 0.1046) + quatf physics:localRot0 = (0.5, 0.5, 0.5, 0.5) + quatf physics:localRot1 = (0.5, 0.5, 0.5, 0.5) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "left_inner_finger_joint" ( + active = true + delete apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 0 + float drive:angular:physics:stiffness = 0 + float drive:angular:physics:targetPosition = 0 + uniform token physics:axis = "Z" + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0, -0.06776, 0.09809) + point3f physics:localPos1 = (0, -0.06776, 0.09809) + quatf physics:localRot0 = (0.5, -0.5, -0.5, 0.5) + quatf physics:localRot1 = (0.5, -0.5, -0.5, 0.5) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + } + + over "base_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + kind = "group" + ) + { + } + + over "left_outer_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "left_outer_finger" ( + delete apiSchemas = ["PhysicsMassAPI"] + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + kind = "group" + ) + { + point3f physics:centerOfMass = (0.000005531254, -0.06595047, 0.06895309) + float3 physics:diagonalInertia = (0.0000132201985, 0.0000042931024, 0.000010880907) + float physics:mass = 0.039179202 + quatf physics:principalAxes = (0.76604444, -0.64278764, 0, 0) + + def PhysicsFixedJoint "FixedJoint" + { + rel physics:body0 = + rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + point3f physics:localPos0 = (7.4505797e-9, 7.45058e-9, 3.87445e-9) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, -5.531774e-8, -4.2146855e-8, 2.370759e-8) + quatf physics:localRot1 = (1, 0, 0, 0) + } + } + + over "left_inner_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (1.2590098e-8, -0.05424156, 0.11390199) + float3 physics:diagonalInertia = (0.000011577923, 0.00000896224, 0.0000039778333) + float physics:mass = 0.039254718 + quatf physics:principalAxes = (0.9914449, -0.13052619, 0, 0) + } + + over "left_inner_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-2.005321e-10, -0.03222066, 0.083420366) + float3 physics:diagonalInertia = (0.000011838778, 0.0000044877793, 0.00000800488) + float physics:mass = 0.027306942 + quatf physics:principalAxes = (0.9063078, -0.42261827, 0, 0) + } + + over "right_outer_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI"] + ) + { + } + + over "right_outer_finger" ( + delete apiSchemas = ["PhysicsMassAPI"] + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + kind = "group" + ) + { + point3f physics:centerOfMass = (-0.000005531254, 0.06595047, 0.06895309) + float3 physics:diagonalInertia = (0.0000132201985, 0.0000042931024, 0.000010880907) + float physics:mass = 0.039179202 + quatf physics:principalAxes = (0.76604444, 0.64278764, 0, 0) + + def PhysicsFixedJoint "FixedJoint" + { + rel physics:body0 = + rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + point3f physics:localPos0 = (3.725291e-9, -7.45058e-9, -3.4324326e-9) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, -5.5317734e-8, 4.2146844e-8, -2.634178e-9) + quatf physics:localRot1 = (1, 0, 0, 0) + } + } + + over "right_inner_finger" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + kind = "group" + ) + { + point3f physics:centerOfMass = (-1.2590098e-8, 0.05424156, 0.11390199) + float3 physics:diagonalInertia = (0.000011577923, 0.00000896224, 0.0000039778333) + float physics:mass = 0.039254718 + quatf physics:principalAxes = (0.9914449, 0.13052619, 0, 0) + } + + over "right_inner_knuckle" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + kind = "group" + ) + { + point3f physics:centerOfMass = (2.005321e-10, 0.03222066, 0.083420366) + float3 physics:diagonalInertia = (0.000011838778, 0.0000044877793, 0.00000800488) + float physics:mass = 0.027306942 + quatf physics:principalAxes = (0.9063078, 0.42261827, 0, 0) + } + } +} + +over "Meshes" +{ + over "base_link" + { + over "Defeatured_2F_85_PAD_OPEN_basestep_01" + { + over "Defeatured_2F_85_PAD_OPEN_basestep" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "inner_finger" + { + over "Defeatured_2F_85_PAD_OPEN_finger4step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger4step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + + over "Defeatured_2F_85_PAD_OPEN_fingertipsstep_01" + { + over "Defeatured_2F_85_PAD_OPEN_fingertipsstep" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "inner_knuckle" + { + over "Defeatured_2F_85_PAD_OPEN_finger3step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger3step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "outer_finger" + { + over "Defeatured_2F_85_PAD_OPEN_finger2step_01" + { + over "Defeatured_2F_85_PAD_OPEN_finger2step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "outer_knuckle" + { + over "Defeatured_2F_85_PAD_OPEN_Finger1step_01" + { + over "Defeatured_2F_85_PAD_OPEN_Finger1step" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + def PhysicsCollisionGroup "CollisionGroup" + { + rel collection:colliders:includes = + rel physics:filteredGroups + } + + def PhysicsCollisionGroup "CollisionGroup_01" + { + rel collection:colliders:includes = + rel physics:filteredGroups = + } +} + diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_robot.usd b/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_robot.usd new file mode 100644 index 0000000000000000000000000000000000000000..0ff97a5489cd1825914693aa191396a9d5dcc858 Binary files /dev/null and b/universalrobots_ur7e/payloads/Gripper/dependencies/Robotiq_2F_85_robot.usd differ diff --git a/universalrobots_ur7e/payloads/Gripper/dependencies/materials.usd b/universalrobots_ur7e/payloads/Gripper/dependencies/materials.usd new file mode 100644 index 0000000000000000000000000000000000000000..6774f7ccc75fa8e297a3d2befea402c9fe033923 Binary files /dev/null and b/universalrobots_ur7e/payloads/Gripper/dependencies/materials.usd differ diff --git a/universalrobots_ur7e/payloads/Gripper/none.usda b/universalrobots_ur7e/payloads/Gripper/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..bbbe4b5c48e65d17a294d8a429b60c0bf98b1b59 --- /dev/null +++ b/universalrobots_ur7e/payloads/Gripper/none.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def "ur5e" +{ +} + diff --git a/universalrobots_ur7e/payloads/Gripper/robotiq_2f_85.usda b/universalrobots_ur7e/payloads/Gripper/robotiq_2f_85.usda new file mode 100644 index 0000000000000000000000000000000000000000..5d49e75afef5a9617072c4e45bdbd698d2bd919e --- /dev/null +++ b/universalrobots_ur7e/payloads/Gripper/robotiq_2f_85.usda @@ -0,0 +1,37 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def "ur5e" ( + customData = { + string[] variantPrimPaths = ["Gripper", "Gripper/Robotiq_2F_85", "joints/robot_gripper_joint"] + } +) +{ + over "Gripper" ( + prepend payload = @./dependencies/Robotiq_2F_85_edit.usd@ + ) + { + over "Robotiq_2F_85" + { + } + } + + over "joints" + { + over "robot_gripper_joint" + { + custom rel physics:body1 + prepend rel physics:body1 = + bool physics:jointEnabled = 1 + } + } +} + diff --git a/universalrobots_ur7e/payloads/Physics/mujoco.usda b/universalrobots_ur7e/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..445c18098518facf0deda9ec6eb9dfe3f8c97e95 --- /dev/null +++ b/universalrobots_ur7e/payloads/Physics/mujoco.usda @@ -0,0 +1,203 @@ +#usda 1.0 +( + customLayerData = { + } + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +over "ur5e" +{ + over "joints" + { + over "robot_gripper_joint" + { + } + + over "shoulder_pan_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "shoulder_lift_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "elbow_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "wrist_1_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "wrist_2_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "wrist_3_joint" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + } + + over "base_link" + { + over "base_link" + { + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "shoulder_link" + { + over "visuals" + { + over "shoulder" + { + } + } + + over "collisions" + { + over "shoulder" + { + } + } + } + + over "upper_arm_link" + { + over "visuals" + { + over "upperarm" + { + } + } + + over "collisions" + { + over "upperarm" + { + } + } + } + + over "forearm_link" + { + over "visuals" + { + over "forearm" + { + } + } + + over "collisions" + { + over "forearm" + { + } + } + } + + over "wrist_1_link" + { + over "visuals" + { + over "wrist1" + { + } + } + + over "collisions" + { + over "wrist1" + { + } + } + } + + over "wrist_2_link" + { + over "visuals" + { + over "wrist2" + { + } + } + + over "collisions" + { + over "wrist2" + { + } + } + } + + over "wrist_3_link" + { + over "flange" + { + } + + over "ft_frame" + { + } + + over "visuals" + { + over "wrist3" + { + } + } + + over "collisions" + { + over "wrist3" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "Gripper" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/universalrobots_ur7e/payloads/Physics/none.usda b/universalrobots_ur7e/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..bbbe4b5c48e65d17a294d8a429b60c0bf98b1b59 --- /dev/null +++ b/universalrobots_ur7e/payloads/Physics/none.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def "ur5e" +{ +} + diff --git a/universalrobots_ur7e/payloads/Physics/physics.usda b/universalrobots_ur7e/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..873fbcb1874769d8df940e9ba080c73f05332eb5 --- /dev/null +++ b/universalrobots_ur7e/payloads/Physics/physics.usda @@ -0,0 +1,346 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +over "ur5e" +{ + over "joints" + { + def PhysicsRevoluteJoint "shoulder_pan_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 9.9614 + float drive:angular:physics:maxForce = 150 + float drive:angular:physics:stiffness = 9400.501 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.1512013 + point3f physics:localPos0 = (0, 0, 0.1625) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (-4.371139e-8, 0, 0, 1) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "shoulder_lift_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 10.7333 + float drive:angular:physics:maxForce = 150 + float drive:angular:physics:stiffness = 10020.92 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.16467163 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70710677, 0.70710677, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "elbow_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 34.1945 + float drive:angular:physics:maxForce = 150 + float drive:angular:physics:stiffness = 10230.221 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 1.6371533 + point3f physics:localPos0 = (-0.425, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "wrist_1_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 13.1797 + float drive:angular:physics:maxForce = 64 + float drive:angular:physics:stiffness = 3940.629 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.63140386 + point3f physics:localPos0 = (-0.3922, 0, 0.1333) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "wrist_2_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 2.5928 + float drive:angular:physics:maxForce = 28 + float drive:angular:physics:stiffness = 3940.629 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.024436664 + point3f physics:localPos0 = (0, -0.0997, -2.0448811e-11) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70710677, 0.70710677, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "wrist_3_joint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0.3475 + float drive:angular:physics:maxForce = 28 + float drive:angular:physics:stiffness = 1000.0809 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.0017293784 + point3f physics:localPos0 = (0, 0.0996, -2.0428301e-11) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70710677, -0.70710677, -6.181724e-8, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsFixedJoint "robot_gripper_joint" + { + custom rel physics:body0 = + float physics:breakForce = inf + float physics:breakTorque = inf + bool physics:jointEnabled = 0 + point3f physics:localPos0 = (5.054474e-9, -5.078315e-9, -3.836155e-8) + point3f physics:localPos1 = (0.8172, 0.2329, 0.0628) + quatf physics:localRot0 = (-0.5, 0.49999997, 0.5, 0.49999997) + quatf physics:localRot1 = (0.70710677, -9.835192e-9, -2.3884143e-8, 0.70710677) + } + } + + over "base_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0, 0, 0) + float3 physics:diagonalInertia = (0.0044333315, 0.0044333315, 0.0072) + float physics:mass = 4 + quatf physics:principalAxes = (1, 0, 0, 0) + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "shoulder_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0, 0, 0) + float3 physics:diagonalInertia = (0.010267496, 0.010267496, 0.00666) + float physics:mass = 3.7 + quatf physics:principalAxes = (1, 0, 0, 0) + + over "collisions" + { + over "shoulder" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "upper_arm_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.2125, 0, 0.138) + float3 physics:diagonalInertia = (0.13388579, 0.13388579, 0.0151074) + float physics:mass = 8.393 + quatf physics:principalAxes = (0.70710677, 0, 0.70710677, 0) + + over "collisions" + { + over "upperarm" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "forearm_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.1961, 0, 0.007) + float3 physics:diagonalInertia = (0.031209355, 0.031209355, 0.0040950007) + float physics:mass = 2.275 + quatf physics:principalAxes = (0.70710677, 0, 0.70710677, 0) + + over "collisions" + { + over "forearm" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "wrist_1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0, 0, 0) + float3 physics:diagonalInertia = (0.002559899, 0.002559899, 0.0021942) + float physics:mass = 1.219 + quatf physics:principalAxes = (1, 0, 0, 0) + + over "collisions" + { + over "wrist1" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "wrist_2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0, 0, 0) + float3 physics:diagonalInertia = (0.002559899, 0.002559899, 0.0021942) + float physics:mass = 1.219 + quatf physics:principalAxes = (1, 0, 0, 0) + + over "collisions" + { + over "wrist2" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "wrist_3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0, 0, -0.022899998) + float3 physics:diagonalInertia = (0.0000989041, 0.0000989041, 0.00013211719) + float physics:mass = 0.1879 + quatf physics:principalAxes = (1, 0, 0, 0) + + over "collisions" + { + over "wrist3" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } +} + diff --git a/universalrobots_ur7e/payloads/Physics/physx.usda b/universalrobots_ur7e/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..54ed504ed97a6716e58150131022850694bb4f36 --- /dev/null +++ b/universalrobots_ur7e/payloads/Physics/physx.usda @@ -0,0 +1,71 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "ur5e" +{ + over "joints" + { + over "shoulder_pan_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "shoulder_lift_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "elbow_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "wrist_1_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "wrist_2_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "wrist_3_joint" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 64 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/universalrobots_ur7e/payloads/Sensor/none.usda b/universalrobots_ur7e/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..bbbe4b5c48e65d17a294d8a429b60c0bf98b1b59 --- /dev/null +++ b/universalrobots_ur7e/payloads/Sensor/none.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def "ur5e" +{ +} + diff --git a/universalrobots_ur7e/payloads/Sensor/sensors.usda b/universalrobots_ur7e/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..9b5c392f40b598c7c8d9460eae768406262bde97 --- /dev/null +++ b/universalrobots_ur7e/payloads/Sensor/sensors.usda @@ -0,0 +1,19 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def Xform "ur" +{ +} + +def "ur5e" +{ +} + diff --git a/universalrobots_ur7e/payloads/base.usda b/universalrobots_ur7e/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..574633b4b71f7483d1b9cc07d07a884a3d895037 --- /dev/null +++ b/universalrobots_ur7e/payloads/base.usda @@ -0,0 +1,367 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "ur5e" ( + customData = { + string[] variantPrimPaths = ["joints/robot_gripper_joint"] + } +) +{ + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Scope "joints" + { + } + + def Scope "Looks" + { + } + + def Xform "base_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "base_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.70711, 0.7071035624, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "shoulder_link" + { + quatd xformOp:orient = (-4.371138828673793e-8, -0, 0, 1) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.16249999403953552) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "shoulder" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0, 0, 0.7071035624, 0.70711) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "shoulder" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0, 0, 0, 1) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "upper_arm_link" + { + quatd xformOp:orient = (-3.0908619663705394e-8, -3.0908619663705394e-8, 0.7071067690849304, 0.7071067690849304) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.16249999403953552) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "upperarm" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.000003190722816, 0.7071067671, -0.7071067952, -0.000003218820843) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.1379999965) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "upperarm" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.4999999702, 0.5000000099, -0.5000000099, -0.5000000099) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.1379999965) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "forearm_link" + { + quatd xformOp:orient = (-3.0908619663705394e-8, -3.0908619663705394e-8, 0.7071067690849304, 0.7071067690849304) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.42500001192092896, 3.715468110954134e-8, 0.16249999403953552) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "forearm" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.000003190722816, 0.7071067671, -0.7071067952, -0.000003218820843) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.007000000216) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "forearm" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.4999999702, 0.5000000099, -0.5000000099, -0.5000000099) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.007000000216) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "wrist_1_link" + { + quatd xformOp:orient = (-3.0908619663705394e-8, -3.0908619663705394e-8, 0.7071067690849304, 0.7071067690849304) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.8172000050544739, 0.1333000659942627, 0.16249999403953552) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "wrist1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.000004534985729, 1, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.1270000041) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "wrist1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071067691, 0.7071067933, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.1270000041) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "wrist_2_link" + { + quatd xformOp:orient = (0, -4.371138828673793e-8, 0.9999999403953552, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.8172000050544739, 0.1333000659942627, 0.06280000507831573) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "wrist2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.70711, 0.7071035624, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.09969999641) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "wrist2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.09969999641) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "wrist_3_link" + { + quatd xformOp:orient = (3.090861255827804e-8, -3.0908619663705394e-8, 0.7071067094802856, 0.7071067094802856) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.8172000050544739, 0.23290003836154938, 0.06280000507831573) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "flange" + { + quatd xformOp:orient = (0.4999999701976776, -0.4999999701976776, -0.4999999701976776, -0.4999999701976776) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "ft_frame" + { + quatd xformOp:orient = (-4.371138828673793e-8, 1, 0, -0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "wrist3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.000004534985729, 1, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.09889999777) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "wrist3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071067691, 0.7071067933, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.09889999777) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "Gripper" + { + quatd xformOp:orient = (0.5000000000000001, -0.5, -0.49999999999999994, -0.5) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.8172, 0.2329, 0.0628) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/universalrobots_ur7e/payloads/geometries.usd b/universalrobots_ur7e/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..d2ceac19fabd586cd14b407d4c86ffa4c4ebffae --- /dev/null +++ b/universalrobots_ur7e/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34692050bf417a8848956718fd1b79a0393d86de0ca28b051f260f26d91c4391 +size 9321381 diff --git a/universalrobots_ur7e/payloads/instances.usda b/universalrobots_ur7e/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..f42bd270215d51aee7f14c7337246e2387e5936a --- /dev/null +++ b/universalrobots_ur7e/payloads/instances.usda @@ -0,0 +1,1089 @@ +#usda 1.0 +( + customLayerData = { + } + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_1" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_1" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_2" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_2" + { + over "subset_" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "URBlue" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_3" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_3" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_4" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_4" + { + over "subset_" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "subset_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "LinkGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "subset_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "URBlue" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "LinkGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8203922, 0.8203922, 0.8203922) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "URBlue" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_5" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_5" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_6" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_6" + { + over "URBlue" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Black0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "LinkGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Black1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "URBlue" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "LinkGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8203922, 0.8203922, 0.8203922) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_7" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_7" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_8" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_8" + { + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "subset_" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "URBlue" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_9" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_9" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_10" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_10" + { + over "Black" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "URBlue" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "JointGrey" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Black" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "URBlue" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "JointGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_11" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_11" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_12" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_12" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "LinkGrey" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8203922, 0.8203922, 0.8203922) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_13" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_13" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "DefaultMaterial" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } +} + diff --git a/universalrobots_ur7e/payloads/materials.usda b/universalrobots_ur7e/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..6668feea8fc0caf01e065ada80cf0a5584d39390 --- /dev/null +++ b/universalrobots_ur7e/payloads/materials.usda @@ -0,0 +1,823 @@ +#usda 1.0 +( + customLayerData = { + } + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Black" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Black" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.03310248, 0.03310248, 0.03310248) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.03310248, 0.03310248, 0.03310248) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "JointGrey" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "JointGrey" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.2784314, 0.2784314, 0.2784314) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2784314, 0.2784314, 0.2784314) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "DefaultMaterial" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "DefaultMaterial" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "URBlue" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "plastic" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "URBlue" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.4901961, 0.6784314, 0.8) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4901961, 0.6784314, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "LinkGrey" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "LinkGrey" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.8203922, 0.8203922, 0.8203922) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8203922, 0.8203922, 0.8203922) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } +} + diff --git a/universalrobots_ur7e/payloads/robot.usda b/universalrobots_ur7e/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..6ccc0ebfae386ffff16348e39dc8abb9d3016392 --- /dev/null +++ b/universalrobots_ur7e/payloads/robot.usda @@ -0,0 +1,232 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +over "ur5e" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string isaac:description + string isaac:namespace + prepend rel isaac:physics:robotJoints = [ + , + , + , + , + , + , + , + , + ] + prepend rel isaac:physics:robotLinks = [ + , + , + , + , + , + , + , + , + , + , + ] + token isaac:robotType = "Manipulator" + + over "joints" + { + over "robot_gripper_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "shoulder_pan_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "shoulder_lift_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "elbow_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "wrist_1_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "wrist_2_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "wrist_3_joint" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + } + + over "base_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + + over "base_link" ( + prepend apiSchemas = ["IsaacSiteAPI"] + ) + { + } + } + + over "shoulder_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "upper_arm_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "forearm_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "wrist_1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "wrist_2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "wrist_3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + + over "flange" ( + prepend apiSchemas = ["IsaacSiteAPI"] + ) + { + } + + over "ft_frame" ( + prepend apiSchemas = ["IsaacSiteAPI"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } +} + diff --git a/universalrobots_ur7e/runnables/physics/mujoco.usda b/universalrobots_ur7e/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..195023f43660a5887c58ad2fc985452291cdbd9c --- /dev/null +++ b/universalrobots_ur7e/runnables/physics/mujoco.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "ur5e" +) + +def "ur5e" +{ + over "base_link" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "shoulder_link" + { + over "collisions" + { + over "shoulder" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "upper_arm_link" + { + over "collisions" + { + over "upperarm" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "forearm_link" + { + over "collisions" + { + over "forearm" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "wrist_1_link" + { + over "collisions" + { + over "wrist1" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "wrist_2_link" + { + over "collisions" + { + over "wrist2" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "wrist_3_link" + { + over "collisions" + { + over "wrist3" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "shoulder_pan_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "shoulder_lift_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "elbow_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "wrist_1_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "wrist_2_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "wrist_3_joint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_ur5e_joints_shoulder_pan_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -538609.03126564, -570.7461798775731] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 150 + double mjc:forceRange:min = -150 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_ur5e_joints_shoulder_lift_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -574156.4183620041, -614.9728022251862] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 150 + double mjc:forceRange:min = -150 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_ur5e_joints_elbow_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -586148.46977642, -1959.2005308115652] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 150 + double mjc:forceRange:min = -150 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_ur5e_joints_wrist_1_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -225781.40495537876, -755.1411793910008] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 64 + double mjc:forceRange:min = -64 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_ur5e_joints_wrist_2_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -225781.40495537876, -148.55649150437227] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 28 + double mjc:forceRange:min = -28 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_ur5e_joints_wrist_3_joint" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -57300.41311341526, -19.91028317589043] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 28 + double mjc:forceRange:min = -28 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/universalrobots_ur7e/runnables/physics/newton.usda b/universalrobots_ur7e/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..d3f0333046850f0cc746230c332095b7d6762322 --- /dev/null +++ b/universalrobots_ur7e/runnables/physics/newton.usda @@ -0,0 +1,190 @@ +#usda 1.0 +( + defaultPrim = "ur5e" +) + +over "ur5e" +{ + over "base_link" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "shoulder_link" + { + over "collisions" + { + over "shoulder" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "upper_arm_link" + { + over "collisions" + { + over "upperarm" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "forearm_link" + { + over "collisions" + { + over "forearm" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_1_link" + { + over "collisions" + { + over "wrist1" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_2_link" + { + over "collisions" + { + over "wrist2" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_3_link" + { + over "collisions" + { + over "wrist3" + { + over "mesh_13" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexDecomposition" + } + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] + ) + { + bool newton:selfCollisionEnabled = 0 + } + + over "joints" + { + over "shoulder_pan_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 31.25 + float newton:damping = 1.041667 + float newton:velocityLimit = 180 + } + + over "shoulder_lift_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 260 + float newton:damping = 1.109092 + float newton:velocityLimit = 180 + } + + over "elbow_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 90 + float newton:damping = 1.16 + float newton:velocityLimit = 180 + } + + over "wrist_1_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 13.3333 + float newton:damping = 0.444444 + float newton:velocityLimit = 180 + } + + over "wrist_2_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 5.8333 + float newton:damping = 0.194444 + float newton:velocityLimit = 180 + } + + over "wrist_3_joint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 5.8333 + float newton:damping = 0.194444 + float newton:velocityLimit = 180 + } + } +} + diff --git a/universalrobots_ur7e/runnables/physics/physx.usda b/universalrobots_ur7e/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..fd559bb864222748640f9281dbb5c97ecec7dd96 --- /dev/null +++ b/universalrobots_ur7e/runnables/physics/physx.usda @@ -0,0 +1,250 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +over "ur5e" +{ + over "joints" + { + over "shoulder_pan_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "shoulder_lift_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "elbow_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "wrist_1_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "wrist_2_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "wrist_3_joint" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 64 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "Gripper" + { + over "Robotiq_2F_85" ( + ) + { + bool physxArticulation:articulationEnabled = 0 + + over "finger_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "right_outer_knuckle_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "left_outer_finger_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "right_outer_finger_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "left_inner_finger_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "right_inner_finger_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "left_inner_finger_knuckle_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + + over "right_inner_finger_knuckle_joint" ( + ) + { + float state:angular:physics:position = 0 + float state:angular:physics:velocity = 0 + } + } + } + + over "base_link" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "shoulder_link" + { + over "collisions" + { + over "shoulder" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "upper_arm_link" + { + over "collisions" + { + over "upperarm" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "forearm_link" + { + over "collisions" + { + over "forearm" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_1_link" + { + over "collisions" + { + over "wrist1" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_2_link" + { + over "collisions" + { + over "wrist2" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } + + over "wrist_3_link" + { + over "collisions" + { + over "wrist3" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexDecomposition" + } + } + } + } +} + diff --git a/universalrobots_ur7e/ur7e.usda b/universalrobots_ur7e/ur7e.usda new file mode 100644 index 0000000000000000000000000000000000000000..6011dfc2acac9dfe21cc2482525e216cd8ef1bf5 --- /dev/null +++ b/universalrobots_ur7e/ur7e.usda @@ -0,0 +1,435 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/ur5e" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/ur5e" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/ur5e" + string variantSetName = "PhysX" + } + } + } + dictionary validation = { + string profile = "Robot-Body" + string profile_version = "3.0.0" + dictionary validated_features = { + dictionary "2026-10-20" = { + dictionary "CAP000_Core.Isaac.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.PhysX.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP003_RigidBody.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP004_Multibody.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP003_RigidBody.MuJoCo.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP004_Multibody.RobotMuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP021_RobotCore.Isaac.0-3-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-3-0" + } + dictionary "CAP022_DrivenJoints.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP004_Multibody.RobotMuJoCo.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP023_RobotMaterials.Isaac.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP024_BaseArticulation.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP024_BaseArticulation.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.PhysX.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP024_BaseArticulation.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP025_RosBridge.Ros.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + string "optional requirements" = "['com.nvidia.simready.ROS.001']" + bool passed = 0 + string version = "0-1-0" + } + dictionary "CAP031_SelfContainedPackage.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP033_SimReadyPackage.OpenUSD.0-4-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP031_SelfContainedPackage.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-4-0" + } + dictionary "CAP100_IsaacComposition.Isaac.0-3-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-3-0" + } + dictionary "FET001_MinimalPlaceableVisual.OpenUSD.1-0-1" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "1-0-1" + } + dictionary "FET003_RigidBody.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET003_RigidBody.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET003_RigidBody.PhysX.0-4-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-4-0" + } + dictionary "FET004_Multibody.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['FET003_RigidBody.Newton.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET004_Multibody.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET003_RigidBody.OpenUSD.0-2-0']" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET004_Multibody.PhysX.0-4-0" = { + bool blocking_failure = 0 + string dependencies = "['FET003_RigidBody.PhysX.0-4-0']" + bool passed = 1 + string version = "0-4-0" + } + dictionary "FET004_Multibody.RobotNewton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET006_Materials.MDL.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET006_Materials.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET006_Materials.Openpbr.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET010_DisplayColor.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET022_DrivenJoints.Isaac.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET022_DrivenJoints.PhysX.0-2-0']" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET022_DrivenJoints.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['FET004_Multibody.RobotNewton.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET022_DrivenJoints.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET004_Multibody.OpenUSD.0-2-0']" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET022_DrivenJoints.PhysX.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET004_Multibody.PhysX.0-4-0']" + bool passed = 1 + string version = "0-2-0" + } + } + } + } + } + float3 asset_extents = (0.932046, 0.30846107, 0.23402505) + string asset_license = "BSD-3-Clause" + string asset_name = "ur7e" + string asset_type = "robot" + string author = "UniversalRobots" + string category = "robotic arm" + double mass = 20.993899762630463 + string qcode = "Q40687" + int rigid_body_count = 7 + string source_file = "UniversalRobots/ur7e/ur7e.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "ur5e" + endTimeCode = 0 + metersPerUnit = 1 + startTimeCode = -1 + upAxis = "Z" +) + +def Xform "ur5e" ( + kind = "component" + prepend references = [ + @./payloads/Physics/physics.usda@, + @./payloads/base.usda@ + ] + variants = { + string Gripper = "None" + string MuJoCo = "Disabled" + string Newton = "Disabled" + string PhysX = "Disabled" + string Sensor = "none" + } + variantSets = ["Sensor", "Gripper", "PhysX", "Newton", "MuJoCo"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "base_link" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "shoulder_link" + { + over "collisions" + { + over "shoulder" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "upper_arm_link" + { + over "collisions" + { + over "upperarm" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "forearm_link" + { + over "collisions" + { + over "forearm" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "wrist_1_link" + { + over "collisions" + { + over "wrist1" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "wrist_2_link" + { + over "collisions" + { + over "wrist2" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "wrist_3_link" + { + over "collisions" + { + over "wrist3" + { + over "mesh_13" + { + token visibility = "invisible" + } + } + } + } + variantSet "Sensor" = { + "none" ( + prepend payload = @./payloads/Sensor/none.usda@ + ) { + + } + "sensors" ( + prepend payload = @./payloads/Sensor/sensors.usda@ + ) { + + } + } + variantSet "Gripper" = { + "none" ( + prepend payload = @./payloads/Gripper/none.usda@ + ) { + + } + "robotiq_2f_85" ( + prepend payload = @./payloads/Gripper/robotiq_2f_85.usda@ + ) { + + } + } + variantSet "PhysX" = { + "Disabled" { + + } + "Enabled" ( + prepend payload = @./runnables/physics/physx.usda@ + ) { + + } + } + variantSet "Newton" = { + "Disabled" { + + } + "Enabled" ( + prepend payload = @./runnables/physics/newton.usda@ + ) { + + } + } + variantSet "MuJoCo" = { + "Disabled" { + + } + "Enabled" ( + prepend payload = @./runnables/physics/mujoco.usda@ + ) { + + } + } +} + diff --git a/yahboom_dofbot/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/yahboom_dofbot/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..28d25174c504b077694a388ede08af6461a1853b --- /dev/null +++ b/yahboom_dofbot/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json @@ -0,0 +1,35 @@ +{ + "format_version": "1.0", + "profile": "Package-Candidate", + "profile_version": "1.0.0", + "timestamp": "2026-10-23T23:04:35", + "assets": [ + { + "asset": "dofbot.usda", + "features": [ + { + "FET_031_STANDARD": { + "version": "0.1.0", + "passed": true, + "failing_requirements": [], + "dependencies": [] + } + }, + { + "FET_033_STANDARD": { + "version": "0.1.0", + "passed": true, + "failing_requirements": [], + "dependencies": [ + { + "FET_031_STANDARD": { + "version": "0.1.0" + } + } + ] + } + } + ] + } + ] +} diff --git a/yahboom_dofbot/.metadata/com.nvidia.simready.packaging.bom.json b/yahboom_dofbot/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..59e5efb4d9713493fcf7b9c6ed5faad1715187ee --- /dev/null +++ b/yahboom_dofbot/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,199 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7624, + "hash": { + "sha256-flat-1mb": "a7577552d107bba3e2e88d4ac9ab06b285605519e0862fae0b43938aa7c0c137", + "sha256": "a6b7af64162fcc6026569f04d9a8f12e4ed432f6656a6941803c8a52a87b74ed" + } + }, + { + "relative_path": ".thumbs/256x256/.dofbot.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "3ef6c0d813dce960c5b0247d8544189b95d7843de5d2c39e1493875b572eb6f4", + "sha256": "03d3f7d05c243b5a38afac5f76e59e0861aecd76c4d59c72d456847a6afb05ba" + } + }, + { + "relative_path": ".thumbs/256x256/dofbot.usda.png", + "size": 47377, + "hash": { + "sha256-flat-1mb": "4648d7fcea175eec3bab9e5658c6af67a22029dd4bd9a8ad177f0f499aec5595", + "sha256": "50420dde1aa366e15e996927af2d9132dd89f0b247c323e0b075e77b1df9b265" + } + }, + { + "relative_path": ".thumbs/dofbot.thumb.usd", + "size": 6123, + "hash": { + "sha256-flat-1mb": "eeaf13929607fbdd2bd53f45ca54156e139352cca01343ca2bac8ae3167923b2", + "sha256": "79aab5bb4daeb70b89b35b73c561c37f16487f934610eb20476ed7326fd40df8" + } + }, + { + "relative_path": "dofbot.usda", + "size": 27372323, + "hash": { + "sha256-flat-1mb": "c719fee868cdf122f75975db920ec5469cab1622482d1102449a6341ea8fef11", + "sha256": "0a96566bb3090ab58fbc74c6525d24bcef94fbe9fb925d8681fded4bf232b095", + "sha256-first1m": "a8f3b062b2bd0bca48a96064dd6fc190ca48ffb28778431d94ec1189f8952e6c" + } + }, + { + "relative_path": "materials/mdl/LICENSE.md", + "size": 3220, + "hash": { + "sha256-flat-1mb": "d54635995b7794c6549d0f7c70586e739c1e24cb671ce966e64a8c1a6703a452", + "sha256": "d62e1bd5e34d0ca6f92f0e9f10670ee0cd586695e20f0a838a8f859119589683" + } + }, + { + "relative_path": "materials/mdl/OmniPBR.mdl", + "size": 13969, + "hash": { + "sha256-flat-1mb": "1c58f77068df165a71676dfde42a4b7e4932a82cacacfc7a205ae94fc0332aaf", + "sha256": "c902cc38dc97ff6a89fe94dca94edfb523a30e3749d3708610a136867c3357bf" + } + }, + { + "relative_path": "materials/mdl/OmniPBRBase.mdl", + "size": 17274, + "hash": { + "sha256-flat-1mb": "4b54e7fb8bc92191512851b3acc6fc6fa9863f80d98ffece8f0cb9b99f5f4535", + "sha256": "701f37299b44106842bdbe025de52eedec391e35b038f61c4ed4d25bd98e7db1" + } + }, + { + "relative_path": "materials/mdl/OmniPBR_ClearCoat.mdl", + "size": 27433, + "hash": { + "sha256-flat-1mb": "b1f146a3767a5012936e3d246f2697c3536c2f72b5c5963d3bca0998d02f8931", + "sha256": "085ba661b49042570e24cda09c939e5aebf312ae332af92744a99bd3abbfbee4" + } + }, + { + "relative_path": "materials/mdl/aux_definitions.mdl", + "size": 101769, + "hash": { + "sha256-flat-1mb": "6a5ffcb49e18ade213c3a4d79cf171d66612f9eee045074a0b937dbe4cf01ef6", + "sha256": "ebb81c8977aeb30790399ec7aaa7f2f76cb23afb434f56201ef152aba45a6e81" + } + }, + { + "relative_path": "materials/mdl/core_definitions.mdl", + "size": 201537, + "hash": { + "sha256-flat-1mb": "54bdc55e3899f126b1e271eef4de9c5966b1390fb3143872846f29f0ca68378d", + "sha256": "052aec260e8dfef5d671545fc2fc28c0c478a5b043041c65a833b2a6d81bf950" + } + }, + { + "relative_path": "materials/mdl/support_definitions.mdl", + "size": 147454, + "hash": { + "sha256-flat-1mb": "2b93c649c03f3ef48fb24cc6baba953df1f9dd4e7e860719bc3322fc3e789aba", + "sha256": "bb372f21b6e81d293b99fea6819a8309e2c33c732c7151752b4b33dade177f2e" + } + }, + { + "relative_path": "payloads/Physics/mujoco.usda", + "size": 3444, + "hash": { + "sha256-flat-1mb": "4532f5da08d2aff7ed772badf26c39ea144445d40d9c58aab7227c36dd2f44ad", + "sha256": "043538b9e5901d5670f323d4eb2b8afcf86147feecc4932afe96ccadef81b468" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 27874, + "hash": { + "sha256-flat-1mb": "cb28907b59efb1e45357a9481f380220495212c09da0cd07ea4453aba7d137e8", + "sha256": "069198187a86c9c3f53ca1537e1c00b2471e15bb0dadd6daad6bb844a929bfeb" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 7794, + "hash": { + "sha256-flat-1mb": "7c6ca5839f8e3b14ceeeb87f90064539b3bba48f1afdd0daaeaca22b13149e81", + "sha256": "492b568494f1a0d122f2fa3d6b64ba35dc9a102d40551817caeec06cf3688bde" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 16844, + "hash": { + "sha256-flat-1mb": "88b30d15b873984b72a04c7ce5f1d98b84788b55f0a67f980e80a433ef356bf7", + "sha256": "fa3ab341df0ea6bbea24b5b6db72346212c06bf65773f0895a4bfd1e632a21b9" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 104855194, + "hash": { + "sha256-flat-1mb": "9192d3d2b00de8121630855815d74ef08c692374b1ada8301578ad01780a470f", + "sha256": "9debb6c209a4bdb63a30bc0d52eb527ebd06da654ef24ac20c7a46d86ef05c9b", + "sha256-first1m": "be280610fbed9d61482593ec825cb931a45761195f0875d3a756d0611a1092d3" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 140957, + "hash": { + "sha256-flat-1mb": "bd65da632d807bfa8d58abd354329ae7f8dbb8a55c2da9c116d7c94738fc3215", + "sha256": "90384974556a53d928447ec345d915967ddde097f281de9dbe07874e26fb65ae" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 155747, + "hash": { + "sha256-flat-1mb": "bfd55abb0706a6d9cee47a47a44f32c31a440a9c19289461d2fc3f980c531937", + "sha256": "49ab8f88d8f33a13396b012e6f77e1709c39e9e9190a39b7d93de1dfbaec14c2" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 4267, + "hash": { + "sha256-flat-1mb": "6127f1632c3c0c6fa00507a2b75f5dff82b07d4c3f8c3c1b3e59df75cdc2180b", + "sha256": "8cf4e9f3bebfa25adbb918de150723319a4f0de7bff3e48cf6414c8be035afc2" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 17003, + "hash": { + "sha256-flat-1mb": "c3921a7098c4fa22b87a43b619783703b40539730d0d9c1c8e330c9b63303146", + "sha256": "987db64c88d8dab40977d83fc55903bbc8515d594e10af9632344020ed2b8570" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 10482, + "hash": { + "sha256-flat-1mb": "79ffb23209a31d0ae827d196173f95927a5b7c540afb2734c5fd978c7b39be31", + "sha256": "b2aaf698bec4e008dda19fcca26529f1d5556973c82dc2c19c76341df6b11371" + } + }, + { + "relative_path": "runnables/physics/physics.usda", + "size": 2655, + "hash": { + "sha256-flat-1mb": "c604435ca8f5c83bcdef6295779912305c7b9692db4f9de23f58a415e6503c2c", + "sha256": "111c6b11a5d895c41b20c6d758105747f1bceb796ac2006fd76174c4568dd43f" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 170585, + "hash": { + "sha256-flat-1mb": "c75961d6a1bb692aa0025a113889a147181617ec0073207641e80abccdbc2fe0", + "sha256": "838c218012663cb7ce7ae3a53bca9688c96e84618aa4c0d5ebdfd3e5a4fb90b4" + } + } + ] +} \ No newline at end of file diff --git a/yahboom_dofbot/.metadata/com.nvidia.simready.root_usds.json b/yahboom_dofbot/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..88fa3ef8aa4fb3b5cc5c5efe708f5e63ba9c0032 --- /dev/null +++ b/yahboom_dofbot/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "dofbot.usda" + ] +} diff --git a/yahboom_dofbot/.simready/validation.json b/yahboom_dofbot/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fa9d519c7115ed3d699ca78e5a7960d0f7409003 --- /dev/null +++ b/yahboom_dofbot/.simready/validation.json @@ -0,0 +1,224 @@ +{ + "SimReady_Metadata": { + "validation": { + "profile": "Robot-Body", + "profile_version": "3.0.0", + "validated_features": { + "2026-10-20": { + "CAP000_Core.Isaac.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.PhysX.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP003_RigidBody.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP004_Multibody.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP003_RigidBody.MuJoCo.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP004_Multibody.RobotMuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP021_RobotCore.Isaac.0-3-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-3-0" + }, + "CAP022_DrivenJoints.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP004_Multibody.RobotMuJoCo.0-1-0']", + "optional requirements": "['com.nvidia.simready.MUJOCO.DJ.002']", + "passed": false, + "version": "0-1-0" + }, + "CAP023_RobotMaterials.Isaac.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.PhysX.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP025_RosBridge.Ros.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "optional requirements": "['com.nvidia.simready.ROS.001']", + "passed": false, + "version": "0-1-0" + }, + "CAP031_SelfContainedPackage.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP033_SimReadyPackage.OpenUSD.0-4-0": { + "blocking_failure": false, + "dependencies": "['CAP031_SelfContainedPackage.OpenUSD.0-1-0']", + "passed": true, + "version": "0-4-0" + }, + "CAP100_IsaacComposition.Isaac.0-3-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-3-0" + }, + "FET001_MinimalPlaceableVisual.OpenUSD.1-0-1": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "1-0-1" + }, + "FET003_RigidBody.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET003_RigidBody.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET003_RigidBody.PhysX.0-4-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-4-0" + }, + "FET004_Multibody.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.Newton.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "FET004_Multibody.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.OpenUSD.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET004_Multibody.PhysX.0-4-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.PhysX.0-4-0']", + "passed": true, + "version": "0-4-0" + }, + "FET004_Multibody.RobotNewton.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET006_Materials.MDL.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET006_Materials.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET006_Materials.Openpbr.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET010_DisplayColor.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET022_DrivenJoints.Isaac.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET022_DrivenJoints.PhysX.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET022_DrivenJoints.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.RobotNewton.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "FET022_DrivenJoints.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.OpenUSD.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET022_DrivenJoints.PhysX.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.PhysX.0-4-0']", + "passed": true, + "version": "0-2-0" + } + } + } + } + } +} diff --git a/yahboom_dofbot/.thumbs/256x256/.dofbot.usda.last_generated b/yahboom_dofbot/.thumbs/256x256/.dofbot.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..5b2686094825f45a13a0e83668f3126b97321dbc --- /dev/null +++ b/yahboom_dofbot/.thumbs/256x256/.dofbot.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:50:02 \ No newline at end of file diff --git a/yahboom_dofbot/.thumbs/256x256/dofbot.usda.png b/yahboom_dofbot/.thumbs/256x256/dofbot.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..aac89a0f5ae56fb7aff3a9910b8390fa3434ff70 --- /dev/null +++ b/yahboom_dofbot/.thumbs/256x256/dofbot.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50420dde1aa366e15e996927af2d9132dd89f0b247c323e0b075e77b1df9b265 +size 47377 diff --git a/yahboom_dofbot/.thumbs/dofbot.thumb.usd b/yahboom_dofbot/.thumbs/dofbot.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..7e4e566d4bdde066378fd2c7d80f7becba96de58 Binary files /dev/null and b/yahboom_dofbot/.thumbs/dofbot.thumb.usd differ diff --git a/yahboom_dofbot/com.nvidia.simready.packaging.json b/yahboom_dofbot/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..415da237c54d92a2a126027a72cced08f32ba5fd --- /dev/null +++ b/yahboom_dofbot/com.nvidia.simready.packaging.json @@ -0,0 +1,31 @@ +{ + "format_version": "1.0", + "package_id": "yahboom_dofbot.1.0.0", + "license": "unknown", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "7afc21b67be1973f2ab801b57b98864adee1b1cb51ab12e284abccdd825c71d2" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "abc43e7a82a83fdfd46ad92552e3d18f21f6c587526220bae7ec8d17c67e2977" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "2bfd796605c7898de686443c7361751fbb7c1d0397d6f6b88b7cd67ea055e2ad" + } + } + ], + "content_hash": { + "sha256": "a3fe574f857a53adb723782dff442c3c605b5ffbfc9e61e536b6e2a402175fa4" + }, + "package_hash": { + "sha256": "2aa7d6f375069f9a6b021317e30aad2097fce780386f8878eb7e25ef0b8d5a25" + } +} \ No newline at end of file diff --git a/yahboom_dofbot/dofbot.usda b/yahboom_dofbot/dofbot.usda new file mode 100644 index 0000000000000000000000000000000000000000..ab7db9a39e7931cd8ae169ca00f37fe244471a64 --- /dev/null +++ b/yahboom_dofbot/dofbot.usda @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a96566bb3090ab58fbc74c6525d24bcef94fbe9fb925d8681fded4bf232b095 +size 27372323 diff --git a/yahboom_dofbot/materials/mdl/LICENSE.md b/yahboom_dofbot/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/yahboom_dofbot/materials/mdl/LICENSE.md @@ -0,0 +1,73 @@ +# NVIDIA Omniverse Core Materials Licenses + +## Primary License +This project is primarily licensed under the BSD-3-Clause License. + +``` +Copyright (c) 1986-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + +## Third-Party Licenses + +### Apache License 2.0 +The following components are licensed under the Apache License 2.0: + +#### MaterialX Components +Files in `/source/mdl/materialx` are licensed under Apache License 2.0 per the MaterialX project: +https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/LICENSE + +``` +Copyright Contributors to the MaterialX Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` + +## SPDX License Identifiers +Files in this project use the following SPDX license identifiers: +- `SPDX-License-Identifier: BSD-3-Clause` - Used for NVIDIA-owned code +- `SPDX-License-Identifier: Apache-2.0` - Used for MaterialX components + +## License Attribution +This project contains code from multiple sources: +1. NVIDIA Corporation (BSD-3-Clause) - Primary codebase +2. Academy Software Foundation (Apache-2.0) - MaterialX components + +## License Scope +- All files in the project are licensed under BSD-3-Clause unless explicitly stated otherwise +- Files in `/source/mdl/materialx` are licensed under Apache-2.0 +- All other files are licensed under BSD-3-Clause \ No newline at end of file diff --git a/yahboom_dofbot/materials/mdl/OmniPBR.mdl b/yahboom_dofbot/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/yahboom_dofbot/materials/mdl/OmniPBR.mdl @@ -0,0 +1,396 @@ +/* + * 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 core_definitions::file_texture; +import 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 +); diff --git a/yahboom_dofbot/materials/mdl/OmniPBRBase.mdl b/yahboom_dofbot/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/yahboom_dofbot/materials/mdl/OmniPBRBase.mdl @@ -0,0 +1,470 @@ +/* + * 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 +); diff --git a/yahboom_dofbot/materials/mdl/OmniPBR_ClearCoat.mdl b/yahboom_dofbot/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/yahboom_dofbot/materials/mdl/OmniPBR_ClearCoat.mdl @@ -0,0 +1,711 @@ +/* + * 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 core_definitions::file_texture; +import 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 +); diff --git a/yahboom_dofbot/materials/mdl/aux_definitions.mdl b/yahboom_dofbot/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/yahboom_dofbot/materials/mdl/aux_definitions.mdl @@ -0,0 +1,3464 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + + +mdl 1.4; + +import ::anno::*; +export using ::base import texture_return; + +module +[[ + anno::version( 1, 2, 0), + anno::hidden(), + anno::display_name("NVIDIA auxillary definitions") +]]; + +// Support functions to simplify conversions between vector types with swizzles +// Supported argument types: float2, float3, float4, color, texture_return (as RGB and RGBA) +// Supported return types: float, float2, float3 color + + +export annotation icon(string path); + + +//*********************************************************************************************************************** +// Constructor wrappers + +export float construct_float( + texture_return a [[ + anno::description("Input texture sample container; the mono channel is returned.") + ]]) +[[ + anno::display_name("Float from texture_return"), + anno::description("Constructs a float from the mono channel of a texture_return value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float"), + icon(".icons/constructor.svg"), + anno::ui_order(10000) +]] +{ return a.mono; } + +export color construct_color( + float a [[ + anno::description("Scalar value replicated into all color channels.") + ]]) +[[ + anno::display_name("Color from float"), + anno::description("Constructs a color from a single float value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10001) +]] +{ return color(a); } + +export color construct_color( + float3 a [[ + anno::description("RGB source components.") + ]]) +[[ + anno::display_name("Color from float3"), + anno::description("Constructs a color from a float3 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10002) +]] +{ return color(a); } + +export color construct_color( + float r [[ + anno::description("Red channel value.") + ]], + float g [[ + anno::description("Green channel value.") + ]], + float b [[ + anno::description("Blue channel value.") + ]]) +[[ + anno::display_name("Color from floats"), + anno::description("Constructs a color from explicit red, green, and blue components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10003) +]] +{ return color(r,g,b); } + +export color construct_color( + texture_return a [[ + anno::description("Input texture sample container; the tint (RGB) channels are returned.") + ]]) +[[ + anno::display_name("Color from texture_return"), + anno::description("Constructs a color from the tint (RGB) channels of a texture_return value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10004) +]] +{ return a.tint; } + +export float4 construct_float4( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]], + float z [[ + anno::description("Z component value.") + ]], + float w [[ + anno::description("W component value.") + ]]) +[[ + anno::display_name("Float4 from floats"), + anno::description("Constructs a float4 from explicit x, y, z, and w components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float4"), + icon(".icons/constructor.svg"), + anno::ui_order(10005) +]] +{ return float4(x,y,z,w); } + +export float4 construct_float4( + float3 xyz [[ + anno::description("Source xyz components.") + ]], + float w [[ + anno::description("W component value.") + ]]) +[[ + anno::display_name("Float4 from float3,float"), + anno::description("Constructs a float4 from a float3 xyz value and a separate w component."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float4"), + icon(".icons/constructor.svg"), + anno::ui_order(10006) +]] +{ return float4(xyz.x,xyz.y,xyz.z,w); } + +export float3 construct_float3( + color a [[ + anno::description("Input color whose RGB channels are converted to float3.") + ]]) +[[ + anno::display_name("Float3 from color"), + anno::description("Constructs a float3 from a color value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10007) +]] +{ return float3(a); } + +export float3 construct_float3( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]], + float z [[ + anno::description("Z component value.") + ]]) +[[ + anno::display_name("Float3 from floats"), + anno::description("Constructs a float3 from explicit x, y, and z components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10008) +]] +{ return float3(x,y,z); } + +export float3 construct_float3( + int3 a [[ + anno::description("Input int3 converted component-wise to float3.") + ]]) +[[ + anno::display_name("Float3 from int3"), + anno::description("Constructs a float3 from an int3 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10009) +]] +{ return float3(a); } + +export float2 construct_float2( + float a [[ + anno::description("Scalar value replicated into both components.") + ]]) +[[ + anno::display_name("Float2 from float"), + anno::description("Constructs a float2 from a single float value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10010) +]] +{ return float2(a); } + +export float2 construct_float2( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]]) +[[ + anno::display_name("Float2 from floats"), + anno::description("Constructs a float2 from explicit x and y components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10011) +]] +{ return float2(x,y); } + +export float2 construct_float2( + int2 a [[ + anno::description("Input int2 converted component-wise to float2.") + ]]) +[[ + anno::display_name("Float2 from int2"), + anno::description("Constructs a float2 from an int2 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10012) +]] +{ return float2(a); } + +export int3 construct_int3( + int a [[ + anno::description("Scalar value replicated into all int3 components.") + ]]) +[[ + anno::display_name("Int3 from int"), + anno::description("Constructs an int3 from a single int value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Int3"), + icon(".icons/constructor.svg"), + anno::ui_order(10013) +]] +{ return int3(a); } + +export int2 construct_int2( + int a [[ + anno::description("Scalar value replicated into both int2 components.") + ]]) +[[ + anno::display_name("Int2 from int"), + anno::description("Constructs an int2 from a single int value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Int2"), + icon(".icons/constructor.svg"), + anno::ui_order(10014) +]] +{ return int2(a); } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float return type + +export float x( float2 a) +[[ + anno::display_name("X from float2"), + anno::description("Returns x from float2."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11000) +]] +{ return a.x; } + +export float y( float2 a) +[[ + anno::display_name("Y from float2"), + anno::description("Returns y from float2."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11010) +]] +{ return a.y; } + +export float x( float3 a) +[[ + anno::display_name("X from float3"), + anno::description("Returns x from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11001) +]] +{ return a.x; } + +export float y( float3 a) +[[ + anno::display_name("Y from float3"), + anno::description("Returns y from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11011) +]] +{ return a.y; } + +export float z( float3 a) +[[ + anno::display_name("Z from float3"), + anno::description("Returns z from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Z"), + icon(".icons/component_extract.svg"), + anno::ui_order(11020) +]] +{ return a.z; } + +export float x( float4 a) +[[ + anno::display_name("X from float4"), + anno::description("Returns x from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11002) +]] +{ return a.x; } + +export float y( float4 a) +[[ + anno::display_name("Y from float4"), + anno::description("Returns y from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11012) +]] +{ return a.y; } + +export float z( float4 a) +[[ + anno::display_name("Z from float4"), + anno::description("Returns z from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Z"), + icon(".icons/component_extract.svg"), + anno::ui_order(11021) +]] +{ return a.z; } + +export float w( float4 a) +[[ + anno::display_name("W from float4"), + anno::description("Returns w from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "W"), + icon(".icons/component_extract.svg"), + anno::ui_order(11025) +]] +{ return a.w; } + +export float x( color a) +[[ + anno::display_name("R from color"), + anno::description("Returns r from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "R"), + icon(".icons/component_extract.svg"), + anno::ui_order(11003) +]] +{ return x( float3(a)); } + +export float y( color a) +[[ + anno::display_name("G from color"), + anno::description("Returns g from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "G"), + icon(".icons/component_extract.svg"), + anno::ui_order(11013) +]] +{ return y( float3(a)); } + +export float z( color a) +[[ + anno::display_name("B from color"), + anno::description("Returns b from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "B"), + icon(".icons/component_extract.svg"), + anno::ui_order(11021) +]] +{ return z( float3(a)); } + +export float x( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("R from texture_return"), + anno::description("Returns r from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "R"), + icon(".icons/component_extract.svg"), + anno::ui_order(11004) +]] +{ return float3( a.tint).x; } + +export float y( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("G from texture_return"), + anno::description("Returns g from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "G"), + icon(".icons/component_extract.svg"), + anno::ui_order(11014) +]] +{ return float3( a.tint).y; } + +export float z( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("B from texture_return"), + anno::description("Returns b from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "B"), + icon(".icons/component_extract.svg"), + anno::ui_order(11022) +]] +{ return float3( a.tint).z; } + +export float w( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("Mono from texture_return"), + anno::description("Returns mono/alpha from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "W"), + icon(".icons/component_extract.svg"), + anno::ui_order(11026) +]] +{ return a.mono; } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Conversions of texture_return +// All are hidden +export float4 texture_return_float4( + texture_return a [[ + anno::description("Input texture sample container to unpack as float4 (r, g, b, mono).") + ]]) +[[ + anno::display_name("float4 from texture_return"), + anno::description("Converts texture_return to float4 using tint RGB and mono as W."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float4"), + icon(".icons/component_extract.svg"), + anno::ui_order(10108) +]] +{ return float4(x(a),y(a),z(a),w(a)); } + +export float3 texture_return_float3( + texture_return a [[ + anno::description("Input texture sample container to unpack as float3 (r, g, b).") + ]]) +[[ + anno::display_name("float3 from texture_return"), + anno::description("Converts texture_return to float3 using the tint RGB channels."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + icon(".icons/component_extract.svg"), + anno::ui_order(10109) +]] +{ return float3(x(a),y(a),z(a)); } + +export color texture_return_color( + texture_return a [[ + anno::description("Input texture sample container; tint RGB is returned as color.") + ]]) +[[ + anno::display_name("color from texture_return"), + anno::description("Converts texture_return to color using the tint RGB channels."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Color"), + icon(".icons/component_extract.svg"), + anno::ui_order(10110) +]] +{ return a.tint; } + +export float texture_return_float( + texture_return a [[ + anno::description("Input texture sample container; mono channel is returned.") + ]]) +[[ + anno::display_name("float from texture_return"), + anno::description("Converts texture_return to float using the mono channel."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float"), + icon(".icons/component_extract.svg"), + anno::ui_order(10111) +]] +{ return a.mono; } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float2 return type + +export float2 xy( float2 a) +[[ + anno::display_name("XY from float2"), + anno::description("Returns float2(x,y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11040) +]] +{ return float2( a.x, a.y); } + +export float2 xy( float3 a) +[[ + anno::display_name("XY from float3"), + anno::description("Returns float2(x,y) from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11041) +]] +{ return float2( a.x, a.y); } + +export float2 xy( float4 a) +[[ + anno::display_name("XY from float4"), + anno::description("Returns float2(x,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11044) +]] +{ return float2( a.x, a.y); } + +export float2 xy( color a) +[[ + anno::display_name("XY from color"), + anno::description("Returns float2(x,y) from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11043) +]] +{ return xy( float3(a)); } + +export float2 xy( + texture_return a [[ + anno::description("Input texture sample container; returns the first two tint channels.") + ]]) +[[ + anno::display_name("XY from texture_return"), + anno::description("Returns float2(r, g) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11044) +]] +{ return xy(texture_return_float4(a)); } + + +// The remaining are hidden +export float2 xx( float2 a) +[[ + anno::display_name("XX from float2"), + anno::description("Returns float2(x,x)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11030) +]] +{ return float2( a.x, a.x); } + +export float2 yx( float2 a) +[[ + anno::display_name("YX from float2"), + anno::description("Returns float2(y,x)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11050) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float2 a) +[[ + anno::display_name("YY from float2"), + anno::description("Returns float2(y,y)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11060) +]] +{ return float2( a.y, a.y); } + +export float2 xx( float3 a) +[[ + anno::display_name("XX from float3"), + anno::description("Returns float2(x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11031) +]] +{ return float2( a.x, a.x); } + +export float2 xz( float3 a) +[[ + anno::display_name("XZ from float3"), + anno::description("Returns float2(x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11042) +]] +{ return float2( a.x, a.z); } + +export float2 yz( float3 a) +[[ + anno::display_name("YZ from float3"), + anno::description("Returns float2(y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11043) +]] +{ return float2( a.y, a.z); } + +export float2 yx( float3 a) +[[ + anno::display_name("YX from float3"), + anno::description("Returns float2(y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11051) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float3 a) +[[ + anno::display_name("YY from float3"), + anno::description("Returns float2(y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11061) +]] +{ return float2( a.y, a.y); } + +export float2 zx( float3 a) +[[ + anno::display_name("ZX from float3"), + anno::description("Returns float2(z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11090) +]] +{ return float2( a.z, a.x); } + +export float2 zy( float3 a) +[[ + anno::display_name("ZY from float3"), + anno::description("Returns float2(z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11100) +]] +{ return float2( a.z, a.y); } + +export float2 zz( float3 a) +[[ + anno::display_name("ZZ from float3"), + anno::description("Returns float2(z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11110) +]] +{ return float2( a.z, a.z); } + +export float2 xx( float4 a) +[[ + anno::display_name("XX from float4"), + anno::description("Returns float2(x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11032) +]] +{ return float2( a.x, a.x); } + +export float2 xz( float4 a) +[[ + anno::display_name("XZ from float4"), + anno::description("Returns float2(x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11071) +]] +{ return float2( a.x, a.z); } + +export float2 xw( float4 a) +[[ + anno::display_name("XW from float4"), + anno::description("Returns float2(x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11120) +]] +{ return float2( a.x, a.w); } + +export float2 yx( float4 a) +[[ + anno::display_name("YX from float4"), + anno::description("Returns float2(y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11052) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float4 a) +[[ + anno::display_name("YY from float4"), + anno::description("Returns float2(y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11062) +]] +{ return float2( a.y, a.y); } + +export float2 yz( float4 a) +[[ + anno::display_name("YZ from float4"), + anno::description("Returns float2(y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11081) +]] +{ return float2( a.y, a.z); } + +export float2 yw( float4 a) +[[ + anno::display_name("YW from float4"), + anno::description("Returns float2(y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11125) +]] +{ return float2( a.y, a.w); } + +export float2 zx( float4 a) +[[ + anno::display_name("ZX from float4"), + anno::description("Returns float2(z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11091) +]] +{ return float2( a.z, a.x); } + +export float2 zy( float4 a) +[[ + anno::display_name("ZY from float4"), + anno::description("Returns float2(z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11101) +]] +{ return float2( a.z, a.y); } + +export float2 zz( float4 a) +[[ + anno::display_name("ZZ from float4"), + anno::description("Returns float2(z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11111) +]] +{ return float2( a.z, a.z); } + +export float2 zw( float4 a) +[[ + anno::display_name("ZW from float4"), + anno::description("Returns float2(z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11127) +]] +{ return float2( a.z, a.w); } + +export float2 wx( float4 a) +[[ + anno::display_name("WX from float4"), + anno::description("Returns float2(w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11129) +]] +{ return float2( a.w, a.x); } + +export float2 wy( float4 a) +[[ + anno::display_name("WX from loat4"), + anno::description("Returns float2(w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11131) +]] +{ return float2( a.w, a.y); } + +export float2 wz( float4 a) +[[ + anno::display_name("WZ from float4"), + anno::description("Returns float2(w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11133) +]] +{ return float2( a.w, a.z); } + +export float2 ww( float4 a) +[[ + anno::display_name("WW from float4"), + anno::description("Returns float2(w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11135) +]] +{ return float2( a.w, a.w); } + +export float2 xx( color a) +[[ + anno::display_name("XX from color"), + anno::description("Returns float2(x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11033) +]] +{ return xx( float3(a)); } + +export float2 xz( color a) +[[ + anno::display_name("XZ from color"), + anno::description("Returns float2(x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11072) +]] +{ return xz( float3(a)); } + +export float2 yx( color a) +[[ + anno::display_name("YX from color"), + anno::description("Returns float2(y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11053) +]] +{ return yx( float3(a)); } + +export float2 yy( color a) +[[ + anno::display_name("YY from color"), + anno::description("Returns float2(y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11063) +]] +{ return yy( float3(a)); } + +export float2 yz( color a) +[[ + anno::display_name("YZ from color"), + anno::description("Returns float2(y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11082) +]] +{ return yz( float3(a)); } + +export float2 zx( color a) +[[ + anno::display_name("ZX from color"), + anno::description("Returns float2(z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11092) +]] +{ return zx( float3(a)); } + +export float2 zy( color a) +[[ + anno::display_name("ZY from color"), + anno::description("Returns float2(z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11102) +]] +{ return zy( float3(a)); } + +export float2 zz( color a) +[[ + anno::display_name("ZZ from color"), + anno::description("Returns float2(z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11112) +]] +{ return zz( float3(a)); } + +export float2 xx( texture_return a) +[[ + anno::display_name("XX from color"), + anno::description("Returns float2(x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11034) +]] +{ return xx(texture_return_float4(a)); } + +export float2 xz( texture_return a) +[[ + anno::display_name("XZ from texture_return"), + anno::description("Returns float2(x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11073) +]] +{ return xz(texture_return_float4(a)); } + +export float2 xw( texture_return a) +[[ + anno::display_name("XW from texture_return"), + anno::description("Returns float2(x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11121) +]] +{ return xw(texture_return_float4(a)); } + +export float2 yx( texture_return a) +[[ + anno::display_name("YX from texture_return"), + anno::description("Returns float2(y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11054) +]] +{ return yx(texture_return_float4(a)); } + +export float2 yy( texture_return a) +[[ + anno::display_name("YY from texture_return"), + anno::description("Returns float2(y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11064) +]] +{ return yy(texture_return_float4(a)); } + +export float2 yz( texture_return a) +[[ + anno::display_name("YZ from texture_return"), + anno::description("Returns float2(y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11083) +]] +{ return yz(texture_return_float4(a)); } + +export float2 yw( texture_return a) +[[ + anno::display_name("YW from texture_return"), + anno::description("Returns float2(y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11126) +]] +{ return yw(texture_return_float4(a)); } + +export float2 zx( texture_return a) +[[ + anno::display_name("ZX from texture_return"), + anno::description("Returns float2(z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11093) +]] +{ return zx(texture_return_float4(a)); } + +export float2 zy( texture_return a) +[[ + anno::display_name("ZY from texture_return"), + anno::description("Returns float2(z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11103) +]] +{ return zy(texture_return_float4(a)); } + +export float2 zz( texture_return a) +[[ + anno::display_name("ZZ from texture_return"), + anno::description("Returns float2(z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11113) +]] +{ return zz(texture_return_float4(a)); } + +export float2 zw( texture_return a) +[[ + anno::display_name("ZW from texture_return"), + anno::description("Returns float2(z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11128) +]] +{ return zw(texture_return_float4(a)); } + +export float2 wx( texture_return a) +[[ + anno::display_name("WX from texture_return.WX"), + anno::description("Returns float2(w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11130) +]] +{ return wx(texture_return_float4(a)); } + +export float2 wy( texture_return a) +[[ + anno::display_name("WY from texture_return"), + anno::description("Returns float2(w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11132) +]] +{ return wy(texture_return_float4(a)); } + +export float2 wz( texture_return a) +[[ + anno::display_name("WZ from texture_return"), + anno::description("Returns float2(w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11134) +]] +{ return wz(texture_return_float4(a)); } + +export float2 ww( texture_return a) +[[ + anno::display_name("WW from texture_return"), + anno::description("Returns float2(w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11136) +]] +{ return ww(texture_return_float4(a)); } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float3 return type + +export float3 xyz( float3 a) +[[ + anno::display_name("XYZ from float3"), + anno::description("Returns float3(x,y,z) from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11290) +]] +{ return float3( a.x, a.y, a.z); } + +export float3 xyz( float4 a) +[[ + anno::display_name("XYZ from float4"), + anno::description("Returns float3(x,y,z) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11291) +]] +{ return float3( a.x, a.y, a.z); } + + +// The remaining are hidden +export float3 yyw( float4 a) +[[ + anno::display_name("YYW from float4"), + anno::description("Returns float3(y,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11640) +]] +{ return float3( a.y, a.y, a.w); } + +export float3 xxx( float2 a) +[[ + anno::display_name("XXX from float2"), + anno::description("Returns float3(x,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11200) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float2 a) +[[ + anno::display_name("XXY from float2"), + anno::description("Returns float3(x,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11210) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xyx( float2 a) +[[ + anno::display_name("XYX from float2"), + anno::description("Returns float3(x,y,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11230) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float2 a) +[[ + anno::display_name("XYY from float2"), + anno::description("Returns float3(x,y,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11240) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 yxx( float2 a) +[[ + anno::display_name("YXX from float2"), + anno::description("Returns float3(y,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11250) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float2 a) +[[ + anno::display_name("YXY from float2"), + anno::description("Returns float3(y,x,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11260) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yyx( float2 a) +[[ + anno::display_name("YYX from float2"), + anno::description("Returns float3(y,y,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11270) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float2 a) +[[ + anno::display_name("YYY from float2"), + anno::description("Returns float3(y,y,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11280) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 xxx( float3 a) +[[ + anno::display_name("XXX from float3"), + anno::description("Returns float3(x,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11201) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float3 a) +[[ + anno::display_name("XXY from float3"), + anno::description("Returns float3(x,x,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11211) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xxz( float3 a) +[[ + anno::display_name("XXZ from float3"), + anno::description("Returns float3(x,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11220) +]] +{ return float3( a.x, a.x, a.z); } + +export float3 xyx( float3 a) +[[ + anno::display_name("XYX from float3"), + anno::description("Returns float3(x,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11231) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float3 a) +[[ + anno::display_name("XYY from float3"), + anno::description("Returns float3(x,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11241) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 xzx( float3 a) +[[ + anno::display_name("XZX from float3"), + anno::description("Returns float3(x,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11300) +]] +{ return float3( a.x, a.z, a.x); } + +export float3 xzy( float3 a) +[[ + anno::display_name("XZY from float3"), + anno::description("Returns float3(x,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11310) +]] +{ return float3( a.x, a.z, a.y); } + +export float3 xzz( float3 a) +[[ + anno::display_name("XZZ from float3"), + anno::description("Returns float3(x,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11320) +]] +{ return float3( a.x, a.z, a.z); } + +export float3 yxx( float3 a) +[[ + anno::display_name("YXX from float3"), + anno::description("Returns float3(y,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11251) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float3 a) +[[ + anno::display_name("YXY from float3"), + anno::description("Returns float3(y,x,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11261) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yxz( float3 a) +[[ + anno::display_name("YXZ from float3"), + anno::description("Returns float3(y,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11330) +]] +{ return float3( a.y, a.x, a.z); } + +export float3 yyx( float3 a) +[[ + anno::display_name("YYX from float3"), + anno::description("Returns float3(y,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11271) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float3 a) +[[ + anno::display_name("YYY from float3"), + anno::description("Returns float3(y,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11281) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 yyz( float3 a) +[[ + anno::display_name("YYZ from float3"), + anno::description("Returns float3(y,y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11340) +]] +{ return float3( a.y, a.y, a.z); } + +export float3 yzx( float3 a) +[[ + anno::display_name("YZX from float3"), + anno::description("Returns float3(y,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11350) +]] +{ return float3( a.y, a.z, a.x); } + +export float3 yzy( float3 a) +[[ + anno::display_name("YZY from float3.YZY"), + anno::description("Returns float3(y,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11360) +]] +{ return float3( a.y, a.z, a.y); } + +export float3 yzz( float3 a) +[[ + anno::display_name("YZZ from float3"), + anno::description("Returns float3(y,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11370) +]] +{ return float3( a.y, a.z, a.z); } + +export float3 zxx( float3 a) +[[ + anno::display_name("ZXX from float3"), + anno::description("Returns float3(z,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11380) +]] +{ return float3( a.z, a.x, a.x); } + +export float3 zxy( float3 a) +[[ + anno::display_name("float3.ZXY"), + anno::description("Returns float3(z,x,y)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11390) +]] +{ return float3( a.z, a.x, a.y); } + +export float3 zxz( float3 a) +[[ + anno::display_name("ZXZ from float3"), + anno::description("Returns float3(z,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11400) +]] +{ return float3( a.z, a.x, a.z); } + +export float3 zyx( float3 a) +[[ + anno::display_name("ZYX from float3"), + anno::description("Returns float3(z,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11410) +]] +{ return float3( a.z, a.y, a.x); } + +export float3 zyy( float3 a) +[[ + anno::display_name("ZYY from float3"), + anno::description("Returns float3(z,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11420) +]] +{ return float3( a.z, a.y, a.y); } + +export float3 zyz( float3 a) +[[ + anno::display_name("ZYZ from float3"), + anno::description("Returns float3(z,y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11430) +]] +{ return float3( a.z, a.y, a.z); } + +export float3 zzx( float3 a) +[[ + anno::display_name("ZZX from float3"), + anno::description("Returns float3(z,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11440) +]] +{ return float3( a.z, a.z, a.x); } + +export float3 zzy( float3 a) +[[ + anno::display_name("ZZY from float3"), + anno::description("Returns float3(z,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11450) +]] +{ return float3( a.z, a.z, a.y); } + +export float3 zzz( float3 a) +[[ + anno::display_name("ZZZ from float3"), + anno::description("Returns float3(z,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11460) +]] +{ return float3( a.z, a.z, a.z); } + +export float3 xxx( float4 a) +[[ + anno::display_name("XXX from float4"), + anno::description("Returns float3(x,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11202) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float4 a) +[[ + anno::display_name("XXY from float4"), + anno::description("Returns float3(x,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11212) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xxz( float4 a) +[[ + anno::display_name("XXZ from float4"), + anno::description("Returns float3(x,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11222) +]] +{ return float3( a.x, a.x, a.z); } + +export float3 xxw( float4 a) +[[ + anno::display_name("XXW from float4"), + anno::description("Returns float3(x,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11227) +]] +{ return float3( a.x, a.x, a.w); } + +export float3 xyx( float4 a) +[[ + anno::display_name("XYX from float4"), + anno::description("Returns float3(x,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11232) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float4 a) +[[ + anno::display_name("XYY from float4"), + anno::description("Returns float3(x,y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11242) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 xyw( float4 a) +[[ + anno::display_name("XYW from float4"), + anno::description("Returns float3(x,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11295) +]] +{ return float3( a.x, a.y, a.w); } + +export float3 xzx( float4 a) +[[ + anno::display_name("XZX from float4"), + anno::description("Returns float3(x,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11301) +]] +{ return float3( a.x, a.z, a.x); } + +export float3 xzy( float4 a) +[[ + anno::display_name("XZY from float4"), + anno::description("Returns float3(x,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11311) +]] +{ return float3( a.x, a.z, a.y); } + +export float3 xzz( float4 a) +[[ + anno::display_name("XZZ from float4"), + anno::description("Returns float3(x,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11321) +]] +{ return float3( a.x, a.z, a.z); } + +export float3 xzw( float4 a) +[[ + anno::display_name("XZW from float4"), + anno::description("Returns float3(x,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11600) +]] +{ return float3( a.x, a.z, a.w); } + +export float3 xwx( float4 a) +[[ + anno::display_name("XWX from float4"), + anno::description("Returns float3(x,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11604) +]] +{ return float3( a.x, a.w, a.x); } + +export float3 xwy( float4 a) +[[ + anno::display_name("XWY from float4"), + anno::description("Returns float3(x,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11608) +]] +{ return float3( a.x, a.w, a.y); } + +export float3 xwz( float4 a) +[[ + anno::display_name("XWZ from float4"), + anno::description("Returns float3(x,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11612) +]] +{ return float3( a.x, a.w, a.z); } + +export float3 xww( float4 a) +[[ + anno::display_name("XWW from float4"), + anno::description("Returns float3(x,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11616) +]] +{ return float3( a.x, a.w, a.w); } + +export float3 yxx( float4 a) +[[ + anno::display_name("YXX from float4"), + anno::description("Returns float3(y,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11252) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float4 a) +[[ + anno::display_name("YXY from float4"), + anno::hidden(), + anno::description("Returns float3(y,x,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11262) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yxz( float4 a) +[[ + anno::display_name("YXZ from float4"), + anno::description("Returns float3(y,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11331) +]] +{ return float3( a.y, a.x, a.z); } + +export float3 yxw( float4 a) +[[ + anno::display_name("YXW from float4"), + anno::description("Returns float3(y,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11630) +]] +{ return float3( a.y, a.x, a.w); } + +export float3 yyx( float4 a) +[[ + anno::display_name("YYX from float4"), + anno::description("Returns float3(y,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11272) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float4 a) +[[ + anno::display_name("YYY from float4"), + anno::description("Returns float3(y,y,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11282) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 yyz( float4 a) +[[ + anno::display_name("YYZ from float4"), + anno::description("Returns float3(y,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11341) +]] +{ return float3( a.y, a.y, a.z); } + +export float3 yzx( float4 a) +[[ + anno::display_name("YZX from float4"), + anno::description("Returns float3(y,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11351) +]] +{ return float3( a.y, a.z, a.x); } + +export float3 yzy( float4 a) +[[ + anno::display_name("YZY from float4"), + anno::description("Returns float3(y,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11361) +]] +{ return float3( a.y, a.z, a.y); } + +export float3 yzz( float4 a) +[[ + anno::display_name("YZZ from float4"), + anno::description("Returns float3(y,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11371) +]] +{ return float3( a.y, a.z, a.z); } + +export float3 yzw( float4 a) +[[ + anno::display_name("YZW from float4"), + anno::description("Returns float3(y,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11650) +]] +{ return float3( a.y, a.z, a.w); } + +export float3 ywx( float4 a) +[[ + anno::display_name("YWX from float4"), + anno::description("Returns float3(y,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11653) +]] +{ return float3( a.y, a.w, a.x); } + +export float3 ywy( float4 a) +[[ + anno::display_name("YWY from float4"), + anno::description("Returns float3(y,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11656) +]] +{ return float3( a.y, a.w, a.y); } + +export float3 ywz( float4 a) +[[ + anno::display_name("YWZ from float4"), + anno::description("Returns float3(y,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11658) +]] +{ return float3( a.y, a.w, a.z); } + +export float3 yww( float4 a) +[[ + anno::display_name("YWW from float4"), + anno::description("Returns float3(y,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11661) +]] +{ return float3( a.y, a.w, a.w); } + +export float3 zxx( float4 a) +[[ + anno::display_name("ZXX from float4"), + anno::description("Returns float3(z,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11381) +]] +{ return float3( a.z, a.x, a.x); } + +export float3 zxy( float4 a) +[[ + anno::display_name("ZXY from float4"), + anno::description("Returns float3(z,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11391) +]] +{ return float3( a.z, a.x, a.y); } + +export float3 zxz( float4 a) +[[ + anno::display_name("ZXZ from float4"), + anno::description("Returns float3(z,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11401) +]] +{ return float3( a.z, a.x, a.z); } + +export float3 zxw( float4 a) +[[ + anno::display_name("ZXW from float4"), + anno::description("Returns float3(z,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11671) +]] +{ return float3( a.z, a.x, a.w); } + +export float3 zyx( float4 a) +[[ + anno::display_name("ZYX from float4"), + anno::description("Returns float3(z,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11411) +]] +{ return float3( a.z, a.y, a.x); } + +export float3 zyy( float4 a) +[[ + anno::display_name("ZYY from float4"), + anno::description("Returns float3(z,y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11421) +]] +{ return float3( a.z, a.y, a.y); } + +export float3 zyz( float4 a) +[[ + anno::display_name("ZYZ from float4"), + anno::description("Returns float3(z,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11431) +]] +{ return float3( a.z, a.y, a.z); } + +export float3 zyw( float4 a) +[[ + anno::display_name("ZYW from float4"), + anno::description("Returns float3(z,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11432) +]] +{ return float3( a.z, a.y, a.w); } + +export float3 zzx( float4 a) +[[ + anno::display_name("ZZX from float4"), + anno::description("Returns float3(z,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11441) +]] +{ return float3( a.z, a.z, a.x); } + +export float3 zzy( float4 a) +[[ + anno::display_name("ZZY from float4"), + anno::description("Returns float3(z,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11451) +]] +{ return float3( a.z, a.z, a.y); } + +export float3 zzz( float4 a) +[[ + anno::display_name("ZZZ from float4"), + anno::hidden(), + anno::description("Returns float3(z,z,z) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11461) +]] +{ return float3( a.z, a.z, a.z); } + +export float3 zzw( float4 a) +[[ + anno::display_name("ZZW from float4"), + anno::description("Returns float3(z,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11465) +]] +{ return float3( a.z, a.z, a.w); } + +export float3 zwx( float4 a) +[[ + anno::display_name("ZWX from float4"), + anno::description("Returns float3(z,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11468) +]] +{ return float3( a.z, a.w, a.x); } + +export float3 zwy( float4 a) +[[ + anno::display_name("ZWY from float4"), + anno::description("Returns float3(z,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11471) +]] +{ return float3( a.z, a.w, a.y); } + +export float3 zwz( float4 a) +[[ + anno::display_name("ZWZ from float4"), + anno::description("Returns float3(z,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11475) +]] +{ return float3( a.z, a.w, a.z); } + +export float3 zww( float4 a) +[[ + anno::display_name("ZWW from float4"), + anno::description("Returns float3(z,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11479) +]] +{ return float3( a.z, a.w, a.w); } + +export float3 wxx( float4 a) +[[ + anno::display_name("WXX from float4"), + anno::description("Returns float3(w,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11483) +]] +{ return float3( a.w, a.x, a.x); } + +export float3 wxy( float4 a) +[[ + anno::display_name("WXY from float4"), + anno::description("Returns float3(w,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11487) +]] +{ return float3( a.w, a.x, a.y); } + +export float3 wxz( float4 a) +[[ + anno::display_name("WXZ from float4"), + anno::description("Returns float3(w,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11490) +]] +{ return float3( a.w, a.x, a.z); } + +export float3 wxw( float4 a) +[[ + anno::display_name("WXW from float4"), + anno::description("Returns float3(w,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11496) +]] +{ return float3( a.w, a.x, a.w); } + +export float3 wyx( float4 a) +[[ + anno::display_name("WYX from float4"), + anno::description("Returns float3(w,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11503) +]] +{ return float3( a.w, a.y, a.x); } + +export float3 wyy( float4 a) +[[ + anno::display_name("WYY from float4"), + anno::description("Returns float3(w,y,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11507) +]] +{ return float3( a.w, a.y, a.y); } + +export float3 wyz( float4 a) +[[ + anno::display_name("WYZ from float4"), + anno::description("Returns float3(w,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11510) +]] +{ return float3( a.w, a.y, a.z); } + +export float3 wyw( float4 a) +[[ + anno::display_name("WYW from float4"), + anno::description("Returns float3(w,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11514) +]] +{ return float3( a.w, a.y, a.w); } + +export float3 wzx( float4 a) +[[ + anno::display_name("WZX from float4"), + anno::description("Returns float3(w,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11518) +]] +{ return float3( a.w, a.z, a.x); } + +export float3 wzy( float4 a) +[[ + anno::display_name("WZY from float4"), + anno::description("Returns float3(w,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11521) +]] +{ return float3( a.w, a.z, a.y); } + +export float3 wzz( float4 a) +[[ + anno::display_name("WZZ from float4"), + anno::description("Returns float3(w,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11524) +]] +{ return float3( a.w, a.z, a.z); } + +export float3 wzw( float4 a) +[[ + anno::display_name("WZW from float4"), + anno::description("Returns float3(w,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11529) +]] +{ return float3( a.w, a.z, a.w); } + +export float3 wwx( float4 a) +[[ + anno::display_name("WWX from float4"), + anno::description("Returns float3(w,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11533) +]] +{ return float3( a.w, a.w, a.x); } + +export float3 wwy( float4 a) +[[ + anno::display_name("WWY from float4"), + anno::hidden(), + anno::description("Returns float3(w,w,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11537) +]] +{ return float3( a.w, a.w, a.y); } + +export float3 wwz( float4 a) +[[ + anno::display_name("WWZ from float4"), + anno::description("Returns float3(w,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11541) +]] +{ return float3( a.w, a.w, a.z); } + +export float3 www( float4 a) +[[ + anno::display_name("WWW from float4"), + anno::description("Returns float3(w,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11544) +]] +{ return float3( a.w, a.w, a.w); } + +export float3 xxx( color a) +[[ + anno::display_name("XXX from color"), + anno::description("Returns float3(x,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11203) +]] +{ return xxx( float3(a)); } + +export float3 xxy( color a) +[[ + anno::display_name("XXY from color"), + anno::description("Returns float3(x,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11213) +]] +{ return xxy( float3(a)); } + +export float3 xxz( color a) +[[ + anno::display_name("XXZ from color"), + anno::description("Returns float3(x,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11223) +]] +{ return xxz( float3(a)); } + +export float3 xyx( color a) +[[ + anno::display_name("XYX from color"), + anno::description("Returns float3(x,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11233) +]] +{ return xyx( float3(a)); } + +export float3 xyy( color a) +[[ + anno::display_name("XYY from color"), + anno::description("Returns float3(x,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11243) +]] +{ return xyy( float3(a)); } + +export float3 xyz( color a) +[[ + anno::display_name("XYZ from color"), + anno::description("Returns float3(x,y,z) from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11292) +]] +{ return xyz( float3(a)); } + +export float3 xzx( color a) +[[ + anno::display_name("XZX from color"), + anno::description("Returns float3(x,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11302) +]] +{ return xzx( float3(a)); } + +export float3 xzy( color a) +[[ + anno::display_name("XZY from color"), + anno::description("Returns float3(x,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11312) +]] +{ return xzy( float3(a)); } + +export float3 xzz( color a) +[[ + anno::display_name("XZZ from color"), + anno::description("Returns float3(x,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11323) +]] +{ return xzz( float3(a)); } + +export float3 yxx( color a) +[[ + anno::display_name("YXX from color"), + anno::description("Returns float3(y,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11253) +]] +{ return yxx( float3(a)); } + +export float3 yxy( color a) +[[ + anno::display_name("YXY from color"), + anno::description("Returns float3(y,x,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11263) +]] +{ return yxy( float3(a)); } + +export float3 yxz( color a) +[[ + anno::display_name("YXZ from color"), + anno::description("Returns float3(y,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11332) +]] +{ return yxz( float3(a)); } + +export float3 yyx( color a) +[[ + anno::display_name("YYX from color"), + anno::description("Returns float3(y,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11273) +]] +{ return yyx( float3(a)); } + +export float3 yyy( color a) +[[ + anno::display_name("YYY from color"), + anno::description("Returns float3(y,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11283) +]] +{ return yyy( float3(a)); } + +export float3 yyz( color a) +[[ + anno::display_name("YYZ from color"), + anno::description("Returns float3(y,y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11342) +]] +{ return yyz( float3(a)); } + +export float3 yzx( color a) +[[ + anno::display_name("YZX from color"), + anno::description("Returns float3(y,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11352) +]] +{ return yzx( float3(a)); } + +export float3 yzy( color a) +[[ + anno::display_name("YZY from color"), + anno::description("Returns float3(y,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11362) +]] +{ return yzy( float3(a)); } + +export float3 yzz( color a) +[[ + anno::display_name("YZZ from color"), + anno::description("Returns float3(y,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11372) +]] +{ return yzz( float3(a)); } + +export float3 zxx( color a) +[[ + anno::display_name("ZXX from color"), + anno::description("Returns float3(z,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11382) +]] +{ return zxx( float3(a)); } + +export float3 zxy( color a) +[[ + anno::display_name("ZXY from color"), + anno::description("Returns float3(z,x,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11392) +]] +{ return zxy( float3(a)); } + +export float3 zxz( color a) +[[ + anno::display_name("ZXZ from color"), + anno::description("Returns float3(z,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11402) +]] +{ return zxz( float3(a)); } + +export float3 zyx( color a) +[[ + anno::display_name("ZYX from color"), + anno::description("Returns float3(z,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11412) +]] +{ return zyx( float3(a)); } + +export float3 zyy( color a) +[[ + anno::display_name("ZYY from color"), + anno::description("Returns float3(z,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11422) +]] +{ return zyy( float3(a)); } + +export float3 zyz( color a) +[[ + anno::display_name("ZYZ from color"), + anno::description("Returns float3(z,y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11432) +]] +{ return zyz( float3(a)); } + +export float3 zzx( color a) +[[ + anno::display_name("ZZX from color"), + anno::description("Returns float3(z,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11442) +]] +{ return zzx( float3(a)); } + +export float3 zzy( color a) +[[ + anno::display_name("ZZY from color"), + anno::description("Returns float3(z,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11452) +]] +{ return zzy( float3(a)); } + +export float3 zzz( color a) +[[ + anno::display_name("ZZZ from color"), + anno::description("Returns float3(z,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11462) +]] +{ return zzz( float3(a)); } + +export float3 xxx( texture_return a) +[[ + anno::display_name("XXX from texture_return"), + anno::description("Returns float3(x,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11204) +]] +{ return xxx(texture_return_float4(a)); } + +export float3 xxy( texture_return a) +[[ + anno::display_name("XXY from texture_return"), + anno::description("Returns float3(x,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11214) +]] +{ return xxy(texture_return_float4(a)); } + +export float3 xxz( texture_return a) +[[ + anno::display_name("XXZ from texture_return"), + anno::description("Returns float3(x,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11224) +]] +{ return xxz(texture_return_float4(a)); } + +export float3 xxw( texture_return a) +[[ + anno::display_name("XXW from texture_return"), + anno::description("Returns float3(x,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11229) +]] +{ return xxw(texture_return_float4(a)); } + +export float3 xyx( texture_return a) +[[ + anno::display_name("XYX from texture_return"), + anno::description("Returns float3(x,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11234) +]] +{ return xyx(texture_return_float4(a)); } + +export float3 xyy( texture_return a) +[[ + anno::display_name("XYY from texture_return"), + anno::description("Returns float3(x,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11244) +]] +{ return xyy(texture_return_float4(a)); } + +export float3 xyz( texture_return a) +[[ + anno::display_name("XYZ from texture_return"), + anno::description("Returns float3(x,y,z) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11293) +]] +{ return xyz(texture_return_float4(a)); } + +export float3 xyw( texture_return a) +[[ + anno::display_name("XYW from texture_return"), + anno::description("Returns float3(x,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11296) +]] +{ return xyw(texture_return_float4(a)); } + +export float3 xzx( texture_return a) +[[ + anno::display_name("XZX from texture_return"), + anno::description("Returns float3(x,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11303) +]] +{ return xzx(texture_return_float4(a)); } + +export float3 xzy( texture_return a) +[[ + anno::display_name("XZY from texture_return"), + anno::description("Returns float3(x,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(1131) +]] +{ return xzy(texture_return_float4(a)); } + +export float3 xzz( texture_return a) +[[ + anno::display_name("XZZ from texture_return"), + anno::description("Returns float3(x,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11321) +]] +{ return xzz(texture_return_float4(a)); } + +export float3 xzw( texture_return a) +[[ + anno::display_name("XZW from texture_return"), + anno::description("Returns float3(x,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11601) +]] +{ return xzw(texture_return_float4(a)); } + +export float3 xwx( texture_return a) +[[ + anno::display_name("XWX from texture_return"), + anno::description("Returns float3(x,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11605) +]] +{ return xwx(texture_return_float4(a)); } + +export float3 xwy( texture_return a) +[[ + anno::display_name("XWY from texture_return"), + anno::description("Returns float3(x,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11609) +]] +{ return xwy(texture_return_float4(a)); } + +export float3 xwz( texture_return a) +[[ + anno::display_name("XWZ from texture_return"), + anno::description("Returns float3(x,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11613) +]] +{ return xwz(texture_return_float4(a)); } + +export float3 xww( texture_return a) +[[ + anno::display_name("XWW from texture_return"), + anno::description("Returns float3(x,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11617) +]] +{ return xww(texture_return_float4(a)); } + +export float3 yxx( texture_return a) +[[ + anno::display_name("YXX from texture_return"), + anno::description("Returns float3(y,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11254) +]] +{ return yxx(texture_return_float4(a)); } + +export float3 yxy( texture_return a) +[[ + anno::display_name("YXY from texture_return"), + anno::description("Returns float3(y,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11264) +]] +{ return yxy(texture_return_float4(a)); } + +export float3 yxz( texture_return a) +[[ + anno::display_name("YXZ from texture_return"), + anno::description("Returns float3(y,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11333) +]] +{ return yxz(texture_return_float4(a)); } + +export float3 yxw( texture_return a) +[[ + anno::display_name("YXW from texture_return"), + anno::description("Returns float3(y,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11631) +]] +{ return yxw(texture_return_float4(a)); } + +export float3 yyx( texture_return a) +[[ + anno::display_name("YYX from texture_return"), + anno::description("Returns float3(y,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11274) +]] +{ return yyx(texture_return_float4(a)); } + +export float3 yyy( texture_return a) +[[ + anno::display_name("YYY from texture_return"), + anno::description("Returns float3(y,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11284) +]] +{ return yyy(texture_return_float4(a)); } + +export float3 yyz( texture_return a) +[[ + anno::display_name("YYZ from texture_return"), + anno::description("Returns float3(y,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11344) +]] +{ return yyz(texture_return_float4(a)); } + +export float3 yyw( texture_return a) +[[ + anno::display_name("YYW from texture_return"), + anno::description("Returns float3(y,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11641) +]] +{ return yyw(texture_return_float4(a)); } + +export float3 yzx( texture_return a) +[[ + anno::display_name("YZX from texture_return"), + anno::description("Returns float3(y,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11354) +]] +{ return yzx(texture_return_float4(a)); } + +export float3 yzy( texture_return a) +[[ + anno::display_name("YZY from texture_return"), + anno::description("Returns float3(y,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11363) +]] +{ return yzy(texture_return_float4(a)); } + +export float3 yzz( texture_return a) +[[ + anno::display_name("YZZ from texture_return"), + anno::description("Returns float3(y,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11373) +]] +{ return yzz(texture_return_float4(a)); } + +export float3 yzw( texture_return a) +[[ + anno::display_name("YZW from texture_return"), + anno::description("Returns float3(y,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11651) +]] +{ return yzw(texture_return_float4(a)); } + +export float3 ywx( texture_return a) +[[ + anno::display_name("YWX from texture_return"), + anno::description("Returns float3(y,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11654) +]] +{ return ywx(texture_return_float4(a)); } + +export float3 ywy( texture_return a) +[[ + anno::display_name("YWY from texture_return"), + anno::description("Returns float3(y,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11657) +]] +{ return ywy(texture_return_float4(a)); } + +export float3 ywz( texture_return a) +[[ + anno::display_name("YXZ from texture_return"), + anno::description("Returns float3(y,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11659) +]] +{ return ywz(texture_return_float4(a)); } + +export float3 yww( texture_return a) +[[ + anno::display_name("YWW from texture_return"), + anno::description("Returns float3(y,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11662) +]] +{ return yww(texture_return_float4(a)); } + +export float3 zxx( texture_return a) +[[ + anno::display_name("ZXX from texture_return"), + anno::description("Returns float3(z,x,x) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11383) +]] +{ return zxx(texture_return_float4(a)); } + +export float3 zxy( texture_return a) +[[ + anno::display_name("ZXY from texture_return"), + anno::description("Returns float3(z,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11394) +]] +{ return zxy(texture_return_float4(a)); } + +export float3 zxz( texture_return a) +[[ + anno::display_name("ZXZ from texture_return"), + anno::description("Returns float3(z,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11403) +]] +{ return zxz(texture_return_float4(a)); } + +export float3 zxw( texture_return a) +[[ + anno::display_name("ZXW from texture_return"), + anno::description("Returns float3(z,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11672) +]] +{ return zxw(texture_return_float4(a)); } + +export float3 zyx( texture_return a) +[[ + anno::display_name("ZYX from texture_return"), + anno::description("Returns float3(z,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11413) +]] +{ return zyx(texture_return_float4(a)); } + +export float3 zyy( texture_return a) +[[ + anno::display_name("ZYY from texture_return"), + anno::description("Returns float3(z,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11423) +]] +{ return zyy(texture_return_float4(a)); } + +export float3 zyz( texture_return a) +[[ + anno::display_name("ZYZ from texture_return"), + anno::description("Returns float3(z,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11433) +]] +{ return zyz(texture_return_float4(a)); } + +export float3 zyw( texture_return a) +[[ + anno::display_name("ZYW from texture_return"), + anno::description("Returns float3(z,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11433) +]] +{ return zyw(texture_return_float4(a)); } + +export float3 zzx( texture_return a) +[[ + anno::display_name("ZZX from texture_return"), + anno::description("Returns float3(z,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11443) +]] +{ return zzx(texture_return_float4(a)); } + +export float3 zzy( texture_return a) +[[ + anno::display_name("ZZY from texture_return"), + anno::description("Returns float3(z,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11453) +]] +{ return zzy(texture_return_float4(a)); } + +export float3 zzz( texture_return a) +[[ + anno::display_name("ZZZ from texture_return"), + anno::description("Returns float3(z,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11463) +]] +{ return zzz(texture_return_float4(a)); } + +export float3 zzw( texture_return a) +[[ + anno::display_name("ZZW from texture_return"), + anno::description("Returns float3(z,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11466) +]] +{ return zzw(texture_return_float4(a)); } + +export float3 zwx( texture_return a) +[[ + anno::display_name("ZWX from texture_return"), + anno::description("Returns float3(z,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11468) +]] +{ return zwx(texture_return_float4(a)); } + +export float3 zwy( texture_return a) +[[ + anno::display_name("ZWY from texture_return"), + anno::description("Returns float3(z,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11472) +]] +{ return zwy(texture_return_float4(a)); } + +export float3 zwz( texture_return a) +[[ + anno::display_name("ZWZ from texture_return"), + anno::description("Returns float3(z,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11476) +]] +{ return zwz(texture_return_float4(a)); } + +export float3 zww( texture_return a) +[[ + anno::display_name("texture_return.ZWW"), + anno::description("Returns float3(z,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11480) +]] +{ return zww(texture_return_float4(a)); } + +export float3 wxx( texture_return a) +[[ + anno::display_name("WXX from texture_return"), + anno::description("Returns float3(w,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11484) +]] +{ return wxx(texture_return_float4(a)); } + +export float3 wxy( texture_return a) +[[ + anno::display_name("WXY from texture_return"), + anno::description("Returns float3(w,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11488) +]] +{ return wxy(texture_return_float4(a)); } + +export float3 wxz( texture_return a) +[[ + anno::display_name("WXZ from texture_return"), + anno::description("Returns float3(w,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11493) +]] +{ return wxz(texture_return_float4(a)); } + +export float3 wxw( texture_return a) +[[ + anno::display_name("WXW from texture_return"), + anno::description("Returns float3(w,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11500) +]] +{ return wxw(texture_return_float4(a)); } + +export float3 wyx( texture_return a) +[[ + anno::display_name("WYX from texture_return"), + anno::description("Returns float3(w,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(1150) +]] +{ return wyx(texture_return_float4(a)); } + +export float3 wyy( texture_return a) +[[ + anno::display_name("WYY from texture_return"), + anno::description("Returns float3(w,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11508) +]] +{ return wyy(texture_return_float4(a)); } + +export float3 wyz( texture_return a) +[[ + anno::display_name("WYZ from texture_return"), + anno::description("Returns float3(w,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11511) +]] +{ return wyz(texture_return_float4(a)); } + +export float3 wyw( texture_return a) +[[ + anno::display_name("WYW from texture_return"), + anno::description("Returns float3(w,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11515) +]] +{ return wyw(texture_return_float4(a)); } + +export float3 wzx( texture_return a) +[[ + anno::display_name("WZX from texture_return"), + anno::description("Returns float3(w,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11519) +]] +{ return wzx(texture_return_float4(a)); } + +export float3 wzy( texture_return a) +[[ + anno::display_name("WZY from texture_return"), + anno::description("Returns float3(w,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11522) +]] +{ return wzy(texture_return_float4(a)); } + +export float3 wzz( texture_return a) +[[ + anno::display_name("WZZ from texture_return"), + anno::description("Returns float3(w,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11525) +]] +{ return wzz(texture_return_float4(a)); } + +export float3 wzw( texture_return a) +[[ + anno::display_name("WZW from texture_return"), + anno::description("Returns float3(w,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11530) +]] +{ return wzw(texture_return_float4(a)); } + +export float3 wwx( texture_return a) +[[ + anno::display_name("WWWX from texture_return"), + anno::description("Returns float3(w,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11533) +]] +{ return wwx(texture_return_float4(a)); } + +export float3 wwy( texture_return a) +[[ + anno::display_name("WWY from texture_return"), + anno::description("Returns float3(w,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11538) +]] +{ return wwy(texture_return_float4(a)); } + +export float3 wwz( texture_return a) +[[ + anno::display_name("WWZ from texture_return"), + anno::description("Returns float3(w,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11541) +]] +{ return wwz(texture_return_float4(a)); } + +export float3 www( texture_return a) +[[ + anno::display_name("WWW from texture_return"), + anno::description("Returns float3(w,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11545) +]] +{ return www(texture_return_float4(a)); } diff --git a/yahboom_dofbot/materials/mdl/core_definitions.mdl b/yahboom_dofbot/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/yahboom_dofbot/materials/mdl/core_definitions.mdl @@ -0,0 +1,5806 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + + +// The "//group ... //endgroup" comments are used during the +// procedural creation of this module's documentation. +mdl 1.8; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::limits::*; +import ::base::*; +import ::tex::*; +import ::anno::*; +export using ::base import texture_return; +export using ::base import mono_mode; +export using ::base import color_layer_mode; +import support_definitions::*; +module [[ + anno::version( 2, 2, 0), + anno::display_name("NVIDIA core definitions") +]]; + +export annotation icon(string path); + +const string COPYRIGHT = "Copyright 2023 NVIDIA Corporation. All rights reserved."; + +//some local functions, dont document + +// https://www.shadertoy.com/view/4djSRW +float2 hash22(float2 p) +{ + float3 p3 = math::frac(float3(p.x, p.y, p.x) * float3(0.1031, 0.1030, 0.0973)); + p3 += math::dot(p3, float3(p3.y, p3.z, p3.x) + 33.33); + return math::frac((float2(p3.x, p3.x) + float2(p3.y, p3.z)) * float2(p3.z, p3.y)); +} + +// Christophe Schlick. “Fast Alternatives to Perlin’s Bias and Gain Functions”. +// In Graphics Gems IV, Morgan Kaufmann, 1994, pages 401–403. +// https://dept-info.labri.fr/~schlick/DOC/gem2.html +float schlick_gain(float x, float r) +{ + float rr = math::clamp(r, 0.001, 0.999); // to avoid glitch + float a = (1.0 / rr - 2.0) * (1.0 - 2.0 * x); + return (x < 0.5) ? x / (a + 1.0) : (a - x) / (a - 1.0); +} + +// blend two normals, similar to +// http://blog.selfshadow.com/publications/blending-in-detail/ +export float3 blend_normals( + float3 base_normal = state::normal() + [[ + anno::description("The base normal") + ]], + float base_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the base normal using a linear blend between state::normal and \"base_normal\""), + anno::soft_range(0.0,1.0) + ]], + float3 detail_normal = state::normal() + [[ + anno::description("The detail normal") + ]], + float detail_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\""), + anno::soft_range(0.0,1.0) + ]] +) +[[ + anno::description("Blend two normals or apply a detail normal map"), + anno::display_name("Blend normals"), + anno::thumbnail(".thumbs/blend_normals.png"), + anno::in_group("Texturing", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(33), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT)]] +{ + return base::blend_normals(base_normal,base_normal_weight,detail_normal,detail_normal_weight); +} +// blend 3 normals, similar to +// http://blog.selfshadow.com/publications/blending-in-detail/ +//TODO: make public? +float3 blend_3_normals( + float3 base_normal = state::normal() + [[ + anno::description("The base normal") + ]], + float base_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the base normal using a linear blend between state::normal and \"base_normal\"") + ]], + float3 detail_normal = state::normal() + [[ + anno::description("The detail normal") + ]], + float detail_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\"") + ]], + float3 detail_normal2 = state::normal() + [[ + anno::description("The detail normal2") + ]], + float detail_normal_weight2 = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\"") + ]] +) +[[ + anno::description("Blend three normals for sticker-like situations where a detail normal map is applied to a base normal map"), + anno::noinline() +]] +{ + float3 tu = state::texture_tangent_u(0); + float3 tv = state::texture_tangent_v(0); + float3 n = state::normal(); + + float w1 = math::saturate(base_normal_weight); + float w2 = math::saturate(detail_normal_weight); + float w3 = math::saturate(detail_normal_weight2); + + float3 n1_t = math::normalize( + float3(math::dot(tu, base_normal) * w1, + math::dot(tv, base_normal) * w1, + math::dot(n, base_normal) * w1 + 1.0f - w1)); + float3 n2_t = math::normalize( + float3(math::dot(tu, detail_normal) * w2, + math::dot(tv, detail_normal) * w2, + math::dot(n, detail_normal) * w2 + 1.0f - w2)); + float3 n3_t = math::normalize( + float3(math::dot(tu, detail_normal2) * w3, + math::dot(tv, detail_normal2) * w3, + math::dot(n, detail_normal2) * w3 + 1.0f - w3)); + + n1_t.z += 1.0f; + n2_t.x = -n2_t.x; + n2_t.y = -n2_t.y; + + float3 n12_t = n1_t * math::dot(n1_t, n2_t) / n1_t.z - n2_t; + + n12_t.z+= 1.0f; + n3_t.x = -n3_t.x; + n3_t.y = -n3_t.y; + float3 n_t = n12_t * math::dot(n12_t, n3_t) / n12_t.z - n3_t; + + return math::normalize( + tu * n_t.x + + tv * n_t.y + + n * n_t.z); +} + +// blend 3 normals by blending the gradients +// Morten S. Mikkelsen, Surface Gradient–Based Bump Mapping Framework, Journal of +// Computer Graphics Techniques (JCGT), vol. 9, no. 3, 60–90, 2020 +// http://jcgt.org/published/0009/03/04/ +float3 gradient_blend_3_normals( + float3 normal1 = state::normal(), + float normal1_weight = 1.0, + float3 normal2 = state::normal(), + float normal2_weight = 1.0, + float3 normal3 = state::normal(), + float normal3_weight = 1.0 +) +{ + float w1 = math::saturate(normal1_weight); + float w2 = math::saturate(normal2_weight); + float w3 = math::saturate(normal3_weight); + + // normal to gradient + float3 n = state::normal(); + float d1 = math::dot(n, normal1); + float d2 = math::dot(n, normal2); + float d3 = math::dot(n, normal3); + float3 g1 = (d1 * n - normal1) / math::max(limits::FLOAT_MIN, math::abs(d1)); + float3 g2 = (d2 * n - normal2) / math::max(limits::FLOAT_MIN, math::abs(d2)); + float3 g3 = (d3 * n - normal3) / math::max(limits::FLOAT_MIN, math::abs(d3)); + + // blend + float3 gg = w1 * g1 + w2 * g2 + w3 * g3; + + // gradient to normal + return math::normalize(n - gg); +} + +struct complex_ior +{ + color n; //refractive index + color k; //extinction coefficient +}; + + +//[Gulbrandsen2014] Ole Gulbrandsen, 2014. Artist friendly metallic fresnel. +complex_ior artistic_metal_to_complex_ior( + color reflectivity, + color edge_tint) +{ + float epsilon = 1.e-2; + color r = math::lerp(color(epsilon), color(1.0 - epsilon), reflectivity); + color g = edge_tint; + + color r_sqrt = math::sqrt(r); + color n_min = (1.0f - r) / (1.0f + r); + color n_max = (1.0f + r_sqrt) / (1.0f - r_sqrt); + + color n = math::lerp(n_max, n_min, g); + + color k2 = ((n + 1.0f) * (n + 1.0f) * r - (n - 1.0f) * (n - 1.0f)) / (1.0f - r); + k2 = math::max(k2, 0.0f); + color k = math::sqrt(k2); + + return complex_ior(n, k); +} + + + +float3x3 axis_rotation_matrix(float3 a, float r) +{ + float[2] sc = math::sincos(r); + float s = sc[0]; + float c = sc[1]; + float omc = 1.0 - c; + return float3x3( + a.x * a.x * omc + c, a.x * a.y * omc - a.x * s, a.x * a.z * omc + a.y * s, + a.y * a.x * omc + a.z * s, a.y * a.y * omc + c, a.y * a.z * omc - a.x * s, + a.z * a.x * omc - a.y * s, a.z * a.y * omc + a.x * s, a.z * a.z * omc + c + ); +} +float3 transform_rotate(float3 p, float3 r) +{ + // Euler rotation matrix xyz order to stay compatible with ::base + float3 s = math::sin(r); + float3 c = math::cos(r); + float3x3 rotate = + float3x3( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , + c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , + -s.y , s.x*c.y , c.x*c.y ); + return p*rotate; + +} +float3 transform_rotate_inv(float3 p, float3 r) +{ + // Euler rotation matrix xyz order to stay compatible with ::base + float3 s = math::sin(r); + float3 c = math::cos(r); + float3x3 rotate = + float3x3( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , + c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , + -s.y , s.x*c.y , c.x*c.y ); + return rotate*p; + +} + +//group Enumerations + +export enum material_type +[[ + anno::display_name("User interface group"), + anno::description("User interface grouping hint for materials"), + anno::hidden() +]] +{ + simple_material + [[ anno::description("Simple material") ]], + complex_material + [[ anno::description("Complex material") ]], + combiner_material + [[ anno::description("Combiner material") ]], + modifier_material + [[ anno::description("Material modifier") ]] +}; + +export enum emission_type +[[ + anno::display_name("Emission mode"), + anno::description("Emission mode definition for light sources"), + anno::hidden() +]] +{ + lumen_m2 + [[ anno::description("lumen/m2") ]], + lumen + [[ anno::description("lumen") ]], + candela + [[ anno::description("candela") ]], + nit + [[ anno::description("nit (candela/m2)") ]] +}; + +export enum cell_type +[[ + anno::display_name("Worley noise cell type"), + anno::description("Behavior of the Worley noise cell"), + anno::hidden() +]] +{ + simple_cells = 0 + [[ anno::description("Simple cells") ]], + crystal_cells = 1 + [[ anno::description("Crystal cells") ]], + bordered_cells = 2 + [[ anno::description("Bordered cells") ]] +}; + +export enum cell_base +[[ + anno::display_name("Worley noise cell shape"), + anno::description("Shape of the Worley noise cell"), + anno::hidden() +]] +{ + circular_cells = 0 + [[ anno::description("Circle base") ]], + diamond_cells = 1 + [[ anno::description("Diamond base") ]] +}; + +export enum displacement_vector_space +[[ + anno::display_name("Displacement mode"), + anno::description("Displacement Mode"), + anno::hidden() +]] +{ + // displacement_height = 0 // reserve this for now + // [[ anno::display_name("Height") ]], + + displacement_vector_tangent_space = 1 + [[ anno::display_name("Vector, Tangent Space") ]], + + displacement_vector_object_space = 2 + [[ anno::display_name("Vector, Object Space") ]], + + displacement_vector_world_space = 3 + [[ anno::display_name("Vector, World Space") ]] +}; + +//endgroup + +float3 transform_displacement_vector( + float3 displacement = float3(0.0) + [[ anno::description("Displacement vector") ]], + uniform displacement_vector_space space = displacement_vector_tangent_space + [[ anno::description("Space of the displacement vector") ]], + float scale = 1.0f + [[ anno::description("Displacement scale") ]] +) +[[ + anno::description("Transform input displacement vector to dispacement offset"), + anno::hidden() +]] +{ + float3 result; + switch (space) + { + // case displacement_height: + // result = state::normal() * displacement * scale; + // break; + + case displacement_vector_tangent_space: + result = state::texture_tangent_u(0) * displacement[0] * scale + + state::texture_tangent_v(0) * displacement[2] * scale + + state::normal() * displacement[1] * scale; + break; + + case displacement_vector_object_space: + result = state::transform_point( + state::coordinate_internal, + state::coordinate_object, + displacement * scale + ); + break; + + case displacement_vector_world_space: + result = state::transform_point( + state::coordinate_internal, + state::coordinate_world, + displacement * scale + ); + break; + + default: + result = state::position(); + break; + } + + return result; +} + +float4x4 rotation_translation_scale( + float3 rotation = float3(0.) + [[ anno::description("Rotation applied to every UVW coordinate") ]], + float3 translation = float3(0.) + [[ anno::description("Offset applied to every UVW coordinate") ]], + 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; +} + +export annotation suitable_as_light(); +export annotation type_of_material(material_type type); +export annotation dimension(float dimension); +export annotation dimension(float2 dimension); +export annotation dimension(float3 dimension); + + +//group Texturing functions + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +blend_colors( + color color_1 = color(0.0) + [[ anno::display_name("Color 1") ]], + color color_2 = color(1.0) + [[ anno::display_name("Color 2") ]], + uniform color_layer_mode mode = color_layer_blend + [[ + anno::description("Describes how Color 1 and Color 2 are combined"), + anno::display_name("Blend mode") + ]], + float weight = 1. + [[ + anno::description("Defines strength of the effect. At weight 0, only color 1 will be visible. At weight 1, the blend function will have full effect."), + anno::display_name("Blend weight"), + anno::soft_range(0.0,1.0) + ]], + uniform bool linear_blend = true + [[ + anno::description("The blend opperation can either be applied in linear or gamma (2.2) color space"), + anno::display_name("Linear blend") + ]] +) +[[ + anno::display_name("Blend colors"), + anno::description("Allows combining textures and colors in varied ways"), + anno::thumbnail(".thumbs/blend_colors.png"), + anno::in_group("Texturing", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(33), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + color c1 = linear_blend? color_1: math::pow(color_1,0.45); + color c2 = linear_blend? color_2: math::pow(color_2,0.45); + float w = linear_blend? weight: math::pow(weight,0.45); + texture_return r = base::blend_color_layers( + layers: base::color_layer[]( + base::color_layer( + layer_color: c2, + weight: w, + mode: mode + )), + base: c1 + ); + return linear_blend? r: texture_return(math::pow(r.tint,2.2),math::pow(r.mono,2.2)); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +file_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(0) + ]], + uniform mono_mode mono_source = mono_average + [[ + anno::display_name("Scalar mode"), + anno::description("Defines how the texture applies to scalar parameters"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(1) + ]], + uniform float brightness = 1. + [[ + anno::display_name("Brightness"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(2), + anno::soft_range(0.0,1.0) + ]], + uniform float contrast = 1. + [[ + anno::display_name("Contrast"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,1.0) + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture, color will be black and the scalar value will be 0."), + anno::display_name("Clip"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(9) + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(5) + ]], + uniform bool invert = false + [[ + anno::description("Invert image"), + anno::display_name("Invert image"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("Bitmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(30), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return invert == false? base::file_texture( + texture: texture, + mono_source: mono_source, + color_offset: color(0.5*brightness-0.5*contrast*brightness), + color_scale: color(brightness*contrast), + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clip:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clip:tex::wrap_repeat + ): base::file_texture( + texture: texture, + mono_source: mono_source, + color_offset: color(1.0-0.5*brightness+0.5*contrast*brightness), + color_scale: color(-brightness*contrast), + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clip:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clip:tex::wrap_repeat + ); +} +export color triplanar_file_texture( + uniform texture_2d texture_1 + [[ + anno::display_name("Bitmap file"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(0), + anno::description("Primary texture used for triplanar projection (X axis, and fallback for missing optional textures).") + ]], + float2 scaling_1 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(1) + ]], + float2 translation_1 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(2) + ]], + float rotation_1 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,360.0) + ]], + uniform texture_2d texture_2 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(4), + anno::description("Optional texture used for the second triplanar projection axis (Y axis).") + ]], + float2 scaling_2 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(5) + ]], + float2 translation_2 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(6) + ]], + float rotation_2 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(7), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::soft_range(0.0,360.0) + ]], + uniform texture_2d texture_3 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8), + anno::description("Optional texture used for the third triplanar projection axis (Z axis).") + ]], + float2 scaling_3 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(9) + ]], + float2 translation_3 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(10) + ]], + float rotation_3 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(11), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::soft_range(0.0,360.0) + ]], + float blend_range = 0.5 + [[ + anno::description("Defines the size of the transition area. 0 means hard transition, 1 means blending happens very softly."), + anno::display_name("Blend range"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(14), + anno::hard_range(0.0,1.0) + ]], + uniform color mean = color(0.0) + [[ + anno::description("Allows tweaking of the blend function. A value of 0 disables the function."), + anno::display_name("Mean color"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(15), + anno::hard_range(color(0.0),color(1.0)) + ]], + uniform float3 rotate_origin = float3(0.0) + [[ + anno::description("Allows manual alignment of the projection with an object"), + anno::display_name("Rotation of origin"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(13), + anno::soft_range(float3(0.0),float3(360.0)) + ]], + uniform bool object_space = true + [[ + anno::description("If off, world space will be used for generating texture coordinates. If on, object space will apply."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(12) + ]] +) +[[ + anno::display_name("Triplanar Bitmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Triplanar"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(30), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + state::coordinate_space space = object_space?state::coordinate_object:state::coordinate_world; + + float3 normal = state::transform_normal(state::coordinate_internal, space, state::normal()); + float3 position = state::transform_point(state::coordinate_internal, space, state::position()); + //TODO: pretransform the space? At least rotating the original space seems desireable and more is not feasible without dedicated ui (gizmo) + normal = transform_rotate(normal, math::radians(rotate_origin)); + position = transform_rotate(position, math::radians(rotate_origin)); + + float3 weights = math::abs(normal); + + //TODO: blendrange through pow or is there something better? pow has the drawback of needing 3 lookups nearly always + weights /=math::max_value(weights); + weights = math::pow(weights,1./math::max(blend_range, 0.001)); + //weights = math::saturate(weights-float3(1.-blend_range)); + + weights /=float3(weights.x+weights.y+weights.z); + + + float2 st1 = normal.x>0?float2(-position.z,position.y):float2(-position.z,-position.y); + float2 st2 = normal.y>0?float2(-position.z,-position.x):float2(-position.z,position.x); + float2 st3 = normal.z>0?float2(-position.y,position.x):float2(-position.y,-position.x); + + color c1 = weights.x>0? + support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st1)) + :color(0.); + color c2 = weights.y>0? tex::texture_isvalid(texture_2)? + support_definitions::lookup_color( + texture_2, + support_definitions::transform_st(math::radians(rotation_2),translation_2,scaling_2,st2)) + :support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st2)) + :color(0.); + color c3 = weights.z>0? tex::texture_isvalid(texture_3)? + support_definitions::lookup_color( + texture_3, + support_definitions::transform_st(math::radians(rotation_3),translation_3,scaling_3,st3)) + :support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st3)) + :color(0.); + return mean == color(0.0)? + c1*weights.x + c2*weights.y+ c3*weights.z: + support_definitions::biased_color_blend(weights.x,c1,weights.y,c2,weights.z,c3,mean); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +perlin_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(1) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(2) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform int noise_levels = 3 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(6) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(5) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(11) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(10) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Perlin noise texture"), + anno::description("Enable texturing with a random noise pattern"), + anno::thumbnail(".thumbs/perlin_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Perlin"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(34), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::perlin_noise_texture( + color1: color1, + color2: color2, + noise_levels: noise_levels, + absolute_noise: absolute_noise, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 perlin_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,5.0), + anno::description("Overall bump intensity applied to the generated Perlin noise normal perturbation.") + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform int noise_levels = 1 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(2), + anno::description("Enables billowing noise by folding negative noise values into the positive range.") + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(3) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(8) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(6) + ]] +) +[[ + anno::display_name("Perlin noise texture -- bump mapping"), + anno::description("Enable bump-map texturing with a random noise pattern"), + anno::thumbnail(".thumbs/perlin_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Perlin"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(35), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::perlin_noise_bump_texture( + factor: factor, + noise_levels: noise_levels, + absolute_noise: absolute_noise, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +worley_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space") , + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(6) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform cell_type mode = simple_cells + [[ + anno::display_name("Cell type") , + anno::description("Cell pattern type"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(2) + ]], + uniform cell_base metric = circular_cells + [[ + anno::display_name("Cell shape") , + anno::description("The shape of the cell form"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(4) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(10) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(9) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(8) + ]]) +[[ + anno::display_name("Cellular noise texture"), + anno::description("Allow texturing with a cell forming pattern"), + anno::thumbnail(".thumbs/worley_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Worley"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(36), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::worley_noise_texture( + color1: color1, + color2: color2, + mode: mode==crystal_cells?2:mode==bordered_cells?3:0, + metric: metric, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 worley_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the generated Worley noise normal perturbation.") + ]], + uniform cell_base metric = circular_cells + [[ + anno::display_name("Cell shape") , + anno::description("The shape of the cell form"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(2) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(8) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(7) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(6) + ]]) +[[ + anno::display_name("Cellular noise texture -- bump mapping"), + anno::description("Allow texturing with a cell forming pattern"), + anno::thumbnail(".thumbs/worley_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Worley"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(37), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::worley_noise_bump_texture( + factor: factor, + metric: metric, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +flow_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(10) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(11) + ]], + uniform int noise_levels = 3 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(3) + + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(4) + + ]], + uniform float phase = 0.0 + [[ + anno::display_name("Phase offset"), + anno::description("Controls the third dimension of the function"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(5), + anno::soft_range(0.0,1.0) + ]], + uniform float level_gain = 0.5 + [[ + anno::display_name("Level intensity gain"), + anno::description("If multiple levels are used, this parameter specifies a weighting factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,1.0) + ]], + uniform float level_scale = 2.0 + [[ + anno::display_name("Level scaling"), + anno::description("If multiple levels are used, this parameter specifies a global scaling factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(7), + anno::soft_range(0.0,4.0) + ]], + uniform float level_progressive_u_scale = 1. + [[ + anno::display_name("Progressive u scale"), + anno::description("If multiple levels are used, this parameter specifies an additional scaling factor in the \"u\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(8), + anno::soft_range(0.0,1.0) + ]], + uniform float level_progressive_v_motion = 0. + [[ + anno::display_name("Progressive v offset"), + anno::description("If multiple levels are used, this parameter specifies an offset for subsequent levels in the \"v\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(9), + anno::soft_range(0.0,1.0) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(15) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(14) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(13) + ]]) +[[ + anno::display_name("Flow noise texture"), + anno::description("Allow texturing with a 2D noise pattern suitable for waves"), + anno::thumbnail(".thumbs/flow_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Flow"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(38), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::flow_noise_texture( + color1: color1, + color2: color2, + levels: noise_levels, + phase: phase, + level_gain: level_gain, + level_scale: level_scale, + level_progressive_u_scale: level_progressive_u_scale, + level_progressive_v_motion: level_progressive_v_motion, + absolute_noise: absolute_noise, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 flow_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the generated flow-noise normal perturbation.") + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(12) + ]], + uniform int noise_levels = 1 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(8) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(2), + anno::description("Enables billowing noise by folding negative noise values into the positive range.") + ]], + uniform float phase = 0.0 + [[ + anno::display_name("Phase offset"), + anno::description("Controls the 3rd dimension of the function"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,1.0) + ]], + uniform float level_gain = 0.5 + [[ + anno::display_name("Level intensity gain"), + anno::description("If multiple levels are used, this parameter specifies a weighting factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(4), + anno::soft_range(0.0,1.0) + ]], + uniform float level_scale = 2.0 + [[ + anno::display_name("Level scaling"), + anno::description("If multiple levels are used, this parameter specifies a global scaling factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(5), + anno::soft_range(0.0,4.0) + ]], + uniform float level_progressive_u_scale = 1. + [[ + anno::display_name("Progressive u scale"), + anno::description("If multiple levels are used, this parameter specifies an additional scaling factor in the \"u\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,1.0) + ]], + uniform float level_progressive_v_motion = 0. + [[ + anno::display_name("Progressive v offset"), + anno::description("If multiple levels are used, this parameter specifies an offset for subsequent levels in the \"v\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(7), + anno::soft_range(0.0,1.0) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(11) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(10) + ]] +) +[[ + anno::display_name("Flow noise texture -- bump mapping"), + anno::description("Allow texturing with a 2D noise pattern suitable for waves"), + anno::thumbnail(".thumbs/flow_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Flow"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(39), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::flow_noise_bump_texture( + factor: factor, + levels: noise_levels, + phase: phase, + level_gain: level_gain, + level_scale: level_scale, + level_progressive_u_scale: level_progressive_u_scale, + level_progressive_v_motion: level_progressive_v_motion, + absolute_noise: absolute_noise, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +checker_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(1) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(7) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(6) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(3) + ]], + uniform float blur = 0 + [[ + anno::hard_range(0.0,1.0), + anno::display_name("Blur"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(2) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(5) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("3D checker texture"), + anno::description("Allows texturing a checkerboard pattern"), + anno::thumbnail(".thumbs/checker_texture.png"), + anno::in_group("Texturing", "Checker"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(40), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::checker_texture( + color1: color1, + color2: color2, + blur: blur/4., + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 checker_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the checker pattern.") + ]], + uniform float blur = 0 + [[ + anno::hard_range(0.0,1.0), + anno::display_name("Blur"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(1), + anno::description("Amount of softening applied to checker cell boundaries.") + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(2) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(6) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(5) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(4) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(3) + ]] +) +[[ + anno::display_name("3D checker texture -- bump mapping"), + anno::description("Allows texturing a checkerboard pattern"), + anno::thumbnail(".thumbs/checker_bump_texture.png"), + anno::in_group("Texturing", "Checker"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(41), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::checker_bump_texture( + factor: factor, + blur: blur/4., + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 file_bump_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + anno::usage("normal"), + anno::ui_order(1), + anno::description("Bitmap texture used as the bump source.") + ]], + uniform mono_mode bump_source = mono_average + [[ + anno::display_name("Bump mode"), + anno::description("Defines how the texture is evaluated to create the bumps"), + anno::in_group("Bitmap parameters"), + anno::ui_order(2) + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture the surface will be flat"), + anno::display_name("Clip"), + anno::in_group("Placement"), + anno::ui_order(5) + + ]], + uniform float factor = 1 + [[ + anno::display_name("Bump strength"), + anno::in_group("Bitmap parameters"), + anno::ui_order(3), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the sampled bitmap bump values.") + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("Bitmap texture, bump"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_bump_texture.png"), + anno::in_group("Texturing"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(31), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::file_bump_texture( + texture: texture, + bump_source: bump_source, + factor: factor, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clamp:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clamp:tex::wrap_repeat, + clip: clip + ); +} + +export float3 normalmap_texture( + uniform texture_2d texture + [[ + anno::display_name("Normalmap file"), + anno::in_group("Normalmap parameters"), + icon(".icons/normal_map_texture.svg"), + anno::usage("normal"), + anno::ui_order(1), + anno::description("Tangent-space normal map texture.") + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture the surface will be flat."), + anno::display_name("Clip"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(4) + + ]], + uniform float factor = 1 + [[ + anno::display_name("Strength"), + anno::in_group("Normal map parameters"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(2), + anno::soft_range(0.0,1.0), + anno::description("Strength multiplier applied to the sampled normal-map perturbation.") + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(3) + ]], + uniform bool flip = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(6) + ]] +) +[[ + anno::display_name("Normal map texture"), + anno::description("Allows the use of tangent space normal maps"), + anno::thumbnail(".thumbs/normalmap_texture.png"), + anno::in_group("Texturing"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::tangent_space_normal_texture( + texture: texture, + factor: factor, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clamp:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clamp:tex::wrap_repeat, + flip_tangent_v: flip, + clip: clip + ); +} +export float3 triplanar_normalmap_texture( + uniform texture_2d texture_1 + [[ + anno::usage("normal"), + anno::display_name("Bitmap file"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(0), + anno::description("Primary normal map used for triplanar projection (X axis, and fallback for missing optional textures).") + ]], + float2 scaling_1 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(1) + ]], + float2 translation_1 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(2) + ]], + float rotation_1 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_1 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(4) + ]], + uniform texture_2d texture_2 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::usage("normal"), + anno::ui_order(4), + anno::description("Optional normal map used for the second triplanar projection axis (Y axis).") + ]], + float2 scaling_2 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(5) + ]], + float2 translation_2 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(6) + ]], + float rotation_2 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(7), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_2 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8) + ]], + uniform texture_2d texture_3 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8), + anno::usage("normal"), + anno::description("Optional normal map used for the third triplanar projection axis (Z axis).") + ]], + float2 scaling_3 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(9) + ]], + float2 translation_3 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(10) + ]], + float rotation_3 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(11), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_3 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(12) + ]], + float blend_range = 0.5 + [[ + anno::description("Defines the size of the transition area. 0 means hard transition, 1 means blending happens very softly."), + anno::display_name("Blend range"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(13), + anno::hard_range(0.0,1.0) + ]], + float strength = 1.0 + [[ + anno::description("Overall strength of the normalmap"), + anno::display_name("Strength"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(14), + anno::soft_range(0.0,10.0) + ]], + uniform float3 rotate_origin = float3(0.0) + [[ + anno::description("Allows manual alignment of the projection with an object"), + anno::display_name("Rotation of origin"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(16), + anno::soft_range(float3(0.0),float3(360.0)) + ]], + uniform bool object_space = true + [[ + anno::description("If off, world space will be used for generating texture coordinates. If on, object space will apply."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Triplanar Normalmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Triplanar"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + state::coordinate_space space = object_space?state::coordinate_object:state::coordinate_world; + + float3 normal = state::transform_normal(state::coordinate_internal, space, state::normal()); + float3 position_original = state::transform_point(state::coordinate_internal, space, state::position()); + float3 rotation_origin_rad = math::radians(rotate_origin); + normal = transform_rotate(normal, rotation_origin_rad); + float3 position = transform_rotate(position_original, rotation_origin_rad); + float3 ty = + math::normalize( + transform_rotate_inv(state::transform_vector(space,state::coordinate_internal,float3(0.,-1.,0.)),rotation_origin_rad)); + float3 tz = + math::normalize( + transform_rotate_inv(state::transform_vector(space,state::coordinate_internal,float3(0.,0.,-1.)),rotation_origin_rad)); + + float3 weights = math::abs(normal); + + //TODO: blendrange through pow or is there something better? Pow means relatively little area where only 1 texture is looked up + weights /=math::max_value(weights); + weights = math::pow(weights,1./math::max(blend_range, 0.001)); + + + + float2 st1 = normal.x>0.0?float2(-position.z,position.y):float2(-position.z,-position.y); + float3 ts = math::normalize(math::cross(state::normal(),tz)); + float3 tt1 = math::normalize(math::cross(state::normal(),ts)); + + float2 st2 = normal.y>0?float2(-position.z,-position.x):float2(-position.z,position.x); + + float2 st3 = normal.z>0?float2(-position.y,position.x):float2(-position.y,-position.x); + float3 ts3 = math::normalize(math::cross(state::normal(),ty)); + float3 tt3 = math::normalize(math::cross(state::normal(),ts3)); + + tt3 = ( (tex::texture_isvalid(texture_3) && flip_3) || flip_1)? -tt3: tt3; + float3 tt2 = ( (tex::texture_isvalid(texture_2) && flip_2) || flip_1)? -tt1: tt1; + tt1 = flip_1? -tt1: tt1; + + float rotation_1_rad = math::radians(rotation_1); + float3x3 tan_rotation_mat_1 = axis_rotation_matrix(state::normal(), -rotation_1_rad); + float3 n1 = weights.x>0 && tex::texture_isvalid(texture_1)? + (support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st1))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength); + n1 = math::normalize( + ts * tan_rotation_mat_1 * n1.x + + tt1 * tan_rotation_mat_1 * n1.y + + state::normal() * (n1.z + (1.0 - strength))); + + float rotation_2_rad = math::radians(rotation_2); + float3x3 tan_rotation_mat_2 = tex::texture_isvalid(texture_2) + ? axis_rotation_matrix(state::normal(), -rotation_2_rad) + : tan_rotation_mat_1; + float3 n2 = weights.y>0? tex::texture_isvalid(texture_2)? + (support_definitions::lookup_float3( + texture_2, + support_definitions::transform_st(rotation_2_rad,translation_2,scaling_2,st2))- float3(0.5)) * (2.0 * strength) + :tex::texture_isvalid(texture_1)?(support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st2))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength):float3(0.,0.,strength); + n2 = math::normalize( + ts * tan_rotation_mat_2 * n2.x + + tt2 * tan_rotation_mat_2 * n2.y + + state::normal() * (n2.z + (1.0 - strength))); + + float rotation_3_rad = math::radians(rotation_3); + float3x3 tan_rotation_mat_3 = tex::texture_isvalid(texture_3) + ? axis_rotation_matrix(state::normal(), -rotation_3_rad) + : tan_rotation_mat_1; + float3 n3 = weights.z>0? tex::texture_isvalid(texture_3)? + (support_definitions::lookup_float3( + texture_3, + support_definitions::transform_st(rotation_3_rad,translation_3,scaling_3,st3))- float3(0.5)) * (2.0 * strength) + :tex::texture_isvalid(texture_1)?(support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st3))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength):float3(0.,0.,strength); + n3 = math::normalize( + ts3 * tan_rotation_mat_3 * n3.x + + tt3 * tan_rotation_mat_3 * n3.y + + state::normal() * (n3.z + (1.0 - strength))); + + return blend_3_normals(n1,weights.x,n2,weights.y,n3,weights.z); +} + +// Morten S. Mikkelsen, Practical Real-Time Hex-Tiling, Journal of Computer Graphics +// Techniques (JCGT), vol. 11, no. 2, 77-94, 2022 +// http://jcgt.org/published/0011/03/05/ +struct hextile_data { + float2 coord1; + float2 coord2; + float2 coord3; + float3 weights; + float3x3 tangent_rot_mat1; + float3x3 tangent_rot_mat2; + float3x3 tangent_rot_mat3; +}; + +hextile_data hextile_coord( + float2 coord, + float rotation, + float2 rotation_range, + float scale, + float2 scale_range, + float offset, + float2 offset_range) +{ + float sqrt3_2 = math::sqrt(3.0) * 2.0; + + // scale coord to maintain the original fit + float2 st = coord * sqrt3_2; + + // skew input space into simplex triangle grid + // (1, 0, -tan(30), 2*tan(30)) + float2x2 to_skewed = float2x2(1.0, 0.0, -0.57735027, 1.15470054); + float2 st_skewed = to_skewed * st; + + // barycentric weights + float2 st_frac = math::frac(st_skewed); + float3 temp = float3(st_frac.x, st_frac.y, 0.0); + temp.z = 1.0 - temp.x - temp.y; + + float s = math::step(0.0, -temp.z); + float s2 = 2.0 * s - 1.0; + + float w1 = -temp.z * s2; + float w2 = s - temp.y * s2; + float w3 = s - temp.x * s2; + + // vertex IDs + int2 base_id = int2(math::floor(st_skewed)); + int si = int(s); + int2 id1 = base_id + int2(si, si); + int2 id2 = base_id + int2(si, 1 - si); + int2 id3 = base_id + int2(1 - si, si); + + // tile center + float2x2 inv_skewed = float2x2(1.0, 0.0, 0.5, 1.0 / 1.15470054); + float2 ctr1 = inv_skewed * float2(id1) / float2(sqrt3_2); + float2 ctr2 = inv_skewed * float2(id2) / float2(sqrt3_2); + float2 ctr3 = inv_skewed * float2(id3) / float2(sqrt3_2); + + // reuse hash for performance + float2 seed_offset = float2(0.12345); // to avoid some zeros + float2 rand1 = hash22(float2(id1) + seed_offset); + float2 rand2 = hash22(float2(id2) + seed_offset); + float2 rand3 = hash22(float2(id3) + seed_offset); + + // randomized rotation matrix + float2 rr = math::radians(rotation_range); + float rrr1 = math::lerp(rr.x, rr.y, rand1.x * rotation); + float rrr2 = math::lerp(rr.x, rr.y, rand2.x * rotation); + float rrr3 = math::lerp(rr.x, rr.y, rand3.x * rotation); + float[2] sc1 = math::sincos(rrr1); + float[2] sc2 = math::sincos(rrr2); + float[2] sc3 = math::sincos(rrr3); + float2x2 rm1 = float2x2(sc1[1], -sc1[0], sc1[0], sc1[1]); + float2x2 rm2 = float2x2(sc2[1], -sc2[0], sc2[0], sc2[1]); + float2x2 rm3 = float2x2(sc3[1], -sc3[0], sc3[0], sc3[1]); + + // rotation matrix for tangent vectors + float3x3 trm1 = axis_rotation_matrix(state::normal(), -rrr1); + float3x3 trm2 = axis_rotation_matrix(state::normal(), -rrr2); + float3x3 trm3 = axis_rotation_matrix(state::normal(), -rrr3); + + // randomized scale + float2 sr = scale_range; + float2 scale1 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand1.y), scale); + float2 scale2 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand2.y), scale); + float2 scale3 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand3.y), scale); + + // randomized offset + float2 offset1 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand1 * offset); + float2 offset2 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand2 * offset); + float2 offset3 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand3 * offset); + + // get coord + float2 st1 = ((coord - ctr1) * rm1 / scale1) + ctr1 + offset1; + float2 st2 = ((coord - ctr2) * rm2 / scale2) + ctr2 + offset2; + float2 st3 = ((coord - ctr3) * rm3 / scale3) + ctr3 + offset3; + + hextile_data tile_data = hextile_data(st1, st2, st3, float3(w1, w2, w3), trm1, trm2, trm3); + + return tile_data; +} + +export color hextiling_file_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(0), + anno::description("Bitmap texture sampled by the hextiling algorithm.") + ]], + uniform int texture_space = 0 + [[ + anno::display_name("UV space index"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(1), + anno::description("UV set index used for texture-coordinate lookup.") + ]], + color default_color = color(0.0) + [[ + anno::display_name("Default color"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(2), + anno::description("Fallback color returned when no valid texture is provided.") + ]], + float2 repeat = float2(1.0, 1.0) + [[ + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/hextiling.svg"), + anno::ui_order(3), + anno::description("UV tiling multiplier applied before hextiling.") + ]], + float rotation = 1.0 + [[ + anno::display_name("Rotation"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(4), + anno::description("Random rotation amount; 0 disables random rotation and 1 uses the full rotation range.") + ]], + float2 rotation_range = float2(0.0, 360.0) + [[ + anno::display_name("Rotation Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(5), + anno::description("Minimum and maximum random rotation in degrees.") + ]], + float scale = 1.0 + [[ + anno::display_name("Scale"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(6), + anno::description("Random scale amount; 0 disables random scaling and 1 uses the full scale range.") + ]], + float2 scale_range = float2(0.5, 2.0) + [[ + anno::display_name("Scale Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(7), + anno::description("Minimum and maximum random tile scale.") + ]], + float offset = 1.0 + [[ + anno::display_name("Offset"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(8), + anno::description("Random offset amount; 0 disables random offsets and 1 uses the full offset range.") + ]], + float2 offset_range = float2(0.0, 1.0) + [[ + anno::display_name("Offset Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(9), + anno::description("Minimum and maximum random UV offset applied per tile.") + ]], + float falloff = 0.5 + [[ + anno::display_name("Falloff"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(10), + anno::description("Controls how quickly tile blending transitions between neighboring tiles.") + ]], + float falloff_contrast = 0.5 + [[ + anno::display_name("Falloff Contrast"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(11), + anno::description("Controls how strongly luminance influences blending weights.") + ]] +) +[[ + anno::display_name("Hextiling Bitmap texture"), + anno::description("Allows infinite texturing without obvious repeat patterns."), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Hextiling"), + icon(".icons/hextiling.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + if (!tex::texture_isvalid(texture)) + return default_color; + + + float3 uvw = state::texture_coordinate(texture_space); + float2 coord = float2(uvw.x, uvw.y) * repeat; + + // get triangle coord + hextile_data tile_data = hextile_coord( + coord: coord, + rotation: rotation, + rotation_range: rotation_range, + scale: scale, + scale_range: scale_range, + offset: offset, + offset_range: offset_range + ); + + // lookup texture + color c1 = tex::lookup_color(texture, tile_data.coord1); + color c2 = tex::lookup_color(texture, tile_data.coord2); + color c3 = tex::lookup_color(texture, tile_data.coord3); + + // luminance as weight + float3 cw = float3(math::luminance(c1), math::luminance(c2), math::luminance(c3)); + cw = math::lerp(float3(1.0), cw, float3(falloff_contrast)); + + // blend weights + float3 w = cw * math::pow(tile_data.weights, 7.0); + w /= (w.x + w.y + w.z); + + // apply s-curve gain + if (falloff != 0.5) + { + w.x = schlick_gain(w.x, falloff); + w.y = schlick_gain(w.y, falloff); + w.z = schlick_gain(w.z, falloff); + w /= (w.x + w.y + w.z); + } + + // blend + color out_color = w.x * c1 + w.y * c2 + w.z * c3; + + return out_color; +} + +export float3 hextiling_normalmap_texture( + uniform texture_2d texture + [[ + anno::usage("normal"), + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(0), + anno::description("Normal map texture sampled by the hextiling algorithm.") + ]], + uniform int texture_space = 0 + [[ + anno::display_name("UV space index"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(1), + anno::description("UV set index used for texture-coordinate lookup.") + ]], + float3 default_normal = state::normal() + [[ + anno::display_name("Default normal"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(2), + anno::description("Fallback normal returned when no valid normal map is provided.") + ]], + float2 repeat = float2(1.0, 1.0) + [[ + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/hextiling.svg"), + anno::ui_order(3), + anno::description("UV tiling multiplier applied before hextiling.") + ]], + float rotation = 1.0 + [[ + anno::display_name("Rotation"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(4), + anno::description("Random rotation amount; 0 disables random rotation and 1 uses the full rotation range.") + ]], + float2 rotation_range = float2(0.0, 360.0) + [[ + anno::display_name("Rotation Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(5), + anno::description("Minimum and maximum random rotation in degrees.") + ]], + float scale = 1.0 + [[ + anno::display_name("Scale"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(6), + anno::description("Random scale amount; 0 disables random scaling and 1 uses the full scale range.") + ]], + float2 scale_range = float2(0.5, 2.0) + [[ + anno::display_name("Scale Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(7), + anno::description("Minimum and maximum random tile scale.") + ]], + float offset = 1.0 + [[ + anno::display_name("Offset"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(8), + anno::description("Random offset amount; 0 disables random offsets and 1 uses the full offset range.") + ]], + float2 offset_range = float2(0.0, 1.0) + [[ + anno::display_name("Offset Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(9), + anno::description("Minimum and maximum random UV offset applied per tile.") + ]], + float falloff = 0.5 + [[ + anno::display_name("Falloff"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(10), + anno::description("Controls how quickly tile blending transitions between neighboring tiles.") + ]], + float strength = 1.0 + [[ + anno::display_name("Strength"), + anno::in_group("Normal map parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(11), + anno::soft_range(0.0, 1.0), + anno::description("Strength multiplier applied to sampled normal-map perturbations.") + ]], + uniform bool flip_g = false + [[ + anno::display_name("Flip V"), + anno::in_group("Normal map parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(12), + anno::description("Flips the green (Y) channel of the sampled normal maps.") + ]] +) +[[ + anno::display_name("Hextiling Normalmap texture"), + anno::description("Allows infinite texturing without obvious repeat patterns."), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Hextiling"), + icon(".icons/hextiling.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + if (!tex::texture_isvalid(texture)) + return default_normal; + + + float3 uvw = state::texture_coordinate(texture_space); + float2 coord = float2(uvw.x, uvw.y) * repeat; + + // get triangle coord + hextile_data tile_data = hextile_coord( + coord: coord, + rotation: rotation, + rotation_range: rotation_range, + scale: scale, + scale_range: scale_range, + offset: offset, + offset_range: offset_range + ); + + // lookup normalmap + float3 nm1 = tex::lookup_float3(texture, tile_data.coord1); + float3 nm2 = tex::lookup_float3(texture, tile_data.coord2); + float3 nm3 = tex::lookup_float3(texture, tile_data.coord3); + nm1.y = flip_g ? 1.0 - nm1.y : nm1.y; + nm2.y = flip_g ? 1.0 - nm2.y : nm2.y; + nm3.y = flip_g ? 1.0 - nm3.y : nm3.y; + + // transform to geometry normals + nm1 = 2.0 * nm1 - 1.0; + nm2 = 2.0 * nm2 - 1.0; + nm3 = 2.0 * nm3 - 1.0; + float3 sn = state::normal(); + float3 tu1 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat1 * strength; + float3 tu2 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat2 * strength; + float3 tu3 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat3 * strength; + float3 tv1 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat1 * strength; + float3 tv2 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat2 * strength; + float3 tv3 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat3 * strength; + float3 n1 = math::normalize(tu1 * nm1.x + tv1 * nm1.y + sn * nm1.z); + float3 n2 = math::normalize(tu2 * nm2.x + tv2 * nm2.y + sn * nm2.z); + float3 n3 = math::normalize(tu3 * nm3.x + tv3 * nm3.y + sn * nm3.z); + + // belnd weights + float3 w = math::pow(tile_data.weights, 7.0); + w /= (w.x + w.y + w.z); + + // apply s-curve gain + if (falloff != 0.5) + { + w.x = schlick_gain(w.x, falloff); + w.y = schlick_gain(w.y, falloff); + w.z = schlick_gain(w.z, falloff); + w /= (w.x + w.y + w.z); + } + + // blend + float3 out_normal = gradient_blend_3_normals(n1, w.x, n2, w.y, n3, w.z); + + return out_normal; +} + +//endgroup + +//material section----------------------------------------------------------------------------------------------- + +//group Simple materials + +export material diffuse( + color diffuse_color = color(.8) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead a powdery appearance") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple diffuse"), + anno::description("A basic diffuse material"), + anno::thumbnail(".thumbs/diffuse.png"), + anno::in_group("Materials", "Diffuse"), + anno::ui_order(0), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic")) +]] + = material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::diffuse_reflection_bsdf( + roughness: roughness, + tint: diffuse_color + ) + ) + ) +); + +export material dusty_diffuse( + color diffuse_color = color(.8) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Dusty diffuse"), + anno::description("A dusty diffuse material"), + anno::thumbnail(".thumbs/diffuse.png"), + anno::in_group("Materials", "Diffuse"), + anno::ui_order(1), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic")) +]] + = material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::dusty_diffuse_reflection_bsdf( + tint: diffuse_color + ) + ) + ) +); + +export material scratched_metal_v2( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::ui_order(1), + anno::description("The color of the metal") + ]], + float roughness = 0.2 + [[ + anno::display_name("Roughness"), + anno::ui_order(3), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflection weight"), + anno::ui_order(4), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::ui_order(5), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight") + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::ui_order(6), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees.") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::ui_order(7), + anno::description("Attach bump or normal maps here") + ]], + color edge_color = color(1.0) + [[ + anno::display_name("Edge color"), + anno::ui_order(2), + anno::description("The color of the metal towards the edge") + ]] +) +[[ + anno::display_name("Metal"), + anno::description("A metallic material with stretched reflections"), + anno::thumbnail(".thumbs/scratched_metal.png"), + anno::in_group("Materials"), + anno::ui_order(1), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness*roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + complex_ior ior = artistic_metal_to_complex_ior(metal_color, edge_color); + bsdf glossy_bsdf = df::fresnel_factor( + ior: ior.n, + extinction_coefficient: ior.k, + base: df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ) + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_plastic_v2( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float roughness = 0.2 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(2) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(4) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(5) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Additional reflectivity control"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Plastic"), + anno::description("A basic dielectric, works for everything opaque that is not metallic. Supports stretched highlights."), + anno::thumbnail(".thumbs/scratched_plastic.png"), + anno::in_group("Materials"), + anno::ui_order(2), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness*roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material retroreflective( + color base_color = color(.2,.03,.03) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + color reflection_color = color(.8,.8,.03) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the retroreflection"), + anno::ui_order(2) + ]], + float roughness = 0.15 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(3) + ]], + float normal_reflectivity = .05 + [[ + anno::display_name("Reflection weight facing"), + anno::hard_range(0.0,1.), + anno::description("Reflectivity control for geometry facing the viewer"), + anno::ui_order(4) + ]], + float grazing_reflectivity = 1. + [[ + anno::display_name("Reflection weight edge"), + anno::hard_range(0.0,1.), + anno::description("Reflectivity control for the reflectivity at geometry edges"), + anno::ui_order(5) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Retroreflective"), + anno::description("A material with a retroreflective component, works well for road signs and retroreflective stickers"), + anno::thumbnail(".thumbs/retroreflective.png"), + anno::in_group("Materials"), + anno::ui_order(3), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","retroreflective","roadsign","stone")) +]] + = let{ + bsdf glossy_bsdf = df::backscattering_glossy_reflection_bsdf( + tint: reflection_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::custom_curve_layer( + normal_reflectivity: 1.-normal_reflectivity, + grazing_reflectivity: 1.-grazing_reflectivity, + base: glossy_bsdf, + layer: df::diffuse_reflection_bsdf( + roughness: 1.0, + tint: base_color + ), + normal: normal + ) + ) + ) +); + +export material flex_material_v2( + color base_color = color(.5) + [[ + anno::display_name("Base color"), + anno::in_group("Base"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float diffuse_roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to a more \"powdery\" look"), + anno::ui_order(2) + ]], + float is_metal = 0.0 + [[ + anno::display_name("Metallic material"), + anno::in_group("Base"), + anno::description("If 1.0, reflection will be colored and independent of view direction. If 0.0, reflection will be white and direction dependent. Directional dependence is in this case based on the IOR (Fresnel effect)."), + anno::ui_order(3) + ]], + float reflectivity = 1.0 + [[ + anno::display_name("Reflection weight"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Controls the amount of reflection"), + anno::ui_order(5) + ]], + float reflection_roughness = 0.3 + [[ + anno::display_name("Reflection roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to more blurry reflections"), + anno::ui_order(4) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Reflection anisotropy"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(6) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(7) + ]], + float transparency = 0.0 + [[ + anno::display_name("Transmission weight"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("Weights how much light passes through the object compared to its diffuse reflectivity."), + anno::ui_order(12) + ]], + color transmission_color = color(1.) + [[ + anno::display_name("Transmission color"), + anno::in_group("Transmission"), + anno::description("Color effect for transmission independent of thickness of the object, similar to stained glass."), + anno::ui_order(8) + ]], + uniform color volume_color = color(1.0) + [[ + anno::display_name("Volume color"), + anno::in_group("Transmission"), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at \"Volume reference distance\" (m)."), + anno::ui_order(9) + ]], + float transmission_roughness = 0.0 + [[ + anno::display_name("Transmission roughness"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("higher values lead to objects seen through the material to appear blurry"), + anno::ui_order(11) + ]], + uniform float base_thickness = 0.1 + [[ + anno::display_name("Volume reference distance"), + anno::in_group("Transmission"), + anno::soft_range(0.0,10.0), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(10) + ]], + uniform float ior = 1.5 + [[ + anno::display_name("IOR"), + anno::in_group("Global"), + anno::soft_range(1.0,4.0), + anno::description("Determines refraction in the volume. It also influences the reflectivity for materials that are not metallic."), + anno::ui_order(14) + ]], + uniform bool thin_walled = false + [[ + anno::display_name("Thin walled"), + anno::in_group("Global"), + anno::description("Thin walled materials do not refract and do not have volume effects. Good for soap bubbles or window glass."), + anno::ui_order(13) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::in_group("Global"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(16) + ]], + uniform float abbe_number = 0.0 + [[ + anno::in_group("Global"), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85"), + anno::soft_range(0.0,100.0), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Flexible material model"), + anno::description("A complex material that can be configured to a wide variety of looks"), + anno::thumbnail(".thumbs/flex_material.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials"), + anno::ui_order(5), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("generic","complex")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: reflection_roughness*reflection_roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); + bsdf diffuse_bsdf = df::diffuse_reflection_bsdf( + tint: base_color, + roughness: diffuse_roughness + ); + bsdf transmission_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: transmission_roughness*transmission_roughness + ); + bsdf add_transparency = df::weighted_layer( + weight: transparency, + layer: transmission_bsdf, + base: diffuse_bsdf, + normal: normal + ); + bsdf add_reflection = df::weighted_layer( + is_metal, + df::weighted_layer( + weight: reflectivity, + layer: df::directional_factor(base_color,color(1.0),5.,glossy_bsdf), + base: add_transparency, + normal: normal + ), + df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ) + ); + bsdf add_normal = df::weighted_layer( + normal: normal, + weight: 1., + layer: add_reflection + ); +} in material( + thin_walled: thin_walled, + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number), + surface: material_surface( + scattering: add_normal + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ) +); + +export material thin_glass_v2( + color glass_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin glass"), + anno::description("A basic transmissive dielectric without refraction or volume"), + anno::thumbnail(".thumbs/thin_glass.png"), + anno::in_group("Materials", "Glass"), + anno::ui_order(6), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf glossy_transmission_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: glass_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + layer: glossy_transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) +); + +export material thin_translucent_v2( + color surface_color = color(.95) + [[ + anno::display_name("Diffuse color"), + anno::description("The color of the material") + ]], + color translucent_color = color(.95) + [[ + anno::display_name("Translucence color"), + anno::description("The color of the volume of the material") + ]], + float translucency = 0.5 + [[ + anno::display_name("Translucence weight"), + anno::hard_range(0.0,1.), + anno::description("Fraction of the incoming light that should be visible on the backside") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin translucent"), + anno::description("A diffuse transmissive dielectric material"), + anno::thumbnail(".thumbs/thin_translucent.png"), + anno::in_group("Materials", "Translucent"), + anno::ui_order(7), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","leaves","paper","sheets")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf transmission_bsdf = df::diffuse_transmission_bsdf( + tint: translucent_color + ); + bsdf base_bsdf = df::diffuse_reflection_bsdf( + tint: surface_color + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + weight: translucency, + normal: normal, + base: base_bsdf, + layer: df::weighted_layer( + layer: transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) + ) +); + +export material thick_glass_v2( + color transmission_color = color(1.0) + [[ + anno::ui_order(1), + anno::display_name("Transmission color"), + anno::description("Colors the light entering the volume, similar to stained glass") + ]], + uniform color glass_color = color(.95) + [[ + anno::ui_order(2), + anno::display_name("Volume color"), + anno::description("The color of the glass body") + ]], + float roughness = 0.0 + [[ + anno::ui_order(4), + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::ui_order(5), + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction") + ]], + uniform float base_thickness = .1 + [[ + anno::ui_order(3), + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here.") + + ]], + float3 normal = state::normal() + [[ + anno::ui_order(7), + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]], + uniform float abbe_number = 0.0 + [[ + anno::ui_order(6), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0) + ]] +) +[[ + anno::display_name("Thick glass"), + anno::description("A basic transmissive dielectric with refraction and coloring in the volume"), + anno::thumbnail(".thumbs/thick_glass.png"), + anno::in_group("Materials", "Glass"), + anno::ui_order(8), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf glossy_bsdf_transmission = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: roughness*roughness + ); +} in material( + thin_walled: false, + surface: material_surface( + df::weighted_layer( + normal: normal, + weight: 1., + layer: df::fresnel_layer( + layer: glossy_bsdf, + base: glossy_bsdf_transmission, + ior: ior, + normal: normal + ) + ) + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(glass_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material thick_translucent_v2( + color transmission_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + uniform color volume_color = color(.95) + [[ + anno::display_name("Volume color"), + anno::description("The color of the volume at \"Volume reference distance\""), + anno::ui_order(2) + ]], + uniform float volume_scattering = 0.5 + [[ + anno::display_name("Volume scattering"), + anno::hard_range(0.0,.99999), + anno::description("Amount of scattering for objects at \"Volume reference distance\""), + anno::ui_order(3) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(5) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Overall reflectivity of the material"), + anno::ui_order(6) + ]], + uniform float base_thickness = .1 + [[ + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" and \"Volume scattering\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(4) + + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(9) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction"), + anno::ui_order(7) + ]], + uniform float abbe_number = 0.0 + [[ + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off, Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Thick translucent"), + anno::description("A subsurface scattering material"), + anno::thumbnail(".thumbs/thick_translucent.png"), + anno::in_group("Materials", "Translucent"), + anno::ui_order(9), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","wax","milk")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf transmission_bsdf = df::specular_bsdf( + mode: df::scatter_transmit, + tint: transmission_color + ); + +} in material( + thin_walled: false, + surface: material_surface( + df::fresnel_layer( + normal: normal, + weight: reflectivity, + ior: ior, + layer: glossy_bsdf, + base: df::weighted_layer( + normal: normal, + weight: 1., + layer: transmission_bsdf + ) + ) + ), + volume: material_volume( + scattering_coefficient: (base_thickness <= 0)? color(0): math::log(color(1.-volume_scattering)) / - base_thickness, + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +//endgroup + +//group Modifier materials + +export material blend( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material the blend is based on") + ]], + material blend = scratched_metal_v2() + [[ + anno::display_name("Blend Material"), + anno::description("Surface properties to use for the blend") + ]], + float weight = 0. + [[ + anno::display_name("Blend weight"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]] +) +[[ + anno::display_name("Blend materials"), + anno::description("Blend characteristics of 2 materials or mask them using a texture"), + anno::thumbnail(".thumbs/blend.png"), + anno::in_group("Material modifiers", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = let { + float inv_weight = 1.0f - weight; +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: weight, + layer: blend.surface.scattering, + base: base.surface.scattering + ), + emission: material_emission( + mode: base.surface.emission.mode, //cant vary + intensity: math::lerp(base.surface.emission.intensity,blend.surface.emission.intensity, weight), + emission: df::unbounded_mix( + df::edf_component[] + ( + df::edf_component(inv_weight,base.surface.emission.emission), + df::edf_component(weight,blend.surface.emission.emission) + ) + ) + ) + ), + volume: material_volume( + scattering: df::unbounded_mix( + df::vdf_component[] + ( + df::vdf_component(inv_weight,base.volume.scattering), + df::vdf_component(weight,blend.volume.scattering) + ) + ), + absorption_coefficient: math::lerp(base.volume.absorption_coefficient,base.volume.absorption_coefficient,weight), + scattering_coefficient: math::lerp(base.volume.scattering_coefficient,base.volume.scattering_coefficient,weight), + emission_intensity: math::lerp(base.volume.emission_intensity,blend.volume.emission_intensity, weight) + + ), + ior: base.ior, //can't vary + thin_walled: base.thin_walled, //can't vary + geometry: material_geometry( + displacement: math::lerp(base.geometry.displacement, blend.geometry.displacement, weight), + cutout_opacity: math::lerp(base.geometry.cutout_opacity, blend.geometry.cutout_opacity, weight), + normal: blend_normals(base.geometry.normal, inv_weight, blend.geometry.normal, weight) + ) +); + +export material twosided( + material front = scratched_plastic_v2() + [[ + anno::display_name("Front material"), + anno::description("The material on the front faces.") + ]], + material back = scratched_metal_v2() + [[ + anno::display_name("Back material"), + anno::description("The material on the back faces.") + ]] +) +[[ + anno::display_name("Two-sided materials"), + anno::description("Allows you to apply a material to front and back surfaces."), + anno::thumbnail(".thumbs/twosided.png"), + anno::in_group("Material modifiers"), + icon(".icons/two_sided_materials.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = material( + thin_walled: true, + ior: front.ior, + surface: front.surface, + backface: back.surface, + geometry: front.geometry +); + +export material surface_falloff( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material the blend is based on") + ]], + material blend = scratched_metal_v2() + [[ + anno::display_name("Blend Material"), + anno::description("Surface properties to use for the blend") + ]], + float facing_weight = 0.0 + [[ + anno::display_name("Blend weight facing"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]], + float edge_weight = 1.0 + [[ + anno::display_name("Blend weight edge"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]], + float blend_bias = 1. + [[ + anno::display_name("Blend bias"), + anno::soft_range(0.0,10.), + anno::description("Controls how fast the transition should happen. 5.0 results in fresnel like transition.") + ]] +) +[[ + anno::display_name("Surface falloff"), + anno::description("Blend surface characteristics of 2 materials or mask them using a texture"), + anno::thumbnail(".thumbs/surface_falloff.png"), + anno::in_group("Material modifiers", "Blend"), + icon(".icons/surface_falloff.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = material( + surface: material_surface( + scattering: df::custom_curve_layer( + weight: 1., + exponent: blend_bias, + normal_reflectivity: facing_weight, + grazing_reflectivity: edge_weight, + layer: blend.surface.scattering, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_clearcoat_v2( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied"), + anno::ui_order(1) + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat"), + anno::ui_order(5) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat"), + anno::ui_order(3) + ]], + float visibility = 1.0 + [[ + anno::display_name("Coat visibility"), + anno::hard_range(0.0,1.0), + anno::description("Determines visibility of the clear coat"), + anno::ui_order(4) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(6) + ]], + color coat_filter_color = color(1.) + [[ + anno::display_name("Coat filter color"), + anno::description("For simulating coatings with colored resins that modulate the color of underlying layers"), + anno::ui_order(2) + ]] +) +[[ + anno::display_name("Apply clear coating"), + anno::description("Apply clear coat to an existing material"), + anno::author("NVIDIA Corporation"), + anno::thumbnail(".thumbs/apply_clearcoat.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_clear_coating.svg"), + anno::ui_order(16), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness*roughness, + tint: color(1.) + ); + color base_tint = blend_colors(color(1.), coat_filter_color, color_layer_blend, visibility).tint; +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: normal, + weight: visibility, + layer: glossy_bsdf, + base: df::tint(tint: base_tint, base: base.surface.scattering) + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_thinfilm( + material base = scratched_metal_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get shows a thin film effect") + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("The IOR of the thin film interface") + ]], + float thickness = 400.0 + [[ + anno::display_name("Thickness"), + anno::soft_range(10.0,5000.0), + anno::description("Thickness of the thin film in nm") + ]] +) +[[ + anno::display_name("Apply thin film"), + anno::description("Apply thin film to an existing material"), + anno::thumbnail(".thumbs/apply_thinfilm.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_thin_film.svg"), + anno::ui_order(17), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::thin_film( + ior: color(ior), + thickness: thickness, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_metalcoat_v2( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a metallic coating applied"), + anno::ui_order(1) + ]], + color metal_color = color(.95) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the metal"), + anno::ui_order(2) + ]], + float visibility = .3 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the coat"), + anno::ui_order(4) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metal coat"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(5) + ]] +) +[[ + anno::display_name("Apply thin metal coating"), + anno::description("Apply metal coat to an existing material"), + anno::thumbnail(".thumbs/apply_metalcoat.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_thin_metal_coating.svg"), + anno::ui_order(18), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness*roughness, + tint: metal_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: visibility, + normal: normal, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_dustcover( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + color dust_color = color(.7) + [[ + anno::display_name("Dust color"), + anno::description("The color of the dust") + ]], + float visibility = 1. + [[ + anno::display_name("Dust density"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the cover") + ]], + uniform float dust_density = .5 + [[ + anno::display_name("Dust amount"), + anno::hard_range(.01,1), + anno::description("How dusty the material is") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Apply a cover of dust"), + anno::description("Apply a diffuse cover of dust or dirt"), + anno::thumbnail(".thumbs/apply_dustcover.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_dust_cover.svg"), + anno::ui_order(19), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf dust_bsdf = df::diffuse_reflection_bsdf( + roughness: 1., + tint: dust_color + ); +} in material( + surface: material_surface( + scattering: df::custom_curve_layer( + weight: visibility, + normal_reflectivity: dust_density*dust_density*dust_density, + exponent: (1.05-dust_density)*2., + normal: normal, + layer: dust_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_colorfalloff_v2( + material base = scratched_metal_v2(metal_color: color(1.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + uniform color color_0 = color(1.,0.,0.) + [[ + anno::display_name("Color 1"), + anno::description("Color 1 (facing direction)") + ]], + uniform color color_1 = color(0.,1.,0.) + [[ + anno::display_name("Color 2"), + anno::description("Color 2") + ]], + uniform color color_2 = color(0.,0.,1.) + [[ + anno::display_name("Color 3"), + anno::description("Color 3") + ]], + uniform color color_3 = color(1.,0.,0.) + [[ + anno::display_name("Color 4"), + anno::description("Color 4") + ]], + uniform color color_4 = color(0.,1.,0.) + [[ + anno::display_name("Color 5"), + anno::description("Color 5 (object edges)") + ]] +) +[[ + anno::display_name("Apply a color falloff"), + anno::description("Makes the color view dependent"), + anno::thumbnail(".thumbs/apply_colorfalloff.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/apply_color_falloff.svg"), + anno::ui_order(20), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::measured_curve_factor( + curve_values: color[](color_0,color_1,color_2,color_3,color_4), + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); +//JAN: TODO fix from here +export material apply_metallicflakes( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a flake layer applied") + ]], + color flake_color = color(.9,.7,.5) + [[ + anno::display_name("Color"), + anno::description("The color of the flakes") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metallic flakes") + ]], + uniform float size = 1. + [[ + anno::display_name("Flake size"), + anno::description("Determines size of the metallic flakes, in mm") + ]], + uniform float amount = 0.5 + [[ + anno::display_name("Flake amount"), + anno::hard_range(0.0,1.), + anno::description("Determines amount of visible metallic flakes") + ]], + uniform float opacity = 0.5 + [[ + anno::display_name("Flake opacity"), + anno::hard_range(0.0,1.), + anno::description("Determines visibility of the metallic flakes") + ]], + uniform float bump = 1. + [[ + anno::display_name("Flake orientation randomness"), + anno::description("Larger numbers will increase the sparkle radius around highlights") + ]] +) +[[ + anno::display_name("Apply flake coating"), + anno::description("Apply layer of metallic flakes to an existing material"), + anno::thumbnail(".thumbs/apply_metallicflakes.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_flake_coating.svg"), + anno::ui_order(21), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + float3 flake_normal = base::flake_noise_bump_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + strength: bump, + scale: size * 0.001 + ); + float flake_opacity = base::flake_noise_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + intensity: opacity, + scale: size * 0.001, + density: amount + ).mono; + + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: flake_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + normal: flake_normal, + weight: flake_opacity, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material flake_paint( + color base_color = color(.3,.01,.01) + [[ + anno::display_name("Base color"), + anno::description("The color of the base paint") + ]], + color flake_color = color(.6,1,.1) + [[ + anno::display_name("Flake color"), + anno::description("The color of the flakes") + ]], + float roughness = 0.15 + [[ + anno::display_name("Flake roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metallic flakes") + ]], + uniform float size = 1. + [[ + anno::display_name("Flake size"), + anno::description("Determines size of the metallic flakes, in mm") + ]], + uniform float amount = 0.4 + [[ + anno::display_name("Flake amount"), + anno::hard_range(0.0,1.), + anno::description("Determines amount of visible metallic flakes") + ]], + uniform float opacity = .8 + [[ + anno::display_name("Flake weight"), + anno::hard_range(0.0,1.), + anno::description("Determines visibility of the metallic flakes") + ]], + uniform float bump = 1. + [[ + anno::display_name("Flake orientation randomness"), + anno::description("Larger numbers will increase the sparkle radius around highlights") + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat") + ]], + float coat_roughness = 0.0 + [[ + anno::display_name("Coat roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat") + ]], + float3 coat_bump = state::normal() + [[ + anno::display_name("Coat bump"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Flaky paint"), + anno::description("A multi layer paint material containing flakes"), + anno::thumbnail(".thumbs/flake_paint.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials"), + anno::ui_order(14), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("complex","carpaint")) +]] + = let{ + float3 flake_normal = base::flake_noise_bump_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + strength: bump, + scale: size * 0.001 + ); + float flake_opacity = base::flake_noise_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + intensity: opacity, + scale: size * 0.001, + density: amount + ).mono; + + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: flake_color + ); +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: coat_bump, + layer: df::simple_glossy_bsdf(roughness_u: coat_roughness), + base: df::weighted_layer( + normal: flake_normal, + weight: flake_opacity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf(tint: base_color) + ) + ) + ), + thin_walled: true +); + +export material add_cutout( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a cut-out") + ]], + float cutout = 1.0 + [[ + anno::display_name("Cutout"), + anno::hard_range(0.0,1.0), + anno::description("Determines where the object is visible") + ]] +) [[ + anno::display_name("Add cut-outs"), + anno::description("Adds cut-outs to existing materials. Also forces material to be thin-walled. Good for modeling leaves, grass or fences."), + anno::thumbnail(".thumbs/add_cutout.png"), + anno::in_group("Material modifiers"), + icon(".icons/add_cutouts.svg"), + anno::ui_order(22), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: true, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: base.geometry.normal, + cutout_opacity: cutout + ) +); + +export material add_simple_sticker( + color diffuse_color = color(.5) + [[ + anno::display_name("Sticker color"), + anno::description("The color of the material"), + anno::ui_order(2) + ]], + float roughness = 0.05 + [[ + anno::display_name("Sticker roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(3) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("Sticker IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Sticker reflectivity"), + anno::hard_range(0.0,1.), + anno::description("Additional Reflectivity control"), + anno::ui_order(4) + ]], + float3 sticker_normal = state::normal() + [[ + anno::display_name("Sticker bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]], + float sticker_mask = 0.0 + [[ + anno::display_name("Sticker mask"), + anno::hard_range(0.0,1.0), + anno::description("Determines extent of the sticker"), + anno::ui_order(5) + ]], + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a sticker added"), + anno::ui_order(1) + ]] +) [[ + anno::display_name("Add simple sticker"), + anno::description("A quick way for adding simple stickers to a material. The sticker is a simple dielectric and needs a mask to define its extent."), + anno::thumbnail(".thumbs/add_simple_sticker.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_simple_sticker.svg"), + anno::ui_order(23), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = let{ + material blend_material = blend( + blend: scratched_plastic_v2( + diffuse_color: diffuse_color, + roughness: roughness, + ior: ior, + reflectivity: reflectivity, + normal: sticker_normal), + base: base, + weight: sticker_mask + ); +} in material( + surface: blend_material.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_globalbump( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a bump map") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bump"), + anno::description("An additional global bump map for the material. Local bump map of the base material is preserved.") + ]] +) [[ + anno::display_name("Add global bumpmap"), + anno::description("Adds global bumpmap to existing materials. Local bump map of the base material is preserved."), + anno::thumbnail(".thumbs/add_globalbump.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_global_bumpmap.svg"), + anno::ui_order(24), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_displacement( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a bump map") + ]], + float displacement = 0.0 + [[ + anno::display_name("Displacement amount"), + anno::description("Attach displacement texture here. Note that the object needs to be set up correctly to have good displacement results.") + ]], + uniform float displacement_scale = 1.0 + [[ + anno::display_name("Displacement scale"), + anno::description("A global scale factor for the displacement amount") + ]] +) [[ + anno::display_name("Add displacement"), + anno::description("Adds displacement to existing materials"), + anno::thumbnail(".thumbs/add_displacement.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Displacement"), + icon(".icons/add_displacement.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: displacement*displacement_scale*state::scene_units_per_meter()*state::normal(), + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_vector_displacement( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get displacement") + ]], + float3 displacement = float3(0.0) + [[ + anno::display_name("Displacement amount"), + anno::description("Attach displacement texture here. Note that the object needs to be set up correctly to have good displacement results") + ]], + uniform displacement_vector_space space = displacement_vector_tangent_space + [[ + anno::display_name("Displacement vector mode"), + anno::description("Specify the space of the vector dispacement map") + ]], + uniform float displacement_scale = 1.0 + [[ + anno::display_name("Displacement scale"), + anno::description("A global scale factor for the displacement amount") + ]] +) [[ + anno::display_name("Add vector displacement"), + anno::description("Adds vector displacement to existing materials"), + anno::thumbnail(".thumbs/add_displacement.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Displacement"), + icon(".icons/add_vector_displacement.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: state::scene_units_per_meter()*transform_displacement_vector(displacement, space, displacement_scale), + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_round_edges( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get round edges") + ]], + uniform float round_edges_radius = 0.02 + [[ + anno::display_name("Round edge radius"), + anno::description("Influence radius around the edges in meters") + ]], + uniform float round_edges_roundness = 1.0 + [[ + anno::display_name("Round edge roundness"), + anno::description("Determines how round the edge will look"), + 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, unless + this parameter is set true, in which case the smoothing happens between + facets irrespective of their materials") + ]] +) [[ + anno::display_name("Add round edges"), + anno::description("Adds round edges to existing materials"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_round_edges.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: state::rounded_corner_normal( + radius: round_edges_radius, + roundness: round_edges_roundness, + across_materials: round_edges_across_materials + ), + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_emission( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get emission added") + ]], + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Add emission"), + anno::description("Adds emission to a material"), + anno::thumbnail(".thumbs/add_emission.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Emission"), + icon(".icons/add_emission.svg"), + anno::ui_order(26), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + suitable_as_light(), + anno::key_words(string[]("modifier","generic")) +]] = +let { + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} +in material( + surface: material_surface( + scattering: base.surface.scattering, + emission: material_emission( + emission: df::diffuse_edf(), + intensity: unit_intensity*tint*unit_scale, //for this mode, tint is assumes to be a color filter absorbing light + mode: imode + ) + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material add_thermal_emission( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get emission added") + ]], + uniform float temperature = 6500. + [[ + anno::display_name("Temperature"), + anno::description("The color temperature of the light in Kelvin") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Add thermal emission"), + anno::description("Adds emission to a material, color is based on a \"color temperature\""), + anno::thumbnail(".thumbs/add_thermal_emission.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Emission"), + icon(".icons/add_thermal_emission.svg"), + anno::ui_order(27), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + suitable_as_light(), + anno::key_words(string[]("modifier","generic")) +]] = +let { + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; + color emission_color = math::blackbody(temperature); + + color scaled_intensity = unit_intensity * (emission_color / math::luminance(emission_color));} +in material( + surface: material_surface( + scattering: base.surface.scattering, + emission: material_emission( + emission: df::diffuse_edf(), + intensity: scaled_intensity, + mode: imode + ) + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); +//endgroup + +/**-*/ + +//group Emissive materials + +export material light_omni ( + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Diffuse emission"), + anno::description("Emissive material emitting in all directions"), + anno::thumbnail(".thumbs/light_omni.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::ui_order(5000), + anno::hidden(), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = +let{ + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} in material ( + surface: material_surface ( + emission: material_emission ( + emission: df::diffuse_edf(), + intensity: tint*unit_intensity*unit_scale, + mode: imode + ) + ) +); + +export material light_spot ( + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform float spot_exponent = 30 + [[ + anno::display_name("Spot focus"), + anno::description("larger values lead to more focused spotlights") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Spotlight emission"), + anno::description("Emissive material emitting focused in one direction"), + anno::thumbnail(".thumbs/light_spot.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::hidden(), + anno::ui_order(5051), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = +let{ + //since this is a spotlight, we need the apex angle to convert from candela to lumen + //http://www.compuphase.com/electronics/candela_lumen.htm + //uniform float cos_apexangle_2 = math::pow(0.5,1./spot_exponent); //spot exponent 0 ->4pi + //uniform float apexfactor = 2*math::PI*(1.0-cos_apexangle_2); + + //correct integral + uniform float factor = (spot_exponent == 0)? 4*math::PI: 2*math::PI/(spot_exponent+1); + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*factor; + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} in material ( + surface: material_surface ( + emission: material_emission ( + emission: df::spot_edf(exponent: spot_exponent,global_distribution: true, global_frame: float3x3(1.,0,0, 0,1.,0., 0.,0,-1) ), + intensity: tint*unit_intensity*unit_scale, + mode: imode + ) + ) +); + +export material light_ies ( + uniform light_profile profile + [[ + anno::display_name("IES light profile data"), + anno::description("Data to describe the distribution of the light") + ]], + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(),//deprecated + anno::description("Modeling unit to meter conversion factor") + ]] +) [[ + anno::display_name("IES file based emission"), + anno::description("Emissive material emitting as described in an IES file"), + anno::thumbnail(".thumbs/light_ies.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::hidden(), + anno::ui_order(5052), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = material ( + surface: material_surface ( + emission: material_emission ( + emission: df::measured_edf(profile: profile,global_distribution: true, global_frame: float3x3(1.,0,0, 0,1.,0., 0.,0,-1) ), + intensity: tint*intensity*unit_scale + ) + ) +); + +//endgroup + +//group Deprecated + +//deprecated functionality=========================================================================================== +export annotation ui_position(int position); +export annotation typical_object_size(float size); + +export material metal( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::description("The color of the metal") + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflectivity"), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple metal, deprecated"), + anno::description("A basic metallic material"), + anno::thumbnail(".thumbs/metal.png"), + anno::author("NVIDIA Corporation"), + anno::hidden(), + //anno::deprecated("Use scratched_metal_v2"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: metal_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material plastic( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float roughness = 0.25 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple plastic, deprecated"), + anno::description("A basic dielectric, works for everything opaque that is not metallic"), + anno::thumbnail(".thumbs/plastic.png"), + anno::author("NVIDIA Corporation"), + anno::hidden(), + //anno::deprecated("Use scratched_plastic_v2"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_metal( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::description("The color of the metal") + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight") + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees.") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Metal , deprecated"), + anno::description("A metallic material with stretched reflections"), + anno::thumbnail(".thumbs/scratched_metal.png"), + anno::hidden(), + //anno::deprecated("Use scratched_metal_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: metal_color, + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_plastic( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(2) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(4) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(5) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Additional Reflectivity control"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Plastic, deprecated"), + anno::description("A basic dielectric, works for everything opaque that is not metallic. Supports stretched highlights."), + anno::thumbnail(".thumbs/scratched_plastic.png"), + anno::hidden(), + //anno::deprecated("Use scratched_plastic_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material apply_colorfalloff( + material base = scratched_metal(metal_color: color(1.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + color color_0 = color(1.,0.,0.) + [[ + anno::display_name("Color 1"), + anno::description("The color of the dust") + ]], + color color_1 = color(0.,1.,0.) + [[ + anno::display_name("Color 2"), + anno::description("The color of the dust") + ]], + color color_2 = color(0.,0.,1.) + [[ + anno::display_name("Color 3"), + anno::description("The color of the dust") + ]], + color color_3 = color(1.,0.,0.) + [[ + anno::display_name("Color 4"), + anno::description("The color of the dust") + ]], + color color_4 = color(0.,1.,0.) + [[ + anno::display_name("Color 5"), + anno::description("The color of the dust") + ]] +) +[[ + anno::display_name("Apply a color falloff, deprecated"), + anno::description("Makes the color view dependent"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + anno::thumbnail(".thumbs/apply_colorfalloff.png"), + anno::hidden(), + //anno::deprecated("Use apply_colorfalloff_v2 instead"), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::measured_curve_factor( + curve_values: color[](color_0,color_1,color_2,color_3,color_4), + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material flex_material( + color base_color = color(.5) + [[ + anno::display_name("Base color"), + anno::in_group("Base"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float diffuse_roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to a more \"powdery\" look"), + anno::ui_order(2) + ]], + uniform bool is_metal = false + [[ + anno::display_name("Metallic material"), + anno::in_group("Base"), + anno::description("If true, reflection will be colored and independent of view direction. If false, reflection will be white and direction dependent. Directional dependence is in this case based on the IOR (Fresnel effect)."), + anno::ui_order(3) + ]], + float reflectivity = 1.0 + [[ + anno::display_name("Reflection weight"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Controls the amount of reflection"), + anno::ui_order(5) + ]], + float reflection_roughness = 0.1 + [[ + anno::display_name("Reflection roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to more blurry reflections"), + anno::ui_order(4) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Reflection anisotropy"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(6) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(7) + ]], + float transparency = 0.0 + [[ + anno::display_name("Transmission weight"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("Weights how much light passes through the object vs. its diffuse reflectivity"), + anno::ui_order(12) + ]], + color transmission_color = color(1.) + [[ + anno::display_name("Transmission color"), + anno::in_group("Transmission"), + anno::description("Color effect for transmission independent of thickness of the object, similar to stained glass"), + anno::ui_order(8) + ]], + uniform color volume_color = color(1.0) + [[ + anno::display_name("Volume color"), + anno::in_group("Transmission"), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at \"Volume reference distance\"(m)"), + anno::ui_order(9) + ]], + float transmission_roughness = 0.0 + [[ + anno::display_name("Transmission roughness"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("higher values lead to objects seen through the material to appear blurry"), + anno::ui_order(11) + ]], + uniform float base_thickness = 0.1 + [[ + anno::display_name("Volume reference distance"), + anno::in_group("Transmission"), + anno::soft_range(0.0,10.0), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(10) + ]], + uniform float ior = 1.5 + [[ + anno::display_name("IOR"), + anno::in_group("Global"), + anno::soft_range(1.0,4.0), + anno::description("Determines refraction in the volume. It also influences the reflectivity for materials that are not metallic."), + anno::ui_order(14) + ]], + uniform bool thin_walled = false + [[ + anno::display_name("Thin walled"), + anno::in_group("Global"), + anno::description("Thin walled materials do not refract and do not have volume effects. Good for soap bubbles or window glass."), + anno::ui_order(13) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::in_group("Global"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(16) + ]], + uniform float abbe_number = 0.0 + [[ + anno::in_group("Global"), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off, Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Flexible material model, deprecated"), + anno::description("A complex material that can be configured to a wide variety of looks"), + anno::thumbnail(".thumbs/flex_material.png"), + anno::hidden(), + //anno::deprecated("Use flex_material_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("generic","complex")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: reflection_roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: is_metal? base_color: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); + bsdf diffuse_bsdf = df::diffuse_reflection_bsdf( + tint: base_color, + roughness: diffuse_roughness + ); + bsdf transmission_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: transmission_roughness + ); + bsdf add_transparency = df::weighted_layer( + weight: transparency, + layer: transmission_bsdf, + base: diffuse_bsdf, + normal: normal + ); + bsdf add_reflection = is_metal? df::weighted_layer( + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ): df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ); + bsdf add_normal = df::weighted_layer( + normal: normal, + weight: 1., + layer: add_reflection + ); +} in material( + thin_walled: thin_walled, + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number), + surface: material_surface( + scattering: add_normal + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ) +); + +export material thin_glass( + color glass_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin glass, deprecated"), + anno::description("A basic transmissive dielectric without refraction or volume"), + anno::thumbnail(".thumbs/thin_glass.png"), + anno::hidden(), + //anno::deprecated("Use thin_glass_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf glossy_transmission_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: glass_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + layer: glossy_transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) +); + +export material thin_translucent( + color surface_color = color(.95) + [[ + anno::display_name("Diffuse color"), + anno::description("The color of the material") + ]], + color translucent_color = color(.95) + [[ + anno::display_name("Translucence color"), + anno::description("The color of the volume of the material") + ]], + float translucency = 0.5 + [[ + anno::display_name("Translucence weight"), + anno::hard_range(0.0,1.), + anno::description("Fraction of the incoming light that should be visible on the backside") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin translucent, deprecated"), + anno::description("A diffuse transmissive dielectric material"), + anno::thumbnail(".thumbs/thin_translucent.png"), + anno::hidden(), + //anno::deprecated("Use thin_translucent_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","leaves","paper","sheets")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf transmission_bsdf = df::diffuse_transmission_bsdf( + tint: translucent_color + ); + bsdf base_bsdf = df::diffuse_reflection_bsdf( + tint: surface_color + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + weight: translucency, + normal: normal, + base: base_bsdf, + layer: df::weighted_layer( + layer: transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) + ) +); + +export material thick_glass( + color transmission_color = color(1.0) + [[ + anno::ui_order(1), + anno::display_name("Transmission color"), + anno::description("Colors the light entering the volume, similar to stained glass") + ]], + uniform color glass_color = color(.95) + [[ + anno::ui_order(2), + anno::display_name("Volume color"), + anno::description("The color of the glass body") + ]], + float roughness = 0.0 + [[ + anno::ui_order(4), + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::ui_order(5), + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction") + ]], + uniform float base_thickness = .1 + [[ + anno::ui_order(3), + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here.") + + ]], + float3 normal = state::normal() + [[ + anno::ui_order(7), + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]], + uniform float abbe_number = 0.0 + [[ + anno::ui_order(6), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0) + ]] +) +[[ + anno::display_name("Thick glass, deprecated"), + anno::description("A basic transmissive dielectric with refraction and coloring in the volume"), + anno::thumbnail(".thumbs/thick_glass.png"), + anno::hidden(), + //anno::deprecated("Use thick_glass_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf glossy_bsdf_transmission = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: roughness + ); +} in material( + thin_walled: false, + surface: material_surface( + df::weighted_layer( + normal: normal, + weight: 1., + layer: df::fresnel_layer( + layer: glossy_bsdf, + base: glossy_bsdf_transmission, + ior: ior, + normal: normal + ) + ) + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(glass_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material thick_translucent( + color transmission_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + uniform color volume_color = color(.95) + [[ + anno::display_name("Volume color"), + anno::description("The color of the volume at \"Volume reference distance\""), + anno::ui_order(2) + ]], + uniform float volume_scattering = 0.5 + [[ + anno::display_name("Volume scattering"), + anno::hard_range(0.0,.99999), + anno::description("Amount of scattering for objects at \"Volume reference distance\""), + anno::ui_order(3) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(5) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Overall reflectivity of the material"), + anno::ui_order(6) + ]], + uniform float base_thickness = .1 + [[ + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" and \"Volume scattering\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(4) + + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(9) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction"), + anno::ui_order(7) + ]], + uniform float abbe_number = 0.0 + [[ + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Thick translucent, deprecated"), + anno::description("A subsurface scattering material"), + anno::thumbnail(".thumbs/thick_translucent.png"), + anno::hidden(), + //anno::deprecated("Use thick_translucent_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","wax","milk")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf transmission_bsdf = df::specular_bsdf( + mode: df::scatter_transmit, + tint: transmission_color + ); + +} in material( + thin_walled: false, + surface: material_surface( + df::fresnel_layer( + normal: normal, + weight: reflectivity, + ior: ior, + layer: glossy_bsdf, + base: df::weighted_layer( + normal: normal, + weight: 1., + layer: transmission_bsdf + ) + ) + ), + volume: material_volume( + scattering_coefficient: (base_thickness <= 0)? color(0): math::log(color(1.-volume_scattering)) / - base_thickness, + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material apply_clearcoat( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied"), + anno::ui_order(1) + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat"), + anno::ui_order(5) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat"), + anno::ui_order(3) + ]], + float visibility = 1.0 + [[ + anno::display_name("Coat visibility"), + anno::hard_range(0.0,1.0), + anno::description("Determines visibility of the clear coat"), + anno::ui_order(4) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(6) + ]], + color coat_filter_color = color(1.) + [[ + anno::display_name("Coat filter color"), + anno::description("For simulating coatings with colored resins that modulate the color of underlying layers"), + anno::ui_order(2) + ]] +) +[[ + anno::display_name("Apply clear coating, deprecated"), + anno::description("Apply clear coat to an existing material"), + anno::author("NVIDIA Corporation"), + anno::thumbnail(".thumbs/apply_clearcoat.png"), + anno::hidden(), + //anno::deprecated("Use apply_clearcoat_v2 instead"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: color(1.) + ); + color base_tint = blend_colors(color(1.), coat_filter_color, color_layer_blend, visibility).tint; +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: normal, + weight: visibility, + layer: glossy_bsdf, + base: df::tint(tint: base_tint, base: base.surface.scattering) + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_metalcoat( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a metallic coating applied"), + anno::ui_order(1) + ]], + color metal_color = color(.95) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the metal"), + anno::ui_order(2) + ]], + float visibility = .3 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the coat"), + anno::ui_order(4) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metal coat"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(5) + ]] +) +[[ + anno::display_name("Apply thin metal coating, deprecated"), + anno::description("Apply metal coat to an existing material"), + anno::thumbnail(".thumbs/apply_metalcoat.png"), + anno::hidden(), + //anno::deprecated("Use apply_metalcoat_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: metal_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: visibility, + normal: normal, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +//endgroup + +/*-**/ diff --git a/yahboom_dofbot/materials/mdl/support_definitions.mdl b/yahboom_dofbot/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/yahboom_dofbot/materials/mdl/support_definitions.mdl @@ -0,0 +1,4292 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + +mdl 1.8; + +import ::anno::*; +import ::math::*; + +using .::aux_definitions import xy; +import ::state::*; +import ::scene::*; + +export using ::state import coordinate_space; //enum type +import ::tex::*; +export using ::tex import gamma_mode; //enum type +export using ::tex import wrap_mode; //enum type + +module [[ + anno::version( 1, 2, 0), + anno::display_name("NVIDIA support definitions") +]]; + +export annotation icon(string path); + + +export float data_lookup_float( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float default_value = float() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float(name, default_value); +} + +export float2 data_lookup_float2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float2 default_value = float2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float2(name, default_value); +} + +export float3 data_lookup_float3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float3 default_value = float3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float3(name, default_value); +} + +export float4 data_lookup_float4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float4 default_value = float4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float4(name, default_value); +} + +export int data_lookup_int( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int default_value = int() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int(name, default_value); +} + +export int2 data_lookup_int2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int2 default_value = int2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int2(name, default_value); +} + +export int3 data_lookup_int3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int3 default_value = int3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int3(name, default_value); +} + +export int4 data_lookup_int4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int4 default_value = int4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int4(name, default_value); +} + +export color data_lookup_color( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + color default_value = color() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup color"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_color(name, default_value); +} + +export uniform float data_lookup_uniform_float( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float default_value = float() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup unfirom float"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float(name, default_value); +} + +export uniform float2 data_lookup_uniform_float2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float2 default_value = float2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform float2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float2(name, default_value); +} + +export uniform float3 data_lookup_uniform_float3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float3 default_value = float3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform float3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float3(name, default_value); +} + +export uniform float4 data_lookup_uniform_float4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float4 default_value = float4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup unfirom float4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float4(name, default_value); +} + +export uniform int data_lookup_uniform_int( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int default_value = int() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int(name, default_value); +} + +export uniform int2 data_lookup_uniform_int2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int2 default_value = int2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int2(name, default_value); +} + +export uniform int3 data_lookup_uniform_int3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int3 default_value = int3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int3(name, default_value); +} + +export uniform int4 data_lookup_uniform_int4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int4 default_value = int4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int4(name, default_value); +} + +export uniform color data_lookup_uniform_color( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform color default_value = color() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform color"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_color(name, default_value); +} + + + +// operator nodes +// Add +export int add(int a=0, int b=0) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(300) +]] +{ return a+b; } + +export float add(float a=0.0, float b=0.0) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(301) +]] +{ return a+b; } + +export float2 add(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(302) +]] +{ return a+b; } + +export float3 add(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(303) +]] +{ return a+b; } + +export float4 add(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(304) +]] +{ return a+b; } + +export color add(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(305) +]] +{ return a+b; } + +export int subtract(int a=0, int b=0) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(310) +]] +{ return a-b; } + +export float subtract(float a=0.0, float b=0.0) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(311) +]] +{ return a-b; } + +export float2 subtract(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(312) +]] +{ return a-b; } + +export float3 subtract(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(313) +]] +{ return a-b; } + +export float4 subtract(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(314) +]] +{ return a-b; } + +export color subtract(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(315) +]] +{ return a-b; } + +export int multiply(int a=0, int b=0) +[[ + anno::display_name("Multiply"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(320) +]] +{ return a*b; } + +export float multiply(float a=0.0, float b=0.0) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(321) +]] +{ return a*b; } + +export float2 multiply(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(322) +]] +{ return a*b; } + +export float3 multiply(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(323) +]] +{ return a*b; } + +export float4 multiply(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(324) +]] +{ return a*b; } + +export color multiply(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(325) +]] +{ return a*b; } + +export int divide(int a=0, int b=0) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(326) +]] +{ return a/b; } + +export float divide(float a=0.0, float b=0.0) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(327) +]] +{ return a/b; } + +export float2 divide(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(328) +]] +{ return a/b; } + +export float3 divide(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(329) +]] +{ return a/b; } + +export float4 divide(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(330) +]] +{ return a/b; } + +export color divide(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(331) +]] +{ return a/b; } + +export int condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + int a=0 [[ + anno::description("Value returned when the condition is true.") + ]], + int b=0 [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(332) +]] +{ return x?a:b; } + +export float condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float a=0.0 [[ + anno::description("Value returned when the condition is true.") + ]], + float b=0.0 [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(333) +]] +{ return x?a:b; } + +export float2 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float2 a=float2(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float2 b=float2(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(334) +]] +{ return x?a:b; } + +export float3 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float3 a=float3(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float3 b=float3(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(335) +]] +{ return x?a:b; } + +export float4 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float4 a=float4(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float4 b=float4(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(336) +]] +{ return x?a:b; } + +export color condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + color a=color(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + color b=color(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(337) +]] +{ return x?a:b; } + +export bool compare(float a, float b) +[[ + anno::display_name("Compare"), + anno::description("Returns true when a is greater than b; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Comparison"), + icon(".icons/compare.svg"), + anno::ui_order(338) +]] +{ return a>b; } + +export bool equality(bool a, bool b) +[[ + anno::display_name("Check equality bool"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(339) +]] +{ return a==b; } + +export bool equality(int a, int b) +[[ + anno::display_name("Check equality int"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(340) +]] +{ return a==b; } + +export bool equality(int2 a, int2 b) +[[ + anno::display_name("Check equality int2"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(341) +]] +{ return a==b; } + +export bool equality(int3 a, int3 b) +[[ + anno::display_name("Check equality int3"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(342) +]] +{ return a==b; } + +export bool equality(float a, float b) +[[ + anno::display_name("Check equality float"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(343) +]] +{ return a==b; } + +export bool equality(float2 a, float2 b) +[[ + anno::display_name("Check equality float2"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(344) +]] +{ return a==b; } + +export bool equality(float3 a, float3 b) +[[ + anno::display_name("Check equality float3"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(345) +]] +{ return a==b; } + +export bool equality(color a, color b) +[[ + anno::display_name("Check equality color"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(346) +]] +{ return a==b; } + +//constants nodes. +export bool bool_const(uniform bool b = true) +[[ + anno::display_name("Constant bool"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1000) +]] +{ return b; } + +export int int_const(uniform int i = 0) +[[ + anno::display_name("Constant int"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1001) +]] +{ return i; } + +export float float_const(uniform float f = 0.) +[[ + anno::display_name("Constant float"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1002) +]] +{ return f; } + +export float2 float2_const(uniform float2 f2 = float2(0.)) +[[ + anno::display_name("Constant float2"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1003) +]] +{ return f2; } + +export float3 float3_const(uniform float3 f3 = float3(0.)) +[[ + anno::display_name("Constant float3"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1004) +]] +{ return f3; } + +export float4 float4_const(uniform float4 f4 = float4(0.)) +[[ + anno::display_name("Constant float4"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1005) +]] +{ return f4; } + +export color color_const(uniform color c = color(0.)) +[[ + anno::display_name("Constant color"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1006) +]] +{ return c; } + +export uniform texture_2d texture_2d_const(uniform texture_2d tex = texture_2d())[[ + anno::display_name("Constant texture_2d"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1007) +]] +{ return tex; } + +//exports from tex: +export int texture_width( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose width is queried.") + ]]) uniform +[[ + anno::display_name("Width of texture"), + anno::description("Returns the width of the input texture in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Width"), + icon(".icons/texture_width.svg"), + anno::ui_order(141) +]] +{ return tex::width(tex); } + +export int texture_width( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose tile width is queried.") + ]], + int2 uv_tile = int2(0, 0) [[ + anno::description("UDIM tile index as (u, v).") + ]]) uniform +[[ + anno::display_name("Width of a texture tile"), + anno::description("Returns the width of the specified texture tile in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Width"), + icon(".icons/texture_width.svg"), + anno::ui_order(143) +]] +{ return tex::width(tex, uv_tile); } + +export int height( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose height is queried.") + ]]) uniform +[[ + anno::display_name("Height of texture"), + anno::description("Returns the height of the input texture in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Height"), + icon(".icons/texture_height.svg"), + anno::ui_order(142) +]] +{ return tex::height(tex); } + +export int height( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose tile height is queried.") + ]], + int2 uv_tile = int2(0, 0) [[ + anno::description("UDIM tile index as (u, v).") + ]]) uniform +[[ + anno::display_name("Height of a texture tile"), + anno::description("Returns the height of the specified texture tile in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Height"), + icon(".icons/texture_height.svg"), + anno::ui_order(144) +]] +{ return tex::height(tex,uv_tile); } + +export float2 transform_st( + float rotation = 0.0 [[ + anno::description("Rotation angle in radians.") + ]], + float2 translation = float2(0.0) [[ + anno::description("Translation offset applied after rotation and scaling.") + ]], + float2 scale = float2(1.0) [[ + anno::description("Scale factor applied per coordinate axis.") + ]], + float2 st = float2(0.0) [[ + anno::description("Input 2D coordinate to transform.") + ]] +) +[[ + anno::display_name("Transform 2D"), + anno::description("Applies rotation, scaling, and translation to a 2D coordinate."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform"), + icon(".icons/transform.svg"), + anno::ui_order(1019) +]] +{ + float s = math::sin(rotation); + float c = math::cos(rotation); + float2 st_t=st; + st_t = float2(s*st_t.x+c*st_t.y,s*st_t.y-c*st_t.x); + return st_t*scale+ translation; +} + +export color biased_color_blend( + float w1 = 0.0 [[ + anno::description("Weight for the first input color.") + ]], + color c1 = color(0.0) [[ + anno::description("First input color.") + ]], + float w2 = 0.0 [[ + anno::description("Weight for the second input color.") + ]], + color c2 = color(0.0) [[ + anno::description("Second input color.") + ]], + float w3 = 0.0 [[ + anno::description("Weight for the third input color.") + ]], + color c3 = color(0.0) [[ + anno::description("Third input color.") + ]], + color mean = color(0.5) [[ + anno::description("Expected average color used to preserve contrast in the biased blend.") + ]] +) +[[ + anno::display_name("Biased color blend"), + anno::description("Blends up to three colors using weights; set mean to the expected average to preserve contrast when mixing textures."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Blend"), + icon(".icons/biased_color_blend.svg"), + anno::ui_order(539) +]] +{ + color o=w1*c1+w2*c2+w3*c3; + float s=w1+w2+w3; + float s2=w1*w1+w2*w2+w3*w3; +return mean + (o-s*mean)/ math::sqrt(s2); +} + + +export float lookup_float( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(100) +]] +{ return tex::lookup_float( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + +export float3 lookup_float3( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float3"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(110) +]] +{ return tex::lookup_float3( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +export float4 lookup_float4( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float4"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(120) +]] { return tex::lookup_float4( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +export color lookup_color( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup color"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(130) +]] { return tex::lookup_color( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +// check for valid resource +export bool texture_isvalid( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to validate.") + ]]) uniform +[[ + anno::display_name("Is texture valid?"), + anno::description("Returns true when the provided texture handle is valid and can be sampled."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info"), + icon(".icons/texture_isvalid.svg"), + anno::ui_order(140) +]] +{ return tex::texture_isvalid(tex); } + + +//exports from state: +export float3 position() +[[ + anno::display_name("Hit position"), + anno::description("Returns the current shading position in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/position.svg"), + anno::ui_order(1012) +]] +{ return state::position(); } + +export float3 normal() +[[ + anno::display_name("Shade normal"), + anno::description("Returns the current shading normal in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/normal.svg"), + anno::ui_order(1013) +]] +{ return state::normal(); } + +//new: quick access to xy: +export float2 texture_coordinate_2d( + uniform int i = 0 [[ + anno::description("Texture coordinate set index.") + ]]) +[[ + anno::display_name("Texture coordinate 2D"), + anno::description("Returns authored texture coordinates from the selected texture coordinate set."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Coordinate"), + icon(".icons/texture_coordinate.svg"), + anno::ui_order(1010) +]] +{ return xy(state::texture_coordinate(i)); } + +export float3 texture_coordinate_3d( + uniform int i = 0 [[ + anno::description("Texture coordinate set index.") + ]]) +[[ + anno::display_name("Texture coordinate 3D"), + anno::description("Returns authored texture coordinates from the selected texture coordinate set."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Coordinate"), + icon(".icons/texture_coordinate.svg"), + anno::ui_order(1011) +]] +{ return state::texture_coordinate(i); } + +export float3 texture_tangent_u( + uniform int i = 0 [[ + anno::description("Texture coordinate set index used to derive the U tangent.") + ]]) +[[ + anno::display_name("Shade tangent"), + anno::description("Returns the current shading tangent (U direction) in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Tangent"), + icon(".icons/texture_tangent.svg"), + anno::ui_order(1014) +]] +{ return state::texture_tangent_u(i); } + +export float3 texture_tangent_v( + uniform int i = 0 [[ + anno::description("Texture coordinate set index used to derive the V tangent.") + ]]) +[[ + anno::display_name("Shade bi-tangent"), + anno::description("Returns the current shading bitangent (V direction) in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Tangent"), + icon(".icons/texture_tangent.svg"), + anno::ui_order(1015) +]] +{ return state::texture_tangent_v(i); } + +export float animation_time() +[[ + anno::display_name("Animation time"), + anno::description("Returns elapsed animation time in seconds from the start of the timeline."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene"), + icon(".icons/animation_time.svg"), + anno::ui_order(1030) +]] +{ return state::animation_time(); } + + +export float3 transform_point( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input point.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed point.") + ]], + float3 point=float3(0.) [[ + anno::description("Point to transform.") + ]]) +[[ + anno::display_name("Transform point"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1020) +]] +{ return state::transform_point(from, to, point); } + +export float3 transform_vector( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input vector.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed vector.") + ]], + float3 vector=float3(0.) [[ + anno::description("Vector to transform.") + ]]) +[[ + anno::display_name("Transform vector"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1021) +]] +{ return state::transform_vector(from, to, vector); } + +export float3 transform_normal( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input normal.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed normal.") + ]], + float3 normal=float3(0.,1.,0.) [[ + anno::description("Normal vector to transform.") + ]]) +[[ + anno::display_name("Transform normal"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1022) +]] +{ return state::transform_normal(from, to, normal); } + +export float transform_scale( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input scale value.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed scale value.") + ]], + float scale=0. [[ + anno::description("Scale value to transform.") + ]]) +[[ + anno::display_name("Transform scale"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1023) +]] +{ return state::transform_scale(from, to, scale); } + +float2 r2d(float2 x, float theta) +{ + theta *= math::acos(-1.0) * 2.0; + return float2( + math::cos(theta) * x[0] + math::sin(theta) * x[1], + math::cos(theta) * x[1] - math::sin(theta) * x[0]); +} + +export float3 rotate_around_x( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around X"), + anno::description("Rotates a 3D point around the X axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1024) +]] +{ + float2 v = r2d(float2(p.y, p.z), theta); + return float3(p.x, v[0], v[1]); +} + +export float3 rotate_around_y( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around Y"), + anno::description("Rotates a 3D point around the Y axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1025) +]] +{ + float2 v = r2d(float2(p.x, p.z), theta); + return float3(v[0], p.y, v[1]); +} + +export float3 rotate_around_z( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around Z"), + anno::description("Rotates a 3D point around the Z axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1026) +]] +{ + float2 v = r2d(float2(p.x, p.y), theta); + return float3(v[0], v[1], p.z); +} + +export float meters_per_scene_unit() +[[ + anno::display_name("Meters per scene unit"), + anno::description("Returns the conversion factor between scene units and meters."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene", "Units"), + icon(".icons/meters_per_scene_unit.svg"), + anno::ui_order(1031) +]] +{ return state::meters_per_scene_unit(); } + +export float scene_units_per_meter() +[[ + anno::display_name("Scene units per meter"), + anno::description("Returns the conversion factor between scene units and meters."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene", "Units"), + icon(".icons/scene_units_per_meter.svg"), + anno::ui_order(1032) +]] +{ return state::scene_units_per_meter(); } + +export int object_id() +[[ + anno::display_name("Object Id"), + anno::description("Returns the unique integer identifier of the currently shaded object."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/object_id.svg"), + anno::ui_order(1033) +]] +{ return state::object_id(); } + +//exported from math: +export color blackbody( + float temperature=6500. [[ + anno::description("Blackbody temperature in Kelvin used to compute the emitted color.") + ]]) +[[ + anno::display_name("Blackbody color"), + anno::description("Returns the RGB color of an ideal blackbody radiator at the specified temperature in Kelvin."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/blackbody.svg"), + anno::ui_order(409) +]] +{ return math::blackbody(temperature); } + +export float PI() +[[ + anno::display_name("Pi"), + anno::description("Returns the mathematical constant pi (approximately 3.141592653589793)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Constants"), + icon(".icons/PI.svg"), + anno::ui_order(1007) +]] +{ return math::PI; } + +export int abs(int a=0) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(350) +]] +{ return math::abs(a); } + +export float abs(float a=0.) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(351) +]] +{ return math::abs(a); } + +export float2 abs(float2 a=float2(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(352) +]] +{ return math::abs(a); } + +export float3 abs(float3 a=float3(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(353) +]] +{ return math::abs(a); } + +export float4 abs(float4 a=float4(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(354) +]] +{ return math::abs(a); } + +export color abs(color a=color(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(355) +]] +{ return math::abs(a); } + +export float acos(float a=0.) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(360) +]] +{ return math::acos(a); } + +export float2 acos(float2 a=float2(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(361) +]] +{ return math::acos(a); } + +export float3 acos(float3 a=float3(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(362) +]] +{ return math::acos(a); } + +export float4 acos(float4 a=float4(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(363) +]] +{ return math::acos(a); } + + +export float asin(float a=0.) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(370) +]] +{ return math::asin(a); } + +export float2 asin(float2 a=float2(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(371) +]] +{ return math::asin(a); } + +export float3 asin(float3 a=float3(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(372) +]] +{ return math::asin(a); } + +export float4 asin(float4 a=float4(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(373) +]] +{ return math::asin(a); } + +export float atan(float a=0.) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(380) +]] +{ return math::atan(a); } + +export float2 atan(float2 a=float2(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(381) +]] +{ return math::atan(a); } + +export float3 atan(float3 a=float3(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(382) +]] +{ return math::atan(a); } + +export float4 atan(float4 a=float4(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(383) +]] +{ return math::atan(a); } + +export float atan2( + float y=0. [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float x=0. [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(390) +]] +{ return math::atan2(y,x); } + +export float2 atan2( + float2 y=float2(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float2 x=float2(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(391) +]] +{ return math::atan2(y,x); } + +export float3 atan2( + float3 y=float3(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float3 x=float3(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(392) +]] +{ return math::atan2(y,x); } + +export float4 atan2( + float4 y=float4(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float4 x=float4(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(393) +]] +{ return math::atan2(y,x); } + +export float average(float2 a=float2(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(400) +]] +{ return math::average(a); } + +export float average(float3 a=float3(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(401) +]] +{ return math::average(a); } + +export float average(float4 a=float4(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(402) +]] +{ return math::average(a); } + +export float average(color a=color(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(403) +]] +{ return math::average(a); } + +export float ceil(float a=0.) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(410) +]] +{ return math::ceil(a); } + +export float2 ceil(float2 a=float2(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(411) +]] +{ return math::ceil(a); } + +export float3 ceil(float3 a=float3(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(411) +]] +{ return math::ceil(a); } + +export float4 ceil(float4 a=float4(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(412) +]] +{ return math::ceil(a); } + +export int clamp( + int a=0 [[anno::description("Input value to clamp.")]], + int min=0 [[anno::description("Lower bound of the output range.")]], + int max=1 [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(420) +]] +{ return math::clamp(a,min,max); } + +export float clamp( + float a=0. [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(421) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float2 min=float2(0.) [[anno::description("Lower bound of the output range.")]], + float2 max=float2(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(422) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float3 min=float3(0.) [[anno::description("Lower bound of the output range.")]], + float3 max=float3(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(423) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float4 min=float4(0.) [[anno::description("Lower bound of the output range.")]], + float4 max=float4(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(424) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + color min=color(0.) [[anno::description("Lower bound of the output range.")]], + color max=color(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(425) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float2 min=float2(0.) [[anno::description("Lower bound of the output range.")]], + float max=1. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(426) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float2 max=float2(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(427) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=1. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(428) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float3 min=float3(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(429) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float3 max=float3(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(430) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(431) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float4 min=float4(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(432) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float4 max=float4(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(433) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(434) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + color min=color(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(435) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + color max=color(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(436) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(437) +]] +{ return math::clamp(a,min,max); } + +export float cos(float a=0.) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(440) +]] +{ return math::cos(a); } + +export float2 cos(float2 a=float2(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(441) +]] +{ return math::cos(a); } + +export float3 cos(float3 a=float3(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(442) +]] +{ return math::cos(a); } + +export float4 cos(float4 a=float4(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(443) +]] +{ return math::cos(a); } + +export float3 cross(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Cross"), + anno::description("Returns the 3D cross product of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/cross_product.svg"), + anno::ui_order(449) +]] +{ return math::cross(a,b); } + +export float degrees( + float a=0. [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(450) +]] +{ return math::degrees(a); } + +export float2 degrees( + float2 a=float2(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(451) +]] +{ return math::degrees(a); } + +export float3 degrees( + float3 a=float3(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(452) +]] +{ return math::degrees(a); } + +export float4 degrees( + float4 a=float4(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(453) +]] +{ return math::degrees(a); } + +export float distance(float a=0., float b=0.) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(460) +]] +{ return math::distance(a,b); } + +export float distance(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(461) +]] +{ return math::distance(a,b); } + +export float distance(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(462) +]] +{ return math::distance(a,b); } + +export float distance(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(463) +]] +{ return math::distance(a,b); } + +export float dot(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(470) +]] +{ return math::dot(a,b); } + +export float dot(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(471) +]] +{ return math::dot(a,b); } + +export float dot(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(472) +]] +{ return math::dot(a,b); } + +export float exp(float a=0.) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(480) +]] +{ return math::exp(a); } + +export float2 exp(float2 a=float2(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(481) +]] +{ return math::exp(a); } + +export float3 exp(float3 a=float3(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(481) +]] +{ return math::exp(a); } + +export float4 exp(float4 a=float4(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(482) +]] +{ return math::exp(a); } + +export color exp(color a=color(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(483) +]] +{ return math::exp(a); } + +export float exp2(float a=0.) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(490) +]] +{ return math::exp2(a); } + +export float2 exp2(float2 a=float2(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(491) +]] +{ return math::exp2(a); } + +export float3 exp2(float3 a=float3(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(492) +]] +{ return math::exp2(a); } + +export float4 exp2(float4 a=float4(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(493) +]] +{ return math::exp2(a); } + +export color exp2(color a=color(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(494) +]] +{ return math::exp2(a); } + +export float floor(float a=0.) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(500) +]] +{ return math::floor(a); } + +export float2 floor(float2 a=float2(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(501) +]] +{ return math::floor(a); } + +export float3 floor(float3 a=float3(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(502) +]] +{ return math::floor(a); } + +export float4 floor(float4 a=float4(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(503) +]] +{ return math::floor(a); } + +export float fmod( + float a=0. [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(510) +]] +{ return math::fmod(a,b); } + +export float2 fmod( + float2 a=float2(0.) [[anno::description("Dividend input.")]], + float2 b=float2(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(511) +]] +{ return math::fmod(a,b); } + +export float3 fmod( + float3 a=float3(0.) [[anno::description("Dividend input.")]], + float3 b=float3(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(512) +]] +{ return math::fmod(a,b); } + +export float4 fmod( + float4 a=float4(0.) [[anno::description("Dividend input.")]], + float4 b=float4(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(513) +]] +{ return math::fmod(a,b); } + +export float2 fmod( + float2 a=float2(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(514) +]] +{ return math::fmod(a,b); } + +export float3 fmod( + float3 a=float3(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(515) +]] +{ return math::fmod(a,b); } + +export float4 fmod( + float4 a=float4(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(516) +]] +{ return math::fmod(a,b); } + +export float frac(float a=0.) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(520) +]] +{ return math::frac(a); } + +export float2 frac(float2 a=float2(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(521) +]] +{ return math::frac(a); } + +export float3 frac(float3 a=float3(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(522) +]] +{ return math::frac(a); } + +export float4 frac(float4 a=float4(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(523) +]] +{ return math::frac(a); } + +export float length(float2 a=float2(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(530) +]] +{ return math::length(a); } + +export float length(float3 a=float3(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(531) +]] +{ return math::length(a); } + +export float length(float4 a=float4(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(532) +]] +{ return math::length(a); } + +export float lerp( + float a=0. [[anno::description("Start value at interpolation factor 0.")]], + float b=1. [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(540) +]] +{ return math::lerp(a,b,l); } + +export float2 lerp( + float2 a=float2(0.) [[anno::description("Start value at interpolation factor 0.")]], + float2 b=float2(1.) [[anno::description("End value at interpolation factor 1.")]], + float2 l=float2(0.)[[anno::soft_range(float2(0.0),float2(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(541) +]] +{ return math::lerp(a,b,l); } + +export float3 lerp( + float3 a=float3(0.) [[anno::description("Start value at interpolation factor 0.")]], + float3 b=float3(1.) [[anno::description("End value at interpolation factor 1.")]], + float3 l=float3(0.)[[anno::soft_range(float3(0.0),float3(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(542) +]] +{ return math::lerp(a,b,l); } + +export float4 lerp( + float4 a=float4(0.) [[anno::description("Start value at interpolation factor 0.")]], + float4 b=float4(1.) [[anno::description("End value at interpolation factor 1.")]], + float4 l=float4(0.)[[anno::soft_range(float4(0.0),float4(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(543) +]] +{ return math::lerp(a,b,l); } + +export float2 lerp( + float2 a=float2(0.) [[anno::description("Start value at interpolation factor 0.")]], + float2 b=float2(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(544) +]] +{ return math::lerp(a,b,l); } + +export float3 lerp( + float3 a=float3(0.) [[anno::description("Start value at interpolation factor 0.")]], + float3 b=float3(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(545) +]] +{ return math::lerp(a,b,l); } + +export float4 lerp( + float4 a=float4(0.) [[anno::description("Start value at interpolation factor 0.")]], + float4 b=float4(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(546) +]] +{ return math::lerp(a,b,l); } + +export color lerp( + color a=color(0.) [[anno::description("Start value at interpolation factor 0.")]], + color b=color(1.) [[anno::description("End value at interpolation factor 1.")]], + color l=color(0.)[[anno::soft_range(color(0.0),color(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(547) +]] +{ return math::lerp(a,b,l); } + +export color lerp( + color a=color(0.) [[anno::description("Start value at interpolation factor 0.")]], + color b=color(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(548) +]] +{ return math::lerp(a,b,l); } + +export float log(float a=1.) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(550) +]] +{ return math::log(a); } + +export float2 log(float2 a=float2(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(551) +]] +{ return math::log(a); } + +export float3 log(float3 a=float3(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(552) +]] +{ return math::log(a); } + +export float4 log(float4 a=float4(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(553) +]] +{ return math::log(a); } + +export color log(color a=color(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(554) +]] +{ return math::log(a); } + +export float log2(float a=1.) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(560) +]] +{ return math::log2(a); } + +export float2 log2(float2 a=float2(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(561) +]] +{ return math::log2(a); } + +export float3 log2(float3 a=float3(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(562) +]] +{ return math::log2(a); } + +export float4 log2(float4 a=float4(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(563) +]] +{ return math::log2(a); } + +export color log2(color a=color(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(564) +]] +{ return math::log2(a); } + +export float log10(float a=1.) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(570) +]] +{ return math::log10(a); } + +export float2 log10(float2 a=float2(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(571) +]] +{ return math::log10(a); } + +export float3 log10(float3 a=float3(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(572) +]] +{ return math::log10(a); } + +export float4 log10(float4 a=float4(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(573) +]] +{ return math::log10(a); } + +export color log10(color a=color(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(574) +]] +{ return math::log10(a); } + +export float luminance(float3 a=float3(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(580) +]] +{ return math::luminance(a); } + +export float luminance(color a=color(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(581) +]] +{ return math::luminance(a); } + +export float luminance(float4 a=float4(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(582) +]] +{ return math::luminance(float3(a.x,a.y,a.z)); } + +export int max(int a=0, int b=0) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(590) +]] +{ return math::max(a,b); } + +export float max(float a=0., float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(591) +]] +{ return math::max(a,b); } + +export float2 max(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(592) +]] +{ return math::max(a,b); } + +export float3 max(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(593) +]] +{ return math::max(a,b); } + +export float4 max(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(594) +]] +{ return math::max(a,b); } + +export float2 max(float2 a=float2(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(595) +]] +{ return math::max(a,b); } + +export float3 max(float3 a=float3(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(596) +]] +{ return math::max(a,b); } + +export float4 max(float4 a=float4(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(597) +]] +{ return math::max(a,b); } + +export float2 max(float a=0., float2 b=float2(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(598) +]] +{ return math::max(a,b); } + +export float3 max(float a=0., float3 b=float3(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(599) +]] +{ return math::max(a,b); } + +export float4 max(float a=0., float4 b=float4(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(600) +]] +{ return math::max(a,b); } + +export color max(color a=color(0.), color b=color(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(601) +]] +{ return math::max(a,b); } + +export color max(float a=0., color b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(602) +]] +{ return math::max(a,b); } + +export color max(color a=color(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(603) +]] +{ return math::max(a,b); } + +export float max_value(float2 a=float2(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(610) +]] +{ return math::max_value(a); } + +export float max_value(float3 a=float3(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(611) +]] +{ return math::max_value(a); } + +export float max_value(float4 a=float4(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(612) +]] +{ return math::max_value(a); } + +export float max_value(color a=color(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest channel value in the input color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(613) +]] +{ return math::max_value(a); } + +export int min(int a=0, int b=0) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(620) +]] +{ return math::min(a,b); } + +export float min(float a=0., float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(621) +]] +{ return math::min(a,b); } + +export float2 min(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(622) +]] +{ return math::min(a,b); } + +export float3 min(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(623) +]] +{ return math::min(a,b); } + +export float4 min(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(624) +]] +{ return math::min(a,b); } + +export float2 min(float2 a=float2(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(625) +]] +{ return math::min(a,b); } + +export float3 min(float3 a=float3(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(626) +]] +{ return math::min(a,b); } + +export float4 min(float4 a=float4(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(627) +]] +{ return math::min(a,b); } + +export float2 min(float a=0., float2 b=float2(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(628) +]] +{ return math::min(a,b); } + +export float3 min(float a=0., float3 b=float3(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(629) +]] +{ return math::min(a,b); } + +export float4 min(float a=0., float4 b=float4(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(630) +]] +{ return math::min(a,b); } + +export color min(color a=color(0.), color b=color(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(631) +]] +{ return math::min(a,b); } + +export color min(float a=0., color b=color(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(632) +]] +{ return math::min(a,b); } + +export color min(color a=color(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(633) +]] +{ return math::min(a,b); } + +export float min_value(float a=0.) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(640) +]] +{ return math::min_value(a); } + +export float min_value(float2 a=float2(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(641) +]] +{ return math::min_value(a); } + +export float min_value(float3 a=float3(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(642) +]] +{ return math::min_value(a); } + +export float min_value(float4 a=float4(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(643) +]] +{ return math::min_value(a); } + +export float min_value(color a=color(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest channel value in the input color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(644) +]] +{ return math::min_value(a); } + +export float2 normalize( + float2 a=float2(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(650) +]] +{ return math::normalize(a); } + +export float3 normalize( + float3 a=float3(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(651) +]] +{ return math::normalize(a); } + +export float4 normalize( + float4 a=float4(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(652) +]] +{ return math::normalize(a); } + +export int pow( + int a=0 [[anno::description("Base value.")]], + int b=0 [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(660) +]] +{ return math::pow(a,b); } + +export float pow( + float a=0. [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(661) +]] +{ return math::pow(a,b); } + +export float2 pow( + float2 a=float2(0.) [[anno::description("Base value.")]], + float2 b=float2(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(662) +]] +{ return math::pow(a,b); } + +export float3 pow( + float3 a=float3(0.) [[anno::description("Base value.")]], + float3 b=float3(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(663) +]] +{ return math::pow(a,b); } + +export float4 pow( + float4 a=float4(0.) [[anno::description("Base value.")]], + float4 b=float4(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(664) +]] +{ return math::pow(a,b); } + +export float2 pow( + float2 a=float2(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(665) +]] +{ return math::pow(a,b); } + +export float3 pow( + float3 a=float3(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(666) +]] +{ return math::pow(a,b); } + +export float4 pow( + float4 a=float4(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(667) +]] +{ return math::pow(a,b); } + +export color pow( + color a=color(0.) [[anno::description("Base value.")]], + color b=color(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(668) +]] +{ return math::pow(a,b); } + +export color pow( + color a=color(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(669) +]] +{ return math::pow(a,b); } + +export float radians( + float a=0. [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(670) +]] +{ return math::radians(a); } + +export float2 radians( + float2 a=float2(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(671) +]] +{ return math::radians(a); } + +export float3 radians( + float3 a=float3(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(672) +]] +{ return math::radians(a); } + +export float4 radians( + float4 a=float4(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(673) +]] +{ return math::radians(a); } + +export float round(float a=0.) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(690) +]] +{ return math::round(a); } + +export float2 round(float2 a=float2(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(691) +]] +{ return math::round(a); } + +export float3 round(float3 a=float3(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(692) +]] +{ return math::round(a); } + +export float4 round(float4 a=float4(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(693) +]] +{ return math::round(a); } + +export float rsqrt(float a=0.) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(700) +]] +{ return math::rsqrt(a); } + +export float2 rsqrt(float2 a=float2(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(701) +]] +{ return math::rsqrt(a); } + +export float3 rsqrt(float3 a=float3(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(702) +]] +{ return math::rsqrt(a); } + +export float4 rsqrt(float4 a=float4(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(703) +]] +{ return math::rsqrt(a); } + +export color rsqrt(color a=color(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(704) +]] +{ return math::rsqrt(a); } + +export float saturate( + float a=0. [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(710) +]] +{ return math::saturate(a); } + +export float2 saturate( + float2 a=float2(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(711) +]] +{ return math::saturate(a); } + +export float3 saturate( + float3 a=float3(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(712) +]] +{ return math::saturate(a); } + +export float4 saturate( + float4 a=float4(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(713) +]] +{ return math::saturate(a); } + +export color saturate( + color a=color(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(714) +]] +{ return math::saturate(a); } + +export int sign(int a=0) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(720) +]] +{ return math::sign(a); } + +export float sign(float a=0.) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(721) +]] +{ return math::sign(a); } + +export float2 sign(float2 a=float2(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(722) +]] +{ return math::sign(a); } + +export float3 sign(float3 a=float3(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(723) +]] +{ return math::sign(a); } + +export float4 sign(float4 a=float4(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(724) +]] +{ return math::sign(a); } + +export float sin(float a=0.) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(730) +]] +{ return math::sin(a); } + +export float2 sin(float2 a=float2(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(731) +]] +{ return math::sin(a); } + +export float3 sin(float3 a=float3(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(732) +]] +{ return math::sin(a); } + +export float4 sin(float4 a=float4(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(733) +]] +{ return math::sin(a); } + +export float2 sincos( + float a=0. [[ + anno::description("Input angle in radians.") + ]]) +[[ + anno::display_name("SinCos"), + anno::description("Computes sine and cosine for the same input angle and returns float2(sin, cos)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/sincos.svg"), + anno::ui_order(739) +]] +{ float[]b = math::sincos(a); return float2(b[0],b[1]); } + +export float smoothstep( + float a=0. [[ + anno::description("Lower edge of the interpolation range.") + ]], + float b=1. [[ + anno::description("Upper edge of the interpolation range.") + ]], + float l=0. [[ + anno::description("Input value to evaluate against the interpolation range.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(740) +]] +{ return math::smoothstep(a,b,l); } + +export float2 smoothstep( + float2 a=float2(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float2 l=float2(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(741) +]] +{ return math::smoothstep(a,b,l); } + +export float3 smoothstep( + float3 a=float3(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float3 l=float3(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(742) +]] +{ return math::smoothstep(a,b,l); } + +export float4 smoothstep( + float4 a=float4(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float4 l=float4(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(743) +]] +{ return math::smoothstep(a,b,l); } + +export float2 smoothstep( + float2 a=float2(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(744) +]] +{ return math::smoothstep(a,b,l); } + +export float3 smoothstep( + float3 a=float3(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(745) +]] +{ return math::smoothstep(a,b,l); } + +export float4 smoothstep( + float4 a=float4(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(746) +]] +{ return math::smoothstep(a,b,l); } + +export float sqrt(float a=0.) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(750) +]] +{ return math::sqrt(a); } + +export float2 sqrt(float2 a=float2(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(751) +]] +{ return math::sqrt(a); } + +export float3 sqrt(float3 a=float3(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(752) +]] +{ return math::sqrt(a); } + +export float4 sqrt(float4 a=float4(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(753) +]] +{ return math::sqrt(a); } + +export color sqrt(color a=color(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(754) +]] +{ return math::sqrt(a); } + +export float step( + float a=0. [[ + anno::description("Threshold value.") + ]], + float b=0. [[ + anno::description("Input compared against the threshold.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(760) +]] +{ return math::step(a,b); } + +export float2 step( + float2 a=float2(0.) [[ + anno::description("Threshold value per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(761) +]] +{ return math::step(a,b); } + +export float3 step( + float3 a=float3(0.) [[ + anno::description("Threshold value per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(762) +]] +{ return math::step(a,b); } + +export float4 step( + float4 a=float4(0.) [[ + anno::description("Threshold value per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(763) +]] +{ return math::step(a,b); } + +export float tan(float a=0.) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(770) +]] +{ return math::tan(a); } + +export float2 tan(float2 a=float2(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(771) +]] +{ return math::tan(a); } + +export float3 tan(float3 a=float3(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(772) +]] +{ return math::tan(a); } + +export float4 tan(float4 a=float4(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(773) +]] +{ return math::tan(a); } + +export float remap( + float a=0. [[ + anno::description("Input value in the source range.") + ]], + float start_old=0. [[ + anno::description("Lower bound of the source range.") + ]], + float end_old=1. [[ + anno::description("Upper bound of the source range.") + ]], + float start_new=0. [[ + anno::description("Lower bound of the destination range.") + ]], + float end_new=1. [[ + anno::description("Upper bound of the destination range.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(680) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float2 remap( + float2 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float2 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float2 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float2 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float2 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(681) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float3 remap( + float3 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float3 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float3 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float3 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float3 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(682) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float4 remap( + float4 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float4 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float4 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float4 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float4 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(683) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } diff --git a/yahboom_dofbot/payloads/Physics/mujoco.usda b/yahboom_dofbot/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..cfc3b080ef5659691aa2e81bde67a86556042da8 --- /dev/null +++ b/yahboom_dofbot/payloads/Physics/mujoco.usda @@ -0,0 +1,226 @@ +#usda 1.0 +( + customLayerData = { + } + endTimeCode = 100 + metersPerUnit = 1 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "arm" +{ + over "link5" + { + over "Finger_Left_03" + { + } + + over "Finger_Right_03" + { + } + + over "Finger_Left_02" + { + over "Finger_Left_02" + { + } + + over "Finger_Left_02_SphericalJoint" + { + } + } + + over "Finger_Right_02" + { + over "Finger_Right_02" + { + } + + over "Finger_Right_02_SphericalJoint" + { + } + } + + over "Wrist_Twist" + { + over "Wrist_Twist_RevoluteJoint" ( + delete apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + } + + over "Wrist_Twist" + { + } + } + + over "Finger_Left_01" + { + over "Finger_Left_01" + { + } + + over "Finger_Left_01_RevoluteJoint" ( + delete apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "Finger_Right_01" + { + over "Finger_Right_01" + { + } + + over "Finger_Right_01_RevoluteJoint" ( + delete apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "Looks" + { + } + } + + over "root_joint" + { + } + + over "link4" + { + over "Wrist_Lift" + { + } + + over "Camera" + { + over "OmniverseKitViewportCameraMesh" + { + } + } + } + + over "link3" + { + over "joint4" ( + delete apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + } + + over "collisions" + { + } + + over "visuals" + { + } + } + + over "link2" + { + over "joint3" ( + delete apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + } + + over "Shoulder_Lift" + { + } + + over "collisions" + { + } + + over "visuals" + { + } + } + + over "link1" + { + over "joint2" ( + delete apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + } + + over "collisions" + { + } + + over "visuals" + { + } + } + + over "base_link" + { + over "joint1" ( + delete apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + } + + over "visuals" + { + } + + over "collisions" + { + } + + over "PCB_01" + { + } + + over "Base01_01" + { + } + + over "Antennas_01" + { + } + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + +over "World" +{ + over "defaultLight" + { + } + + over "GroundPlane" + { + over "CollisionMesh" + { + } + + over "CollisionPlane" + { + } + } + + over "RectLight" + { + } +} + +over "DR_autogenerated" +{ +} + diff --git a/yahboom_dofbot/payloads/Physics/physics.usda b/yahboom_dofbot/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..59d6319a0eed8c21feccee65e46f94f39d9fdb96 --- /dev/null +++ b/yahboom_dofbot/payloads/Physics/physics.usda @@ -0,0 +1,665 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "arm" + endTimeCode = 100 + metersPerUnit = 1 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "arm" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] +) +{ + over "base_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + point3f physics:centerOfMass = (0, 0, 0) + float physics:density = 0 + float physics:mass = 0.5 + vector3f physics:velocity = (0, 0, 0) + + def PhysicsRevoluteJoint "joint1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 53 + float drive:angular:physics:maxForce = 5.2 + float drive:angular:physics:stiffness = 1048 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "acceleration" + custom string isaac:nameOverride + custom float[] isaac:physics:AccelerationLimit + custom float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028233e36 + float physics:breakTorque = 3.4028233e34 + point3f physics:localPos0 = (0, 0, 0.06605) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70709646, -0.0038201257, -0.70709646, 0.0038201257) + quatf physics:localRot1 = (0.70710677, 0, -0.70710677, 0) + float physics:lowerLimit = -90.000206 + float physics:upperLimit = 90.000206 + } + + over "collisions" ( + instanceable = false + ) + { + over "visuals" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + + over "link1" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + point3f physics:centerOfMass = (0, 0, 0) + float physics:density = 0 + float physics:mass = 0.1 + vector3f physics:velocity = (0, 0, 0) + + def PhysicsRevoluteJoint "joint2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 53 + float drive:angular:physics:maxForce = 5.2 + float drive:angular:physics:stiffness = 1048 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "acceleration" + custom string isaac:nameOverride + custom float[] isaac:physics:AccelerationLimit + custom float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028233e36 + float physics:breakTorque = 3.4028233e34 + point3f physics:localPos0 = (0, -0.00031873, 0.041449998) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0.0000017881393, 0) + quatf physics:localRot1 = (0.70710677, 0, -0.70710677, 0) + float physics:lowerLimit = -90.000206 + float physics:upperLimit = 90.000206 + } + + over "collisions" ( + instanceable = false + ) + { + over "collisions" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + + over "link2" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + point3f physics:centerOfMass = (0, 0, 0) + float physics:density = 0 + float physics:mass = 0.1 + vector3f physics:velocity = (0, 0, 0) + + def PhysicsRevoluteJoint "joint3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 53 + float drive:angular:physics:maxForce = 5.2 + float drive:angular:physics:stiffness = 1048 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "acceleration" + custom string isaac:nameOverride + custom float[] isaac:physics:AccelerationLimit + custom float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028233e36 + float physics:breakTorque = 3.4028233e34 + point3f physics:localPos0 = (-0.082849994, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70710677, 0, -0.70710677, 0) + quatf physics:localRot1 = (0.70710677, 0, -0.70710677, 0) + float physics:lowerLimit = -90.000206 + float physics:upperLimit = 90.000206 + } + + over "collisions" ( + instanceable = false + ) + { + over "collisions_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + + over "link3" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + point3f physics:centerOfMass = (0, 0, 0) + float physics:density = 0 + float physics:mass = 0.1 + vector3f physics:velocity = (0, 0, 0) + + def PhysicsRevoluteJoint "joint4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 53 + float drive:angular:physics:maxForce = 5.2 + float drive:angular:physics:stiffness = 1048 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "acceleration" + custom string isaac:nameOverride + custom float[] isaac:physics:AccelerationLimit + custom float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028233e36 + float physics:breakTorque = 3.4028233e34 + point3f physics:localPos0 = (-0.082849994, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70710063, 0.002937348, -0.70710063, 0.002937348) + quatf physics:localRot1 = (0.70710677, 0, -0.70710677, 0) + float physics:lowerLimit = -90.000206 + float physics:upperLimit = 90.000206 + } + + over "collisions" ( + instanceable = false + ) + { + over "collisions_2" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + + over "link4" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + point3f physics:centerOfMass = (0, 0, 0) + float physics:density = 0 + float physics:mass = 0.1 + vector3f physics:velocity = (0, 0, 0) + + over "Wrist_Lift" ( + instanceable = false + ) + { + over "Wrist_Lift" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "link5" + { + over "Wrist_Twist" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + point3f physics:centerOfMass = (0, 0, 0) + bool physics:kinematicEnabled = 0 + float physics:mass = 0.08 + bool physics:rigidBodyEnabled = 1 + vector3f physics:velocity = (0, 0, 0) + + def PhysicsRevoluteJoint "Wrist_Twist_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 10 + float drive:angular:physics:maxForce = 0.099999994 + float drive:angular:physics:stiffness = 1000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "acceleration" + custom string isaac:nameOverride + custom float[] isaac:physics:AccelerationLimit + custom float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = inf + float physics:breakTorque = inf + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (-0.06549733, -0.0045318594, -0.00060643995) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (-0.4988273, 0.49882996, 0.50117344, -0.50116396) + } + + over "Wrist_Twist" ( + instanceable = false + ) + { + over "Wrist_Twist" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "Finger_Left_01" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsFilteredPairsAPI", "PhysicsMassAPI"] + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + point3f physics:centerOfMass = (0, 0, 0) + rel physics:filteredPairs = + bool physics:kinematicEnabled = 0 + float physics:mass = 0.02 + bool physics:rigidBodyEnabled = 1 + vector3f physics:velocity = (0, 0, 0) + + def PhysicsRevoluteJoint "Finger_Left_01_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 0.12 + float drive:angular:physics:stiffness = 6000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "acceleration" + custom string isaac:nameOverride + custom float[] isaac:physics:AccelerationLimit + custom float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = inf + float physics:breakTorque = inf + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (-0.29220235, 1.2149862, 4.1918764) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, -1e-45, 6.162976e-33, -0) + float physics:lowerLimit = -30 + float physics:upperLimit = 30 + } + + over "Finger_Left_01" ( + instanceable = false + ) + { + over "Finger_Left_01" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "Finger_Right_01" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + point3f physics:centerOfMass = (0, 0, 0) + bool physics:kinematicEnabled = 0 + float physics:mass = 0.02 + bool physics:rigidBodyEnabled = 1 + vector3f physics:velocity = (0, 0, 0) + + def PhysicsRevoluteJoint "Finger_Right_01_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 0.12 + float drive:angular:physics:stiffness = 6000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "acceleration" + custom string isaac:nameOverride + custom float[] isaac:physics:AccelerationLimit + custom float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = inf + float physics:breakTorque = inf + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (-0.29220113, -1.240003, 4.1918764) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, -1e-45, 6.162985e-33, -0) + float physics:lowerLimit = -30 + float physics:upperLimit = 30 + } + + over "Finger_Right_01" ( + instanceable = false + ) + { + over "Finger_Right_01" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "Finger_Left_03" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + instanceable = false + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + bool physics:kinematicEnabled = 0 + float physics:mass = 0.0033898563 ( + customData = { + dictionary agentfix = { + string massConfidence = "estimate with user-authorized material guesses and aluminium fallback, not verified hardware mass" + string massMethod = "CORE Artist Tools material shell estimate with source component masses retained" + } + } + ) + bool physics:rigidBodyEnabled = 1 + vector3f physics:velocity = (0, 0, 0) + + over "Finger_Left_03" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + + over "Finger_Right_03" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + instanceable = false + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + bool physics:kinematicEnabled = 0 + float physics:mass = 0.003950518 ( + customData = { + dictionary agentfix = { + string massConfidence = "estimate with user-authorized material guesses and aluminium fallback, not verified hardware mass" + string massMethod = "CORE Artist Tools material shell estimate with source component masses retained" + } + } + ) + bool physics:rigidBodyEnabled = 1 + vector3f physics:velocity = (0, 0, 0) + + over "Finger_Right_03" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + + over "Finger_Left_02" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + bool physics:kinematicEnabled = 0 + float physics:mass = 0.002549749 ( + customData = { + dictionary agentfix = { + string massConfidence = "estimate with user-authorized material guesses and aluminium fallback, not verified hardware mass" + string massMethod = "CORE Artist Tools material shell estimate with source component masses retained" + } + } + ) + bool physics:rigidBodyEnabled = 1 + vector3f physics:velocity = (0, 0, 0) + + def PhysicsSphericalJoint "Finger_Left_02_SphericalJoint" + { + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = inf + float physics:breakTorque = inf + uniform bool physics:excludeFromArticulation = 1 + point3f physics:localPos0 = (-1.4452124e-7, -0.79711, 1.83944) + point3f physics:localPos1 = (1.4409475e-8, 1.77985, 2.43045) + quatf physics:localRot0 = (1, -2.6163723e-13, 2.7813916e-11, 6.980623e-14) + quatf physics:localRot1 = (1, -1.12632634e-7, 9.658924e-9, -2.9698487e-8) + } + + over "Finger_Left_02" ( + instanceable = false + ) + { + over "Finger_Left_02" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + over "Finger_Right_02" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + vector3f physics:angularVelocity = (0, 0, 0) + bool physics:kinematicEnabled = 0 + float physics:mass = 0.002549749 ( + customData = { + dictionary agentfix = { + string massConfidence = "estimate with user-authorized material guesses and aluminium fallback, not verified hardware mass" + string massMethod = "CORE Artist Tools material shell estimate with source component masses retained" + } + } + ) + bool physics:rigidBodyEnabled = 1 + vector3f physics:velocity = (0, 0, 0) + + def PhysicsSphericalJoint "Finger_Right_02_SphericalJoint" + { + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = inf + float physics:breakTorque = inf + uniform bool physics:excludeFromArticulation = 1 + point3f physics:localPos0 = (-8.870277e-9, 0.81077, 1.81201) + point3f physics:localPos1 = (-2.9491831e-9, -0.01149, -0.01115) + quatf physics:localRot0 = (1, -1.975757e-12, 2.7470394e-11, 4.412854e-14) + quatf physics:localRot1 = (1, -1.9409395e-8, -1.2668238e-9, -6.4225496e-8) + } + + over "Finger_Right_02" ( + instanceable = false + ) + { + over "Finger_Right_02" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + } + } + } + + def PhysicsRevoluteJoint "Finger_Left_02_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 0.12 + float drive:angular:physics:stiffness = 0 + float drive:angular:physics:targetPosition = 0 + float drive:angular:physics:targetVelocity = 0 + uniform token drive:angular:physics:type = "acceleration" + token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = inf + float physics:breakTorque = inf + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (-0.16869655, 0.4503985, 5.992106) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, -0.00011703074, 0.0000049658033, -3.4355e-8) + } + + def PhysicsRevoluteJoint "Finger_Left_03_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 0.12 + float drive:angular:physics:stiffness = 0 + float drive:angular:physics:targetPosition = 0 + float drive:angular:physics:targetVelocity = 0 + uniform token drive:angular:physics:type = "acceleration" + token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = inf + float physics:breakTorque = inf + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0.12363685, 1.8119415, 2.3910213) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 8.7435e-9, -7.463727e-10, 1.3773865e-9) + float physics:lowerLimit = -30 + float physics:upperLimit = 30 + } + + def PhysicsRevoluteJoint "Finger_Right_02_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 0.12 + float drive:angular:physics:stiffness = 0 + float drive:angular:physics:targetPosition = 0 + float drive:angular:physics:targetVelocity = 0 + uniform token drive:angular:physics:type = "acceleration" + token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = inf + float physics:breakTorque = inf + point3f physics:localPos0 = (-5.173299e-7, 1.7269789, -2.4491472) + point3f physics:localPos1 = (-0.16868919, -0.45649478, 5.9916687) + quatf physics:localRot0 = (1, 1.9229503e-12, 1.4099211e-11, -1.479941e-14) + quatf physics:localRot1 = (1, 0.00009905596, 0.0000035586138, -3.2006255e-8) + } + + def PhysicsRevoluteJoint "Finger_Right_03_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 0.12 + float drive:angular:physics:stiffness = 0 + float drive:angular:physics:targetPosition = 0 + float drive:angular:physics:targetVelocity = 0 + uniform token drive:angular:physics:type = "acceleration" + token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = inf + float physics:breakTorque = inf + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0.12363637, -1.7653793, 2.4256) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 1.12872264e-7, 8.302244e-9, -1.2118254e-7) + float physics:lowerLimit = -30 + float physics:upperLimit = 30 + } + } + + def PhysicsFixedJoint "root_joint" + { + custom rel physics:body1 = + float physics:breakForce = inf + float physics:breakTorque = inf + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + } +} + +over "World" +{ + def PhysicsScene "physicsScene" + { + vector3f physics:gravityDirection = (0, 0, -1) + float physics:gravityMagnitude = 9.81 + } +} + diff --git a/yahboom_dofbot/payloads/Physics/physx.usda b/yahboom_dofbot/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..21175fb8300765c43ecfafe44853f56d321d1810 --- /dev/null +++ b/yahboom_dofbot/payloads/Physics/physx.usda @@ -0,0 +1,242 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "arm" + endTimeCode = 100 + metersPerUnit = 1 + startTimeCode = 0 + subLayers = [ + @./physics.usda@ + ] + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "arm" ( + prepend apiSchemas = ["PhysxArticulationAPI"] +) +{ + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverVelocityIterationCount = 32 + + over "base_link" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + bool physxRigidBody:disableGravity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:maxDepenetrationVelocity = 0.049999997 + float physxRigidBody:maxLinearVelocity = inf + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "joint1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:jointFriction = 0 + float physxJoint:maxJointVelocity = 57.29578 + } + } + + over "link1" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + bool physxRigidBody:disableGravity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:maxDepenetrationVelocity = 0.049999997 + float physxRigidBody:maxLinearVelocity = inf + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "joint2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:jointFriction = 0 + float physxJoint:maxJointVelocity = 57.29578 + } + } + + over "link2" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + bool physxRigidBody:disableGravity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:maxDepenetrationVelocity = 0.049999997 + float physxRigidBody:maxLinearVelocity = inf + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "joint3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:jointFriction = 0 + float physxJoint:maxJointVelocity = 57.29578 + } + } + + over "link3" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + bool physxRigidBody:disableGravity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:maxDepenetrationVelocity = 0.049999997 + float physxRigidBody:maxLinearVelocity = inf + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "joint4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:jointFriction = 0 + float physxJoint:maxJointVelocity = 57.29578 + } + } + + over "link4" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + bool physxRigidBody:disableGravity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:maxDepenetrationVelocity = 0.049999997 + float physxRigidBody:maxLinearVelocity = inf + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + } + + over "link5" + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 64 + int physxArticulation:solverVelocityIterationCount = 16 + float physxArticulation:stabilizationThreshold = 1000 + + over "Wrist_Twist" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 100 + float physxRigidBody:maxContactImpulse = 100 + float physxRigidBody:maxDepenetrationVelocity = 1 + float physxRigidBody:maxLinearVelocity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + } + + over "Finger_Left_01" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + } + + over "Finger_Right_01" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + } + + over "Finger_Left_03" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + } + + over "Finger_Right_03" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + } + + over "Finger_Left_02" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + } + + over "Finger_Right_02" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + } + } +} + +over "World" +{ + over "physicsScene" ( + prepend apiSchemas = ["PhysxSceneAPI"] + ) + { + uniform token physxScene:broadphaseType = "MBP" + bool physxScene:enableCCD = 1 + bool physxScene:enableGPUDynamics = 0 + bool physxScene:enableStabilization = 1 + float physxScene:frictionCorrelationDistance = 0.00025 + float physxScene:frictionOffsetThreshold = 0.0004 + uniform token physxScene:solverType = "TGS" + } +} + diff --git a/yahboom_dofbot/payloads/base.usda b/yahboom_dofbot/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..f93962126a0c2e6e7f0ad645fbcc109e34508610 --- /dev/null +++ b/yahboom_dofbot/payloads/base.usda @@ -0,0 +1,405 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "arm" + endTimeCode = 100 + metersPerUnit = 1 + startTimeCode = 0 + subLayers = [ + @./robot.usda@ + ] + timeCodesPerSecond = 60 + upAxis = "Z" +) + +def Xform "arm" +{ + custom string isaac:description + custom string isaac:namespace + custom rel isaac:physics:robotJoints + prepend rel isaac:physics:robotJoints = [ + , + , + , + , + , + , + , + , + , + ] + custom rel isaac:physics:robotLinks + prepend rel isaac:physics:robotLinks = [ + , + , + , + , + , + , + , + , + , + , + , + , + ] + + def Xform "base_link" + { + custom string isaac:nameOverride + quatf xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + float3 xformOp:translate = (1.5459954e-9, 7.4386594e-7, -5.7220456e-7) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + } + + def Xform "collisions" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + } + + def Xform "PCB_01" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (0.7071067812, 0, 0, 0.7071067812) + double3 xformOp:scale = (0.009999999776, 0.01000000693, 0.01000000693) + double3 xformOp:translate = (-1.51339915e-9, -7.247924643e-7, 5.578994626e-7) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "Base01_01" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (0.7071067812, 0, 0, 0.7071067812) + double3 xformOp:scale = (0.009999999776, 0.01000000693, 0.01000000693) + double3 xformOp:translate = (-1.51339915e-9, -7.247924643e-7, 5.578994626e-7) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "Antennas_01" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (0.7071067812, 0, 0, 0.7071067812) + double3 xformOp:scale = (0.009999999776, 0.01000000693, 0.01000000693) + double3 xformOp:translate = (-1.51339915e-9, -7.247924643e-7, 5.578994626e-7) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "link1" + { + custom string isaac:nameOverride + quatf xformOp:orient = (0.9999854, -0.0054042637, 2.9373043e-8, 3.0267986e-9) + double3 xformOp:scale = (1, 0.999999999998871, 0.999999999998871) + float3 xformOp:translate = (1.5366822e-9, 1.8024816e-7, 0.066049896) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "collisions" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + } + + def Xform "visuals" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (0.7070964573, 0.003821370514, -0.003821412054, 0.7070964532) + double3 xformOp:scale = (0.009999999776, 0.01000000335, 0.01000000335) + double3 xformOp:translate = (-2.0054154e-9, -0.00009151267273, 0.008449656489) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "link2" + { + custom string isaac:nameOverride + quatf xformOp:orient = (0.70709515, -0.0038200808, 0.70709777, -0.003820095) + double3 xformOp:scale = (1.0000000713880137, 1, 1.0000000713880137) + float3 xformOp:translate = (8.0359165e-8, 0.00012933864, 0.107500926) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "collisions" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + } + + def Xform "Shoulder_Lift" + { + double3 xformOp:rotateXYZ = (-90, 0.0000026183336103713373, 90) + double3 xformOp:scale = (1.0000004768371582, 1, 1) + double3 xformOp:translate = (0, 0, -7.78784860728042e-8) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } + + def Xform "visuals" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (0.4999999886, -0.5000000114, -0.4999999886, 0.5000000114) + double3 xformOp:scale = (0.01000000454, 0.009999999776, 0.009999999776) + double3 xformOp:translate = (-3.552713599e-17, -1.38777875e-19, -7.787848607e-8) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "link3" + { + custom string isaac:nameOverride + quatf xformOp:orient = (0.70709515, -0.0038200254, 0.70709777, -0.003820039) + double3 xformOp:scale = (1.0000000713880137, 1, 1.0000000713880137) + float3 xformOp:translate = (3.2719225e-7, 0.0010245029, 0.19034551) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "collisions" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + } + + def Xform "visuals" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (0.5, -0.5, -0.5, 0.5) + double3 xformOp:scale = (0.009999999776, 0.01000001408, 0.009999986067) + double3 xformOp:translate = (3.552709921e-17, 6.938889845e-19, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "link4" + { + custom string isaac:nameOverride + quatf xformOp:orient = (0.7071009, -0.0008825615, 0.70711154, -0.00088266656) + double3 xformOp:scale = (0.9999999228219483, 0.9999999999999999, 0.9999999228219483) + float3 xformOp:translate = (5.00977e-7, 0.001919632, 0.27319115) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Wrist_Lift" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (0.5, -0.5, -0.5, 0.5) + double3 xformOp:scale = (0.009999999776, 0.009999999776, 0.009999999776) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Camera "Camera" ( + hide_in_stage_window = false + kind = "model" + no_delete = false + ) + { + float2 clippingRange = (0.01, 10000) + float focalLength = 0.24 + float focusDistance = 4 + float horizontalAperture = 0.20955 + float horizontalApertureOffset = 0 + float verticalAperture = 0.152908 + float verticalApertureOffset = 0 + double3 xformOp:rotateXYZ = (0, -90, 180) + double3 xformOp:scale = (1.000001311302185, 0.9999985098838806, 1.0000008344650269) + double3 xformOp:translate = (-0.06957090357886422, -0.04809993689687652, -0.0006000007241970178) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + + def Xform "OmniverseKitViewportCameraMesh" ( + always_pick_model = true + hide_in_stage_window = true + instanceable = true + kind = "subcomponent" + no_delete = true + prepend references = @./instances.usda@ + ) + { + float3[] extent = [(3.4028235e38, 3.4028235e38, 3.4028235e38), (-3.4028235e38, -3.4028235e38, -3.4028235e38)] + bool primvars:doNotCastShadows = 1 + token visibility = "invisible" + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (0.1422010362, 0.1422010362, 0.1422010362) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "link5" ( + apiSchemas = None + instanceable = false + ) + { + token visibility = "inherited" + float3 xformOp:rotateXYZ = (0, 0, 90) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + + def Xform "Wrist_Twist" + { + custom string isaac:nameOverride + token visibility = "inherited" + quatf xformOp:orient = (0.9999994, 5.9269006e-8, -0.0010918181, -0.0000031299985) + double3 xformOp:scale = (0.999999463558197, 1, 1.0000005960464478) + double3 xformOp:translate = (-0.0024486922670448052, 0.000605108277385496, 0.33869979101345393) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Wrist_Twist" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (0.009999999776, 0.009999999776, 0.009999999776) + double3 xformOp:translate = (-2.7755575e-19, 0, -7.105427199e-17) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "Finger_Left_01" + { + custom string isaac:nameOverride + token visibility = "inherited" + quatf xformOp:orient = (0.99999934, -0.00035134863, -0.0010898734, -0.0000032389833) + double3 xformOp:scale = (0.999999463558197, 1, 1.0000004768371582) + double3 xformOp:translate = (-0.005462167140942057, 0.01275498361688143, 0.38061209781589866) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Finger_Left_01" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (0.009999999776, 0.009999999776, 0.009999999776) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "Finger_Right_01" + { + custom string isaac:nameOverride + token visibility = "inherited" + quatf xformOp:orient = (0.99999934, 0.00038074935, -0.0010799972, -0.0000024802955) + double3 xformOp:scale = (1.0000008344650269, 0.9999991059303284, 1) + double3 xformOp:translate = (-0.005462308403947011, -0.011794907783085675, 0.38061209781589866) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Finger_Right_01" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (0.009999999776, 0.009999999776, 0.009999999776) + double3 xformOp:translate = (-1.110223e-18, 2.220446e-18, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "Finger_Left_03" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + custom string isaac:nameOverride + token visibility = "inherited" + quatd xformOp:orient = (0.999999404, -0.0001229924869, -0.001084876315, -0.000002961403791) + double3 xformOp:scale = (0.009999994412, 0.009999999776, 0.01000000454) + double3 xformOp:translate = (-0.004276864135, 0.03089094808, 0.4045123964) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "Finger_Right_03" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + custom string isaac:nameOverride + token visibility = "inherited" + quatd xformOp:orient = (0.999999404, 0.0001006576781, -0.001087176068, -0.000002961403158) + double3 xformOp:scale = (0.009999994412, 0.009999999776, 0.01000000454) + double3 xformOp:translate = (-0.004277966225, -0.02946700746, 0.4048573976) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "Finger_Left_02" + { + custom string isaac:nameOverride + token visibility = "inherited" + quatf xformOp:orient = (0.99999934, -0.0003527731, -0.0010893947, -0.0000034918837) + double3 xformOp:scale = (0.999999463558197, 1, 1.0000004768371582) + double3 xformOp:translate = (-0.004264077150879565, 0.005108910088786999, 0.39861651483290217) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Finger_Left_02" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (0.009999999776, 0.009999999776, 0.009999999776) + double3 xformOp:translate = (-5.551114999e-19, -1.110223e-18, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "Finger_Right_02" + { + custom string isaac:nameOverride + token visibility = "inherited" + quatf xformOp:orient = (0.99999934, 0.00038121297, -0.001079797, -0.0000026489224) + double3 xformOp:scale = (0.999999463558197, 1, 1.0000004768371582) + double3 xformOp:translate = (-0.004316289924466084, -0.021248104097363996, 0.4230906201208242) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "Finger_Right_02" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (0.009999999776, 0.009999999776, 0.009999999776) + double3 xformOp:translate = (-5.551114999e-19, 0, -7.105427199e-17) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Scope "Looks" + { + } + } + + def Scope "Looks" + { + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/yahboom_dofbot/payloads/geometries.usd b/yahboom_dofbot/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..5bb08abffba7ca43a1fbc12827201c767b90880c --- /dev/null +++ b/yahboom_dofbot/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9debb6c209a4bdb63a30bc0d52eb527ebd06da654ef24ac20c7a46d86ef05c9b +size 104855194 diff --git a/yahboom_dofbot/payloads/instances.usda b/yahboom_dofbot/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..8ffb739032eda85915a199fd219165a37e974bee --- /dev/null +++ b/yahboom_dofbot/payloads/instances.usda @@ -0,0 +1,3859 @@ +#usda 1.0 +( + customLayerData = { + } + endTimeCode = 100 + metersPerUnit = 1 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "visuals" ( + prepend references = @./geometries.usd@ + ) + { + over "visuals" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + token visibility = "invisible" + + def "Looks" + { + } + } + + def Scope "VisualMaterials" + { + def Material "material_0_592157_0_666667_0_682353" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + } + } + } + + def Xform "visuals_1" ( + prepend references = @./geometries.usd@ + ) + { + over "visuals" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + token purpose = "guide" + } + } + + def Xform "PCB_01" ( + prepend references = @./geometries.usd@ + ) + { + over "PCB_01" + { + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_52" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_03" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_20" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_15" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_01" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_16" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_17" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_21" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_53" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_06" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_54" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_18" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_19" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_07" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_22" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_32" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_33" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_23" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_02" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_35" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_04" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_08" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_09" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_34" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_25" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_26" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_27" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_29" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_30" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_45" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_44" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_13" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_05" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_12" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_10" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_11" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_52" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.9098039, 0.44313726, 0.03137255) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_03" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2509804, 0.2509804, 0.2509804) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_20" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.9490196, 0.7607843, 0.18039216) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_15" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.83137256, 0.67058825, 0.12941177) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_01" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7529412, 0.7529412, 0.7529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_16" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.7058824, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_17" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6431373, 0.6156863, 0.6) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_21" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.76862746, 0.76862746, 0.76862746) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_53" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.9882353, 0.7372549, 0.5176471) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_06" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5019608, 0.5019608, 0.5019608) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_54" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.7529412, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_18" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8, 0.8, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_19" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7529412, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_07" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_22" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.49803922, 0.49803922, 0.49803922) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_32" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8980392, 0.8980392, 0.8980392) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_33" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.84313726, 0.8156863, 0.7529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_23" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.29803923, 0.29803923, 0.29803923) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_02" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_35" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.74509805, 0.92156863, 0.9882353) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_04" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 0.7529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_08" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.83137256, 0.8392157, 0.83137256) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_09" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8980392, 0.92156863, 0.92941177) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_34" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.30980393, 0.30980393, 0.30980393) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_25" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.65882355, 0.47058824, 0.03529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_26" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.1254902, 0.1254902, 0.1254902) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_27" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.827451, 0.827451, 0.827451) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_29" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2, 0.2, 0.2) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_30" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.92941177, 0.92941177) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_45" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.14901961, 0.14901961, 0.14901961) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_44" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.8980392, 0.09019608) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_13" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_05" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_12" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 1, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_10" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.003921569, 0, 0.3372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_11" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "Base01_01" ( + prepend references = @./geometries.usd@ + ) + { + over "Base01_01" + { + over "Material_31" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_28" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_03" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_51" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_14" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_31" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.78431374, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_28" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.627451, 0.23529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_03" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2509804, 0.2509804, 0.2509804) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_51" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.827451, 0.02745098) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_14" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5921569, 0.6666667, 0.68235296) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "Antennas_01" ( + prepend references = @./geometries.usd@ + ) + { + over "Antennas_01" + { + over "Material_43" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_46" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_47" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_45" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_43" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.05490196, 0.05490196, 0.05490196) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_46" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.19607843, 0.19607843, 0.19607843) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_47" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.68235296, 0.09019608) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_45" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.14901961, 0.14901961, 0.14901961) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "collisions" ( + prepend references = @./geometries.usd@ + ) + { + over "collisions" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + token purpose = "guide" + } + } + + def Xform "visuals_1_1" ( + prepend references = @./geometries.usd@ + ) + { + over "visuals_1" + { + over "Material_14" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_28" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_24" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_51" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_14" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5921569, 0.6666667, 0.68235296) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_28" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.627451, 0.23529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_24" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.6, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_51" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.827451, 0.02745098) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "collisions_1" ( + prepend references = @./geometries.usd@ + ) + { + over "collisions_1" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + token purpose = "guide" + } + } + + def Xform "visuals_2" ( + prepend references = @./geometries.usd@ + ) + { + over "visuals_2" + { + over "Material_03" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_28" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_14" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_24" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_03" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2509804, 0.2509804, 0.2509804) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_28" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.627451, 0.23529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_14" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5921569, 0.6666667, 0.68235296) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_24" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.6, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "collisions_2" ( + prepend references = @./geometries.usd@ + ) + { + over "collisions_2" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + token purpose = "guide" + } + } + + def Xform "visuals_3" ( + prepend references = @./geometries.usd@ + ) + { + over "visuals_3" + { + over "Material_03" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_14" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_28" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_24" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_03" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2509804, 0.2509804, 0.2509804) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_14" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5921569, 0.6666667, 0.68235296) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_28" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.627451, 0.23529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_24" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.6, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "Wrist_Lift" ( + prepend references = @./geometries.usd@ + ) + { + over "Wrist_Lift" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_03" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_14" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_51" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_28" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_36" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_43" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_37" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_38" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_39" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_40" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_41" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_42" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_03" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2509804, 0.2509804, 0.2509804) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_14" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5921569, 0.6666667, 0.68235296) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_51" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.827451, 0.02745098) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_28" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.627451, 0.23529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_36" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5254902, 0.5254902, 0.5254902) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_43" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.05490196, 0.05490196, 0.05490196) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_37" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7058824, 0.7058824, 0.7058824) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_38" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.33333334, 0.33333334, 0.33333334) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_39" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.11372549, 0.11372549, 0.11372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_40" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.08235294, 0.08235294, 0.08235294) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_41" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.89411765, 0.89411765, 0.89411765) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_42" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.64705884, 0.61960787, 0.5882353) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "CameraModel" ( + prepend references = @./geometries.usd@ + ) + { + over "CameraModel" + { + bool primvars:doNotCastShadows = 1 + } + } + + def Xform "Wrist_Twist" ( + prepend references = @./geometries.usd@ + ) + { + over "Wrist_Twist" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + + over "Material_14" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_28" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_24" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_39" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_23" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_49" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_07" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_14" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5921569, 0.6666667, 0.68235296) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_28" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.627451, 0.23529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_24" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.6, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_39" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.11372549, 0.11372549, 0.11372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_23" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.29803923, 0.29803923, 0.29803923) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_49" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.8980392, 0.02745098) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_07" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "Finger_Left_01" ( + prepend references = @./geometries.usd@ + ) + { + over "Finger_Left_01" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + + over "Material_39" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_39" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.11372549, 0.11372549, 0.11372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "Finger_Right_01" ( + prepend references = @./geometries.usd@ + ) + { + over "Finger_Right_01" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_39" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_42" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_48" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_23" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_39" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.11372549, 0.11372549, 0.11372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_42" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.64705884, 0.61960787, 0.5882353) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_48" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.62352943, 0.4, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_23" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.29803923, 0.29803923, 0.29803923) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "Finger_Left_03" ( + prepend references = @./geometries.usd@ + ) + { + over "Finger_Left_03" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + + over "Material_39" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_39" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.11372549, 0.11372549, 0.11372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "Finger_Right_03" ( + prepend references = @./geometries.usd@ + ) + { + over "Finger_Right_03" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_39" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_39" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.11372549, 0.11372549, 0.11372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "Finger_Left_02" ( + prepend references = @./geometries.usd@ + ) + { + over "Finger_Left_02" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_39" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_39" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.11372549, 0.11372549, 0.11372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "Finger_Right_02" ( + prepend references = @./geometries.usd@ + ) + { + over "Finger_Right_02" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + bool physics:collisionEnabled = 1 + + over "Material_39" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_50" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_00" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_39" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.11372549, 0.11372549, 0.11372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_50" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "Material_00" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "CollisionMesh" ( + prepend references = @./geometries.usd@ + ) + { + over "CollisionMesh" + { + } + } +} + diff --git a/yahboom_dofbot/payloads/materials.usda b/yahboom_dofbot/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..5185991d7c4186444133b8581d463ddd87b986b0 --- /dev/null +++ b/yahboom_dofbot/payloads/materials.usda @@ -0,0 +1,4051 @@ +#usda 1.0 +( + customLayerData = { + } + endTimeCode = 100 + metersPerUnit = 1 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "material_0_592157_0_666667_0_682353" + { + token outputs:displacement ( + displayGroup = "Outputs" + ) + token outputs:mdl:surface.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5921569, 0.6666667, 0.68235296) + } + + def Shader "AgentfixMdlSurface" + { + uniform token info:implementationSource = "sourceAsset" + uniform asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + uniform token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.5, 0.5, 0.5) + token outputs:out + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "material_0_592157_0_666667_0_682353_1" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + token outputs:mdl:surface.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + prepend token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5921569, 0.6666667, 0.68235296) + token outputs:surface + } + + def Shader "AgentfixMdlSurface" + { + uniform token info:implementationSource = "sourceAsset" + uniform asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + uniform token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.5, 0.5, 0.5) + token outputs:out + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_00" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 1, 1) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_52" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.9098039, 0.44313726, 0.03137255) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.9098039, 0.44313726, 0.03137255) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_03" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.2509804, 0.2509804, 0.2509804) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2509804, 0.2509804, 0.2509804) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_20" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.9490196, 0.7607843, 0.18039216) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.9490196, 0.7607843, 0.18039216) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_15" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.83137256, 0.67058825, 0.12941177) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.83137256, 0.67058825, 0.12941177) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_01" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.7529412, 0.7529412, 0.7529412) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7529412, 0.7529412, 0.7529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_16" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0, 0.7058824, 0) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.7058824, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_17" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.6431373, 0.6156863, 0.6) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6431373, 0.6156863, 0.6) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_21" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.76862746, 0.76862746, 0.76862746) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.76862746, 0.76862746, 0.76862746) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_53" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.9882353, 0.7372549, 0.5176471) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.9882353, 0.7372549, 0.5176471) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_06" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.5019608, 0.5019608, 0.5019608) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5019608, 0.5019608, 0.5019608) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_54" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0, 0.7529412, 0) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.7529412, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_18" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.8, 0.8, 0.8) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8, 0.8, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_19" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.7529412, 0, 0) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7529412, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_07" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 1, 0) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_22" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.49803922, 0.49803922, 0.49803922) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.49803922, 0.49803922, 0.49803922) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_32" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.8980392, 0.8980392, 0.8980392) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8980392, 0.8980392, 0.8980392) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_33" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.84313726, 0.8156863, 0.7529412) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.84313726, 0.8156863, 0.7529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_23" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.29803923, 0.29803923, 0.29803923) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.29803923, 0.29803923, 0.29803923) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_02" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0, 0, 0) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_35" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.74509805, 0.92156863, 0.9882353) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.74509805, 0.92156863, 0.9882353) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_04" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 1, 0.7529412) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 0.7529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_08" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.83137256, 0.8392157, 0.83137256) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.83137256, 0.8392157, 0.83137256) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_09" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.8980392, 0.92156863, 0.92941177) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8980392, 0.92156863, 0.92941177) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_34" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.30980393, 0.30980393, 0.30980393) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.30980393, 0.30980393, 0.30980393) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_25" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.65882355, 0.47058824, 0.03529412) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.65882355, 0.47058824, 0.03529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_26" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.1254902, 0.1254902, 0.1254902) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.1254902, 0.1254902, 0.1254902) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_27" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.827451, 0.827451, 0.827451) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.827451, 0.827451, 0.827451) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_29" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.2, 0.2, 0.2) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2, 0.2, 0.2) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_30" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 0.92941177, 0.92941177) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.92941177, 0.92941177) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_45" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "plastic" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.14901961, 0.14901961, 0.14901961) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.14901961, 0.14901961, 0.14901961) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_50" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.7764706, 0.75686276, 0.7372549) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7764706, 0.75686276, 0.7372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_44" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 0.8980392, 0.09019608) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.8980392, 0.09019608) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_13" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0, 1, 1) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_05" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 0, 0) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_12" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0, 1, 0) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 1, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_10" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.003921569, 0, 0.3372549) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.003921569, 0, 0.3372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_11" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "fiberglass" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0, 0, 1) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_31" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 0.78431374, 0) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.78431374, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_28" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0, 0.627451, 0.23529412) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.627451, 0.23529412) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_51" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 0.827451, 0.02745098) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.827451, 0.02745098) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_14" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.5921569, 0.6666667, 0.68235296) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5921569, 0.6666667, 0.68235296) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_43" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "plastic" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.05490196, 0.05490196, 0.05490196) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.05490196, 0.05490196, 0.05490196) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_46" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "plastic" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.19607843, 0.19607843, 0.19607843) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.19607843, 0.19607843, 0.19607843) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_47" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "plastic" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 0.68235296, 0.09019608) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.68235296, 0.09019608) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_24" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 0.6, 0) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.6, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_36" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.5254902, 0.5254902, 0.5254902) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5254902, 0.5254902, 0.5254902) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_37" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.7058824, 0.7058824, 0.7058824) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7058824, 0.7058824, 0.7058824) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_38" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.33333334, 0.33333334, 0.33333334) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.33333334, 0.33333334, 0.33333334) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_39" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.11372549, 0.11372549, 0.11372549) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.11372549, 0.11372549, 0.11372549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_40" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.08235294, 0.08235294, 0.08235294) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.08235294, 0.08235294, 0.08235294) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_41" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.89411765, 0.89411765, 0.89411765) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.89411765, 0.89411765, 0.89411765) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_42" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.64705884, 0.61960787, 0.5882353) + color3f inputs:emissive_color = (0, 0, 0) + float inputs:emissive_intensity = 0 + bool inputs:enable_emission = 0 + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 + float inputs:reflection_roughness_constant = 0.5 + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.64705884, 0.61960787, 0.5882353) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_49" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 0.8980392, 0.02745098) ( + customData = { + float3 default = (0.2, 0.2, 0.2) + } + displayGroup = "Albedo" + doc = "This is the base color" + hidden = false + ) + color3f inputs:emissive_color = (0, 0, 0) ( + customData = { + float3 default = (1, 0.1, 0.1) + } + displayGroup = "Emissive" + doc = "The emission color" + hidden = false + ) + float inputs:emissive_intensity = 0 ( + customData = { + double default = 40 + } + displayGroup = "Emissive" + doc = "Intensity of the emission" + hidden = false + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + doc = "Enables the emission of light from the material" + hidden = false + ) + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Reflectivity" + doc = "Metallic Material" + hidden = false + ) + float inputs:reflection_roughness_constant = 0.5 ( + customData = { + double default = 0.5 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Reflectivity" + doc = "Higher roughness values lead to more blurry reflections" + hidden = false + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 0.8980392, 0.02745098) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } + + def Material "Material_48" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "none" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Shader" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.62352943, 0.4, 0) ( + customData = { + float3 default = (0.2, 0.2, 0.2) + } + displayGroup = "Albedo" + doc = "This is the base color" + hidden = false + ) + color3f inputs:emissive_color = (0, 0, 0) ( + customData = { + float3 default = (1, 0.1, 0.1) + } + displayGroup = "Emissive" + doc = "The emission color" + hidden = false + ) + float inputs:emissive_intensity = 0 ( + customData = { + double default = 40 + } + displayGroup = "Emissive" + doc = "Intensity of the emission" + hidden = false + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + doc = "Enables the emission of light from the material" + hidden = false + ) + bool inputs:excludeFromWhiteMode = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Material Flags" + hidden = false + ) + float inputs:metallic_constant = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Reflectivity" + doc = "Metallic Material" + hidden = false + ) + float inputs:reflection_roughness_constant = 0.5 ( + customData = { + double default = 0.5 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Reflectivity" + doc = "Higher roughness values lead to more blurry reflections" + hidden = false + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.62352943, 0.4, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + + def Shader "AgentfixOpenPBRSurface" + { + uniform token info:id = "ND_open_pbr_surface_surfaceshader" + color3f inputs:base_color = (0.5, 0.5, 0.5) + float inputs:base_metalness = 0 + float inputs:specular_roughness = 0.5 + token outputs:out + } + } +} + diff --git a/yahboom_dofbot/payloads/robot.usda b/yahboom_dofbot/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..d3383851f588ee46eebe879e6f47f9c40237ecad --- /dev/null +++ b/yahboom_dofbot/payloads/robot.usda @@ -0,0 +1,179 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "arm" + endTimeCode = 100 + metersPerUnit = 1 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "arm" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + prepend rel isaac:physics:robotJoints = [ + , + , + , + , + , + , + ] + prepend rel isaac:physics:robotLinks = [ + , + , + , + , + , + , + , + ] + token isaac:robotType = "Manipulator" + + over "link5" + { + over "Finger_Left_03" + { + over "Finger_Left_03" + { + } + } + + over "Finger_Right_03" + { + over "Finger_Right_03" + { + } + } + + over "Finger_Left_02" + { + over "Finger_Left_02" + { + } + + over "Finger_Left_02_SphericalJoint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + } + + over "Finger_Right_02" + { + over "Finger_Right_02" + { + } + + over "Finger_Right_02_SphericalJoint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + } + + over "Wrist_Twist" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + over "Wrist_Twist_RevoluteJoint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + custom string isaac:nameOverride + float[] isaac:physics:AccelerationLimit + float[] isaac:physics:JerkLimit + custom int isaac:physics:Rot_X:DofOffset + custom int isaac:physics:Rot_Y:DofOffset + custom int isaac:physics:Rot_Z:DofOffset + custom int isaac:physics:Tr_X:DofOffset + custom int isaac:physics:Tr_Y:DofOffset + custom int isaac:physics:Tr_Z:DofOffset + } + + over "link4" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + } + + over "link3" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + over "joint4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + } + + over "link2" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + over "joint3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "Shoulder_Lift" ( + prepend apiSchemas = ["IsaacSiteAPI"] + ) + { + } + } + + over "link1" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + over "joint2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + } + + over "base_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + over "joint1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + } +} + diff --git a/yahboom_dofbot/runnables/physics/mujoco.usda b/yahboom_dofbot/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..68847773479f33bebad7c9a01ec884cbec10589b --- /dev/null +++ b/yahboom_dofbot/runnables/physics/mujoco.usda @@ -0,0 +1,410 @@ +#usda 1.0 +( + defaultPrim = "arm" +) + +def "arm" +{ + over "link5" + { + over "Finger_Left_03" + { + over "Finger_Left_03" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "Finger_Right_03" + { + over "Finger_Right_03" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "Finger_Left_02" + { + over "Finger_Left_02" + { + over "Finger_Left_02" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + + over "Finger_Right_02" + { + over "Finger_Right_02" + { + over "Finger_Right_02" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + + over "Wrist_Twist" + { + over "Wrist_Twist" + { + over "Wrist_Twist" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "Wrist_Twist_RevoluteJoint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:damping = None + float drive:angular:physics:stiffness = None + float drive:angular:physics:targetPosition = -0 + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (-0.06549733, -0.0045318594, -0.00060643995) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (-0.4988273, 0.49882996, 0.50117344, -0.50116396) + quatf physics:localRot1 = (1, 0, 0, 0) + } + } + + over "Finger_Left_01" + { + over "Finger_Left_01" + { + over "Finger_Left_01" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "Finger_Left_01_RevoluteJoint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:damping = None + float drive:angular:physics:stiffness = None + float drive:angular:physics:targetPosition = -0 + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (-0.29220235, 1.2149862, 4.1918764) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, -1e-45, 6.162976e-33, -0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -30 + float physics:upperLimit = 30 + } + } + + over "Finger_Right_01" + { + over "Finger_Right_01" + { + over "Finger_Right_01" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "Finger_Right_01_RevoluteJoint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:damping = None + float drive:angular:physics:stiffness = None + float drive:angular:physics:targetPosition = -0 + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (-0.29220113, -1.240003, 4.1918764) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, -1e-45, 6.162985e-33, -0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -30 + float physics:upperLimit = 30 + } + } + + over "Finger_Left_02_RevoluteJoint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:targetPosition = -0 + float drive:angular:physics:targetVelocity = -0 + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (-0.16869655, 0.4503985, 5.992106) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, -0.00011703074, 0.0000049658033, -3.4355e-8) + quatf physics:localRot1 = (1, 0, 0, 0) + } + + over "Finger_Left_03_RevoluteJoint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:targetPosition = -0 + float drive:angular:physics:targetVelocity = -0 + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0.12363685, 1.8119415, 2.3910213) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 8.7435e-9, -7.463727e-10, 1.3773865e-9) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -30 + float physics:upperLimit = 30 + } + + over "Finger_Right_02_RevoluteJoint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:targetPosition = -0 + float drive:angular:physics:targetVelocity = -0 + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (-0.16868919, -0.45649478, 5.9916687) + point3f physics:localPos1 = (-5.173299e-7, 1.7269789, -2.4491472) + quatf physics:localRot0 = (1, 0.00009905596, 0.0000035586138, -3.2006255e-8) + quatf physics:localRot1 = (1, 1.9229503e-12, 1.4099211e-11, -1.479941e-14) + } + + over "Finger_Right_03_RevoluteJoint" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:targetPosition = -0 + float drive:angular:physics:targetVelocity = -0 + rel physics:body0 = + rel physics:body1 = + point3f physics:localPos0 = (0.12363637, -1.7653793, 2.4256) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 1.12872264e-7, 8.302244e-9, -1.2118254e-7) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -30 + float physics:upperLimit = 30 + } + } + + over "link4" + { + over "Wrist_Lift" + { + over "Wrist_Lift" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + + over "link3" + { + over "collisions" + { + over "collisions_2" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "joint4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:damping = None + float drive:angular:physics:stiffness = None + } + } + + over "link2" + { + over "collisions" + { + over "collisions_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "joint3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:damping = None + float drive:angular:physics:stiffness = None + } + } + + over "link1" + { + over "collisions" + { + over "collisions" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "joint2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:damping = None + float drive:angular:physics:stiffness = None + } + } + + over "base_link" + { + over "collisions" + { + over "visuals" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "joint1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + float drive:angular:physics:damping = None + float drive:angular:physics:stiffness = None + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_arm_link5_Wrist_Twist_Wrist_Twist_RevoluteJoint" ( + doc = "Position servo: control is joint angle in radians. Gains calibrated from source acceleration drive and MuJoCo reflected inertia at qpos0; not configuration-independent acceleration control. Original effort limit retained. Reversed wrist/finger coordinates use the opposite sign to PhysX." + ) + { + double[] mjc:biasPrm = [0, -1.7630056406940096, -0.017630056406940098, 0, 0, 0, 0, 0, 0, 0] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 0.09999999403953552 + double mjc:forceRange:min = -0.09999999403953552 + double[] mjc:gainPrm = [1.7630056406940096, 0, 0, 0, 0, 0, 0, 0, 0, 0] + token mjc:gainType = "affine" + rel mjc:target = + } + + def MjcActuator "act_arm_link5_Finger_Left_01_Finger_Left_01_RevoluteJoint" ( + doc = "Position servo: control is joint angle in radians. Gains calibrated from source acceleration drive and MuJoCo reflected inertia at qpos0; not configuration-independent acceleration control. Original effort limit retained. Reversed wrist/finger coordinates use the opposite sign to PhysX." + ) + { + double[] mjc:biasPrm = [0, -2.203656960666276, -0.367276160111046, 0, 0, 0, 0, 0, 0, 0] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 0.11999999731779099 + double mjc:forceRange:min = -0.11999999731779099 + double[] mjc:gainPrm = [2.203656960666276, 0, 0, 0, 0, 0, 0, 0, 0, 0] + token mjc:gainType = "affine" + rel mjc:target = + } + + def MjcActuator "act_arm_link5_Finger_Right_01_Finger_Right_01_RevoluteJoint" ( + doc = "Position servo: control is joint angle in radians. Gains calibrated from source acceleration drive and MuJoCo reflected inertia at qpos0; not configuration-independent acceleration control. Original effort limit retained. Reversed wrist/finger coordinates use the opposite sign to PhysX." + ) + { + double[] mjc:biasPrm = [0, -1.8033460484527106, -0.3005576747421185, 0, 0, 0, 0, 0, 0, 0] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 0.11999999731779099 + double mjc:forceRange:min = -0.11999999731779099 + double[] mjc:gainPrm = [1.8033460484527106, 0, 0, 0, 0, 0, 0, 0, 0, 0] + token mjc:gainType = "affine" + rel mjc:target = + } + + def MjcActuator "act_arm_link3_joint4" ( + doc = "Position servo: control is joint angle in radians. Gains calibrated from source acceleration drive and MuJoCo reflected inertia at qpos0; not configuration-independent acceleration control. Original effort limit retained. Reversed wrist/finger coordinates use the opposite sign to PhysX." + ) + { + double[] mjc:biasPrm = [0, -11.397692105152574, -0.5764100015010366, 0, 0, 0, 0, 0, 0, 0] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5.199999809265137 + double mjc:forceRange:min = -5.199999809265137 + double[] mjc:gainPrm = [11.397692105152574, 0, 0, 0, 0, 0, 0, 0, 0, 0] + token mjc:gainType = "affine" + rel mjc:target = + } + + def MjcActuator "act_arm_link2_joint3" ( + doc = "Position servo: control is joint angle in radians. Gains calibrated from source acceleration drive and MuJoCo reflected inertia at qpos0; not configuration-independent acceleration control. Original effort limit retained. Reversed wrist/finger coordinates use the opposite sign to PhysX." + ) + { + double[] mjc:biasPrm = [0, -10.292323453745324, -0.5205087242829218, 0, 0, 0, 0, 0, 0, 0] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5.199999809265137 + double mjc:forceRange:min = -5.199999809265137 + double[] mjc:gainPrm = [10.292323453745324, 0, 0, 0, 0, 0, 0, 0, 0, 0] + token mjc:gainType = "affine" + rel mjc:target = + } + + def MjcActuator "act_arm_link1_joint2" ( + doc = "Position servo: control is joint angle in radians. Gains calibrated from source acceleration drive and MuJoCo reflected inertia at qpos0; not configuration-independent acceleration control. Original effort limit retained. Reversed wrist/finger coordinates use the opposite sign to PhysX." + ) + { + double[] mjc:biasPrm = [0, -47.622095121882396, -2.4083693143700065, 0, 0, 0, 0, 0, 0, 0] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5.199999809265137 + double mjc:forceRange:min = -5.199999809265137 + double[] mjc:gainPrm = [47.622095121882396, 0, 0, 0, 0, 0, 0, 0, 0, 0] + token mjc:gainType = "affine" + rel mjc:target = + } + + def MjcActuator "act_arm_base_link_joint1" ( + doc = "Position servo: control is joint angle in radians. Gains calibrated from source acceleration drive and MuJoCo reflected inertia at qpos0; not configuration-independent acceleration control. Original effort limit retained. Reversed wrist/finger coordinates use the opposite sign to PhysX." + ) + { + double[] mjc:biasPrm = [0, -7.4568307148562205, -0.37711071363299586, 0, 0, 0, 0, 0, 0, 0] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5.199999809265137 + double mjc:forceRange:min = -5.199999809265137 + double[] mjc:gainPrm = [7.4568307148562205, 0, 0, 0, 0, 0, 0, 0, 0, 0] + token mjc:gainType = "affine" + rel mjc:target = + } + } +} + diff --git a/yahboom_dofbot/runnables/physics/newton.usda b/yahboom_dofbot/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..a586187e64b5c813ef0732048c8dfb91fd8bb0ab --- /dev/null +++ b/yahboom_dofbot/runnables/physics/newton.usda @@ -0,0 +1,305 @@ +#usda 1.0 +( + defaultPrim = "arm" +) + +over "arm" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] +) +{ + bool newton:selfCollisionEnabled = 0 + + over "link5" + { + over "Finger_Left_03" + { + over "Finger_Left_03" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "Finger_Right_03" + { + over "Finger_Right_03" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "Finger_Left_02" + { + over "Finger_Left_02" + { + over "Finger_Left_02" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + + over "Finger_Right_02" + { + over "Finger_Right_02" + { + over "Finger_Right_02" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + + over "Wrist_Twist" + { + over "Wrist_Twist" + { + over "Wrist_Twist" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "Wrist_Twist_RevoluteJoint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 5.2 + float drive:angular:physics:stiffness = 1.5 + float newton:damping = 0.009076 + custom rel physics:body0 = + custom rel physics:body1 = + point3f physics:localPos0 = (-0.06549733, -0.0045318594, -0.00060643995) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (-0.4988273, 0.49882996, 0.50117344, -0.50116396) + quatf physics:localRot1 = (1, 0, 0, 0) + } + } + + over "Finger_Left_01" + { + over "Finger_Left_01" + { + over "Finger_Left_01" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "Finger_Left_01_RevoluteJoint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 5.2 + float drive:angular:physics:stiffness = 3.4034 + float newton:damping = 0.009076 + custom rel physics:body0 = + custom rel physics:body1 = + point3f physics:localPos0 = (-0.29220235, 1.2149862, 4.1918764) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, -1e-45, 6.162976e-33, -0) + quatf physics:localRot1 = (1, 0, 0, 0) + } + } + + over "Finger_Right_01" + { + over "Finger_Right_01" + { + over "Finger_Right_01" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "Finger_Right_01_RevoluteJoint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:maxForce = 5.2 + float drive:angular:physics:stiffness = 3.4034 + float newton:damping = 0.009076 + custom rel physics:body0 = + custom rel physics:body1 = + point3f physics:localPos0 = (-0.29220113, -1.240003, 4.1918764) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, -1e-45, 6.162985e-33, -0) + quatf physics:localRot1 = (1, 0, 0, 0) + } + } + + over "Finger_Left_02_RevoluteJoint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float newton:damping = 0.002 + custom rel physics:body0 = + custom rel physics:body1 = + point3f physics:localPos0 = (-0.16869655, 0.4503985, 5.992106) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, -0.00011703074, 0.0000049658033, -3.4355e-8) + quatf physics:localRot1 = (1, 0, 0, 0) + } + + over "Finger_Left_03_RevoluteJoint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float newton:damping = 0.002 + custom rel physics:body0 = + custom rel physics:body1 = + point3f physics:localPos0 = (0.12363685, 1.8119415, 2.3910213) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 8.7435e-9, -7.463727e-10, 1.3773865e-9) + quatf physics:localRot1 = (1, 0, 0, 0) + } + + over "Finger_Right_02_RevoluteJoint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float newton:damping = 0.002 + custom rel physics:body0 = + custom rel physics:body1 = + point3f physics:localPos0 = (-0.16868919, -0.45649478, 5.9916687) + point3f physics:localPos1 = (-5.173299e-7, 1.7269789, -2.4491472) + quatf physics:localRot0 = (1, 0.00009905596, 0.0000035586138, -3.2006255e-8) + quatf physics:localRot1 = (1, 1.9229503e-12, 1.4099211e-11, -1.479941e-14) + } + + over "Finger_Right_03_RevoluteJoint" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float newton:damping = 0.002 + custom rel physics:body0 = + custom rel physics:body1 = + point3f physics:localPos0 = (0.12363637, -1.7653793, 2.4256) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 1.12872264e-7, 8.302244e-9, -1.2118254e-7) + quatf physics:localRot1 = (1, 0, 0, 0) + } + } + + over "link4" + { + over "Wrist_Lift" + { + over "Wrist_Lift" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + + over "link3" + { + over "collisions" + { + over "collisions_2" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "joint4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 3.4034 + float newton:damping = 0.113446 + float newton:velocityLimit = 57.29578 + } + } + + over "link2" + { + over "collisions" + { + over "collisions_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "joint3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 3.4034 + float newton:damping = 0.113446 + float newton:velocityLimit = 57.29578 + } + } + + over "link1" + { + over "collisions" + { + over "collisions" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "joint2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 3.4034 + float newton:damping = 0.113446 + float newton:velocityLimit = 57.29578 + } + } + + over "base_link" + { + over "collisions" + { + over "visuals" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + + over "joint1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 3.4034 + float newton:damping = 0.113446 + float newton:velocityLimit = 57.29578 + } + } +} + diff --git a/yahboom_dofbot/runnables/physics/physics.usda b/yahboom_dofbot/runnables/physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..fe284c5162b9999feb8c37d651b7ed7e8379c8e9 --- /dev/null +++ b/yahboom_dofbot/runnables/physics/physics.usda @@ -0,0 +1,137 @@ +#usda 1.0 +( + defaultPrim = "arm" +) + +over "arm" +{ + over "base_link" + { + over "collisions" + { + over "visuals" + { + token physics:approximation = "convexHull" + } + } + } + + over "link1" + { + over "collisions" + { + over "collisions" + { + token physics:approximation = "convexHull" + } + } + } + + over "link2" + { + over "collisions" + { + over "collisions_1" + { + token physics:approximation = "convexHull" + } + } + } + + over "link3" + { + over "collisions" + { + over "collisions_2" + { + token physics:approximation = "convexHull" + } + } + } + + over "link4" + { + over "Wrist_Lift" + { + over "Wrist_Lift" + { + token physics:approximation = "convexDecomposition" + } + } + } + + over "link5" + { + over "Wrist_Twist" + { + over "Wrist_Twist" + { + over "Wrist_Twist" + { + token physics:approximation = "convexHull" + } + } + } + + over "Finger_Left_01" + { + over "Finger_Left_01" + { + over "Finger_Left_01" + { + token physics:approximation = "convexHull" + } + } + } + + over "Finger_Right_01" + { + over "Finger_Right_01" + { + over "Finger_Right_01" + { + token physics:approximation = "convexHull" + } + } + } + + over "Finger_Left_03" + { + over "Finger_Left_03" + { + token physics:approximation = "convexHull" + } + } + + over "Finger_Right_03" + { + over "Finger_Right_03" + { + token physics:approximation = "convexHull" + } + } + + over "Finger_Left_02" + { + over "Finger_Left_02" + { + over "Finger_Left_02" + { + token physics:approximation = "convexHull" + } + } + } + + over "Finger_Right_02" + { + over "Finger_Right_02" + { + over "Finger_Right_02" + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/yahboom_dofbot/runnables/physics/physx.usda b/yahboom_dofbot/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..665956be1279550467bc1ad03638ee827bb1138d --- /dev/null +++ b/yahboom_dofbot/runnables/physics/physx.usda @@ -0,0 +1,432 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "arm" + endTimeCode = 100 + metersPerUnit = 1 + startTimeCode = 0 + subLayers = [ + @./physics.usda@ + ] + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "arm" ( + prepend apiSchemas = ["PhysxArticulationAPI"] +) +{ + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverVelocityIterationCount = 32 + + over "base_link" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + bool physxRigidBody:disableGravity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:maxDepenetrationVelocity = 0.049999997 + float physxRigidBody:maxLinearVelocity = inf + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "joint1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:jointFriction = 0 + float physxJoint:maxJointVelocity = 57.29578 + } + + over "collisions" + { + over "visuals" ( + prepend apiSchemas = ["PhysxCookedDataAPI:convexHull"] + ) + { + uchar[] physxCookedData:convexHull:buffer = [9, 90, 24, 186, 143, 86, 89, 216, 195, 179, 190, 169, 84, 62, 117, 136, 197, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 47, 0, 0, 0, 108, 128, 0, 0, 63, 0, 0, 0, 216, 0, 0, 0, 190, 216, 240, 60, 225, 47, 222, 188, 10, 215, 163, 61, 15, 114, 36, 61, 209, 4, 61, 190, 166, 155, 68, 59, 186, 99, 112, 61, 84, 34, 28, 190, 166, 155, 68, 59, 79, 131, 96, 61, 80, 235, 199, 60, 166, 155, 68, 59, 133, 138, 35, 61, 81, 71, 30, 59, 10, 215, 163, 61, 143, 194, 117, 61, 99, 139, 135, 35, 236, 161, 134, 152, 86, 227, 151, 188, 77, 187, 105, 61, 166, 155, 68, 59, 151, 193, 131, 187, 151, 2, 35, 61, 10, 215, 163, 61, 154, 119, 156, 59, 232, 105, 116, 61, 64, 141, 74, 163, 79, 131, 96, 189, 147, 89, 40, 190, 166, 155, 68, 59, 15, 114, 36, 189, 209, 4, 61, 190, 166, 155, 68, 59, 106, 180, 231, 188, 106, 180, 231, 188, 10, 215, 163, 61, 243, 210, 70, 61, 57, 121, 51, 190, 244, 187, 20, 36, 243, 210, 70, 61, 64, 116, 16, 61, 242, 108, 239, 162, 15, 114, 36, 61, 161, 162, 54, 61, 166, 155, 68, 59, 21, 79, 212, 60, 15, 153, 249, 60, 10, 215, 163, 61, 243, 210, 70, 189, 64, 116, 16, 61, 229, 108, 239, 162, 15, 114, 36, 189, 161, 162, 54, 61, 166, 155, 68, 59, 143, 194, 245, 188, 155, 213, 84, 61, 148, 97, 48, 163, 225, 47, 222, 188, 190, 216, 240, 60, 10, 215, 163, 61, 143, 194, 245, 60, 155, 213, 84, 61, 152, 97, 48, 163, 86, 227, 151, 60, 77, 187, 105, 61, 166, 155, 68, 59, 86, 227, 151, 60, 252, 202, 73, 190, 166, 155, 68, 59, 11, 39, 83, 58, 137, 206, 35, 189, 10, 215, 163, 61, 230, 130, 205, 187, 163, 118, 76, 190, 166, 155, 68, 59, 230, 130, 205, 59, 163, 118, 76, 190, 168, 113, 41, 36, 143, 194, 245, 60, 144, 145, 68, 190, 189, 230, 34, 36, 143, 194, 117, 61, 41, 92, 15, 190, 173, 156, 237, 35, 86, 227, 151, 188, 252, 202, 73, 190, 25, 59, 39, 36, 174, 130, 15, 189, 162, 23, 158, 60, 10, 215, 163, 61, 248, 253, 23, 61, 168, 175, 116, 60, 10, 215, 163, 61, 24, 254, 15, 60, 31, 214, 31, 61, 10, 215, 163, 61, 79, 131, 96, 189, 147, 89, 40, 190, 11, 132, 11, 36, 15, 114, 36, 189, 209, 4, 61, 190, 7, 165, 28, 36, 222, 65, 30, 61, 162, 158, 41, 188, 10, 215, 163, 61, 229, 107, 28, 189, 188, 248, 66, 188, 10, 215, 163, 61, 235, 123, 134, 188, 218, 103, 21, 61, 10, 215, 163, 61, 137, 206, 35, 189, 11, 39, 83, 58, 10, 215, 163, 61, 143, 194, 245, 188, 144, 145, 68, 190, 166, 155, 68, 59, 29, 90, 100, 61, 207, 73, 176, 60, 60, 24, 146, 162, 45, 19, 102, 61, 6, 18, 36, 190, 32, 248, 7, 36, 79, 131, 96, 189, 80, 235, 199, 60, 166, 155, 68, 59, 186, 99, 112, 189, 177, 98, 76, 60, 16, 97, 41, 162, 86, 227, 151, 188, 77, 187, 105, 61, 2, 179, 65, 163, 143, 194, 117, 189, 41, 92, 15, 190, 178, 156, 237, 35, 143, 194, 117, 189, 227, 184, 250, 162, 166, 155, 68, 59, 186, 99, 112, 189, 84, 34, 28, 190, 166, 155, 68, 59, 2, 73, 132, 154, 85, 39, 84, 165, 0, 0, 128, 191, 0, 0, 128, 152, 0, 0, 18, 0, 41, 244, 17, 63, 108, 136, 168, 190, 202, 178, 64, 63, 141, 240, 175, 189, 18, 0, 3, 16, 219, 207, 116, 63, 153, 154, 50, 62, 50, 80, 112, 62, 251, 4, 107, 189, 21, 0, 3, 46, 164, 228, 160, 189, 105, 48, 120, 63, 143, 199, 109, 62, 120, 107, 107, 189, 24, 0, 3, 25, 88, 100, 250, 190, 159, 235, 181, 190, 142, 238, 75, 63, 76, 109, 179, 189, 27, 0, 3, 13, 185, 81, 39, 63, 33, 52, 193, 190, 22, 244, 39, 63, 122, 108, 200, 189, 30, 0, 3, 16, 194, 22, 66, 63, 54, 30, 26, 63, 123, 68, 128, 62, 131, 180, 109, 189, 33, 0, 3, 33, 31, 246, 28, 191, 198, 82, 46, 63, 151, 10, 205, 190, 107, 69, 92, 189, 36, 0, 3, 1, 205, 31, 66, 191, 58, 107, 26, 63, 240, 48, 125, 62, 255, 230, 109, 189, 39, 0, 3, 12, 31, 246, 28, 63, 198, 82, 46, 63, 151, 10, 205, 190, 107, 69, 92, 189, 42, 0, 3, 10, 169, 82, 133, 62, 150, 26, 90, 63, 147, 147, 232, 190, 92, 83, 85, 189, 45, 0, 3, 24, 232, 100, 229, 62, 226, 126, 91, 63, 67, 166, 129, 62, 51, 138, 109, 189, 48, 0, 3, 28, 48, 97, 5, 63, 62, 57, 81, 63, 18, 19, 124, 62, 172, 247, 109, 189, 51, 0, 3, 38, 244, 102, 116, 62, 145, 168, 211, 190, 108, 243, 96, 63, 98, 77, 181, 189, 54, 0, 3, 18, 51, 104, 63, 62, 251, 164, 212, 190, 76, 232, 99, 63, 112, 47, 180, 189, 57, 0, 3, 18, 67, 129, 59, 61, 119, 255, 222, 190, 19, 37, 102, 63, 102, 10, 183, 189, 60, 0, 3, 8, 148, 40, 196, 61, 68, 74, 105, 191, 160, 10, 205, 62, 197, 240, 58, 190, 63, 0, 3, 8, 52, 147, 234, 62, 223, 37, 75, 191, 190, 10, 205, 62, 148, 15, 42, 190, 66, 0, 3, 18, 185, 249, 144, 62, 44, 24, 95, 191, 96, 10, 205, 190, 47, 0, 52, 190, 69, 0, 3, 36, 38, 246, 28, 63, 203, 82, 46, 191, 115, 10, 205, 190, 94, 176, 24, 190, 72, 0, 3, 19, 152, 77, 120, 63, 0, 0, 0, 0, 134, 53, 121, 62, 249, 94, 110, 189, 75, 0, 3, 44, 20, 163, 116, 63, 221, 95, 245, 188, 214, 16, 150, 62, 29, 7, 124, 189, 78, 0, 3, 42, 148, 40, 196, 189, 68, 74, 105, 191, 160, 10, 205, 190, 212, 181, 57, 190, 81, 0, 3, 31, 102, 57, 67, 191, 207, 242, 24, 63, 24, 240, 125, 62, 77, 237, 109, 189, 84, 0, 3, 12, 5, 54, 114, 63, 178, 51, 90, 62, 49, 156, 121, 62, 38, 183, 108, 189, 87, 0, 3, 46, 201, 123, 78, 63, 76, 250, 8, 63, 49, 166, 128, 62, 226, 168, 109, 189, 90, 0, 3, 32, 89, 206, 72, 63, 122, 169, 16, 63, 177, 238, 130, 62, 23, 150, 109, 189, 93, 0, 3, 32, 250, 15, 221, 62, 179, 81, 93, 63, 9, 181, 131, 62, 174, 4, 110, 189, 96, 0, 3, 28, 131, 157, 4, 62, 184, 47, 118, 63, 206, 132, 119, 62, 196, 147, 109, 189, 99, 0, 3, 24, 2, 170, 111, 61, 234, 161, 119, 63, 185, 168, 124, 62, 189, 145, 109, 189, 102, 0, 3, 25, 188, 27, 79, 191, 24, 121, 22, 191, 0, 0, 0, 0, 190, 92, 16, 190, 105, 0, 4, 13, 204, 114, 21, 63, 49, 162, 164, 190, 137, 218, 62, 63, 111, 40, 175, 189, 109, 0, 3, 16, 19, 188, 104, 63, 218, 28, 188, 189, 27, 4, 208, 62, 54, 115, 140, 189, 112, 0, 3, 42, 54, 155, 11, 191, 55, 202, 168, 190, 99, 74, 69, 63, 160, 243, 176, 189, 115, 0, 3, 13, 205, 20, 128, 190, 193, 0, 111, 63, 118, 86, 131, 62, 255, 92, 112, 189, 118, 0, 3, 25, 149, 205, 228, 190, 237, 111, 92, 63, 193, 96, 120, 62, 71, 46, 110, 189, 121, 0, 3, 26, 127, 86, 5, 191, 229, 54, 81, 63, 174, 140, 124, 62, 150, 240, 109, 189, 124, 0, 3, 26, 185, 174, 8, 191, 104, 206, 78, 63, 104, 168, 127, 62, 84, 104, 110, 189, 127, 0, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 10, 215, 163, 189, 130, 0, 14, 8, 28, 121, 22, 191, 185, 27, 79, 191, 0, 0, 0, 0, 133, 21, 49, 190, 144, 0, 3, 14, 52, 147, 234, 190, 223, 37, 75, 191, 190, 10, 205, 190, 162, 212, 40, 190, 147, 0, 3, 15, 185, 249, 144, 190, 44, 24, 95, 191, 96, 10, 205, 62, 32, 59, 53, 190, 150, 0, 3, 21, 198, 121, 13, 190, 115, 181, 217, 190, 18, 253, 100, 63, 175, 38, 181, 189, 153, 0, 3, 20, 110, 86, 44, 190, 54, 26, 214, 190, 55, 132, 100, 63, 235, 56, 180, 189, 156, 0, 3, 20, 128, 108, 150, 190, 95, 10, 207, 190, 8, 186, 93, 63, 249, 88, 182, 189, 159, 0, 3, 20, 156, 132, 95, 63, 11, 107, 234, 62, 187, 121, 43, 190, 22, 188, 111, 189, 162, 0, 3, 9, 155, 90, 121, 63, 244, 251, 68, 62, 18, 107, 244, 61, 57, 97, 111, 189, 165, 0, 3, 46, 28, 215, 109, 63, 10, 33, 52, 190, 77, 157, 166, 190, 119, 153, 164, 189, 168, 0, 3, 37, 72, 127, 82, 63, 16, 137, 213, 190, 182, 68, 198, 62, 231, 113, 231, 189, 171, 0, 3, 16, 61, 211, 111, 191, 212, 71, 118, 62, 221, 15, 130, 62, 122, 125, 109, 189, 174, 0, 3, 40, 36, 3, 111, 191, 19, 22, 128, 62, 205, 67, 131, 62, 142, 197, 109, 189, 177, 0, 3, 40, 14, 52, 79, 191, 206, 212, 8, 63, 99, 40, 121, 62, 215, 34, 110, 189, 180, 0, 3, 12, 145, 75, 86, 191, 26, 210, 190, 62, 120, 10, 205, 190, 116, 69, 92, 189, 183, 0, 3, 2, 202, 63, 208, 190, 30, 222, 105, 63, 0, 0, 0, 0, 233, 105, 116, 189, 186, 0, 3, 22, 199, 166, 227, 189, 218, 105, 126, 63, 0, 0, 0, 0, 148, 185, 112, 189, 189, 0, 3, 25, 48, 177, 116, 191, 164, 159, 35, 62, 246, 157, 124, 62, 149, 239, 109, 189, 192, 0, 3, 2, 157, 147, 109, 191, 135, 191, 2, 60, 165, 172, 190, 190, 83, 127, 95, 189, 195, 0, 3, 4, 200, 195, 119, 191, 87, 160, 176, 187, 64, 202, 128, 62, 245, 241, 112, 189, 198, 0, 3, 5, 2, 131, 60, 191, 63, 1, 117, 190, 219, 2, 34, 63, 85, 28, 167, 189, 201, 0, 3, 39, 125, 221, 96, 191, 14, 73, 255, 189, 163, 63, 236, 62, 16, 86, 147, 189, 204, 0, 3, 5, 98, 180, 116, 191, 124, 89, 247, 188, 135, 156, 149, 62, 30, 59, 124, 189, 207, 0, 3, 5, 249, 114, 101, 191, 109, 21, 67, 190, 162, 10, 205, 190, 79, 194, 164, 189, 210, 0, 3, 4, 112, 120, 115, 191, 128, 55, 158, 190, 0, 0, 0, 0, 236, 206, 210, 189, 213, 0, 3, 39, 43, 8, 20, 13, 39, 5, 27, 40, 12, 26, 25, 28, 33, 32, 44, 42, 16, 18, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 2, 1, 13, 14, 15, 16, 17, 18, 16, 19, 17, 20, 14, 13, 20, 8, 21, 20, 21, 15, 20, 15, 14, 22, 1, 0, 22, 0, 23, 22, 23, 24, 22, 24, 25, 26, 1, 22, 26, 22, 25, 26, 12, 1, 27, 5, 4, 27, 4, 2, 28, 25, 24, 29, 19, 16, 30, 4, 3, 30, 3, 13, 30, 13, 15, 31, 15, 21, 31, 21, 8, 31, 8, 7, 32, 33, 10, 9, 34, 0, 2, 34, 2, 4, 35, 9, 11, 36, 7, 6, 36, 6, 18, 36, 18, 17, 36, 17, 19, 36, 19, 29, 37, 35, 11, 23, 0, 34, 4, 30, 15, 31, 7, 38, 10, 33, 38, 33, 28, 38, 28, 24, 38, 24, 23, 38, 23, 11, 38, 11, 10, 39, 13, 3, 39, 3, 5, 40, 27, 2, 40, 2, 12, 41, 42, 37, 41, 37, 29, 41, 29, 16, 41, 16, 42, 43, 18, 6, 43, 6, 8, 45, 37, 42, 45, 42, 44, 45, 44, 37, 46, 9, 35, 46, 35, 37, 46, 37, 44, 46, 44, 32, 46, 32, 9, 0, 54, 0, 10, 0, 9, 0, 45, 0, 46, 0, 20, 0, 47, 0, 48, 0, 19, 0, 18, 0, 22, 0, 40, 0, 30, 0, 61, 0, 56, 0, 52, 0, 7, 0, 53, 1, 13, 1, 5, 1, 31, 2, 24, 2, 20, 2, 46, 3, 34, 3, 29, 3, 54, 4, 30, 4, 44, 4, 33, 5, 48, 5, 19, 6, 9, 6, 12, 6, 26, 7, 8, 7, 36, 8, 23, 8, 37, 9, 12, 10, 28, 10, 11, 11, 27, 11, 12, 13, 17, 13, 14, 14, 38, 14, 15, 15, 42, 15, 16, 16, 22, 16, 18, 17, 19, 17, 18, 20, 21, 21, 32, 21, 47, 22, 41, 23, 38, 23, 51, 24, 38, 24, 25, 25, 45, 25, 26, 26, 38, 27, 38, 27, 28, 28, 29, 29, 38, 30, 39, 30, 62, 31, 38, 31, 32, 32, 38, 33, 58, 33, 38, 34, 38, 34, 35, 35, 53, 35, 36, 36, 37, 37, 38, 38, 50, 38, 59, 38, 43, 39, 44, 39, 40, 40, 41, 41, 42, 42, 43, 43, 44, 45, 46, 47, 48, 49, 52, 49, 55, 49, 50, 50, 51, 51, 52, 53, 54, 55, 57, 55, 56, 56, 57, 57, 60, 58, 62, 58, 59, 59, 60, 60, 61, 61, 62, 1, 13, 14, 1, 5, 13, 1, 5, 21, 2, 24, 25, 2, 20, 21, 0, 2, 20, 3, 34, 35, 3, 29, 34, 0, 3, 10, 4, 30, 33, 4, 30, 39, 4, 33, 38, 0, 5, 19, 0, 6, 9, 6, 9, 12, 6, 11, 12, 0, 7, 8, 7, 8, 36, 0, 7, 35, 8, 23, 37, 0, 9, 10, 10, 11, 27, 13, 14, 15, 14, 15, 38, 15, 16, 22, 0, 16, 18, 0, 17, 18, 0, 20, 21, 0, 22, 40, 23, 38, 50, 24, 25, 26, 27, 28, 29, 0, 30, 61, 0, 30, 39, 31, 32, 38, 33, 38, 58, 34, 35, 36, 38, 49, 50, 39, 40, 41, 0, 45, 46, 0, 47, 48, 49, 50, 51, 0, 49, 52, 0, 53, 54, 0, 56, 57, 55, 56, 57, 58, 59, 60, 43, 0, 8, 0, 8, 0, 20, 0, 20, 0, 13, 0, 13, 0, 39, 0, 39, 0, 5, 0, 5, 0, 27, 0, 27, 0, 40, 0, 40, 0, 12, 0, 12, 0, 26, 0, 26, 0, 25, 0, 25, 0, 28, 0, 28, 0, 33, 0, 33, 0, 32, 0, 32, 0, 44, 0, 44, 0, 42, 0, 42, 0, 16, 0, 16, 0, 18, 0, 18, 0, 43, 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 3, 0, 4, 0, 4, 0, 5, 0, 5, 0, 3, 0, 6, 0, 7, 0, 7, 0, 8, 0, 8, 0, 6, 0, 9, 0, 10, 0, 10, 0, 11, 0, 11, 0, 9, 0, 12, 0, 2, 0, 1, 0, 12, 0, 13, 0, 14, 0, 14, 0, 15, 0, 15, 0, 13, 0, 16, 0, 17, 0, 17, 0, 18, 0, 16, 0, 19, 0, 19, 0, 17, 0, 20, 0, 14, 0, 8, 0, 21, 0, 21, 0, 20, 0, 21, 0, 15, 0, 15, 0, 20, 0, 22, 0, 1, 0, 0, 0, 22, 0, 0, 0, 23, 0, 23, 0, 22, 0, 23, 0, 24, 0, 24, 0, 22, 0, 24, 0, 25, 0, 25, 0, 22, 0, 26, 0, 1, 0, 22, 0, 26, 0, 4, 0, 27, 0, 4, 0, 2, 0, 2, 0, 27, 0, 24, 0, 28, 0, 29, 0, 19, 0, 16, 0, 29, 0, 30, 0, 4, 0, 3, 0, 30, 0, 3, 0, 13, 0, 13, 0, 30, 0, 15, 0, 30, 0, 31, 0, 15, 0, 21, 0, 31, 0, 8, 0, 31, 0, 7, 0, 31, 0, 33, 0, 10, 0, 9, 0, 32, 0, 34, 0, 0, 0, 2, 0, 34, 0, 4, 0, 34, 0, 35, 0, 9, 0, 11, 0, 35, 0, 36, 0, 7, 0, 6, 0, 36, 0, 6, 0, 18, 0, 18, 0, 36, 0, 17, 0, 36, 0, 19, 0, 36, 0, 29, 0, 37, 0, 37, 0, 35, 0, 11, 0, 23, 0, 38, 0, 10, 0, 33, 0, 38, 0, 28, 0, 38, 0, 24, 0, 38, 0, 23, 0, 38, 0, 11, 0, 38, 0, 3, 0, 39, 0, 2, 0, 40, 0, 41, 0, 42, 0, 42, 0, 37, 0, 37, 0, 41, 0, 29, 0, 41, 0, 16, 0, 41, 0, 6, 0, 43, 0, 45, 0, 37, 0, 42, 0, 45, 0, 44, 0, 45, 0, 44, 0, 37, 0, 46, 0, 9, 0, 35, 0, 46, 0, 37, 0, 46, 0, 44, 0, 46, 0, 32, 0, 46, 0, 0, 0, 0, 0, 143, 194, 117, 189, 162, 118, 76, 190, 0, 0, 0, 0, 143, 194, 117, 61, 230, 105, 116, 61, 10, 215, 163, 61, 173, 129, 163, 58, 218, 13, 9, 55, 62, 181, 108, 178, 33, 178, 175, 49, 62, 181, 108, 178, 6, 209, 51, 54, 233, 42, 158, 53, 33, 178, 175, 49, 233, 42, 158, 53, 245, 147, 252, 54, 16, 147, 43, 185, 183, 110, 57, 189, 210, 1, 244, 60, 0, 0, 128, 63, 73, 67, 69, 1, 83, 85, 80, 77, 0, 0, 0, 0, 73, 67, 69, 1, 71, 65, 85, 83, 0, 0, 0, 0, 16, 0, 0, 0, 0, 6, 0, 0, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 2, 2, 2, 2, 2, 40, 40, 40, 40, 40, 40, 40, 40, 2, 2, 2, 2, 2, 2, 2, 34, 40, 40, 40, 40, 40, 40, 2, 2, 2, 2, 2, 2, 2, 34, 34, 34, 27, 27, 27, 27, 27, 27, 27, 27, 27, 2, 2, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 39, 39, 39, 39, 39, 39, 39, 39, 39, 3, 4, 4, 4, 4, 4, 4, 39, 39, 39, 39, 39, 39, 39, 39, 3, 3, 30, 30, 30, 30, 30, 30, 39, 39, 39, 39, 39, 39, 39, 3, 3, 3, 30, 30, 30, 30, 30, 30, 13, 13, 13, 13, 13, 13, 13, 13, 13, 3, 30, 30, 30, 30, 30, 30, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 15, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 33, 33, 33, 33, 33, 33, 33, 33, 10, 10, 10, 10, 10, 10, 10, 10, 33, 33, 33, 33, 33, 33, 33, 33, 10, 10, 10, 10, 10, 10, 10, 10, 33, 33, 33, 33, 33, 33, 33, 33, 10, 10, 10, 10, 10, 10, 10, 10, 32, 32, 32, 32, 32, 32, 32, 32, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32, 32, 32, 32, 32, 32, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32, 32, 32, 32, 32, 32, 9, 9, 9, 9, 9, 9, 9, 35, 44, 44, 44, 44, 44, 46, 46, 46, 46, 46, 46, 46, 46, 35, 35, 35, 44, 44, 44, 44, 44, 44, 44, 44, 44, 46, 46, 37, 37, 37, 37, 37, 42, 42, 42, 42, 42, 42, 42, 45, 45, 45, 37, 37, 37, 37, 37, 37, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 37, 37, 37, 37, 37, 37, 42, 42, 42, 42, 42, 42, 42, 42, 41, 41, 29, 29, 29, 29, 29, 29, 16, 16, 16, 16, 16, 41, 41, 41, 41, 41, 29, 29, 29, 29, 29, 29, 16, 16, 16, 16, 16, 16, 16, 16, 16, 41, 29, 29, 29, 29, 29, 29, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 29, 29, 29, 29, 29, 29, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 19, 19, 19, 19, 19, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 16, 18, 18, 18, 18, 43, 43, 8, 8, 8, 20, 20, 20, 20, 20, 13, 16, 18, 18, 18, 18, 43, 43, 8, 8, 8, 20, 20, 20, 20, 20, 13, 16, 18, 18, 18, 18, 43, 43, 8, 8, 8, 20, 20, 20, 20, 20, 13, 16, 18, 18, 18, 18, 43, 43, 8, 8, 8, 20, 20, 20, 20, 20, 13, 16, 17, 18, 18, 18, 43, 43, 8, 8, 8, 20, 20, 20, 20, 14, 13, 16, 17, 18, 18, 18, 43, 43, 8, 8, 8, 21, 20, 20, 20, 14, 13, 17, 17, 18, 18, 18, 43, 43, 8, 8, 8, 21, 20, 20, 20, 14, 14, 17, 17, 18, 18, 18, 43, 43, 8, 8, 8, 21, 20, 20, 20, 14, 14, 17, 17, 17, 18, 18, 6, 6, 8, 8, 21, 21, 20, 20, 14, 14, 14, 17, 17, 17, 18, 6, 6, 6, 8, 8, 21, 21, 21, 20, 14, 14, 14, 17, 17, 19, 36, 36, 36, 7, 7, 31, 31, 31, 31, 15, 15, 14, 14, 19, 19, 19, 36, 36, 36, 7, 7, 31, 31, 31, 31, 15, 15, 15, 15, 19, 19, 19, 36, 36, 36, 7, 7, 31, 31, 31, 31, 15, 15, 15, 15, 19, 19, 19, 36, 36, 36, 7, 7, 31, 31, 31, 31, 15, 15, 15, 15, 19, 19, 19, 36, 36, 36, 7, 7, 31, 31, 31, 31, 15, 15, 15, 15, 19, 19, 19, 36, 36, 36, 7, 7, 31, 31, 31, 31, 15, 15, 15, 15, 33, 33, 33, 33, 28, 28, 28, 25, 25, 25, 26, 26, 26, 26, 26, 12, 33, 33, 33, 33, 28, 28, 28, 25, 25, 25, 26, 26, 26, 26, 26, 12, 33, 33, 33, 33, 28, 28, 28, 25, 25, 25, 26, 26, 26, 26, 26, 12, 33, 33, 33, 33, 28, 28, 28, 25, 25, 25, 26, 26, 26, 26, 26, 12, 33, 33, 33, 33, 28, 28, 28, 25, 25, 25, 26, 26, 26, 26, 1, 12, 33, 33, 33, 38, 28, 28, 28, 25, 25, 25, 22, 26, 26, 26, 1, 12, 33, 33, 33, 38, 28, 28, 28, 24, 25, 25, 22, 26, 26, 26, 1, 1, 33, 33, 33, 38, 38, 28, 28, 24, 25, 25, 22, 26, 26, 26, 1, 1, 10, 10, 10, 38, 38, 28, 24, 24, 25, 22, 22, 26, 26, 1, 1, 1, 10, 10, 10, 38, 38, 28, 24, 24, 25, 22, 22, 22, 26, 1, 1, 1, 10, 10, 10, 38, 38, 28, 24, 24, 24, 22, 22, 22, 26, 1, 1, 1, 10, 10, 10, 38, 38, 38, 24, 24, 24, 22, 22, 22, 1, 1, 1, 1, 10, 10, 10, 38, 38, 38, 24, 24, 24, 22, 22, 22, 1, 1, 1, 1, 10, 10, 10, 38, 38, 38, 24, 24, 24, 22, 22, 22, 1, 1, 1, 1, 10, 10, 10, 38, 38, 38, 24, 24, 24, 22, 22, 22, 1, 1, 1, 1, 10, 10, 10, 38, 38, 38, 24, 24, 24, 22, 22, 22, 1, 1, 1, 1, 10, 10, 10, 9, 9, 35, 35, 37, 37, 37, 29, 29, 29, 29, 19, 19, 10, 10, 10, 9, 9, 35, 35, 37, 37, 37, 29, 29, 29, 19, 19, 19, 10, 10, 10, 10, 9, 35, 35, 37, 37, 29, 29, 29, 19, 19, 19, 19, 38, 38, 10, 10, 10, 35, 35, 37, 37, 29, 29, 29, 19, 19, 19, 36, 38, 38, 38, 10, 10, 11, 35, 35, 37, 29, 29, 19, 19, 36, 36, 36, 38, 38, 38, 38, 11, 11, 35, 35, 37, 29, 19, 19, 36, 36, 36, 36, 24, 24, 24, 38, 11, 11, 11, 35, 29, 19, 36, 36, 36, 36, 7, 7, 24, 24, 24, 24, 23, 23, 23, 11, 19, 36, 7, 7, 7, 7, 7, 7, 24, 24, 24, 22, 23, 23, 23, 0, 15, 31, 31, 31, 31, 31, 31, 31, 22, 22, 22, 22, 23, 0, 0, 34, 30, 15, 15, 31, 31, 31, 31, 31, 22, 22, 22, 22, 1, 0, 0, 34, 4, 30, 15, 15, 15, 31, 31, 31, 22, 22, 1, 1, 1, 0, 34, 34, 4, 30, 30, 15, 15, 15, 15, 31, 1, 1, 1, 1, 1, 0, 34, 34, 4, 30, 30, 15, 15, 15, 15, 15, 1, 1, 1, 1, 1, 34, 34, 4, 4, 30, 30, 30, 15, 15, 15, 15, 1, 1, 1, 1, 2, 34, 34, 4, 4, 30, 30, 30, 30, 15, 15, 15, 1, 1, 1, 1, 2, 34, 34, 4, 4, 4, 30, 30, 30, 15, 15, 15, 33, 33, 33, 32, 32, 32, 44, 44, 42, 42, 42, 16, 16, 16, 16, 16, 33, 33, 33, 32, 32, 32, 32, 44, 42, 42, 42, 16, 16, 16, 16, 18, 33, 33, 33, 33, 32, 32, 32, 44, 42, 42, 16, 16, 16, 16, 18, 18, 33, 33, 33, 33, 33, 32, 32, 44, 42, 42, 16, 16, 16, 18, 18, 18, 28, 28, 33, 33, 33, 32, 32, 44, 42, 42, 16, 16, 18, 18, 18, 18, 28, 28, 28, 28, 33, 33, 32, 44, 42, 16, 16, 18, 18, 18, 43, 43, 28, 28, 28, 28, 28, 33, 33, 32, 42, 16, 18, 43, 43, 43, 43, 43, 25, 25, 25, 28, 28, 28, 28, 33, 16, 43, 43, 43, 8, 8, 8, 8, 25, 25, 25, 25, 25, 25, 26, 12, 13, 20, 8, 8, 8, 8, 8, 8, 25, 25, 25, 26, 26, 26, 12, 40, 39, 13, 20, 20, 20, 8, 8, 8, 26, 26, 26, 26, 26, 12, 12, 40, 39, 13, 13, 20, 20, 20, 20, 20, 26, 26, 26, 26, 12, 12, 40, 27, 5, 39, 13, 13, 20, 20, 20, 20, 26, 26, 26, 12, 12, 12, 40, 27, 5, 39, 13, 13, 13, 20, 20, 20, 26, 26, 12, 12, 12, 40, 40, 27, 5, 39, 39, 13, 13, 13, 20, 20, 26, 12, 12, 12, 12, 40, 40, 27, 5, 39, 39, 13, 13, 13, 13, 20, 12, 12, 12, 12, 40, 40, 40, 27, 5, 39, 39, 39, 13, 13, 13, 13, 19, 19, 19, 19, 19, 17, 17, 17, 17, 17, 16, 16, 16, 16, 16, 16, 19, 19, 19, 19, 19, 17, 17, 16, 16, 16, 16, 16, 16, 16, 16, 16, 29, 29, 29, 29, 29, 29, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 29, 29, 29, 29, 29, 29, 41, 16, 16, 16, 16, 16, 16, 16, 16, 16, 29, 29, 29, 29, 29, 29, 41, 41, 41, 41, 41, 16, 16, 16, 16, 16, 29, 29, 29, 29, 29, 29, 41, 41, 42, 42, 42, 42, 42, 42, 42, 42, 37, 37, 37, 37, 37, 37, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 37, 37, 37, 37, 37, 37, 45, 45, 45, 42, 42, 42, 42, 42, 42, 42, 37, 37, 37, 37, 37, 46, 46, 44, 44, 44, 44, 44, 44, 44, 44, 44, 35, 35, 35, 46, 46, 46, 46, 46, 46, 46, 46, 44, 44, 44, 44, 44, 35, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32, 32, 32, 32, 32, 32, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32, 32, 32, 32, 32, 32, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32, 32, 32, 32, 32, 32, 10, 10, 10, 10, 10, 10, 10, 10, 33, 33, 33, 33, 33, 33, 33, 33, 10, 10, 10, 10, 10, 10, 10, 10, 33, 33, 33, 33, 33, 33, 33, 33, 10, 10, 10, 10, 10, 10, 10, 10, 33, 33, 33, 33, 33, 33, 33, 33, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 30, 30, 30, 30, 30, 30, 3, 13, 13, 13, 13, 13, 13, 13, 13, 13, 30, 30, 30, 30, 30, 30, 3, 3, 3, 39, 39, 39, 39, 39, 39, 39, 30, 30, 30, 30, 30, 30, 3, 3, 39, 39, 39, 39, 39, 39, 39, 39, 4, 4, 4, 4, 4, 4, 3, 39, 39, 39, 39, 39, 39, 39, 39, 39, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 2, 2, 27, 27, 27, 27, 27, 27, 27, 27, 27, 34, 34, 34, 2, 2, 2, 2, 2, 2, 2, 40, 40, 40, 40, 40, 40, 34, 2, 2, 2, 2, 2, 2, 2, 40, 40, 40, 40, 40, 40, 40, 40, 2, 2, 2, 2, 2, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 22, 22, 22, 24, 24, 24, 38, 38, 38, 10, 10, 10, 1, 1, 1, 1, 22, 22, 22, 24, 24, 24, 38, 38, 38, 10, 10, 10, 1, 1, 1, 1, 22, 22, 22, 24, 24, 24, 38, 38, 38, 10, 10, 10, 1, 1, 1, 1, 22, 22, 22, 24, 24, 24, 38, 38, 38, 10, 10, 10, 1, 1, 1, 1, 22, 22, 22, 24, 24, 24, 38, 38, 38, 10, 10, 10, 1, 1, 1, 26, 22, 22, 22, 24, 24, 24, 28, 38, 38, 10, 10, 10, 1, 1, 1, 26, 22, 22, 22, 25, 24, 24, 28, 38, 38, 10, 10, 10, 1, 1, 1, 26, 26, 22, 22, 25, 24, 24, 28, 38, 38, 10, 10, 10, 1, 1, 26, 26, 26, 22, 25, 25, 24, 28, 28, 38, 38, 33, 33, 33, 1, 1, 26, 26, 26, 22, 25, 25, 24, 28, 28, 28, 38, 33, 33, 33, 12, 1, 26, 26, 26, 22, 25, 25, 25, 28, 28, 28, 38, 33, 33, 33, 12, 1, 26, 26, 26, 26, 25, 25, 25, 28, 28, 28, 33, 33, 33, 33, 12, 26, 26, 26, 26, 26, 25, 25, 25, 28, 28, 28, 33, 33, 33, 33, 12, 26, 26, 26, 26, 26, 25, 25, 25, 28, 28, 28, 33, 33, 33, 33, 12, 26, 26, 26, 26, 26, 25, 25, 25, 28, 28, 28, 33, 33, 33, 33, 12, 26, 26, 26, 26, 26, 25, 25, 25, 28, 28, 28, 33, 33, 33, 33, 15, 15, 15, 15, 31, 31, 31, 31, 7, 7, 36, 36, 36, 19, 19, 19, 15, 15, 15, 15, 31, 31, 31, 31, 7, 7, 36, 36, 36, 19, 19, 19, 15, 15, 15, 15, 31, 31, 31, 31, 7, 7, 36, 36, 36, 19, 19, 19, 15, 15, 15, 15, 31, 31, 31, 31, 7, 7, 36, 36, 36, 19, 19, 19, 15, 15, 15, 15, 31, 31, 31, 31, 7, 7, 36, 36, 36, 19, 19, 19, 14, 14, 15, 15, 31, 31, 31, 31, 7, 7, 36, 36, 36, 19, 17, 17, 14, 14, 14, 20, 21, 21, 21, 8, 8, 6, 6, 6, 18, 17, 17, 17, 14, 14, 14, 20, 20, 21, 21, 8, 8, 6, 6, 18, 18, 17, 17, 17, 14, 14, 20, 20, 20, 21, 8, 8, 8, 43, 43, 18, 18, 18, 17, 17, 14, 14, 20, 20, 20, 21, 8, 8, 8, 43, 43, 18, 18, 18, 17, 17, 13, 14, 20, 20, 20, 21, 8, 8, 8, 43, 43, 18, 18, 18, 17, 16, 13, 14, 20, 20, 20, 20, 8, 8, 8, 43, 43, 18, 18, 18, 17, 16, 13, 20, 20, 20, 20, 20, 8, 8, 8, 43, 43, 18, 18, 18, 18, 16, 13, 20, 20, 20, 20, 20, 8, 8, 8, 43, 43, 18, 18, 18, 18, 16, 13, 20, 20, 20, 20, 20, 8, 8, 8, 43, 43, 18, 18, 18, 18, 16, 13, 20, 20, 20, 20, 20, 8, 8, 8, 43, 43, 18, 18, 18, 18, 16, 13, 13, 13, 13, 39, 39, 39, 5, 27, 40, 40, 40, 12, 12, 12, 12, 20, 13, 13, 13, 13, 39, 39, 5, 27, 40, 40, 12, 12, 12, 12, 26, 20, 20, 13, 13, 13, 39, 39, 5, 27, 40, 40, 12, 12, 12, 26, 26, 20, 20, 20, 13, 13, 13, 39, 5, 27, 40, 12, 12, 12, 26, 26, 26, 20, 20, 20, 20, 13, 13, 39, 5, 27, 40, 12, 12, 26, 26, 26, 26, 20, 20, 20, 20, 20, 13, 13, 39, 40, 12, 12, 26, 26, 26, 26, 26, 8, 8, 8, 20, 20, 20, 13, 39, 40, 12, 26, 26, 26, 25, 25, 25, 8, 8, 8, 8, 8, 8, 20, 13, 12, 26, 25, 25, 25, 25, 25, 25, 8, 8, 8, 8, 43, 43, 43, 16, 33, 28, 28, 28, 28, 25, 25, 25, 43, 43, 43, 43, 43, 18, 16, 42, 32, 33, 33, 28, 28, 28, 28, 28, 43, 43, 18, 18, 18, 16, 16, 42, 44, 32, 33, 33, 28, 28, 28, 28, 18, 18, 18, 18, 16, 16, 42, 42, 44, 32, 32, 33, 33, 33, 28, 28, 18, 18, 18, 16, 16, 16, 42, 42, 44, 32, 32, 33, 33, 33, 33, 33, 18, 18, 16, 16, 16, 16, 42, 42, 44, 32, 32, 32, 33, 33, 33, 33, 18, 16, 16, 16, 16, 42, 42, 42, 44, 32, 32, 32, 32, 33, 33, 33, 16, 16, 16, 16, 16, 42, 42, 42, 44, 44, 32, 32, 32, 33, 33, 33, 15, 15, 15, 30, 30, 30, 4, 4, 4, 34, 34, 2, 1, 1, 1, 1, 15, 15, 15, 30, 30, 30, 30, 4, 4, 34, 34, 2, 1, 1, 1, 1, 15, 15, 15, 15, 30, 30, 30, 4, 4, 34, 34, 1, 1, 1, 1, 1, 15, 15, 15, 15, 15, 30, 30, 4, 34, 34, 0, 1, 1, 1, 1, 1, 31, 15, 15, 15, 15, 30, 30, 4, 34, 34, 0, 1, 1, 1, 22, 22, 31, 31, 31, 15, 15, 15, 30, 4, 34, 0, 0, 1, 22, 22, 22, 22, 31, 31, 31, 31, 31, 15, 15, 30, 34, 0, 0, 23, 22, 22, 22, 22, 31, 31, 31, 31, 31, 31, 31, 15, 0, 23, 23, 23, 22, 24, 24, 24, 7, 7, 7, 7, 7, 7, 36, 19, 11, 23, 23, 23, 24, 24, 24, 24, 7, 7, 36, 36, 36, 36, 19, 29, 35, 11, 11, 11, 38, 24, 24, 24, 36, 36, 36, 36, 19, 19, 29, 37, 35, 35, 11, 11, 38, 38, 38, 38, 36, 36, 36, 19, 19, 29, 29, 37, 35, 35, 11, 10, 10, 38, 38, 38, 36, 19, 19, 19, 29, 29, 29, 37, 37, 35, 35, 10, 10, 10, 38, 38, 19, 19, 19, 19, 29, 29, 29, 37, 37, 35, 35, 9, 10, 10, 10, 10, 19, 19, 19, 29, 29, 29, 37, 37, 37, 35, 35, 9, 9, 10, 10, 10, 19, 19, 29, 29, 29, 29, 37, 37, 37, 35, 35, 9, 9, 10, 10, 10, 73, 67, 69, 1, 86, 65, 76, 69, 2, 0, 0, 0, 47, 0, 0, 0, 216, 0, 0, 0, 7, 0, 0, 0, 5, 5, 7, 5, 6, 4, 5, 4, 6, 5, 4, 5, 4, 6, 3, 6, 6, 4, 5, 4, 5, 4, 6, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 5, 7, 6, 3, 3, 4, 5, 3, 5, 3, 5, 1, 22, 23, 34, 2, 2, 12, 26, 22, 0, 0, 34, 4, 27, 40, 12, 1, 4, 30, 13, 39, 5, 5, 27, 2, 34, 30, 3, 27, 4, 3, 39, 7, 36, 18, 43, 8, 8, 31, 36, 6, 20, 21, 31, 7, 6, 43, 10, 32, 46, 35, 11, 11, 38, 33, 9, 9, 35, 23, 38, 10, 26, 1, 2, 40, 39, 3, 30, 15, 14, 20, 15, 20, 13, 13, 30, 31, 21, 20, 14, 18, 17, 19, 29, 41, 42, 18, 36, 19, 16, 43, 6, 36, 17, 16, 17, 36, 29, 16, 13, 14, 15, 21, 8, 20, 15, 31, 8, 1, 26, 25, 24, 23, 0, 22, 24, 38, 11, 0, 22, 25, 28, 38, 23, 28, 24, 22, 26, 25, 22, 1, 12, 40, 2, 4, 5, 33, 38, 24, 25, 19, 37, 41, 16, 4, 15, 13, 3, 15, 7, 8, 21, 44, 46, 9, 33, 32, 10, 38, 28, 0, 4, 2, 9, 46, 37, 11, 7, 19, 17, 18, 6, 35, 46, 44, 45, 42, 41, 29, 10, 11, 23, 24, 28, 33, 5, 3, 13, 12, 2, 27, 42, 16, 29, 37, 16, 41, 37, 45, 44, 8, 6, 18, 42, 45, 37, 46, 32, 37, 44, 42, 9, 32, 44, 37, 35, 0, 0, 128, 191, 210, 1, 244, 60, 169, 224, 140, 60, 182, 28, 109, 61, 169, 224, 140, 60] + } + } + } + + over "link1" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + bool physxRigidBody:disableGravity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:maxDepenetrationVelocity = 0.049999997 + float physxRigidBody:maxLinearVelocity = inf + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "joint2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:jointFriction = 0 + float physxJoint:maxJointVelocity = 57.29578 + } + + over "collisions" + { + over "collisions" ( + prepend apiSchemas = ["PhysxCookedDataAPI:convexHull"] + ) + { + uchar[] physxCookedData:convexHull:buffer = [9, 19, 166, 163, 123, 130, 224, 151, 239, 193, 126, 11, 160, 137, 192, 88, 55, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 34, 0, 0, 0, 96, 128, 0, 0, 64, 0, 0, 0, 192, 0, 0, 0, 96, 175, 140, 60, 124, 243, 175, 188, 147, 169, 130, 60, 203, 42, 17, 186, 253, 59, 225, 188, 138, 142, 100, 60, 47, 42, 53, 59, 144, 35, 224, 188, 201, 84, 65, 59, 195, 100, 170, 60, 237, 251, 20, 188, 128, 72, 63, 61, 3, 14, 121, 187, 124, 100, 234, 186, 124, 242, 48, 187, 253, 59, 225, 60, 203, 42, 17, 186, 201, 84, 65, 59, 49, 86, 177, 60, 54, 239, 138, 188, 201, 84, 65, 59, 94, 246, 145, 188, 58, 153, 171, 188, 201, 84, 65, 59, 118, 222, 224, 188, 12, 162, 217, 186, 201, 84, 65, 59, 195, 100, 170, 188, 61, 74, 243, 187, 194, 48, 72, 61, 195, 100, 170, 60, 237, 251, 20, 60, 128, 72, 63, 61, 234, 192, 152, 60, 2, 149, 165, 60, 138, 142, 100, 60, 230, 239, 6, 59, 206, 165, 224, 60, 147, 169, 130, 60, 195, 100, 170, 188, 143, 43, 38, 60, 22, 233, 52, 61, 195, 100, 170, 188, 195, 25, 50, 59, 94, 82, 83, 61, 195, 100, 170, 60, 195, 25, 50, 59, 94, 82, 83, 61, 19, 171, 97, 188, 106, 252, 194, 188, 147, 169, 130, 60, 195, 100, 170, 188, 49, 8, 44, 188, 122, 199, 41, 61, 252, 231, 36, 188, 15, 166, 209, 60, 147, 169, 130, 60, 58, 153, 171, 188, 94, 246, 145, 60, 138, 142, 100, 60, 203, 42, 17, 186, 253, 59, 225, 60, 156, 51, 162, 59, 2, 149, 165, 188, 234, 192, 152, 60, 201, 84, 65, 59, 215, 52, 212, 60, 73, 65, 23, 60, 138, 142, 100, 60, 204, 110, 205, 188, 100, 234, 56, 188, 138, 142, 100, 60, 107, 198, 219, 188, 98, 253, 197, 59, 138, 142, 100, 60, 73, 65, 23, 188, 215, 52, 212, 60, 201, 84, 65, 59, 91, 20, 215, 60, 1, 11, 6, 188, 138, 142, 100, 60, 1, 11, 6, 60, 91, 20, 215, 60, 201, 84, 65, 59, 9, 76, 159, 60, 9, 76, 159, 60, 201, 84, 65, 59, 196, 56, 40, 188, 53, 253, 208, 188, 201, 84, 65, 59, 175, 109, 120, 60, 244, 240, 187, 188, 201, 84, 65, 59, 195, 100, 170, 60, 195, 25, 50, 187, 94, 82, 83, 61, 204, 110, 205, 188, 100, 234, 56, 60, 201, 84, 65, 59, 21, 139, 201, 60, 61, 79, 73, 60, 201, 84, 65, 59, 87, 177, 159, 62, 28, 79, 114, 191, 146, 30, 169, 61, 237, 53, 221, 188, 0, 0, 3, 25, 68, 221, 137, 62, 6, 103, 103, 191, 233, 36, 170, 62, 248, 88, 240, 188, 3, 0, 3, 25, 176, 16, 56, 62, 100, 50, 131, 189, 181, 75, 123, 191, 120, 111, 8, 187, 6, 0, 3, 14, 36, 244, 108, 190, 204, 173, 236, 189, 212, 73, 119, 191, 212, 25, 114, 187, 9, 0, 3, 15, 77, 235, 19, 188, 46, 135, 94, 191, 147, 19, 253, 62, 6, 80, 252, 188, 12, 0, 3, 20, 97, 116, 210, 62, 196, 0, 95, 63, 138, 151, 137, 62, 8, 189, 237, 188, 15, 0, 3, 29, 175, 78, 33, 188, 71, 53, 91, 63, 200, 51, 4, 63, 249, 213, 1, 189, 18, 0, 3, 2, 108, 127, 206, 188, 59, 246, 52, 63, 56, 246, 52, 63, 72, 101, 31, 189, 21, 0, 3, 2, 0, 0, 0, 0, 204, 215, 27, 63, 51, 25, 75, 63, 218, 109, 46, 189, 24, 0, 3, 2, 107, 49, 65, 190, 43, 13, 101, 191, 102, 65, 207, 62, 195, 163, 248, 188, 27, 0, 3, 27, 193, 132, 173, 190, 64, 132, 94, 191, 187, 86, 184, 62, 28, 196, 254, 188, 30, 0, 3, 27, 56, 248, 23, 191, 142, 126, 71, 63, 98, 166, 77, 62, 196, 143, 238, 188, 33, 0, 3, 30, 94, 154, 9, 190, 101, 203, 99, 63, 221, 68, 223, 62, 178, 155, 254, 188, 36, 0, 3, 2, 240, 197, 24, 190, 106, 232, 124, 63, 2, 126, 43, 61, 109, 227, 224, 188, 39, 0, 3, 2, 172, 119, 21, 191, 246, 193, 79, 63, 19, 178, 181, 60, 18, 46, 221, 188, 42, 0, 3, 30, 36, 185, 83, 63, 169, 238, 11, 63, 136, 91, 6, 62, 75, 214, 231, 188, 45, 0, 3, 7, 31, 43, 123, 63, 203, 19, 241, 61, 200, 22, 29, 62, 136, 162, 234, 188, 48, 0, 3, 8, 141, 6, 63, 191, 122, 245, 40, 191, 41, 140, 178, 61, 2, 71, 224, 188, 51, 0, 3, 28, 105, 248, 62, 191, 77, 247, 38, 191, 150, 232, 9, 62, 223, 240, 228, 188, 54, 0, 3, 28, 177, 157, 106, 191, 202, 66, 189, 190, 239, 201, 28, 62, 137, 242, 239, 188, 57, 0, 3, 33, 245, 169, 96, 191, 65, 103, 224, 190, 252, 233, 70, 190, 92, 156, 198, 188, 60, 0, 3, 10, 119, 175, 124, 191, 240, 60, 204, 189, 168, 164, 0, 62, 150, 89, 226, 188, 63, 0, 3, 5, 47, 123, 124, 191, 176, 18, 204, 189, 2, 248, 6, 62, 111, 226, 226, 188, 66, 0, 3, 5, 14, 181, 124, 191, 29, 124, 41, 189, 172, 33, 30, 62, 48, 140, 232, 188, 69, 0, 3, 5, 245, 114, 120, 191, 81, 144, 46, 62, 75, 144, 46, 62, 60, 54, 241, 188, 72, 0, 3, 5, 220, 115, 99, 191, 85, 48, 227, 62, 188, 175, 239, 61, 234, 154, 230, 188, 75, 0, 3, 6, 211, 34, 13, 191, 103, 139, 85, 63, 250, 175, 122, 188, 161, 86, 218, 188, 78, 0, 3, 0, 49, 72, 59, 190, 227, 169, 123, 63, 122, 199, 66, 60, 25, 187, 222, 188, 81, 0, 3, 2, 227, 239, 238, 189, 192, 194, 52, 62, 26, 52, 122, 191, 62, 79, 53, 187, 84, 0, 3, 31, 241, 250, 83, 63, 192, 12, 12, 191, 193, 66, 251, 61, 43, 200, 228, 188, 87, 0, 3, 32, 117, 35, 84, 63, 128, 73, 13, 191, 228, 50, 191, 61, 40, 227, 225, 188, 90, 0, 3, 21, 176, 59, 111, 63, 223, 132, 170, 190, 169, 164, 0, 190, 23, 245, 208, 188, 93, 0, 3, 24, 154, 235, 125, 63, 207, 167, 163, 60, 177, 164, 0, 62, 150, 89, 226, 188, 96, 0, 3, 8, 75, 130, 125, 63, 234, 99, 163, 60, 101, 8, 13, 62, 160, 99, 227, 188, 99, 0, 3, 8, 3, 244, 9, 62, 247, 148, 125, 63, 165, 78, 209, 188, 168, 117, 221, 188, 102, 0, 3, 1, 122, 146, 208, 62, 198, 20, 104, 63, 253, 24, 226, 61, 79, 244, 224, 188, 105, 0, 3, 29, 246, 103, 4, 63, 196, 6, 91, 63, 196, 45, 181, 188, 83, 37, 218, 188, 108, 0, 3, 16, 8, 219, 194, 61, 77, 42, 33, 62, 36, 162, 123, 191, 158, 201, 3, 187, 111, 0, 3, 14, 222, 111, 131, 187, 121, 238, 75, 62, 175, 222, 122, 191, 118, 15, 23, 187, 114, 0, 3, 31, 141, 168, 134, 188, 4, 238, 80, 63, 177, 223, 19, 191, 231, 120, 160, 188, 117, 0, 3, 3, 117, 169, 15, 190, 11, 22, 125, 191, 223, 144, 94, 189, 244, 24, 217, 188, 120, 0, 3, 12, 146, 116, 133, 190, 102, 186, 118, 191, 56, 30, 103, 61, 23, 181, 224, 188, 123, 0, 3, 27, 232, 99, 4, 191, 9, 0, 91, 191, 76, 39, 221, 188, 22, 161, 221, 188, 126, 0, 3, 11, 196, 54, 246, 189, 205, 164, 75, 190, 224, 253, 120, 191, 14, 90, 97, 187, 129, 0, 3, 15, 7, 216, 1, 189, 49, 190, 100, 190, 47, 102, 121, 191, 144, 117, 78, 187, 132, 0, 3, 15, 59, 114, 144, 61, 97, 167, 74, 190, 71, 73, 122, 191, 38, 160, 50, 187, 135, 0, 3, 14, 19, 115, 7, 62, 29, 211, 18, 190, 231, 20, 123, 191, 108, 104, 29, 187, 138, 0, 3, 14, 139, 138, 45, 63, 139, 29, 60, 191, 141, 36, 181, 188, 31, 198, 221, 188, 141, 0, 3, 19, 34, 161, 171, 62, 134, 202, 112, 191, 183, 103, 93, 61, 101, 184, 219, 188, 144, 0, 3, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 94, 82, 83, 189, 147, 0, 3, 4, 18, 110, 10, 189, 139, 112, 132, 190, 194, 34, 119, 63, 43, 1, 76, 189, 150, 0, 3, 27, 48, 175, 139, 60, 255, 209, 27, 191, 164, 17, 75, 63, 65, 219, 47, 189, 153, 0, 3, 25, 227, 193, 122, 63, 168, 5, 251, 189, 181, 145, 35, 62, 221, 36, 237, 188, 156, 0, 3, 8, 137, 90, 125, 63, 0, 0, 0, 0, 54, 219, 18, 62, 206, 62, 229, 188, 159, 0, 3, 8, 97, 46, 123, 191, 99, 31, 56, 62, 41, 68, 144, 189, 242, 124, 216, 188, 162, 0, 3, 26, 31, 117, 100, 191, 75, 49, 228, 62, 53, 68, 144, 61, 142, 61, 226, 188, 165, 0, 3, 6, 86, 140, 85, 191, 114, 35, 13, 63, 254, 192, 103, 188, 164, 255, 221, 188, 168, 0, 3, 6, 181, 155, 60, 190, 108, 79, 249, 61, 204, 174, 121, 191, 214, 47, 76, 187, 171, 0, 3, 31, 74, 129, 109, 190, 254, 24, 46, 61, 249, 199, 120, 191, 214, 189, 96, 187, 174, 0, 3, 31, 179, 173, 79, 63, 238, 156, 21, 63, 47, 167, 148, 60, 188, 195, 222, 188, 177, 0, 3, 23, 8, 65, 85, 63, 172, 241, 12, 63, 201, 144, 94, 61, 199, 158, 224, 188, 180, 0, 3, 23, 27, 96, 121, 63, 246, 167, 96, 62, 184, 144, 94, 189, 244, 24, 217, 188, 183, 0, 3, 23, 75, 61, 52, 62, 140, 95, 34, 61, 123, 204, 123, 191, 185, 30, 251, 186, 186, 0, 3, 14, 185, 183, 19, 62, 104, 213, 212, 61, 231, 235, 123, 191, 227, 10, 252, 186, 189, 0, 3, 14, 0, 1, 2, 3, 1, 0, 4, 5, 6, 4, 7, 8, 9, 1, 3, 10, 11, 12, 10, 12, 13, 10, 13, 14, 10, 14, 15, 16, 1, 9, 16, 9, 17, 18, 19, 13, 18, 13, 12, 18, 12, 20, 18, 21, 19, 22, 11, 10, 22, 10, 15, 23, 7, 16, 23, 16, 17, 23, 17, 9, 23, 8, 7, 24, 8, 23, 24, 23, 9, 24, 9, 14, 24, 14, 13, 24, 13, 19, 25, 21, 18, 25, 18, 20, 25, 4, 21, 26, 3, 0, 26, 0, 6, 26, 6, 5, 26, 5, 22, 26, 22, 15, 27, 20, 12, 27, 12, 11, 27, 11, 28, 27, 28, 4, 27, 4, 25, 27, 25, 20, 29, 2, 1, 29, 1, 16, 29, 16, 7, 29, 7, 4, 29, 4, 2, 30, 2, 4, 30, 4, 6, 30, 6, 0, 30, 0, 2, 31, 15, 14, 31, 14, 9, 31, 9, 3, 31, 3, 26, 31, 26, 15, 32, 8, 24, 32, 24, 19, 32, 19, 21, 32, 21, 4, 32, 4, 8, 33, 28, 11, 33, 11, 22, 33, 22, 5, 33, 5, 4, 33, 4, 28, 0, 1, 0, 40, 0, 48, 1, 4, 1, 29, 2, 62, 2, 31, 2, 46, 3, 43, 3, 20, 3, 58, 4, 9, 4, 51, 5, 15, 5, 35, 5, 6, 6, 12, 6, 7, 7, 24, 7, 8, 8, 49, 8, 16, 9, 41, 9, 10, 10, 19, 10, 18, 11, 14, 11, 25, 11, 12, 12, 13, 13, 34, 13, 27, 14, 26, 14, 56, 15, 60, 15, 16, 16, 33, 17, 20, 17, 42, 17, 18, 18, 19, 19, 22, 20, 21, 21, 54, 21, 22, 22, 23, 23, 50, 23, 24, 24, 25, 25, 55, 26, 28, 26, 27, 27, 39, 28, 38, 28, 57, 29, 52, 29, 30, 30, 47, 30, 31, 31, 32, 32, 61, 32, 33, 33, 53, 34, 39, 34, 35, 35, 36, 36, 59, 36, 37, 37, 63, 37, 38, 38, 39, 40, 44, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 48, 45, 46, 46, 47, 47, 48, 49, 53, 49, 50, 50, 51, 51, 52, 52, 53, 54, 58, 54, 55, 55, 56, 56, 57, 57, 58, 59, 63, 59, 60, 60, 61, 61, 62, 62, 63, 0, 1, 29, 0, 1, 4, 0, 40, 44, 1, 4, 29, 2, 3, 28, 2, 31, 32, 2, 30, 31, 3, 17, 20, 3, 20, 21, 4, 9, 10, 5, 6, 7, 5, 15, 35, 5, 6, 12, 6, 7, 11, 7, 8, 23, 8, 16, 33, 9, 10, 17, 10, 18, 19, 11, 12, 13, 11, 14, 25, 13, 27, 34, 14, 26, 28, 15, 16, 32, 17, 18, 19, 21, 22, 23, 26, 27, 28, 29, 30, 31, 34, 35, 36, 36, 37, 59, 40, 41, 42, 45, 46, 47, 49, 50, 51, 54, 55, 56, 59, 60, 61, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 3, 0, 1, 0, 0, 0, 3, 0, 4, 0, 5, 0, 5, 0, 6, 0, 6, 0, 4, 0, 4, 0, 7, 0, 7, 0, 8, 0, 8, 0, 4, 0, 9, 0, 1, 0, 3, 0, 9, 0, 10, 0, 11, 0, 11, 0, 12, 0, 12, 0, 10, 0, 12, 0, 13, 0, 13, 0, 10, 0, 13, 0, 14, 0, 14, 0, 10, 0, 14, 0, 15, 0, 15, 0, 10, 0, 16, 0, 1, 0, 9, 0, 16, 0, 9, 0, 17, 0, 17, 0, 16, 0, 18, 0, 19, 0, 19, 0, 13, 0, 13, 0, 18, 0, 12, 0, 18, 0, 12, 0, 20, 0, 20, 0, 18, 0, 18, 0, 21, 0, 21, 0, 19, 0, 22, 0, 11, 0, 10, 0, 22, 0, 15, 0, 22, 0, 23, 0, 7, 0, 7, 0, 16, 0, 16, 0, 23, 0, 17, 0, 23, 0, 9, 0, 23, 0, 23, 0, 8, 0, 24, 0, 8, 0, 23, 0, 24, 0, 9, 0, 24, 0, 9, 0, 14, 0, 14, 0, 24, 0, 13, 0, 24, 0, 19, 0, 24, 0, 25, 0, 21, 0, 18, 0, 25, 0, 20, 0, 25, 0, 25, 0, 4, 0, 4, 0, 21, 0, 26, 0, 3, 0, 0, 0, 26, 0, 0, 0, 6, 0, 6, 0, 26, 0, 5, 0, 26, 0, 5, 0, 22, 0, 22, 0, 26, 0, 15, 0, 26, 0, 27, 0, 20, 0, 12, 0, 27, 0, 11, 0, 27, 0, 11, 0, 28, 0, 28, 0, 27, 0, 28, 0, 4, 0, 4, 0, 27, 0, 25, 0, 27, 0, 29, 0, 2, 0, 1, 0, 29, 0, 16, 0, 29, 0, 7, 0, 29, 0, 4, 0, 29, 0, 4, 0, 2, 0, 30, 0, 2, 0, 4, 0, 30, 0, 6, 0, 30, 0, 0, 0, 30, 0, 31, 0, 15, 0, 14, 0, 31, 0, 9, 0, 31, 0, 3, 0, 31, 0, 26, 0, 31, 0, 32, 0, 8, 0, 24, 0, 32, 0, 19, 0, 32, 0, 21, 0, 32, 0, 4, 0, 32, 0, 33, 0, 28, 0, 11, 0, 33, 0, 22, 0, 33, 0, 5, 0, 33, 0, 4, 0, 33, 0, 0, 0, 0, 0, 118, 222, 224, 188, 253, 59, 225, 188, 128, 242, 48, 187, 254, 59, 225, 60, 253, 59, 225, 60, 94, 82, 83, 61, 135, 163, 173, 56, 203, 180, 132, 51, 14, 168, 129, 46, 231, 57, 119, 174, 14, 168, 129, 46, 243, 230, 138, 51, 115, 37, 116, 175, 231, 57, 119, 174, 115, 37, 116, 175, 66, 138, 212, 50, 118, 255, 39, 184, 16, 200, 230, 56, 164, 198, 172, 60, 0, 0, 128, 63, 73, 67, 69, 1, 83, 85, 80, 77, 0, 0, 0, 0, 73, 67, 69, 1, 71, 65, 85, 83, 0, 0, 0, 0, 16, 0, 0, 0, 0, 6, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 31, 6, 6, 6, 6, 6, 6, 6, 6, 26, 3, 3, 3, 3, 3, 31, 31, 6, 6, 6, 6, 6, 6, 6, 6, 26, 3, 3, 3, 3, 31, 31, 31, 5, 5, 5, 5, 5, 5, 5, 26, 26, 3, 3, 31, 31, 31, 31, 31, 5, 5, 5, 5, 5, 5, 5, 5, 26, 3, 31, 31, 31, 31, 31, 31, 5, 5, 5, 5, 5, 5, 5, 5, 26, 31, 31, 31, 31, 31, 31, 31, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 15, 15, 15, 15, 15, 15, 5, 5, 5, 5, 5, 5, 5, 5, 22, 10, 15, 15, 15, 15, 15, 15, 33, 33, 33, 33, 33, 33, 33, 33, 22, 10, 10, 15, 15, 15, 15, 15, 33, 33, 33, 33, 33, 33, 33, 33, 22, 10, 10, 10, 10, 15, 15, 15, 33, 33, 33, 33, 33, 33, 33, 33, 22, 10, 10, 10, 10, 10, 15, 15, 28, 28, 28, 28, 28, 28, 28, 28, 11, 10, 10, 10, 10, 10, 10, 15, 28, 28, 28, 28, 28, 28, 28, 28, 11, 11, 10, 10, 10, 10, 10, 10, 28, 28, 28, 28, 28, 28, 28, 28, 11, 11, 10, 10, 10, 10, 10, 10, 7, 7, 7, 7, 7, 7, 7, 7, 7, 16, 17, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 17, 17, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 23, 17, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 23, 23, 17, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 23, 23, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 23, 23, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 23, 9, 9, 9, 9, 9, 14, 14, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 14, 14, 14, 14, 14, 14, 8, 8, 8, 8, 8, 8, 8, 8, 24, 14, 14, 14, 14, 14, 14, 14, 32, 32, 32, 32, 32, 32, 32, 32, 24, 14, 14, 14, 14, 14, 14, 14, 32, 32, 32, 32, 32, 32, 32, 32, 24, 13, 14, 14, 14, 14, 14, 14, 32, 32, 32, 32, 32, 32, 32, 32, 24, 13, 13, 14, 14, 14, 14, 14, 32, 32, 32, 32, 32, 32, 32, 32, 19, 13, 13, 13, 14, 14, 14, 14, 21, 21, 21, 21, 21, 21, 21, 21, 19, 13, 13, 13, 13, 14, 14, 14, 21, 21, 21, 21, 21, 21, 21, 21, 19, 19, 13, 13, 13, 13, 14, 14, 21, 21, 21, 21, 21, 21, 21, 21, 19, 19, 13, 13, 13, 13, 13, 14, 21, 21, 21, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27, 28, 28, 28, 21, 21, 21, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27, 28, 28, 28, 21, 21, 21, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27, 28, 28, 28, 21, 21, 21, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27, 28, 28, 28, 21, 21, 21, 25, 25, 25, 25, 20, 27, 27, 27, 27, 27, 28, 28, 28, 21, 21, 21, 25, 25, 25, 25, 20, 27, 27, 27, 27, 27, 28, 28, 28, 21, 21, 21, 25, 25, 25, 25, 20, 20, 27, 27, 27, 27, 28, 28, 28, 21, 21, 21, 25, 25, 25, 25, 20, 20, 27, 27, 27, 27, 28, 28, 28, 19, 19, 19, 18, 18, 18, 18, 12, 12, 12, 27, 27, 11, 11, 11, 11, 19, 19, 18, 18, 18, 18, 18, 12, 12, 12, 12, 11, 11, 11, 11, 11, 13, 13, 13, 13, 18, 18, 18, 12, 12, 12, 12, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 18, 12, 12, 12, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 10, 10, 10, 10, 10, 10, 14, 13, 13, 13, 14, 13, 13, 14, 10, 10, 10, 10, 10, 10, 10, 10, 7, 7, 7, 29, 29, 29, 29, 2, 2, 2, 2, 30, 30, 30, 30, 6, 7, 7, 7, 29, 29, 29, 29, 2, 2, 2, 2, 30, 30, 30, 30, 6, 7, 7, 7, 29, 29, 29, 29, 2, 2, 2, 2, 30, 30, 30, 30, 6, 7, 7, 7, 29, 29, 29, 29, 2, 2, 2, 2, 30, 30, 30, 30, 6, 7, 7, 7, 29, 29, 29, 29, 2, 2, 2, 2, 30, 30, 30, 30, 6, 7, 7, 7, 29, 29, 29, 29, 2, 2, 2, 2, 30, 30, 30, 30, 6, 7, 7, 7, 29, 29, 29, 29, 2, 2, 2, 2, 30, 30, 30, 30, 6, 7, 7, 7, 29, 29, 29, 29, 2, 2, 2, 2, 30, 30, 30, 30, 6, 7, 16, 16, 16, 16, 16, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 16, 16, 16, 16, 16, 16, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 17, 17, 17, 16, 16, 16, 1, 1, 1, 1, 0, 0, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 1, 1, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 3, 3, 31, 31, 31, 31, 31, 31, 15, 15, 15, 15, 15, 15, 10, 10, 3, 3, 31, 31, 31, 31, 31, 31, 15, 15, 15, 15, 15, 15, 10, 10, 3, 3, 31, 31, 31, 31, 31, 31, 15, 15, 15, 15, 15, 15, 10, 10, 3, 3, 31, 31, 31, 31, 31, 31, 15, 15, 15, 15, 15, 15, 10, 10, 3, 3, 31, 31, 31, 31, 31, 31, 15, 15, 15, 15, 15, 15, 10, 10, 3, 3, 31, 31, 31, 31, 31, 31, 15, 15, 15, 15, 15, 15, 10, 10, 3, 3, 31, 31, 31, 31, 31, 31, 15, 15, 15, 15, 15, 15, 10, 10, 3, 3, 31, 31, 31, 31, 31, 31, 15, 15, 15, 15, 15, 15, 10, 10, 7, 7, 7, 7, 8, 8, 8, 8, 8, 32, 32, 32, 32, 21, 21, 21, 7, 7, 7, 7, 7, 8, 8, 8, 8, 32, 32, 32, 21, 21, 21, 21, 7, 7, 7, 7, 7, 8, 8, 8, 8, 32, 32, 32, 21, 21, 21, 21, 29, 7, 7, 7, 7, 7, 8, 8, 8, 32, 32, 21, 21, 21, 21, 25, 29, 29, 7, 7, 7, 7, 8, 8, 8, 32, 21, 21, 21, 25, 25, 25, 29, 29, 29, 29, 7, 7, 7, 8, 32, 32, 21, 21, 25, 25, 25, 25, 29, 29, 29, 29, 29, 29, 7, 4, 4, 21, 25, 25, 25, 25, 25, 25, 2, 2, 2, 2, 29, 29, 4, 4, 4, 25, 25, 25, 25, 25, 25, 25, 2, 2, 2, 2, 2, 2, 4, 4, 4, 27, 27, 27, 27, 27, 27, 27, 2, 2, 2, 2, 30, 30, 6, 5, 33, 28, 27, 27, 27, 27, 27, 27, 2, 30, 30, 30, 30, 6, 6, 5, 5, 33, 28, 28, 27, 27, 27, 27, 30, 30, 30, 30, 6, 6, 6, 5, 5, 33, 33, 28, 28, 28, 27, 27, 30, 30, 30, 6, 6, 6, 5, 5, 5, 33, 33, 28, 28, 28, 28, 27, 30, 30, 6, 6, 6, 6, 5, 5, 5, 33, 33, 33, 28, 28, 28, 28, 30, 6, 6, 6, 6, 6, 5, 5, 5, 33, 33, 33, 33, 28, 28, 28, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 33, 33, 33, 28, 28, 28, 14, 13, 13, 13, 13, 13, 19, 19, 21, 21, 21, 21, 21, 21, 21, 21, 14, 13, 13, 13, 13, 13, 19, 19, 21, 21, 21, 21, 21, 21, 21, 21, 14, 14, 13, 13, 13, 13, 13, 19, 21, 21, 21, 21, 21, 21, 21, 21, 14, 14, 14, 14, 13, 13, 13, 19, 32, 32, 32, 32, 32, 32, 32, 32, 14, 14, 14, 14, 14, 13, 13, 24, 32, 32, 32, 32, 32, 32, 32, 32, 14, 14, 14, 14, 14, 13, 13, 24, 32, 32, 32, 32, 32, 32, 32, 32, 14, 14, 14, 14, 14, 14, 13, 24, 32, 32, 32, 32, 32, 32, 32, 32, 14, 14, 14, 14, 14, 14, 14, 24, 8, 8, 8, 8, 8, 8, 8, 8, 14, 14, 14, 14, 14, 14, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 14, 14, 9, 9, 9, 9, 9, 23, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 23, 23, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 23, 23, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 17, 23, 23, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 17, 23, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 17, 17, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 17, 16, 7, 7, 7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10, 10, 11, 11, 28, 28, 28, 28, 28, 28, 28, 28, 10, 10, 10, 10, 10, 10, 11, 11, 28, 28, 28, 28, 28, 28, 28, 28, 15, 10, 10, 10, 10, 10, 10, 11, 28, 28, 28, 28, 28, 28, 28, 28, 15, 15, 10, 10, 10, 10, 10, 22, 33, 33, 33, 33, 33, 33, 33, 33, 15, 15, 15, 10, 10, 10, 10, 22, 33, 33, 33, 33, 33, 33, 33, 33, 15, 15, 15, 15, 15, 10, 10, 22, 33, 33, 33, 33, 33, 33, 33, 33, 15, 15, 15, 15, 15, 15, 10, 22, 5, 5, 5, 5, 5, 5, 5, 5, 15, 15, 15, 15, 15, 15, 15, 5, 5, 5, 5, 5, 5, 5, 5, 5, 31, 31, 31, 31, 31, 31, 31, 26, 5, 5, 5, 5, 5, 5, 5, 5, 31, 31, 31, 31, 31, 31, 3, 26, 5, 5, 5, 5, 5, 5, 5, 5, 31, 31, 31, 31, 31, 3, 3, 26, 26, 5, 5, 5, 5, 5, 5, 5, 31, 31, 31, 3, 3, 3, 3, 26, 6, 6, 6, 6, 6, 6, 6, 6, 31, 31, 3, 3, 3, 3, 3, 26, 6, 6, 6, 6, 6, 6, 6, 6, 31, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 1, 1, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 0, 0, 1, 1, 1, 1, 16, 16, 16, 17, 17, 17, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 2, 1, 1, 1, 1, 16, 16, 16, 16, 16, 7, 6, 30, 30, 30, 30, 2, 2, 2, 2, 29, 29, 29, 29, 7, 7, 7, 6, 30, 30, 30, 30, 2, 2, 2, 2, 29, 29, 29, 29, 7, 7, 7, 6, 30, 30, 30, 30, 2, 2, 2, 2, 29, 29, 29, 29, 7, 7, 7, 6, 30, 30, 30, 30, 2, 2, 2, 2, 29, 29, 29, 29, 7, 7, 7, 6, 30, 30, 30, 30, 2, 2, 2, 2, 29, 29, 29, 29, 7, 7, 7, 6, 30, 30, 30, 30, 2, 2, 2, 2, 29, 29, 29, 29, 7, 7, 7, 6, 30, 30, 30, 30, 2, 2, 2, 2, 29, 29, 29, 29, 7, 7, 7, 6, 30, 30, 30, 30, 2, 2, 2, 2, 29, 29, 29, 29, 7, 7, 7, 10, 10, 10, 10, 10, 10, 10, 10, 14, 14, 14, 14, 14, 14, 14, 14, 10, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 10, 10, 10, 10, 12, 12, 12, 18, 13, 13, 13, 13, 13, 13, 10, 10, 10, 10, 10, 12, 12, 12, 12, 18, 18, 18, 13, 13, 13, 13, 11, 11, 11, 11, 11, 12, 12, 12, 12, 18, 18, 18, 18, 18, 19, 19, 11, 11, 11, 11, 27, 27, 12, 12, 12, 18, 18, 18, 18, 19, 19, 19, 28, 28, 28, 27, 27, 27, 27, 20, 20, 25, 25, 25, 25, 21, 21, 21, 28, 28, 28, 27, 27, 27, 27, 20, 20, 25, 25, 25, 25, 21, 21, 21, 28, 28, 28, 27, 27, 27, 27, 27, 20, 25, 25, 25, 25, 21, 21, 21, 28, 28, 28, 27, 27, 27, 27, 27, 20, 25, 25, 25, 25, 21, 21, 21, 28, 28, 28, 27, 27, 27, 27, 27, 25, 25, 25, 25, 25, 21, 21, 21, 28, 28, 28, 27, 27, 27, 27, 27, 25, 25, 25, 25, 25, 21, 21, 21, 28, 28, 28, 27, 27, 27, 27, 27, 25, 25, 25, 25, 25, 21, 21, 21, 28, 28, 28, 27, 27, 27, 27, 27, 25, 25, 25, 25, 25, 21, 21, 21, 28, 28, 28, 33, 33, 33, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 28, 28, 28, 33, 33, 33, 33, 5, 5, 5, 6, 6, 6, 6, 6, 30, 28, 28, 28, 28, 33, 33, 33, 5, 5, 5, 6, 6, 6, 6, 30, 30, 27, 28, 28, 28, 28, 33, 33, 5, 5, 5, 6, 6, 6, 30, 30, 30, 27, 27, 28, 28, 28, 33, 33, 5, 5, 6, 6, 6, 30, 30, 30, 30, 27, 27, 27, 27, 28, 28, 33, 5, 5, 6, 6, 30, 30, 30, 30, 2, 27, 27, 27, 27, 27, 27, 28, 33, 5, 6, 30, 30, 2, 2, 2, 2, 27, 27, 27, 27, 27, 27, 27, 4, 4, 4, 2, 2, 2, 2, 2, 2, 25, 25, 25, 25, 25, 25, 25, 4, 4, 4, 29, 29, 2, 2, 2, 2, 25, 25, 25, 25, 25, 25, 21, 4, 4, 7, 29, 29, 29, 29, 29, 29, 25, 25, 25, 25, 21, 21, 32, 32, 8, 7, 7, 7, 29, 29, 29, 29, 25, 25, 25, 21, 21, 21, 32, 8, 8, 8, 7, 7, 7, 7, 29, 29, 25, 21, 21, 21, 21, 32, 32, 8, 8, 8, 7, 7, 7, 7, 7, 29, 21, 21, 21, 21, 32, 32, 32, 8, 8, 8, 8, 7, 7, 7, 7, 7, 21, 21, 21, 21, 32, 32, 32, 8, 8, 8, 8, 7, 7, 7, 7, 7, 21, 21, 21, 32, 32, 32, 32, 8, 8, 8, 8, 8, 7, 7, 7, 7, 10, 10, 15, 15, 15, 15, 15, 15, 31, 31, 31, 31, 31, 31, 3, 3, 10, 10, 15, 15, 15, 15, 15, 15, 31, 31, 31, 31, 31, 31, 3, 3, 10, 10, 15, 15, 15, 15, 15, 15, 31, 31, 31, 31, 31, 31, 3, 3, 10, 10, 15, 15, 15, 15, 15, 15, 31, 31, 31, 31, 31, 31, 3, 3, 10, 10, 15, 15, 15, 15, 15, 15, 31, 31, 31, 31, 31, 31, 3, 3, 10, 10, 15, 15, 15, 15, 15, 15, 31, 31, 31, 31, 31, 31, 3, 3, 10, 10, 15, 15, 15, 15, 15, 15, 31, 31, 31, 31, 31, 31, 3, 3, 10, 10, 15, 15, 15, 15, 15, 15, 31, 31, 31, 31, 31, 31, 3, 3, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 73, 67, 69, 1, 86, 65, 76, 69, 2, 0, 0, 0, 34, 0, 0, 0, 192, 0, 0, 0, 13, 0, 0, 0, 6, 6, 5, 5, 13, 5, 5, 5, 5, 8, 6, 6, 6, 6, 6, 5, 6, 3, 6, 5, 4, 5, 6, 6, 7, 5, 7, 6, 4, 5, 4, 5, 5, 5, 1, 3, 26, 6, 30, 2, 2, 29, 16, 9, 3, 0, 0, 30, 4, 29, 1, 1, 9, 31, 26, 0, 5, 33, 28, 27, 25, 21, 32, 8, 7, 29, 2, 30, 6, 6, 26, 22, 33, 4, 4, 30, 0, 26, 5, 8, 23, 16, 29, 4, 4, 32, 24, 23, 7, 1, 16, 17, 23, 24, 14, 31, 3, 11, 22, 15, 14, 13, 12, 12, 27, 28, 33, 22, 10, 10, 13, 18, 20, 27, 11, 10, 14, 24, 19, 18, 12, 10, 15, 31, 9, 24, 13, 10, 22, 26, 31, 14, 1, 29, 7, 23, 17, 9, 16, 23, 9, 19, 21, 25, 20, 12, 13, 13, 24, 32, 21, 18, 18, 25, 27, 12, 19, 32, 4, 25, 18, 11, 33, 5, 26, 15, 10, 7, 8, 24, 9, 17, 16, 8, 32, 19, 13, 14, 9, 23, 21, 4, 27, 20, 18, 3, 31, 15, 22, 5, 6, 0, 20, 25, 4, 28, 11, 12, 27, 4, 33, 11, 2, 4, 7, 16, 1, 2, 0, 6, 4, 15, 26, 3, 9, 14, 8, 4, 21, 19, 24, 28, 4, 5, 22, 11, 0, 0, 128, 191, 28, 177, 167, 60, 68, 162, 65, 60, 51, 87, 136, 60, 68, 162, 65, 60] + } + } + } + + over "link2" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + bool physxRigidBody:disableGravity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:maxDepenetrationVelocity = 0.049999997 + float physxRigidBody:maxLinearVelocity = inf + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "joint3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:jointFriction = 0 + float physxJoint:maxJointVelocity = 57.29578 + } + + over "collisions" + { + over "collisions_1" ( + prepend apiSchemas = ["PhysxCookedDataAPI:convexHull"] + ) + { + uchar[] physxCookedData:convexHull:buffer = [9, 214, 211, 198, 85, 210, 6, 96, 102, 31, 77, 28, 97, 182, 243, 151, 154, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 40, 0, 0, 0, 101, 128, 0, 0, 63, 0, 0, 0, 202, 0, 0, 0, 76, 166, 10, 189, 224, 45, 144, 188, 168, 87, 74, 60, 126, 174, 54, 60, 201, 158, 142, 188, 98, 4, 90, 188, 126, 174, 54, 60, 69, 46, 138, 188, 53, 78, 103, 60, 76, 166, 10, 189, 224, 45, 144, 188, 168, 87, 74, 188, 179, 210, 174, 189, 119, 8, 39, 188, 195, 100, 170, 188, 206, 95, 187, 189, 92, 115, 195, 187, 195, 100, 170, 188, 196, 239, 183, 189, 143, 196, 0, 188, 195, 100, 170, 60, 64, 164, 95, 60, 254, 101, 119, 188, 168, 87, 74, 60, 169, 200, 43, 60, 13, 204, 19, 58, 227, 199, 152, 60, 64, 164, 95, 60, 254, 101, 119, 188, 168, 87, 74, 188, 159, 5, 44, 60, 241, 234, 237, 56, 117, 2, 154, 188, 64, 164, 95, 60, 70, 18, 2, 60, 115, 178, 58, 188, 53, 148, 73, 59, 192, 233, 33, 188, 117, 2, 154, 60, 45, 33, 31, 189, 49, 8, 44, 188, 195, 100, 170, 60, 178, 210, 36, 60, 185, 194, 59, 60, 95, 41, 75, 60, 236, 230, 39, 60, 184, 222, 57, 60, 191, 155, 75, 188, 67, 173, 169, 189, 49, 8, 44, 60, 195, 100, 170, 188, 67, 173, 169, 189, 49, 8, 44, 60, 195, 100, 170, 60, 38, 6, 191, 189, 171, 227, 165, 186, 195, 100, 170, 60, 140, 200, 189, 189, 120, 3, 116, 59, 195, 100, 170, 60, 38, 6, 191, 189, 171, 227, 165, 58, 117, 2, 154, 188, 196, 239, 183, 189, 143, 196, 0, 60, 195, 100, 170, 60, 196, 239, 183, 189, 143, 196, 0, 60, 195, 100, 170, 188, 67, 173, 169, 189, 49, 8, 44, 188, 195, 100, 170, 60, 38, 6, 191, 189, 171, 227, 165, 58, 195, 100, 170, 188, 180, 103, 8, 60, 84, 167, 209, 59, 117, 2, 154, 188, 243, 75, 56, 59, 82, 191, 37, 60, 117, 2, 154, 188, 86, 92, 159, 57, 188, 245, 43, 60, 227, 199, 152, 60, 218, 251, 169, 59, 196, 188, 18, 60, 117, 2, 154, 60, 64, 164, 95, 60, 10, 215, 35, 60, 69, 216, 240, 187, 64, 164, 95, 60, 160, 212, 31, 60, 177, 188, 17, 60, 106, 163, 10, 60, 183, 181, 203, 187, 117, 2, 154, 188, 30, 164, 180, 58, 47, 139, 42, 188, 117, 2, 154, 188, 45, 33, 31, 189, 49, 8, 44, 188, 195, 100, 170, 188, 45, 33, 31, 189, 49, 8, 44, 60, 195, 100, 170, 60, 45, 33, 31, 189, 49, 8, 44, 60, 195, 100, 170, 188, 10, 165, 83, 60, 69, 46, 138, 188, 168, 87, 74, 60, 64, 164, 95, 60, 11, 215, 163, 59, 168, 87, 74, 60, 209, 174, 18, 60, 161, 196, 179, 59, 227, 199, 152, 60, 181, 55, 11, 60, 95, 163, 193, 187, 117, 2, 154, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 195, 100, 170, 188, 0, 0, 8, 4, 175, 204, 125, 60, 89, 235, 127, 191, 152, 212, 161, 60, 57, 214, 141, 188, 8, 0, 3, 16, 86, 146, 138, 59, 107, 255, 127, 191, 0, 0, 0, 0, 88, 1, 143, 188, 11, 0, 3, 14, 126, 180, 17, 190, 43, 101, 125, 191, 0, 0, 0, 0, 74, 43, 182, 188, 14, 0, 3, 14, 122, 56, 35, 188, 246, 6, 72, 191, 216, 190, 31, 191, 155, 140, 178, 188, 17, 0, 3, 34, 195, 104, 17, 191, 88, 169, 82, 191, 93, 142, 110, 188, 51, 52, 106, 189, 20, 0, 3, 30, 61, 89, 37, 63, 12, 251, 44, 190, 209, 151, 62, 63, 85, 113, 168, 188, 23, 0, 3, 24, 115, 219, 105, 63, 51, 4, 138, 60, 255, 29, 208, 190, 82, 48, 141, 188, 26, 0, 3, 18, 35, 47, 70, 61, 43, 86, 4, 191, 142, 202, 90, 63, 147, 177, 174, 188, 29, 0, 3, 16, 234, 175, 13, 188, 210, 252, 127, 63, 236, 112, 154, 187, 94, 94, 57, 188, 32, 0, 3, 1, 169, 71, 41, 188, 128, 252, 127, 63, 0, 0, 0, 0, 52, 12, 58, 188, 35, 0, 3, 1, 59, 32, 126, 191, 127, 218, 246, 61, 68, 119, 252, 59, 49, 164, 189, 189, 38, 0, 3, 9, 19, 167, 98, 191, 207, 233, 237, 190, 4, 142, 110, 60, 55, 243, 170, 189, 41, 0, 3, 29, 202, 142, 181, 190, 56, 93, 111, 63, 0, 0, 0, 0, 182, 140, 32, 189, 44, 0, 4, 36, 16, 175, 82, 191, 179, 108, 17, 63, 0, 0, 0, 0, 56, 133, 160, 189, 48, 0, 3, 36, 185, 176, 49, 188, 47, 176, 75, 191, 227, 11, 27, 63, 189, 255, 178, 188, 51, 0, 3, 35, 0, 0, 0, 0, 221, 83, 57, 191, 37, 155, 48, 63, 174, 209, 179, 188, 54, 0, 3, 16, 221, 137, 181, 190, 186, 86, 111, 191, 86, 142, 110, 60, 238, 197, 33, 189, 57, 0, 3, 15, 4, 154, 18, 190, 213, 92, 125, 191, 36, 14, 182, 58, 186, 136, 182, 188, 60, 0, 3, 14, 159, 143, 120, 191, 153, 15, 117, 62, 0, 0, 0, 0, 236, 23, 186, 189, 63, 0, 3, 7, 19, 167, 98, 191, 208, 233, 237, 62, 21, 142, 110, 188, 57, 243, 170, 189, 66, 0, 3, 36, 226, 136, 120, 191, 189, 8, 117, 190, 136, 142, 110, 188, 25, 116, 185, 189, 69, 0, 3, 30, 0, 0, 128, 191, 0, 0, 0, 0, 0, 0, 0, 0, 38, 6, 191, 189, 72, 0, 3, 7, 252, 55, 222, 62, 204, 191, 36, 63, 44, 101, 33, 191, 106, 109, 160, 188, 75, 0, 3, 6, 34, 205, 40, 63, 212, 7, 248, 62, 105, 46, 19, 191, 20, 232, 158, 188, 78, 0, 3, 6, 71, 198, 65, 63, 210, 13, 134, 62, 188, 71, 25, 191, 168, 143, 157, 188, 81, 0, 3, 18, 37, 100, 122, 62, 180, 69, 83, 63, 49, 80, 2, 63, 106, 86, 149, 188, 84, 0, 3, 4, 205, 165, 55, 63, 190, 233, 30, 63, 191, 240, 161, 190, 25, 29, 150, 188, 87, 0, 3, 6, 170, 50, 189, 62, 71, 225, 109, 63, 154, 120, 199, 186, 110, 17, 107, 188, 90, 0, 3, 4, 118, 26, 225, 62, 148, 231, 101, 63, 122, 166, 93, 60, 192, 213, 115, 188, 93, 0, 3, 4, 201, 253, 104, 62, 122, 213, 196, 190, 26, 9, 101, 191, 126, 35, 173, 188, 96, 0, 3, 21, 67, 244, 28, 63, 80, 21, 74, 190, 64, 212, 67, 191, 100, 92, 170, 188, 99, 0, 3, 19, 98, 151, 11, 63, 210, 47, 133, 190, 188, 255, 75, 191, 150, 197, 173, 188, 102, 0, 3, 19, 248, 40, 50, 61, 233, 98, 101, 188, 140, 187, 127, 191, 174, 147, 157, 188, 105, 0, 3, 19, 170, 113, 75, 61, 55, 223, 171, 189, 163, 199, 126, 191, 19, 254, 160, 188, 108, 0, 3, 21, 84, 6, 43, 61, 48, 127, 20, 191, 118, 65, 80, 191, 168, 56, 175, 188, 111, 0, 3, 17, 182, 126, 161, 187, 127, 86, 64, 191, 130, 240, 40, 191, 226, 163, 178, 188, 114, 0, 3, 34, 136, 102, 59, 61, 199, 165, 52, 60, 99, 183, 127, 63, 154, 151, 156, 188, 117, 0, 3, 24, 250, 220, 88, 61, 21, 17, 134, 62, 31, 178, 118, 63, 168, 223, 169, 188, 120, 0, 3, 4, 210, 177, 23, 60, 85, 105, 124, 63, 130, 151, 42, 62, 8, 128, 92, 188, 123, 0, 3, 3, 0, 0, 0, 0, 41, 88, 126, 63, 29, 139, 232, 61, 90, 157, 81, 188, 126, 0, 3, 3, 151, 153, 70, 61, 25, 61, 147, 61, 34, 9, 127, 191, 43, 129, 160, 188, 129, 0, 3, 6, 202, 215, 50, 61, 211, 114, 119, 60, 6, 186, 127, 191, 91, 157, 157, 188, 132, 0, 3, 18, 42, 221, 37, 61, 0, 0, 0, 0, 64, 202, 127, 191, 194, 93, 157, 188, 135, 0, 3, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 191, 196, 100, 170, 188, 138, 0, 7, 6, 0, 0, 0, 0, 21, 181, 126, 63, 210, 140, 205, 189, 234, 93, 77, 188, 145, 0, 3, 0, 28, 144, 156, 60, 7, 53, 122, 63, 106, 184, 87, 190, 24, 196, 99, 188, 148, 0, 3, 0, 175, 78, 47, 63, 245, 96, 58, 191, 187, 69, 2, 189, 167, 217, 169, 188, 151, 0, 3, 21, 91, 131, 108, 63, 39, 239, 195, 190, 0, 0, 0, 0, 138, 165, 150, 188, 154, 0, 3, 19, 161, 184, 45, 63, 100, 234, 143, 190, 154, 184, 45, 63, 87, 78, 179, 188, 157, 0, 3, 24, 129, 209, 161, 60, 109, 230, 127, 191, 123, 209, 161, 60, 50, 55, 142, 188, 160, 0, 3, 16, 193, 192, 100, 63, 0, 0, 0, 0, 89, 218, 229, 62, 150, 86, 145, 188, 163, 0, 3, 24, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 64, 164, 95, 188, 166, 0, 6, 18, 28, 73, 73, 63, 222, 152, 122, 62, 228, 61, 17, 63, 80, 88, 155, 188, 172, 0, 3, 5, 189, 225, 64, 63, 31, 224, 197, 62, 23, 45, 8, 63, 202, 229, 153, 188, 175, 0, 3, 5, 199, 47, 58, 63, 196, 185, 218, 62, 200, 131, 9, 63, 204, 155, 154, 188, 178, 0, 3, 5, 246, 55, 10, 63, 40, 3, 15, 63, 42, 46, 33, 63, 174, 229, 160, 188, 181, 0, 3, 5, 30, 105, 100, 61, 5, 47, 142, 60, 36, 144, 127, 63, 209, 99, 157, 188, 184, 0, 3, 5, 190, 232, 57, 61, 122, 231, 22, 60, 173, 185, 127, 63, 208, 142, 156, 188, 187, 0, 3, 24, 162, 221, 44, 61, 0, 0, 0, 0, 157, 197, 127, 63, 101, 207, 156, 188, 190, 0, 3, 24, 91, 186, 70, 61, 220, 149, 135, 189, 224, 34, 127, 63, 117, 18, 160, 188, 193, 0, 3, 22, 234, 89, 120, 62, 16, 113, 169, 190, 182, 117, 105, 63, 53, 90, 173, 188, 196, 0, 3, 22, 30, 224, 31, 63, 136, 77, 50, 190, 67, 232, 66, 63, 57, 40, 169, 188, 199, 0, 3, 24, 34, 17, 21, 19, 18, 6, 23, 13, 0, 1, 2, 3, 1, 0, 3, 0, 4, 3, 4, 1, 5, 4, 6, 7, 8, 2, 9, 10, 11, 12, 13, 2, 14, 15, 16, 14, 16, 17, 18, 19, 20, 18, 5, 6, 21, 17, 16, 22, 21, 22, 19, 23, 0, 2, 23, 2, 13, 23, 6, 4, 23, 4, 0, 24, 20, 19, 24, 19, 22, 24, 5, 18, 24, 18, 20, 25, 26, 15, 25, 15, 11, 25, 11, 10, 27, 28, 14, 29, 11, 15, 29, 15, 14, 29, 14, 30, 31, 1, 32, 31, 10, 9, 31, 9, 1, 33, 10, 31, 33, 31, 32, 33, 32, 1, 33, 1, 4, 34, 8, 28, 34, 28, 27, 34, 27, 14, 34, 14, 17, 35, 26, 25, 35, 25, 10, 35, 10, 33, 35, 33, 4, 5, 24, 22, 16, 35, 16, 15, 35, 15, 26, 36, 1, 9, 36, 9, 7, 36, 7, 2, 36, 2, 1, 37, 8, 7, 37, 7, 9, 11, 29, 30, 38, 8, 37, 38, 37, 30, 38, 30, 14, 38, 14, 28, 38, 28, 8, 39, 8, 34, 39, 34, 13, 39, 13, 12, 39, 12, 2, 39, 2, 8, 0, 40, 0, 13, 0, 14, 0, 11, 0, 12, 0, 17, 0, 16, 0, 59, 1, 2, 1, 50, 1, 15, 2, 4, 2, 3, 3, 18, 3, 4, 4, 36, 5, 44, 5, 17, 5, 12, 6, 51, 6, 62, 6, 49, 7, 31, 7, 25, 7, 52, 8, 60, 8, 16, 8, 61, 9, 28, 9, 45, 9, 10, 10, 13, 10, 40, 11, 19, 11, 22, 12, 21, 13, 44, 13, 14, 14, 20, 15, 18, 15, 16, 17, 18, 19, 22, 19, 20, 20, 44, 21, 44, 21, 22, 23, 41, 23, 46, 23, 24, 24, 27, 24, 25, 25, 42, 26, 38, 26, 56, 26, 39, 27, 52, 27, 28, 28, 29, 29, 55, 29, 52, 30, 32, 30, 35, 30, 34, 31, 33, 31, 32, 32, 47, 33, 43, 33, 34, 34, 35, 35, 36, 36, 44, 37, 58, 37, 57, 37, 38, 38, 39, 39, 40, 41, 46, 41, 42, 42, 43, 43, 44, 44, 45, 45, 46, 47, 50, 47, 48, 48, 52, 48, 49, 49, 50, 51, 53, 51, 52, 52, 54, 53, 57, 53, 54, 54, 55, 55, 56, 56, 57, 58, 62, 58, 59, 59, 60, 60, 61, 61, 62, 1, 2, 3, 1, 2, 4, 1, 6, 8, 2, 3, 4, 3, 4, 5, 5, 12, 21, 0, 5, 12, 6, 48, 49, 6, 37, 51, 7, 31, 32, 7, 25, 31, 7, 24, 25, 8, 60, 61, 0, 8, 16, 9, 10, 26, 9, 23, 24, 9, 10, 13, 0, 10, 13, 0, 11, 12, 0, 11, 14, 11, 19, 22, 0, 13, 14, 13, 14, 20, 0, 15, 16, 19, 20, 21, 23, 24, 25, 23, 41, 46, 26, 38, 39, 26, 37, 38, 27, 28, 29, 29, 52, 54, 30, 31, 32, 30, 34, 35, 33, 34, 35, 0, 37, 38, 41, 42, 43, 47, 48, 49, 51, 52, 53, 53, 54, 55, 58, 59, 60, 34, 0, 17, 0, 17, 0, 21, 0, 21, 0, 19, 0, 19, 0, 18, 0, 18, 0, 6, 0, 6, 0, 23, 0, 23, 0, 13, 0, 13, 0, 34, 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 3, 0, 1, 0, 0, 0, 3, 0, 0, 0, 4, 0, 4, 0, 3, 0, 4, 0, 1, 0, 5, 0, 4, 0, 4, 0, 6, 0, 6, 0, 5, 0, 7, 0, 8, 0, 8, 0, 2, 0, 2, 0, 7, 0, 9, 0, 10, 0, 10, 0, 11, 0, 11, 0, 9, 0, 12, 0, 13, 0, 13, 0, 2, 0, 2, 0, 12, 0, 14, 0, 15, 0, 15, 0, 16, 0, 16, 0, 14, 0, 16, 0, 17, 0, 17, 0, 14, 0, 19, 0, 20, 0, 20, 0, 18, 0, 18, 0, 5, 0, 16, 0, 22, 0, 22, 0, 21, 0, 22, 0, 19, 0, 23, 0, 0, 0, 2, 0, 23, 0, 4, 0, 23, 0, 24, 0, 20, 0, 19, 0, 24, 0, 22, 0, 24, 0, 24, 0, 5, 0, 18, 0, 24, 0, 25, 0, 26, 0, 26, 0, 15, 0, 15, 0, 25, 0, 15, 0, 11, 0, 11, 0, 25, 0, 10, 0, 25, 0, 27, 0, 28, 0, 28, 0, 14, 0, 14, 0, 27, 0, 29, 0, 11, 0, 15, 0, 29, 0, 14, 0, 29, 0, 14, 0, 30, 0, 30, 0, 29, 0, 31, 0, 1, 0, 1, 0, 32, 0, 32, 0, 31, 0, 31, 0, 10, 0, 9, 0, 31, 0, 9, 0, 1, 0, 33, 0, 10, 0, 31, 0, 33, 0, 32, 0, 33, 0, 1, 0, 33, 0, 4, 0, 33, 0, 34, 0, 8, 0, 8, 0, 28, 0, 28, 0, 34, 0, 27, 0, 34, 0, 14, 0, 34, 0, 35, 0, 26, 0, 25, 0, 35, 0, 10, 0, 35, 0, 33, 0, 35, 0, 16, 0, 35, 0, 15, 0, 35, 0, 36, 0, 1, 0, 9, 0, 36, 0, 9, 0, 7, 0, 7, 0, 36, 0, 2, 0, 36, 0, 37, 0, 8, 0, 7, 0, 37, 0, 30, 0, 37, 0, 38, 0, 8, 0, 37, 0, 38, 0, 30, 0, 38, 0, 14, 0, 38, 0, 28, 0, 38, 0, 39, 0, 8, 0, 34, 0, 39, 0, 13, 0, 39, 0, 12, 0, 39, 0, 2, 0, 39, 0, 0, 0, 0, 0, 38, 6, 191, 189, 224, 45, 144, 188, 195, 100, 170, 188, 64, 164, 95, 60, 184, 194, 59, 60, 195, 100, 170, 60, 190, 6, 223, 56, 164, 107, 173, 50, 100, 219, 180, 177, 156, 70, 104, 46, 100, 219, 180, 177, 135, 195, 135, 52, 154, 180, 167, 172, 156, 70, 104, 46, 154, 180, 167, 172, 170, 204, 131, 52, 227, 28, 25, 189, 195, 157, 2, 187, 128, 112, 202, 54, 0, 0, 128, 63, 73, 67, 69, 1, 83, 85, 80, 77, 0, 0, 0, 0, 73, 67, 69, 1, 71, 65, 85, 83, 0, 0, 0, 0, 16, 0, 0, 0, 0, 6, 0, 0, 1, 1, 1, 1, 1, 1, 1, 9, 36, 36, 36, 36, 36, 36, 36, 36, 1, 1, 1, 1, 9, 9, 9, 9, 36, 36, 36, 36, 36, 36, 36, 36, 1, 1, 9, 9, 9, 9, 9, 9, 36, 36, 36, 36, 36, 36, 36, 2, 9, 9, 9, 9, 9, 9, 9, 9, 36, 36, 36, 36, 36, 36, 36, 36, 9, 9, 9, 9, 9, 9, 9, 9, 36, 36, 36, 36, 36, 36, 36, 36, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 10, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 8, 10, 10, 10, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 8, 8, 8, 10, 10, 10, 10, 11, 11, 11, 11, 30, 37, 37, 37, 8, 8, 8, 8, 10, 10, 10, 11, 11, 11, 11, 29, 30, 30, 37, 37, 37, 8, 8, 8, 10, 10, 11, 11, 11, 11, 11, 29, 30, 30, 30, 37, 37, 38, 38, 38, 25, 25, 11, 11, 11, 11, 29, 29, 30, 30, 30, 30, 30, 38, 38, 38, 25, 25, 11, 11, 11, 11, 29, 29, 30, 30, 30, 30, 30, 14, 38, 38, 25, 11, 11, 11, 11, 29, 29, 29, 30, 30, 30, 30, 30, 14, 14, 38, 25, 15, 15, 15, 15, 29, 29, 29, 30, 30, 30, 30, 30, 14, 14, 14, 15, 15, 15, 15, 15, 29, 29, 29, 30, 30, 30, 30, 14, 14, 14, 14, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 18, 18, 18, 18, 18, 18, 18, 18, 5, 5, 5, 5, 5, 5, 5, 5, 18, 18, 18, 18, 18, 18, 18, 18, 24, 24, 24, 24, 24, 24, 24, 24, 18, 18, 18, 18, 18, 18, 18, 18, 24, 24, 24, 24, 24, 24, 24, 24, 18, 18, 18, 18, 18, 18, 18, 18, 24, 24, 24, 24, 24, 24, 24, 24, 18, 18, 18, 18, 18, 18, 18, 18, 24, 24, 24, 24, 24, 24, 24, 24, 19, 19, 19, 19, 19, 19, 19, 19, 24, 24, 24, 24, 24, 24, 24, 24, 19, 19, 19, 19, 19, 19, 19, 19, 24, 24, 24, 24, 24, 24, 24, 24, 19, 19, 19, 19, 19, 19, 19, 19, 22, 22, 22, 22, 22, 22, 22, 22, 19, 19, 19, 19, 19, 19, 19, 19, 22, 22, 22, 22, 22, 22, 22, 22, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 16, 16, 16, 26, 26, 26, 26, 26, 25, 15, 15, 22, 22, 22, 22, 22, 16, 16, 16, 26, 26, 26, 26, 15, 15, 15, 15, 22, 22, 22, 22, 22, 16, 16, 16, 26, 26, 26, 15, 15, 15, 15, 15, 22, 22, 22, 22, 22, 16, 16, 16, 26, 26, 26, 15, 15, 15, 15, 15, 22, 22, 22, 22, 22, 16, 16, 16, 26, 26, 15, 15, 15, 15, 15, 15, 22, 22, 22, 22, 22, 16, 16, 16, 26, 15, 15, 15, 15, 15, 15, 29, 22, 22, 22, 22, 22, 16, 16, 16, 15, 15, 15, 15, 15, 29, 29, 29, 22, 22, 22, 22, 22, 16, 16, 16, 15, 15, 15, 15, 29, 29, 29, 29, 21, 21, 21, 21, 21, 17, 17, 17, 14, 14, 14, 14, 30, 30, 30, 30, 21, 21, 21, 21, 21, 17, 17, 17, 14, 14, 14, 14, 14, 30, 30, 30, 21, 21, 21, 21, 21, 17, 17, 17, 27, 14, 14, 14, 14, 14, 30, 30, 21, 21, 21, 21, 21, 17, 17, 17, 27, 27, 14, 14, 14, 14, 14, 30, 21, 21, 21, 21, 21, 17, 17, 17, 27, 27, 14, 14, 14, 14, 14, 14, 21, 21, 21, 21, 21, 17, 17, 17, 27, 27, 28, 14, 14, 14, 14, 14, 21, 21, 21, 21, 21, 17, 17, 17, 27, 27, 28, 28, 28, 14, 14, 14, 21, 21, 21, 21, 21, 17, 17, 17, 27, 27, 28, 28, 28, 28, 14, 14, 5, 5, 5, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 4, 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 4, 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 4, 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 4, 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, 1, 9, 6, 6, 6, 6, 6, 23, 23, 0, 36, 36, 36, 36, 36, 36, 36, 36, 6, 6, 6, 6, 6, 23, 23, 0, 2, 36, 36, 36, 36, 36, 36, 36, 6, 6, 6, 6, 6, 23, 23, 0, 2, 2, 2, 36, 36, 36, 36, 36, 6, 6, 6, 6, 6, 23, 23, 23, 2, 2, 2, 2, 36, 36, 36, 36, 6, 6, 6, 6, 6, 23, 23, 23, 2, 2, 2, 2, 36, 36, 36, 36, 6, 6, 6, 6, 6, 23, 23, 23, 2, 2, 2, 2, 2, 36, 36, 36, 6, 6, 6, 6, 6, 23, 23, 23, 2, 2, 2, 2, 2, 2, 36, 36, 6, 6, 6, 6, 6, 23, 23, 23, 2, 2, 2, 2, 2, 2, 2, 36, 6, 6, 6, 6, 18, 18, 18, 18, 18, 19, 19, 19, 19, 21, 21, 21, 6, 6, 6, 6, 6, 18, 18, 18, 18, 19, 19, 19, 21, 21, 21, 21, 6, 6, 6, 6, 6, 18, 18, 18, 18, 19, 19, 19, 21, 21, 21, 21, 6, 6, 6, 6, 6, 6, 18, 18, 18, 19, 19, 21, 21, 21, 21, 21, 6, 6, 6, 6, 6, 6, 18, 18, 19, 19, 21, 21, 21, 21, 21, 21, 23, 6, 6, 6, 6, 6, 6, 18, 19, 19, 21, 21, 21, 21, 21, 17, 23, 23, 23, 23, 6, 6, 6, 18, 19, 21, 21, 21, 17, 17, 17, 17, 23, 23, 23, 23, 23, 23, 23, 6, 21, 17, 17, 17, 17, 17, 17, 17, 2, 2, 2, 2, 12, 12, 12, 39, 28, 28, 27, 27, 27, 27, 27, 27, 2, 2, 2, 2, 2, 12, 39, 39, 38, 28, 28, 28, 28, 27, 27, 27, 2, 2, 2, 2, 2, 39, 39, 8, 8, 38, 28, 28, 28, 28, 28, 28, 2, 2, 2, 2, 2, 2, 39, 8, 8, 38, 38, 28, 28, 28, 28, 28, 2, 2, 2, 2, 2, 2, 39, 8, 8, 38, 38, 38, 38, 28, 28, 28, 2, 2, 2, 2, 2, 2, 8, 8, 8, 8, 38, 38, 38, 38, 28, 28, 2, 2, 2, 2, 2, 2, 8, 8, 8, 8, 38, 38, 38, 38, 38, 14, 2, 36, 2, 2, 2, 7, 8, 8, 8, 8, 38, 38, 38, 38, 14, 14, 5, 5, 5, 5, 5, 5, 24, 24, 24, 24, 24, 24, 22, 22, 22, 22, 5, 5, 5, 5, 5, 5, 24, 24, 24, 24, 24, 22, 22, 22, 22, 22, 5, 5, 5, 5, 5, 5, 5, 24, 24, 24, 24, 22, 22, 22, 22, 22, 4, 5, 5, 5, 5, 5, 5, 24, 24, 24, 22, 22, 22, 22, 22, 22, 4, 4, 4, 5, 5, 5, 5, 24, 24, 24, 22, 22, 22, 22, 22, 22, 4, 4, 4, 4, 5, 5, 5, 24, 24, 22, 22, 22, 22, 22, 22, 16, 4, 4, 4, 4, 4, 4, 5, 5, 24, 22, 22, 22, 16, 16, 16, 16, 4, 4, 4, 4, 4, 4, 4, 5, 22, 16, 16, 16, 16, 16, 16, 16, 1, 1, 1, 32, 32, 32, 32, 31, 25, 26, 26, 26, 26, 26, 26, 26, 1, 1, 1, 1, 32, 31, 31, 31, 10, 25, 26, 26, 26, 26, 26, 26, 1, 1, 1, 1, 1, 31, 31, 10, 10, 25, 25, 25, 26, 26, 26, 26, 1, 1, 1, 1, 1, 31, 31, 10, 10, 25, 25, 25, 25, 26, 26, 26, 1, 1, 1, 1, 1, 31, 31, 10, 10, 10, 25, 25, 25, 25, 25, 26, 1, 1, 1, 1, 1, 9, 10, 10, 10, 10, 25, 25, 25, 25, 25, 25, 1, 1, 1, 1, 9, 9, 10, 10, 10, 10, 25, 25, 25, 25, 25, 15, 1, 1, 1, 9, 9, 9, 10, 10, 10, 10, 10, 25, 25, 25, 25, 15, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 19, 19, 19, 19, 19, 19, 19, 19, 22, 22, 22, 22, 22, 22, 22, 22, 19, 19, 19, 19, 19, 19, 19, 19, 24, 24, 24, 24, 24, 24, 24, 24, 19, 19, 19, 19, 19, 19, 19, 19, 24, 24, 24, 24, 24, 24, 24, 24, 19, 19, 19, 19, 19, 19, 19, 19, 24, 24, 24, 24, 24, 24, 24, 24, 18, 18, 18, 18, 18, 18, 18, 18, 24, 24, 24, 24, 24, 24, 24, 24, 18, 18, 18, 18, 18, 18, 18, 18, 24, 24, 24, 24, 24, 24, 24, 24, 18, 18, 18, 18, 18, 18, 18, 18, 24, 24, 24, 24, 24, 24, 24, 24, 18, 18, 18, 18, 18, 18, 18, 18, 5, 5, 5, 5, 5, 5, 5, 5, 18, 18, 18, 18, 18, 18, 18, 18, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 14, 14, 14, 14, 30, 30, 30, 30, 29, 29, 29, 15, 15, 15, 15, 15, 14, 14, 14, 30, 30, 30, 30, 30, 29, 29, 29, 15, 15, 15, 15, 25, 38, 14, 14, 30, 30, 30, 30, 30, 29, 29, 29, 11, 11, 11, 11, 25, 38, 38, 14, 30, 30, 30, 30, 30, 29, 29, 11, 11, 11, 11, 25, 25, 38, 38, 38, 30, 30, 30, 30, 30, 29, 29, 11, 11, 11, 11, 25, 25, 38, 38, 38, 37, 37, 30, 30, 30, 29, 11, 11, 11, 11, 11, 10, 10, 8, 8, 8, 37, 37, 37, 30, 30, 29, 11, 11, 11, 11, 10, 10, 10, 8, 8, 8, 8, 37, 37, 37, 30, 11, 11, 11, 11, 10, 10, 10, 10, 8, 8, 8, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 10, 10, 10, 8, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 10, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 36, 36, 36, 36, 36, 36, 36, 36, 9, 9, 9, 9, 9, 9, 9, 9, 36, 36, 36, 36, 36, 36, 36, 36, 9, 9, 9, 9, 9, 9, 9, 9, 2, 36, 36, 36, 36, 36, 36, 36, 9, 9, 9, 9, 9, 9, 1, 1, 36, 36, 36, 36, 36, 36, 36, 36, 9, 9, 9, 9, 1, 1, 1, 1, 36, 36, 36, 36, 36, 36, 36, 36, 9, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 23, 23, 23, 6, 6, 6, 6, 6, 36, 2, 2, 2, 2, 2, 2, 2, 23, 23, 23, 6, 6, 6, 6, 6, 36, 36, 2, 2, 2, 2, 2, 2, 23, 23, 23, 6, 6, 6, 6, 6, 36, 36, 36, 2, 2, 2, 2, 2, 23, 23, 23, 6, 6, 6, 6, 6, 36, 36, 36, 36, 2, 2, 2, 2, 23, 23, 23, 6, 6, 6, 6, 6, 36, 36, 36, 36, 36, 2, 2, 2, 0, 23, 23, 6, 6, 6, 6, 6, 36, 36, 36, 36, 36, 36, 2, 2, 0, 23, 23, 6, 6, 6, 6, 6, 36, 36, 36, 36, 36, 36, 36, 2, 0, 23, 23, 6, 6, 6, 6, 6, 9, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 5, 5, 5, 14, 14, 28, 28, 28, 28, 27, 27, 17, 17, 17, 21, 21, 21, 21, 21, 14, 14, 14, 28, 28, 28, 27, 27, 17, 17, 17, 21, 21, 21, 21, 21, 14, 14, 14, 14, 14, 28, 27, 27, 17, 17, 17, 21, 21, 21, 21, 21, 14, 14, 14, 14, 14, 14, 27, 27, 17, 17, 17, 21, 21, 21, 21, 21, 30, 14, 14, 14, 14, 14, 27, 27, 17, 17, 17, 21, 21, 21, 21, 21, 30, 30, 14, 14, 14, 14, 14, 27, 17, 17, 17, 21, 21, 21, 21, 21, 30, 30, 30, 14, 14, 14, 14, 14, 17, 17, 17, 21, 21, 21, 21, 21, 30, 30, 30, 30, 14, 14, 14, 14, 17, 17, 17, 21, 21, 21, 21, 21, 29, 29, 29, 29, 15, 15, 15, 15, 16, 16, 16, 22, 22, 22, 22, 22, 29, 29, 29, 15, 15, 15, 15, 15, 16, 16, 16, 22, 22, 22, 22, 22, 29, 15, 15, 15, 15, 15, 15, 26, 16, 16, 16, 22, 22, 22, 22, 22, 15, 15, 15, 15, 15, 15, 26, 26, 16, 16, 16, 22, 22, 22, 22, 22, 15, 15, 15, 15, 15, 26, 26, 26, 16, 16, 16, 22, 22, 22, 22, 22, 15, 15, 15, 15, 15, 26, 26, 26, 16, 16, 16, 22, 22, 22, 22, 22, 15, 15, 15, 15, 26, 26, 26, 26, 16, 16, 16, 22, 22, 22, 22, 22, 15, 15, 25, 26, 26, 26, 26, 26, 16, 16, 16, 22, 22, 22, 22, 22, 15, 25, 25, 25, 25, 10, 10, 10, 10, 10, 9, 9, 9, 1, 1, 1, 15, 25, 25, 25, 25, 25, 10, 10, 10, 10, 9, 9, 1, 1, 1, 1, 25, 25, 25, 25, 25, 25, 10, 10, 10, 10, 9, 1, 1, 1, 1, 1, 26, 25, 25, 25, 25, 25, 10, 10, 10, 31, 31, 1, 1, 1, 1, 1, 26, 26, 26, 25, 25, 25, 25, 10, 10, 31, 31, 1, 1, 1, 1, 1, 26, 26, 26, 26, 25, 25, 25, 10, 10, 31, 31, 1, 1, 1, 1, 1, 26, 26, 26, 26, 26, 26, 25, 10, 31, 31, 31, 32, 1, 1, 1, 1, 26, 26, 26, 26, 26, 26, 26, 25, 31, 32, 32, 32, 32, 1, 1, 1, 16, 16, 16, 16, 16, 16, 16, 22, 5, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 22, 22, 22, 24, 5, 5, 4, 4, 4, 4, 4, 4, 16, 22, 22, 22, 22, 22, 22, 24, 24, 5, 5, 5, 4, 4, 4, 4, 22, 22, 22, 22, 22, 22, 24, 24, 24, 5, 5, 5, 5, 4, 4, 4, 22, 22, 22, 22, 22, 22, 24, 24, 24, 5, 5, 5, 5, 5, 5, 4, 22, 22, 22, 22, 22, 24, 24, 24, 24, 5, 5, 5, 5, 5, 5, 5, 22, 22, 22, 22, 22, 24, 24, 24, 24, 24, 5, 5, 5, 5, 5, 5, 22, 22, 22, 22, 24, 24, 24, 24, 24, 24, 5, 5, 5, 5, 5, 5, 14, 14, 38, 38, 38, 38, 8, 8, 8, 8, 7, 36, 36, 2, 36, 36, 14, 38, 38, 38, 38, 38, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 28, 28, 38, 38, 38, 38, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 28, 28, 28, 38, 38, 38, 38, 8, 8, 39, 2, 2, 2, 2, 2, 2, 28, 28, 28, 28, 28, 38, 38, 8, 8, 39, 2, 2, 2, 2, 2, 2, 28, 28, 28, 28, 28, 28, 38, 8, 8, 39, 39, 2, 2, 2, 2, 2, 27, 27, 27, 28, 28, 28, 28, 38, 39, 39, 12, 2, 2, 2, 2, 2, 27, 27, 27, 27, 27, 27, 28, 28, 39, 12, 12, 12, 2, 2, 2, 2, 17, 17, 17, 17, 17, 17, 17, 21, 6, 23, 23, 23, 23, 23, 23, 23, 17, 17, 17, 17, 21, 21, 21, 19, 18, 6, 6, 6, 23, 23, 23, 23, 17, 21, 21, 21, 21, 21, 19, 19, 18, 6, 6, 6, 6, 6, 6, 23, 21, 21, 21, 21, 21, 21, 19, 19, 18, 18, 6, 6, 6, 6, 6, 6, 21, 21, 21, 21, 21, 19, 19, 18, 18, 18, 6, 6, 6, 6, 6, 6, 21, 21, 21, 21, 19, 19, 19, 18, 18, 18, 18, 6, 6, 6, 6, 6, 21, 21, 21, 21, 19, 19, 19, 18, 18, 18, 18, 6, 6, 6, 6, 6, 21, 21, 21, 19, 19, 19, 19, 18, 18, 18, 18, 18, 6, 6, 6, 6, 73, 67, 69, 1, 86, 65, 76, 69, 2, 0, 0, 0, 40, 0, 0, 0, 202, 0, 0, 0, 9, 0, 0, 0, 5, 9, 9, 3, 7, 4, 4, 5, 7, 6, 6, 5, 3, 5, 9, 7, 5, 4, 5, 5, 3, 3, 4, 5, 5, 5, 3, 3, 5, 4, 4, 5, 3, 6, 7, 6, 4, 4, 5, 5, 1, 3, 4, 23, 2, 2, 36, 9, 31, 32, 33, 4, 3, 0, 0, 23, 13, 12, 39, 8, 7, 36, 1, 1, 4, 0, 3, 1, 33, 5, 6, 23, 0, 4, 24, 18, 6, 23, 4, 5, 18, 8, 37, 9, 36, 2, 2, 39, 34, 28, 38, 37, 7, 10, 31, 1, 36, 7, 11, 11, 25, 35, 33, 31, 9, 9, 29, 15, 25, 10, 13, 39, 2, 34, 39, 12, 2, 23, 15, 29, 30, 38, 28, 27, 34, 17, 16, 16, 35, 26, 25, 11, 29, 14, 14, 17, 22, 35, 15, 21, 16, 14, 34, 6, 5, 24, 20, 19, 18, 20, 24, 22, 21, 18, 24, 19, 19, 22, 17, 21, 19, 24, 16, 13, 2, 0, 4, 6, 20, 18, 5, 22, 19, 26, 35, 10, 11, 15, 15, 35, 25, 28, 34, 14, 14, 38, 8, 34, 27, 11, 30, 14, 15, 29, 37, 38, 14, 1, 9, 10, 33, 32, 31, 33, 1, 10, 35, 4, 1, 32, 31, 17, 14, 27, 28, 8, 39, 13, 26, 15, 16, 33, 10, 25, 1, 2, 7, 9, 8, 38, 30, 7, 8, 28, 14, 30, 37, 8, 2, 12, 13, 34, 0, 0, 128, 191, 68, 95, 84, 60, 237, 135, 71, 61, 233, 57, 245, 59, 233, 57, 245, 59] + } + } + } + + over "link3" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + bool physxRigidBody:disableGravity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:maxDepenetrationVelocity = 0.049999997 + float physxRigidBody:maxLinearVelocity = inf + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "joint4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:jointFriction = 0 + float physxJoint:maxJointVelocity = 57.29578 + } + + over "collisions" + { + over "collisions_2" ( + prepend apiSchemas = ["PhysxCookedDataAPI:convexHull"] + ) + { + uchar[] physxCookedData:convexHull:buffer = [9, 217, 221, 120, 65, 245, 91, 244, 116, 101, 139, 70, 58, 151, 132, 95, 101, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 40, 0, 0, 0, 90, 128, 0, 0, 52, 0, 0, 0, 180, 0, 0, 0, 76, 166, 10, 189, 224, 45, 144, 188, 92, 177, 63, 60, 76, 166, 10, 189, 224, 45, 144, 188, 244, 253, 84, 188, 126, 174, 54, 60, 201, 158, 142, 188, 174, 170, 100, 188, 10, 165, 83, 60, 69, 46, 138, 188, 92, 177, 63, 60, 126, 174, 54, 60, 69, 46, 138, 188, 233, 167, 92, 60, 179, 210, 174, 189, 119, 8, 39, 188, 233, 183, 175, 188, 45, 33, 31, 189, 49, 8, 44, 188, 233, 183, 175, 188, 206, 95, 187, 189, 92, 115, 195, 187, 233, 183, 175, 188, 196, 239, 183, 189, 143, 196, 0, 188, 157, 17, 165, 60, 64, 164, 95, 60, 254, 101, 119, 188, 92, 177, 63, 60, 189, 246, 43, 60, 239, 249, 154, 57, 227, 199, 152, 60, 120, 178, 8, 60, 72, 177, 200, 187, 117, 2, 154, 60, 64, 164, 95, 60, 254, 101, 119, 188, 244, 253, 84, 188, 159, 5, 44, 60, 241, 234, 237, 56, 117, 2, 154, 188, 64, 164, 95, 60, 70, 18, 2, 60, 191, 88, 69, 188, 38, 6, 191, 189, 171, 227, 165, 186, 157, 17, 165, 60, 140, 200, 189, 189, 120, 3, 116, 59, 157, 17, 165, 60, 38, 6, 191, 189, 171, 227, 165, 58, 155, 85, 159, 188, 196, 239, 183, 189, 143, 196, 0, 60, 157, 17, 165, 60, 67, 173, 169, 189, 49, 8, 44, 60, 157, 17, 165, 60, 67, 173, 169, 189, 49, 8, 44, 60, 233, 183, 175, 188, 196, 239, 183, 189, 143, 196, 0, 60, 233, 183, 175, 188, 67, 173, 169, 189, 49, 8, 44, 188, 157, 17, 165, 60, 178, 210, 36, 60, 185, 194, 59, 60, 202, 84, 65, 60, 236, 230, 39, 60, 184, 222, 57, 60, 84, 112, 85, 188, 38, 6, 191, 189, 171, 227, 165, 58, 233, 183, 175, 188, 180, 103, 8, 60, 84, 167, 209, 59, 117, 2, 154, 188, 243, 75, 56, 59, 82, 191, 37, 60, 117, 2, 154, 188, 45, 33, 31, 189, 49, 8, 44, 60, 233, 183, 175, 188, 253, 216, 150, 59, 210, 157, 26, 188, 117, 2, 154, 188, 194, 238, 20, 60, 199, 53, 172, 59, 227, 199, 152, 60, 64, 164, 95, 60, 160, 212, 31, 60, 101, 22, 7, 60, 196, 223, 126, 59, 214, 37, 29, 60, 117, 2, 154, 60, 64, 164, 95, 60, 10, 215, 35, 60, 111, 18, 3, 188, 224, 10, 150, 58, 181, 136, 40, 188, 117, 2, 154, 60, 64, 164, 95, 60, 11, 215, 163, 59, 92, 177, 63, 60, 126, 174, 54, 60, 92, 137, 131, 188, 136, 213, 122, 188, 10, 165, 83, 60, 69, 46, 138, 188, 244, 253, 84, 188, 169, 252, 21, 58, 195, 198, 43, 60, 227, 199, 152, 60, 45, 33, 31, 189, 49, 8, 44, 188, 157, 17, 165, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 191, 234, 183, 175, 188, 0, 0, 7, 8, 123, 49, 148, 59, 15, 249, 127, 191, 133, 153, 98, 60, 219, 111, 141, 188, 7, 0, 5, 24, 160, 132, 248, 187, 179, 70, 70, 191, 21, 236, 33, 191, 194, 33, 181, 188, 12, 0, 4, 19, 195, 104, 17, 191, 88, 169, 82, 191, 93, 142, 110, 188, 31, 62, 106, 189, 16, 0, 3, 31, 223, 129, 38, 63, 51, 142, 74, 190, 236, 189, 59, 63, 90, 125, 167, 188, 19, 0, 4, 25, 59, 218, 101, 63, 90, 93, 149, 60, 185, 58, 225, 190, 235, 253, 144, 188, 23, 0, 3, 15, 59, 32, 126, 191, 127, 218, 246, 61, 68, 119, 252, 59, 145, 161, 189, 189, 26, 0, 3, 12, 19, 167, 98, 191, 207, 233, 237, 190, 4, 142, 110, 60, 65, 238, 170, 189, 29, 0, 3, 33, 202, 142, 181, 190, 56, 93, 111, 63, 0, 0, 0, 0, 182, 140, 32, 189, 32, 0, 4, 3, 16, 175, 82, 191, 179, 108, 17, 63, 0, 0, 0, 0, 56, 133, 160, 189, 36, 0, 3, 3, 221, 137, 181, 190, 186, 86, 111, 191, 86, 142, 110, 60, 1, 188, 33, 189, 39, 0, 3, 24, 255, 215, 17, 190, 222, 99, 125, 191, 121, 250, 92, 58, 48, 29, 182, 188, 42, 0, 4, 23, 185, 176, 49, 188, 47, 176, 75, 191, 227, 11, 27, 63, 38, 198, 175, 188, 46, 0, 3, 28, 80, 5, 18, 188, 75, 253, 127, 63, 107, 253, 230, 186, 247, 189, 56, 188, 49, 0, 4, 2, 159, 143, 120, 191, 153, 15, 117, 62, 0, 0, 0, 0, 236, 23, 186, 189, 53, 0, 3, 9, 19, 167, 98, 191, 208, 233, 237, 62, 21, 142, 110, 188, 48, 248, 170, 189, 56, 0, 3, 3, 226, 136, 120, 191, 189, 8, 117, 190, 136, 142, 110, 188, 15, 121, 185, 189, 59, 0, 3, 31, 0, 0, 128, 191, 0, 0, 0, 0, 0, 0, 0, 0, 38, 6, 191, 189, 62, 0, 3, 9, 9, 38, 213, 62, 87, 6, 30, 63, 222, 229, 42, 191, 44, 143, 163, 188, 65, 0, 3, 8, 147, 30, 36, 63, 55, 164, 237, 62, 250, 119, 28, 191, 215, 46, 162, 188, 68, 0, 3, 8, 107, 32, 59, 63, 121, 116, 129, 62, 223, 67, 34, 191, 125, 185, 160, 188, 71, 0, 3, 15, 67, 51, 131, 61, 16, 138, 194, 61, 110, 80, 126, 191, 233, 87, 162, 188, 74, 0, 3, 8, 161, 2, 101, 61, 182, 141, 3, 187, 91, 153, 127, 191, 246, 121, 157, 188, 77, 0, 5, 15, 0, 0, 0, 0, 248, 184, 126, 63, 145, 87, 204, 189, 23, 61, 78, 188, 82, 0, 3, 0, 8, 10, 197, 60, 254, 151, 120, 63, 39, 73, 115, 190, 158, 61, 107, 188, 85, 0, 3, 0, 98, 235, 57, 63, 93, 15, 233, 62, 182, 223, 3, 63, 114, 97, 152, 188, 88, 0, 3, 7, 250, 7, 4, 63, 5, 238, 24, 63, 202, 54, 29, 63, 44, 243, 157, 188, 91, 0, 3, 7, 50, 17, 55, 63, 163, 113, 31, 63, 61, 123, 162, 190, 141, 200, 151, 188, 94, 0, 3, 8, 42, 48, 189, 62, 198, 225, 109, 63, 164, 126, 199, 186, 208, 20, 107, 188, 97, 0, 3, 5, 96, 46, 225, 62, 179, 226, 101, 63, 198, 161, 93, 60, 124, 182, 115, 188, 100, 0, 3, 5, 50, 130, 100, 62, 20, 159, 197, 190, 246, 37, 101, 63, 61, 121, 172, 188, 103, 0, 3, 21, 161, 184, 45, 63, 100, 234, 143, 190, 154, 184, 45, 63, 79, 177, 175, 188, 106, 0, 3, 25, 182, 29, 105, 63, 0, 0, 0, 0, 207, 151, 211, 62, 112, 111, 141, 188, 109, 0, 3, 25, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 64, 164, 95, 188, 112, 0, 6, 15, 181, 227, 72, 63, 47, 138, 186, 62, 0, 96, 0, 63, 62, 188, 150, 188, 118, 0, 3, 7, 106, 55, 81, 63, 243, 46, 109, 62, 66, 22, 7, 63, 28, 115, 151, 188, 121, 0, 3, 7, 105, 55, 7, 60, 95, 3, 53, 191, 95, 3, 53, 191, 248, 112, 182, 188, 124, 0, 3, 19, 12, 35, 134, 61, 70, 241, 211, 190, 199, 110, 104, 191, 164, 77, 174, 188, 127, 0, 3, 19, 37, 205, 156, 62, 85, 153, 65, 190, 63, 216, 110, 191, 183, 218, 169, 188, 130, 0, 3, 16, 5, 212, 50, 63, 202, 248, 253, 189, 147, 105, 52, 191, 238, 128, 168, 188, 133, 0, 3, 16, 91, 131, 108, 63, 39, 239, 195, 190, 0, 0, 0, 0, 137, 165, 150, 188, 136, 0, 4, 16, 53, 17, 150, 62, 199, 193, 116, 191, 0, 0, 0, 0, 238, 32, 163, 188, 140, 0, 3, 19, 140, 159, 3, 63, 141, 66, 27, 191, 141, 66, 27, 191, 46, 205, 202, 188, 143, 0, 3, 18, 119, 247, 52, 63, 255, 234, 149, 190, 238, 211, 36, 191, 182, 213, 183, 188, 146, 0, 3, 16, 240, 97, 94, 62, 203, 217, 96, 63, 184, 14, 218, 62, 28, 134, 141, 188, 149, 0, 3, 5, 254, 188, 54, 59, 53, 77, 125, 63, 76, 66, 20, 62, 126, 59, 86, 188, 152, 0, 3, 1, 231, 184, 143, 60, 2, 47, 106, 62, 208, 44, 121, 63, 159, 110, 168, 188, 155, 0, 3, 5, 126, 57, 11, 61, 196, 207, 112, 189, 181, 104, 127, 63, 83, 237, 158, 188, 158, 0, 3, 21, 82, 117, 213, 60, 191, 106, 223, 60, 92, 209, 127, 63, 6, 80, 154, 188, 161, 0, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 127, 63, 156, 17, 165, 188, 167, 0, 7, 5, 0, 0, 0, 0, 221, 83, 57, 191, 37, 155, 48, 63, 74, 37, 176, 188, 174, 0, 3, 20, 245, 26, 247, 60, 13, 229, 25, 191, 205, 110, 76, 63, 72, 237, 173, 188, 177, 0, 3, 20, 28, 6, 5, 7, 25, 21, 20, 0, 1, 2, 3, 4, 1, 5, 6, 2, 7, 5, 8, 9, 10, 11, 4, 12, 13, 14, 15, 16, 17, 15, 7, 8, 18, 19, 20, 21, 18, 21, 16, 22, 8, 5, 22, 5, 1, 0, 22, 0, 4, 23, 24, 20, 19, 25, 17, 16, 25, 16, 21, 25, 7, 15, 25, 15, 17, 26, 27, 24, 26, 24, 14, 26, 14, 13, 28, 27, 26, 28, 26, 13, 29, 6, 28, 20, 24, 28, 24, 27, 30, 31, 23, 30, 23, 32, 33, 14, 24, 33, 24, 23, 33, 23, 31, 11, 34, 4, 3, 9, 4, 35, 10, 9, 35, 9, 12, 14, 33, 31, 35, 31, 30, 35, 30, 10, 36, 2, 6, 36, 6, 29, 36, 29, 13, 36, 13, 12, 37, 12, 9, 3, 37, 3, 2, 37, 2, 36, 37, 36, 12, 38, 32, 23, 38, 23, 19, 38, 19, 32, 39, 34, 11, 39, 11, 10, 30, 32, 19, 39, 19, 18, 16, 15, 8, 22, 39, 22, 4, 39, 4, 34, 0, 22, 0, 2, 0, 3, 0, 16, 0, 15, 0, 8, 0, 23, 1, 11, 1, 2, 1, 41, 1, 31, 1, 12, 2, 11, 2, 36, 3, 10, 3, 7, 4, 32, 4, 48, 4, 30, 4, 31, 5, 39, 5, 20, 5, 33, 6, 49, 6, 14, 6, 17, 7, 16, 7, 49, 8, 49, 8, 13, 8, 9, 9, 15, 9, 49, 10, 49, 10, 11, 11, 12, 12, 50, 13, 28, 13, 23, 13, 45, 14, 17, 14, 15, 16, 17, 18, 21, 18, 24, 18, 19, 19, 27, 19, 20, 20, 22, 21, 24, 21, 22, 22, 38, 22, 37, 23, 24, 25, 34, 25, 29, 25, 26, 26, 44, 26, 48, 27, 33, 27, 28, 28, 29, 29, 33, 30, 47, 30, 51, 31, 40, 32, 35, 32, 33, 33, 40, 33, 34, 34, 35, 35, 48, 36, 42, 36, 37, 37, 38, 38, 39, 39, 43, 40, 43, 40, 41, 41, 42, 42, 43, 44, 46, 44, 45, 45, 46, 46, 48, 47, 51, 47, 48, 48, 49, 49, 50, 50, 51, 1, 11, 12, 1, 2, 11, 1, 2, 36, 1, 31, 40, 1, 4, 12, 0, 2, 3, 0, 2, 22, 0, 3, 7, 3, 7, 10, 4, 31, 32, 4, 32, 35, 4, 30, 47, 5, 33, 39, 5, 20, 22, 5, 19, 20, 6, 7, 16, 6, 9, 14, 6, 14, 17, 8, 9, 49, 8, 13, 45, 0, 8, 13, 0, 8, 9, 10, 11, 12, 13, 25, 26, 13, 18, 19, 0, 14, 15, 18, 19, 20, 18, 21, 24, 0, 21, 22, 22, 37, 38, 25, 26, 34, 25, 29, 33, 26, 44, 46, 27, 28, 29, 30, 47, 51, 32, 33, 34, 36, 37, 38, 40, 41, 42, 44, 45, 46, 47, 48, 49, 28, 0, 6, 0, 6, 0, 5, 0, 5, 0, 7, 0, 7, 0, 25, 0, 25, 0, 21, 0, 21, 0, 20, 0, 20, 0, 28, 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 3, 0, 3, 0, 4, 0, 4, 0, 0, 0, 1, 0, 5, 0, 6, 0, 2, 0, 5, 0, 8, 0, 8, 0, 7, 0, 9, 0, 10, 0, 10, 0, 11, 0, 11, 0, 4, 0, 4, 0, 9, 0, 12, 0, 13, 0, 13, 0, 14, 0, 14, 0, 12, 0, 15, 0, 16, 0, 16, 0, 17, 0, 17, 0, 15, 0, 15, 0, 7, 0, 8, 0, 15, 0, 18, 0, 19, 0, 19, 0, 20, 0, 21, 0, 18, 0, 21, 0, 16, 0, 16, 0, 18, 0, 22, 0, 8, 0, 5, 0, 22, 0, 0, 0, 22, 0, 4, 0, 22, 0, 23, 0, 24, 0, 24, 0, 20, 0, 19, 0, 23, 0, 25, 0, 17, 0, 16, 0, 25, 0, 15, 0, 25, 0, 26, 0, 27, 0, 27, 0, 24, 0, 24, 0, 26, 0, 24, 0, 14, 0, 14, 0, 26, 0, 13, 0, 26, 0, 28, 0, 27, 0, 26, 0, 28, 0, 13, 0, 29, 0, 29, 0, 6, 0, 24, 0, 28, 0, 30, 0, 31, 0, 31, 0, 23, 0, 23, 0, 30, 0, 23, 0, 32, 0, 32, 0, 30, 0, 33, 0, 14, 0, 24, 0, 33, 0, 23, 0, 33, 0, 31, 0, 33, 0, 11, 0, 34, 0, 34, 0, 4, 0, 3, 0, 9, 0, 35, 0, 10, 0, 9, 0, 35, 0, 9, 0, 12, 0, 31, 0, 35, 0, 30, 0, 35, 0, 30, 0, 10, 0, 36, 0, 2, 0, 6, 0, 36, 0, 29, 0, 36, 0, 13, 0, 36, 0, 12, 0, 36, 0, 37, 0, 12, 0, 3, 0, 37, 0, 2, 0, 37, 0, 36, 0, 37, 0, 38, 0, 32, 0, 23, 0, 38, 0, 19, 0, 38, 0, 19, 0, 32, 0, 39, 0, 34, 0, 11, 0, 39, 0, 19, 0, 39, 0, 22, 0, 39, 0, 4, 0, 39, 0, 0, 0, 0, 0, 38, 6, 191, 189, 224, 45, 144, 188, 233, 183, 175, 188, 64, 164, 95, 60, 184, 194, 59, 60, 157, 17, 165, 60, 66, 100, 222, 56, 14, 146, 172, 50, 95, 162, 181, 177, 124, 245, 49, 177, 95, 162, 181, 177, 137, 117, 135, 52, 19, 252, 222, 174, 124, 245, 49, 177, 19, 252, 222, 174, 156, 137, 131, 52, 80, 26, 25, 189, 76, 196, 3, 187, 117, 101, 13, 186, 0, 0, 128, 63, 73, 67, 69, 1, 83, 85, 80, 77, 0, 0, 0, 0, 73, 67, 69, 1, 71, 65, 85, 83, 0, 0, 0, 0, 16, 0, 0, 0, 0, 6, 0, 0, 37, 37, 37, 37, 37, 37, 37, 37, 3, 3, 3, 3, 3, 3, 3, 3, 37, 37, 37, 37, 37, 37, 37, 37, 3, 3, 3, 3, 3, 3, 3, 3, 37, 37, 37, 37, 37, 37, 37, 37, 3, 3, 3, 3, 3, 3, 3, 3, 36, 37, 37, 37, 37, 37, 37, 37, 3, 3, 3, 3, 3, 3, 3, 3, 36, 37, 37, 37, 37, 37, 37, 37, 3, 3, 3, 3, 3, 3, 3, 3, 36, 12, 12, 12, 12, 12, 12, 12, 9, 9, 9, 9, 9, 9, 9, 9, 36, 12, 12, 12, 12, 12, 12, 12, 9, 9, 9, 9, 9, 9, 9, 10, 13, 13, 13, 12, 12, 12, 12, 12, 9, 9, 9, 9, 9, 10, 10, 10, 13, 13, 13, 13, 14, 14, 14, 14, 31, 35, 35, 35, 10, 10, 10, 10, 13, 13, 13, 14, 14, 14, 14, 33, 31, 31, 35, 35, 10, 10, 10, 10, 13, 13, 14, 14, 14, 14, 14, 33, 31, 31, 31, 35, 35, 30, 30, 30, 26, 14, 14, 14, 14, 14, 33, 33, 31, 31, 31, 31, 31, 30, 30, 30, 26, 14, 14, 14, 14, 14, 33, 33, 31, 31, 31, 31, 31, 30, 30, 30, 26, 14, 14, 14, 14, 33, 33, 33, 31, 31, 31, 31, 31, 23, 30, 30, 24, 24, 24, 24, 24, 33, 33, 33, 31, 31, 31, 31, 23, 23, 23, 30, 24, 24, 24, 24, 24, 33, 33, 33, 31, 31, 31, 31, 23, 23, 23, 23, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 15, 15, 15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7, 7, 7, 15, 15, 15, 15, 15, 15, 15, 15, 25, 25, 25, 25, 25, 25, 25, 25, 15, 15, 15, 15, 15, 15, 15, 15, 25, 25, 25, 25, 25, 25, 25, 25, 15, 15, 15, 15, 15, 15, 15, 15, 25, 25, 25, 25, 25, 25, 25, 25, 15, 15, 15, 15, 15, 15, 15, 15, 25, 25, 25, 25, 25, 25, 25, 25, 16, 16, 16, 16, 16, 16, 16, 16, 25, 25, 25, 25, 25, 25, 25, 25, 16, 16, 16, 16, 16, 16, 16, 16, 25, 25, 25, 25, 25, 25, 25, 25, 16, 16, 16, 16, 16, 16, 16, 16, 21, 21, 21, 21, 21, 21, 21, 21, 16, 16, 16, 16, 16, 16, 16, 16, 21, 21, 21, 21, 21, 21, 21, 21, 18, 18, 18, 18, 18, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21, 21, 18, 18, 18, 18, 18, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21, 21, 18, 18, 18, 18, 18, 18, 18, 18, 21, 21, 21, 21, 21, 20, 20, 20, 28, 27, 27, 27, 27, 24, 24, 24, 21, 21, 21, 21, 21, 20, 20, 20, 27, 27, 27, 27, 24, 24, 24, 24, 21, 21, 21, 21, 21, 20, 20, 20, 27, 27, 27, 24, 24, 24, 24, 24, 21, 21, 21, 21, 21, 20, 20, 20, 27, 27, 24, 24, 24, 24, 24, 24, 21, 21, 21, 21, 21, 20, 20, 20, 27, 24, 24, 24, 24, 24, 24, 24, 21, 21, 21, 21, 21, 20, 20, 20, 27, 24, 24, 24, 24, 24, 24, 33, 21, 21, 21, 21, 21, 20, 20, 20, 24, 24, 24, 24, 24, 33, 33, 33, 21, 21, 21, 21, 21, 20, 20, 20, 24, 24, 24, 24, 33, 33, 33, 33, 18, 18, 18, 18, 18, 19, 19, 19, 23, 23, 23, 23, 31, 31, 31, 31, 18, 18, 18, 18, 18, 19, 19, 19, 23, 23, 23, 23, 23, 31, 31, 31, 18, 18, 18, 18, 18, 19, 19, 19, 38, 23, 23, 23, 23, 23, 31, 31, 18, 18, 18, 18, 18, 19, 19, 19, 38, 38, 23, 23, 23, 23, 23, 31, 18, 18, 18, 18, 18, 19, 19, 19, 38, 38, 32, 23, 23, 23, 23, 23, 18, 18, 18, 18, 18, 19, 19, 19, 38, 38, 32, 32, 23, 23, 23, 23, 18, 18, 18, 18, 18, 19, 19, 19, 38, 38, 32, 32, 32, 23, 23, 23, 18, 18, 18, 18, 18, 19, 19, 19, 38, 38, 32, 32, 32, 32, 23, 23, 7, 7, 7, 5, 5, 5, 5, 5, 2, 36, 36, 36, 2, 2, 37, 37, 7, 7, 7, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 37, 37, 7, 7, 7, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 37, 37, 37, 7, 7, 7, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 37, 37, 37, 7, 7, 7, 5, 5, 5, 5, 1, 2, 2, 2, 2, 37, 37, 37, 37, 7, 7, 7, 5, 5, 5, 5, 1, 2, 2, 2, 2, 37, 37, 37, 37, 7, 7, 7, 5, 5, 5, 5, 1, 2, 2, 2, 37, 37, 37, 37, 37, 7, 7, 7, 5, 5, 5, 5, 1, 2, 2, 2, 37, 37, 37, 37, 37, 8, 8, 8, 8, 8, 22, 22, 0, 3, 3, 3, 3, 3, 3, 3, 3, 8, 8, 8, 8, 8, 22, 22, 0, 4, 4, 3, 3, 3, 3, 3, 3, 8, 8, 8, 8, 8, 22, 22, 0, 4, 4, 4, 3, 3, 3, 3, 3, 8, 8, 8, 8, 8, 22, 22, 22, 4, 4, 4, 4, 3, 3, 3, 3, 8, 8, 8, 8, 8, 22, 22, 22, 4, 4, 4, 4, 3, 3, 3, 3, 8, 8, 8, 8, 8, 22, 22, 22, 4, 4, 4, 4, 4, 3, 3, 3, 8, 8, 8, 8, 8, 22, 22, 22, 4, 4, 4, 4, 4, 4, 3, 3, 8, 8, 8, 8, 8, 22, 22, 22, 4, 4, 4, 4, 4, 4, 4, 3, 8, 8, 8, 8, 15, 15, 15, 15, 15, 16, 16, 16, 16, 18, 18, 18, 8, 8, 8, 8, 8, 15, 15, 15, 15, 16, 16, 16, 18, 18, 18, 18, 8, 8, 8, 8, 8, 15, 15, 15, 15, 16, 16, 16, 18, 18, 18, 18, 8, 8, 8, 8, 8, 8, 15, 15, 15, 16, 16, 18, 18, 18, 18, 18, 8, 8, 8, 8, 8, 8, 15, 15, 16, 16, 18, 18, 18, 18, 18, 18, 22, 8, 8, 8, 8, 8, 8, 15, 16, 16, 18, 18, 18, 18, 18, 19, 22, 22, 22, 22, 8, 8, 8, 15, 16, 18, 18, 18, 19, 19, 19, 19, 22, 22, 22, 22, 22, 22, 22, 8, 18, 19, 19, 19, 19, 19, 19, 19, 4, 4, 4, 34, 34, 34, 34, 11, 32, 32, 32, 38, 38, 38, 38, 38, 4, 4, 4, 4, 34, 11, 11, 11, 30, 30, 32, 32, 32, 32, 32, 38, 4, 4, 4, 4, 4, 11, 11, 10, 10, 30, 30, 32, 32, 32, 32, 32, 4, 4, 4, 4, 4, 11, 11, 10, 10, 30, 30, 30, 32, 32, 32, 32, 4, 4, 4, 4, 4, 11, 11, 10, 10, 30, 30, 30, 30, 32, 32, 32, 4, 4, 4, 4, 4, 4, 10, 10, 10, 10, 30, 30, 30, 30, 32, 32, 4, 4, 4, 4, 4, 4, 10, 10, 10, 10, 30, 30, 30, 30, 30, 23, 4, 3, 4, 4, 4, 9, 10, 10, 10, 10, 30, 30, 30, 30, 30, 23, 7, 7, 7, 7, 7, 7, 25, 25, 25, 25, 25, 25, 21, 21, 21, 21, 7, 7, 7, 7, 7, 7, 25, 25, 25, 25, 25, 21, 21, 21, 21, 21, 7, 7, 7, 7, 7, 7, 7, 25, 25, 25, 25, 21, 21, 21, 21, 21, 5, 7, 7, 7, 7, 7, 7, 25, 25, 25, 21, 21, 21, 21, 21, 21, 5, 5, 5, 7, 7, 7, 7, 25, 25, 25, 21, 21, 21, 21, 21, 21, 5, 5, 5, 5, 7, 7, 7, 25, 25, 21, 21, 21, 21, 21, 21, 20, 5, 5, 5, 5, 5, 5, 7, 7, 25, 21, 21, 21, 20, 20, 20, 20, 5, 5, 5, 5, 5, 5, 5, 7, 21, 20, 20, 20, 20, 20, 20, 20, 2, 36, 36, 36, 6, 6, 29, 29, 26, 27, 28, 28, 28, 28, 28, 28, 36, 36, 36, 36, 36, 36, 29, 13, 13, 26, 27, 27, 27, 27, 27, 27, 36, 36, 36, 36, 36, 36, 13, 13, 13, 26, 26, 26, 27, 27, 27, 27, 36, 36, 36, 36, 36, 36, 36, 13, 13, 26, 26, 26, 26, 27, 27, 27, 2, 36, 36, 36, 36, 36, 36, 13, 13, 13, 26, 26, 26, 26, 26, 27, 2, 36, 36, 36, 36, 36, 36, 13, 13, 13, 26, 26, 26, 26, 26, 24, 37, 36, 36, 36, 36, 36, 36, 13, 13, 13, 26, 26, 26, 26, 24, 24, 37, 37, 37, 36, 36, 36, 36, 13, 13, 13, 13, 26, 26, 26, 24, 24, 18, 18, 18, 18, 18, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21, 21, 18, 18, 18, 18, 18, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21, 21, 18, 18, 18, 18, 18, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21, 21, 16, 16, 16, 16, 16, 16, 16, 16, 21, 21, 21, 21, 21, 21, 21, 21, 16, 16, 16, 16, 16, 16, 16, 16, 25, 25, 25, 25, 25, 25, 25, 25, 16, 16, 16, 16, 16, 16, 16, 16, 25, 25, 25, 25, 25, 25, 25, 25, 16, 16, 16, 16, 16, 16, 16, 16, 25, 25, 25, 25, 25, 25, 25, 25, 15, 15, 15, 15, 15, 15, 15, 15, 25, 25, 25, 25, 25, 25, 25, 25, 15, 15, 15, 15, 15, 15, 15, 15, 25, 25, 25, 25, 25, 25, 25, 25, 15, 15, 15, 15, 15, 15, 15, 15, 25, 25, 25, 25, 25, 25, 25, 25, 15, 15, 15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7, 7, 7, 15, 15, 15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 23, 23, 23, 23, 31, 31, 31, 31, 33, 33, 33, 24, 24, 24, 24, 24, 30, 23, 23, 23, 31, 31, 31, 31, 33, 33, 33, 24, 24, 24, 24, 24, 30, 30, 23, 31, 31, 31, 31, 31, 33, 33, 33, 14, 14, 14, 14, 26, 30, 30, 30, 31, 31, 31, 31, 31, 33, 33, 14, 14, 14, 14, 14, 26, 30, 30, 30, 31, 31, 31, 31, 31, 33, 33, 14, 14, 14, 14, 14, 26, 30, 30, 30, 35, 35, 31, 31, 31, 33, 14, 14, 14, 14, 14, 13, 13, 10, 10, 10, 10, 35, 35, 31, 31, 33, 14, 14, 14, 14, 13, 13, 13, 10, 10, 10, 10, 35, 35, 35, 31, 14, 14, 14, 14, 13, 13, 13, 13, 10, 10, 10, 9, 9, 9, 9, 9, 12, 12, 12, 12, 12, 13, 13, 13, 10, 9, 9, 9, 9, 9, 9, 9, 12, 12, 12, 12, 12, 12, 12, 36, 9, 9, 9, 9, 9, 9, 9, 9, 12, 12, 12, 12, 12, 12, 12, 36, 3, 3, 3, 3, 3, 3, 3, 3, 37, 37, 37, 37, 37, 37, 37, 36, 3, 3, 3, 3, 3, 3, 3, 3, 37, 37, 37, 37, 37, 37, 37, 36, 3, 3, 3, 3, 3, 3, 3, 3, 37, 37, 37, 37, 37, 37, 37, 37, 3, 3, 3, 3, 3, 3, 3, 3, 37, 37, 37, 37, 37, 37, 37, 37, 3, 3, 3, 3, 3, 3, 3, 3, 37, 37, 37, 37, 37, 37, 37, 37, 4, 4, 4, 4, 4, 4, 4, 4, 22, 22, 22, 8, 8, 8, 8, 8, 3, 4, 4, 4, 4, 4, 4, 4, 22, 22, 22, 8, 8, 8, 8, 8, 3, 3, 4, 4, 4, 4, 4, 4, 22, 22, 22, 8, 8, 8, 8, 8, 3, 3, 3, 4, 4, 4, 4, 4, 22, 22, 22, 8, 8, 8, 8, 8, 3, 3, 3, 3, 4, 4, 4, 4, 22, 22, 22, 8, 8, 8, 8, 8, 3, 3, 3, 3, 3, 4, 4, 4, 0, 22, 22, 8, 8, 8, 8, 8, 3, 3, 3, 3, 3, 3, 4, 4, 0, 22, 22, 8, 8, 8, 8, 8, 3, 3, 3, 3, 3, 3, 3, 4, 0, 22, 22, 8, 8, 8, 8, 8, 37, 37, 37, 37, 37, 2, 2, 2, 1, 5, 5, 5, 5, 7, 7, 7, 37, 37, 37, 37, 37, 2, 2, 2, 1, 5, 5, 5, 5, 7, 7, 7, 37, 37, 37, 37, 2, 2, 2, 2, 1, 5, 5, 5, 5, 7, 7, 7, 37, 37, 37, 37, 2, 2, 2, 2, 1, 5, 5, 5, 5, 7, 7, 7, 37, 37, 37, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 7, 7, 7, 37, 37, 37, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 7, 7, 7, 37, 37, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 7, 7, 7, 37, 37, 2, 2, 2, 36, 36, 2, 5, 5, 5, 5, 5, 7, 7, 7, 23, 23, 32, 32, 32, 32, 38, 38, 19, 19, 19, 18, 18, 18, 18, 18, 23, 23, 23, 32, 32, 32, 38, 38, 19, 19, 19, 18, 18, 18, 18, 18, 23, 23, 23, 23, 32, 32, 38, 38, 19, 19, 19, 18, 18, 18, 18, 18, 23, 23, 23, 23, 23, 32, 38, 38, 19, 19, 19, 18, 18, 18, 18, 18, 31, 23, 23, 23, 23, 23, 38, 38, 19, 19, 19, 18, 18, 18, 18, 18, 31, 31, 23, 23, 23, 23, 23, 38, 19, 19, 19, 18, 18, 18, 18, 18, 31, 31, 31, 23, 23, 23, 23, 23, 19, 19, 19, 18, 18, 18, 18, 18, 31, 31, 31, 31, 23, 23, 23, 23, 19, 19, 19, 18, 18, 18, 18, 18, 33, 33, 33, 33, 24, 24, 24, 24, 20, 20, 20, 21, 21, 21, 21, 21, 33, 33, 33, 24, 24, 24, 24, 24, 20, 20, 20, 21, 21, 21, 21, 21, 33, 24, 24, 24, 24, 24, 24, 27, 20, 20, 20, 21, 21, 21, 21, 21, 24, 24, 24, 24, 24, 24, 24, 27, 20, 20, 20, 21, 21, 21, 21, 21, 24, 24, 24, 24, 24, 24, 27, 27, 20, 20, 20, 21, 21, 21, 21, 21, 24, 24, 24, 24, 24, 27, 27, 27, 20, 20, 20, 21, 21, 21, 21, 21, 24, 24, 24, 24, 27, 27, 27, 27, 20, 20, 20, 21, 21, 21, 21, 21, 24, 24, 24, 27, 27, 27, 27, 28, 20, 20, 20, 21, 21, 21, 21, 21, 24, 24, 26, 26, 26, 13, 13, 13, 13, 36, 36, 36, 36, 37, 37, 37, 24, 24, 26, 26, 26, 26, 13, 13, 13, 36, 36, 36, 36, 36, 36, 37, 24, 26, 26, 26, 26, 26, 13, 13, 13, 36, 36, 36, 36, 36, 36, 36, 27, 26, 26, 26, 26, 26, 13, 13, 13, 36, 36, 36, 36, 36, 36, 2, 27, 27, 27, 26, 26, 26, 26, 13, 13, 36, 36, 36, 36, 36, 36, 36, 27, 27, 27, 27, 26, 26, 26, 13, 13, 13, 36, 36, 36, 36, 36, 36, 27, 27, 27, 27, 27, 27, 26, 13, 13, 29, 36, 36, 36, 36, 36, 36, 28, 28, 28, 28, 28, 28, 27, 26, 29, 29, 6, 6, 36, 36, 36, 36, 20, 20, 20, 20, 20, 20, 20, 21, 7, 5, 5, 5, 5, 5, 5, 5, 20, 20, 20, 20, 21, 21, 21, 25, 7, 7, 5, 5, 5, 5, 5, 5, 20, 21, 21, 21, 21, 21, 21, 25, 25, 7, 7, 7, 5, 5, 5, 5, 21, 21, 21, 21, 21, 21, 25, 25, 25, 7, 7, 7, 7, 5, 5, 5, 21, 21, 21, 21, 21, 21, 25, 25, 25, 7, 7, 7, 7, 7, 7, 5, 21, 21, 21, 21, 21, 25, 25, 25, 25, 7, 7, 7, 7, 7, 7, 7, 21, 21, 21, 21, 21, 25, 25, 25, 25, 25, 7, 7, 7, 7, 7, 7, 21, 21, 21, 21, 25, 25, 25, 25, 25, 25, 7, 7, 7, 7, 7, 7, 23, 30, 30, 30, 30, 30, 10, 10, 10, 10, 9, 3, 3, 3, 3, 3, 23, 30, 30, 30, 30, 30, 10, 10, 10, 10, 4, 4, 4, 4, 4, 4, 32, 32, 30, 30, 30, 30, 10, 10, 10, 10, 4, 4, 4, 4, 4, 4, 32, 32, 32, 30, 30, 30, 30, 10, 10, 11, 11, 4, 4, 4, 4, 4, 32, 32, 32, 32, 30, 30, 30, 10, 10, 11, 11, 4, 4, 4, 4, 4, 32, 32, 32, 32, 32, 30, 30, 10, 10, 11, 11, 4, 4, 4, 4, 4, 38, 32, 32, 32, 32, 32, 30, 30, 11, 11, 11, 34, 4, 4, 4, 4, 38, 38, 38, 38, 38, 32, 32, 32, 11, 34, 34, 34, 34, 4, 4, 4, 19, 19, 19, 19, 19, 19, 19, 18, 8, 22, 22, 22, 22, 22, 22, 22, 19, 19, 19, 19, 18, 18, 18, 16, 15, 8, 8, 8, 22, 22, 22, 22, 19, 18, 18, 18, 18, 18, 16, 16, 15, 8, 8, 8, 8, 8, 8, 22, 18, 18, 18, 18, 18, 18, 16, 16, 15, 15, 8, 8, 8, 8, 8, 8, 18, 18, 18, 18, 18, 16, 16, 15, 15, 15, 8, 8, 8, 8, 8, 8, 18, 18, 18, 18, 16, 16, 16, 15, 15, 15, 15, 8, 8, 8, 8, 8, 18, 18, 18, 18, 16, 16, 16, 15, 15, 15, 15, 8, 8, 8, 8, 8, 18, 18, 18, 16, 16, 16, 16, 15, 15, 15, 15, 15, 8, 8, 8, 8, 73, 67, 69, 1, 86, 65, 76, 69, 2, 0, 0, 0, 40, 0, 0, 0, 180, 0, 0, 0, 7, 0, 0, 0, 3, 3, 5, 4, 7, 5, 5, 4, 4, 5, 4, 4, 5, 5, 5, 5, 5, 3, 3, 6, 4, 4, 5, 7, 7, 5, 5, 3, 5, 3, 5, 4, 4, 4, 3, 4, 6, 4, 3, 5, 1, 22, 4, 2, 5, 0, 3, 37, 36, 6, 1, 4, 9, 37, 2, 0, 22, 39, 34, 11, 9, 3, 7, 8, 22, 1, 6, 5, 2, 36, 29, 28, 25, 15, 8, 5, 7, 15, 22, 5, 10, 35, 12, 3, 4, 11, 30, 35, 9, 4, 34, 39, 10, 13, 36, 37, 9, 14, 14, 26, 29, 36, 12, 12, 33, 24, 26, 13, 16, 8, 7, 25, 17, 17, 25, 21, 18, 15, 15, 25, 16, 19, 16, 21, 20, 23, 38, 32, 39, 18, 28, 24, 19, 21, 20, 18, 16, 25, 8, 39, 4, 0, 5, 24, 33, 31, 30, 32, 38, 19, 20, 28, 27, 26, 14, 33, 23, 21, 16, 17, 15, 7, 27, 28, 13, 14, 24, 24, 28, 26, 6, 26, 27, 24, 20, 6, 36, 13, 31, 35, 10, 32, 23, 23, 33, 35, 30, 30, 19, 38, 23, 14, 31, 23, 24, 4, 39, 11, 10, 30, 31, 9, 2, 37, 12, 13, 29, 6, 12, 36, 2, 3, 32, 19, 23, 34, 4, 22, 19, 11, 0, 0, 128, 191, 113, 53, 84, 60, 158, 101, 71, 61, 158, 9, 245, 59, 158, 9, 245, 59] + } + } + } + + over "link4" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + bool physxRigidBody:disableGravity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:maxDepenetrationVelocity = 0.049999997 + float physxRigidBody:maxLinearVelocity = inf + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "Wrist_Lift" + { + over "Wrist_Lift" ( + prepend apiSchemas = ["PhysxConvexHullCollisionAPI", "PhysxCollisionAPI", "PhysxConvexDecompositionCollisionAPI", "PhysxCookedDataAPI:convexDecomposition"] + ) + { + float physxCollision:contactOffset = -inf ( + displayGroup = "Advanced" + ) + float physxCollision:restOffset = -inf ( + displayGroup = "Advanced" + ) + int physxConvexDecompositionCollision:hullVertexLimit = 20 + int physxConvexDecompositionCollision:maxConvexHulls = 4 + float physxConvexDecompositionCollision:minThickness = 0.000010000001 ( + displayGroup = "Advanced" + ) + int physxConvexHullCollision:hullVertexLimit = 32 + float physxConvexHullCollision:minThickness = 0.000010000001 ( + displayGroup = "Advanced" + ) + uchar[] physxCookedData:convexDecomposition:buffer = [8, 130, 94, 246, 52, 110, 125, 4, 25, 139, 131, 57, 240, 102, 21, 41, 158, 4, 0, 0, 0, 180, 5, 0, 0, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 20, 0, 0, 0, 49, 128, 0, 0, 31, 0, 0, 0, 98, 0, 0, 0, 202, 94, 75, 64, 128, 125, 204, 63, 78, 143, 241, 64, 118, 190, 250, 191, 150, 216, 158, 63, 78, 143, 241, 64, 227, 193, 76, 64, 12, 249, 158, 191, 161, 153, 242, 64, 249, 89, 97, 63, 4, 48, 174, 191, 77, 55, 22, 64, 233, 140, 228, 191, 170, 84, 184, 191, 177, 91, 236, 64, 159, 235, 2, 192, 170, 84, 184, 191, 246, 203, 88, 64, 252, 36, 78, 64, 134, 96, 140, 191, 138, 23, 152, 64, 252, 36, 78, 64, 150, 216, 158, 63, 229, 2, 150, 64, 249, 89, 97, 63, 185, 204, 202, 63, 218, 226, 129, 190, 236, 56, 25, 63, 231, 41, 34, 63, 47, 45, 163, 190, 6, 17, 173, 191, 77, 247, 190, 63, 0, 35, 45, 191, 102, 4, 14, 192, 237, 45, 41, 191, 195, 62, 130, 64, 102, 4, 14, 192, 38, 162, 214, 63, 230, 9, 95, 64, 120, 223, 150, 191, 65, 5, 24, 63, 4, 136, 146, 190, 203, 158, 159, 190, 4, 48, 174, 191, 77, 55, 22, 64, 233, 140, 228, 191, 38, 162, 214, 63, 12, 71, 234, 64, 194, 171, 83, 189, 221, 192, 246, 63, 218, 226, 129, 190, 102, 4, 14, 192, 161, 228, 20, 191, 201, 254, 226, 64, 118, 190, 250, 191, 225, 59, 130, 191, 78, 143, 241, 64, 102, 4, 14, 192, 11, 30, 78, 63, 201, 254, 226, 64, 98, 127, 122, 191, 147, 0, 64, 189, 134, 163, 77, 190, 148, 199, 177, 191, 0, 0, 4, 0, 233, 59, 80, 186, 79, 120, 59, 60, 176, 251, 127, 63, 80, 12, 242, 192, 4, 0, 3, 10, 100, 210, 33, 61, 243, 203, 127, 191, 79, 250, 169, 59, 37, 15, 180, 191, 7, 0, 3, 16, 146, 198, 216, 60, 245, 232, 127, 191, 108, 150, 225, 186, 67, 151, 176, 191, 10, 0, 3, 16, 210, 219, 37, 62, 154, 77, 124, 191, 213, 68, 74, 189, 33, 22, 175, 191, 13, 0, 3, 15, 107, 247, 127, 63, 238, 100, 255, 59, 34, 75, 104, 60, 129, 253, 82, 192, 16, 0, 3, 11, 18, 254, 127, 63, 219, 204, 95, 57, 173, 114, 251, 59, 37, 117, 80, 192, 19, 0, 3, 12, 33, 66, 103, 63, 252, 95, 67, 188, 216, 130, 219, 190, 22, 148, 98, 191, 22, 0, 3, 19, 201, 214, 187, 62, 190, 125, 108, 63, 99, 111, 224, 189, 195, 61, 232, 191, 25, 0, 3, 4, 41, 21, 86, 63, 100, 91, 90, 190, 226, 82, 1, 191, 37, 197, 6, 191, 28, 0, 3, 1, 71, 244, 25, 63, 172, 163, 27, 191, 91, 180, 4, 191, 56, 101, 15, 190, 31, 0, 3, 15, 81, 247, 61, 62, 156, 41, 72, 60, 109, 137, 123, 191, 198, 36, 221, 190, 34, 0, 3, 18, 148, 185, 0, 188, 162, 163, 204, 190, 130, 167, 106, 191, 104, 69, 12, 189, 37, 0, 3, 0, 56, 168, 136, 59, 130, 99, 77, 191, 230, 206, 24, 191, 181, 251, 158, 62, 40, 0, 4, 0, 222, 230, 91, 191, 60, 40, 171, 190, 187, 140, 198, 190, 52, 202, 108, 191, 44, 0, 3, 0, 110, 115, 6, 189, 151, 22, 242, 62, 64, 107, 97, 63, 194, 137, 233, 192, 47, 0, 3, 9, 57, 134, 146, 190, 132, 230, 115, 63, 122, 205, 208, 189, 99, 75, 240, 191, 50, 0, 3, 2, 8, 129, 197, 189, 162, 202, 126, 63, 228, 136, 50, 60, 101, 223, 245, 191, 53, 0, 3, 2, 208, 16, 106, 60, 242, 205, 127, 63, 74, 251, 20, 61, 18, 74, 245, 191, 56, 0, 3, 5, 41, 20, 176, 62, 112, 240, 110, 63, 8, 158, 210, 189, 150, 95, 231, 191, 59, 0, 3, 4, 193, 91, 28, 62, 190, 45, 212, 62, 42, 174, 101, 191, 105, 97, 130, 191, 62, 0, 3, 4, 119, 37, 102, 191, 97, 54, 222, 190, 124, 128, 111, 61, 51, 96, 42, 192, 65, 0, 3, 7, 188, 234, 102, 191, 219, 166, 212, 190, 160, 22, 241, 61, 115, 1, 69, 192, 68, 0, 3, 7, 200, 196, 178, 188, 121, 189, 187, 190, 118, 26, 110, 63, 169, 250, 237, 192, 71, 0, 3, 10, 154, 132, 206, 187, 0, 0, 0, 0, 178, 254, 127, 63, 56, 243, 241, 192, 74, 0, 3, 10, 0, 255, 138, 190, 8, 61, 80, 191, 40, 177, 3, 191, 192, 168, 129, 60, 77, 0, 3, 0, 0, 0, 0, 0, 178, 66, 127, 191, 169, 140, 155, 189, 179, 221, 150, 191, 80, 0, 3, 15, 43, 69, 94, 191, 0, 0, 0, 0, 243, 5, 254, 62, 32, 70, 174, 192, 83, 0, 4, 8, 133, 255, 102, 191, 241, 108, 214, 62, 215, 207, 208, 61, 17, 213, 67, 192, 87, 0, 4, 6, 190, 154, 121, 191, 163, 97, 99, 190, 249, 180, 190, 59, 126, 96, 21, 192, 91, 0, 3, 0, 255, 255, 127, 191, 0, 0, 0, 0, 0, 0, 0, 0, 101, 4, 14, 192, 94, 0, 4, 6, 10, 5, 11, 12, 0, 1, 2, 3, 2, 4, 3, 4, 5, 6, 2, 3, 7, 0, 2, 7, 2, 6, 7, 6, 8, 7, 8, 0, 9, 8, 6, 9, 6, 3, 9, 10, 8, 13, 10, 9, 9, 3, 14, 13, 13, 5, 10, 15, 1, 0, 16, 10, 12, 16, 12, 15, 16, 15, 0, 16, 0, 8, 16, 8, 10, 17, 5, 4, 18, 17, 4, 18, 4, 2, 18, 2, 1, 14, 5, 13, 14, 3, 5, 19, 17, 18, 1, 19, 1, 15, 12, 11, 5, 17, 11, 17, 19, 12, 0, 14, 0, 29, 0, 30, 0, 16, 1, 15, 1, 24, 1, 5, 2, 4, 2, 23, 2, 3, 3, 21, 3, 26, 4, 6, 4, 10, 5, 8, 5, 6, 6, 7, 7, 9, 7, 8, 8, 19, 9, 11, 9, 10, 10, 13, 11, 12, 11, 20, 12, 14, 12, 13, 13, 26, 13, 25, 14, 25, 15, 28, 15, 18, 16, 20, 16, 17, 17, 28, 17, 18, 18, 19, 19, 20, 21, 29, 21, 22, 22, 27, 22, 23, 23, 24, 24, 27, 25, 26, 27, 30, 27, 28, 28, 30, 29, 30, 1, 5, 8, 1, 15, 24, 1, 2, 4, 2, 3, 4, 2, 3, 21, 0, 3, 14, 4, 6, 7, 5, 6, 7, 7, 8, 9, 9, 10, 11, 0, 11, 12, 0, 29, 30, 0, 16, 17, 12, 13, 14, 13, 25, 26, 15, 17, 18, 16, 17, 18, 21, 22, 27, 22, 23, 24, 27, 28, 30, 10, 0, 5, 0, 5, 0, 11, 0, 11, 0, 12, 0, 12, 0, 10, 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 3, 0, 2, 0, 2, 0, 4, 0, 4, 0, 3, 0, 4, 0, 5, 0, 5, 0, 3, 0, 6, 0, 2, 0, 3, 0, 6, 0, 7, 0, 0, 0, 2, 0, 7, 0, 6, 0, 7, 0, 6, 0, 8, 0, 8, 0, 7, 0, 8, 0, 0, 0, 9, 0, 8, 0, 6, 0, 9, 0, 3, 0, 9, 0, 9, 0, 10, 0, 10, 0, 8, 0, 13, 0, 10, 0, 9, 0, 13, 0, 3, 0, 14, 0, 14, 0, 13, 0, 13, 0, 5, 0, 15, 0, 1, 0, 0, 0, 15, 0, 16, 0, 10, 0, 12, 0, 16, 0, 12, 0, 15, 0, 15, 0, 16, 0, 0, 0, 16, 0, 8, 0, 16, 0, 17, 0, 5, 0, 4, 0, 17, 0, 18, 0, 17, 0, 4, 0, 18, 0, 2, 0, 18, 0, 1, 0, 18, 0, 14, 0, 5, 0, 19, 0, 17, 0, 1, 0, 19, 0, 12, 0, 19, 0, 17, 0, 11, 0, 0, 0, 0, 0, 102, 4, 14, 192, 170, 84, 184, 191, 252, 34, 45, 191, 252, 36, 78, 64, 222, 192, 246, 63, 160, 153, 242, 64, 196, 174, 193, 66, 28, 111, 16, 69, 200, 137, 141, 192, 199, 246, 34, 195, 200, 137, 141, 192, 100, 181, 23, 69, 83, 151, 163, 194, 199, 246, 34, 195, 83, 151, 163, 194, 90, 191, 137, 67, 248, 236, 142, 62, 101, 60, 139, 62, 110, 250, 139, 64, 0, 0, 128, 191, 0, 0, 128, 191, 142, 161, 189, 63, 148, 247, 90, 63, 148, 247, 90, 63, 172, 56, 41, 64, 96, 5, 0, 0, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 20, 0, 0, 0, 46, 128, 0, 0, 28, 0, 0, 0, 92, 0, 0, 0, 61, 249, 192, 192, 21, 156, 213, 63, 7, 175, 155, 64, 213, 183, 3, 192, 21, 156, 213, 63, 82, 111, 89, 64, 136, 40, 200, 192, 69, 226, 194, 63, 82, 111, 89, 64, 119, 94, 202, 192, 21, 38, 167, 191, 82, 111, 89, 64, 87, 202, 206, 192, 61, 139, 151, 191, 75, 94, 111, 64, 213, 183, 3, 192, 104, 80, 184, 191, 82, 111, 89, 64, 213, 183, 3, 192, 104, 80, 184, 191, 75, 94, 111, 64, 169, 188, 195, 192, 21, 38, 167, 191, 56, 29, 157, 64, 70, 37, 92, 192, 21, 38, 167, 191, 56, 29, 157, 64, 132, 194, 148, 192, 117, 178, 129, 191, 140, 227, 166, 64, 235, 6, 204, 192, 217, 20, 187, 63, 75, 94, 111, 64, 225, 221, 170, 192, 138, 98, 250, 190, 231, 130, 169, 64, 213, 183, 3, 192, 254, 202, 192, 62, 75, 94, 111, 64, 70, 37, 92, 192, 61, 1, 198, 63, 56, 29, 157, 64, 184, 100, 176, 192, 254, 202, 192, 62, 231, 130, 169, 64, 10, 87, 165, 192, 101, 161, 77, 63, 231, 130, 169, 64, 131, 197, 14, 192, 21, 156, 213, 63, 75, 94, 111, 64, 148, 106, 129, 192, 185, 155, 110, 190, 231, 130, 169, 64, 148, 106, 129, 192, 254, 202, 192, 62, 231, 130, 169, 64, 173, 59, 143, 192, 236, 113, 124, 63, 189, 81, 168, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 231, 130, 169, 192, 0, 0, 5, 1, 49, 16, 14, 189, 4, 183, 126, 63, 96, 63, 192, 189, 73, 218, 180, 191, 5, 0, 3, 6, 101, 166, 108, 191, 141, 247, 184, 60, 245, 237, 194, 190, 248, 188, 144, 192, 8, 0, 3, 6, 153, 178, 0, 189, 61, 223, 127, 191, 100, 12, 102, 59, 149, 6, 194, 191, 11, 0, 4, 1, 158, 101, 12, 191, 99, 51, 85, 191, 28, 234, 153, 61, 178, 244, 153, 192, 15, 0, 3, 1, 0, 0, 0, 0, 41, 223, 56, 191, 74, 21, 49, 63, 138, 219, 138, 192, 18, 0, 3, 1, 0, 0, 0, 0, 122, 85, 126, 191, 56, 70, 233, 61, 240, 164, 237, 191, 21, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 191, 82, 111, 89, 64, 24, 0, 4, 11, 239, 22, 117, 191, 222, 129, 3, 61, 150, 246, 146, 62, 161, 38, 231, 192, 28, 0, 4, 5, 154, 76, 246, 190, 190, 103, 96, 63, 213, 219, 97, 188, 255, 126, 137, 192, 32, 0, 3, 6, 188, 189, 113, 191, 183, 130, 252, 60, 206, 191, 167, 190, 84, 228, 154, 192, 35, 0, 3, 6, 1, 159, 6, 190, 1, 206, 163, 190, 211, 50, 112, 63, 164, 132, 186, 192, 38, 0, 3, 1, 142, 104, 37, 63, 0, 0, 0, 0, 14, 99, 67, 63, 85, 44, 195, 191, 41, 0, 4, 3, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 213, 183, 3, 64, 45, 0, 4, 4, 140, 147, 24, 191, 128, 133, 240, 60, 33, 109, 77, 63, 32, 130, 241, 192, 49, 0, 3, 5, 6, 129, 194, 190, 232, 60, 155, 189, 252, 2, 108, 63, 115, 95, 222, 192, 52, 0, 3, 1, 220, 68, 133, 190, 202, 196, 87, 62, 202, 55, 113, 63, 11, 45, 208, 192, 55, 0, 3, 5, 232, 5, 48, 63, 97, 51, 188, 61, 253, 98, 56, 63, 174, 27, 168, 191, 58, 0, 3, 3, 241, 255, 98, 63, 63, 180, 242, 61, 82, 203, 228, 62, 0, 58, 223, 61, 61, 0, 3, 3, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 22, 156, 213, 191, 64, 0, 3, 5, 197, 241, 51, 61, 147, 234, 124, 63, 151, 240, 23, 62, 102, 195, 6, 192, 67, 0, 3, 3, 133, 34, 10, 63, 0, 0, 0, 0, 158, 136, 87, 63, 255, 196, 17, 192, 70, 0, 4, 3, 99, 58, 199, 60, 243, 255, 251, 189, 116, 250, 125, 63, 91, 241, 165, 192, 74, 0, 3, 2, 206, 196, 58, 62, 17, 54, 119, 190, 35, 0, 116, 63, 246, 194, 139, 192, 77, 0, 3, 2, 7, 173, 1, 61, 231, 149, 170, 61, 76, 251, 126, 63, 84, 190, 165, 192, 80, 0, 3, 3, 188, 145, 87, 62, 16, 122, 84, 62, 142, 143, 116, 63, 87, 49, 137, 192, 83, 0, 3, 3, 253, 126, 28, 60, 39, 80, 4, 63, 97, 36, 91, 63, 211, 6, 159, 192, 86, 0, 3, 5, 122, 216, 103, 189, 254, 225, 204, 62, 113, 41, 106, 63, 16, 178, 174, 192, 89, 0, 3, 5, 17, 18, 15, 14, 11, 0, 1, 2, 3, 4, 2, 3, 5, 6, 7, 3, 7, 4, 8, 9, 7, 8, 7, 6, 5, 3, 2, 1, 10, 4, 7, 0, 10, 0, 2, 10, 2, 4, 11, 7, 9, 12, 13, 8, 6, 12, 6, 5, 1, 14, 0, 7, 14, 7, 11, 14, 15, 0, 16, 13, 12, 16, 12, 1, 16, 1, 0, 16, 0, 13, 17, 8, 13, 18, 17, 11, 9, 17, 9, 8, 19, 15, 18, 19, 18, 13, 19, 13, 0, 19, 0, 15, 0, 21, 0, 24, 0, 16, 0, 15, 0, 22, 1, 19, 1, 7, 1, 9, 2, 4, 2, 10, 2, 7, 3, 7, 3, 13, 3, 6, 3, 4, 4, 8, 5, 23, 5, 11, 5, 6, 6, 12, 7, 13, 8, 10, 8, 14, 8, 9, 9, 10, 11, 15, 11, 22, 12, 17, 12, 21, 12, 13, 13, 18, 14, 16, 14, 15, 16, 27, 17, 20, 17, 18, 18, 19, 19, 20, 20, 26, 21, 23, 21, 25, 22, 23, 24, 27, 24, 25, 25, 26, 26, 27, 1, 8, 9, 1, 7, 13, 1, 2, 7, 2, 3, 4, 2, 4, 8, 3, 7, 13, 3, 6, 12, 3, 4, 5, 5, 6, 12, 5, 11, 22, 8, 9, 10, 0, 11, 15, 12, 13, 17, 12, 17, 20, 0, 14, 15, 0, 16, 24, 17, 18, 19, 0, 21, 22, 0, 21, 24, 24, 25, 26, 17, 0, 18, 0, 18, 0, 15, 0, 15, 0, 14, 0, 14, 0, 11, 0, 11, 0, 17, 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 3, 0, 4, 0, 4, 0, 2, 0, 2, 0, 3, 0, 3, 0, 5, 0, 5, 0, 6, 0, 6, 0, 7, 0, 7, 0, 3, 0, 7, 0, 4, 0, 8, 0, 9, 0, 9, 0, 7, 0, 7, 0, 8, 0, 6, 0, 8, 0, 1, 0, 5, 0, 10, 0, 4, 0, 7, 0, 0, 0, 0, 0, 10, 0, 2, 0, 10, 0, 11, 0, 7, 0, 9, 0, 11, 0, 12, 0, 13, 0, 13, 0, 8, 0, 6, 0, 12, 0, 1, 0, 12, 0, 14, 0, 0, 0, 7, 0, 14, 0, 15, 0, 0, 0, 16, 0, 13, 0, 12, 0, 16, 0, 1, 0, 16, 0, 0, 0, 16, 0, 0, 0, 13, 0, 17, 0, 8, 0, 13, 0, 18, 0, 9, 0, 17, 0, 19, 0, 15, 0, 18, 0, 19, 0, 13, 0, 19, 0, 0, 0, 19, 0, 0, 0, 0, 0, 87, 202, 206, 192, 104, 80, 184, 191, 82, 111, 89, 64, 214, 183, 3, 192, 20, 156, 213, 63, 231, 130, 169, 64, 179, 65, 146, 65, 60, 211, 168, 67, 46, 21, 31, 65, 125, 54, 170, 67, 46, 21, 31, 65, 204, 244, 47, 68, 7, 205, 21, 193, 125, 54, 170, 67, 7, 205, 21, 193, 139, 105, 196, 67, 197, 175, 141, 192, 92, 2, 250, 61, 76, 214, 133, 64, 0, 0, 128, 191, 0, 0, 128, 191, 24, 245, 72, 63, 180, 233, 167, 63, 176, 11, 232, 62, 176, 11, 232, 62, 8, 6, 0, 0, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 20, 0, 0, 0, 52, 128, 0, 0, 34, 0, 0, 0, 104, 0, 0, 0, 179, 223, 153, 63, 161, 119, 162, 191, 6, 234, 124, 191, 179, 223, 153, 63, 19, 188, 186, 63, 111, 146, 131, 191, 221, 108, 158, 63, 93, 37, 180, 63, 216, 14, 44, 64, 221, 108, 158, 63, 226, 239, 150, 191, 61, 19, 67, 64, 102, 96, 222, 191, 210, 67, 198, 63, 20, 78, 77, 64, 60, 211, 217, 191, 193, 97, 188, 63, 137, 37, 157, 191, 118, 202, 214, 191, 252, 194, 165, 191, 30, 8, 152, 191, 175, 193, 211, 191, 96, 255, 173, 191, 71, 208, 88, 64, 108, 17, 195, 191, 42, 125, 74, 62, 80, 141, 110, 64, 245, 43, 94, 189, 30, 135, 185, 191, 80, 141, 110, 64, 90, 254, 112, 63, 27, 119, 134, 191, 130, 12, 175, 191, 186, 122, 67, 63, 84, 52, 175, 63, 130, 12, 175, 191, 56, 64, 95, 191, 170, 158, 224, 63, 20, 28, 89, 191, 216, 78, 252, 190, 42, 125, 74, 62, 80, 141, 110, 64, 69, 162, 40, 191, 47, 105, 195, 191, 111, 146, 131, 191, 112, 47, 137, 63, 189, 81, 137, 63, 130, 12, 175, 191, 245, 43, 94, 189, 223, 77, 162, 190, 80, 141, 110, 64, 195, 212, 129, 191, 47, 105, 195, 191, 71, 208, 88, 64, 64, 219, 100, 63, 218, 52, 203, 63, 214, 165, 126, 190, 64, 219, 100, 63, 96, 255, 173, 191, 207, 81, 22, 64, 251, 252, 127, 63, 131, 198, 60, 186, 111, 235, 28, 188, 15, 254, 154, 191, 0, 0, 4, 4, 129, 251, 127, 191, 106, 58, 14, 188, 136, 219, 0, 188, 42, 105, 217, 191, 4, 0, 3, 2, 38, 229, 127, 191, 101, 47, 231, 188, 77, 178, 156, 59, 95, 167, 218, 191, 7, 0, 3, 2, 213, 155, 109, 191, 249, 60, 99, 187, 201, 140, 190, 62, 189, 67, 51, 192, 10, 0, 3, 15, 222, 61, 91, 190, 105, 159, 67, 190, 22, 60, 117, 63, 48, 252, 118, 192, 13, 0, 3, 15, 109, 101, 137, 189, 44, 126, 117, 188, 251, 100, 127, 191, 210, 144, 168, 191, 16, 0, 3, 16, 189, 180, 104, 189, 43, 207, 136, 187, 147, 149, 127, 191, 239, 122, 168, 191, 19, 0, 3, 16, 196, 65, 111, 61, 137, 13, 127, 63, 137, 25, 129, 61, 237, 108, 210, 191, 22, 0, 3, 14, 62, 101, 203, 61, 234, 43, 108, 63, 126, 235, 190, 190, 109, 157, 236, 191, 25, 0, 3, 17, 47, 138, 205, 185, 91, 82, 77, 63, 226, 230, 24, 191, 194, 8, 245, 191, 28, 0, 3, 9, 127, 80, 161, 190, 176, 233, 114, 63, 62, 0, 156, 188, 164, 95, 250, 191, 31, 0, 3, 19, 83, 196, 48, 62, 228, 212, 249, 62, 152, 10, 91, 63, 230, 215, 76, 192, 34, 0, 3, 6, 0, 0, 0, 0, 171, 187, 183, 62, 230, 242, 110, 63, 88, 52, 99, 192, 37, 0, 3, 10, 217, 4, 33, 187, 30, 68, 19, 191, 93, 102, 81, 191, 152, 61, 220, 191, 40, 0, 3, 4, 30, 103, 0, 62, 165, 228, 81, 191, 67, 1, 15, 191, 55, 36, 223, 191, 43, 0, 3, 4, 163, 126, 111, 63, 208, 136, 169, 187, 57, 217, 180, 190, 240, 117, 189, 191, 46, 0, 3, 4, 186, 69, 79, 63, 209, 162, 75, 189, 252, 180, 21, 191, 16, 157, 206, 191, 49, 0, 3, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 191, 131, 12, 175, 191, 52, 0, 3, 8, 169, 72, 240, 62, 93, 46, 250, 62, 3, 75, 60, 191, 196, 29, 2, 192, 55, 0, 3, 7, 9, 191, 5, 63, 187, 125, 240, 61, 71, 52, 88, 63, 197, 69, 69, 192, 58, 0, 3, 6, 237, 181, 172, 62, 26, 37, 147, 62, 139, 125, 101, 63, 251, 216, 78, 192, 61, 0, 3, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 80, 141, 110, 192, 64, 0, 4, 10, 46, 73, 238, 62, 0, 0, 0, 0, 222, 149, 98, 63, 208, 134, 81, 192, 68, 0, 3, 5, 3, 119, 129, 190, 32, 169, 119, 191, 178, 110, 73, 188, 22, 139, 216, 191, 71, 0, 3, 18, 236, 46, 96, 190, 182, 191, 121, 191, 116, 108, 144, 188, 20, 107, 211, 191, 74, 0, 3, 18, 95, 167, 159, 61, 68, 55, 127, 191, 107, 180, 205, 59, 211, 105, 187, 191, 77, 0, 3, 12, 90, 45, 61, 190, 158, 241, 52, 191, 102, 207, 46, 63, 140, 26, 101, 192, 80, 0, 3, 11, 1, 27, 6, 62, 193, 51, 124, 63, 220, 32, 227, 189, 48, 181, 218, 191, 83, 0, 3, 17, 19, 242, 156, 61, 253, 229, 126, 63, 145, 110, 85, 61, 68, 113, 209, 191, 86, 0, 3, 14, 224, 241, 206, 62, 101, 37, 106, 63, 225, 50, 16, 60, 113, 212, 231, 191, 89, 0, 3, 7, 103, 75, 134, 62, 74, 48, 117, 191, 38, 77, 241, 61, 217, 21, 232, 191, 92, 0, 3, 12, 223, 254, 203, 61, 174, 185, 126, 191, 54, 255, 100, 59, 94, 148, 185, 191, 95, 0, 3, 12, 183, 148, 12, 62, 238, 140, 125, 191, 68, 88, 102, 188, 188, 208, 183, 191, 98, 0, 3, 12, 108, 81, 224, 62, 202, 21, 102, 191, 155, 181, 132, 60, 55, 99, 211, 191, 101, 0, 3, 4, 0, 1, 2, 3, 4, 5, 6, 4, 6, 7, 4, 7, 8, 9, 8, 7, 10, 6, 5, 10, 5, 11, 12, 4, 2, 12, 1, 11, 12, 11, 5, 12, 5, 4, 13, 2, 4, 13, 4, 8, 14, 6, 10, 14, 10, 0, 15, 1, 0, 15, 0, 10, 15, 10, 11, 15, 11, 1, 16, 3, 2, 16, 2, 13, 16, 13, 8, 9, 16, 9, 3, 17, 7, 6, 17, 6, 14, 17, 14, 9, 17, 9, 7, 18, 1, 12, 18, 12, 2, 18, 2, 1, 19, 3, 9, 19, 9, 14, 19, 14, 0, 19, 0, 3, 0, 15, 0, 29, 0, 19, 0, 33, 1, 10, 1, 5, 1, 2, 2, 23, 2, 3, 3, 4, 3, 12, 4, 21, 4, 26, 5, 13, 5, 6, 6, 9, 6, 17, 7, 10, 7, 11, 7, 28, 8, 27, 8, 18, 8, 9, 9, 10, 11, 20, 11, 12, 12, 21, 13, 24, 13, 14, 14, 16, 14, 32, 15, 18, 15, 16, 16, 17, 17, 18, 19, 22, 19, 20, 20, 21, 21, 22, 22, 30, 23, 26, 23, 24, 24, 25, 25, 31, 25, 26, 27, 29, 27, 28, 28, 29, 30, 33, 30, 31, 31, 32, 32, 33, 0, 14, 15, 0, 8, 15, 0, 7, 11, 0, 19, 22, 1, 2, 3, 1, 5, 6, 1, 2, 5, 2, 3, 4, 3, 4, 12, 4, 21, 22, 5, 6, 13, 6, 8, 9, 7, 8, 9, 11, 12, 20, 13, 14, 24, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 31, 32, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 3, 0, 3, 0, 0, 0, 4, 0, 5, 0, 5, 0, 6, 0, 6, 0, 4, 0, 6, 0, 7, 0, 7, 0, 4, 0, 7, 0, 8, 0, 8, 0, 4, 0, 9, 0, 8, 0, 7, 0, 9, 0, 10, 0, 6, 0, 5, 0, 10, 0, 5, 0, 11, 0, 11, 0, 10, 0, 12, 0, 4, 0, 4, 0, 2, 0, 2, 0, 12, 0, 12, 0, 1, 0, 1, 0, 11, 0, 11, 0, 12, 0, 5, 0, 12, 0, 13, 0, 2, 0, 4, 0, 13, 0, 8, 0, 13, 0, 14, 0, 6, 0, 10, 0, 14, 0, 10, 0, 0, 0, 0, 0, 14, 0, 15, 0, 1, 0, 0, 0, 15, 0, 10, 0, 15, 0, 11, 0, 15, 0, 16, 0, 3, 0, 2, 0, 16, 0, 13, 0, 16, 0, 9, 0, 16, 0, 9, 0, 3, 0, 17, 0, 7, 0, 6, 0, 17, 0, 14, 0, 17, 0, 14, 0, 9, 0, 9, 0, 17, 0, 18, 0, 1, 0, 12, 0, 18, 0, 2, 0, 18, 0, 19, 0, 3, 0, 9, 0, 19, 0, 14, 0, 19, 0, 0, 0, 19, 0, 0, 0, 0, 0, 102, 96, 222, 191, 46, 105, 195, 191, 129, 12, 175, 191, 222, 108, 158, 63, 170, 158, 224, 63, 80, 141, 110, 64, 110, 189, 34, 66, 155, 191, 22, 67, 253, 30, 125, 63, 11, 65, 115, 65, 253, 30, 125, 63, 146, 96, 23, 67, 54, 68, 192, 63, 11, 65, 115, 65, 54, 68, 192, 63, 151, 37, 114, 66, 172, 181, 144, 190, 88, 34, 97, 61, 6, 189, 135, 63, 0, 0, 128, 191, 0, 0, 128, 191, 104, 10, 182, 63, 211, 51, 82, 63, 211, 51, 82, 63, 1, 238, 3, 64, 160, 3, 0, 0, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 20, 0, 0, 0, 30, 128, 0, 0, 12, 0, 0, 0, 60, 0, 0, 0, 68, 52, 165, 192, 35, 241, 78, 63, 128, 184, 227, 64, 124, 85, 140, 192, 35, 241, 78, 63, 128, 184, 227, 64, 124, 85, 140, 192, 35, 241, 78, 63, 174, 176, 169, 64, 68, 52, 165, 192, 35, 241, 78, 63, 174, 176, 169, 64, 239, 145, 130, 192, 100, 7, 237, 62, 174, 176, 169, 64, 239, 145, 130, 192, 100, 7, 237, 62, 128, 184, 227, 64, 167, 200, 174, 192, 100, 7, 237, 62, 174, 176, 169, 64, 167, 200, 174, 192, 100, 7, 237, 62, 128, 184, 227, 64, 242, 65, 176, 192, 193, 92, 105, 190, 128, 184, 227, 64, 242, 65, 176, 192, 193, 92, 105, 190, 174, 176, 169, 64, 206, 71, 129, 192, 193, 92, 105, 190, 128, 184, 227, 64, 206, 71, 129, 192, 193, 92, 105, 190, 174, 176, 169, 64, 109, 173, 159, 192, 254, 223, 40, 191, 128, 184, 227, 64, 109, 173, 159, 192, 254, 223, 40, 191, 174, 176, 169, 64, 83, 220, 145, 192, 254, 223, 40, 191, 174, 176, 169, 64, 83, 220, 145, 192, 254, 223, 40, 191, 128, 184, 227, 64, 90, 85, 133, 192, 228, 189, 225, 190, 128, 184, 227, 64, 27, 187, 170, 192, 138, 82, 249, 190, 128, 184, 227, 64, 27, 187, 170, 192, 138, 82, 249, 190, 174, 176, 169, 64, 90, 85, 133, 192, 228, 189, 225, 190, 174, 176, 169, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 128, 184, 227, 192, 0, 0, 10, 2, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 35, 241, 78, 191, 10, 0, 4, 12, 121, 221, 63, 63, 26, 123, 41, 63, 0, 0, 0, 0, 51, 26, 48, 64, 14, 0, 4, 17, 221, 116, 65, 191, 127, 169, 39, 63, 0, 0, 0, 0, 219, 200, 141, 192, 18, 0, 4, 16, 216, 110, 127, 191, 84, 59, 136, 61, 0, 0, 0, 0, 209, 97, 175, 192, 22, 0, 4, 10, 201, 144, 127, 63, 12, 135, 110, 61, 0, 0, 0, 0, 92, 124, 129, 64, 26, 0, 4, 8, 0, 0, 0, 0, 0, 0, 128, 191, 0, 0, 0, 0, 254, 223, 40, 191, 30, 0, 4, 0, 50, 249, 228, 190, 45, 249, 100, 191, 0, 0, 0, 0, 220, 148, 52, 192, 34, 0, 4, 1, 65, 1, 85, 191, 212, 0, 14, 191, 0, 0, 0, 0, 77, 179, 150, 192, 38, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 127, 191, 174, 176, 169, 64, 42, 0, 10, 0, 148, 10, 92, 63, 198, 213, 2, 191, 0, 0, 0, 0, 217, 201, 86, 64, 52, 0, 4, 6, 179, 195, 249, 62, 59, 121, 95, 191, 0, 0, 0, 0, 16, 232, 210, 63, 56, 0, 4, 0, 12, 15, 16, 10, 5, 1, 0, 7, 8, 17, 0, 1, 2, 3, 4, 2, 1, 5, 6, 7, 0, 3, 8, 7, 6, 9, 10, 11, 4, 5, 12, 13, 14, 15, 18, 13, 12, 17, 18, 17, 8, 9, 19, 14, 13, 18, 9, 6, 3, 2, 4, 11, 19, 11, 10, 16, 19, 16, 15, 14, 0, 6, 0, 11, 0, 10, 0, 5, 0, 2, 0, 1, 0, 3, 0, 4, 0, 8, 0, 7, 1, 2, 1, 9, 1, 3, 2, 9, 2, 5, 3, 4, 3, 9, 4, 9, 4, 8, 5, 10, 5, 9, 6, 7, 6, 9, 6, 11, 7, 9, 7, 8, 8, 9, 9, 11, 9, 10, 10, 11, 0, 1, 3, 0, 1, 2, 1, 2, 9, 1, 3, 9, 2, 5, 9, 0, 2, 5, 3, 4, 9, 0, 3, 4, 0, 4, 8, 4, 8, 9, 0, 5, 10, 5, 9, 10, 0, 6, 7, 6, 7, 9, 6, 9, 11, 0, 6, 11, 0, 10, 11, 0, 7, 8, 7, 8, 9, 9, 10, 11, 12, 0, 15, 0, 15, 0, 16, 0, 16, 0, 10, 0, 10, 0, 5, 0, 5, 0, 1, 0, 1, 0, 0, 0, 0, 0, 7, 0, 7, 0, 8, 0, 8, 0, 17, 0, 17, 0, 12, 0, 1, 0, 2, 0, 2, 0, 3, 0, 3, 0, 0, 0, 4, 0, 2, 0, 5, 0, 4, 0, 6, 0, 7, 0, 3, 0, 6, 0, 6, 0, 9, 0, 9, 0, 8, 0, 10, 0, 11, 0, 11, 0, 4, 0, 12, 0, 13, 0, 13, 0, 14, 0, 14, 0, 15, 0, 18, 0, 13, 0, 17, 0, 18, 0, 9, 0, 18, 0, 19, 0, 14, 0, 11, 0, 19, 0, 16, 0, 19, 0, 0, 0, 0, 0, 242, 65, 176, 192, 254, 223, 40, 191, 174, 176, 169, 64, 206, 71, 129, 192, 34, 241, 78, 63, 128, 184, 227, 64, 97, 208, 83, 64, 196, 8, 1, 67, 50, 115, 167, 63, 234, 48, 196, 66, 50, 115, 167, 63, 85, 102, 76, 67, 81, 36, 218, 191, 234, 48, 196, 66, 81, 36, 218, 191, 241, 201, 152, 66, 134, 190, 152, 192, 128, 213, 169, 61, 151, 180, 198, 64, 0, 0, 128, 191, 0, 0, 128, 191, 184, 101, 54, 63, 149, 159, 11, 63, 149, 159, 11, 63, 66, 31, 104, 63] + } + } + } + + over "link5" + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 64 + int physxArticulation:solverVelocityIterationCount = 16 + float physxArticulation:stabilizationThreshold = 1000 + + over "Wrist_Twist" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 100 + float physxRigidBody:maxContactImpulse = 100 + float physxRigidBody:maxDepenetrationVelocity = 1 + float physxRigidBody:maxLinearVelocity = 1 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "Wrist_Twist_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "Wrist_Twist" + { + over "Wrist_Twist" ( + prepend apiSchemas = ["PhysxConvexHullCollisionAPI", "PhysxCookedDataAPI:convexHull"] + ) + { + int physxConvexHullCollision:hullVertexLimit = 32 + float physxConvexHullCollision:minThickness = 0.000010000001 ( + displayGroup = "Advanced" + ) + uchar[] physxCookedData:convexHull:buffer = [9, 185, 224, 142, 177, 112, 106, 100, 110, 238, 56, 39, 38, 169, 24, 94, 138, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 32, 0, 0, 0, 48, 128, 0, 0, 18, 0, 0, 0, 96, 0, 0, 0, 213, 102, 166, 191, 194, 248, 232, 62, 176, 211, 23, 191, 213, 102, 166, 191, 255, 210, 24, 64, 103, 108, 100, 64, 238, 76, 149, 191, 163, 112, 29, 64, 60, 167, 107, 64, 213, 102, 166, 191, 208, 145, 178, 63, 190, 20, 136, 64, 136, 253, 113, 190, 40, 90, 160, 62, 122, 87, 201, 64, 3, 133, 135, 64, 100, 114, 179, 62, 62, 160, 32, 64, 128, 88, 192, 61, 183, 0, 41, 63, 176, 211, 23, 191, 19, 199, 14, 63, 0, 214, 161, 187, 176, 211, 23, 191, 128, 3, 97, 62, 164, 112, 29, 64, 148, 208, 171, 64, 0, 224, 4, 188, 80, 121, 55, 63, 122, 87, 201, 64, 3, 133, 135, 64, 172, 201, 60, 192, 75, 122, 156, 64, 0, 33, 82, 60, 172, 201, 60, 192, 219, 64, 171, 64, 128, 29, 60, 189, 160, 190, 39, 191, 122, 87, 201, 64, 3, 133, 135, 64, 172, 201, 60, 192, 75, 91, 136, 64, 3, 133, 135, 64, 110, 164, 18, 192, 120, 252, 83, 64, 28, 43, 65, 63, 172, 201, 60, 192, 232, 119, 58, 64, 5, 182, 174, 62, 22, 145, 32, 191, 175, 211, 23, 191, 0, 129, 109, 61, 52, 13, 52, 191, 176, 211, 23, 191, 213, 102, 166, 191, 160, 75, 188, 61, 176, 211, 23, 191, 213, 102, 166, 191, 128, 253, 64, 189, 252, 172, 100, 64, 184, 103, 92, 190, 172, 201, 60, 192, 132, 195, 153, 64, 160, 236, 72, 190, 172, 201, 60, 192, 80, 77, 83, 64, 125, 118, 141, 191, 26, 19, 216, 190, 176, 211, 23, 191, 3, 133, 135, 64, 216, 91, 226, 63, 230, 121, 165, 64, 3, 133, 135, 64, 33, 149, 221, 63, 220, 85, 81, 64, 112, 120, 170, 63, 164, 112, 29, 64, 193, 251, 56, 64, 64, 71, 193, 63, 163, 112, 29, 64, 70, 36, 166, 64, 124, 3, 20, 64, 244, 103, 12, 64, 78, 104, 0, 64, 3, 133, 135, 64, 200, 45, 220, 63, 36, 68, 166, 64, 3, 133, 135, 64, 184, 170, 18, 192, 128, 12, 165, 64, 192, 248, 148, 62, 136, 230, 34, 63, 121, 87, 201, 64, 0, 253, 127, 62, 128, 99, 19, 191, 122, 87, 201, 64, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 128, 3, 133, 135, 192, 0, 0, 8, 0, 0, 0, 128, 191, 0, 0, 0, 0, 0, 0, 0, 0, 213, 102, 166, 191, 8, 0, 5, 5, 0, 0, 0, 0, 0, 0, 128, 191, 0, 0, 0, 0, 172, 201, 60, 192, 13, 0, 6, 8, 0, 0, 0, 128, 0, 0, 128, 63, 0, 0, 0, 0, 164, 112, 29, 192, 19, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 191, 176, 211, 23, 191, 23, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 122, 87, 201, 192, 30, 0, 5, 0, 45, 34, 36, 63, 89, 105, 100, 190, 49, 250, 59, 191, 205, 78, 75, 191, 35, 0, 4, 4, 135, 149, 80, 190, 248, 157, 87, 191, 14, 140, 255, 190, 154, 103, 96, 191, 39, 0, 4, 26, 35, 123, 7, 190, 248, 36, 102, 63, 56, 192, 213, 190, 68, 35, 84, 191, 43, 0, 6, 10, 46, 64, 53, 191, 209, 4, 205, 62, 134, 234, 20, 63, 15, 250, 124, 192, 49, 0, 6, 14, 11, 118, 104, 191, 3, 206, 54, 190, 164, 0, 194, 62, 153, 188, 34, 192, 55, 0, 6, 5, 49, 183, 17, 63, 42, 58, 203, 62, 139, 84, 56, 191, 191, 22, 62, 191, 61, 0, 5, 11, 29, 177, 248, 61, 76, 95, 231, 62, 120, 62, 98, 63, 118, 69, 188, 192, 66, 0, 6, 22, 151, 100, 206, 61, 226, 4, 192, 190, 113, 232, 107, 63, 86, 65, 193, 192, 72, 0, 5, 0, 204, 189, 92, 62, 73, 94, 77, 191, 92, 135, 14, 191, 194, 43, 104, 191, 77, 0, 5, 8, 80, 92, 111, 191, 177, 121, 181, 190, 143, 213, 65, 188, 20, 80, 152, 191, 82, 0, 5, 23, 67, 181, 123, 62, 2, 25, 120, 63, 123, 229, 155, 188, 232, 2, 42, 192, 87, 0, 5, 20, 150, 72, 138, 62, 107, 148, 21, 188, 158, 121, 118, 63, 225, 45, 196, 192, 92, 0, 4, 0, 23, 28, 29, 10, 13, 14, 5, 24, 3, 1, 0, 18, 19, 13, 10, 11, 20, 21, 15, 25, 2, 8, 26, 18, 0, 6, 7, 16, 17, 22, 30, 9, 4, 12, 31, 5, 14, 16, 7, 22, 17, 15, 21, 0, 1, 2, 25, 27, 6, 1, 3, 4, 9, 8, 2, 3, 19, 20, 11, 12, 4, 24, 5, 7, 6, 27, 28, 23, 26, 8, 9, 30, 10, 29, 31, 12, 11, 14, 13, 15, 17, 16, 19, 18, 22, 21, 20, 23, 24, 27, 25, 26, 29, 28, 30, 31, 1, 8, 4, 8, 1, 4, 8, 9, 1, 9, 3, 9, 3, 8, 9, 10, 1, 10, 5, 9, 5, 10, 6, 11, 0, 6, 0, 11, 4, 11, 8, 11, 4, 6, 9, 12, 3, 12, 5, 12, 2, 13, 0, 2, 0, 13, 10, 13, 2, 10, 5, 13, 0, 14, 2, 14, 6, 14, 7, 14, 2, 7, 4, 14, 4, 7, 1, 15, 4, 15, 10, 15, 2, 15, 7, 15, 0, 16, 12, 16, 0, 12, 11, 16, 3, 16, 8, 16, 0, 17, 12, 17, 13, 17, 5, 17, 1, 4, 8, 1, 8, 9, 3, 8, 9, 1, 9, 10, 5, 9, 10, 0, 6, 11, 4, 8, 11, 4, 6, 11, 3, 9, 12, 5, 9, 12, 0, 2, 13, 2, 10, 13, 5, 10, 13, 0, 2, 14, 0, 6, 14, 2, 7, 14, 4, 6, 14, 4, 7, 14, 1, 4, 15, 1, 10, 15, 2, 10, 15, 2, 7, 15, 4, 7, 15, 0, 12, 16, 0, 11, 16, 3, 8, 16, 3, 12, 16, 8, 11, 16, 0, 12, 17, 0, 13, 17, 5, 12, 17, 5, 13, 17, 1, 0, 0, 0, 0, 0, 6, 0, 0, 0, 18, 0, 1, 0, 2, 0, 3, 0, 1, 0, 2, 0, 8, 0, 25, 0, 2, 0, 3, 0, 4, 0, 19, 0, 3, 0, 9, 0, 4, 0, 4, 0, 12, 0, 7, 0, 5, 0, 14, 0, 5, 0, 5, 0, 24, 0, 6, 0, 7, 0, 27, 0, 6, 0, 7, 0, 16, 0, 9, 0, 8, 0, 8, 0, 26, 0, 30, 0, 9, 0, 10, 0, 11, 0, 10, 0, 13, 0, 29, 0, 10, 0, 11, 0, 12, 0, 11, 0, 20, 0, 12, 0, 31, 0, 13, 0, 14, 0, 15, 0, 13, 0, 14, 0, 16, 0, 17, 0, 15, 0, 21, 0, 15, 0, 16, 0, 17, 0, 17, 0, 22, 0, 18, 0, 19, 0, 22, 0, 18, 0, 19, 0, 20, 0, 20, 0, 21, 0, 21, 0, 22, 0, 24, 0, 23, 0, 23, 0, 26, 0, 23, 0, 28, 0, 27, 0, 24, 0, 26, 0, 25, 0, 25, 0, 27, 0, 28, 0, 29, 0, 30, 0, 28, 0, 29, 0, 31, 0, 31, 0, 30, 0, 0, 0, 0, 0, 212, 102, 166, 191, 172, 201, 60, 192, 176, 211, 23, 191, 3, 133, 135, 64, 164, 112, 29, 64, 122, 87, 201, 64, 223, 163, 220, 66, 209, 207, 206, 68, 136, 196, 48, 66, 157, 49, 6, 196, 136, 196, 48, 66, 118, 80, 233, 68, 9, 205, 138, 66, 157, 49, 6, 196, 9, 205, 138, 66, 91, 103, 21, 68, 134, 56, 167, 63, 220, 169, 31, 190, 26, 83, 85, 64, 0, 0, 128, 191, 0, 0, 128, 191, 102, 200, 22, 64, 231, 27, 174, 63, 231, 27, 174, 63, 90, 216, 203, 63] + float physxMeshCollision:concavity = 0.001 + } + } + } + + over "Finger_Left_01" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "Finger_Left_01_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "Finger_Left_01" + { + over "Finger_Left_01" ( + prepend apiSchemas = ["PhysxConvexHullCollisionAPI", "PhysxCookedDataAPI:convexHull"] + ) + { + int physxConvexHullCollision:hullVertexLimit = 32 + float physxConvexHullCollision:minThickness = 0.000010000001 ( + displayGroup = "Advanced" + ) + uchar[] physxCookedData:convexHull:buffer = [9, 99, 155, 187, 86, 113, 87, 30, 90, 165, 111, 131, 5, 154, 86, 147, 194, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 31, 0, 0, 0, 47, 128, 0, 0, 18, 0, 0, 0, 94, 0, 0, 0, 217, 16, 117, 63, 37, 181, 9, 64, 140, 195, 36, 64, 116, 190, 182, 189, 194, 226, 145, 191, 202, 156, 97, 63, 127, 233, 131, 190, 201, 61, 191, 191, 114, 219, 141, 190, 126, 233, 131, 190, 214, 51, 138, 191, 65, 116, 106, 63, 16, 81, 116, 63, 150, 88, 231, 63, 190, 82, 15, 64, 216, 112, 117, 63, 205, 12, 6, 64, 94, 167, 28, 64, 176, 52, 85, 189, 228, 183, 97, 63, 247, 160, 50, 191, 253, 233, 230, 190, 29, 173, 10, 64, 255, 84, 37, 64, 118, 243, 194, 190, 2, 154, 20, 64, 25, 138, 23, 64, 160, 40, 116, 190, 97, 237, 109, 63, 224, 80, 44, 191, 112, 23, 236, 190, 50, 210, 1, 64, 247, 144, 49, 64, 230, 207, 135, 190, 0, 16, 118, 191, 0, 40, 128, 63, 175, 135, 113, 63, 213, 57, 251, 63, 78, 121, 53, 64, 45, 130, 112, 63, 222, 86, 221, 63, 236, 156, 43, 64, 52, 248, 132, 190, 146, 112, 244, 63, 174, 200, 59, 64, 0, 124, 53, 189, 224, 107, 128, 191, 128, 128, 123, 63, 216, 160, 120, 190, 192, 236, 244, 190, 24, 10, 173, 63, 108, 135, 220, 189, 66, 165, 44, 191, 196, 169, 180, 191, 78, 24, 108, 189, 64, 247, 1, 63, 138, 2, 120, 191, 164, 146, 146, 190, 60, 212, 10, 63, 238, 176, 116, 191, 160, 212, 128, 60, 64, 213, 183, 188, 9, 106, 149, 191, 64, 38, 230, 190, 184, 186, 253, 63, 182, 177, 18, 64, 126, 222, 236, 190, 245, 174, 247, 63, 78, 112, 45, 64, 243, 43, 139, 190, 141, 235, 176, 191, 128, 194, 220, 190, 206, 54, 126, 190, 73, 54, 44, 191, 252, 148, 180, 191, 196, 223, 148, 190, 114, 101, 4, 63, 146, 25, 119, 191, 16, 14, 113, 63, 247, 62, 209, 63, 13, 224, 30, 64, 176, 26, 115, 63, 238, 89, 217, 63, 121, 101, 17, 64, 168, 44, 182, 188, 178, 98, 143, 191, 14, 74, 76, 191, 36, 2, 229, 189, 160, 238, 194, 191, 85, 31, 118, 190, 234, 209, 59, 189, 134, 61, 176, 191, 48, 211, 111, 62, 221, 190, 127, 63, 174, 254, 15, 189, 26, 122, 224, 60, 105, 132, 115, 191, 0, 0, 7, 10, 221, 190, 127, 191, 174, 254, 15, 61, 26, 122, 224, 188, 66, 113, 233, 190, 7, 0, 4, 4, 153, 41, 75, 188, 98, 72, 79, 191, 252, 50, 22, 191, 108, 16, 176, 191, 11, 0, 6, 12, 154, 41, 75, 60, 98, 72, 79, 63, 252, 50, 22, 63, 74, 238, 80, 192, 17, 0, 6, 17, 50, 93, 47, 61, 128, 246, 21, 63, 55, 48, 79, 191, 142, 28, 138, 191, 23, 0, 4, 16, 4, 93, 47, 189, 128, 246, 21, 191, 54, 48, 79, 63, 196, 62, 177, 191, 27, 0, 5, 6, 211, 196, 120, 63, 231, 134, 214, 189, 199, 141, 88, 190, 98, 107, 135, 190, 32, 0, 5, 10, 50, 181, 52, 62, 211, 229, 101, 63, 37, 82, 206, 190, 198, 42, 136, 191, 37, 0, 5, 1, 54, 100, 93, 63, 59, 93, 230, 190, 23, 53, 100, 62, 56, 205, 33, 191, 42, 0, 5, 8, 18, 47, 133, 190, 84, 128, 105, 191, 201, 55, 162, 62, 177, 198, 171, 191, 47, 0, 5, 0, 217, 243, 126, 191, 147, 212, 174, 189, 145, 234, 242, 60, 220, 119, 192, 190, 52, 0, 5, 5, 26, 253, 97, 63, 112, 172, 136, 62, 255, 240, 197, 190, 253, 24, 235, 190, 57, 0, 5, 22, 173, 76, 118, 191, 216, 135, 105, 62, 198, 12, 25, 190, 27, 190, 10, 191, 62, 0, 6, 13, 176, 207, 51, 191, 204, 14, 203, 190, 69, 80, 23, 63, 42, 100, 148, 191, 68, 0, 5, 18, 38, 242, 188, 61, 157, 173, 12, 191, 5, 147, 84, 63, 153, 119, 174, 191, 73, 0, 5, 19, 0, 0, 0, 0, 123, 140, 179, 62, 33, 190, 111, 191, 24, 235, 138, 191, 78, 0, 6, 14, 16, 191, 127, 191, 71, 9, 172, 188, 149, 185, 32, 189, 213, 142, 162, 190, 84, 0, 5, 0, 171, 135, 117, 63, 160, 224, 142, 190, 9, 90, 66, 189, 136, 132, 168, 190, 89, 0, 5, 7, 0, 12, 13, 26, 27, 4, 5, 10, 7, 21, 22, 17, 28, 29, 2, 23, 24, 12, 0, 8, 7, 10, 14, 9, 6, 18, 19, 1, 15, 16, 11, 3, 4, 27, 28, 17, 20, 8, 0, 5, 6, 9, 26, 13, 15, 1, 30, 2, 29, 30, 1, 3, 23, 2, 3, 11, 22, 5, 4, 20, 18, 6, 21, 7, 8, 9, 19, 25, 10, 22, 11, 16, 14, 13, 12, 14, 16, 15, 17, 24, 25, 19, 18, 20, 22, 21, 25, 24, 23, 27, 26, 30, 29, 28, 0, 7, 3, 7, 0, 3, 5, 9, 5, 8, 8, 9, 9, 10, 2, 10, 2, 9, 5, 10, 0, 11, 6, 11, 0, 6, 7, 11, 4, 7, 4, 11, 3, 12, 1, 3, 1, 12, 7, 12, 4, 12, 3, 13, 1, 13, 5, 13, 10, 13, 0, 14, 3, 14, 8, 14, 0, 8, 13, 14, 5, 14, 6, 15, 2, 15, 2, 6, 4, 15, 11, 15, 12, 15, 1, 16, 12, 16, 10, 16, 2, 16, 15, 16, 0, 17, 8, 17, 6, 17, 2, 17, 9, 17, 0, 3, 7, 5, 8, 9, 2, 9, 10, 5, 9, 10, 0, 6, 11, 0, 7, 11, 4, 7, 11, 1, 3, 12, 3, 7, 12, 4, 7, 12, 1, 3, 13, 5, 10, 13, 0, 3, 14, 0, 8, 14, 3, 13, 14, 5, 8, 14, 5, 13, 14, 2, 6, 15, 4, 11, 15, 4, 12, 15, 6, 11, 15, 1, 12, 16, 1, 10, 13, 2, 10, 16, 2, 15, 16, 12, 15, 16, 0, 8, 17, 0, 6, 17, 2, 6, 17, 2, 9, 17, 8, 9, 17, 5, 0, 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 3, 0, 1, 0, 1, 0, 15, 0, 1, 0, 30, 0, 3, 0, 2, 0, 2, 0, 23, 0, 29, 0, 2, 0, 11, 0, 3, 0, 4, 0, 5, 0, 20, 0, 4, 0, 27, 0, 4, 0, 5, 0, 6, 0, 9, 0, 6, 0, 6, 0, 18, 0, 8, 0, 7, 0, 10, 0, 7, 0, 7, 0, 21, 0, 9, 0, 8, 0, 19, 0, 9, 0, 10, 0, 14, 0, 22, 0, 10, 0, 16, 0, 11, 0, 11, 0, 22, 0, 12, 0, 13, 0, 14, 0, 12, 0, 13, 0, 15, 0, 13, 0, 26, 0, 16, 0, 14, 0, 15, 0, 16, 0, 17, 0, 20, 0, 24, 0, 17, 0, 17, 0, 28, 0, 18, 0, 19, 0, 20, 0, 18, 0, 19, 0, 25, 0, 21, 0, 22, 0, 25, 0, 21, 0, 22, 0, 23, 0, 23, 0, 24, 0, 24, 0, 25, 0, 26, 0, 27, 0, 30, 0, 26, 0, 27, 0, 28, 0, 28, 0, 29, 0, 29, 0, 30, 0, 0, 0, 0, 0, 127, 222, 236, 190, 160, 238, 194, 191, 196, 169, 180, 191, 216, 112, 117, 63, 2, 154, 20, 64, 174, 200, 59, 64, 139, 248, 176, 64, 217, 49, 136, 65, 106, 87, 30, 191, 125, 216, 84, 191, 106, 87, 30, 191, 244, 137, 50, 65, 54, 221, 218, 192, 125, 216, 84, 191, 54, 221, 218, 192, 213, 102, 217, 64, 252, 20, 108, 61, 201, 56, 43, 63, 174, 125, 129, 63, 0, 0, 128, 191, 0, 0, 128, 191, 25, 142, 219, 62, 55, 133, 125, 62, 55, 133, 125, 62, 243, 162, 94, 63] + float physxMeshCollision:concavity = 0.001 + } + } + } + + over "Finger_Right_01" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "Finger_Right_01_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "Finger_Right_01" + { + over "Finger_Right_01" ( + prepend apiSchemas = ["PhysxConvexHullCollisionAPI", "PhysxCookedDataAPI:convexHull"] + ) + { + int physxConvexHullCollision:hullVertexLimit = 32 + float physxConvexHullCollision:minThickness = 0.000010000001 ( + displayGroup = "Advanced" + ) + uchar[] physxCookedData:convexHull:buffer = [9, 72, 230, 232, 55, 58, 161, 149, 127, 190, 24, 19, 32, 109, 203, 24, 68, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 32, 0, 0, 0, 48, 128, 0, 0, 18, 0, 0, 0, 96, 0, 0, 0, 1, 184, 5, 63, 88, 196, 16, 62, 96, 234, 107, 62, 21, 170, 2, 63, 248, 62, 178, 190, 0, 95, 201, 61, 72, 213, 245, 189, 77, 42, 235, 191, 92, 27, 65, 64, 0, 180, 120, 189, 133, 158, 11, 192, 62, 241, 34, 64, 195, 113, 4, 63, 140, 91, 132, 190, 56, 135, 17, 190, 184, 252, 217, 189, 10, 146, 226, 191, 246, 252, 61, 64, 224, 182, 165, 189, 18, 123, 145, 63, 46, 100, 92, 63, 194, 113, 4, 63, 76, 135, 17, 62, 120, 91, 132, 62, 249, 115, 178, 190, 232, 104, 140, 63, 116, 246, 99, 63, 199, 93, 142, 190, 235, 146, 234, 191, 181, 236, 64, 64, 38, 220, 145, 190, 10, 137, 13, 192, 164, 118, 31, 64, 6, 17, 177, 190, 144, 154, 148, 63, 238, 19, 88, 63, 229, 214, 161, 190, 179, 126, 191, 63, 0, 130, 134, 190, 120, 37, 185, 189, 226, 164, 148, 63, 198, 207, 87, 63, 189, 112, 138, 190, 146, 180, 15, 192, 124, 134, 28, 64, 88, 252, 190, 189, 205, 64, 14, 192, 102, 48, 31, 64, 178, 42, 11, 62, 97, 88, 58, 191, 22, 84, 82, 191, 15, 6, 145, 190, 110, 184, 94, 191, 190, 156, 55, 191, 204, 213, 19, 62, 53, 208, 59, 191, 60, 208, 77, 191, 80, 202, 83, 61, 168, 30, 222, 190, 160, 108, 132, 191, 221, 17, 8, 63, 78, 195, 115, 62, 64, 175, 250, 189, 106, 5, 8, 63, 24, 4, 69, 62, 203, 98, 62, 190, 200, 22, 171, 189, 192, 31, 191, 63, 163, 155, 129, 190, 48, 35, 171, 189, 50, 230, 59, 63, 255, 100, 166, 191, 138, 103, 159, 189, 231, 166, 190, 63, 72, 190, 118, 190, 252, 1, 94, 60, 58, 203, 11, 63, 13, 241, 161, 191, 109, 55, 163, 190, 132, 226, 97, 63, 62, 246, 141, 191, 165, 89, 186, 190, 184, 31, 167, 190, 184, 18, 16, 191, 238, 181, 144, 190, 105, 11, 65, 63, 93, 85, 164, 191, 61, 217, 155, 190, 160, 43, 66, 191, 226, 75, 76, 191, 239, 181, 144, 190, 213, 3, 1, 191, 191, 142, 123, 191, 60, 4, 184, 190, 244, 21, 46, 191, 128, 8, 1, 191, 253, 152, 40, 59, 121, 70, 22, 63, 53, 64, 79, 63, 122, 149, 174, 191, 0, 0, 7, 19, 101, 217, 127, 63, 80, 90, 239, 188, 190, 136, 147, 60, 13, 165, 5, 191, 7, 0, 5, 12, 170, 48, 12, 189, 233, 29, 79, 191, 188, 52, 22, 63, 118, 178, 80, 192, 12, 0, 6, 12, 111, 48, 12, 61, 233, 29, 79, 63, 188, 52, 22, 191, 72, 70, 173, 191, 18, 0, 5, 14, 0, 145, 40, 187, 122, 70, 22, 191, 54, 64, 79, 191, 118, 201, 139, 191, 23, 0, 5, 6, 99, 217, 127, 191, 75, 90, 239, 60, 194, 136, 147, 188, 249, 139, 186, 190, 28, 0, 5, 4, 251, 96, 94, 63, 232, 155, 241, 190, 247, 101, 26, 190, 219, 195, 23, 191, 33, 0, 5, 11, 31, 87, 98, 63, 50, 114, 227, 62, 249, 56, 20, 62, 72, 215, 14, 191, 38, 0, 6, 14, 53, 91, 123, 63, 76, 19, 146, 189, 196, 228, 51, 62, 177, 18, 11, 191, 44, 0, 6, 26, 14, 129, 117, 191, 60, 201, 133, 190, 167, 184, 224, 189, 26, 226, 19, 191, 50, 0, 5, 0, 146, 214, 99, 63, 124, 21, 146, 189, 183, 149, 230, 190, 234, 250, 10, 191, 55, 0, 6, 9, 231, 57, 95, 63, 114, 142, 144, 62, 55, 195, 204, 62, 37, 58, 24, 191, 61, 0, 3, 29, 236, 239, 127, 191, 171, 189, 28, 188, 141, 174, 163, 60, 90, 37, 182, 190, 64, 0, 5, 21, 0, 0, 0, 0, 54, 4, 117, 63, 22, 93, 148, 62, 228, 136, 173, 191, 69, 0, 5, 14, 164, 178, 83, 62, 50, 157, 101, 191, 186, 31, 200, 190, 89, 69, 128, 191, 74, 0, 5, 11, 250, 40, 208, 189, 191, 50, 109, 190, 154, 172, 119, 191, 198, 78, 140, 191, 79, 0, 5, 2, 37, 23, 95, 63, 185, 74, 203, 62, 34, 113, 147, 190, 85, 204, 23, 191, 84, 0, 6, 10, 183, 233, 123, 191, 131, 189, 41, 189, 187, 60, 49, 190, 144, 44, 240, 190, 90, 0, 6, 0, 9, 2, 5, 6, 13, 11, 8, 20, 0, 1, 4, 21, 2, 9, 10, 14, 15, 3, 26, 12, 22, 23, 28, 19, 16, 17, 29, 30, 8, 11, 12, 26, 27, 18, 4, 1, 3, 15, 13, 6, 7, 0, 20, 24, 1, 0, 7, 5, 2, 3, 29, 17, 14, 10, 31, 21, 4, 18, 16, 19, 25, 6, 5, 7, 8, 27, 31, 10, 9, 12, 11, 13, 24, 22, 15, 14, 17, 16, 18, 28, 23, 25, 19, 30, 20, 21, 25, 23, 22, 24, 27, 26, 28, 30, 29, 31, 1, 8, 7, 8, 1, 7, 6, 8, 1, 6, 2, 8, 0, 8, 0, 2, 2, 6, 6, 10, 1, 10, 0, 11, 8, 11, 7, 11, 0, 7, 0, 12, 0, 5, 5, 12, 2, 12, 2, 9, 9, 12, 5, 13, 0, 13, 3, 13, 3, 5, 7, 13, 2, 14, 9, 14, 6, 14, 4, 14, 10, 14, 4, 10, 4, 9, 10, 15, 4, 15, 1, 16, 7, 16, 10, 16, 3, 16, 13, 16, 15, 16, 3, 15, 5, 17, 3, 17, 12, 17, 15, 17, 4, 17, 9, 17, 1, 7, 8, 1, 6, 8, 0, 2, 8, 2, 6, 8, 1, 6, 10, 0, 8, 11, 0, 7, 11, 7, 8, 11, 0, 5, 12, 0, 2, 12, 2, 9, 12, 0, 5, 13, 3, 5, 13, 0, 7, 13, 2, 9, 14, 2, 6, 14, 4, 10, 14, 4, 9, 14, 6, 10, 14, 4, 10, 15, 1, 7, 16, 1, 10, 16, 3, 13, 16, 3, 15, 16, 7, 13, 16, 10, 15, 16, 3, 5, 17, 5, 12, 17, 3, 15, 17, 4, 9, 17, 4, 15, 17, 9, 12, 17, 0, 0, 1, 0, 7, 0, 0, 0, 20, 0, 0, 0, 1, 0, 3, 0, 1, 0, 4, 0, 3, 0, 2, 0, 2, 0, 5, 0, 9, 0, 2, 0, 15, 0, 3, 0, 18, 0, 4, 0, 4, 0, 21, 0, 5, 0, 6, 0, 7, 0, 5, 0, 6, 0, 7, 0, 6, 0, 13, 0, 8, 0, 9, 0, 11, 0, 8, 0, 27, 0, 8, 0, 9, 0, 10, 0, 10, 0, 14, 0, 10, 0, 31, 0, 11, 0, 12, 0, 13, 0, 11, 0, 12, 0, 22, 0, 26, 0, 12, 0, 24, 0, 13, 0, 14, 0, 15, 0, 17, 0, 14, 0, 15, 0, 18, 0, 16, 0, 17, 0, 18, 0, 16, 0, 19, 0, 16, 0, 17, 0, 29, 0, 19, 0, 25, 0, 30, 0, 19, 0, 21, 0, 20, 0, 20, 0, 24, 0, 25, 0, 21, 0, 22, 0, 23, 0, 24, 0, 22, 0, 23, 0, 25, 0, 23, 0, 28, 0, 26, 0, 27, 0, 28, 0, 26, 0, 27, 0, 31, 0, 30, 0, 28, 0, 29, 0, 30, 0, 31, 0, 29, 0, 0, 0, 0, 0, 166, 89, 186, 190, 146, 180, 15, 192, 0, 101, 166, 191, 221, 17, 8, 63, 180, 126, 191, 63, 92, 27, 65, 64, 121, 204, 129, 64, 112, 117, 223, 64, 57, 169, 146, 189, 58, 72, 72, 62, 57, 169, 146, 189, 157, 28, 142, 64, 80, 242, 14, 64, 58, 72, 72, 62, 80, 242, 14, 64, 128, 80, 54, 64, 108, 33, 72, 189, 214, 101, 139, 190, 191, 35, 3, 63, 0, 0, 128, 191, 0, 0, 128, 191, 198, 143, 150, 62, 133, 218, 45, 62, 133, 218, 45, 62, 186, 134, 72, 63] + float physxMeshCollision:concavity = 0.001 + } + } + } + + over "Finger_Left_03" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "Finger_Left_03" ( + prepend apiSchemas = ["PhysxConvexHullCollisionAPI", "PhysxCookedDataAPI:convexHull"] + ) + { + int physxConvexHullCollision:hullVertexLimit = 32 + float physxConvexHullCollision:minThickness = 0.000010000001 ( + displayGroup = "Advanced" + ) + uchar[] physxCookedData:convexHull:buffer = [9, 5, 239, 172, 107, 51, 4, 135, 51, 15, 172, 224, 79, 218, 221, 183, 110, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 32, 0, 0, 0, 48, 128, 0, 0, 18, 0, 0, 0, 96, 0, 0, 0, 224, 160, 57, 190, 72, 133, 204, 62, 64, 246, 21, 61, 196, 98, 214, 62, 72, 133, 204, 62, 64, 246, 21, 61, 224, 160, 57, 190, 116, 37, 30, 191, 161, 232, 162, 64, 223, 160, 57, 190, 216, 40, 208, 190, 228, 117, 154, 64, 195, 98, 214, 62, 216, 40, 208, 190, 228, 117, 154, 64, 196, 98, 214, 62, 116, 37, 30, 191, 161, 232, 162, 64, 223, 160, 57, 190, 88, 140, 141, 191, 64, 98, 212, 63, 195, 98, 214, 62, 88, 140, 141, 191, 64, 98, 212, 63, 224, 160, 57, 190, 132, 6, 155, 191, 100, 31, 70, 64, 196, 98, 214, 62, 132, 6, 155, 191, 100, 31, 70, 64, 223, 160, 57, 190, 11, 23, 170, 190, 28, 218, 115, 190, 195, 98, 214, 62, 11, 23, 170, 190, 28, 218, 115, 190, 224, 160, 57, 190, 223, 114, 156, 62, 102, 230, 140, 190, 224, 160, 57, 190, 208, 150, 250, 61, 80, 133, 204, 190, 196, 98, 214, 62, 208, 150, 250, 61, 80, 133, 204, 190, 196, 98, 214, 62, 223, 114, 156, 62, 102, 230, 140, 190, 223, 160, 57, 190, 230, 171, 141, 191, 160, 232, 162, 64, 224, 160, 57, 190, 112, 14, 146, 191, 194, 108, 160, 64, 195, 98, 214, 62, 230, 171, 141, 191, 160, 232, 162, 64, 196, 98, 214, 62, 112, 14, 146, 191, 194, 108, 160, 64, 224, 160, 57, 190, 136, 244, 134, 191, 136, 118, 179, 63, 224, 160, 57, 190, 88, 162, 139, 191, 204, 27, 198, 63, 196, 98, 214, 62, 88, 162, 139, 191, 204, 27, 198, 63, 196, 98, 214, 62, 136, 244, 134, 191, 136, 118, 179, 63, 224, 160, 57, 190, 112, 85, 152, 189, 80, 133, 204, 190, 224, 160, 57, 190, 200, 239, 89, 190, 36, 249, 176, 190, 196, 98, 214, 62, 200, 239, 89, 190, 36, 249, 176, 190, 196, 98, 214, 62, 112, 85, 152, 189, 80, 133, 204, 190, 224, 160, 57, 190, 72, 133, 204, 62, 224, 103, 74, 189, 223, 160, 57, 190, 89, 241, 191, 62, 16, 48, 21, 190, 196, 98, 214, 62, 72, 133, 204, 62, 224, 103, 74, 189, 195, 98, 214, 62, 89, 241, 191, 62, 16, 48, 21, 190, 0, 0, 128, 191, 0, 0, 0, 0, 0, 0, 0, 0, 224, 160, 57, 190, 0, 0, 16, 1, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 128, 196, 98, 214, 190, 16, 0, 16, 0, 0, 0, 0, 128, 0, 0, 128, 63, 0, 0, 0, 0, 72, 133, 204, 190, 32, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 191, 80, 133, 204, 190, 36, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 161, 232, 162, 192, 40, 0, 4, 13, 0, 0, 0, 0, 135, 115, 124, 63, 27, 233, 41, 62, 192, 203, 204, 190, 44, 0, 4, 21, 0, 0, 0, 0, 17, 76, 106, 191, 23, 79, 206, 190, 209, 204, 204, 190, 48, 0, 4, 3, 0, 0, 0, 0, 194, 186, 125, 191, 10, 20, 8, 190, 124, 35, 96, 191, 52, 0, 4, 0, 0, 0, 0, 0, 186, 231, 71, 63, 32, 235, 31, 63, 167, 168, 44, 192, 56, 0, 4, 10, 0, 0, 0, 0, 126, 178, 97, 63, 81, 162, 241, 190, 41, 109, 204, 190, 60, 0, 4, 16, 0, 0, 0, 0, 164, 80, 127, 191, 34, 184, 149, 189, 66, 73, 123, 191, 64, 0, 4, 0, 0, 0, 0, 0, 75, 212, 127, 191, 32, 146, 21, 61, 56, 100, 169, 191, 68, 0, 4, 28, 0, 0, 0, 0, 222, 81, 43, 191, 150, 57, 62, 191, 39, 109, 204, 190, 72, 0, 4, 2, 0, 0, 0, 0, 152, 178, 15, 63, 146, 221, 83, 191, 41, 109, 204, 190, 76, 0, 4, 16, 0, 0, 0, 0, 125, 52, 106, 191, 20, 186, 206, 62, 178, 91, 68, 192, 80, 0, 4, 29, 0, 0, 0, 0, 37, 77, 120, 191, 157, 60, 121, 190, 186, 110, 46, 191, 84, 0, 4, 3, 0, 0, 0, 0, 97, 118, 185, 190, 87, 157, 110, 191, 41, 109, 204, 190, 88, 0, 4, 2, 0, 0, 0, 0, 88, 13, 120, 63, 28, 45, 125, 190, 41, 109, 204, 190, 92, 0, 4, 17, 16, 2, 3, 0, 28, 29, 12, 13, 24, 25, 10, 20, 21, 6, 8, 17, 30, 1, 4, 5, 18, 19, 9, 7, 22, 23, 11, 26, 27, 14, 15, 31, 1, 30, 28, 0, 24, 13, 14, 27, 18, 5, 2, 16, 0, 3, 4, 1, 20, 10, 11, 23, 6, 21, 22, 7, 3, 2, 5, 4, 12, 29, 31, 15, 8, 6, 7, 9, 17, 8, 9, 19, 10, 25, 26, 11, 13, 12, 15, 14, 16, 17, 19, 18, 21, 20, 23, 22, 25, 24, 27, 26, 29, 28, 30, 31, 2, 5, 0, 5, 0, 2, 1, 5, 1, 2, 0, 8, 4, 8, 0, 4, 5, 8, 1, 8, 1, 4, 7, 10, 0, 10, 0, 7, 1, 10, 1, 7, 10, 11, 0, 11, 1, 11, 6, 12, 0, 6, 0, 12, 1, 6, 1, 12, 0, 13, 9, 13, 0, 9, 3, 13, 0, 3, 1, 13, 1, 3, 1, 9, 0, 14, 4, 14, 11, 14, 1, 14, 0, 15, 6, 15, 7, 15, 1, 15, 0, 16, 3, 16, 12, 16, 1, 16, 0, 17, 2, 17, 9, 17, 1, 17, 0, 2, 5, 1, 2, 5, 0, 4, 8, 0, 5, 8, 1, 5, 8, 1, 4, 8, 0, 7, 10, 1, 7, 10, 0, 10, 11, 1, 10, 11, 0, 6, 12, 1, 6, 12, 0, 9, 13, 0, 3, 13, 1, 3, 13, 1, 9, 13, 0, 4, 14, 0, 11, 14, 1, 4, 14, 1, 11, 14, 0, 6, 15, 0, 7, 15, 1, 7, 15, 1, 6, 15, 0, 3, 16, 0, 12, 16, 1, 12, 16, 1, 3, 16, 0, 2, 17, 0, 9, 17, 1, 2, 17, 1, 9, 17, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 28, 0, 1, 0, 4, 0, 30, 0, 1, 0, 2, 0, 3, 0, 5, 0, 2, 0, 16, 0, 2, 0, 3, 0, 4, 0, 4, 0, 5, 0, 5, 0, 18, 0, 7, 0, 6, 0, 6, 0, 8, 0, 21, 0, 6, 0, 9, 0, 7, 0, 7, 0, 22, 0, 9, 0, 8, 0, 8, 0, 17, 0, 19, 0, 9, 0, 10, 0, 11, 0, 10, 0, 20, 0, 25, 0, 10, 0, 23, 0, 11, 0, 11, 0, 26, 0, 12, 0, 13, 0, 15, 0, 12, 0, 29, 0, 12, 0, 13, 0, 14, 0, 13, 0, 24, 0, 14, 0, 15, 0, 27, 0, 14, 0, 15, 0, 31, 0, 17, 0, 16, 0, 16, 0, 18, 0, 19, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 23, 0, 20, 0, 21, 0, 22, 0, 22, 0, 23, 0, 24, 0, 25, 0, 27, 0, 24, 0, 25, 0, 26, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 28, 0, 29, 0, 31, 0, 31, 0, 30, 0, 0, 0, 0, 0, 224, 160, 57, 190, 132, 6, 155, 191, 80, 133, 204, 190, 196, 98, 214, 62, 72, 133, 204, 62, 161, 232, 162, 64, 37, 67, 81, 64, 189, 240, 202, 65, 99, 152, 71, 62, 62, 246, 99, 191, 99, 152, 71, 62, 140, 188, 193, 65, 26, 230, 153, 64, 62, 246, 99, 191, 26, 230, 153, 64, 227, 43, 184, 63, 167, 36, 243, 61, 233, 138, 0, 191, 170, 207, 18, 64, 0, 0, 128, 191, 0, 0, 128, 191, 154, 153, 153, 62, 173, 92, 49, 62, 173, 92, 49, 62, 122, 89, 224, 63] + float physxMeshCollision:concavity = 0.001 + } + } + + over "Finger_Right_03" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "Finger_Right_03" ( + prepend apiSchemas = ["PhysxConvexHullCollisionAPI", "PhysxCookedDataAPI:convexHull"] + ) + { + int physxConvexHullCollision:hullVertexLimit = 32 + float physxConvexHullCollision:minThickness = 0.000010000001 ( + displayGroup = "Advanced" + ) + uchar[] physxCookedData:convexHull:buffer = [9, 77, 42, 214, 185, 151, 137, 200, 16, 34, 120, 135, 66, 246, 227, 11, 97, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 32, 0, 0, 0, 50, 128, 0, 0, 20, 0, 0, 0, 100, 0, 0, 0, 24, 39, 62, 190, 124, 69, 254, 62, 73, 154, 162, 64, 110, 105, 190, 62, 210, 206, 253, 62, 73, 154, 162, 64, 236, 0, 75, 63, 136, 38, 144, 190, 176, 111, 204, 190, 236, 0, 75, 63, 100, 26, 85, 190, 64, 240, 108, 60, 85, 140, 16, 63, 147, 106, 201, 190, 175, 111, 204, 190, 78, 146, 200, 62, 148, 106, 201, 190, 177, 125, 159, 61, 230, 149, 201, 62, 208, 129, 228, 62, 190, 181, 153, 64, 196, 58, 83, 190, 224, 199, 229, 62, 140, 251, 153, 64, 235, 0, 75, 63, 248, 151, 51, 62, 0, 61, 194, 61, 236, 0, 75, 63, 128, 81, 34, 62, 48, 88, 229, 62, 77, 107, 185, 62, 159, 145, 158, 63, 73, 154, 162, 64, 226, 149, 201, 62, 159, 145, 158, 63, 156, 107, 69, 64, 40, 28, 222, 62, 250, 218, 130, 63, 73, 154, 162, 64, 235, 0, 75, 63, 24, 53, 143, 61, 175, 111, 204, 190, 236, 0, 75, 63, 151, 178, 23, 62, 208, 163, 96, 190, 112, 34, 202, 62, 101, 39, 134, 62, 176, 111, 204, 190, 92, 161, 197, 62, 210, 72, 141, 63, 195, 122, 195, 63, 228, 149, 201, 62, 62, 103, 141, 63, 161, 217, 196, 63, 136, 21, 27, 191, 40, 5, 130, 61, 176, 111, 204, 190, 184, 58, 83, 190, 134, 52, 132, 62, 176, 111, 204, 190, 174, 58, 83, 190, 60, 103, 141, 63, 157, 217, 196, 63, 136, 21, 27, 191, 64, 42, 249, 61, 144, 249, 152, 62, 135, 21, 27, 191, 16, 58, 11, 62, 224, 7, 111, 190, 214, 208, 64, 190, 158, 145, 158, 63, 72, 154, 162, 64, 174, 58, 83, 190, 159, 145, 158, 63, 156, 107, 69, 64, 153, 3, 128, 190, 90, 254, 134, 63, 73, 154, 162, 64, 144, 101, 21, 191, 64, 208, 75, 62, 0, 53, 233, 189, 135, 21, 27, 191, 122, 28, 90, 190, 0, 183, 203, 189, 135, 21, 27, 191, 232, 177, 14, 190, 175, 111, 204, 190, 200, 217, 3, 62, 148, 106, 201, 190, 176, 111, 204, 190, 168, 58, 83, 190, 148, 106, 201, 190, 198, 76, 148, 61, 95, 121, 24, 191, 131, 99, 113, 190, 128, 92, 174, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 191, 176, 111, 204, 190, 0, 0, 8, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 128, 236, 0, 75, 191, 8, 0, 6, 18, 0, 0, 0, 0, 0, 0, 128, 191, 0, 0, 0, 0, 148, 106, 201, 190, 14, 0, 4, 10, 0, 0, 0, 128, 0, 0, 128, 63, 0, 0, 0, 0, 159, 145, 158, 191, 18, 0, 4, 5, 0, 0, 128, 191, 0, 0, 0, 0, 0, 0, 0, 0, 136, 21, 27, 191, 22, 0, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 73, 154, 162, 192, 27, 0, 6, 2, 13, 139, 209, 186, 39, 13, 124, 191, 149, 38, 51, 62, 252, 246, 204, 190, 33, 0, 6, 16, 93, 33, 190, 187, 215, 147, 106, 63, 86, 2, 205, 190, 227, 156, 203, 190, 39, 0, 4, 1, 86, 37, 125, 191, 113, 121, 233, 189, 56, 50, 196, 61, 192, 33, 29, 191, 43, 0, 6, 13, 158, 4, 125, 63, 216, 249, 237, 189, 45, 70, 201, 61, 132, 49, 79, 191, 49, 0, 5, 18, 133, 32, 101, 63, 22, 129, 227, 62, 110, 203, 29, 189, 116, 181, 72, 191, 54, 0, 4, 31, 129, 70, 101, 191, 244, 232, 226, 62, 236, 97, 29, 189, 163, 128, 29, 191, 58, 0, 3, 2, 72, 106, 222, 62, 24, 9, 99, 191, 227, 46, 33, 62, 57, 4, 8, 191, 61, 0, 5, 20, 241, 133, 206, 190, 25, 163, 102, 191, 24, 238, 35, 62, 110, 255, 229, 190, 66, 0, 3, 17, 0, 0, 0, 0, 19, 11, 127, 63, 59, 229, 176, 189, 113, 190, 119, 191, 69, 0, 5, 5, 155, 1, 115, 63, 198, 220, 160, 62, 243, 241, 117, 60, 176, 43, 79, 191, 74, 0, 5, 27, 133, 38, 207, 62, 32, 179, 86, 63, 181, 173, 186, 190, 111, 106, 6, 191, 79, 0, 5, 0, 36, 203, 208, 190, 137, 48, 86, 63, 236, 48, 187, 190, 32, 109, 228, 190, 84, 0, 5, 1, 119, 184, 114, 191, 152, 179, 162, 62, 188, 230, 11, 60, 6, 151, 29, 191, 89, 0, 6, 2, 186, 2, 163, 190, 30, 172, 107, 191, 228, 144, 103, 190, 28, 170, 210, 190, 95, 0, 5, 10, 28, 18, 19, 15, 13, 2, 4, 29, 2, 13, 14, 8, 9, 3, 29, 4, 5, 30, 23, 10, 11, 24, 27, 21, 22, 18, 28, 10, 23, 25, 0, 1, 12, 30, 5, 6, 1, 0, 7, 15, 19, 20, 16, 21, 27, 31, 7, 0, 25, 3, 9, 12, 1, 6, 8, 14, 17, 11, 24, 20, 26, 2, 3, 6, 5, 4, 30, 7, 31, 24, 11, 17, 16, 20, 9, 8, 11, 10, 12, 14, 13, 15, 16, 17, 18, 22, 26, 20, 19, 22, 21, 25, 23, 24, 26, 27, 28, 29, 30, 31, 5, 6, 6, 8, 5, 8, 6, 9, 5, 9, 1, 12, 0, 12, 0, 1, 9, 12, 1, 9, 2, 12, 0, 2, 6, 12, 2, 6, 6, 13, 8, 13, 1, 15, 10, 15, 1, 10, 9, 15, 3, 15, 5, 15, 3, 5, 10, 14, 3, 14, 1, 16, 0, 16, 10, 16, 7, 16, 0, 7, 14, 16, 7, 14, 0, 17, 4, 17, 0, 4, 7, 17, 11, 14, 11, 17, 4, 18, 8, 18, 4, 8, 17, 18, 3, 18, 5, 18, 11, 18, 4, 19, 8, 19, 0, 19, 2, 19, 13, 19, 5, 6, 8, 5, 6, 9, 0, 1, 12, 1, 9, 12, 0, 2, 12, 2, 6, 12, 6, 9, 12, 6, 8, 13, 1, 10, 15, 1, 9, 15, 3, 5, 15, 3, 10, 14, 5, 9, 15, 0, 1, 16, 1, 10, 16, 0, 7, 16, 7, 14, 16, 10, 14, 16, 0, 4, 17, 0, 7, 17, 7, 11, 14, 4, 8, 18, 4, 17, 18, 3, 5, 18, 3, 11, 14, 5, 8, 18, 11, 17, 18, 4, 8, 19, 0, 4, 19, 0, 2, 19, 2, 6, 13, 8, 13, 19, 0, 0, 1, 0, 0, 0, 7, 0, 25, 0, 0, 0, 6, 0, 1, 0, 1, 0, 12, 0, 3, 0, 2, 0, 2, 0, 4, 0, 13, 0, 2, 0, 6, 0, 3, 0, 9, 0, 3, 0, 4, 0, 5, 0, 4, 0, 29, 0, 5, 0, 6, 0, 5, 0, 30, 0, 7, 0, 30, 0, 31, 0, 7, 0, 8, 0, 9, 0, 11, 0, 8, 0, 14, 0, 8, 0, 9, 0, 12, 0, 10, 0, 11, 0, 12, 0, 10, 0, 23, 0, 10, 0, 17, 0, 11, 0, 11, 0, 24, 0, 13, 0, 14, 0, 15, 0, 13, 0, 14, 0, 17, 0, 16, 0, 15, 0, 19, 0, 15, 0, 17, 0, 16, 0, 20, 0, 16, 0, 18, 0, 19, 0, 22, 0, 18, 0, 28, 0, 18, 0, 19, 0, 20, 0, 24, 0, 20, 0, 20, 0, 26, 0, 21, 0, 22, 0, 25, 0, 21, 0, 27, 0, 21, 0, 22, 0, 26, 0, 24, 0, 23, 0, 23, 0, 25, 0, 26, 0, 24, 0, 28, 0, 27, 0, 27, 0, 31, 0, 29, 0, 28, 0, 30, 0, 29, 0, 31, 0, 30, 0, 0, 0, 0, 0, 136, 21, 27, 191, 148, 106, 201, 190, 176, 111, 204, 190, 236, 0, 75, 63, 159, 145, 158, 63, 73, 154, 162, 64, 115, 124, 166, 64, 116, 225, 9, 66, 99, 122, 101, 190, 21, 147, 127, 191, 99, 122, 101, 190, 80, 112, 4, 66, 72, 206, 216, 192, 21, 147, 127, 191, 72, 206, 216, 192, 108, 122, 23, 64, 160, 205, 196, 61, 85, 219, 235, 62, 84, 221, 2, 64, 0, 0, 128, 191, 0, 0, 128, 191, 47, 26, 254, 62, 191, 180, 146, 62, 191, 180, 146, 62, 34, 93, 156, 63] + float physxMeshCollision:concavity = 0.001 + } + } + + over "Finger_Left_02" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "Finger_Left_02" + { + over "Finger_Left_02" ( + prepend apiSchemas = ["PhysxConvexHullCollisionAPI", "PhysxCookedDataAPI:convexHull"] + ) + { + int physxConvexHullCollision:hullVertexLimit = 32 + float physxConvexHullCollision:minThickness = 0.000010000001 ( + displayGroup = "Advanced" + ) + uchar[] physxCookedData:convexHull:buffer = [9, 118, 205, 209, 40, 180, 154, 239, 18, 248, 114, 66, 185, 9, 117, 91, 110, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 32, 0, 0, 0, 50, 128, 0, 0, 20, 0, 0, 0, 100, 0, 0, 0, 60, 119, 19, 191, 26, 68, 236, 63, 191, 16, 49, 64, 174, 13, 19, 191, 2, 166, 223, 63, 45, 160, 45, 64, 63, 86, 135, 63, 138, 154, 6, 64, 46, 65, 35, 64, 252, 138, 131, 63, 43, 87, 162, 190, 214, 158, 36, 190, 1, 119, 134, 63, 162, 204, 252, 63, 204, 79, 19, 64, 33, 249, 131, 63, 219, 75, 162, 190, 48, 149, 190, 189, 208, 155, 143, 61, 146, 182, 0, 64, 42, 148, 14, 64, 32, 79, 116, 63, 107, 103, 7, 64, 39, 204, 34, 64, 172, 100, 30, 63, 239, 215, 0, 64, 118, 163, 15, 64, 157, 160, 220, 190, 59, 99, 133, 190, 102, 55, 27, 62, 153, 48, 169, 190, 157, 87, 188, 63, 203, 97, 36, 64, 221, 243, 108, 63, 107, 30, 160, 190, 32, 235, 150, 188, 38, 225, 20, 191, 39, 47, 245, 63, 12, 218, 45, 64, 86, 87, 245, 190, 27, 14, 1, 64, 97, 235, 18, 64, 0, 235, 210, 190, 80, 111, 3, 64, 137, 191, 21, 64, 208, 231, 131, 190, 210, 57, 8, 64, 62, 160, 35, 64, 230, 176, 128, 63, 152, 82, 19, 189, 169, 9, 186, 190, 170, 94, 128, 63, 120, 173, 241, 61, 151, 253, 142, 190, 204, 54, 195, 190, 230, 244, 119, 62, 160, 90, 53, 190, 214, 54, 195, 190, 96, 169, 48, 189, 154, 95, 170, 190, 134, 180, 92, 63, 46, 10, 41, 62, 24, 12, 128, 190, 140, 171, 136, 63, 2, 99, 252, 63, 225, 80, 41, 64, 98, 238, 137, 63, 2, 205, 203, 63, 67, 197, 32, 64, 188, 155, 78, 63, 67, 59, 230, 63, 34, 159, 49, 64, 86, 180, 92, 63, 242, 143, 205, 63, 164, 250, 42, 64, 4, 18, 23, 191, 3, 107, 246, 63, 252, 94, 35, 64, 50, 183, 25, 191, 128, 245, 45, 63, 16, 201, 160, 63, 1, 104, 17, 191, 248, 32, 194, 189, 44, 133, 149, 190, 162, 142, 21, 191, 169, 237, 130, 190, 224, 186, 51, 190, 245, 2, 24, 191, 91, 113, 130, 190, 192, 97, 13, 60, 27, 255, 14, 191, 72, 1, 51, 62, 208, 246, 23, 190, 169, 228, 18, 191, 230, 214, 250, 63, 159, 22, 18, 64, 176, 113, 127, 63, 120, 138, 49, 61, 242, 35, 75, 189, 197, 132, 130, 191, 0, 0, 8, 26, 176, 113, 127, 191, 137, 138, 49, 189, 6, 36, 75, 61, 49, 202, 33, 191, 8, 0, 5, 3, 184, 106, 131, 189, 96, 65, 79, 63, 177, 94, 21, 191, 104, 206, 165, 190, 13, 0, 4, 24, 170, 122, 115, 188, 55, 220, 21, 191, 112, 132, 79, 191, 111, 239, 153, 190, 17, 0, 5, 23, 162, 122, 115, 60, 56, 220, 21, 63, 111, 132, 79, 63, 84, 35, 84, 192, 22, 0, 7, 3, 62, 1, 117, 60, 15, 218, 77, 63, 173, 35, 24, 191, 103, 169, 150, 190, 29, 0, 4, 10, 4, 176, 247, 190, 22, 166, 51, 191, 104, 226, 5, 63, 200, 236, 240, 190, 33, 0, 5, 17, 218, 226, 178, 188, 96, 45, 245, 190, 159, 171, 96, 63, 96, 67, 199, 191, 38, 0, 5, 16, 46, 208, 157, 190, 183, 75, 233, 62, 92, 200, 85, 191, 172, 98, 192, 190, 43, 0, 4, 24, 197, 177, 13, 62, 97, 11, 97, 63, 77, 140, 233, 190, 228, 227, 84, 191, 47, 0, 4, 9, 50, 221, 190, 190, 197, 49, 63, 63, 33, 249, 12, 191, 182, 76, 215, 190, 51, 0, 4, 22, 82, 232, 27, 189, 46, 208, 127, 191, 157, 101, 79, 59, 8, 239, 141, 190, 55, 0, 6, 7, 41, 114, 23, 62, 247, 47, 77, 63, 127, 83, 20, 191, 158, 55, 207, 190, 61, 0, 4, 9, 145, 243, 182, 62, 76, 161, 65, 191, 13, 69, 12, 63, 198, 163, 14, 191, 65, 0, 4, 13, 238, 12, 212, 59, 64, 157, 113, 63, 30, 47, 169, 190, 178, 202, 148, 191, 69, 0, 5, 9, 118, 255, 41, 61, 4, 30, 80, 191, 7, 178, 20, 63, 28, 92, 144, 190, 74, 0, 4, 6, 24, 92, 5, 191, 153, 159, 89, 63, 2, 60, 158, 61, 53, 9, 9, 192, 78, 0, 6, 3, 112, 226, 178, 188, 97, 45, 245, 62, 157, 171, 96, 191, 13, 54, 143, 190, 84, 0, 5, 24, 82, 68, 16, 63, 126, 170, 133, 190, 217, 163, 72, 63, 40, 68, 10, 192, 89, 0, 4, 27, 211, 37, 127, 191, 220, 60, 128, 61, 204, 221, 85, 189, 101, 78, 19, 191, 93, 0, 7, 22, 2, 21, 22, 5, 3, 16, 17, 4, 0, 12, 25, 26, 1, 6, 18, 13, 14, 27, 19, 16, 3, 28, 21, 2, 7, 15, 12, 0, 23, 18, 6, 8, 20, 1, 26, 29, 9, 10, 0, 1, 10, 24, 23, 30, 18, 19, 27, 2, 4, 8, 7, 31, 13, 18, 30, 28, 3, 5, 11, 9, 29, 4, 17, 20, 8, 5, 22, 24, 11, 15, 7, 8, 6, 14, 10, 9, 11, 24, 25, 12, 15, 14, 13, 31, 17, 16, 19, 18, 20, 22, 21, 23, 24, 26, 25, 31, 30, 27, 28, 29, 1, 7, 1, 4, 4, 7, 6, 7, 1, 6, 0, 9, 4, 9, 0, 4, 0, 11, 0, 3, 3, 11, 9, 12, 0, 12, 11, 13, 0, 13, 5, 14, 2, 14, 2, 5, 9, 14, 4, 14, 5, 12, 6, 15, 11, 15, 6, 11, 7, 15, 13, 15, 4, 16, 1, 16, 2, 16, 2, 10, 10, 16, 14, 16, 0, 17, 3, 17, 12, 17, 8, 17, 5, 17, 8, 10, 3, 8, 0, 18, 4, 18, 13, 18, 7, 18, 1, 19, 16, 19, 6, 19, 3, 19, 8, 19, 11, 19, 10, 19, 1, 4, 7, 1, 6, 7, 0, 4, 9, 0, 3, 11, 0, 9, 12, 0, 11, 13, 2, 5, 14, 4, 9, 14, 5, 9, 12, 6, 11, 15, 6, 7, 15, 11, 13, 15, 1, 4, 16, 2, 10, 16, 2, 14, 16, 4, 14, 16, 0, 3, 17, 0, 12, 17, 2, 5, 8, 3, 8, 17, 5, 12, 17, 0, 4, 18, 0, 13, 18, 4, 7, 18, 7, 13, 15, 1, 16, 19, 1, 6, 19, 3, 8, 19, 3, 11, 19, 6, 11, 19, 8, 10, 19, 10, 16, 19, 1, 0, 0, 0, 0, 0, 12, 0, 0, 0, 23, 0, 10, 0, 1, 0, 26, 0, 1, 0, 4, 0, 2, 0, 2, 0, 7, 0, 2, 0, 21, 0, 5, 0, 3, 0, 3, 0, 16, 0, 3, 0, 28, 0, 4, 0, 8, 0, 17, 0, 4, 0, 5, 0, 11, 0, 22, 0, 5, 0, 6, 0, 8, 0, 14, 0, 6, 0, 6, 0, 18, 0, 8, 0, 7, 0, 7, 0, 15, 0, 8, 0, 20, 0, 9, 0, 10, 0, 11, 0, 9, 0, 29, 0, 9, 0, 10, 0, 24, 0, 24, 0, 11, 0, 15, 0, 12, 0, 12, 0, 25, 0, 13, 0, 14, 0, 18, 0, 13, 0, 31, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 19, 0, 16, 0, 17, 0, 20, 0, 18, 0, 19, 0, 20, 0, 18, 0, 30, 0, 18, 0, 27, 0, 19, 0, 21, 0, 22, 0, 23, 0, 21, 0, 22, 0, 24, 0, 24, 0, 23, 0, 25, 0, 26, 0, 31, 0, 25, 0, 26, 0, 29, 0, 28, 0, 27, 0, 27, 0, 30, 0, 29, 0, 28, 0, 30, 0, 31, 0, 0, 0, 0, 0, 50, 183, 25, 191, 42, 87, 162, 190, 168, 9, 186, 190, 98, 238, 137, 63, 210, 57, 8, 64, 34, 159, 49, 64, 10, 22, 78, 64, 73, 227, 45, 65, 144, 18, 40, 191, 230, 40, 98, 191, 144, 18, 40, 191, 180, 11, 252, 64, 69, 57, 163, 192, 230, 40, 98, 191, 69, 57, 163, 192, 184, 199, 148, 64, 65, 119, 99, 62, 227, 225, 102, 63, 66, 56, 157, 63, 0, 0, 128, 191, 0, 0, 128, 191, 126, 193, 149, 62, 83, 236, 44, 62, 83, 236, 44, 62, 90, 162, 130, 62] + float physxMeshCollision:concavity = 0.001 + } + } + } + + over "Finger_Right_02" ( + prepend apiSchemas = ["PhysxRigidBodyAPI"] + ) + { + float physxRigidBody:maxAngularVelocity = 10 + float physxRigidBody:maxContactImpulse = 10 + float physxRigidBody:maxDepenetrationVelocity = 0.099999994 + float physxRigidBody:maxLinearVelocity = 0.099999994 ( + allowedTokens = [] + ) + float physxRigidBody:sleepThreshold = 5e-7 + float physxRigidBody:stabilizationThreshold = 1e-9 + + over "Finger_Right_02" + { + over "Finger_Right_02" ( + prepend apiSchemas = ["PhysxConvexHullCollisionAPI", "PhysxCookedDataAPI:convexHull"] + ) + { + int physxConvexHullCollision:hullVertexLimit = 32 + float physxConvexHullCollision:minThickness = 0.000010000001 ( + displayGroup = "Advanced" + ) + uchar[] physxCookedData:convexHull:buffer = [9, 168, 88, 174, 20, 67, 58, 174, 120, 176, 63, 27, 135, 15, 75, 148, 177, 78, 88, 83, 1, 67, 86, 88, 77, 14, 0, 0, 0, 0, 0, 0, 0, 73, 67, 69, 1, 67, 76, 72, 76, 9, 0, 0, 0, 31, 0, 0, 0, 47, 128, 0, 0, 18, 0, 0, 0, 94, 0, 0, 0, 62, 210, 129, 63, 120, 7, 128, 190, 122, 218, 95, 62, 129, 230, 17, 191, 99, 137, 251, 63, 102, 148, 43, 192, 248, 45, 28, 191, 0, 164, 161, 188, 128, 123, 143, 190, 111, 84, 5, 191, 251, 45, 163, 63, 88, 134, 170, 191, 156, 15, 7, 191, 169, 69, 8, 64, 61, 240, 35, 192, 63, 155, 27, 191, 213, 174, 159, 190, 188, 217, 14, 62, 218, 120, 17, 63, 202, 225, 114, 190, 128, 145, 95, 190, 126, 224, 13, 191, 158, 10, 172, 190, 8, 88, 252, 61, 144, 41, 69, 63, 155, 100, 179, 190, 189, 95, 16, 62, 217, 54, 195, 190, 44, 192, 122, 190, 156, 120, 49, 190, 88, 193, 137, 63, 94, 192, 239, 63, 111, 152, 45, 192, 192, 21, 30, 63, 61, 15, 216, 63, 160, 197, 54, 192, 25, 220, 131, 63, 249, 54, 67, 190, 248, 94, 9, 190, 171, 141, 138, 63, 191, 7, 199, 63, 199, 112, 36, 192, 104, 35, 47, 63, 25, 149, 123, 190, 24, 40, 70, 190, 246, 220, 77, 63, 155, 133, 202, 63, 85, 240, 45, 192, 208, 191, 88, 63, 207, 255, 144, 190, 80, 153, 156, 189, 2, 173, 128, 63, 164, 210, 14, 190, 251, 180, 152, 62, 57, 84, 127, 63, 204, 64, 121, 62, 152, 218, 8, 62, 214, 224, 136, 63, 128, 150, 250, 63, 95, 177, 41, 192, 7, 141, 134, 63, 8, 136, 244, 63, 148, 255, 16, 192, 248, 44, 43, 63, 0, 24, 7, 64, 144, 41, 35, 192, 44, 254, 192, 189, 236, 36, 102, 62, 56, 198, 49, 62, 174, 215, 4, 191, 108, 233, 62, 62, 24, 98, 55, 62, 179, 231, 57, 63, 0, 102, 136, 188, 3, 19, 195, 62, 54, 198, 9, 191, 80, 140, 43, 189, 185, 253, 171, 62, 237, 220, 77, 63, 132, 137, 26, 62, 244, 193, 137, 62, 136, 201, 15, 191, 247, 122, 238, 63, 35, 72, 48, 192, 116, 70, 14, 191, 150, 139, 200, 63, 58, 223, 39, 192, 128, 10, 119, 189, 217, 114, 218, 63, 210, 212, 54, 192, 213, 38, 7, 191, 220, 92, 198, 63, 146, 254, 39, 192, 106, 105, 127, 63, 21, 107, 48, 61, 2, 54, 86, 61, 150, 155, 129, 191, 0, 0, 8, 27, 108, 105, 127, 191, 46, 107, 48, 189, 13, 54, 86, 189, 73, 202, 31, 191, 8, 0, 4, 20, 130, 49, 134, 61, 132, 71, 79, 191, 75, 76, 21, 191, 184, 149, 182, 190, 12, 0, 3, 22, 132, 49, 134, 189, 131, 71, 79, 63, 77, 76, 21, 63, 16, 44, 148, 190, 15, 0, 3, 15, 237, 28, 141, 60, 15, 213, 21, 63, 138, 134, 79, 191, 122, 18, 84, 192, 18, 0, 8, 0, 14, 29, 141, 188, 10, 213, 21, 191, 142, 134, 79, 63, 153, 184, 156, 190, 26, 0, 7, 19, 100, 150, 224, 59, 105, 54, 82, 63, 51, 24, 18, 63, 220, 226, 144, 190, 33, 0, 7, 6, 192, 128, 175, 188, 237, 173, 78, 191, 76, 246, 22, 191, 218, 186, 157, 190, 40, 0, 6, 26, 113, 74, 244, 190, 14, 246, 56, 191, 222, 21, 0, 191, 209, 31, 228, 190, 46, 0, 6, 20, 12, 80, 211, 62, 212, 172, 102, 191, 59, 86, 8, 190, 252, 99, 29, 191, 52, 0, 4, 4, 185, 154, 122, 191, 229, 25, 41, 62, 221, 22, 246, 61, 229, 110, 15, 191, 56, 0, 7, 13, 14, 127, 208, 187, 145, 109, 116, 191, 111, 41, 152, 190, 79, 82, 147, 190, 63, 0, 6, 4, 226, 147, 209, 62, 150, 37, 188, 190, 215, 201, 85, 191, 47, 29, 1, 192, 69, 0, 4, 25, 153, 161, 100, 62, 69, 101, 75, 191, 206, 144, 16, 191, 188, 25, 234, 190, 73, 0, 5, 3, 215, 147, 209, 62, 163, 37, 188, 62, 213, 201, 85, 63, 21, 252, 27, 191, 78, 0, 4, 27, 240, 237, 195, 62, 94, 39, 106, 63, 86, 82, 5, 62, 123, 101, 237, 191, 82, 0, 3, 7, 93, 124, 38, 189, 83, 108, 17, 63, 129, 109, 82, 63, 128, 100, 140, 190, 85, 0, 5, 11, 237, 129, 153, 190, 113, 136, 200, 190, 4, 177, 94, 191, 107, 215, 234, 191, 90, 0, 4, 24, 17, 0, 12, 13, 10, 19, 20, 18, 1, 27, 28, 2, 14, 6, 15, 22, 3, 23, 27, 1, 4, 21, 19, 10, 11, 29, 0, 17, 24, 25, 5, 7, 8, 3, 22, 26, 18, 20, 21, 4, 29, 11, 15, 6, 9, 30, 2, 28, 30, 9, 7, 5, 12, 0, 8, 16, 1, 2, 5, 25, 23, 3, 4, 6, 14, 16, 8, 7, 9, 10, 13, 15, 11, 13, 12, 16, 14, 15, 17, 18, 26, 24, 20, 19, 21, 22, 23, 25, 24, 26, 28, 27, 29, 30, 5, 9, 0, 9, 0, 5, 1, 10, 4, 10, 1, 4, 8, 10, 1, 8, 6, 10, 3, 6, 3, 10, 4, 6, 5, 8, 5, 10, 7, 11, 2, 11, 2, 7, 5, 11, 8, 11, 9, 11, 7, 8, 4, 12, 0, 12, 0, 4, 7, 12, 4, 7, 0, 13, 9, 13, 12, 13, 2, 13, 11, 13, 0, 14, 5, 14, 0, 6, 6, 14, 0, 15, 4, 15, 6, 15, 3, 16, 6, 16, 10, 16, 5, 16, 14, 16, 1, 17, 4, 17, 8, 17, 7, 17, 0, 5, 9, 1, 4, 10, 1, 8, 10, 3, 6, 10, 4, 6, 10, 5, 8, 10, 2, 7, 11, 5, 8, 11, 5, 9, 11, 7, 8, 11, 0, 4, 12, 4, 7, 12, 0, 9, 13, 0, 12, 13, 2, 11, 13, 2, 7, 12, 9, 11, 13, 0, 5, 14, 0, 6, 14, 0, 4, 15, 0, 6, 15, 4, 6, 15, 3, 6, 16, 3, 10, 16, 5, 14, 16, 5, 10, 16, 6, 14, 16, 1, 4, 17, 1, 8, 17, 4, 7, 17, 7, 8, 17, 8, 0, 0, 0, 0, 0, 12, 0, 17, 0, 0, 0, 2, 0, 1, 0, 1, 0, 4, 0, 1, 0, 27, 0, 5, 0, 2, 0, 28, 0, 2, 0, 4, 0, 3, 0, 22, 0, 3, 0, 3, 0, 23, 0, 4, 0, 21, 0, 5, 0, 7, 0, 25, 0, 5, 0, 6, 0, 9, 0, 14, 0, 6, 0, 6, 0, 15, 0, 7, 0, 8, 0, 9, 0, 7, 0, 8, 0, 16, 0, 9, 0, 30, 0, 10, 0, 11, 0, 13, 0, 10, 0, 10, 0, 19, 0, 11, 0, 15, 0, 11, 0, 29, 0, 12, 0, 13, 0, 16, 0, 12, 0, 13, 0, 15, 0, 15, 0, 14, 0, 14, 0, 16, 0, 18, 0, 17, 0, 17, 0, 24, 0, 20, 0, 18, 0, 26, 0, 18, 0, 19, 0, 20, 0, 21, 0, 19, 0, 20, 0, 21, 0, 23, 0, 22, 0, 22, 0, 26, 0, 25, 0, 23, 0, 24, 0, 25, 0, 26, 0, 24, 0, 27, 0, 28, 0, 29, 0, 27, 0, 28, 0, 30, 0, 30, 0, 29, 0, 0, 0, 0, 0, 248, 45, 28, 191, 154, 100, 179, 190, 210, 212, 54, 192, 171, 141, 138, 63, 169, 69, 8, 64, 0, 19, 195, 62, 160, 130, 71, 64, 207, 182, 36, 65, 249, 76, 35, 191, 196, 169, 105, 63, 249, 76, 35, 191, 83, 223, 245, 64, 128, 182, 152, 64, 196, 169, 105, 63, 128, 182, 152, 64, 245, 21, 136, 64, 93, 13, 114, 62, 73, 232, 90, 63, 231, 121, 156, 191, 0, 0, 128, 191, 0, 0, 128, 191, 158, 189, 141, 62, 6, 171, 35, 62, 6, 171, 35, 62, 124, 163, 129, 62] + float physxMeshCollision:concavity = 0.001 + } + } + } + + over "Finger_Left_02_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "Finger_Left_03_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "Finger_Right_02_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "Finger_Right_03_RevoluteJoint" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + } +} + diff --git a/yaskawa_motoman_next_nex10/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/yaskawa_motoman_next_nex10/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..13752a746ff28d610d2b1ad10eaa6fdcec92403a --- /dev/null +++ b/yaskawa_motoman_next_nex10/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json @@ -0,0 +1,35 @@ +{ + "format_version": "1.0", + "profile": "Package-Candidate", + "profile_version": "1.0.0", + "timestamp": "2026-10-23T23:04:35", + "assets": [ + { + "asset": "NEX10.usda", + "features": [ + { + "FET_031_STANDARD": { + "version": "0.1.0", + "passed": true, + "failing_requirements": [], + "dependencies": [] + } + }, + { + "FET_033_STANDARD": { + "version": "0.1.0", + "passed": true, + "failing_requirements": [], + "dependencies": [ + { + "FET_031_STANDARD": { + "version": "0.1.0" + } + } + ] + } + } + ] + } + ] +} diff --git a/yaskawa_motoman_next_nex10/.metadata/com.nvidia.simready.packaging.bom.json b/yaskawa_motoman_next_nex10/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..3c6058a4967d045f4b33ae83c8f46d21facbbb7b --- /dev/null +++ b/yaskawa_motoman_next_nex10/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7841, + "hash": { + "sha256-flat-1mb": "b6a99fe0a1258ff8a29f736b6ebeb9fbb7f1684d55ff1d80ff62073c2a8f5fcf", + "sha256": "1222a1f254a904edf396d5ba3cf731c82a5c9511af4fc8af5401bd9e52b02e77" + } + }, + { + "relative_path": ".thumbs/256x256/NEX10.usda.png", + "size": 46043, + "hash": { + "sha256-flat-1mb": "f68202afa5e2e186789e67739576ae2b5b4adfcbde2af27368df29f4f7b60fb5", + "sha256": "d3ed77dd746402b581d38051e9c6072e39e9aeec25b1096634f4ed3bd9b0399f" + } + }, + { + "relative_path": ".thumbs/256x256/NEX10_C00.usda.png", + "size": 46043, + "hash": { + "sha256-flat-1mb": "f68202afa5e2e186789e67739576ae2b5b4adfcbde2af27368df29f4f7b60fb5", + "sha256": "d3ed77dd746402b581d38051e9c6072e39e9aeec25b1096634f4ed3bd9b0399f" + } + }, + { + "relative_path": "NEX10.usda", + "size": 16359, + "hash": { + "sha256-flat-1mb": "54f40b6c4012275951683a951c8ad1e28a5885a592d26ee5d197d6e86f4e4985", + "sha256": "bca31bbe288d70321ac234eb09287871cbba929e98c05b052c97068244b9eb95" + } + }, + { + "relative_path": "materials/mdl/LICENSE.md", + "size": 3220, + "hash": { + "sha256-flat-1mb": "d54635995b7794c6549d0f7c70586e739c1e24cb671ce966e64a8c1a6703a452", + "sha256": "d62e1bd5e34d0ca6f92f0e9f10670ee0cd586695e20f0a838a8f859119589683" + } + }, + { + "relative_path": "materials/mdl/OmniPBR.mdl", + "size": 13969, + "hash": { + "sha256-flat-1mb": "1c58f77068df165a71676dfde42a4b7e4932a82cacacfc7a205ae94fc0332aaf", + "sha256": "c902cc38dc97ff6a89fe94dca94edfb523a30e3749d3708610a136867c3357bf" + } + }, + { + "relative_path": "materials/mdl/OmniPBRBase.mdl", + "size": 17274, + "hash": { + "sha256-flat-1mb": "4b54e7fb8bc92191512851b3acc6fc6fa9863f80d98ffece8f0cb9b99f5f4535", + "sha256": "701f37299b44106842bdbe025de52eedec391e35b038f61c4ed4d25bd98e7db1" + } + }, + { + "relative_path": "materials/mdl/OmniPBR_ClearCoat.mdl", + "size": 27433, + "hash": { + "sha256-flat-1mb": "b1f146a3767a5012936e3d246f2697c3536c2f72b5c5963d3bca0998d02f8931", + "sha256": "085ba661b49042570e24cda09c939e5aebf312ae332af92744a99bd3abbfbee4" + } + }, + { + "relative_path": "materials/mdl/aux_definitions.mdl", + "size": 101769, + "hash": { + "sha256-flat-1mb": "6a5ffcb49e18ade213c3a4d79cf171d66612f9eee045074a0b937dbe4cf01ef6", + "sha256": "ebb81c8977aeb30790399ec7aaa7f2f76cb23afb434f56201ef152aba45a6e81" + } + }, + { + "relative_path": "materials/mdl/core_definitions.mdl", + "size": 201537, + "hash": { + "sha256-flat-1mb": "54bdc55e3899f126b1e271eef4de9c5966b1390fb3143872846f29f0ca68378d", + "sha256": "052aec260e8dfef5d671545fc2fc28c0c478a5b043041c65a833b2a6d81bf950" + } + }, + { + "relative_path": "materials/mdl/support_definitions.mdl", + "size": 147454, + "hash": { + "sha256-flat-1mb": "2b93c649c03f3ef48fb24cc6baba953df1f9dd4e7e860719bc3322fc3e789aba", + "sha256": "bb372f21b6e81d293b99fea6819a8309e2c33c732c7151752b4b33dade177f2e" + } + }, + { + "relative_path": "payloads/Physics/mujoco.usda", + "size": 2075, + "hash": { + "sha256-flat-1mb": "21d926774c1b0495ccfd55475e7455aa45cc94abd0124488f2087e650ea1649d", + "sha256": "a293aec3264093ba0e663edaa442958c8951a195f5b2133b55aec5ee3c0d8a60" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 135, + "hash": { + "sha256-flat-1mb": "c2f2071955ba99bdc5cdb94cc50cc8cdb2c5ecaa0d7c6ca8ec2f05b910b0d167", + "sha256": "3673ba81d7f6486e99a580dfc8769e057d3f3aebe488ea50a7df11fb27c0e79c" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 12019, + "hash": { + "sha256-flat-1mb": "a42a532a562cf441fac84f48b191d1468d07cba4c31f31f93f28ecece358bbdf", + "sha256": "4764190d9a41c1f5c9978447cc73a95d0b635fadd8094fb59de7ac97f9867af5" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 1490, + "hash": { + "sha256-flat-1mb": "f116d28961f060154ec486b09382b3d9f1d63ab49be3aed5b611ff90755d51d6", + "sha256": "6678767d0a11e0ec41e1587776cb1e540063e568bd440a4a0bf31193a100f106" + } + }, + { + "relative_path": "payloads/Sensor/dependencies/nex10_c00_sensor.usd", + "size": 700, + "hash": { + "sha256-flat-1mb": "75d4bae300fc70c34397de4278ee6d4f39c349b7d247f950020ea2b2d77c1c6b", + "sha256": "41f41bd346a3cc855731bfd23b6b857dd260f9449e83748cb433765cae118964" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 135, + "hash": { + "sha256-flat-1mb": "c2f2071955ba99bdc5cdb94cc50cc8cdb2c5ecaa0d7c6ca8ec2f05b910b0d167", + "sha256": "3673ba81d7f6486e99a580dfc8769e057d3f3aebe488ea50a7df11fb27c0e79c" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 175, + "hash": { + "sha256-flat-1mb": "87a5e710357d85af39cf7eace22ade685c1533ef060221d5bea57a91dafd4c80", + "sha256": "682274d614e3ad8dd448e5d35053103e3ab7589e4a50ad7f78f5fd52b0cfdca6" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 12608, + "hash": { + "sha256-flat-1mb": "310379a98415a9936330bb8f839f9d7efe02fdd61eaa3a99fb8b165352a9a1b5", + "sha256": "a30e0b41d37eb5e7af16f913e9845922737e0b9b26dbd531f2c50b03cf492e23" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 15289216, + "hash": { + "sha256-flat-1mb": "fca948b064b4b02bb35c48cd5673136fdec9b70fd8ad18381fa0fc375236186c", + "sha256": "e9287cdfe20153ec44e2b010743fdd429be82ae3358fe41a2d2d3aec2a7dd265", + "sha256-first1m": "0376524d72176a3bceeb6c7ceaf619b8a705dc88e973efc67d54b3a02dc547f3" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 28282, + "hash": { + "sha256-flat-1mb": "dab220152e91033881571bb802633bc32aa54ba5dd96ee8762ba33d8e21079fe", + "sha256": "f2f4aa82bc5af014ffb6ebc5653bb9d14f9efd77bd6324e45e53affc8b002b91" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 47676, + "hash": { + "sha256-flat-1mb": "d85e86f493870cf4d8b840b00777f992bbf50e971efefd73ca4948d999a323bc", + "sha256": "74ad453477c2311021aebf6feab5a8404694fe97a84b2ea23848402b15b45925" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 4432, + "hash": { + "sha256-flat-1mb": "266290393a1c530d678937f689becd9d36dd948b4fc7119a9068e7c9910bd789", + "sha256": "a08aa0c2a07d4d54061008c5f5892a715668165b9bc37a2fe84e1b153cfa8dec" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 8412, + "hash": { + "sha256-flat-1mb": "b99030e27e608b5c666d20753fc5bcb3f334232f69679584ee77cc29d0bc4996", + "sha256": "af03b8f6699f776690548d85ceda8a54351ac88fa2a39c723961c7f4faa6ce24" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 5035, + "hash": { + "sha256-flat-1mb": "0ab7e0da0e50e0b0377d54d84ae87955c9d07f2b83b8d0bcfd998a55b501f319", + "sha256": "40402378bfbd4696ee24f27fa2d3520e9a861cc7072e4b6935acfdaaf1886c6b" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 3668, + "hash": { + "sha256-flat-1mb": "336fbcaeffed55cc7ff0b99c13b613359e72932951816acd4e78732fed859982", + "sha256": "938f38363cdf4b82df1d8bb7b23cc64784e876c35fc190858ac6a3d931eb3ff7" + } + } + ] +} \ No newline at end of file diff --git a/yaskawa_motoman_next_nex10/.metadata/com.nvidia.simready.root_usds.json b/yaskawa_motoman_next_nex10/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..7340df68455718dd8cea1da6c16f6e2eeec311c0 --- /dev/null +++ b/yaskawa_motoman_next_nex10/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "NEX10.usda" + ] +} diff --git a/yaskawa_motoman_next_nex10/.metadata/license.txt b/yaskawa_motoman_next_nex10/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/yaskawa_motoman_next_nex10/.metadata/license.txt @@ -0,0 +1,396 @@ +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. + diff --git a/yaskawa_motoman_next_nex10/.simready/validation.json b/yaskawa_motoman_next_nex10/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..a33c73454356f791f9a1374d0bba5b5f8146d3ac --- /dev/null +++ b/yaskawa_motoman_next_nex10/.simready/validation.json @@ -0,0 +1,226 @@ +{ + "SimReady_Metadata": { + "validation": { + "profile": "Robot-Body", + "profile_version": "3.0.0", + "validated_features": { + "2026-10-20": { + "CAP000_Core.Isaac.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP000_Core.PhysX.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP000_Core.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP003_RigidBody.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP004_Multibody.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP003_RigidBody.MuJoCo.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP004_Multibody.RobotMuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP021_RobotCore.Isaac.0-3-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-3-0" + }, + "CAP022_DrivenJoints.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP004_Multibody.RobotMuJoCo.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP023_RobotMaterials.Isaac.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.MuJoCo.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP024_BaseArticulation.PhysX.0-1-0": { + "blocking_failure": false, + "dependencies": "['CAP024_BaseArticulation.OpenUSD.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "CAP025_RosBridge.Ros.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "optional requirements": "['com.nvidia.simready.ROS.001']", + "passed": false, + "version": "0-1-0" + }, + "CAP031_SelfContainedPackage.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "CAP033_SimReadyPackage.OpenUSD.0-4-0": { + "blocking_failure": false, + "dependencies": "['CAP031_SelfContainedPackage.OpenUSD.0-1-0']", + "passed": true, + "version": "0-4-0" + }, + "CAP100_IsaacComposition.Isaac.0-3-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-3-0" + }, + "FET001_MinimalPlaceableVisual.OpenUSD.1-0-1": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "1-0-1" + }, + "FET003_RigidBody.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET003_RigidBody.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET003_RigidBody.PhysX.0-4-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-4-0" + }, + "FET004_Multibody.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.Newton.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "FET004_Multibody.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.OpenUSD.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET004_Multibody.PhysX.0-4-0": { + "blocking_failure": false, + "dependencies": "['FET003_RigidBody.PhysX.0-4-0']", + "passed": true, + "version": "0-4-0" + }, + "FET004_Multibody.RobotNewton.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-1-0" + }, + "FET006_Materials.MDL.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "optional requirements": "['com.nvidia.simready.VM.BIND.002']", + "passed": false, + "version": "0-2-0" + }, + "FET006_Materials.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "[]", + "passed": true, + "version": "0-2-0" + }, + "FET006_Materials.Openpbr.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "optional requirements": "['com.nvidia.simready.VM.BIND.002', 'com.nvidia.simready.VM.PBR.001', 'com.nvidia.simready.VM.PBR.003']", + "passed": false, + "version": "0-1-0" + }, + "FET010_DisplayColor.OpenUSD.0-1-0": { + "blocking_failure": false, + "dependencies": "[]", + "optional requirements": "['com.nvidia.simready.DISP.001']", + "passed": false, + "version": "0-1-0" + }, + "FET022_DrivenJoints.Isaac.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET022_DrivenJoints.PhysX.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET022_DrivenJoints.Newton.0-1-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.RobotNewton.0-1-0']", + "passed": true, + "version": "0-1-0" + }, + "FET022_DrivenJoints.OpenUSD.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.OpenUSD.0-2-0']", + "passed": true, + "version": "0-2-0" + }, + "FET022_DrivenJoints.PhysX.0-2-0": { + "blocking_failure": false, + "dependencies": "['FET004_Multibody.PhysX.0-4-0']", + "passed": true, + "version": "0-2-0" + } + } + } + } + } +} diff --git a/yaskawa_motoman_next_nex10/.thumbs/256x256/NEX10.usda.png b/yaskawa_motoman_next_nex10/.thumbs/256x256/NEX10.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..77930977834e05e4da314300720e9094c37f35df --- /dev/null +++ b/yaskawa_motoman_next_nex10/.thumbs/256x256/NEX10.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3ed77dd746402b581d38051e9c6072e39e9aeec25b1096634f4ed3bd9b0399f +size 46043 diff --git a/yaskawa_motoman_next_nex10/.thumbs/256x256/NEX10_C00.usda.png b/yaskawa_motoman_next_nex10/.thumbs/256x256/NEX10_C00.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..77930977834e05e4da314300720e9094c37f35df --- /dev/null +++ b/yaskawa_motoman_next_nex10/.thumbs/256x256/NEX10_C00.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3ed77dd746402b581d38051e9c6072e39e9aeec25b1096634f4ed3bd9b0399f +size 46043 diff --git a/yaskawa_motoman_next_nex10/NEX10.usda b/yaskawa_motoman_next_nex10/NEX10.usda new file mode 100644 index 0000000000000000000000000000000000000000..ecdb4e4b9438e797a3dfda3453bf3464decfb2f4 --- /dev/null +++ b/yaskawa_motoman_next_nex10/NEX10.usda @@ -0,0 +1,419 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/NEX10_C00" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/NEX10_C00" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/NEX10_C00" + string variantSetName = "PhysX" + } + } + } + dictionary validation = { + string profile = "Robot-Body" + string profile_version = "3.0.0" + dictionary validated_features = { + dictionary "2026-10-20" = { + dictionary "CAP000_Core.Isaac.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP000_Core.PhysX.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP000_Core.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP003_RigidBody.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP004_Multibody.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP003_RigidBody.MuJoCo.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP004_Multibody.RobotMuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP021_RobotCore.Isaac.0-3-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-3-0" + } + dictionary "CAP022_DrivenJoints.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP004_Multibody.RobotMuJoCo.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP023_RobotMaterials.Isaac.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.MuJoCo.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP024_BaseArticulation.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP024_BaseArticulation.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP024_BaseArticulation.PhysX.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP024_BaseArticulation.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP025_RosBridge.Ros.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + string "optional requirements" = "['com.nvidia.simready.ROS.001']" + bool passed = 0 + string version = "0-1-0" + } + dictionary "CAP031_SelfContainedPackage.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "CAP033_SimReadyPackage.OpenUSD.0-4-0" = { + bool blocking_failure = 0 + string dependencies = "['CAP031_SelfContainedPackage.OpenUSD.0-1-0']" + bool passed = 1 + string version = "0-4-0" + } + dictionary "CAP100_IsaacComposition.Isaac.0-3-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-3-0" + } + dictionary "FET001_MinimalPlaceableVisual.OpenUSD.1-0-1" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "1-0-1" + } + dictionary "FET003_RigidBody.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET003_RigidBody.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET003_RigidBody.PhysX.0-4-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-4-0" + } + dictionary "FET004_Multibody.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['FET003_RigidBody.Newton.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET004_Multibody.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET003_RigidBody.OpenUSD.0-2-0']" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET004_Multibody.PhysX.0-4-0" = { + bool blocking_failure = 0 + string dependencies = "['FET003_RigidBody.PhysX.0-4-0']" + bool passed = 1 + string version = "0-4-0" + } + dictionary "FET004_Multibody.RobotNewton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET006_Materials.MDL.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + string "optional requirements" = "['com.nvidia.simready.VM.BIND.002']" + bool passed = 0 + string version = "0-2-0" + } + dictionary "FET006_Materials.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET006_Materials.Openpbr.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + string "optional requirements" = "['com.nvidia.simready.VM.BIND.002', 'com.nvidia.simready.VM.PBR.001', 'com.nvidia.simready.VM.PBR.003']" + bool passed = 0 + string version = "0-1-0" + } + dictionary "FET010_DisplayColor.OpenUSD.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "[]" + string "optional requirements" = "['com.nvidia.simready.DISP.001']" + bool passed = 0 + string version = "0-1-0" + } + dictionary "FET022_DrivenJoints.Isaac.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET022_DrivenJoints.PhysX.0-2-0']" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET022_DrivenJoints.Newton.0-1-0" = { + bool blocking_failure = 0 + string dependencies = "['FET004_Multibody.RobotNewton.0-1-0']" + bool passed = 1 + string version = "0-1-0" + } + dictionary "FET022_DrivenJoints.OpenUSD.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET004_Multibody.OpenUSD.0-2-0']" + bool passed = 1 + string version = "0-2-0" + } + dictionary "FET022_DrivenJoints.PhysX.0-2-0" = { + bool blocking_failure = 0 + string dependencies = "['FET004_Multibody.PhysX.0-4-0']" + bool passed = 1 + string version = "0-2-0" + } + } + } + } + } + float3 asset_extents = (0.82865185, 0.24, 0.99409986) + string asset_license = "CC-BY-4.0" + string asset_name = "NEX10_C00" + string asset_type = "robot" + string author = "Yaskawa" + string category = "robotic arm" + double mass = 58.55956149101257 + string qcode = "Q40687" + int rigid_body_count = 7 + string source_file = "Yaskawa/Motoman Next/NEX10/NEX10_C00.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "NEX10_C00" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "NEX10_C00" ( + kind = "component" + prepend references = [ + @./payloads/Physics/physics.usda@, + @./payloads/base.usda@ + ] + variants = { + string MuJoCo = "Disabled" + string Newton = "Disabled" + string PhysX = "Disabled" + string Sensor = "none" + } + variantSets = ["Sensor", "PhysX", "Newton", "MuJoCo"] +) +{ + over "base_link" + { + over "collisions" + { + over "nex10_base_link" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "link_1_s" + { + over "collisions" + { + over "nex10_link_1_s" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "link_2_l" + { + over "collisions" + { + over "nex10_link_2_l" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "link_3_u" + { + over "collisions" + { + over "nex10_link_3_u" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "link_4_r" + { + over "collisions" + { + over "nex10_link_4_r" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "link_5_b" + { + over "collisions" + { + over "nex10_link_5_b" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "link_6_t" + { + over "collisions" + { + over "nex10_link_6_t" + { + over "mesh_13" + { + token visibility = "invisible" + } + } + } + } + variantSet "Sensor" = { + "none" ( + prepend payload = @./payloads/Sensor/none.usda@ + ) { + + } + "sensors" ( + prepend payload = @./payloads/Sensor/sensors.usda@ + ) { + + } + } + variantSet "PhysX" = { + "Disabled" { + + } + "Enabled" ( + prepend payload = @./runnables/physics/physx.usda@ + ) { + + } + } + variantSet "Newton" = { + "Disabled" { + + } + "Enabled" ( + prepend payload = @./runnables/physics/newton.usda@ + ) { + + } + } + variantSet "MuJoCo" = { + "Disabled" { + + } + "Enabled" ( + prepend payload = @./runnables/physics/mujoco.usda@ + ) { + + } + } +} + diff --git a/yaskawa_motoman_next_nex10/com.nvidia.simready.packaging.json b/yaskawa_motoman_next_nex10/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..c19bab381d8f22817b46fff36d62a18648bfefb4 --- /dev/null +++ b/yaskawa_motoman_next_nex10/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "yaskawa_motoman_next_nex10.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "a6b45a6da3a9608d15ca5c23b5efe454184f13a4db9a19121584b08f549f1434" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "3061baf7ec923f86a0b60e40468e31b61a6dd2c3aca3221412a8739b9768db6e" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "d1ea3596db3a27adf54de8494258cffb5c01a53c145572278a7ae7a0d72ed28e" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "9e88769bc31d7aec258c5673dd7773a14254b6a0ba246c3f1e221be029baf2ab" + }, + "package_hash": { + "sha256": "e98d7c7b9e5c4086c59261dca8b86f62e432cd8b2d0595bfca73ea722481d4c7" + } +} diff --git a/yaskawa_motoman_next_nex10/materials/mdl/LICENSE.md b/yaskawa_motoman_next_nex10/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/yaskawa_motoman_next_nex10/materials/mdl/LICENSE.md @@ -0,0 +1,73 @@ +# NVIDIA Omniverse Core Materials Licenses + +## Primary License +This project is primarily licensed under the BSD-3-Clause License. + +``` +Copyright (c) 1986-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + +## Third-Party Licenses + +### Apache License 2.0 +The following components are licensed under the Apache License 2.0: + +#### MaterialX Components +Files in `/source/mdl/materialx` are licensed under Apache License 2.0 per the MaterialX project: +https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/LICENSE + +``` +Copyright Contributors to the MaterialX Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` + +## SPDX License Identifiers +Files in this project use the following SPDX license identifiers: +- `SPDX-License-Identifier: BSD-3-Clause` - Used for NVIDIA-owned code +- `SPDX-License-Identifier: Apache-2.0` - Used for MaterialX components + +## License Attribution +This project contains code from multiple sources: +1. NVIDIA Corporation (BSD-3-Clause) - Primary codebase +2. Academy Software Foundation (Apache-2.0) - MaterialX components + +## License Scope +- All files in the project are licensed under BSD-3-Clause unless explicitly stated otherwise +- Files in `/source/mdl/materialx` are licensed under Apache-2.0 +- All other files are licensed under BSD-3-Clause \ No newline at end of file diff --git a/yaskawa_motoman_next_nex10/materials/mdl/OmniPBR.mdl b/yaskawa_motoman_next_nex10/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/yaskawa_motoman_next_nex10/materials/mdl/OmniPBR.mdl @@ -0,0 +1,396 @@ +/* + * 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 core_definitions::file_texture; +import 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 +); diff --git a/yaskawa_motoman_next_nex10/materials/mdl/OmniPBRBase.mdl b/yaskawa_motoman_next_nex10/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/yaskawa_motoman_next_nex10/materials/mdl/OmniPBRBase.mdl @@ -0,0 +1,470 @@ +/* + * 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 +); diff --git a/yaskawa_motoman_next_nex10/materials/mdl/OmniPBR_ClearCoat.mdl b/yaskawa_motoman_next_nex10/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/yaskawa_motoman_next_nex10/materials/mdl/OmniPBR_ClearCoat.mdl @@ -0,0 +1,711 @@ +/* + * 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 core_definitions::file_texture; +import 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 +); diff --git a/yaskawa_motoman_next_nex10/materials/mdl/aux_definitions.mdl b/yaskawa_motoman_next_nex10/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/yaskawa_motoman_next_nex10/materials/mdl/aux_definitions.mdl @@ -0,0 +1,3464 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + + +mdl 1.4; + +import ::anno::*; +export using ::base import texture_return; + +module +[[ + anno::version( 1, 2, 0), + anno::hidden(), + anno::display_name("NVIDIA auxillary definitions") +]]; + +// Support functions to simplify conversions between vector types with swizzles +// Supported argument types: float2, float3, float4, color, texture_return (as RGB and RGBA) +// Supported return types: float, float2, float3 color + + +export annotation icon(string path); + + +//*********************************************************************************************************************** +// Constructor wrappers + +export float construct_float( + texture_return a [[ + anno::description("Input texture sample container; the mono channel is returned.") + ]]) +[[ + anno::display_name("Float from texture_return"), + anno::description("Constructs a float from the mono channel of a texture_return value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float"), + icon(".icons/constructor.svg"), + anno::ui_order(10000) +]] +{ return a.mono; } + +export color construct_color( + float a [[ + anno::description("Scalar value replicated into all color channels.") + ]]) +[[ + anno::display_name("Color from float"), + anno::description("Constructs a color from a single float value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10001) +]] +{ return color(a); } + +export color construct_color( + float3 a [[ + anno::description("RGB source components.") + ]]) +[[ + anno::display_name("Color from float3"), + anno::description("Constructs a color from a float3 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10002) +]] +{ return color(a); } + +export color construct_color( + float r [[ + anno::description("Red channel value.") + ]], + float g [[ + anno::description("Green channel value.") + ]], + float b [[ + anno::description("Blue channel value.") + ]]) +[[ + anno::display_name("Color from floats"), + anno::description("Constructs a color from explicit red, green, and blue components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10003) +]] +{ return color(r,g,b); } + +export color construct_color( + texture_return a [[ + anno::description("Input texture sample container; the tint (RGB) channels are returned.") + ]]) +[[ + anno::display_name("Color from texture_return"), + anno::description("Constructs a color from the tint (RGB) channels of a texture_return value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Color"), + icon(".icons/constructor.svg"), + anno::ui_order(10004) +]] +{ return a.tint; } + +export float4 construct_float4( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]], + float z [[ + anno::description("Z component value.") + ]], + float w [[ + anno::description("W component value.") + ]]) +[[ + anno::display_name("Float4 from floats"), + anno::description("Constructs a float4 from explicit x, y, z, and w components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float4"), + icon(".icons/constructor.svg"), + anno::ui_order(10005) +]] +{ return float4(x,y,z,w); } + +export float4 construct_float4( + float3 xyz [[ + anno::description("Source xyz components.") + ]], + float w [[ + anno::description("W component value.") + ]]) +[[ + anno::display_name("Float4 from float3,float"), + anno::description("Constructs a float4 from a float3 xyz value and a separate w component."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float4"), + icon(".icons/constructor.svg"), + anno::ui_order(10006) +]] +{ return float4(xyz.x,xyz.y,xyz.z,w); } + +export float3 construct_float3( + color a [[ + anno::description("Input color whose RGB channels are converted to float3.") + ]]) +[[ + anno::display_name("Float3 from color"), + anno::description("Constructs a float3 from a color value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10007) +]] +{ return float3(a); } + +export float3 construct_float3( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]], + float z [[ + anno::description("Z component value.") + ]]) +[[ + anno::display_name("Float3 from floats"), + anno::description("Constructs a float3 from explicit x, y, and z components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10008) +]] +{ return float3(x,y,z); } + +export float3 construct_float3( + int3 a [[ + anno::description("Input int3 converted component-wise to float3.") + ]]) +[[ + anno::display_name("Float3 from int3"), + anno::description("Constructs a float3 from an int3 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float3"), + icon(".icons/constructor.svg"), + anno::ui_order(10009) +]] +{ return float3(a); } + +export float2 construct_float2( + float a [[ + anno::description("Scalar value replicated into both components.") + ]]) +[[ + anno::display_name("Float2 from float"), + anno::description("Constructs a float2 from a single float value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10010) +]] +{ return float2(a); } + +export float2 construct_float2( + float x [[ + anno::description("X component value.") + ]], + float y [[ + anno::description("Y component value.") + ]]) +[[ + anno::display_name("Float2 from floats"), + anno::description("Constructs a float2 from explicit x and y components."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10011) +]] +{ return float2(x,y); } + +export float2 construct_float2( + int2 a [[ + anno::description("Input int2 converted component-wise to float2.") + ]]) +[[ + anno::display_name("Float2 from int2"), + anno::description("Constructs a float2 from an int2 value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Float2"), + icon(".icons/constructor.svg"), + anno::ui_order(10012) +]] +{ return float2(a); } + +export int3 construct_int3( + int a [[ + anno::description("Scalar value replicated into all int3 components.") + ]]) +[[ + anno::display_name("Int3 from int"), + anno::description("Constructs an int3 from a single int value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Int3"), + icon(".icons/constructor.svg"), + anno::ui_order(10013) +]] +{ return int3(a); } + +export int2 construct_int2( + int a [[ + anno::description("Scalar value replicated into both int2 components.") + ]]) +[[ + anno::display_name("Int2 from int"), + anno::description("Constructs an int2 from a single int value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constructor", "Int2"), + icon(".icons/constructor.svg"), + anno::ui_order(10014) +]] +{ return int2(a); } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float return type + +export float x( float2 a) +[[ + anno::display_name("X from float2"), + anno::description("Returns x from float2."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11000) +]] +{ return a.x; } + +export float y( float2 a) +[[ + anno::display_name("Y from float2"), + anno::description("Returns y from float2."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11010) +]] +{ return a.y; } + +export float x( float3 a) +[[ + anno::display_name("X from float3"), + anno::description("Returns x from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11001) +]] +{ return a.x; } + +export float y( float3 a) +[[ + anno::display_name("Y from float3"), + anno::description("Returns y from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11011) +]] +{ return a.y; } + +export float z( float3 a) +[[ + anno::display_name("Z from float3"), + anno::description("Returns z from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Z"), + icon(".icons/component_extract.svg"), + anno::ui_order(11020) +]] +{ return a.z; } + +export float x( float4 a) +[[ + anno::display_name("X from float4"), + anno::description("Returns x from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "X"), + icon(".icons/component_extract.svg"), + anno::ui_order(11002) +]] +{ return a.x; } + +export float y( float4 a) +[[ + anno::display_name("Y from float4"), + anno::description("Returns y from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Y"), + icon(".icons/component_extract.svg"), + anno::ui_order(11012) +]] +{ return a.y; } + +export float z( float4 a) +[[ + anno::display_name("Z from float4"), + anno::description("Returns z from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "Z"), + icon(".icons/component_extract.svg"), + anno::ui_order(11021) +]] +{ return a.z; } + +export float w( float4 a) +[[ + anno::display_name("W from float4"), + anno::description("Returns w from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "W"), + icon(".icons/component_extract.svg"), + anno::ui_order(11025) +]] +{ return a.w; } + +export float x( color a) +[[ + anno::display_name("R from color"), + anno::description("Returns r from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "R"), + icon(".icons/component_extract.svg"), + anno::ui_order(11003) +]] +{ return x( float3(a)); } + +export float y( color a) +[[ + anno::display_name("G from color"), + anno::description("Returns g from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "G"), + icon(".icons/component_extract.svg"), + anno::ui_order(11013) +]] +{ return y( float3(a)); } + +export float z( color a) +[[ + anno::display_name("B from color"), + anno::description("Returns b from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "B"), + icon(".icons/component_extract.svg"), + anno::ui_order(11021) +]] +{ return z( float3(a)); } + +export float x( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("R from texture_return"), + anno::description("Returns r from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "R"), + icon(".icons/component_extract.svg"), + anno::ui_order(11004) +]] +{ return float3( a.tint).x; } + +export float y( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("G from texture_return"), + anno::description("Returns g from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "G"), + icon(".icons/component_extract.svg"), + anno::ui_order(11014) +]] +{ return float3( a.tint).y; } + +export float z( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("B from texture_return"), + anno::description("Returns b from texture_return tint."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "B"), + icon(".icons/component_extract.svg"), + anno::ui_order(11022) +]] +{ return float3( a.tint).z; } + +export float w( + texture_return a [[ + anno::description("Input texture sample container.") + ]]) +[[ + anno::display_name("Mono from texture_return"), + anno::description("Returns mono/alpha from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float", "W"), + icon(".icons/component_extract.svg"), + anno::ui_order(11026) +]] +{ return a.mono; } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Conversions of texture_return +// All are hidden +export float4 texture_return_float4( + texture_return a [[ + anno::description("Input texture sample container to unpack as float4 (r, g, b, mono).") + ]]) +[[ + anno::display_name("float4 from texture_return"), + anno::description("Converts texture_return to float4 using tint RGB and mono as W."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float4"), + icon(".icons/component_extract.svg"), + anno::ui_order(10108) +]] +{ return float4(x(a),y(a),z(a),w(a)); } + +export float3 texture_return_float3( + texture_return a [[ + anno::description("Input texture sample container to unpack as float3 (r, g, b).") + ]]) +[[ + anno::display_name("float3 from texture_return"), + anno::description("Converts texture_return to float3 using the tint RGB channels."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + icon(".icons/component_extract.svg"), + anno::ui_order(10109) +]] +{ return float3(x(a),y(a),z(a)); } + +export color texture_return_color( + texture_return a [[ + anno::description("Input texture sample container; tint RGB is returned as color.") + ]]) +[[ + anno::display_name("color from texture_return"), + anno::description("Converts texture_return to color using the tint RGB channels."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Color"), + icon(".icons/component_extract.svg"), + anno::ui_order(10110) +]] +{ return a.tint; } + +export float texture_return_float( + texture_return a [[ + anno::description("Input texture sample container; mono channel is returned.") + ]]) +[[ + anno::display_name("float from texture_return"), + anno::description("Converts texture_return to float using the mono channel."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float"), + icon(".icons/component_extract.svg"), + anno::ui_order(10111) +]] +{ return a.mono; } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float2 return type + +export float2 xy( float2 a) +[[ + anno::display_name("XY from float2"), + anno::description("Returns float2(x,y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11040) +]] +{ return float2( a.x, a.y); } + +export float2 xy( float3 a) +[[ + anno::display_name("XY from float3"), + anno::description("Returns float2(x,y) from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11041) +]] +{ return float2( a.x, a.y); } + +export float2 xy( float4 a) +[[ + anno::display_name("XY from float4"), + anno::description("Returns float2(x,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11044) +]] +{ return float2( a.x, a.y); } + +export float2 xy( color a) +[[ + anno::display_name("XY from color"), + anno::description("Returns float2(x,y) from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11043) +]] +{ return xy( float3(a)); } + +export float2 xy( + texture_return a [[ + anno::description("Input texture sample container; returns the first two tint channels.") + ]]) +[[ + anno::display_name("XY from texture_return"), + anno::description("Returns float2(r, g) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11044) +]] +{ return xy(texture_return_float4(a)); } + + +// The remaining are hidden +export float2 xx( float2 a) +[[ + anno::display_name("XX from float2"), + anno::description("Returns float2(x,x)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11030) +]] +{ return float2( a.x, a.x); } + +export float2 yx( float2 a) +[[ + anno::display_name("YX from float2"), + anno::description("Returns float2(y,x)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11050) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float2 a) +[[ + anno::display_name("YY from float2"), + anno::description("Returns float2(y,y)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11060) +]] +{ return float2( a.y, a.y); } + +export float2 xx( float3 a) +[[ + anno::display_name("XX from float3"), + anno::description("Returns float2(x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11031) +]] +{ return float2( a.x, a.x); } + +export float2 xz( float3 a) +[[ + anno::display_name("XZ from float3"), + anno::description("Returns float2(x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11042) +]] +{ return float2( a.x, a.z); } + +export float2 yz( float3 a) +[[ + anno::display_name("YZ from float3"), + anno::description("Returns float2(y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11043) +]] +{ return float2( a.y, a.z); } + +export float2 yx( float3 a) +[[ + anno::display_name("YX from float3"), + anno::description("Returns float2(y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11051) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float3 a) +[[ + anno::display_name("YY from float3"), + anno::description("Returns float2(y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11061) +]] +{ return float2( a.y, a.y); } + +export float2 zx( float3 a) +[[ + anno::display_name("ZX from float3"), + anno::description("Returns float2(z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11090) +]] +{ return float2( a.z, a.x); } + +export float2 zy( float3 a) +[[ + anno::display_name("ZY from float3"), + anno::description("Returns float2(z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11100) +]] +{ return float2( a.z, a.y); } + +export float2 zz( float3 a) +[[ + anno::display_name("ZZ from float3"), + anno::description("Returns float2(z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11110) +]] +{ return float2( a.z, a.z); } + +export float2 xx( float4 a) +[[ + anno::display_name("XX from float4"), + anno::description("Returns float2(x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11032) +]] +{ return float2( a.x, a.x); } + +export float2 xz( float4 a) +[[ + anno::display_name("XZ from float4"), + anno::description("Returns float2(x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11071) +]] +{ return float2( a.x, a.z); } + +export float2 xw( float4 a) +[[ + anno::display_name("XW from float4"), + anno::description("Returns float2(x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11120) +]] +{ return float2( a.x, a.w); } + +export float2 yx( float4 a) +[[ + anno::display_name("YX from float4"), + anno::description("Returns float2(y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11052) +]] +{ return float2( a.y, a.x); } + +export float2 yy( float4 a) +[[ + anno::display_name("YY from float4"), + anno::description("Returns float2(y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11062) +]] +{ return float2( a.y, a.y); } + +export float2 yz( float4 a) +[[ + anno::display_name("YZ from float4"), + anno::description("Returns float2(y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11081) +]] +{ return float2( a.y, a.z); } + +export float2 yw( float4 a) +[[ + anno::display_name("YW from float4"), + anno::description("Returns float2(y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11125) +]] +{ return float2( a.y, a.w); } + +export float2 zx( float4 a) +[[ + anno::display_name("ZX from float4"), + anno::description("Returns float2(z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11091) +]] +{ return float2( a.z, a.x); } + +export float2 zy( float4 a) +[[ + anno::display_name("ZY from float4"), + anno::description("Returns float2(z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11101) +]] +{ return float2( a.z, a.y); } + +export float2 zz( float4 a) +[[ + anno::display_name("ZZ from float4"), + anno::description("Returns float2(z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11111) +]] +{ return float2( a.z, a.z); } + +export float2 zw( float4 a) +[[ + anno::display_name("ZW from float4"), + anno::description("Returns float2(z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11127) +]] +{ return float2( a.z, a.w); } + +export float2 wx( float4 a) +[[ + anno::display_name("WX from float4"), + anno::description("Returns float2(w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11129) +]] +{ return float2( a.w, a.x); } + +export float2 wy( float4 a) +[[ + anno::display_name("WX from loat4"), + anno::description("Returns float2(w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11131) +]] +{ return float2( a.w, a.y); } + +export float2 wz( float4 a) +[[ + anno::display_name("WZ from float4"), + anno::description("Returns float2(w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11133) +]] +{ return float2( a.w, a.z); } + +export float2 ww( float4 a) +[[ + anno::display_name("WW from float4"), + anno::description("Returns float2(w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11135) +]] +{ return float2( a.w, a.w); } + +export float2 xx( color a) +[[ + anno::display_name("XX from color"), + anno::description("Returns float2(x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11033) +]] +{ return xx( float3(a)); } + +export float2 xz( color a) +[[ + anno::display_name("XZ from color"), + anno::description("Returns float2(x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11072) +]] +{ return xz( float3(a)); } + +export float2 yx( color a) +[[ + anno::display_name("YX from color"), + anno::description("Returns float2(y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11053) +]] +{ return yx( float3(a)); } + +export float2 yy( color a) +[[ + anno::display_name("YY from color"), + anno::description("Returns float2(y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11063) +]] +{ return yy( float3(a)); } + +export float2 yz( color a) +[[ + anno::display_name("YZ from color"), + anno::description("Returns float2(y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11082) +]] +{ return yz( float3(a)); } + +export float2 zx( color a) +[[ + anno::display_name("ZX from color"), + anno::description("Returns float2(z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11092) +]] +{ return zx( float3(a)); } + +export float2 zy( color a) +[[ + anno::display_name("ZY from color"), + anno::description("Returns float2(z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11102) +]] +{ return zy( float3(a)); } + +export float2 zz( color a) +[[ + anno::display_name("ZZ from color"), + anno::description("Returns float2(z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11112) +]] +{ return zz( float3(a)); } + +export float2 xx( texture_return a) +[[ + anno::display_name("XX from color"), + anno::description("Returns float2(x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11034) +]] +{ return xx(texture_return_float4(a)); } + +export float2 xz( texture_return a) +[[ + anno::display_name("XZ from texture_return"), + anno::description("Returns float2(x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11073) +]] +{ return xz(texture_return_float4(a)); } + +export float2 xw( texture_return a) +[[ + anno::display_name("XW from texture_return"), + anno::description("Returns float2(x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11121) +]] +{ return xw(texture_return_float4(a)); } + +export float2 yx( texture_return a) +[[ + anno::display_name("YX from texture_return"), + anno::description("Returns float2(y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11054) +]] +{ return yx(texture_return_float4(a)); } + +export float2 yy( texture_return a) +[[ + anno::display_name("YY from texture_return"), + anno::description("Returns float2(y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11064) +]] +{ return yy(texture_return_float4(a)); } + +export float2 yz( texture_return a) +[[ + anno::display_name("YZ from texture_return"), + anno::description("Returns float2(y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11083) +]] +{ return yz(texture_return_float4(a)); } + +export float2 yw( texture_return a) +[[ + anno::display_name("YW from texture_return"), + anno::description("Returns float2(y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11126) +]] +{ return yw(texture_return_float4(a)); } + +export float2 zx( texture_return a) +[[ + anno::display_name("ZX from texture_return"), + anno::description("Returns float2(z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11093) +]] +{ return zx(texture_return_float4(a)); } + +export float2 zy( texture_return a) +[[ + anno::display_name("ZY from texture_return"), + anno::description("Returns float2(z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11103) +]] +{ return zy(texture_return_float4(a)); } + +export float2 zz( texture_return a) +[[ + anno::display_name("ZZ from texture_return"), + anno::description("Returns float2(z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11113) +]] +{ return zz(texture_return_float4(a)); } + +export float2 zw( texture_return a) +[[ + anno::display_name("ZW from texture_return"), + anno::description("Returns float2(z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11128) +]] +{ return zw(texture_return_float4(a)); } + +export float2 wx( texture_return a) +[[ + anno::display_name("WX from texture_return.WX"), + anno::description("Returns float2(w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11130) +]] +{ return wx(texture_return_float4(a)); } + +export float2 wy( texture_return a) +[[ + anno::display_name("WY from texture_return"), + anno::description("Returns float2(w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11132) +]] +{ return wy(texture_return_float4(a)); } + +export float2 wz( texture_return a) +[[ + anno::display_name("WZ from texture_return"), + anno::description("Returns float2(w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11134) +]] +{ return wz(texture_return_float4(a)); } + +export float2 ww( texture_return a) +[[ + anno::display_name("WW from texture_return"), + anno::description("Returns float2(w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float2"), + icon(".icons/component_extract.svg"), + anno::ui_order(11136) +]] +{ return ww(texture_return_float4(a)); } +//*********************************************************************************************************************** + + + +//*********************************************************************************************************************** +// Swizzles with float3 return type + +export float3 xyz( float3 a) +[[ + anno::display_name("XYZ from float3"), + anno::description("Returns float3(x,y,z) from float3."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11290) +]] +{ return float3( a.x, a.y, a.z); } + +export float3 xyz( float4 a) +[[ + anno::display_name("XYZ from float4"), + anno::description("Returns float3(x,y,z) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11291) +]] +{ return float3( a.x, a.y, a.z); } + + +// The remaining are hidden +export float3 yyw( float4 a) +[[ + anno::display_name("YYW from float4"), + anno::description("Returns float3(y,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11640) +]] +{ return float3( a.y, a.y, a.w); } + +export float3 xxx( float2 a) +[[ + anno::display_name("XXX from float2"), + anno::description("Returns float3(x,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11200) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float2 a) +[[ + anno::display_name("XXY from float2"), + anno::description("Returns float3(x,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11210) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xyx( float2 a) +[[ + anno::display_name("XYX from float2"), + anno::description("Returns float3(x,y,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11230) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float2 a) +[[ + anno::display_name("XYY from float2"), + anno::description("Returns float3(x,y,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11240) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 yxx( float2 a) +[[ + anno::display_name("YXX from float2"), + anno::description("Returns float3(y,x,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11250) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float2 a) +[[ + anno::display_name("YXY from float2"), + anno::description("Returns float3(y,x,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11260) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yyx( float2 a) +[[ + anno::display_name("YYX from float2"), + anno::description("Returns float3(y,y,x) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11270) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float2 a) +[[ + anno::display_name("YYY from float2"), + anno::description("Returns float3(y,y,y) from float2."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11280) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 xxx( float3 a) +[[ + anno::display_name("XXX from float3"), + anno::description("Returns float3(x,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11201) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float3 a) +[[ + anno::display_name("XXY from float3"), + anno::description("Returns float3(x,x,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11211) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xxz( float3 a) +[[ + anno::display_name("XXZ from float3"), + anno::description("Returns float3(x,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11220) +]] +{ return float3( a.x, a.x, a.z); } + +export float3 xyx( float3 a) +[[ + anno::display_name("XYX from float3"), + anno::description("Returns float3(x,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11231) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float3 a) +[[ + anno::display_name("XYY from float3"), + anno::description("Returns float3(x,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11241) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 xzx( float3 a) +[[ + anno::display_name("XZX from float3"), + anno::description("Returns float3(x,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11300) +]] +{ return float3( a.x, a.z, a.x); } + +export float3 xzy( float3 a) +[[ + anno::display_name("XZY from float3"), + anno::description("Returns float3(x,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11310) +]] +{ return float3( a.x, a.z, a.y); } + +export float3 xzz( float3 a) +[[ + anno::display_name("XZZ from float3"), + anno::description("Returns float3(x,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11320) +]] +{ return float3( a.x, a.z, a.z); } + +export float3 yxx( float3 a) +[[ + anno::display_name("YXX from float3"), + anno::description("Returns float3(y,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11251) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float3 a) +[[ + anno::display_name("YXY from float3"), + anno::description("Returns float3(y,x,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11261) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yxz( float3 a) +[[ + anno::display_name("YXZ from float3"), + anno::description("Returns float3(y,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11330) +]] +{ return float3( a.y, a.x, a.z); } + +export float3 yyx( float3 a) +[[ + anno::display_name("YYX from float3"), + anno::description("Returns float3(y,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11271) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float3 a) +[[ + anno::display_name("YYY from float3"), + anno::description("Returns float3(y,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11281) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 yyz( float3 a) +[[ + anno::display_name("YYZ from float3"), + anno::description("Returns float3(y,y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11340) +]] +{ return float3( a.y, a.y, a.z); } + +export float3 yzx( float3 a) +[[ + anno::display_name("YZX from float3"), + anno::description("Returns float3(y,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11350) +]] +{ return float3( a.y, a.z, a.x); } + +export float3 yzy( float3 a) +[[ + anno::display_name("YZY from float3.YZY"), + anno::description("Returns float3(y,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11360) +]] +{ return float3( a.y, a.z, a.y); } + +export float3 yzz( float3 a) +[[ + anno::display_name("YZZ from float3"), + anno::description("Returns float3(y,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11370) +]] +{ return float3( a.y, a.z, a.z); } + +export float3 zxx( float3 a) +[[ + anno::display_name("ZXX from float3"), + anno::description("Returns float3(z,x,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11380) +]] +{ return float3( a.z, a.x, a.x); } + +export float3 zxy( float3 a) +[[ + anno::display_name("float3.ZXY"), + anno::description("Returns float3(z,x,y)."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11390) +]] +{ return float3( a.z, a.x, a.y); } + +export float3 zxz( float3 a) +[[ + anno::display_name("ZXZ from float3"), + anno::description("Returns float3(z,x,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11400) +]] +{ return float3( a.z, a.x, a.z); } + +export float3 zyx( float3 a) +[[ + anno::display_name("ZYX from float3"), + anno::description("Returns float3(z,y,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11410) +]] +{ return float3( a.z, a.y, a.x); } + +export float3 zyy( float3 a) +[[ + anno::display_name("ZYY from float3"), + anno::description("Returns float3(z,y,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11420) +]] +{ return float3( a.z, a.y, a.y); } + +export float3 zyz( float3 a) +[[ + anno::display_name("ZYZ from float3"), + anno::description("Returns float3(z,y,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11430) +]] +{ return float3( a.z, a.y, a.z); } + +export float3 zzx( float3 a) +[[ + anno::display_name("ZZX from float3"), + anno::description("Returns float3(z,z,x) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11440) +]] +{ return float3( a.z, a.z, a.x); } + +export float3 zzy( float3 a) +[[ + anno::display_name("ZZY from float3"), + anno::description("Returns float3(z,z,y) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11450) +]] +{ return float3( a.z, a.z, a.y); } + +export float3 zzz( float3 a) +[[ + anno::display_name("ZZZ from float3"), + anno::description("Returns float3(z,z,z) from float3."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11460) +]] +{ return float3( a.z, a.z, a.z); } + +export float3 xxx( float4 a) +[[ + anno::display_name("XXX from float4"), + anno::description("Returns float3(x,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11202) +]] +{ return float3( a.x, a.x, a.x); } + +export float3 xxy( float4 a) +[[ + anno::display_name("XXY from float4"), + anno::description("Returns float3(x,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11212) +]] +{ return float3( a.x, a.x, a.y); } + +export float3 xxz( float4 a) +[[ + anno::display_name("XXZ from float4"), + anno::description("Returns float3(x,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11222) +]] +{ return float3( a.x, a.x, a.z); } + +export float3 xxw( float4 a) +[[ + anno::display_name("XXW from float4"), + anno::description("Returns float3(x,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11227) +]] +{ return float3( a.x, a.x, a.w); } + +export float3 xyx( float4 a) +[[ + anno::display_name("XYX from float4"), + anno::description("Returns float3(x,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11232) +]] +{ return float3( a.x, a.y, a.x); } + +export float3 xyy( float4 a) +[[ + anno::display_name("XYY from float4"), + anno::description("Returns float3(x,y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11242) +]] +{ return float3( a.x, a.y, a.y); } + +export float3 xyw( float4 a) +[[ + anno::display_name("XYW from float4"), + anno::description("Returns float3(x,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11295) +]] +{ return float3( a.x, a.y, a.w); } + +export float3 xzx( float4 a) +[[ + anno::display_name("XZX from float4"), + anno::description("Returns float3(x,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11301) +]] +{ return float3( a.x, a.z, a.x); } + +export float3 xzy( float4 a) +[[ + anno::display_name("XZY from float4"), + anno::description("Returns float3(x,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11311) +]] +{ return float3( a.x, a.z, a.y); } + +export float3 xzz( float4 a) +[[ + anno::display_name("XZZ from float4"), + anno::description("Returns float3(x,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11321) +]] +{ return float3( a.x, a.z, a.z); } + +export float3 xzw( float4 a) +[[ + anno::display_name("XZW from float4"), + anno::description("Returns float3(x,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11600) +]] +{ return float3( a.x, a.z, a.w); } + +export float3 xwx( float4 a) +[[ + anno::display_name("XWX from float4"), + anno::description("Returns float3(x,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11604) +]] +{ return float3( a.x, a.w, a.x); } + +export float3 xwy( float4 a) +[[ + anno::display_name("XWY from float4"), + anno::description("Returns float3(x,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11608) +]] +{ return float3( a.x, a.w, a.y); } + +export float3 xwz( float4 a) +[[ + anno::display_name("XWZ from float4"), + anno::description("Returns float3(x,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11612) +]] +{ return float3( a.x, a.w, a.z); } + +export float3 xww( float4 a) +[[ + anno::display_name("XWW from float4"), + anno::description("Returns float3(x,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11616) +]] +{ return float3( a.x, a.w, a.w); } + +export float3 yxx( float4 a) +[[ + anno::display_name("YXX from float4"), + anno::description("Returns float3(y,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11252) +]] +{ return float3( a.y, a.x, a.x); } + +export float3 yxy( float4 a) +[[ + anno::display_name("YXY from float4"), + anno::hidden(), + anno::description("Returns float3(y,x,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11262) +]] +{ return float3( a.y, a.x, a.y); } + +export float3 yxz( float4 a) +[[ + anno::display_name("YXZ from float4"), + anno::description("Returns float3(y,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11331) +]] +{ return float3( a.y, a.x, a.z); } + +export float3 yxw( float4 a) +[[ + anno::display_name("YXW from float4"), + anno::description("Returns float3(y,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11630) +]] +{ return float3( a.y, a.x, a.w); } + +export float3 yyx( float4 a) +[[ + anno::display_name("YYX from float4"), + anno::description("Returns float3(y,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11272) +]] +{ return float3( a.y, a.y, a.x); } + +export float3 yyy( float4 a) +[[ + anno::display_name("YYY from float4"), + anno::description("Returns float3(y,y,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11282) +]] +{ return float3( a.y, a.y, a.y); } + +export float3 yyz( float4 a) +[[ + anno::display_name("YYZ from float4"), + anno::description("Returns float3(y,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11341) +]] +{ return float3( a.y, a.y, a.z); } + +export float3 yzx( float4 a) +[[ + anno::display_name("YZX from float4"), + anno::description("Returns float3(y,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11351) +]] +{ return float3( a.y, a.z, a.x); } + +export float3 yzy( float4 a) +[[ + anno::display_name("YZY from float4"), + anno::description("Returns float3(y,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11361) +]] +{ return float3( a.y, a.z, a.y); } + +export float3 yzz( float4 a) +[[ + anno::display_name("YZZ from float4"), + anno::description("Returns float3(y,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11371) +]] +{ return float3( a.y, a.z, a.z); } + +export float3 yzw( float4 a) +[[ + anno::display_name("YZW from float4"), + anno::description("Returns float3(y,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11650) +]] +{ return float3( a.y, a.z, a.w); } + +export float3 ywx( float4 a) +[[ + anno::display_name("YWX from float4"), + anno::description("Returns float3(y,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11653) +]] +{ return float3( a.y, a.w, a.x); } + +export float3 ywy( float4 a) +[[ + anno::display_name("YWY from float4"), + anno::description("Returns float3(y,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11656) +]] +{ return float3( a.y, a.w, a.y); } + +export float3 ywz( float4 a) +[[ + anno::display_name("YWZ from float4"), + anno::description("Returns float3(y,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11658) +]] +{ return float3( a.y, a.w, a.z); } + +export float3 yww( float4 a) +[[ + anno::display_name("YWW from float4"), + anno::description("Returns float3(y,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11661) +]] +{ return float3( a.y, a.w, a.w); } + +export float3 zxx( float4 a) +[[ + anno::display_name("ZXX from float4"), + anno::description("Returns float3(z,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11381) +]] +{ return float3( a.z, a.x, a.x); } + +export float3 zxy( float4 a) +[[ + anno::display_name("ZXY from float4"), + anno::description("Returns float3(z,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11391) +]] +{ return float3( a.z, a.x, a.y); } + +export float3 zxz( float4 a) +[[ + anno::display_name("ZXZ from float4"), + anno::description("Returns float3(z,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11401) +]] +{ return float3( a.z, a.x, a.z); } + +export float3 zxw( float4 a) +[[ + anno::display_name("ZXW from float4"), + anno::description("Returns float3(z,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11671) +]] +{ return float3( a.z, a.x, a.w); } + +export float3 zyx( float4 a) +[[ + anno::display_name("ZYX from float4"), + anno::description("Returns float3(z,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11411) +]] +{ return float3( a.z, a.y, a.x); } + +export float3 zyy( float4 a) +[[ + anno::display_name("ZYY from float4"), + anno::description("Returns float3(z,y,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11421) +]] +{ return float3( a.z, a.y, a.y); } + +export float3 zyz( float4 a) +[[ + anno::display_name("ZYZ from float4"), + anno::description("Returns float3(z,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11431) +]] +{ return float3( a.z, a.y, a.z); } + +export float3 zyw( float4 a) +[[ + anno::display_name("ZYW from float4"), + anno::description("Returns float3(z,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11432) +]] +{ return float3( a.z, a.y, a.w); } + +export float3 zzx( float4 a) +[[ + anno::display_name("ZZX from float4"), + anno::description("Returns float3(z,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11441) +]] +{ return float3( a.z, a.z, a.x); } + +export float3 zzy( float4 a) +[[ + anno::display_name("ZZY from float4"), + anno::description("Returns float3(z,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11451) +]] +{ return float3( a.z, a.z, a.y); } + +export float3 zzz( float4 a) +[[ + anno::display_name("ZZZ from float4"), + anno::hidden(), + anno::description("Returns float3(z,z,z) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11461) +]] +{ return float3( a.z, a.z, a.z); } + +export float3 zzw( float4 a) +[[ + anno::display_name("ZZW from float4"), + anno::description("Returns float3(z,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11465) +]] +{ return float3( a.z, a.z, a.w); } + +export float3 zwx( float4 a) +[[ + anno::display_name("ZWX from float4"), + anno::description("Returns float3(z,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11468) +]] +{ return float3( a.z, a.w, a.x); } + +export float3 zwy( float4 a) +[[ + anno::display_name("ZWY from float4"), + anno::description("Returns float3(z,w,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11471) +]] +{ return float3( a.z, a.w, a.y); } + +export float3 zwz( float4 a) +[[ + anno::display_name("ZWZ from float4"), + anno::description("Returns float3(z,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11475) +]] +{ return float3( a.z, a.w, a.z); } + +export float3 zww( float4 a) +[[ + anno::display_name("ZWW from float4"), + anno::description("Returns float3(z,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11479) +]] +{ return float3( a.z, a.w, a.w); } + +export float3 wxx( float4 a) +[[ + anno::display_name("WXX from float4"), + anno::description("Returns float3(w,x,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11483) +]] +{ return float3( a.w, a.x, a.x); } + +export float3 wxy( float4 a) +[[ + anno::display_name("WXY from float4"), + anno::description("Returns float3(w,x,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11487) +]] +{ return float3( a.w, a.x, a.y); } + +export float3 wxz( float4 a) +[[ + anno::display_name("WXZ from float4"), + anno::description("Returns float3(w,x,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11490) +]] +{ return float3( a.w, a.x, a.z); } + +export float3 wxw( float4 a) +[[ + anno::display_name("WXW from float4"), + anno::description("Returns float3(w,x,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11496) +]] +{ return float3( a.w, a.x, a.w); } + +export float3 wyx( float4 a) +[[ + anno::display_name("WYX from float4"), + anno::description("Returns float3(w,y,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11503) +]] +{ return float3( a.w, a.y, a.x); } + +export float3 wyy( float4 a) +[[ + anno::display_name("WYY from float4"), + anno::description("Returns float3(w,y,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11507) +]] +{ return float3( a.w, a.y, a.y); } + +export float3 wyz( float4 a) +[[ + anno::display_name("WYZ from float4"), + anno::description("Returns float3(w,y,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11510) +]] +{ return float3( a.w, a.y, a.z); } + +export float3 wyw( float4 a) +[[ + anno::display_name("WYW from float4"), + anno::description("Returns float3(w,y,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11514) +]] +{ return float3( a.w, a.y, a.w); } + +export float3 wzx( float4 a) +[[ + anno::display_name("WZX from float4"), + anno::description("Returns float3(w,z,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11518) +]] +{ return float3( a.w, a.z, a.x); } + +export float3 wzy( float4 a) +[[ + anno::display_name("WZY from float4"), + anno::description("Returns float3(w,z,y) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11521) +]] +{ return float3( a.w, a.z, a.y); } + +export float3 wzz( float4 a) +[[ + anno::display_name("WZZ from float4"), + anno::description("Returns float3(w,z,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11524) +]] +{ return float3( a.w, a.z, a.z); } + +export float3 wzw( float4 a) +[[ + anno::display_name("WZW from float4"), + anno::description("Returns float3(w,z,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11529) +]] +{ return float3( a.w, a.z, a.w); } + +export float3 wwx( float4 a) +[[ + anno::display_name("WWX from float4"), + anno::description("Returns float3(w,w,x) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11533) +]] +{ return float3( a.w, a.w, a.x); } + +export float3 wwy( float4 a) +[[ + anno::display_name("WWY from float4"), + anno::hidden(), + anno::description("Returns float3(w,w,y) from float4."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11537) +]] +{ return float3( a.w, a.w, a.y); } + +export float3 wwz( float4 a) +[[ + anno::display_name("WWZ from float4"), + anno::description("Returns float3(w,w,z) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11541) +]] +{ return float3( a.w, a.w, a.z); } + +export float3 www( float4 a) +[[ + anno::display_name("WWW from float4"), + anno::description("Returns float3(w,w,w) from float4."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11544) +]] +{ return float3( a.w, a.w, a.w); } + +export float3 xxx( color a) +[[ + anno::display_name("XXX from color"), + anno::description("Returns float3(x,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11203) +]] +{ return xxx( float3(a)); } + +export float3 xxy( color a) +[[ + anno::display_name("XXY from color"), + anno::description("Returns float3(x,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11213) +]] +{ return xxy( float3(a)); } + +export float3 xxz( color a) +[[ + anno::display_name("XXZ from color"), + anno::description("Returns float3(x,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11223) +]] +{ return xxz( float3(a)); } + +export float3 xyx( color a) +[[ + anno::display_name("XYX from color"), + anno::description("Returns float3(x,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11233) +]] +{ return xyx( float3(a)); } + +export float3 xyy( color a) +[[ + anno::display_name("XYY from color"), + anno::description("Returns float3(x,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11243) +]] +{ return xyy( float3(a)); } + +export float3 xyz( color a) +[[ + anno::display_name("XYZ from color"), + anno::description("Returns float3(x,y,z) from color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11292) +]] +{ return xyz( float3(a)); } + +export float3 xzx( color a) +[[ + anno::display_name("XZX from color"), + anno::description("Returns float3(x,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11302) +]] +{ return xzx( float3(a)); } + +export float3 xzy( color a) +[[ + anno::display_name("XZY from color"), + anno::description("Returns float3(x,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11312) +]] +{ return xzy( float3(a)); } + +export float3 xzz( color a) +[[ + anno::display_name("XZZ from color"), + anno::description("Returns float3(x,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11323) +]] +{ return xzz( float3(a)); } + +export float3 yxx( color a) +[[ + anno::display_name("YXX from color"), + anno::description("Returns float3(y,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11253) +]] +{ return yxx( float3(a)); } + +export float3 yxy( color a) +[[ + anno::display_name("YXY from color"), + anno::description("Returns float3(y,x,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11263) +]] +{ return yxy( float3(a)); } + +export float3 yxz( color a) +[[ + anno::display_name("YXZ from color"), + anno::description("Returns float3(y,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11332) +]] +{ return yxz( float3(a)); } + +export float3 yyx( color a) +[[ + anno::display_name("YYX from color"), + anno::description("Returns float3(y,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11273) +]] +{ return yyx( float3(a)); } + +export float3 yyy( color a) +[[ + anno::display_name("YYY from color"), + anno::description("Returns float3(y,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11283) +]] +{ return yyy( float3(a)); } + +export float3 yyz( color a) +[[ + anno::display_name("YYZ from color"), + anno::description("Returns float3(y,y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11342) +]] +{ return yyz( float3(a)); } + +export float3 yzx( color a) +[[ + anno::display_name("YZX from color"), + anno::description("Returns float3(y,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11352) +]] +{ return yzx( float3(a)); } + +export float3 yzy( color a) +[[ + anno::display_name("YZY from color"), + anno::description("Returns float3(y,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11362) +]] +{ return yzy( float3(a)); } + +export float3 yzz( color a) +[[ + anno::display_name("YZZ from color"), + anno::description("Returns float3(y,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11372) +]] +{ return yzz( float3(a)); } + +export float3 zxx( color a) +[[ + anno::display_name("ZXX from color"), + anno::description("Returns float3(z,x,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11382) +]] +{ return zxx( float3(a)); } + +export float3 zxy( color a) +[[ + anno::display_name("ZXY from color"), + anno::description("Returns float3(z,x,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11392) +]] +{ return zxy( float3(a)); } + +export float3 zxz( color a) +[[ + anno::display_name("ZXZ from color"), + anno::description("Returns float3(z,x,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11402) +]] +{ return zxz( float3(a)); } + +export float3 zyx( color a) +[[ + anno::display_name("ZYX from color"), + anno::description("Returns float3(z,y,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11412) +]] +{ return zyx( float3(a)); } + +export float3 zyy( color a) +[[ + anno::display_name("ZYY from color"), + anno::description("Returns float3(z,y,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11422) +]] +{ return zyy( float3(a)); } + +export float3 zyz( color a) +[[ + anno::display_name("ZYZ from color"), + anno::description("Returns float3(z,y,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11432) +]] +{ return zyz( float3(a)); } + +export float3 zzx( color a) +[[ + anno::display_name("ZZX from color"), + anno::description("Returns float3(z,z,x) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11442) +]] +{ return zzx( float3(a)); } + +export float3 zzy( color a) +[[ + anno::display_name("ZZY from color"), + anno::description("Returns float3(z,z,y) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11452) +]] +{ return zzy( float3(a)); } + +export float3 zzz( color a) +[[ + anno::display_name("ZZZ from color"), + anno::description("Returns float3(z,z,z) from color."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11462) +]] +{ return zzz( float3(a)); } + +export float3 xxx( texture_return a) +[[ + anno::display_name("XXX from texture_return"), + anno::description("Returns float3(x,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11204) +]] +{ return xxx(texture_return_float4(a)); } + +export float3 xxy( texture_return a) +[[ + anno::display_name("XXY from texture_return"), + anno::description("Returns float3(x,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11214) +]] +{ return xxy(texture_return_float4(a)); } + +export float3 xxz( texture_return a) +[[ + anno::display_name("XXZ from texture_return"), + anno::description("Returns float3(x,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11224) +]] +{ return xxz(texture_return_float4(a)); } + +export float3 xxw( texture_return a) +[[ + anno::display_name("XXW from texture_return"), + anno::description("Returns float3(x,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11229) +]] +{ return xxw(texture_return_float4(a)); } + +export float3 xyx( texture_return a) +[[ + anno::display_name("XYX from texture_return"), + anno::description("Returns float3(x,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11234) +]] +{ return xyx(texture_return_float4(a)); } + +export float3 xyy( texture_return a) +[[ + anno::display_name("XYY from texture_return"), + anno::description("Returns float3(x,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11244) +]] +{ return xyy(texture_return_float4(a)); } + +export float3 xyz( texture_return a) +[[ + anno::display_name("XYZ from texture_return"), + anno::description("Returns float3(x,y,z) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11293) +]] +{ return xyz(texture_return_float4(a)); } + +export float3 xyw( texture_return a) +[[ + anno::display_name("XYW from texture_return"), + anno::description("Returns float3(x,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11296) +]] +{ return xyw(texture_return_float4(a)); } + +export float3 xzx( texture_return a) +[[ + anno::display_name("XZX from texture_return"), + anno::description("Returns float3(x,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11303) +]] +{ return xzx(texture_return_float4(a)); } + +export float3 xzy( texture_return a) +[[ + anno::display_name("XZY from texture_return"), + anno::description("Returns float3(x,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(1131) +]] +{ return xzy(texture_return_float4(a)); } + +export float3 xzz( texture_return a) +[[ + anno::display_name("XZZ from texture_return"), + anno::description("Returns float3(x,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11321) +]] +{ return xzz(texture_return_float4(a)); } + +export float3 xzw( texture_return a) +[[ + anno::display_name("XZW from texture_return"), + anno::description("Returns float3(x,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11601) +]] +{ return xzw(texture_return_float4(a)); } + +export float3 xwx( texture_return a) +[[ + anno::display_name("XWX from texture_return"), + anno::description("Returns float3(x,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11605) +]] +{ return xwx(texture_return_float4(a)); } + +export float3 xwy( texture_return a) +[[ + anno::display_name("XWY from texture_return"), + anno::description("Returns float3(x,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11609) +]] +{ return xwy(texture_return_float4(a)); } + +export float3 xwz( texture_return a) +[[ + anno::display_name("XWZ from texture_return"), + anno::description("Returns float3(x,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11613) +]] +{ return xwz(texture_return_float4(a)); } + +export float3 xww( texture_return a) +[[ + anno::display_name("XWW from texture_return"), + anno::description("Returns float3(x,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11617) +]] +{ return xww(texture_return_float4(a)); } + +export float3 yxx( texture_return a) +[[ + anno::display_name("YXX from texture_return"), + anno::description("Returns float3(y,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11254) +]] +{ return yxx(texture_return_float4(a)); } + +export float3 yxy( texture_return a) +[[ + anno::display_name("YXY from texture_return"), + anno::description("Returns float3(y,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11264) +]] +{ return yxy(texture_return_float4(a)); } + +export float3 yxz( texture_return a) +[[ + anno::display_name("YXZ from texture_return"), + anno::description("Returns float3(y,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11333) +]] +{ return yxz(texture_return_float4(a)); } + +export float3 yxw( texture_return a) +[[ + anno::display_name("YXW from texture_return"), + anno::description("Returns float3(y,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11631) +]] +{ return yxw(texture_return_float4(a)); } + +export float3 yyx( texture_return a) +[[ + anno::display_name("YYX from texture_return"), + anno::description("Returns float3(y,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11274) +]] +{ return yyx(texture_return_float4(a)); } + +export float3 yyy( texture_return a) +[[ + anno::display_name("YYY from texture_return"), + anno::description("Returns float3(y,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11284) +]] +{ return yyy(texture_return_float4(a)); } + +export float3 yyz( texture_return a) +[[ + anno::display_name("YYZ from texture_return"), + anno::description("Returns float3(y,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11344) +]] +{ return yyz(texture_return_float4(a)); } + +export float3 yyw( texture_return a) +[[ + anno::display_name("YYW from texture_return"), + anno::description("Returns float3(y,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11641) +]] +{ return yyw(texture_return_float4(a)); } + +export float3 yzx( texture_return a) +[[ + anno::display_name("YZX from texture_return"), + anno::description("Returns float3(y,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11354) +]] +{ return yzx(texture_return_float4(a)); } + +export float3 yzy( texture_return a) +[[ + anno::display_name("YZY from texture_return"), + anno::description("Returns float3(y,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11363) +]] +{ return yzy(texture_return_float4(a)); } + +export float3 yzz( texture_return a) +[[ + anno::display_name("YZZ from texture_return"), + anno::description("Returns float3(y,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11373) +]] +{ return yzz(texture_return_float4(a)); } + +export float3 yzw( texture_return a) +[[ + anno::display_name("YZW from texture_return"), + anno::description("Returns float3(y,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11651) +]] +{ return yzw(texture_return_float4(a)); } + +export float3 ywx( texture_return a) +[[ + anno::display_name("YWX from texture_return"), + anno::description("Returns float3(y,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11654) +]] +{ return ywx(texture_return_float4(a)); } + +export float3 ywy( texture_return a) +[[ + anno::display_name("YWY from texture_return"), + anno::description("Returns float3(y,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11657) +]] +{ return ywy(texture_return_float4(a)); } + +export float3 ywz( texture_return a) +[[ + anno::display_name("YXZ from texture_return"), + anno::description("Returns float3(y,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11659) +]] +{ return ywz(texture_return_float4(a)); } + +export float3 yww( texture_return a) +[[ + anno::display_name("YWW from texture_return"), + anno::description("Returns float3(y,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11662) +]] +{ return yww(texture_return_float4(a)); } + +export float3 zxx( texture_return a) +[[ + anno::display_name("ZXX from texture_return"), + anno::description("Returns float3(z,x,x) from texture_return."), + anno::author("NVIDIA Corporation"), + anno::hidden(), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11383) +]] +{ return zxx(texture_return_float4(a)); } + +export float3 zxy( texture_return a) +[[ + anno::display_name("ZXY from texture_return"), + anno::description("Returns float3(z,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11394) +]] +{ return zxy(texture_return_float4(a)); } + +export float3 zxz( texture_return a) +[[ + anno::display_name("ZXZ from texture_return"), + anno::description("Returns float3(z,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11403) +]] +{ return zxz(texture_return_float4(a)); } + +export float3 zxw( texture_return a) +[[ + anno::display_name("ZXW from texture_return"), + anno::description("Returns float3(z,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11672) +]] +{ return zxw(texture_return_float4(a)); } + +export float3 zyx( texture_return a) +[[ + anno::display_name("ZYX from texture_return"), + anno::description("Returns float3(z,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11413) +]] +{ return zyx(texture_return_float4(a)); } + +export float3 zyy( texture_return a) +[[ + anno::display_name("ZYY from texture_return"), + anno::description("Returns float3(z,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11423) +]] +{ return zyy(texture_return_float4(a)); } + +export float3 zyz( texture_return a) +[[ + anno::display_name("ZYZ from texture_return"), + anno::description("Returns float3(z,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11433) +]] +{ return zyz(texture_return_float4(a)); } + +export float3 zyw( texture_return a) +[[ + anno::display_name("ZYW from texture_return"), + anno::description("Returns float3(z,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11433) +]] +{ return zyw(texture_return_float4(a)); } + +export float3 zzx( texture_return a) +[[ + anno::display_name("ZZX from texture_return"), + anno::description("Returns float3(z,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11443) +]] +{ return zzx(texture_return_float4(a)); } + +export float3 zzy( texture_return a) +[[ + anno::display_name("ZZY from texture_return"), + anno::description("Returns float3(z,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11453) +]] +{ return zzy(texture_return_float4(a)); } + +export float3 zzz( texture_return a) +[[ + anno::display_name("ZZZ from texture_return"), + anno::description("Returns float3(z,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11463) +]] +{ return zzz(texture_return_float4(a)); } + +export float3 zzw( texture_return a) +[[ + anno::display_name("ZZW from texture_return"), + anno::description("Returns float3(z,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11466) +]] +{ return zzw(texture_return_float4(a)); } + +export float3 zwx( texture_return a) +[[ + anno::display_name("ZWX from texture_return"), + anno::description("Returns float3(z,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11468) +]] +{ return zwx(texture_return_float4(a)); } + +export float3 zwy( texture_return a) +[[ + anno::display_name("ZWY from texture_return"), + anno::description("Returns float3(z,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11472) +]] +{ return zwy(texture_return_float4(a)); } + +export float3 zwz( texture_return a) +[[ + anno::display_name("ZWZ from texture_return"), + anno::description("Returns float3(z,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11476) +]] +{ return zwz(texture_return_float4(a)); } + +export float3 zww( texture_return a) +[[ + anno::display_name("texture_return.ZWW"), + anno::description("Returns float3(z,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11480) +]] +{ return zww(texture_return_float4(a)); } + +export float3 wxx( texture_return a) +[[ + anno::display_name("WXX from texture_return"), + anno::description("Returns float3(w,x,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11484) +]] +{ return wxx(texture_return_float4(a)); } + +export float3 wxy( texture_return a) +[[ + anno::display_name("WXY from texture_return"), + anno::description("Returns float3(w,x,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11488) +]] +{ return wxy(texture_return_float4(a)); } + +export float3 wxz( texture_return a) +[[ + anno::display_name("WXZ from texture_return"), + anno::description("Returns float3(w,x,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11493) +]] +{ return wxz(texture_return_float4(a)); } + +export float3 wxw( texture_return a) +[[ + anno::display_name("WXW from texture_return"), + anno::description("Returns float3(w,x,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11500) +]] +{ return wxw(texture_return_float4(a)); } + +export float3 wyx( texture_return a) +[[ + anno::display_name("WYX from texture_return"), + anno::description("Returns float3(w,y,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(1150) +]] +{ return wyx(texture_return_float4(a)); } + +export float3 wyy( texture_return a) +[[ + anno::display_name("WYY from texture_return"), + anno::description("Returns float3(w,y,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11508) +]] +{ return wyy(texture_return_float4(a)); } + +export float3 wyz( texture_return a) +[[ + anno::display_name("WYZ from texture_return"), + anno::description("Returns float3(w,y,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11511) +]] +{ return wyz(texture_return_float4(a)); } + +export float3 wyw( texture_return a) +[[ + anno::display_name("WYW from texture_return"), + anno::description("Returns float3(w,y,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11515) +]] +{ return wyw(texture_return_float4(a)); } + +export float3 wzx( texture_return a) +[[ + anno::display_name("WZX from texture_return"), + anno::description("Returns float3(w,z,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11519) +]] +{ return wzx(texture_return_float4(a)); } + +export float3 wzy( texture_return a) +[[ + anno::display_name("WZY from texture_return"), + anno::description("Returns float3(w,z,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11522) +]] +{ return wzy(texture_return_float4(a)); } + +export float3 wzz( texture_return a) +[[ + anno::display_name("WZZ from texture_return"), + anno::description("Returns float3(w,z,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11525) +]] +{ return wzz(texture_return_float4(a)); } + +export float3 wzw( texture_return a) +[[ + anno::display_name("WZW from texture_return"), + anno::description("Returns float3(w,z,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11530) +]] +{ return wzw(texture_return_float4(a)); } + +export float3 wwx( texture_return a) +[[ + anno::display_name("WWWX from texture_return"), + anno::description("Returns float3(w,w,x) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11533) +]] +{ return wwx(texture_return_float4(a)); } + +export float3 wwy( texture_return a) +[[ + anno::display_name("WWY from texture_return"), + anno::description("Returns float3(w,w,y) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11538) +]] +{ return wwy(texture_return_float4(a)); } + +export float3 wwz( texture_return a) +[[ + anno::display_name("WWZ from texture_return"), + anno::description("Returns float3(w,w,z) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11541) +]] +{ return wwz(texture_return_float4(a)); } + +export float3 www( texture_return a) +[[ + anno::display_name("WWW from texture_return"), + anno::description("Returns float3(w,w,w) from texture_return."), + anno::hidden(), + anno::author("NVIDIA Corporation"), + anno::in_group("Channel", "Float3"), + icon(".icons/component_extract.svg"), + anno::ui_order(11545) +]] +{ return www(texture_return_float4(a)); } diff --git a/yaskawa_motoman_next_nex10/materials/mdl/core_definitions.mdl b/yaskawa_motoman_next_nex10/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/yaskawa_motoman_next_nex10/materials/mdl/core_definitions.mdl @@ -0,0 +1,5806 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + + +// The "//group ... //endgroup" comments are used during the +// procedural creation of this module's documentation. +mdl 1.8; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::limits::*; +import ::base::*; +import ::tex::*; +import ::anno::*; +export using ::base import texture_return; +export using ::base import mono_mode; +export using ::base import color_layer_mode; +import support_definitions::*; +module [[ + anno::version( 2, 2, 0), + anno::display_name("NVIDIA core definitions") +]]; + +export annotation icon(string path); + +const string COPYRIGHT = "Copyright 2023 NVIDIA Corporation. All rights reserved."; + +//some local functions, dont document + +// https://www.shadertoy.com/view/4djSRW +float2 hash22(float2 p) +{ + float3 p3 = math::frac(float3(p.x, p.y, p.x) * float3(0.1031, 0.1030, 0.0973)); + p3 += math::dot(p3, float3(p3.y, p3.z, p3.x) + 33.33); + return math::frac((float2(p3.x, p3.x) + float2(p3.y, p3.z)) * float2(p3.z, p3.y)); +} + +// Christophe Schlick. “Fast Alternatives to Perlin’s Bias and Gain Functions”. +// In Graphics Gems IV, Morgan Kaufmann, 1994, pages 401–403. +// https://dept-info.labri.fr/~schlick/DOC/gem2.html +float schlick_gain(float x, float r) +{ + float rr = math::clamp(r, 0.001, 0.999); // to avoid glitch + float a = (1.0 / rr - 2.0) * (1.0 - 2.0 * x); + return (x < 0.5) ? x / (a + 1.0) : (a - x) / (a - 1.0); +} + +// blend two normals, similar to +// http://blog.selfshadow.com/publications/blending-in-detail/ +export float3 blend_normals( + float3 base_normal = state::normal() + [[ + anno::description("The base normal") + ]], + float base_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the base normal using a linear blend between state::normal and \"base_normal\""), + anno::soft_range(0.0,1.0) + ]], + float3 detail_normal = state::normal() + [[ + anno::description("The detail normal") + ]], + float detail_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\""), + anno::soft_range(0.0,1.0) + ]] +) +[[ + anno::description("Blend two normals or apply a detail normal map"), + anno::display_name("Blend normals"), + anno::thumbnail(".thumbs/blend_normals.png"), + anno::in_group("Texturing", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(33), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT)]] +{ + return base::blend_normals(base_normal,base_normal_weight,detail_normal,detail_normal_weight); +} +// blend 3 normals, similar to +// http://blog.selfshadow.com/publications/blending-in-detail/ +//TODO: make public? +float3 blend_3_normals( + float3 base_normal = state::normal() + [[ + anno::description("The base normal") + ]], + float base_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the base normal using a linear blend between state::normal and \"base_normal\"") + ]], + float3 detail_normal = state::normal() + [[ + anno::description("The detail normal") + ]], + float detail_normal_weight = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\"") + ]], + float3 detail_normal2 = state::normal() + [[ + anno::description("The detail normal2") + ]], + float detail_normal_weight2 = 1.0f + [[ + anno::description("Specifies the strength of the detail normal using a linear blend between state::normal and \"detail_normal\"") + ]] +) +[[ + anno::description("Blend three normals for sticker-like situations where a detail normal map is applied to a base normal map"), + anno::noinline() +]] +{ + float3 tu = state::texture_tangent_u(0); + float3 tv = state::texture_tangent_v(0); + float3 n = state::normal(); + + float w1 = math::saturate(base_normal_weight); + float w2 = math::saturate(detail_normal_weight); + float w3 = math::saturate(detail_normal_weight2); + + float3 n1_t = math::normalize( + float3(math::dot(tu, base_normal) * w1, + math::dot(tv, base_normal) * w1, + math::dot(n, base_normal) * w1 + 1.0f - w1)); + float3 n2_t = math::normalize( + float3(math::dot(tu, detail_normal) * w2, + math::dot(tv, detail_normal) * w2, + math::dot(n, detail_normal) * w2 + 1.0f - w2)); + float3 n3_t = math::normalize( + float3(math::dot(tu, detail_normal2) * w3, + math::dot(tv, detail_normal2) * w3, + math::dot(n, detail_normal2) * w3 + 1.0f - w3)); + + n1_t.z += 1.0f; + n2_t.x = -n2_t.x; + n2_t.y = -n2_t.y; + + float3 n12_t = n1_t * math::dot(n1_t, n2_t) / n1_t.z - n2_t; + + n12_t.z+= 1.0f; + n3_t.x = -n3_t.x; + n3_t.y = -n3_t.y; + float3 n_t = n12_t * math::dot(n12_t, n3_t) / n12_t.z - n3_t; + + return math::normalize( + tu * n_t.x + + tv * n_t.y + + n * n_t.z); +} + +// blend 3 normals by blending the gradients +// Morten S. Mikkelsen, Surface Gradient–Based Bump Mapping Framework, Journal of +// Computer Graphics Techniques (JCGT), vol. 9, no. 3, 60–90, 2020 +// http://jcgt.org/published/0009/03/04/ +float3 gradient_blend_3_normals( + float3 normal1 = state::normal(), + float normal1_weight = 1.0, + float3 normal2 = state::normal(), + float normal2_weight = 1.0, + float3 normal3 = state::normal(), + float normal3_weight = 1.0 +) +{ + float w1 = math::saturate(normal1_weight); + float w2 = math::saturate(normal2_weight); + float w3 = math::saturate(normal3_weight); + + // normal to gradient + float3 n = state::normal(); + float d1 = math::dot(n, normal1); + float d2 = math::dot(n, normal2); + float d3 = math::dot(n, normal3); + float3 g1 = (d1 * n - normal1) / math::max(limits::FLOAT_MIN, math::abs(d1)); + float3 g2 = (d2 * n - normal2) / math::max(limits::FLOAT_MIN, math::abs(d2)); + float3 g3 = (d3 * n - normal3) / math::max(limits::FLOAT_MIN, math::abs(d3)); + + // blend + float3 gg = w1 * g1 + w2 * g2 + w3 * g3; + + // gradient to normal + return math::normalize(n - gg); +} + +struct complex_ior +{ + color n; //refractive index + color k; //extinction coefficient +}; + + +//[Gulbrandsen2014] Ole Gulbrandsen, 2014. Artist friendly metallic fresnel. +complex_ior artistic_metal_to_complex_ior( + color reflectivity, + color edge_tint) +{ + float epsilon = 1.e-2; + color r = math::lerp(color(epsilon), color(1.0 - epsilon), reflectivity); + color g = edge_tint; + + color r_sqrt = math::sqrt(r); + color n_min = (1.0f - r) / (1.0f + r); + color n_max = (1.0f + r_sqrt) / (1.0f - r_sqrt); + + color n = math::lerp(n_max, n_min, g); + + color k2 = ((n + 1.0f) * (n + 1.0f) * r - (n - 1.0f) * (n - 1.0f)) / (1.0f - r); + k2 = math::max(k2, 0.0f); + color k = math::sqrt(k2); + + return complex_ior(n, k); +} + + + +float3x3 axis_rotation_matrix(float3 a, float r) +{ + float[2] sc = math::sincos(r); + float s = sc[0]; + float c = sc[1]; + float omc = 1.0 - c; + return float3x3( + a.x * a.x * omc + c, a.x * a.y * omc - a.x * s, a.x * a.z * omc + a.y * s, + a.y * a.x * omc + a.z * s, a.y * a.y * omc + c, a.y * a.z * omc - a.x * s, + a.z * a.x * omc - a.y * s, a.z * a.y * omc + a.x * s, a.z * a.z * omc + c + ); +} +float3 transform_rotate(float3 p, float3 r) +{ + // Euler rotation matrix xyz order to stay compatible with ::base + float3 s = math::sin(r); + float3 c = math::cos(r); + float3x3 rotate = + float3x3( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , + c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , + -s.y , s.x*c.y , c.x*c.y ); + return p*rotate; + +} +float3 transform_rotate_inv(float3 p, float3 r) +{ + // Euler rotation matrix xyz order to stay compatible with ::base + float3 s = math::sin(r); + float3 c = math::cos(r); + float3x3 rotate = + float3x3( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , + c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , + -s.y , s.x*c.y , c.x*c.y ); + return rotate*p; + +} + +//group Enumerations + +export enum material_type +[[ + anno::display_name("User interface group"), + anno::description("User interface grouping hint for materials"), + anno::hidden() +]] +{ + simple_material + [[ anno::description("Simple material") ]], + complex_material + [[ anno::description("Complex material") ]], + combiner_material + [[ anno::description("Combiner material") ]], + modifier_material + [[ anno::description("Material modifier") ]] +}; + +export enum emission_type +[[ + anno::display_name("Emission mode"), + anno::description("Emission mode definition for light sources"), + anno::hidden() +]] +{ + lumen_m2 + [[ anno::description("lumen/m2") ]], + lumen + [[ anno::description("lumen") ]], + candela + [[ anno::description("candela") ]], + nit + [[ anno::description("nit (candela/m2)") ]] +}; + +export enum cell_type +[[ + anno::display_name("Worley noise cell type"), + anno::description("Behavior of the Worley noise cell"), + anno::hidden() +]] +{ + simple_cells = 0 + [[ anno::description("Simple cells") ]], + crystal_cells = 1 + [[ anno::description("Crystal cells") ]], + bordered_cells = 2 + [[ anno::description("Bordered cells") ]] +}; + +export enum cell_base +[[ + anno::display_name("Worley noise cell shape"), + anno::description("Shape of the Worley noise cell"), + anno::hidden() +]] +{ + circular_cells = 0 + [[ anno::description("Circle base") ]], + diamond_cells = 1 + [[ anno::description("Diamond base") ]] +}; + +export enum displacement_vector_space +[[ + anno::display_name("Displacement mode"), + anno::description("Displacement Mode"), + anno::hidden() +]] +{ + // displacement_height = 0 // reserve this for now + // [[ anno::display_name("Height") ]], + + displacement_vector_tangent_space = 1 + [[ anno::display_name("Vector, Tangent Space") ]], + + displacement_vector_object_space = 2 + [[ anno::display_name("Vector, Object Space") ]], + + displacement_vector_world_space = 3 + [[ anno::display_name("Vector, World Space") ]] +}; + +//endgroup + +float3 transform_displacement_vector( + float3 displacement = float3(0.0) + [[ anno::description("Displacement vector") ]], + uniform displacement_vector_space space = displacement_vector_tangent_space + [[ anno::description("Space of the displacement vector") ]], + float scale = 1.0f + [[ anno::description("Displacement scale") ]] +) +[[ + anno::description("Transform input displacement vector to dispacement offset"), + anno::hidden() +]] +{ + float3 result; + switch (space) + { + // case displacement_height: + // result = state::normal() * displacement * scale; + // break; + + case displacement_vector_tangent_space: + result = state::texture_tangent_u(0) * displacement[0] * scale + + state::texture_tangent_v(0) * displacement[2] * scale + + state::normal() * displacement[1] * scale; + break; + + case displacement_vector_object_space: + result = state::transform_point( + state::coordinate_internal, + state::coordinate_object, + displacement * scale + ); + break; + + case displacement_vector_world_space: + result = state::transform_point( + state::coordinate_internal, + state::coordinate_world, + displacement * scale + ); + break; + + default: + result = state::position(); + break; + } + + return result; +} + +float4x4 rotation_translation_scale( + float3 rotation = float3(0.) + [[ anno::description("Rotation applied to every UVW coordinate") ]], + float3 translation = float3(0.) + [[ anno::description("Offset applied to every UVW coordinate") ]], + 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; +} + +export annotation suitable_as_light(); +export annotation type_of_material(material_type type); +export annotation dimension(float dimension); +export annotation dimension(float2 dimension); +export annotation dimension(float3 dimension); + + +//group Texturing functions + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +blend_colors( + color color_1 = color(0.0) + [[ anno::display_name("Color 1") ]], + color color_2 = color(1.0) + [[ anno::display_name("Color 2") ]], + uniform color_layer_mode mode = color_layer_blend + [[ + anno::description("Describes how Color 1 and Color 2 are combined"), + anno::display_name("Blend mode") + ]], + float weight = 1. + [[ + anno::description("Defines strength of the effect. At weight 0, only color 1 will be visible. At weight 1, the blend function will have full effect."), + anno::display_name("Blend weight"), + anno::soft_range(0.0,1.0) + ]], + uniform bool linear_blend = true + [[ + anno::description("The blend opperation can either be applied in linear or gamma (2.2) color space"), + anno::display_name("Linear blend") + ]] +) +[[ + anno::display_name("Blend colors"), + anno::description("Allows combining textures and colors in varied ways"), + anno::thumbnail(".thumbs/blend_colors.png"), + anno::in_group("Texturing", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(33), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + color c1 = linear_blend? color_1: math::pow(color_1,0.45); + color c2 = linear_blend? color_2: math::pow(color_2,0.45); + float w = linear_blend? weight: math::pow(weight,0.45); + texture_return r = base::blend_color_layers( + layers: base::color_layer[]( + base::color_layer( + layer_color: c2, + weight: w, + mode: mode + )), + base: c1 + ); + return linear_blend? r: texture_return(math::pow(r.tint,2.2),math::pow(r.mono,2.2)); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +file_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(0) + ]], + uniform mono_mode mono_source = mono_average + [[ + anno::display_name("Scalar mode"), + anno::description("Defines how the texture applies to scalar parameters"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(1) + ]], + uniform float brightness = 1. + [[ + anno::display_name("Brightness"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(2), + anno::soft_range(0.0,1.0) + ]], + uniform float contrast = 1. + [[ + anno::display_name("Contrast"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,1.0) + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture, color will be black and the scalar value will be 0."), + anno::display_name("Clip"), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(9) + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(5) + ]], + uniform bool invert = false + [[ + anno::description("Invert image"), + anno::display_name("Invert image"), + anno::in_group("Bitmap parameters"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("Bitmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(30), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return invert == false? base::file_texture( + texture: texture, + mono_source: mono_source, + color_offset: color(0.5*brightness-0.5*contrast*brightness), + color_scale: color(brightness*contrast), + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clip:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clip:tex::wrap_repeat + ): base::file_texture( + texture: texture, + mono_source: mono_source, + color_offset: color(1.0-0.5*brightness+0.5*contrast*brightness), + color_scale: color(-brightness*contrast), + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clip:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clip:tex::wrap_repeat + ); +} +export color triplanar_file_texture( + uniform texture_2d texture_1 + [[ + anno::display_name("Bitmap file"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(0), + anno::description("Primary texture used for triplanar projection (X axis, and fallback for missing optional textures).") + ]], + float2 scaling_1 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(1) + ]], + float2 translation_1 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(2) + ]], + float rotation_1 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,360.0) + ]], + uniform texture_2d texture_2 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(4), + anno::description("Optional texture used for the second triplanar projection axis (Y axis).") + ]], + float2 scaling_2 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(5) + ]], + float2 translation_2 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(6) + ]], + float rotation_2 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(7), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::soft_range(0.0,360.0) + ]], + uniform texture_2d texture_3 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8), + anno::description("Optional texture used for the third triplanar projection axis (Z axis).") + ]], + float2 scaling_3 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(9) + ]], + float2 translation_3 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(10) + ]], + float rotation_3 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(11), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::soft_range(0.0,360.0) + ]], + float blend_range = 0.5 + [[ + anno::description("Defines the size of the transition area. 0 means hard transition, 1 means blending happens very softly."), + anno::display_name("Blend range"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(14), + anno::hard_range(0.0,1.0) + ]], + uniform color mean = color(0.0) + [[ + anno::description("Allows tweaking of the blend function. A value of 0 disables the function."), + anno::display_name("Mean color"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(15), + anno::hard_range(color(0.0),color(1.0)) + ]], + uniform float3 rotate_origin = float3(0.0) + [[ + anno::description("Allows manual alignment of the projection with an object"), + anno::display_name("Rotation of origin"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(13), + anno::soft_range(float3(0.0),float3(360.0)) + ]], + uniform bool object_space = true + [[ + anno::description("If off, world space will be used for generating texture coordinates. If on, object space will apply."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(12) + ]] +) +[[ + anno::display_name("Triplanar Bitmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Triplanar"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(30), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + state::coordinate_space space = object_space?state::coordinate_object:state::coordinate_world; + + float3 normal = state::transform_normal(state::coordinate_internal, space, state::normal()); + float3 position = state::transform_point(state::coordinate_internal, space, state::position()); + //TODO: pretransform the space? At least rotating the original space seems desireable and more is not feasible without dedicated ui (gizmo) + normal = transform_rotate(normal, math::radians(rotate_origin)); + position = transform_rotate(position, math::radians(rotate_origin)); + + float3 weights = math::abs(normal); + + //TODO: blendrange through pow or is there something better? pow has the drawback of needing 3 lookups nearly always + weights /=math::max_value(weights); + weights = math::pow(weights,1./math::max(blend_range, 0.001)); + //weights = math::saturate(weights-float3(1.-blend_range)); + + weights /=float3(weights.x+weights.y+weights.z); + + + float2 st1 = normal.x>0?float2(-position.z,position.y):float2(-position.z,-position.y); + float2 st2 = normal.y>0?float2(-position.z,-position.x):float2(-position.z,position.x); + float2 st3 = normal.z>0?float2(-position.y,position.x):float2(-position.y,-position.x); + + color c1 = weights.x>0? + support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st1)) + :color(0.); + color c2 = weights.y>0? tex::texture_isvalid(texture_2)? + support_definitions::lookup_color( + texture_2, + support_definitions::transform_st(math::radians(rotation_2),translation_2,scaling_2,st2)) + :support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st2)) + :color(0.); + color c3 = weights.z>0? tex::texture_isvalid(texture_3)? + support_definitions::lookup_color( + texture_3, + support_definitions::transform_st(math::radians(rotation_3),translation_3,scaling_3,st3)) + :support_definitions::lookup_color( + texture_1, + support_definitions::transform_st(math::radians(rotation_1),translation_1,scaling_1,st3)) + :color(0.); + return mean == color(0.0)? + c1*weights.x + c2*weights.y+ c3*weights.z: + support_definitions::biased_color_blend(weights.x,c1,weights.y,c2,weights.z,c3,mean); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +perlin_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(1) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(2) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform int noise_levels = 3 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(6) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(5) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(11) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(10) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Perlin noise texture"), + anno::description("Enable texturing with a random noise pattern"), + anno::thumbnail(".thumbs/perlin_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Perlin"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(34), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::perlin_noise_texture( + color1: color1, + color2: color2, + noise_levels: noise_levels, + absolute_noise: absolute_noise, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 perlin_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,5.0), + anno::description("Overall bump intensity applied to the generated Perlin noise normal perturbation.") + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform int noise_levels = 1 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(2), + anno::description("Enables billowing noise by folding negative noise values into the positive range.") + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(3) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(8) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(6) + ]] +) +[[ + anno::display_name("Perlin noise texture -- bump mapping"), + anno::description("Enable bump-map texturing with a random noise pattern"), + anno::thumbnail(".thumbs/perlin_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Perlin"), + icon(".icons/perlin_noise_texture.svg"), + anno::ui_order(35), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::perlin_noise_bump_texture( + factor: factor, + noise_levels: noise_levels, + absolute_noise: absolute_noise, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +worley_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space") , + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(6) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(7) + ]], + uniform cell_type mode = simple_cells + [[ + anno::display_name("Cell type") , + anno::description("Cell pattern type"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(2) + ]], + uniform cell_base metric = circular_cells + [[ + anno::display_name("Cell shape") , + anno::description("The shape of the cell form"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(4) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(10) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(9) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(8) + ]]) +[[ + anno::display_name("Cellular noise texture"), + anno::description("Allow texturing with a cell forming pattern"), + anno::thumbnail(".thumbs/worley_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Worley"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(36), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::worley_noise_texture( + color1: color1, + color2: color2, + mode: mode==crystal_cells?2:mode==bordered_cells?3:0, + metric: metric, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 worley_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the generated Worley noise normal perturbation.") + ]], + uniform cell_base metric = circular_cells + [[ + anno::display_name("Cell shape") , + anno::description("The shape of the cell form"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = true + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(4) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(5) + ]], + uniform float noise_threshold_high = 1. + [[ + anno::hard_range(0.0,1.), + anno::description("Lowering this value will create bigger areas uniformly colored with Color 1"), + anno::display_name("Upper threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(3) + ]], + uniform float noise_threshold_low = 0. + [[ + anno::hard_range(0.0,1.), + anno::description("Increasing this value will create bigger areas uniformly colored with Color 2"), + anno::display_name("Lower threshold"), + anno::in_group("Noise parameters"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(2) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(8) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(7) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(6) + ]]) +[[ + anno::display_name("Cellular noise texture -- bump mapping"), + anno::description("Allow texturing with a cell forming pattern"), + anno::thumbnail(".thumbs/worley_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Worley"), + icon(".icons/cellular_noise_texture.svg"), + anno::ui_order(37), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::worley_noise_bump_texture( + factor: factor, + metric: metric, + noise_threshold_high: noise_threshold_high, + noise_threshold_low: noise_threshold_low, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +flow_noise_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(10) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(11) + ]], + uniform int noise_levels = 3 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(3) + + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(4) + + ]], + uniform float phase = 0.0 + [[ + anno::display_name("Phase offset"), + anno::description("Controls the third dimension of the function"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(5), + anno::soft_range(0.0,1.0) + ]], + uniform float level_gain = 0.5 + [[ + anno::display_name("Level intensity gain"), + anno::description("If multiple levels are used, this parameter specifies a weighting factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,1.0) + ]], + uniform float level_scale = 2.0 + [[ + anno::display_name("Level scaling"), + anno::description("If multiple levels are used, this parameter specifies a global scaling factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(7), + anno::soft_range(0.0,4.0) + ]], + uniform float level_progressive_u_scale = 1. + [[ + anno::display_name("Progressive u scale"), + anno::description("If multiple levels are used, this parameter specifies an additional scaling factor in the \"u\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(8), + anno::soft_range(0.0,1.0) + ]], + uniform float level_progressive_v_motion = 0. + [[ + anno::display_name("Progressive v offset"), + anno::description("If multiple levels are used, this parameter specifies an offset for subsequent levels in the \"v\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(9), + anno::soft_range(0.0,1.0) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(15) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(14) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(13) + ]]) +[[ + anno::display_name("Flow noise texture"), + anno::description("Allow texturing with a 2D noise pattern suitable for waves"), + anno::thumbnail(".thumbs/flow_noise_texture.png"), + anno::in_group("Texturing", "Noise", "Flow"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(38), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::flow_noise_texture( + color1: color1, + color2: color2, + levels: noise_levels, + phase: phase, + level_gain: level_gain, + level_scale: level_scale, + level_progressive_u_scale: level_progressive_u_scale, + level_progressive_v_motion: level_progressive_v_motion, + absolute_noise: absolute_noise, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 flow_noise_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the generated flow-noise normal perturbation.") + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(12) + ]], + uniform int noise_levels = 1 + [[ + anno::description("Higher amounts will add detail to the noise"), + anno::display_name("Levels"), + anno::hard_range(1,6), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(1) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(8) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(9) + ]], + uniform bool absolute_noise = false + [[ + anno::display_name("Billowing appearance"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(2), + anno::description("Enables billowing noise by folding negative noise values into the positive range.") + ]], + uniform float phase = 0.0 + [[ + anno::display_name("Phase offset"), + anno::description("Controls the 3rd dimension of the function"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,1.0) + ]], + uniform float level_gain = 0.5 + [[ + anno::display_name("Level intensity gain"), + anno::description("If multiple levels are used, this parameter specifies a weighting factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(4), + anno::soft_range(0.0,1.0) + ]], + uniform float level_scale = 2.0 + [[ + anno::display_name("Level scaling"), + anno::description("If multiple levels are used, this parameter specifies a global scaling factor for subsequent levels"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(5), + anno::soft_range(0.0,4.0) + ]], + uniform float level_progressive_u_scale = 1. + [[ + anno::display_name("Progressive u scale"), + anno::description("If multiple levels are used, this parameter specifies an additional scaling factor in the \"u\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,1.0) + ]], + uniform float level_progressive_v_motion = 0. + [[ + anno::display_name("Progressive v offset"), + anno::description("If multiple levels are used, this parameter specifies an offset for subsequent levels in the \"v\" direction"), + anno::in_group("Noise parameters"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(7), + anno::soft_range(0.0,1.0) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(11) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(10) + ]] +) +[[ + anno::display_name("Flow noise texture -- bump mapping"), + anno::description("Allow texturing with a 2D noise pattern suitable for waves"), + anno::thumbnail(".thumbs/flow_noise_bump_texture.png"), + anno::in_group("Texturing", "Noise", "Flow"), + icon(".icons/flow_noise_texture.svg"), + anno::ui_order(39), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::flow_noise_bump_texture( + factor: factor, + levels: noise_levels, + phase: phase, + level_gain: level_gain, + level_scale: level_scale, + level_progressive_u_scale: level_progressive_u_scale, + level_progressive_v_motion: level_progressive_v_motion, + absolute_noise: absolute_noise, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export texture_return +[[ anno::node_output_port_default(anno::node_port_value_and_fields)]] +checker_texture( + color color1 = color(1.) + [[ + anno::display_name("Color 1"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(0) + ]], + color color2 = color(0.) + [[ + anno::display_name("Color 2"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(1) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(7) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(6) + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(3) + ]], + uniform float blur = 0 + [[ + anno::hard_range(0.0,1.0), + anno::display_name("Blur"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(2) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(5) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("3D checker texture"), + anno::description("Allows texturing a checkerboard pattern"), + anno::thumbnail(".thumbs/checker_texture.png"), + anno::in_group("Texturing", "Checker"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(40), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::checker_texture( + color1: color1, + color2: color2, + blur: blur/4., + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 checker_bump_texture( + uniform float factor = 1. + [[ + anno::display_name("Bump strength"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(0), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the checker pattern.") + ]], + uniform float blur = 0 + [[ + anno::hard_range(0.0,1.0), + anno::display_name("Blur"), + anno::in_group("Checker parameters"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(1), + anno::description("Amount of softening applied to checker cell boundaries.") + ]], + uniform bool object_space = false + [[ + anno::description("If off, UV space will be used. If on, 3D texturing in object space will apply. For applications that do not support object space, world space will be used."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(2) + ]], + float3 scaling = float3(10.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(6) + ]], + float3 translation = float3(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(5) + ]], + float3 rotation = float3(0.) + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(4) + ]], + uniform int texture_space = 0 + [[ + anno::description("Only applies if \"Use object space\" is off. Selects a specific UV space."), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(3) + ]] +) +[[ + anno::display_name("3D checker texture -- bump mapping"), + anno::description("Allows texturing a checkerboard pattern"), + anno::thumbnail(".thumbs/checker_bump_texture.png"), + anno::in_group("Texturing", "Checker"), + icon(".icons/checker_3d_texture.svg"), + anno::ui_order(41), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::checker_bump_texture( + factor: factor, + blur: blur/4., + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: object_space?scaling*state::meters_per_scene_unit() :scaling, + translation: translation, + rotation: math::radians(rotation) + ), + coordinate: object_space? + base::coordinate_source(coordinate_system: base::texture_coordinate_object): + base::coordinate_source(texture_space: texture_space) + ) + ); +} + +export float3 file_bump_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + anno::usage("normal"), + anno::ui_order(1), + anno::description("Bitmap texture used as the bump source.") + ]], + uniform mono_mode bump_source = mono_average + [[ + anno::display_name("Bump mode"), + anno::description("Defines how the texture is evaluated to create the bumps"), + anno::in_group("Bitmap parameters"), + anno::ui_order(2) + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture the surface will be flat"), + anno::display_name("Clip"), + anno::in_group("Placement"), + anno::ui_order(5) + + ]], + uniform float factor = 1 + [[ + anno::display_name("Bump strength"), + anno::in_group("Bitmap parameters"), + anno::ui_order(3), + anno::soft_range(0.0,1.0), + anno::description("Overall bump intensity applied to the sampled bitmap bump values.") + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + anno::ui_order(4) + ]] +) +[[ + anno::display_name("Bitmap texture, bump"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_bump_texture.png"), + anno::in_group("Texturing"), + icon(".icons/bitmap_texture.svg"), + anno::ui_order(31), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::file_bump_texture( + texture: texture, + bump_source: bump_source, + factor: factor, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clamp:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clamp:tex::wrap_repeat, + clip: clip + ); +} + +export float3 normalmap_texture( + uniform texture_2d texture + [[ + anno::display_name("Normalmap file"), + anno::in_group("Normalmap parameters"), + icon(".icons/normal_map_texture.svg"), + anno::usage("normal"), + anno::ui_order(1), + anno::description("Tangent-space normal map texture.") + ]], + float2 scaling = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(8) + ]], + float2 translation = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(7) + ]], + float rotation = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(6), + anno::soft_range(0.0,360.0) + ]], + uniform bool clip = false + [[ + anno::description("If set to true, texture will not repeat. Outside of the texture the surface will be flat."), + anno::display_name("Clip"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(4) + + ]], + uniform float factor = 1 + [[ + anno::display_name("Strength"), + anno::in_group("Normal map parameters"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(2), + anno::soft_range(0.0,1.0), + anno::description("Strength multiplier applied to the sampled normal-map perturbation.") + ]], + uniform int texture_space = 0 + [[ + anno::description("Selects a specific UV space"), + anno::display_name("UV space index"), + anno::hard_range(0,3), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(3) + ]], + uniform bool flip = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("Placement"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(6) + ]] +) +[[ + anno::display_name("Normal map texture"), + anno::description("Allows the use of tangent space normal maps"), + anno::thumbnail(".thumbs/normalmap_texture.png"), + anno::in_group("Texturing"), + icon(".icons/normal_map_texture.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + return base::tangent_space_normal_texture( + texture: texture, + factor: factor, + uvw: base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(scaling.x, scaling.y, 1.0), + rotation: float3(0.0, 0.0, math::radians(rotation) ), + translation: float3(translation.x, translation.y, 0.0) + ), + coordinate: base::coordinate_source(texture_space: texture_space) + ), + wrap_u: clip?tex::wrap_clamp:tex::wrap_repeat, + wrap_v: clip?tex::wrap_clamp:tex::wrap_repeat, + flip_tangent_v: flip, + clip: clip + ); +} +export float3 triplanar_normalmap_texture( + uniform texture_2d texture_1 + [[ + anno::usage("normal"), + anno::display_name("Bitmap file"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(0), + anno::description("Primary normal map used for triplanar projection (X axis, and fallback for missing optional textures).") + ]], + float2 scaling_1 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(1) + ]], + float2 translation_1 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(2) + ]], + float rotation_1 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(3), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_1 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("1st Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(4) + ]], + uniform texture_2d texture_2 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::usage("normal"), + anno::ui_order(4), + anno::description("Optional normal map used for the second triplanar projection axis (Y axis).") + ]], + float2 scaling_2 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(5) + ]], + float2 translation_2 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::ui_order(6) + ]], + float rotation_2 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(7), + anno::enable_if( "tex::texture_isvalid(texture_2)" ), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_2 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("2nd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8) + ]], + uniform texture_2d texture_3 = texture_2d() + [[ + anno::display_name("Bitmap file"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(8), + anno::usage("normal"), + anno::description("Optional normal map used for the third triplanar projection axis (Z axis).") + ]], + float2 scaling_3 = float2(1.) + [[ + anno::description("Controls the scale of the texture on the object"), + anno::display_name("Tiling"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(9) + ]], + float2 translation_3 = float2(0.) + [[ + anno::description("Controls position of the texture on the object"), + anno::display_name("Offset"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::ui_order(10) + ]], + float rotation_3 = 0. + [[ + anno::description("Rotation angle of the texture in degrees"), + anno::display_name("Rotation"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(11), + anno::enable_if( "tex::texture_isvalid(texture_3)" ), + anno::soft_range(0.0,360.0) + ]], + uniform bool flip_3 = false + [[ + anno::description("Flip handedness of the tangent space"), + anno::display_name("Flip V"), + anno::in_group("3rd Bitmap parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(12) + ]], + float blend_range = 0.5 + [[ + anno::description("Defines the size of the transition area. 0 means hard transition, 1 means blending happens very softly."), + anno::display_name("Blend range"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(13), + anno::hard_range(0.0,1.0) + ]], + float strength = 1.0 + [[ + anno::description("Overall strength of the normalmap"), + anno::display_name("Strength"), + anno::in_group("Common parameters"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(14), + anno::soft_range(0.0,10.0) + ]], + uniform float3 rotate_origin = float3(0.0) + [[ + anno::description("Allows manual alignment of the projection with an object"), + anno::display_name("Rotation of origin"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(16), + anno::soft_range(float3(0.0),float3(360.0)) + ]], + uniform bool object_space = true + [[ + anno::description("If off, world space will be used for generating texture coordinates. If on, object space will apply."), + anno::display_name("Use object space"), + anno::in_group("Placement"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Triplanar Normalmap texture"), + anno::description("Allows texturing using image files of various file formats"), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Triplanar"), + icon(".icons/triplanar_texture.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + state::coordinate_space space = object_space?state::coordinate_object:state::coordinate_world; + + float3 normal = state::transform_normal(state::coordinate_internal, space, state::normal()); + float3 position_original = state::transform_point(state::coordinate_internal, space, state::position()); + float3 rotation_origin_rad = math::radians(rotate_origin); + normal = transform_rotate(normal, rotation_origin_rad); + float3 position = transform_rotate(position_original, rotation_origin_rad); + float3 ty = + math::normalize( + transform_rotate_inv(state::transform_vector(space,state::coordinate_internal,float3(0.,-1.,0.)),rotation_origin_rad)); + float3 tz = + math::normalize( + transform_rotate_inv(state::transform_vector(space,state::coordinate_internal,float3(0.,0.,-1.)),rotation_origin_rad)); + + float3 weights = math::abs(normal); + + //TODO: blendrange through pow or is there something better? Pow means relatively little area where only 1 texture is looked up + weights /=math::max_value(weights); + weights = math::pow(weights,1./math::max(blend_range, 0.001)); + + + + float2 st1 = normal.x>0.0?float2(-position.z,position.y):float2(-position.z,-position.y); + float3 ts = math::normalize(math::cross(state::normal(),tz)); + float3 tt1 = math::normalize(math::cross(state::normal(),ts)); + + float2 st2 = normal.y>0?float2(-position.z,-position.x):float2(-position.z,position.x); + + float2 st3 = normal.z>0?float2(-position.y,position.x):float2(-position.y,-position.x); + float3 ts3 = math::normalize(math::cross(state::normal(),ty)); + float3 tt3 = math::normalize(math::cross(state::normal(),ts3)); + + tt3 = ( (tex::texture_isvalid(texture_3) && flip_3) || flip_1)? -tt3: tt3; + float3 tt2 = ( (tex::texture_isvalid(texture_2) && flip_2) || flip_1)? -tt1: tt1; + tt1 = flip_1? -tt1: tt1; + + float rotation_1_rad = math::radians(rotation_1); + float3x3 tan_rotation_mat_1 = axis_rotation_matrix(state::normal(), -rotation_1_rad); + float3 n1 = weights.x>0 && tex::texture_isvalid(texture_1)? + (support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st1))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength); + n1 = math::normalize( + ts * tan_rotation_mat_1 * n1.x + + tt1 * tan_rotation_mat_1 * n1.y + + state::normal() * (n1.z + (1.0 - strength))); + + float rotation_2_rad = math::radians(rotation_2); + float3x3 tan_rotation_mat_2 = tex::texture_isvalid(texture_2) + ? axis_rotation_matrix(state::normal(), -rotation_2_rad) + : tan_rotation_mat_1; + float3 n2 = weights.y>0? tex::texture_isvalid(texture_2)? + (support_definitions::lookup_float3( + texture_2, + support_definitions::transform_st(rotation_2_rad,translation_2,scaling_2,st2))- float3(0.5)) * (2.0 * strength) + :tex::texture_isvalid(texture_1)?(support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st2))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength):float3(0.,0.,strength); + n2 = math::normalize( + ts * tan_rotation_mat_2 * n2.x + + tt2 * tan_rotation_mat_2 * n2.y + + state::normal() * (n2.z + (1.0 - strength))); + + float rotation_3_rad = math::radians(rotation_3); + float3x3 tan_rotation_mat_3 = tex::texture_isvalid(texture_3) + ? axis_rotation_matrix(state::normal(), -rotation_3_rad) + : tan_rotation_mat_1; + float3 n3 = weights.z>0? tex::texture_isvalid(texture_3)? + (support_definitions::lookup_float3( + texture_3, + support_definitions::transform_st(rotation_3_rad,translation_3,scaling_3,st3))- float3(0.5)) * (2.0 * strength) + :tex::texture_isvalid(texture_1)?(support_definitions::lookup_float3( + texture_1, + support_definitions::transform_st(rotation_1_rad,translation_1,scaling_1,st3))- float3(0.5)) * (2.0 * strength) + :float3(0.,0.,strength):float3(0.,0.,strength); + n3 = math::normalize( + ts3 * tan_rotation_mat_3 * n3.x + + tt3 * tan_rotation_mat_3 * n3.y + + state::normal() * (n3.z + (1.0 - strength))); + + return blend_3_normals(n1,weights.x,n2,weights.y,n3,weights.z); +} + +// Morten S. Mikkelsen, Practical Real-Time Hex-Tiling, Journal of Computer Graphics +// Techniques (JCGT), vol. 11, no. 2, 77-94, 2022 +// http://jcgt.org/published/0011/03/05/ +struct hextile_data { + float2 coord1; + float2 coord2; + float2 coord3; + float3 weights; + float3x3 tangent_rot_mat1; + float3x3 tangent_rot_mat2; + float3x3 tangent_rot_mat3; +}; + +hextile_data hextile_coord( + float2 coord, + float rotation, + float2 rotation_range, + float scale, + float2 scale_range, + float offset, + float2 offset_range) +{ + float sqrt3_2 = math::sqrt(3.0) * 2.0; + + // scale coord to maintain the original fit + float2 st = coord * sqrt3_2; + + // skew input space into simplex triangle grid + // (1, 0, -tan(30), 2*tan(30)) + float2x2 to_skewed = float2x2(1.0, 0.0, -0.57735027, 1.15470054); + float2 st_skewed = to_skewed * st; + + // barycentric weights + float2 st_frac = math::frac(st_skewed); + float3 temp = float3(st_frac.x, st_frac.y, 0.0); + temp.z = 1.0 - temp.x - temp.y; + + float s = math::step(0.0, -temp.z); + float s2 = 2.0 * s - 1.0; + + float w1 = -temp.z * s2; + float w2 = s - temp.y * s2; + float w3 = s - temp.x * s2; + + // vertex IDs + int2 base_id = int2(math::floor(st_skewed)); + int si = int(s); + int2 id1 = base_id + int2(si, si); + int2 id2 = base_id + int2(si, 1 - si); + int2 id3 = base_id + int2(1 - si, si); + + // tile center + float2x2 inv_skewed = float2x2(1.0, 0.0, 0.5, 1.0 / 1.15470054); + float2 ctr1 = inv_skewed * float2(id1) / float2(sqrt3_2); + float2 ctr2 = inv_skewed * float2(id2) / float2(sqrt3_2); + float2 ctr3 = inv_skewed * float2(id3) / float2(sqrt3_2); + + // reuse hash for performance + float2 seed_offset = float2(0.12345); // to avoid some zeros + float2 rand1 = hash22(float2(id1) + seed_offset); + float2 rand2 = hash22(float2(id2) + seed_offset); + float2 rand3 = hash22(float2(id3) + seed_offset); + + // randomized rotation matrix + float2 rr = math::radians(rotation_range); + float rrr1 = math::lerp(rr.x, rr.y, rand1.x * rotation); + float rrr2 = math::lerp(rr.x, rr.y, rand2.x * rotation); + float rrr3 = math::lerp(rr.x, rr.y, rand3.x * rotation); + float[2] sc1 = math::sincos(rrr1); + float[2] sc2 = math::sincos(rrr2); + float[2] sc3 = math::sincos(rrr3); + float2x2 rm1 = float2x2(sc1[1], -sc1[0], sc1[0], sc1[1]); + float2x2 rm2 = float2x2(sc2[1], -sc2[0], sc2[0], sc2[1]); + float2x2 rm3 = float2x2(sc3[1], -sc3[0], sc3[0], sc3[1]); + + // rotation matrix for tangent vectors + float3x3 trm1 = axis_rotation_matrix(state::normal(), -rrr1); + float3x3 trm2 = axis_rotation_matrix(state::normal(), -rrr2); + float3x3 trm3 = axis_rotation_matrix(state::normal(), -rrr3); + + // randomized scale + float2 sr = scale_range; + float2 scale1 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand1.y), scale); + float2 scale2 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand2.y), scale); + float2 scale3 = math::lerp(1.0, math::lerp(sr.x, sr.y, rand3.y), scale); + + // randomized offset + float2 offset1 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand1 * offset); + float2 offset2 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand2 * offset); + float2 offset3 = math::lerp(float2(offset_range.x), float2(offset_range.y), rand3 * offset); + + // get coord + float2 st1 = ((coord - ctr1) * rm1 / scale1) + ctr1 + offset1; + float2 st2 = ((coord - ctr2) * rm2 / scale2) + ctr2 + offset2; + float2 st3 = ((coord - ctr3) * rm3 / scale3) + ctr3 + offset3; + + hextile_data tile_data = hextile_data(st1, st2, st3, float3(w1, w2, w3), trm1, trm2, trm3); + + return tile_data; +} + +export color hextiling_file_texture( + uniform texture_2d texture + [[ + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(0), + anno::description("Bitmap texture sampled by the hextiling algorithm.") + ]], + uniform int texture_space = 0 + [[ + anno::display_name("UV space index"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(1), + anno::description("UV set index used for texture-coordinate lookup.") + ]], + color default_color = color(0.0) + [[ + anno::display_name("Default color"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(2), + anno::description("Fallback color returned when no valid texture is provided.") + ]], + float2 repeat = float2(1.0, 1.0) + [[ + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/hextiling.svg"), + anno::ui_order(3), + anno::description("UV tiling multiplier applied before hextiling.") + ]], + float rotation = 1.0 + [[ + anno::display_name("Rotation"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(4), + anno::description("Random rotation amount; 0 disables random rotation and 1 uses the full rotation range.") + ]], + float2 rotation_range = float2(0.0, 360.0) + [[ + anno::display_name("Rotation Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(5), + anno::description("Minimum and maximum random rotation in degrees.") + ]], + float scale = 1.0 + [[ + anno::display_name("Scale"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(6), + anno::description("Random scale amount; 0 disables random scaling and 1 uses the full scale range.") + ]], + float2 scale_range = float2(0.5, 2.0) + [[ + anno::display_name("Scale Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(7), + anno::description("Minimum and maximum random tile scale.") + ]], + float offset = 1.0 + [[ + anno::display_name("Offset"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(8), + anno::description("Random offset amount; 0 disables random offsets and 1 uses the full offset range.") + ]], + float2 offset_range = float2(0.0, 1.0) + [[ + anno::display_name("Offset Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(9), + anno::description("Minimum and maximum random UV offset applied per tile.") + ]], + float falloff = 0.5 + [[ + anno::display_name("Falloff"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(10), + anno::description("Controls how quickly tile blending transitions between neighboring tiles.") + ]], + float falloff_contrast = 0.5 + [[ + anno::display_name("Falloff Contrast"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(11), + anno::description("Controls how strongly luminance influences blending weights.") + ]] +) +[[ + anno::display_name("Hextiling Bitmap texture"), + anno::description("Allows infinite texturing without obvious repeat patterns."), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Hextiling"), + icon(".icons/hextiling.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + if (!tex::texture_isvalid(texture)) + return default_color; + + + float3 uvw = state::texture_coordinate(texture_space); + float2 coord = float2(uvw.x, uvw.y) * repeat; + + // get triangle coord + hextile_data tile_data = hextile_coord( + coord: coord, + rotation: rotation, + rotation_range: rotation_range, + scale: scale, + scale_range: scale_range, + offset: offset, + offset_range: offset_range + ); + + // lookup texture + color c1 = tex::lookup_color(texture, tile_data.coord1); + color c2 = tex::lookup_color(texture, tile_data.coord2); + color c3 = tex::lookup_color(texture, tile_data.coord3); + + // luminance as weight + float3 cw = float3(math::luminance(c1), math::luminance(c2), math::luminance(c3)); + cw = math::lerp(float3(1.0), cw, float3(falloff_contrast)); + + // blend weights + float3 w = cw * math::pow(tile_data.weights, 7.0); + w /= (w.x + w.y + w.z); + + // apply s-curve gain + if (falloff != 0.5) + { + w.x = schlick_gain(w.x, falloff); + w.y = schlick_gain(w.y, falloff); + w.z = schlick_gain(w.z, falloff); + w /= (w.x + w.y + w.z); + } + + // blend + color out_color = w.x * c1 + w.y * c2 + w.z * c3; + + return out_color; +} + +export float3 hextiling_normalmap_texture( + uniform texture_2d texture + [[ + anno::usage("normal"), + anno::display_name("Bitmap file"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(0), + anno::description("Normal map texture sampled by the hextiling algorithm.") + ]], + uniform int texture_space = 0 + [[ + anno::display_name("UV space index"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(1), + anno::description("UV set index used for texture-coordinate lookup.") + ]], + float3 default_normal = state::normal() + [[ + anno::display_name("Default normal"), + anno::in_group("Bitmap parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(2), + anno::description("Fallback normal returned when no valid normal map is provided.") + ]], + float2 repeat = float2(1.0, 1.0) + [[ + anno::display_name("Tiling"), + anno::in_group("Placement"), + icon(".icons/hextiling.svg"), + anno::ui_order(3), + anno::description("UV tiling multiplier applied before hextiling.") + ]], + float rotation = 1.0 + [[ + anno::display_name("Rotation"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(4), + anno::description("Random rotation amount; 0 disables random rotation and 1 uses the full rotation range.") + ]], + float2 rotation_range = float2(0.0, 360.0) + [[ + anno::display_name("Rotation Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(5), + anno::description("Minimum and maximum random rotation in degrees.") + ]], + float scale = 1.0 + [[ + anno::display_name("Scale"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(6), + anno::description("Random scale amount; 0 disables random scaling and 1 uses the full scale range.") + ]], + float2 scale_range = float2(0.5, 2.0) + [[ + anno::display_name("Scale Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(7), + anno::description("Minimum and maximum random tile scale.") + ]], + float offset = 1.0 + [[ + anno::display_name("Offset"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(8), + anno::description("Random offset amount; 0 disables random offsets and 1 uses the full offset range.") + ]], + float2 offset_range = float2(0.0, 1.0) + [[ + anno::display_name("Offset Range"), + anno::in_group("Randomization"), + icon(".icons/hextiling.svg"), + anno::ui_order(9), + anno::description("Minimum and maximum random UV offset applied per tile.") + ]], + float falloff = 0.5 + [[ + anno::display_name("Falloff"), + anno::in_group("Blending"), + icon(".icons/hextiling.svg"), + anno::soft_range(0.0, 1.0), + anno::ui_order(10), + anno::description("Controls how quickly tile blending transitions between neighboring tiles.") + ]], + float strength = 1.0 + [[ + anno::display_name("Strength"), + anno::in_group("Normal map parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(11), + anno::soft_range(0.0, 1.0), + anno::description("Strength multiplier applied to sampled normal-map perturbations.") + ]], + uniform bool flip_g = false + [[ + anno::display_name("Flip V"), + anno::in_group("Normal map parameters"), + icon(".icons/hextiling.svg"), + anno::ui_order(12), + anno::description("Flips the green (Y) channel of the sampled normal maps.") + ]] +) +[[ + anno::display_name("Hextiling Normalmap texture"), + anno::description("Allows infinite texturing without obvious repeat patterns."), + anno::thumbnail(".thumbs/file_texture.png"), + anno::in_group("Texturing", "Hextiling"), + icon(".icons/hextiling.svg"), + anno::ui_order(32), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT) +]] +{ + if (!tex::texture_isvalid(texture)) + return default_normal; + + + float3 uvw = state::texture_coordinate(texture_space); + float2 coord = float2(uvw.x, uvw.y) * repeat; + + // get triangle coord + hextile_data tile_data = hextile_coord( + coord: coord, + rotation: rotation, + rotation_range: rotation_range, + scale: scale, + scale_range: scale_range, + offset: offset, + offset_range: offset_range + ); + + // lookup normalmap + float3 nm1 = tex::lookup_float3(texture, tile_data.coord1); + float3 nm2 = tex::lookup_float3(texture, tile_data.coord2); + float3 nm3 = tex::lookup_float3(texture, tile_data.coord3); + nm1.y = flip_g ? 1.0 - nm1.y : nm1.y; + nm2.y = flip_g ? 1.0 - nm2.y : nm2.y; + nm3.y = flip_g ? 1.0 - nm3.y : nm3.y; + + // transform to geometry normals + nm1 = 2.0 * nm1 - 1.0; + nm2 = 2.0 * nm2 - 1.0; + nm3 = 2.0 * nm3 - 1.0; + float3 sn = state::normal(); + float3 tu1 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat1 * strength; + float3 tu2 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat2 * strength; + float3 tu3 = state::texture_tangent_u(0) * tile_data.tangent_rot_mat3 * strength; + float3 tv1 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat1 * strength; + float3 tv2 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat2 * strength; + float3 tv3 = state::texture_tangent_v(0) * tile_data.tangent_rot_mat3 * strength; + float3 n1 = math::normalize(tu1 * nm1.x + tv1 * nm1.y + sn * nm1.z); + float3 n2 = math::normalize(tu2 * nm2.x + tv2 * nm2.y + sn * nm2.z); + float3 n3 = math::normalize(tu3 * nm3.x + tv3 * nm3.y + sn * nm3.z); + + // belnd weights + float3 w = math::pow(tile_data.weights, 7.0); + w /= (w.x + w.y + w.z); + + // apply s-curve gain + if (falloff != 0.5) + { + w.x = schlick_gain(w.x, falloff); + w.y = schlick_gain(w.y, falloff); + w.z = schlick_gain(w.z, falloff); + w /= (w.x + w.y + w.z); + } + + // blend + float3 out_normal = gradient_blend_3_normals(n1, w.x, n2, w.y, n3, w.z); + + return out_normal; +} + +//endgroup + +//material section----------------------------------------------------------------------------------------------- + +//group Simple materials + +export material diffuse( + color diffuse_color = color(.8) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead a powdery appearance") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple diffuse"), + anno::description("A basic diffuse material"), + anno::thumbnail(".thumbs/diffuse.png"), + anno::in_group("Materials", "Diffuse"), + anno::ui_order(0), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic")) +]] + = material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::diffuse_reflection_bsdf( + roughness: roughness, + tint: diffuse_color + ) + ) + ) +); + +export material dusty_diffuse( + color diffuse_color = color(.8) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Dusty diffuse"), + anno::description("A dusty diffuse material"), + anno::thumbnail(".thumbs/diffuse.png"), + anno::in_group("Materials", "Diffuse"), + anno::ui_order(1), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic")) +]] + = material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::dusty_diffuse_reflection_bsdf( + tint: diffuse_color + ) + ) + ) +); + +export material scratched_metal_v2( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::ui_order(1), + anno::description("The color of the metal") + ]], + float roughness = 0.2 + [[ + anno::display_name("Roughness"), + anno::ui_order(3), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflection weight"), + anno::ui_order(4), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::ui_order(5), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight") + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::ui_order(6), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees.") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::ui_order(7), + anno::description("Attach bump or normal maps here") + ]], + color edge_color = color(1.0) + [[ + anno::display_name("Edge color"), + anno::ui_order(2), + anno::description("The color of the metal towards the edge") + ]] +) +[[ + anno::display_name("Metal"), + anno::description("A metallic material with stretched reflections"), + anno::thumbnail(".thumbs/scratched_metal.png"), + anno::in_group("Materials"), + anno::ui_order(1), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness*roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + complex_ior ior = artistic_metal_to_complex_ior(metal_color, edge_color); + bsdf glossy_bsdf = df::fresnel_factor( + ior: ior.n, + extinction_coefficient: ior.k, + base: df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ) + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_plastic_v2( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float roughness = 0.2 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(2) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(4) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(5) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Additional reflectivity control"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Plastic"), + anno::description("A basic dielectric, works for everything opaque that is not metallic. Supports stretched highlights."), + anno::thumbnail(".thumbs/scratched_plastic.png"), + anno::in_group("Materials"), + anno::ui_order(2), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness*roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material retroreflective( + color base_color = color(.2,.03,.03) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + color reflection_color = color(.8,.8,.03) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the retroreflection"), + anno::ui_order(2) + ]], + float roughness = 0.15 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(3) + ]], + float normal_reflectivity = .05 + [[ + anno::display_name("Reflection weight facing"), + anno::hard_range(0.0,1.), + anno::description("Reflectivity control for geometry facing the viewer"), + anno::ui_order(4) + ]], + float grazing_reflectivity = 1. + [[ + anno::display_name("Reflection weight edge"), + anno::hard_range(0.0,1.), + anno::description("Reflectivity control for the reflectivity at geometry edges"), + anno::ui_order(5) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Retroreflective"), + anno::description("A material with a retroreflective component, works well for road signs and retroreflective stickers"), + anno::thumbnail(".thumbs/retroreflective.png"), + anno::in_group("Materials"), + anno::ui_order(3), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","retroreflective","roadsign","stone")) +]] + = let{ + bsdf glossy_bsdf = df::backscattering_glossy_reflection_bsdf( + tint: reflection_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::custom_curve_layer( + normal_reflectivity: 1.-normal_reflectivity, + grazing_reflectivity: 1.-grazing_reflectivity, + base: glossy_bsdf, + layer: df::diffuse_reflection_bsdf( + roughness: 1.0, + tint: base_color + ), + normal: normal + ) + ) + ) +); + +export material flex_material_v2( + color base_color = color(.5) + [[ + anno::display_name("Base color"), + anno::in_group("Base"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float diffuse_roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to a more \"powdery\" look"), + anno::ui_order(2) + ]], + float is_metal = 0.0 + [[ + anno::display_name("Metallic material"), + anno::in_group("Base"), + anno::description("If 1.0, reflection will be colored and independent of view direction. If 0.0, reflection will be white and direction dependent. Directional dependence is in this case based on the IOR (Fresnel effect)."), + anno::ui_order(3) + ]], + float reflectivity = 1.0 + [[ + anno::display_name("Reflection weight"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Controls the amount of reflection"), + anno::ui_order(5) + ]], + float reflection_roughness = 0.3 + [[ + anno::display_name("Reflection roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to more blurry reflections"), + anno::ui_order(4) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Reflection anisotropy"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(6) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(7) + ]], + float transparency = 0.0 + [[ + anno::display_name("Transmission weight"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("Weights how much light passes through the object compared to its diffuse reflectivity."), + anno::ui_order(12) + ]], + color transmission_color = color(1.) + [[ + anno::display_name("Transmission color"), + anno::in_group("Transmission"), + anno::description("Color effect for transmission independent of thickness of the object, similar to stained glass."), + anno::ui_order(8) + ]], + uniform color volume_color = color(1.0) + [[ + anno::display_name("Volume color"), + anno::in_group("Transmission"), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at \"Volume reference distance\" (m)."), + anno::ui_order(9) + ]], + float transmission_roughness = 0.0 + [[ + anno::display_name("Transmission roughness"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("higher values lead to objects seen through the material to appear blurry"), + anno::ui_order(11) + ]], + uniform float base_thickness = 0.1 + [[ + anno::display_name("Volume reference distance"), + anno::in_group("Transmission"), + anno::soft_range(0.0,10.0), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(10) + ]], + uniform float ior = 1.5 + [[ + anno::display_name("IOR"), + anno::in_group("Global"), + anno::soft_range(1.0,4.0), + anno::description("Determines refraction in the volume. It also influences the reflectivity for materials that are not metallic."), + anno::ui_order(14) + ]], + uniform bool thin_walled = false + [[ + anno::display_name("Thin walled"), + anno::in_group("Global"), + anno::description("Thin walled materials do not refract and do not have volume effects. Good for soap bubbles or window glass."), + anno::ui_order(13) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::in_group("Global"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(16) + ]], + uniform float abbe_number = 0.0 + [[ + anno::in_group("Global"), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85"), + anno::soft_range(0.0,100.0), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Flexible material model"), + anno::description("A complex material that can be configured to a wide variety of looks"), + anno::thumbnail(".thumbs/flex_material.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials"), + anno::ui_order(5), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("generic","complex")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: reflection_roughness*reflection_roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); + bsdf diffuse_bsdf = df::diffuse_reflection_bsdf( + tint: base_color, + roughness: diffuse_roughness + ); + bsdf transmission_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: transmission_roughness*transmission_roughness + ); + bsdf add_transparency = df::weighted_layer( + weight: transparency, + layer: transmission_bsdf, + base: diffuse_bsdf, + normal: normal + ); + bsdf add_reflection = df::weighted_layer( + is_metal, + df::weighted_layer( + weight: reflectivity, + layer: df::directional_factor(base_color,color(1.0),5.,glossy_bsdf), + base: add_transparency, + normal: normal + ), + df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ) + ); + bsdf add_normal = df::weighted_layer( + normal: normal, + weight: 1., + layer: add_reflection + ); +} in material( + thin_walled: thin_walled, + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number), + surface: material_surface( + scattering: add_normal + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ) +); + +export material thin_glass_v2( + color glass_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin glass"), + anno::description("A basic transmissive dielectric without refraction or volume"), + anno::thumbnail(".thumbs/thin_glass.png"), + anno::in_group("Materials", "Glass"), + anno::ui_order(6), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf glossy_transmission_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: glass_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + layer: glossy_transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) +); + +export material thin_translucent_v2( + color surface_color = color(.95) + [[ + anno::display_name("Diffuse color"), + anno::description("The color of the material") + ]], + color translucent_color = color(.95) + [[ + anno::display_name("Translucence color"), + anno::description("The color of the volume of the material") + ]], + float translucency = 0.5 + [[ + anno::display_name("Translucence weight"), + anno::hard_range(0.0,1.), + anno::description("Fraction of the incoming light that should be visible on the backside") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin translucent"), + anno::description("A diffuse transmissive dielectric material"), + anno::thumbnail(".thumbs/thin_translucent.png"), + anno::in_group("Materials", "Translucent"), + anno::ui_order(7), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","leaves","paper","sheets")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf transmission_bsdf = df::diffuse_transmission_bsdf( + tint: translucent_color + ); + bsdf base_bsdf = df::diffuse_reflection_bsdf( + tint: surface_color + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + weight: translucency, + normal: normal, + base: base_bsdf, + layer: df::weighted_layer( + layer: transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) + ) +); + +export material thick_glass_v2( + color transmission_color = color(1.0) + [[ + anno::ui_order(1), + anno::display_name("Transmission color"), + anno::description("Colors the light entering the volume, similar to stained glass") + ]], + uniform color glass_color = color(.95) + [[ + anno::ui_order(2), + anno::display_name("Volume color"), + anno::description("The color of the glass body") + ]], + float roughness = 0.0 + [[ + anno::ui_order(4), + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::ui_order(5), + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction") + ]], + uniform float base_thickness = .1 + [[ + anno::ui_order(3), + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here.") + + ]], + float3 normal = state::normal() + [[ + anno::ui_order(7), + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]], + uniform float abbe_number = 0.0 + [[ + anno::ui_order(6), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0) + ]] +) +[[ + anno::display_name("Thick glass"), + anno::description("A basic transmissive dielectric with refraction and coloring in the volume"), + anno::thumbnail(".thumbs/thick_glass.png"), + anno::in_group("Materials", "Glass"), + anno::ui_order(8), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf glossy_bsdf_transmission = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: roughness*roughness + ); +} in material( + thin_walled: false, + surface: material_surface( + df::weighted_layer( + normal: normal, + weight: 1., + layer: df::fresnel_layer( + layer: glossy_bsdf, + base: glossy_bsdf_transmission, + ior: ior, + normal: normal + ) + ) + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(glass_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material thick_translucent_v2( + color transmission_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + uniform color volume_color = color(.95) + [[ + anno::display_name("Volume color"), + anno::description("The color of the volume at \"Volume reference distance\""), + anno::ui_order(2) + ]], + uniform float volume_scattering = 0.5 + [[ + anno::display_name("Volume scattering"), + anno::hard_range(0.0,.99999), + anno::description("Amount of scattering for objects at \"Volume reference distance\""), + anno::ui_order(3) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(5) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Overall reflectivity of the material"), + anno::ui_order(6) + ]], + uniform float base_thickness = .1 + [[ + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" and \"Volume scattering\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(4) + + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(9) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction"), + anno::ui_order(7) + ]], + uniform float abbe_number = 0.0 + [[ + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off, Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Thick translucent"), + anno::description("A subsurface scattering material"), + anno::thumbnail(".thumbs/thick_translucent.png"), + anno::in_group("Materials", "Translucent"), + anno::ui_order(9), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","wax","milk")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness*roughness + ); + bsdf transmission_bsdf = df::specular_bsdf( + mode: df::scatter_transmit, + tint: transmission_color + ); + +} in material( + thin_walled: false, + surface: material_surface( + df::fresnel_layer( + normal: normal, + weight: reflectivity, + ior: ior, + layer: glossy_bsdf, + base: df::weighted_layer( + normal: normal, + weight: 1., + layer: transmission_bsdf + ) + ) + ), + volume: material_volume( + scattering_coefficient: (base_thickness <= 0)? color(0): math::log(color(1.-volume_scattering)) / - base_thickness, + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +//endgroup + +//group Modifier materials + +export material blend( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material the blend is based on") + ]], + material blend = scratched_metal_v2() + [[ + anno::display_name("Blend Material"), + anno::description("Surface properties to use for the blend") + ]], + float weight = 0. + [[ + anno::display_name("Blend weight"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]] +) +[[ + anno::display_name("Blend materials"), + anno::description("Blend characteristics of 2 materials or mask them using a texture"), + anno::thumbnail(".thumbs/blend.png"), + anno::in_group("Material modifiers", "Blend"), + icon(".icons/generic_blend.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = let { + float inv_weight = 1.0f - weight; +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: weight, + layer: blend.surface.scattering, + base: base.surface.scattering + ), + emission: material_emission( + mode: base.surface.emission.mode, //cant vary + intensity: math::lerp(base.surface.emission.intensity,blend.surface.emission.intensity, weight), + emission: df::unbounded_mix( + df::edf_component[] + ( + df::edf_component(inv_weight,base.surface.emission.emission), + df::edf_component(weight,blend.surface.emission.emission) + ) + ) + ) + ), + volume: material_volume( + scattering: df::unbounded_mix( + df::vdf_component[] + ( + df::vdf_component(inv_weight,base.volume.scattering), + df::vdf_component(weight,blend.volume.scattering) + ) + ), + absorption_coefficient: math::lerp(base.volume.absorption_coefficient,base.volume.absorption_coefficient,weight), + scattering_coefficient: math::lerp(base.volume.scattering_coefficient,base.volume.scattering_coefficient,weight), + emission_intensity: math::lerp(base.volume.emission_intensity,blend.volume.emission_intensity, weight) + + ), + ior: base.ior, //can't vary + thin_walled: base.thin_walled, //can't vary + geometry: material_geometry( + displacement: math::lerp(base.geometry.displacement, blend.geometry.displacement, weight), + cutout_opacity: math::lerp(base.geometry.cutout_opacity, blend.geometry.cutout_opacity, weight), + normal: blend_normals(base.geometry.normal, inv_weight, blend.geometry.normal, weight) + ) +); + +export material twosided( + material front = scratched_plastic_v2() + [[ + anno::display_name("Front material"), + anno::description("The material on the front faces.") + ]], + material back = scratched_metal_v2() + [[ + anno::display_name("Back material"), + anno::description("The material on the back faces.") + ]] +) +[[ + anno::display_name("Two-sided materials"), + anno::description("Allows you to apply a material to front and back surfaces."), + anno::thumbnail(".thumbs/twosided.png"), + anno::in_group("Material modifiers"), + icon(".icons/two_sided_materials.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = material( + thin_walled: true, + ior: front.ior, + surface: front.surface, + backface: back.surface, + geometry: front.geometry +); + +export material surface_falloff( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material the blend is based on") + ]], + material blend = scratched_metal_v2() + [[ + anno::display_name("Blend Material"), + anno::description("Surface properties to use for the blend") + ]], + float facing_weight = 0.0 + [[ + anno::display_name("Blend weight facing"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]], + float edge_weight = 1.0 + [[ + anno::display_name("Blend weight edge"), + anno::hard_range(0.0,1.), + anno::description("Blend weight or mask texture") + ]], + float blend_bias = 1. + [[ + anno::display_name("Blend bias"), + anno::soft_range(0.0,10.), + anno::description("Controls how fast the transition should happen. 5.0 results in fresnel like transition.") + ]] +) +[[ + anno::display_name("Surface falloff"), + anno::description("Blend surface characteristics of 2 materials or mask them using a texture"), + anno::thumbnail(".thumbs/surface_falloff.png"), + anno::in_group("Material modifiers", "Blend"), + icon(".icons/surface_falloff.svg"), + anno::ui_order(15), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(combiner_material), + anno::key_words(string[]("combiner","generic")) +]] + = material( + surface: material_surface( + scattering: df::custom_curve_layer( + weight: 1., + exponent: blend_bias, + normal_reflectivity: facing_weight, + grazing_reflectivity: edge_weight, + layer: blend.surface.scattering, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_clearcoat_v2( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied"), + anno::ui_order(1) + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat"), + anno::ui_order(5) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat"), + anno::ui_order(3) + ]], + float visibility = 1.0 + [[ + anno::display_name("Coat visibility"), + anno::hard_range(0.0,1.0), + anno::description("Determines visibility of the clear coat"), + anno::ui_order(4) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(6) + ]], + color coat_filter_color = color(1.) + [[ + anno::display_name("Coat filter color"), + anno::description("For simulating coatings with colored resins that modulate the color of underlying layers"), + anno::ui_order(2) + ]] +) +[[ + anno::display_name("Apply clear coating"), + anno::description("Apply clear coat to an existing material"), + anno::author("NVIDIA Corporation"), + anno::thumbnail(".thumbs/apply_clearcoat.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_clear_coating.svg"), + anno::ui_order(16), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness*roughness, + tint: color(1.) + ); + color base_tint = blend_colors(color(1.), coat_filter_color, color_layer_blend, visibility).tint; +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: normal, + weight: visibility, + layer: glossy_bsdf, + base: df::tint(tint: base_tint, base: base.surface.scattering) + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_thinfilm( + material base = scratched_metal_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get shows a thin film effect") + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("The IOR of the thin film interface") + ]], + float thickness = 400.0 + [[ + anno::display_name("Thickness"), + anno::soft_range(10.0,5000.0), + anno::description("Thickness of the thin film in nm") + ]] +) +[[ + anno::display_name("Apply thin film"), + anno::description("Apply thin film to an existing material"), + anno::thumbnail(".thumbs/apply_thinfilm.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_thin_film.svg"), + anno::ui_order(17), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::thin_film( + ior: color(ior), + thickness: thickness, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_metalcoat_v2( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a metallic coating applied"), + anno::ui_order(1) + ]], + color metal_color = color(.95) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the metal"), + anno::ui_order(2) + ]], + float visibility = .3 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the coat"), + anno::ui_order(4) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metal coat"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(5) + ]] +) +[[ + anno::display_name("Apply thin metal coating"), + anno::description("Apply metal coat to an existing material"), + anno::thumbnail(".thumbs/apply_metalcoat.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_thin_metal_coating.svg"), + anno::ui_order(18), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::microfacet_ggx_smith_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness*roughness, + tint: metal_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: visibility, + normal: normal, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_dustcover( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + color dust_color = color(.7) + [[ + anno::display_name("Dust color"), + anno::description("The color of the dust") + ]], + float visibility = 1. + [[ + anno::display_name("Dust density"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the cover") + ]], + uniform float dust_density = .5 + [[ + anno::display_name("Dust amount"), + anno::hard_range(.01,1), + anno::description("How dusty the material is") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Apply a cover of dust"), + anno::description("Apply a diffuse cover of dust or dirt"), + anno::thumbnail(".thumbs/apply_dustcover.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_dust_cover.svg"), + anno::ui_order(19), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf dust_bsdf = df::diffuse_reflection_bsdf( + roughness: 1., + tint: dust_color + ); +} in material( + surface: material_surface( + scattering: df::custom_curve_layer( + weight: visibility, + normal_reflectivity: dust_density*dust_density*dust_density, + exponent: (1.05-dust_density)*2., + normal: normal, + layer: dust_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_colorfalloff_v2( + material base = scratched_metal_v2(metal_color: color(1.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + uniform color color_0 = color(1.,0.,0.) + [[ + anno::display_name("Color 1"), + anno::description("Color 1 (facing direction)") + ]], + uniform color color_1 = color(0.,1.,0.) + [[ + anno::display_name("Color 2"), + anno::description("Color 2") + ]], + uniform color color_2 = color(0.,0.,1.) + [[ + anno::display_name("Color 3"), + anno::description("Color 3") + ]], + uniform color color_3 = color(1.,0.,0.) + [[ + anno::display_name("Color 4"), + anno::description("Color 4") + ]], + uniform color color_4 = color(0.,1.,0.) + [[ + anno::display_name("Color 5"), + anno::description("Color 5 (object edges)") + ]] +) +[[ + anno::display_name("Apply a color falloff"), + anno::description("Makes the color view dependent"), + anno::thumbnail(".thumbs/apply_colorfalloff.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/apply_color_falloff.svg"), + anno::ui_order(20), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::measured_curve_factor( + curve_values: color[](color_0,color_1,color_2,color_3,color_4), + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); +//JAN: TODO fix from here +export material apply_metallicflakes( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a flake layer applied") + ]], + color flake_color = color(.9,.7,.5) + [[ + anno::display_name("Color"), + anno::description("The color of the flakes") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metallic flakes") + ]], + uniform float size = 1. + [[ + anno::display_name("Flake size"), + anno::description("Determines size of the metallic flakes, in mm") + ]], + uniform float amount = 0.5 + [[ + anno::display_name("Flake amount"), + anno::hard_range(0.0,1.), + anno::description("Determines amount of visible metallic flakes") + ]], + uniform float opacity = 0.5 + [[ + anno::display_name("Flake opacity"), + anno::hard_range(0.0,1.), + anno::description("Determines visibility of the metallic flakes") + ]], + uniform float bump = 1. + [[ + anno::display_name("Flake orientation randomness"), + anno::description("Larger numbers will increase the sparkle radius around highlights") + ]] +) +[[ + anno::display_name("Apply flake coating"), + anno::description("Apply layer of metallic flakes to an existing material"), + anno::thumbnail(".thumbs/apply_metallicflakes.png"), + anno::in_group("Material modifiers", "Coating"), + icon(".icons/apply_flake_coating.svg"), + anno::ui_order(21), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + float3 flake_normal = base::flake_noise_bump_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + strength: bump, + scale: size * 0.001 + ); + float flake_opacity = base::flake_noise_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + intensity: opacity, + scale: size * 0.001, + density: amount + ).mono; + + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: flake_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + normal: flake_normal, + weight: flake_opacity, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material flake_paint( + color base_color = color(.3,.01,.01) + [[ + anno::display_name("Base color"), + anno::description("The color of the base paint") + ]], + color flake_color = color(.6,1,.1) + [[ + anno::display_name("Flake color"), + anno::description("The color of the flakes") + ]], + float roughness = 0.15 + [[ + anno::display_name("Flake roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metallic flakes") + ]], + uniform float size = 1. + [[ + anno::display_name("Flake size"), + anno::description("Determines size of the metallic flakes, in mm") + ]], + uniform float amount = 0.4 + [[ + anno::display_name("Flake amount"), + anno::hard_range(0.0,1.), + anno::description("Determines amount of visible metallic flakes") + ]], + uniform float opacity = .8 + [[ + anno::display_name("Flake weight"), + anno::hard_range(0.0,1.), + anno::description("Determines visibility of the metallic flakes") + ]], + uniform float bump = 1. + [[ + anno::display_name("Flake orientation randomness"), + anno::description("Larger numbers will increase the sparkle radius around highlights") + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat") + ]], + float coat_roughness = 0.0 + [[ + anno::display_name("Coat roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat") + ]], + float3 coat_bump = state::normal() + [[ + anno::display_name("Coat bump"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Flaky paint"), + anno::description("A multi layer paint material containing flakes"), + anno::thumbnail(".thumbs/flake_paint.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials"), + anno::ui_order(14), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("complex","carpaint")) +]] + = let{ + float3 flake_normal = base::flake_noise_bump_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + strength: bump, + scale: size * 0.001 + ); + float flake_opacity = base::flake_noise_texture( + uvw: base::coordinate_source(coordinate_system: base::texture_coordinate_object), + intensity: opacity, + scale: size * 0.001, + density: amount + ).mono; + + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: flake_color + ); +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: coat_bump, + layer: df::simple_glossy_bsdf(roughness_u: coat_roughness), + base: df::weighted_layer( + normal: flake_normal, + weight: flake_opacity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf(tint: base_color) + ) + ) + ), + thin_walled: true +); + +export material add_cutout( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a cut-out") + ]], + float cutout = 1.0 + [[ + anno::display_name("Cutout"), + anno::hard_range(0.0,1.0), + anno::description("Determines where the object is visible") + ]] +) [[ + anno::display_name("Add cut-outs"), + anno::description("Adds cut-outs to existing materials. Also forces material to be thin-walled. Good for modeling leaves, grass or fences."), + anno::thumbnail(".thumbs/add_cutout.png"), + anno::in_group("Material modifiers"), + icon(".icons/add_cutouts.svg"), + anno::ui_order(22), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: true, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: base.geometry.normal, + cutout_opacity: cutout + ) +); + +export material add_simple_sticker( + color diffuse_color = color(.5) + [[ + anno::display_name("Sticker color"), + anno::description("The color of the material"), + anno::ui_order(2) + ]], + float roughness = 0.05 + [[ + anno::display_name("Sticker roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(3) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("Sticker IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Sticker reflectivity"), + anno::hard_range(0.0,1.), + anno::description("Additional Reflectivity control"), + anno::ui_order(4) + ]], + float3 sticker_normal = state::normal() + [[ + anno::display_name("Sticker bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]], + float sticker_mask = 0.0 + [[ + anno::display_name("Sticker mask"), + anno::hard_range(0.0,1.0), + anno::description("Determines extent of the sticker"), + anno::ui_order(5) + ]], + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a sticker added"), + anno::ui_order(1) + ]] +) [[ + anno::display_name("Add simple sticker"), + anno::description("A quick way for adding simple stickers to a material. The sticker is a simple dielectric and needs a mask to define its extent."), + anno::thumbnail(".thumbs/add_simple_sticker.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_simple_sticker.svg"), + anno::ui_order(23), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = let{ + material blend_material = blend( + blend: scratched_plastic_v2( + diffuse_color: diffuse_color, + roughness: roughness, + ior: ior, + reflectivity: reflectivity, + normal: sticker_normal), + base: base, + weight: sticker_mask + ); +} in material( + surface: blend_material.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_globalbump( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a bump map") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bump"), + anno::description("An additional global bump map for the material. Local bump map of the base material is preserved.") + ]] +) [[ + anno::display_name("Add global bumpmap"), + anno::description("Adds global bumpmap to existing materials. Local bump map of the base material is preserved."), + anno::thumbnail(".thumbs/add_globalbump.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_global_bumpmap.svg"), + anno::ui_order(24), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_displacement( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get a bump map") + ]], + float displacement = 0.0 + [[ + anno::display_name("Displacement amount"), + anno::description("Attach displacement texture here. Note that the object needs to be set up correctly to have good displacement results.") + ]], + uniform float displacement_scale = 1.0 + [[ + anno::display_name("Displacement scale"), + anno::description("A global scale factor for the displacement amount") + ]] +) [[ + anno::display_name("Add displacement"), + anno::description("Adds displacement to existing materials"), + anno::thumbnail(".thumbs/add_displacement.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Displacement"), + icon(".icons/add_displacement.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: displacement*displacement_scale*state::scene_units_per_meter()*state::normal(), + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_vector_displacement( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get displacement") + ]], + float3 displacement = float3(0.0) + [[ + anno::display_name("Displacement amount"), + anno::description("Attach displacement texture here. Note that the object needs to be set up correctly to have good displacement results") + ]], + uniform displacement_vector_space space = displacement_vector_tangent_space + [[ + anno::display_name("Displacement vector mode"), + anno::description("Specify the space of the vector dispacement map") + ]], + uniform float displacement_scale = 1.0 + [[ + anno::display_name("Displacement scale"), + anno::description("A global scale factor for the displacement amount") + ]] +) [[ + anno::display_name("Add vector displacement"), + anno::description("Adds vector displacement to existing materials"), + anno::thumbnail(".thumbs/add_displacement.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Displacement"), + icon(".icons/add_vector_displacement.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: state::scene_units_per_meter()*transform_displacement_vector(displacement, space, displacement_scale), + normal: base.geometry.normal, + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_round_edges( + material base = scratched_plastic_v2() + [[ + anno::display_name("Base material"), + anno::description("The material that will get round edges") + ]], + uniform float round_edges_radius = 0.02 + [[ + anno::display_name("Round edge radius"), + anno::description("Influence radius around the edges in meters") + ]], + uniform float round_edges_roundness = 1.0 + [[ + anno::display_name("Round edge roundness"), + anno::description("Determines how round the edge will look"), + 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, unless + this parameter is set true, in which case the smoothing happens between + facets irrespective of their materials") + ]] +) [[ + anno::display_name("Add round edges"), + anno::description("Adds round edges to existing materials"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers"), + icon(".icons/add_round_edges.svg"), + anno::ui_order(25), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic")) +]] = material( + surface: base.surface, + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: material_geometry( + displacement: base.geometry.displacement, + normal: state::rounded_corner_normal( + radius: round_edges_radius, + roundness: round_edges_roundness, + across_materials: round_edges_across_materials + ), + cutout_opacity: base.geometry.cutout_opacity + ) +); + +export material add_emission( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get emission added") + ]], + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Add emission"), + anno::description("Adds emission to a material"), + anno::thumbnail(".thumbs/add_emission.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Emission"), + icon(".icons/add_emission.svg"), + anno::ui_order(26), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + suitable_as_light(), + anno::key_words(string[]("modifier","generic")) +]] = +let { + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} +in material( + surface: material_surface( + scattering: base.surface.scattering, + emission: material_emission( + emission: df::diffuse_edf(), + intensity: unit_intensity*tint*unit_scale, //for this mode, tint is assumes to be a color filter absorbing light + mode: imode + ) + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material add_thermal_emission( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get emission added") + ]], + uniform float temperature = 6500. + [[ + anno::display_name("Temperature"), + anno::description("The color temperature of the light in Kelvin") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Add thermal emission"), + anno::description("Adds emission to a material, color is based on a \"color temperature\""), + anno::thumbnail(".thumbs/add_thermal_emission.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Material modifiers", "Emission"), + icon(".icons/add_thermal_emission.svg"), + anno::ui_order(27), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + suitable_as_light(), + anno::key_words(string[]("modifier","generic")) +]] = +let { + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; + color emission_color = math::blackbody(temperature); + + color scaled_intensity = unit_intensity * (emission_color / math::luminance(emission_color));} +in material( + surface: material_surface( + scattering: base.surface.scattering, + emission: material_emission( + emission: df::diffuse_edf(), + intensity: scaled_intensity, + mode: imode + ) + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); +//endgroup + +/**-*/ + +//group Emissive materials + +export material light_omni ( + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Diffuse emission"), + anno::description("Emissive material emitting in all directions"), + anno::thumbnail(".thumbs/light_omni.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::ui_order(5000), + anno::hidden(), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = +let{ + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*math::PI; //diffuse emission is per projected hemisphere + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} in material ( + surface: material_surface ( + emission: material_emission ( + emission: df::diffuse_edf(), + intensity: tint*unit_intensity*unit_scale, + mode: imode + ) + ) +); + +export material light_spot ( + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1000 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(), //deprecated + anno::description("Modeling unit to meter conversion factor") + ]], + uniform float spot_exponent = 30 + [[ + anno::display_name("Spot focus"), + anno::description("larger values lead to more focused spotlights") + ]], + uniform emission_type unit = lumen_m2 + [[ + anno::display_name("Unit for emission"), + anno::description("The physical unit of \"Intensity\"") + ]] +) [[ + anno::display_name("Spotlight emission"), + anno::description("Emissive material emitting focused in one direction"), + anno::thumbnail(".thumbs/light_spot.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::hidden(), + anno::ui_order(5051), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = +let{ + //since this is a spotlight, we need the apex angle to convert from candela to lumen + //http://www.compuphase.com/electronics/candela_lumen.htm + //uniform float cos_apexangle_2 = math::pow(0.5,1./spot_exponent); //spot exponent 0 ->4pi + //uniform float apexfactor = 2*math::PI*(1.0-cos_apexangle_2); + + //correct integral + uniform float factor = (spot_exponent == 0)? 4*math::PI: 2*math::PI/(spot_exponent+1); + uniform float unit_intensity = (unit==lumen || unit==lumen_m2)?intensity:intensity*factor; + uniform intensity_mode imode = (unit==lumen || unit==candela)?intensity_power:intensity_radiant_exitance; +} in material ( + surface: material_surface ( + emission: material_emission ( + emission: df::spot_edf(exponent: spot_exponent,global_distribution: true, global_frame: float3x3(1.,0,0, 0,1.,0., 0.,0,-1) ), + intensity: tint*unit_intensity*unit_scale, + mode: imode + ) + ) +); + +export material light_ies ( + uniform light_profile profile + [[ + anno::display_name("IES light profile data"), + anno::description("Data to describe the distribution of the light") + ]], + color tint = color(1.) + [[ + anno::display_name("Color"), + anno::description("The color of the light") + ]], + uniform float intensity = 1 + [[ + anno::display_name("Intensity"), + anno::description("The brightness of the light source") + ]], + uniform float unit_scale = 1. + [[ + anno::display_name("Unit scale"), + anno::hidden(),//deprecated + anno::description("Modeling unit to meter conversion factor") + ]] +) [[ + anno::display_name("IES file based emission"), + anno::description("Emissive material emitting as described in an IES file"), + anno::thumbnail(".thumbs/light_ies.png"), + anno::author("NVIDIA Corporation"), + anno::in_group("Materials, lights"), + anno::hidden(), + anno::ui_order(5052), + anno::copyright_notice(COPYRIGHT), + anno::key_words(string[]("lightsource")), + suitable_as_light() +]] = material ( + surface: material_surface ( + emission: material_emission ( + emission: df::measured_edf(profile: profile,global_distribution: true, global_frame: float3x3(1.,0,0, 0,1.,0., 0.,0,-1) ), + intensity: tint*intensity*unit_scale + ) + ) +); + +//endgroup + +//group Deprecated + +//deprecated functionality=========================================================================================== +export annotation ui_position(int position); +export annotation typical_object_size(float size); + +export material metal( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::description("The color of the metal") + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflectivity"), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple metal, deprecated"), + anno::description("A basic metallic material"), + anno::thumbnail(".thumbs/metal.png"), + anno::author("NVIDIA Corporation"), + anno::hidden(), + //anno::deprecated("Use scratched_metal_v2"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: metal_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material plastic( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material") + ]], + float roughness = 0.25 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Simple plastic, deprecated"), + anno::description("A basic dielectric, works for everything opaque that is not metallic"), + anno::thumbnail(".thumbs/plastic.png"), + anno::author("NVIDIA Corporation"), + anno::hidden(), + //anno::deprecated("Use scratched_plastic_v2"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_metal( + color metal_color = color(.9) + [[ + anno::display_name("Color"), + anno::description("The color of the metal") + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + float glossy_weight = .9 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Intensity of highlights and glossy reflections and highlights") + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight") + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees.") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Metal , deprecated"), + anno::description("A metallic material with stretched reflections"), + anno::thumbnail(".thumbs/scratched_metal.png"), + anno::hidden(), + //anno::deprecated("Use scratched_metal_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","metal")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: metal_color, + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::weighted_layer( + weight: glossy_weight, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: metal_color + ), + normal: normal + ) + ) + ) +); + +export material scratched_plastic( + color diffuse_color = color(.5) + [[ + anno::display_name("Color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float roughness = 0.05 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(2) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Anisotropy"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(4) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(5) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity"), + anno::ui_order(6) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Additional Reflectivity control"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(7) + ]] +) +[[ + anno::display_name("Plastic, deprecated"), + anno::description("A basic dielectric, works for everything opaque that is not metallic. Supports stretched highlights."), + anno::thumbnail(".thumbs/scratched_plastic.png"), + anno::hidden(), + //anno::deprecated("Use scratched_plastic_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","plastic","wood","stone")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); +} in material( + thin_walled: true, + surface: material_surface( + scattering: df::weighted_layer( + weight: 1., + normal: normal, + layer: df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: df::diffuse_reflection_bsdf( + roughness: 0.0, + tint: diffuse_color + ), + normal: normal + ) + ) + ) +); + +export material apply_colorfalloff( + material base = scratched_metal(metal_color: color(1.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied") + ]], + color color_0 = color(1.,0.,0.) + [[ + anno::display_name("Color 1"), + anno::description("The color of the dust") + ]], + color color_1 = color(0.,1.,0.) + [[ + anno::display_name("Color 2"), + anno::description("The color of the dust") + ]], + color color_2 = color(0.,0.,1.) + [[ + anno::display_name("Color 3"), + anno::description("The color of the dust") + ]], + color color_3 = color(1.,0.,0.) + [[ + anno::display_name("Color 4"), + anno::description("The color of the dust") + ]], + color color_4 = color(0.,1.,0.) + [[ + anno::display_name("Color 5"), + anno::description("The color of the dust") + ]] +) +[[ + anno::display_name("Apply a color falloff, deprecated"), + anno::description("Makes the color view dependent"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + anno::thumbnail(".thumbs/apply_colorfalloff.png"), + anno::hidden(), + //anno::deprecated("Use apply_colorfalloff_v2 instead"), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = material( + surface: material_surface( + scattering: df::measured_curve_factor( + curve_values: color[](color_0,color_1,color_2,color_3,color_4), + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material flex_material( + color base_color = color(.5) + [[ + anno::display_name("Base color"), + anno::in_group("Base"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + float diffuse_roughness = 0.0 + [[ + anno::display_name("Diffuse roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to a more \"powdery\" look"), + anno::ui_order(2) + ]], + uniform bool is_metal = false + [[ + anno::display_name("Metallic material"), + anno::in_group("Base"), + anno::description("If true, reflection will be colored and independent of view direction. If false, reflection will be white and direction dependent. Directional dependence is in this case based on the IOR (Fresnel effect)."), + anno::ui_order(3) + ]], + float reflectivity = 1.0 + [[ + anno::display_name("Reflection weight"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Controls the amount of reflection"), + anno::ui_order(5) + ]], + float reflection_roughness = 0.1 + [[ + anno::display_name("Reflection roughness"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to more blurry reflections"), + anno::ui_order(4) + ]], + float anisotropy = 0.0 + [[ + anno::display_name("Reflection anisotropy"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Higher values will stretch the highlight"), + anno::ui_order(6) + ]], + float anisotropy_rotation = 0.0 + [[ + anno::display_name("Anisotropy rotation"), + anno::in_group("Base"), + anno::hard_range(0.0,1.), + anno::description("Changes the orientation of the anisotropy. A value of 1 will rotate the orientation 360 degrees."), + anno::ui_order(7) + ]], + float transparency = 0.0 + [[ + anno::display_name("Transmission weight"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("Weights how much light passes through the object vs. its diffuse reflectivity"), + anno::ui_order(12) + ]], + color transmission_color = color(1.) + [[ + anno::display_name("Transmission color"), + anno::in_group("Transmission"), + anno::description("Color effect for transmission independent of thickness of the object, similar to stained glass"), + anno::ui_order(8) + ]], + uniform color volume_color = color(1.0) + [[ + anno::display_name("Volume color"), + anno::in_group("Transmission"), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at \"Volume reference distance\"(m)"), + anno::ui_order(9) + ]], + float transmission_roughness = 0.0 + [[ + anno::display_name("Transmission roughness"), + anno::in_group("Transmission"), + anno::hard_range(0.0,1.), + anno::description("higher values lead to objects seen through the material to appear blurry"), + anno::ui_order(11) + ]], + uniform float base_thickness = 0.1 + [[ + anno::display_name("Volume reference distance"), + anno::in_group("Transmission"), + anno::soft_range(0.0,10.0), + anno::description("If the material is not \"Thin walled\", \"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(10) + ]], + uniform float ior = 1.5 + [[ + anno::display_name("IOR"), + anno::in_group("Global"), + anno::soft_range(1.0,4.0), + anno::description("Determines refraction in the volume. It also influences the reflectivity for materials that are not metallic."), + anno::ui_order(14) + ]], + uniform bool thin_walled = false + [[ + anno::display_name("Thin walled"), + anno::in_group("Global"), + anno::description("Thin walled materials do not refract and do not have volume effects. Good for soap bubbles or window glass."), + anno::ui_order(13) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::in_group("Global"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(16) + ]], + uniform float abbe_number = 0.0 + [[ + anno::in_group("Global"), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off, Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(15) + ]] +) +[[ + anno::display_name("Flexible material model, deprecated"), + anno::description("A complex material that can be configured to a wide variety of looks"), + anno::thumbnail(".thumbs/flex_material.png"), + anno::hidden(), + //anno::deprecated("Use flex_material_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(complex_material), + anno::key_words(string[]("generic","complex")) +]] + = let{ + base::anisotropy_return anisotropy_values = base::anisotropy_conversion( + roughness: reflection_roughness, + anisotropy: anisotropy, + anisotropy_rotation: anisotropy_rotation + ); + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: is_metal? base_color: color(1.), + roughness_u: anisotropy_values.roughness_u, + roughness_v: anisotropy_values.roughness_v, + tangent_u: anisotropy_values.tangent_u + ); + bsdf diffuse_bsdf = df::diffuse_reflection_bsdf( + tint: base_color, + roughness: diffuse_roughness + ); + bsdf transmission_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: transmission_roughness + ); + bsdf add_transparency = df::weighted_layer( + weight: transparency, + layer: transmission_bsdf, + base: diffuse_bsdf, + normal: normal + ); + bsdf add_reflection = is_metal? df::weighted_layer( + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ): df::fresnel_layer( + ior: ior, + weight: reflectivity, + layer: glossy_bsdf, + base: add_transparency, + normal: normal + ); + bsdf add_normal = df::weighted_layer( + normal: normal, + weight: 1., + layer: add_reflection + ); +} in material( + thin_walled: thin_walled, + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number), + surface: material_surface( + scattering: add_normal + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ) +); + +export material thin_glass( + color glass_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin glass, deprecated"), + anno::description("A basic transmissive dielectric without refraction or volume"), + anno::thumbnail(".thumbs/thin_glass.png"), + anno::hidden(), + //anno::deprecated("Use thin_glass_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf glossy_transmission_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: glass_color, + roughness_u: roughness + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + layer: glossy_transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) +); + +export material thin_translucent( + color surface_color = color(.95) + [[ + anno::display_name("Diffuse color"), + anno::description("The color of the material") + ]], + color translucent_color = color(.95) + [[ + anno::display_name("Translucence color"), + anno::description("The color of the volume of the material") + ]], + float translucency = 0.5 + [[ + anno::display_name("Translucence weight"), + anno::hard_range(0.0,1.), + anno::description("Fraction of the incoming light that should be visible on the backside") + ]], + float roughness = 0.0 + [[ + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity") + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]] +) +[[ + anno::display_name("Thin translucent, deprecated"), + anno::description("A diffuse transmissive dielectric material"), + anno::thumbnail(".thumbs/thin_translucent.png"), + anno::hidden(), + //anno::deprecated("Use thin_translucent_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","leaves","paper","sheets")) +]] + = let{ + bsdf glossy_reflection_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf transmission_bsdf = df::diffuse_transmission_bsdf( + tint: translucent_color + ); + bsdf base_bsdf = df::diffuse_reflection_bsdf( + tint: surface_color + ); +} in material( + thin_walled: true, + surface: material_surface( + df::fresnel_layer( + ior: ior, + normal: normal, + layer: glossy_reflection_bsdf, + base: df::weighted_layer( + weight: translucency, + normal: normal, + base: base_bsdf, + layer: df::weighted_layer( + layer: transmission_bsdf, + normal: normal, + weight: 1. + ) + ) + ) + ) +); + +export material thick_glass( + color transmission_color = color(1.0) + [[ + anno::ui_order(1), + anno::display_name("Transmission color"), + anno::description("Colors the light entering the volume, similar to stained glass") + ]], + uniform color glass_color = color(.95) + [[ + anno::ui_order(2), + anno::display_name("Volume color"), + anno::description("The color of the glass body") + ]], + float roughness = 0.0 + [[ + anno::ui_order(4), + anno::display_name("Roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections") + ]], + uniform float ior = 1.4 + [[ + anno::ui_order(5), + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction") + ]], + uniform float base_thickness = .1 + [[ + anno::ui_order(3), + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here.") + + ]], + float3 normal = state::normal() + [[ + anno::ui_order(7), + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here") + ]], + uniform float abbe_number = 0.0 + [[ + anno::ui_order(6), + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0 switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0) + ]] +) +[[ + anno::display_name("Thick glass, deprecated"), + anno::description("A basic transmissive dielectric with refraction and coloring in the volume"), + anno::thumbnail(".thumbs/thick_glass.png"), + anno::hidden(), + //anno::deprecated("Use thick_glass_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","glass")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf glossy_bsdf_transmission = df::simple_glossy_bsdf( + mode: df::scatter_transmit, + tint: transmission_color, + roughness_u: roughness + ); +} in material( + thin_walled: false, + surface: material_surface( + df::weighted_layer( + normal: normal, + weight: 1., + layer: df::fresnel_layer( + layer: glossy_bsdf, + base: glossy_bsdf_transmission, + ior: ior, + normal: normal + ) + ) + ), + volume: material_volume( + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(glass_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material thick_translucent( + color transmission_color = color(.95) + [[ + anno::display_name("Transmission color"), + anno::description("The color of the material"), + anno::ui_order(1) + ]], + uniform color volume_color = color(.95) + [[ + anno::display_name("Volume color"), + anno::description("The color of the volume at \"Volume reference distance\""), + anno::ui_order(2) + ]], + uniform float volume_scattering = 0.5 + [[ + anno::display_name("Volume scattering"), + anno::hard_range(0.0,.99999), + anno::description("Amount of scattering for objects at \"Volume reference distance\""), + anno::ui_order(3) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.), + anno::description("Higher roughness values lead to bigger highlights and blurry reflections"), + anno::ui_order(5) + ]], + float reflectivity = 1. + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.), + anno::description("Overall reflectivity of the material"), + anno::ui_order(6) + ]], + uniform float base_thickness = .1 + [[ + anno::display_name("Volume reference distance"), + anno::soft_range(0.0,10.0), + anno::description("\"Volume color\" and \"Volume scattering\" will be reached at this distance (m). Enter a typical thickness of objects made of this material here."), + anno::ui_order(4) + + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(9) + ]], + uniform float ior = 1.4 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity as well as amount of refraction"), + anno::ui_order(7) + ]], + uniform float abbe_number = 0.0 + [[ + anno::display_name("Abbe number"), + anno::description("Controls dispersion. A value of 0switches dispersion off. Dispersive materials have Abbe numbers between 25 and 85."), + anno::soft_range(0.0,100.0), + anno::ui_order(8) + ]] +) +[[ + anno::display_name("Thick translucent, deprecated"), + anno::description("A subsurface scattering material"), + anno::thumbnail(".thumbs/thick_translucent.png"), + anno::hidden(), + //anno::deprecated("Use thick_translucent_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(simple_material), + anno::key_words(string[]("generic","dielectric","wax","milk")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + tint: color(1.), + roughness_u: roughness + ); + bsdf transmission_bsdf = df::specular_bsdf( + mode: df::scatter_transmit, + tint: transmission_color + ); + +} in material( + thin_walled: false, + surface: material_surface( + df::fresnel_layer( + normal: normal, + weight: reflectivity, + ior: ior, + layer: glossy_bsdf, + base: df::weighted_layer( + normal: normal, + weight: 1., + layer: transmission_bsdf + ) + ) + ), + volume: material_volume( + scattering_coefficient: (base_thickness <= 0)? color(0): math::log(color(1.-volume_scattering)) / - base_thickness, + absorption_coefficient: (base_thickness <= 0)? color(0): math::log(volume_color) / -base_thickness + ), + ior: abbe_number == 0.0?color(ior):base::abbe_number_ior(ior, abbe_number) +); + +export material apply_clearcoat( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a clear coating applied"), + anno::ui_order(1) + ]], + uniform float ior = 1.6 + [[ + anno::display_name("IOR"), + anno::soft_range(1.0,4.0), + anno::description("Determines reflectivity of the clear coat"), + anno::ui_order(5) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the clear coat"), + anno::ui_order(3) + ]], + float visibility = 1.0 + [[ + anno::display_name("Coat visibility"), + anno::hard_range(0.0,1.0), + anno::description("Determines visibility of the clear coat"), + anno::ui_order(4) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(6) + ]], + color coat_filter_color = color(1.) + [[ + anno::display_name("Coat filter color"), + anno::description("For simulating coatings with colored resins that modulate the color of underlying layers"), + anno::ui_order(2) + ]] +) +[[ + anno::display_name("Apply clear coating, deprecated"), + anno::description("Apply clear coat to an existing material"), + anno::author("NVIDIA Corporation"), + anno::thumbnail(".thumbs/apply_clearcoat.png"), + anno::hidden(), + //anno::deprecated("Use apply_clearcoat_v2 instead"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: color(1.) + ); + color base_tint = blend_colors(color(1.), coat_filter_color, color_layer_blend, visibility).tint; +} in material( + surface: material_surface( + scattering: df::fresnel_layer( + ior: ior, + normal: normal, + weight: visibility, + layer: glossy_bsdf, + base: df::tint(tint: base_tint, base: base.surface.scattering) + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +export material apply_metalcoat( + material base = diffuse(diffuse_color: color(0.)) + [[ + anno::display_name("Base material"), + anno::description("The material that will get a metallic coating applied"), + anno::ui_order(1) + ]], + color metal_color = color(.95) + [[ + anno::display_name("Reflection color"), + anno::description("The color of the metal"), + anno::ui_order(2) + ]], + float visibility = .3 + [[ + anno::display_name("Reflection weight"), + anno::hard_range(0.0,1.0), + anno::description("The opacity of the coat"), + anno::ui_order(4) + ]], + float roughness = 0.0 + [[ + anno::display_name("Reflection roughness"), + anno::hard_range(0.0,1.0), + anno::description("Determines roughness of the metal coat"), + anno::ui_order(3) + ]], + float3 normal = state::normal() + [[ + anno::display_name("Bumps"), + anno::description("Attach bump or normal maps here"), + anno::ui_order(5) + ]] +) +[[ + anno::display_name("Apply thin metal coating, deprecated"), + anno::description("Apply metal coat to an existing material"), + anno::thumbnail(".thumbs/apply_metalcoat.png"), + anno::hidden(), + //anno::deprecated("Use apply_metalcoat_v2 instead"), + anno::author("NVIDIA Corporation"), + anno::copyright_notice(COPYRIGHT), + type_of_material(modifier_material), + anno::key_words(string[]("modifier","generic","coating")) +]] + = let{ + bsdf glossy_bsdf = df::simple_glossy_bsdf( + mode: df::scatter_reflect, + roughness_u: roughness, + tint: metal_color + ); +} in material( + surface: material_surface( + scattering: df::weighted_layer( + weight: visibility, + normal: normal, + layer: glossy_bsdf, + base: base.surface.scattering + ), + emission: base.surface.emission + ), + volume: base.volume, + ior: base.ior, + thin_walled: base.thin_walled, + geometry: base.geometry +); + +//endgroup + +/*-**/ diff --git a/yaskawa_motoman_next_nex10/materials/mdl/support_definitions.mdl b/yaskawa_motoman_next_nex10/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/yaskawa_motoman_next_nex10/materials/mdl/support_definitions.mdl @@ -0,0 +1,4292 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + +mdl 1.8; + +import ::anno::*; +import ::math::*; + +using .::aux_definitions import xy; +import ::state::*; +import ::scene::*; + +export using ::state import coordinate_space; //enum type +import ::tex::*; +export using ::tex import gamma_mode; //enum type +export using ::tex import wrap_mode; //enum type + +module [[ + anno::version( 1, 2, 0), + anno::display_name("NVIDIA support definitions") +]]; + +export annotation icon(string path); + + +export float data_lookup_float( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float default_value = float() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float(name, default_value); +} + +export float2 data_lookup_float2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float2 default_value = float2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float2(name, default_value); +} + +export float3 data_lookup_float3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float3 default_value = float3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float3(name, default_value); +} + +export float4 data_lookup_float4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + float4 default_value = float4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup float4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_float4(name, default_value); +} + +export int data_lookup_int( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int default_value = int() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int(name, default_value); +} + +export int2 data_lookup_int2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int2 default_value = int2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int2(name, default_value); +} + +export int3 data_lookup_int3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int3 default_value = int3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int3(name, default_value); +} + +export int4 data_lookup_int4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + int4 default_value = int4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup int4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_int4(name, default_value); +} + +export color data_lookup_color( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + color default_value = color() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup color"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Varying"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_color(name, default_value); +} + +export uniform float data_lookup_uniform_float( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float default_value = float() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup unfirom float"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float(name, default_value); +} + +export uniform float2 data_lookup_uniform_float2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float2 default_value = float2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform float2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float2(name, default_value); +} + +export uniform float3 data_lookup_uniform_float3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float3 default_value = float3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform float3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float3(name, default_value); +} + +export uniform float4 data_lookup_uniform_float4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform float4 default_value = float4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup unfirom float4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_float4(name, default_value); +} + +export uniform int data_lookup_uniform_int( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int default_value = int() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int(name, default_value); +} + +export uniform int2 data_lookup_uniform_int2( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int2 default_value = int2() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int2"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int2(name, default_value); +} + +export uniform int3 data_lookup_uniform_int3( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int3 default_value = int3() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int3"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int3(name, default_value); +} + +export uniform int4 data_lookup_uniform_int4( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform int4 default_value = int4() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform int4"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_int4(name, default_value); +} + +export uniform color data_lookup_uniform_color( + uniform string name [[ + anno::description("Scene data attribute name to look up on the target mesh.") + ]], + uniform color default_value = color() [[ + anno::description("Fallback value returned when the named scene data is not present on the target mesh.") + ]] +) [[ + anno::display_name("Data lookup uniform color"), + anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Data Lookup", "Uniform"), + icon(".icons/data_lookup.svg") +]] +{ + return scene::data_lookup_uniform_color(name, default_value); +} + + + +// operator nodes +// Add +export int add(int a=0, int b=0) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(300) +]] +{ return a+b; } + +export float add(float a=0.0, float b=0.0) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(301) +]] +{ return a+b; } + +export float2 add(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(302) +]] +{ return a+b; } + +export float3 add(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(303) +]] +{ return a+b; } + +export float4 add(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(304) +]] +{ return a+b; } + +export color add(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Add"), + anno::description("Adds the two inputs and returns the result. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Add"), + icon(".icons/Add.svg"), + anno::ui_order(305) +]] +{ return a+b; } + +export int subtract(int a=0, int b=0) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(310) +]] +{ return a-b; } + +export float subtract(float a=0.0, float b=0.0) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(311) +]] +{ return a-b; } + +export float2 subtract(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(312) +]] +{ return a-b; } + +export float3 subtract(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(313) +]] +{ return a-b; } + +export float4 subtract(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(314) +]] +{ return a-b; } + +export color subtract(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Subtract"), + anno::description("Subtracts the second input from the first. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Subtract"), + icon(".icons/Subtract.svg"), + anno::ui_order(315) +]] +{ return a-b; } + +export int multiply(int a=0, int b=0) +[[ + anno::display_name("Multiply"), + anno::description("Subtracts the second input from the first."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(320) +]] +{ return a*b; } + +export float multiply(float a=0.0, float b=0.0) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(321) +]] +{ return a*b; } + +export float2 multiply(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(322) +]] +{ return a*b; } + +export float3 multiply(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(323) +]] +{ return a*b; } + +export float4 multiply(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(324) +]] +{ return a*b; } + +export color multiply(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Multiply"), + anno::description("Multiplies the two inputs and returns the product. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Multiply"), + icon(".icons/Multiply.svg"), + anno::ui_order(325) +]] +{ return a*b; } + +export int divide(int a=0, int b=0) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(326) +]] +{ return a/b; } + +export float divide(float a=0.0, float b=0.0) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(327) +]] +{ return a/b; } + +export float2 divide(float2 a=float2(0.0), float2 b=float2(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(328) +]] +{ return a/b; } + +export float3 divide(float3 a=float3(0.0), float3 b=float3(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(329) +]] +{ return a/b; } + +export float4 divide(float4 a=float4(0.0), float4 b=float4(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(330) +]] +{ return a/b; } + +export color divide(color a=color(0.0), color b=color(0.0)) +[[ + anno::display_name("Divide"), + anno::description("Divides the first input by the second. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Divide"), + icon(".icons/Divide.svg"), + anno::ui_order(331) +]] +{ return a/b; } + +export int condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + int a=0 [[ + anno::description("Value returned when the condition is true.") + ]], + int b=0 [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(332) +]] +{ return x?a:b; } + +export float condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float a=0.0 [[ + anno::description("Value returned when the condition is true.") + ]], + float b=0.0 [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(333) +]] +{ return x?a:b; } + +export float2 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float2 a=float2(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float2 b=float2(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(334) +]] +{ return x?a:b; } + +export float3 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float3 a=float3(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float3 b=float3(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(335) +]] +{ return x?a:b; } + +export float4 condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + float4 a=float4(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + float4 b=float4(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(336) +]] +{ return x?a:b; } + +export color condition( + uniform bool x=true [[ + anno::description("Condition that selects which input to return.") + ]], + color a=color(0.0) [[ + anno::description("Value returned when the condition is true.") + ]], + color b=color(0.0) [[ + anno::description("Value returned when the condition is false.") + ]] +) +[[ + anno::display_name("Condition?"), + anno::description("Returns input a when the condition is true; otherwise returns input b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Condition"), + icon(".icons/condition.svg"), + anno::ui_order(337) +]] +{ return x?a:b; } + +export bool compare(float a, float b) +[[ + anno::display_name("Compare"), + anno::description("Returns true when a is greater than b; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Comparison"), + icon(".icons/compare.svg"), + anno::ui_order(338) +]] +{ return a>b; } + +export bool equality(bool a, bool b) +[[ + anno::display_name("Check equality bool"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(339) +]] +{ return a==b; } + +export bool equality(int a, int b) +[[ + anno::display_name("Check equality int"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(340) +]] +{ return a==b; } + +export bool equality(int2 a, int2 b) +[[ + anno::display_name("Check equality int2"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(341) +]] +{ return a==b; } + +export bool equality(int3 a, int3 b) +[[ + anno::display_name("Check equality int3"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(342) +]] +{ return a==b; } + +export bool equality(float a, float b) +[[ + anno::display_name("Check equality float"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(343) +]] +{ return a==b; } + +export bool equality(float2 a, float2 b) +[[ + anno::display_name("Check equality float2"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(344) +]] +{ return a==b; } + +export bool equality(float3 a, float3 b) +[[ + anno::display_name("Check equality float3"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(345) +]] +{ return a==b; } + +export bool equality(color a, color b) +[[ + anno::display_name("Check equality color"), + anno::description("Returns true when both inputs are equal; otherwise returns false."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Operators", "Equality"), + icon(".icons/Equality.svg"), + anno::ui_order(346) +]] +{ return a==b; } + +//constants nodes. +export bool bool_const(uniform bool b = true) +[[ + anno::display_name("Constant bool"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1000) +]] +{ return b; } + +export int int_const(uniform int i = 0) +[[ + anno::display_name("Constant int"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1001) +]] +{ return i; } + +export float float_const(uniform float f = 0.) +[[ + anno::display_name("Constant float"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1002) +]] +{ return f; } + +export float2 float2_const(uniform float2 f2 = float2(0.)) +[[ + anno::display_name("Constant float2"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1003) +]] +{ return f2; } + +export float3 float3_const(uniform float3 f3 = float3(0.)) +[[ + anno::display_name("Constant float3"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1004) +]] +{ return f3; } + +export float4 float4_const(uniform float4 f4 = float4(0.)) +[[ + anno::display_name("Constant float4"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1005) +]] +{ return f4; } + +export color color_const(uniform color c = color(0.)) +[[ + anno::display_name("Constant color"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1006) +]] +{ return c; } + +export uniform texture_2d texture_2d_const(uniform texture_2d tex = texture_2d())[[ + anno::display_name("Constant texture_2d"), + anno::description("Pass-through constant node that returns the provided value unchanged."), + anno::author("NVIDIA Corporation"), + anno::in_group("Constants"), + icon(".icons/constructor.svg"), + anno::ui_order(1007) +]] +{ return tex; } + +//exports from tex: +export int texture_width( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose width is queried.") + ]]) uniform +[[ + anno::display_name("Width of texture"), + anno::description("Returns the width of the input texture in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Width"), + icon(".icons/texture_width.svg"), + anno::ui_order(141) +]] +{ return tex::width(tex); } + +export int texture_width( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose tile width is queried.") + ]], + int2 uv_tile = int2(0, 0) [[ + anno::description("UDIM tile index as (u, v).") + ]]) uniform +[[ + anno::display_name("Width of a texture tile"), + anno::description("Returns the width of the specified texture tile in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Width"), + icon(".icons/texture_width.svg"), + anno::ui_order(143) +]] +{ return tex::width(tex, uv_tile); } + +export int height( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose height is queried.") + ]]) uniform +[[ + anno::display_name("Height of texture"), + anno::description("Returns the height of the input texture in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Height"), + icon(".icons/texture_height.svg"), + anno::ui_order(142) +]] +{ return tex::height(tex); } + +export int height( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource whose tile height is queried.") + ]], + int2 uv_tile = int2(0, 0) [[ + anno::description("UDIM tile index as (u, v).") + ]]) uniform +[[ + anno::display_name("Height of a texture tile"), + anno::description("Returns the height of the specified texture tile in pixels."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info", "Height"), + icon(".icons/texture_height.svg"), + anno::ui_order(144) +]] +{ return tex::height(tex,uv_tile); } + +export float2 transform_st( + float rotation = 0.0 [[ + anno::description("Rotation angle in radians.") + ]], + float2 translation = float2(0.0) [[ + anno::description("Translation offset applied after rotation and scaling.") + ]], + float2 scale = float2(1.0) [[ + anno::description("Scale factor applied per coordinate axis.") + ]], + float2 st = float2(0.0) [[ + anno::description("Input 2D coordinate to transform.") + ]] +) +[[ + anno::display_name("Transform 2D"), + anno::description("Applies rotation, scaling, and translation to a 2D coordinate."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform"), + icon(".icons/transform.svg"), + anno::ui_order(1019) +]] +{ + float s = math::sin(rotation); + float c = math::cos(rotation); + float2 st_t=st; + st_t = float2(s*st_t.x+c*st_t.y,s*st_t.y-c*st_t.x); + return st_t*scale+ translation; +} + +export color biased_color_blend( + float w1 = 0.0 [[ + anno::description("Weight for the first input color.") + ]], + color c1 = color(0.0) [[ + anno::description("First input color.") + ]], + float w2 = 0.0 [[ + anno::description("Weight for the second input color.") + ]], + color c2 = color(0.0) [[ + anno::description("Second input color.") + ]], + float w3 = 0.0 [[ + anno::description("Weight for the third input color.") + ]], + color c3 = color(0.0) [[ + anno::description("Third input color.") + ]], + color mean = color(0.5) [[ + anno::description("Expected average color used to preserve contrast in the biased blend.") + ]] +) +[[ + anno::display_name("Biased color blend"), + anno::description("Blends up to three colors using weights; set mean to the expected average to preserve contrast when mixing textures."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Blend"), + icon(".icons/biased_color_blend.svg"), + anno::ui_order(539) +]] +{ + color o=w1*c1+w2*c2+w3*c3; + float s=w1+w2+w3; + float s2=w1*w1+w2*w2+w3*w3; +return mean + (o-s*mean)/ math::sqrt(s2); +} + + +export float lookup_float( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(100) +]] +{ return tex::lookup_float( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + +export float3 lookup_float3( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float3"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(110) +]] +{ return tex::lookup_float3( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +export float4 lookup_float4( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup float4"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(120) +]] { return tex::lookup_float4( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +export color lookup_color( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to sample.") + ]], + float2 coord = float2(0.) [[ + anno::description("Texture coordinate used for sampling.") + ]], + uniform wrap_mode wrap_u = wrap_repeat [[ + anno::description("Wrap mode applied along the U axis.") + ]], + uniform wrap_mode wrap_v = wrap_repeat [[ + anno::description("Wrap mode applied along the V axis.") + ]], + uniform float2 crop_u = float2(0.0, 1.0) [[ + anno::description("Crop interval along the U axis, expressed as [min, max].") + ]], + uniform float2 crop_v = float2(0.0, 1.0) [[ + anno::description("Crop interval along the V axis, expressed as [min, max].") + ]], + float frame = 0.0 [[ + anno::description("Frame value used for animated textures.") + ]]) uniform +[[ + anno::display_name("Texture lookup color"), + anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Lookup"), + icon(".icons/texture_lookup.svg"), + anno::ui_order(130) +]] { return tex::lookup_color( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); } + + +// check for valid resource +export bool texture_isvalid( + uniform texture_2d tex = texture_2d() [[ + anno::description("Texture resource to validate.") + ]]) uniform +[[ + anno::display_name("Is texture valid?"), + anno::description("Returns true when the provided texture handle is valid and can be sampled."), + anno::author("NVIDIA Corporation"), + anno::in_group("Texturing", "Info"), + icon(".icons/texture_isvalid.svg"), + anno::ui_order(140) +]] +{ return tex::texture_isvalid(tex); } + + +//exports from state: +export float3 position() +[[ + anno::display_name("Hit position"), + anno::description("Returns the current shading position in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/position.svg"), + anno::ui_order(1012) +]] +{ return state::position(); } + +export float3 normal() +[[ + anno::display_name("Shade normal"), + anno::description("Returns the current shading normal in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/normal.svg"), + anno::ui_order(1013) +]] +{ return state::normal(); } + +//new: quick access to xy: +export float2 texture_coordinate_2d( + uniform int i = 0 [[ + anno::description("Texture coordinate set index.") + ]]) +[[ + anno::display_name("Texture coordinate 2D"), + anno::description("Returns authored texture coordinates from the selected texture coordinate set."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Coordinate"), + icon(".icons/texture_coordinate.svg"), + anno::ui_order(1010) +]] +{ return xy(state::texture_coordinate(i)); } + +export float3 texture_coordinate_3d( + uniform int i = 0 [[ + anno::description("Texture coordinate set index.") + ]]) +[[ + anno::display_name("Texture coordinate 3D"), + anno::description("Returns authored texture coordinates from the selected texture coordinate set."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Coordinate"), + icon(".icons/texture_coordinate.svg"), + anno::ui_order(1011) +]] +{ return state::texture_coordinate(i); } + +export float3 texture_tangent_u( + uniform int i = 0 [[ + anno::description("Texture coordinate set index used to derive the U tangent.") + ]]) +[[ + anno::display_name("Shade tangent"), + anno::description("Returns the current shading tangent (U direction) in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Tangent"), + icon(".icons/texture_tangent.svg"), + anno::ui_order(1014) +]] +{ return state::texture_tangent_u(i); } + +export float3 texture_tangent_v( + uniform int i = 0 [[ + anno::description("Texture coordinate set index used to derive the V tangent.") + ]]) +[[ + anno::display_name("Shade bi-tangent"), + anno::description("Returns the current shading bitangent (V direction) in the renderer's internal coordinate space."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars", "Texture", "Tangent"), + icon(".icons/texture_tangent.svg"), + anno::ui_order(1015) +]] +{ return state::texture_tangent_v(i); } + +export float animation_time() +[[ + anno::display_name("Animation time"), + anno::description("Returns elapsed animation time in seconds from the start of the timeline."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene"), + icon(".icons/animation_time.svg"), + anno::ui_order(1030) +]] +{ return state::animation_time(); } + + +export float3 transform_point( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input point.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed point.") + ]], + float3 point=float3(0.) [[ + anno::description("Point to transform.") + ]]) +[[ + anno::display_name("Transform point"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1020) +]] +{ return state::transform_point(from, to, point); } + +export float3 transform_vector( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input vector.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed vector.") + ]], + float3 vector=float3(0.) [[ + anno::description("Vector to transform.") + ]]) +[[ + anno::display_name("Transform vector"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1021) +]] +{ return state::transform_vector(from, to, vector); } + +export float3 transform_normal( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input normal.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed normal.") + ]], + float3 normal=float3(0.,1.,0.) [[ + anno::description("Normal vector to transform.") + ]]) +[[ + anno::display_name("Transform normal"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1022) +]] +{ return state::transform_normal(from, to, normal); } + +export float transform_scale( + uniform coordinate_space from=coordinate_internal [[ + anno::description("Source coordinate space of the input scale value.") + ]], + uniform coordinate_space to=coordinate_object [[ + anno::description("Destination coordinate space for the transformed scale value.") + ]], + float scale=0. [[ + anno::description("Scale value to transform.") + ]]) +[[ + anno::display_name("Transform scale"), + anno::description("Transforms the input value between internal, object, and world coordinate spaces."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Coordinate"), + icon(".icons/transform.svg"), + anno::ui_order(1023) +]] +{ return state::transform_scale(from, to, scale); } + +float2 r2d(float2 x, float theta) +{ + theta *= math::acos(-1.0) * 2.0; + return float2( + math::cos(theta) * x[0] + math::sin(theta) * x[1], + math::cos(theta) * x[1] - math::sin(theta) * x[0]); +} + +export float3 rotate_around_x( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around X"), + anno::description("Rotates a 3D point around the X axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1024) +]] +{ + float2 v = r2d(float2(p.y, p.z), theta); + return float3(p.x, v[0], v[1]); +} + +export float3 rotate_around_y( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around Y"), + anno::description("Rotates a 3D point around the Y axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1025) +]] +{ + float2 v = r2d(float2(p.x, p.z), theta); + return float3(v[0], p.y, v[1]); +} + +export float3 rotate_around_z( + float3 p [[ + anno::description("Point to rotate.") + ]], + float theta [[ + anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.") + ]]) +[[ + anno::display_name("Rotate Around Z"), + anno::description("Rotates a 3D point around the Z axis by the input angle."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Transform", "Rotation"), + icon(".icons/rotation.svg"), + anno::ui_order(1026) +]] +{ + float2 v = r2d(float2(p.x, p.y), theta); + return float3(v[0], v[1], p.z); +} + +export float meters_per_scene_unit() +[[ + anno::display_name("Meters per scene unit"), + anno::description("Returns the conversion factor between scene units and meters."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene", "Units"), + icon(".icons/meters_per_scene_unit.svg"), + anno::ui_order(1031) +]] +{ return state::meters_per_scene_unit(); } + +export float scene_units_per_meter() +[[ + anno::display_name("Scene units per meter"), + anno::description("Returns the conversion factor between scene units and meters."), + anno::author("NVIDIA Corporation"), + anno::in_group("Scene", "Units"), + icon(".icons/scene_units_per_meter.svg"), + anno::ui_order(1032) +]] +{ return state::scene_units_per_meter(); } + +export int object_id() +[[ + anno::display_name("Object Id"), + anno::description("Returns the unique integer identifier of the currently shaded object."), + anno::author("NVIDIA Corporation"), + anno::in_group("State and Primvars"), + icon(".icons/object_id.svg"), + anno::ui_order(1033) +]] +{ return state::object_id(); } + +//exported from math: +export color blackbody( + float temperature=6500. [[ + anno::description("Blackbody temperature in Kelvin used to compute the emitted color.") + ]]) +[[ + anno::display_name("Blackbody color"), + anno::description("Returns the RGB color of an ideal blackbody radiator at the specified temperature in Kelvin."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/blackbody.svg"), + anno::ui_order(409) +]] +{ return math::blackbody(temperature); } + +export float PI() +[[ + anno::display_name("Pi"), + anno::description("Returns the mathematical constant pi (approximately 3.141592653589793)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Constants"), + icon(".icons/PI.svg"), + anno::ui_order(1007) +]] +{ return math::PI; } + +export int abs(int a=0) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(350) +]] +{ return math::abs(a); } + +export float abs(float a=0.) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(351) +]] +{ return math::abs(a); } + +export float2 abs(float2 a=float2(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(352) +]] +{ return math::abs(a); } + +export float3 abs(float3 a=float3(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(353) +]] +{ return math::abs(a); } + +export float4 abs(float4 a=float4(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(354) +]] +{ return math::abs(a); } + +export color abs(color a=color(0.)) +[[ + anno::display_name("Abs"), + anno::description("Returns the absolute value of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Abs"), + icon(".icons/Abs.svg"), + anno::ui_order(355) +]] +{ return math::abs(a); } + +export float acos(float a=0.) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(360) +]] +{ return math::acos(a); } + +export float2 acos(float2 a=float2(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(361) +]] +{ return math::acos(a); } + +export float3 acos(float3 a=float3(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(362) +]] +{ return math::acos(a); } + +export float4 acos(float4 a=float4(0.)) +[[ + anno::display_name("Acos"), + anno::description("Returns the inverse cosine in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Acos"), + icon(".icons/Acos.svg"), + anno::ui_order(363) +]] +{ return math::acos(a); } + + +export float asin(float a=0.) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(370) +]] +{ return math::asin(a); } + +export float2 asin(float2 a=float2(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(371) +]] +{ return math::asin(a); } + +export float3 asin(float3 a=float3(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(372) +]] +{ return math::asin(a); } + +export float4 asin(float4 a=float4(0.)) +[[ + anno::display_name("Asin"), + anno::description("Returns the inverse sine in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Asin"), + icon(".icons/Asin.svg"), + anno::ui_order(373) +]] +{ return math::asin(a); } + +export float atan(float a=0.) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(380) +]] +{ return math::atan(a); } + +export float2 atan(float2 a=float2(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(381) +]] +{ return math::atan(a); } + +export float3 atan(float3 a=float3(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(382) +]] +{ return math::atan(a); } + +export float4 atan(float4 a=float4(0.)) +[[ + anno::display_name("Atan"), + anno::description("Returns the inverse tangent in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan"), + icon(".icons/Atan.svg"), + anno::ui_order(383) +]] +{ return math::atan(a); } + +export float atan2( + float y=0. [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float x=0. [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(390) +]] +{ return math::atan2(y,x); } + +export float2 atan2( + float2 y=float2(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float2 x=float2(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(391) +]] +{ return math::atan2(y,x); } + +export float3 atan2( + float3 y=float3(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float3 x=float3(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(392) +]] +{ return math::atan2(y,x); } + +export float4 atan2( + float4 y=float4(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]], + float4 x=float4(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]] +) +[[ + anno::display_name("Atan2"), + anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Atan2"), + icon(".icons/Atan2.svg"), + anno::ui_order(393) +]] +{ return math::atan2(y,x); } + +export float average(float2 a=float2(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(400) +]] +{ return math::average(a); } + +export float average(float3 a=float3(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(401) +]] +{ return math::average(a); } + +export float average(float4 a=float4(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(402) +]] +{ return math::average(a); } + +export float average(color a=color(0.)) +[[ + anno::display_name("Average"), + anno::description("Returns the arithmetic mean of all components in the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Average"), + icon(".icons/Average.svg"), + anno::ui_order(403) +]] +{ return math::average(a); } + +export float ceil(float a=0.) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(410) +]] +{ return math::ceil(a); } + +export float2 ceil(float2 a=float2(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(411) +]] +{ return math::ceil(a); } + +export float3 ceil(float3 a=float3(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(411) +]] +{ return math::ceil(a); } + +export float4 ceil(float4 a=float4(0.)) +[[ + anno::display_name("Ceil"), + anno::description("Rounds each input value up to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Ceil"), + icon(".icons/Ceil.svg"), + anno::ui_order(412) +]] +{ return math::ceil(a); } + +export int clamp( + int a=0 [[anno::description("Input value to clamp.")]], + int min=0 [[anno::description("Lower bound of the output range.")]], + int max=1 [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(420) +]] +{ return math::clamp(a,min,max); } + +export float clamp( + float a=0. [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(421) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float2 min=float2(0.) [[anno::description("Lower bound of the output range.")]], + float2 max=float2(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(422) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float3 min=float3(0.) [[anno::description("Lower bound of the output range.")]], + float3 max=float3(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(423) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float4 min=float4(0.) [[anno::description("Lower bound of the output range.")]], + float4 max=float4(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(424) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + color min=color(0.) [[anno::description("Lower bound of the output range.")]], + color max=color(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(425) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float2 min=float2(0.) [[anno::description("Lower bound of the output range.")]], + float max=1. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(426) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float2 max=float2(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(427) +]] +{ return math::clamp(a,min,max); } + +export float2 clamp( + float2 a=float2(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=1. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(428) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float3 min=float3(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(429) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float3 max=float3(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(430) +]] +{ return math::clamp(a,min,max); } + +export float3 clamp( + float3 a=float3(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(431) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float4 min=float4(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(432) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float4 max=float4(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(433) +]] +{ return math::clamp(a,min,max); } + +export float4 clamp( + float4 a=float4(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(434) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + color min=color(0.) [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(435) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + color max=color(1.) [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(436) +]] +{ return math::clamp(a,min,max); } + +export color clamp( + color a=color(0.) [[anno::description("Input value to clamp.")]], + float min=0. [[anno::description("Lower bound of the output range.")]], + float max=0. [[anno::description("Upper bound of the output range.")]] +) +[[ + anno::display_name("Clamp"), + anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Clamp"), + icon(".icons/Clamp.svg"), + anno::ui_order(437) +]] +{ return math::clamp(a,min,max); } + +export float cos(float a=0.) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(440) +]] +{ return math::cos(a); } + +export float2 cos(float2 a=float2(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(441) +]] +{ return math::cos(a); } + +export float3 cos(float3 a=float3(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(442) +]] +{ return math::cos(a); } + +export float4 cos(float4 a=float4(0.)) +[[ + anno::display_name("Cos"), + anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Cos"), + icon(".icons/Cos.svg"), + anno::ui_order(443) +]] +{ return math::cos(a); } + +export float3 cross(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Cross"), + anno::description("Returns the 3D cross product of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/cross_product.svg"), + anno::ui_order(449) +]] +{ return math::cross(a,b); } + +export float degrees( + float a=0. [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(450) +]] +{ return math::degrees(a); } + +export float2 degrees( + float2 a=float2(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(451) +]] +{ return math::degrees(a); } + +export float3 degrees( + float3 a=float3(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(452) +]] +{ return math::degrees(a); } + +export float4 degrees( + float4 a=float4(0.) [[anno::description("Input angle in radians.")]] +) +[[ + anno::display_name("Degrees"), + anno::description("Converts an angle from radians to degrees. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Degrees"), + icon(".icons/Degrees.svg"), + anno::ui_order(453) +]] +{ return math::degrees(a); } + +export float distance(float a=0., float b=0.) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(460) +]] +{ return math::distance(a,b); } + +export float distance(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(461) +]] +{ return math::distance(a,b); } + +export float distance(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(462) +]] +{ return math::distance(a,b); } + +export float distance(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Distance"), + anno::description("Returns the Euclidean distance between the two input points."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Distance"), + icon(".icons/Distance.svg"), + anno::ui_order(463) +]] +{ return math::distance(a,b); } + +export float dot(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(470) +]] +{ return math::dot(a,b); } + +export float dot(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(471) +]] +{ return math::dot(a,b); } + +export float dot(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Dot"), + anno::description("Returns the dot product (scalar projection) of the two input vectors."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Dot"), + icon(".icons/Dot.svg"), + anno::ui_order(472) +]] +{ return math::dot(a,b); } + +export float exp(float a=0.) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(480) +]] +{ return math::exp(a); } + +export float2 exp(float2 a=float2(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(481) +]] +{ return math::exp(a); } + +export float3 exp(float3 a=float3(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(481) +]] +{ return math::exp(a); } + +export float4 exp(float4 a=float4(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(482) +]] +{ return math::exp(a); } + +export color exp(color a=color(0.)) +[[ + anno::display_name("Exp"), + anno::description("Returns e raised to the input value. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp"), + icon(".icons/Exp.svg"), + anno::ui_order(483) +]] +{ return math::exp(a); } + +export float exp2(float a=0.) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(490) +]] +{ return math::exp2(a); } + +export float2 exp2(float2 a=float2(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(491) +]] +{ return math::exp2(a); } + +export float3 exp2(float3 a=float3(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(492) +]] +{ return math::exp2(a); } + +export float4 exp2(float4 a=float4(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(493) +]] +{ return math::exp2(a); } + +export color exp2(color a=color(0.)) +[[ + anno::display_name("Exp 2"), + anno::description("Returns 2 raised to the input value. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Exp2"), + icon(".icons/Exp2.svg"), + anno::ui_order(494) +]] +{ return math::exp2(a); } + +export float floor(float a=0.) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(500) +]] +{ return math::floor(a); } + +export float2 floor(float2 a=float2(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(501) +]] +{ return math::floor(a); } + +export float3 floor(float3 a=float3(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(502) +]] +{ return math::floor(a); } + +export float4 floor(float4 a=float4(0.)) +[[ + anno::display_name("Floor"), + anno::description("Rounds each input value down to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Floor"), + icon(".icons/Floor.svg"), + anno::ui_order(503) +]] +{ return math::floor(a); } + +export float fmod( + float a=0. [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(510) +]] +{ return math::fmod(a,b); } + +export float2 fmod( + float2 a=float2(0.) [[anno::description("Dividend input.")]], + float2 b=float2(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(511) +]] +{ return math::fmod(a,b); } + +export float3 fmod( + float3 a=float3(0.) [[anno::description("Dividend input.")]], + float3 b=float3(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(512) +]] +{ return math::fmod(a,b); } + +export float4 fmod( + float4 a=float4(0.) [[anno::description("Dividend input.")]], + float4 b=float4(1.) [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(513) +]] +{ return math::fmod(a,b); } + +export float2 fmod( + float2 a=float2(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(514) +]] +{ return math::fmod(a,b); } + +export float3 fmod( + float3 a=float3(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(515) +]] +{ return math::fmod(a,b); } + +export float4 fmod( + float4 a=float4(0.) [[anno::description("Dividend input.")]], + float b=1. [[anno::description("Divisor input.")]] +) +[[ + anno::display_name("Fmod"), + anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Fmod"), + icon(".icons/Fmod.svg"), + anno::ui_order(516) +]] +{ return math::fmod(a,b); } + +export float frac(float a=0.) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(520) +]] +{ return math::frac(a); } + +export float2 frac(float2 a=float2(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(521) +]] +{ return math::frac(a); } + +export float3 frac(float3 a=float3(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(522) +]] +{ return math::frac(a); } + +export float4 frac(float4 a=float4(0.)) +[[ + anno::display_name("Frac"), + anno::description("Returns the positive fractional part of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Frac"), + icon(".icons/Frac.svg"), + anno::ui_order(523) +]] +{ return math::frac(a); } + +export float length(float2 a=float2(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(530) +]] +{ return math::length(a); } + +export float length(float3 a=float3(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(531) +]] +{ return math::length(a); } + +export float length(float4 a=float4(0.)) +[[ + anno::display_name("Length"), + anno::description("Returns the Euclidean length (magnitude) of the input vector."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Length"), + icon(".icons/Length.svg"), + anno::ui_order(532) +]] +{ return math::length(a); } + +export float lerp( + float a=0. [[anno::description("Start value at interpolation factor 0.")]], + float b=1. [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(540) +]] +{ return math::lerp(a,b,l); } + +export float2 lerp( + float2 a=float2(0.) [[anno::description("Start value at interpolation factor 0.")]], + float2 b=float2(1.) [[anno::description("End value at interpolation factor 1.")]], + float2 l=float2(0.)[[anno::soft_range(float2(0.0),float2(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(541) +]] +{ return math::lerp(a,b,l); } + +export float3 lerp( + float3 a=float3(0.) [[anno::description("Start value at interpolation factor 0.")]], + float3 b=float3(1.) [[anno::description("End value at interpolation factor 1.")]], + float3 l=float3(0.)[[anno::soft_range(float3(0.0),float3(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(542) +]] +{ return math::lerp(a,b,l); } + +export float4 lerp( + float4 a=float4(0.) [[anno::description("Start value at interpolation factor 0.")]], + float4 b=float4(1.) [[anno::description("End value at interpolation factor 1.")]], + float4 l=float4(0.)[[anno::soft_range(float4(0.0),float4(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(543) +]] +{ return math::lerp(a,b,l); } + +export float2 lerp( + float2 a=float2(0.) [[anno::description("Start value at interpolation factor 0.")]], + float2 b=float2(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(544) +]] +{ return math::lerp(a,b,l); } + +export float3 lerp( + float3 a=float3(0.) [[anno::description("Start value at interpolation factor 0.")]], + float3 b=float3(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(545) +]] +{ return math::lerp(a,b,l); } + +export float4 lerp( + float4 a=float4(0.) [[anno::description("Start value at interpolation factor 0.")]], + float4 b=float4(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(546) +]] +{ return math::lerp(a,b,l); } + +export color lerp( + color a=color(0.) [[anno::description("Start value at interpolation factor 0.")]], + color b=color(1.) [[anno::description("End value at interpolation factor 1.")]], + color l=color(0.)[[anno::soft_range(color(0.0),color(1.)), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(547) +]] +{ return math::lerp(a,b,l); } + +export color lerp( + color a=color(0.) [[anno::description("Start value at interpolation factor 0.")]], + color b=color(1.) [[anno::description("End value at interpolation factor 1.")]], + float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]] +) +[[ + anno::display_name("Lerp"), + anno::description("Linearly interpolates between a and b using interpolation factor l."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Lerp"), + icon(".icons/Lerp.svg"), + anno::ui_order(548) +]] +{ return math::lerp(a,b,l); } + +export float log(float a=1.) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(550) +]] +{ return math::log(a); } + +export float2 log(float2 a=float2(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(551) +]] +{ return math::log(a); } + +export float3 log(float3 a=float3(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(552) +]] +{ return math::log(a); } + +export float4 log(float4 a=float4(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(553) +]] +{ return math::log(a); } + +export color log(color a=color(1.)) +[[ + anno::display_name("Log"), + anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log"), + icon(".icons/Log.svg"), + anno::ui_order(554) +]] +{ return math::log(a); } + +export float log2(float a=1.) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(560) +]] +{ return math::log2(a); } + +export float2 log2(float2 a=float2(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(561) +]] +{ return math::log2(a); } + +export float3 log2(float3 a=float3(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(562) +]] +{ return math::log2(a); } + +export float4 log2(float4 a=float4(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(563) +]] +{ return math::log2(a); } + +export color log2(color a=color(1.)) +[[ + anno::display_name("Log 2"), + anno::description("Computes the base-2 logarithm of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log2"), + icon(".icons/Log2.svg"), + anno::ui_order(564) +]] +{ return math::log2(a); } + +export float log10(float a=1.) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(570) +]] +{ return math::log10(a); } + +export float2 log10(float2 a=float2(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(571) +]] +{ return math::log10(a); } + +export float3 log10(float3 a=float3(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(572) +]] +{ return math::log10(a); } + +export float4 log10(float4 a=float4(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(573) +]] +{ return math::log10(a); } + +export color log10(color a=color(1.)) +[[ + anno::display_name("Log 10"), + anno::description("Computes the base-10 logarithm of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Log10"), + icon(".icons/Log10.svg"), + anno::ui_order(574) +]] +{ return math::log10(a); } + +export float luminance(float3 a=float3(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(580) +]] +{ return math::luminance(a); } + +export float luminance(color a=color(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(581) +]] +{ return math::luminance(a); } + +export float luminance(float4 a=float4(0.)) +[[ + anno::display_name("Luminance"), + anno::description("Computes luminance (Y) from the input color using standard RGB weighting."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Luminance"), + icon(".icons/Luminance.svg"), + anno::ui_order(582) +]] +{ return math::luminance(float3(a.x,a.y,a.z)); } + +export int max(int a=0, int b=0) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(590) +]] +{ return math::max(a,b); } + +export float max(float a=0., float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(591) +]] +{ return math::max(a,b); } + +export float2 max(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(592) +]] +{ return math::max(a,b); } + +export float3 max(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(593) +]] +{ return math::max(a,b); } + +export float4 max(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(594) +]] +{ return math::max(a,b); } + +export float2 max(float2 a=float2(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(595) +]] +{ return math::max(a,b); } + +export float3 max(float3 a=float3(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(596) +]] +{ return math::max(a,b); } + +export float4 max(float4 a=float4(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(597) +]] +{ return math::max(a,b); } + +export float2 max(float a=0., float2 b=float2(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(598) +]] +{ return math::max(a,b); } + +export float3 max(float a=0., float3 b=float3(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(599) +]] +{ return math::max(a,b); } + +export float4 max(float a=0., float4 b=float4(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(600) +]] +{ return math::max(a,b); } + +export color max(color a=color(0.), color b=color(0.)) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(601) +]] +{ return math::max(a,b); } + +export color max(float a=0., color b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(602) +]] +{ return math::max(a,b); } + +export color max(color a=color(0.), float b=0.) +[[ + anno::display_name("Maximum"), + anno::description("Returns the larger of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(603) +]] +{ return math::max(a,b); } + +export float max_value(float2 a=float2(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(610) +]] +{ return math::max_value(a); } + +export float max_value(float3 a=float3(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(611) +]] +{ return math::max_value(a); } + +export float max_value(float4 a=float4(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(612) +]] +{ return math::max_value(a); } + +export float max_value(color a=color(0.)) +[[ + anno::display_name("Maximum value"), + anno::description("Returns the largest channel value in the input color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Max"), + icon(".icons/Max.svg"), + anno::ui_order(613) +]] +{ return math::max_value(a); } + +export int min(int a=0, int b=0) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(620) +]] +{ return math::min(a,b); } + +export float min(float a=0., float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(621) +]] +{ return math::min(a,b); } + +export float2 min(float2 a=float2(0.), float2 b=float2(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(622) +]] +{ return math::min(a,b); } + +export float3 min(float3 a=float3(0.), float3 b=float3(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(623) +]] +{ return math::min(a,b); } + +export float4 min(float4 a=float4(0.), float4 b=float4(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(624) +]] +{ return math::min(a,b); } + +export float2 min(float2 a=float2(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(625) +]] +{ return math::min(a,b); } + +export float3 min(float3 a=float3(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(626) +]] +{ return math::min(a,b); } + +export float4 min(float4 a=float4(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(627) +]] +{ return math::min(a,b); } + +export float2 min(float a=0., float2 b=float2(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(628) +]] +{ return math::min(a,b); } + +export float3 min(float a=0., float3 b=float3(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(629) +]] +{ return math::min(a,b); } + +export float4 min(float a=0., float4 b=float4(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(630) +]] +{ return math::min(a,b); } + +export color min(color a=color(0.), color b=color(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(631) +]] +{ return math::min(a,b); } + +export color min(float a=0., color b=color(0.)) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(632) +]] +{ return math::min(a,b); } + +export color min(color a=color(0.), float b=0.) +[[ + anno::display_name("Minimum"), + anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(633) +]] +{ return math::min(a,b); } + +export float min_value(float a=0.) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(640) +]] +{ return math::min_value(a); } + +export float min_value(float2 a=float2(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(641) +]] +{ return math::min_value(a); } + +export float min_value(float3 a=float3(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(642) +]] +{ return math::min_value(a); } + +export float min_value(float4 a=float4(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest component value in the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(643) +]] +{ return math::min_value(a); } + +export float min_value(color a=color(0.)) +[[ + anno::display_name("Minimum value"), + anno::description("Returns the smallest channel value in the input color."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Min"), + icon(".icons/Min.svg"), + anno::ui_order(644) +]] +{ return math::min_value(a); } + +export float2 normalize( + float2 a=float2(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(650) +]] +{ return math::normalize(a); } + +export float3 normalize( + float3 a=float3(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(651) +]] +{ return math::normalize(a); } + +export float4 normalize( + float4 a=float4(0.) [[anno::description("Input vector to normalize.")]] +) +[[ + anno::display_name("Normalize"), + anno::description("Normalizes the input vector to unit length (length 1)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Normalize"), + icon(".icons/Normalize.svg"), + anno::ui_order(652) +]] +{ return math::normalize(a); } + +export int pow( + int a=0 [[anno::description("Base value.")]], + int b=0 [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(660) +]] +{ return math::pow(a,b); } + +export float pow( + float a=0. [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(661) +]] +{ return math::pow(a,b); } + +export float2 pow( + float2 a=float2(0.) [[anno::description("Base value.")]], + float2 b=float2(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(662) +]] +{ return math::pow(a,b); } + +export float3 pow( + float3 a=float3(0.) [[anno::description("Base value.")]], + float3 b=float3(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(663) +]] +{ return math::pow(a,b); } + +export float4 pow( + float4 a=float4(0.) [[anno::description("Base value.")]], + float4 b=float4(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(664) +]] +{ return math::pow(a,b); } + +export float2 pow( + float2 a=float2(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(665) +]] +{ return math::pow(a,b); } + +export float3 pow( + float3 a=float3(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(666) +]] +{ return math::pow(a,b); } + +export float4 pow( + float4 a=float4(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(667) +]] +{ return math::pow(a,b); } + +export color pow( + color a=color(0.) [[anno::description("Base value.")]], + color b=color(0.) [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(668) +]] +{ return math::pow(a,b); } + +export color pow( + color a=color(0.) [[anno::description("Base value.")]], + float b=0. [[anno::description("Exponent value.")]] +) +[[ + anno::display_name("Pow"), + anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Pow"), + icon(".icons/Pow.svg"), + anno::ui_order(669) +]] +{ return math::pow(a,b); } + +export float radians( + float a=0. [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(670) +]] +{ return math::radians(a); } + +export float2 radians( + float2 a=float2(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(671) +]] +{ return math::radians(a); } + +export float3 radians( + float3 a=float3(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(672) +]] +{ return math::radians(a); } + +export float4 radians( + float4 a=float4(0.) [[anno::description("Input angle in degrees.")]] +) +[[ + anno::display_name("Radians"), + anno::description("Converts an angle from degrees to radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Radians"), + icon(".icons/Radians.svg"), + anno::ui_order(673) +]] +{ return math::radians(a); } + +export float round(float a=0.) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(690) +]] +{ return math::round(a); } + +export float2 round(float2 a=float2(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(691) +]] +{ return math::round(a); } + +export float3 round(float3 a=float3(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(692) +]] +{ return math::round(a); } + +export float4 round(float4 a=float4(0.)) +[[ + anno::display_name("Round"), + anno::description("Rounds to the nearest integer. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Round"), + icon(".icons/Round.svg"), + anno::ui_order(693) +]] +{ return math::round(a); } + +export float rsqrt(float a=0.) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(700) +]] +{ return math::rsqrt(a); } + +export float2 rsqrt(float2 a=float2(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(701) +]] +{ return math::rsqrt(a); } + +export float3 rsqrt(float3 a=float3(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(702) +]] +{ return math::rsqrt(a); } + +export float4 rsqrt(float4 a=float4(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(703) +]] +{ return math::rsqrt(a); } + +export color rsqrt(color a=color(0.)) +[[ + anno::display_name("Rsqrt"), + anno::description("Returns 1/sqrt(a). The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Rsqrt"), + icon(".icons/Rsqrt.svg"), + anno::ui_order(704) +]] +{ return math::rsqrt(a); } + +export float saturate( + float a=0. [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(710) +]] +{ return math::saturate(a); } + +export float2 saturate( + float2 a=float2(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(711) +]] +{ return math::saturate(a); } + +export float3 saturate( + float3 a=float3(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(712) +]] +{ return math::saturate(a); } + +export float4 saturate( + float4 a=float4(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(713) +]] +{ return math::saturate(a); } + +export color saturate( + color a=color(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]] +) +[[ + anno::display_name("Saturate"), + anno::description("Clamps the input to the [0, 1] range. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Saturate"), + icon(".icons/Saturate.svg"), + anno::ui_order(714) +]] +{ return math::saturate(a); } + +export int sign(int a=0) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(720) +]] +{ return math::sign(a); } + +export float sign(float a=0.) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(721) +]] +{ return math::sign(a); } + +export float2 sign(float2 a=float2(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(722) +]] +{ return math::sign(a); } + +export float3 sign(float3 a=float3(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(723) +]] +{ return math::sign(a); } + +export float4 sign(float4 a=float4(0.)) +[[ + anno::display_name("Sign"), + anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sign"), + icon(".icons/Sign.svg"), + anno::ui_order(724) +]] +{ return math::sign(a); } + +export float sin(float a=0.) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(730) +]] +{ return math::sin(a); } + +export float2 sin(float2 a=float2(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(731) +]] +{ return math::sin(a); } + +export float3 sin(float3 a=float3(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(732) +]] +{ return math::sin(a); } + +export float4 sin(float4 a=float4(0.)) +[[ + anno::display_name("Sin"), + anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sin"), + icon(".icons/Sin.svg"), + anno::ui_order(733) +]] +{ return math::sin(a); } + +export float2 sincos( + float a=0. [[ + anno::description("Input angle in radians.") + ]]) +[[ + anno::display_name("SinCos"), + anno::description("Computes sine and cosine for the same input angle and returns float2(sin, cos)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions"), + icon(".icons/sincos.svg"), + anno::ui_order(739) +]] +{ float[]b = math::sincos(a); return float2(b[0],b[1]); } + +export float smoothstep( + float a=0. [[ + anno::description("Lower edge of the interpolation range.") + ]], + float b=1. [[ + anno::description("Upper edge of the interpolation range.") + ]], + float l=0. [[ + anno::description("Input value to evaluate against the interpolation range.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(740) +]] +{ return math::smoothstep(a,b,l); } + +export float2 smoothstep( + float2 a=float2(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float2 l=float2(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(741) +]] +{ return math::smoothstep(a,b,l); } + +export float3 smoothstep( + float3 a=float3(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float3 l=float3(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(742) +]] +{ return math::smoothstep(a,b,l); } + +export float4 smoothstep( + float4 a=float4(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float4 l=float4(0.) [[ + anno::description("Input value evaluated per component.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(743) +]] +{ return math::smoothstep(a,b,l); } + +export float2 smoothstep( + float2 a=float2(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(744) +]] +{ return math::smoothstep(a,b,l); } + +export float3 smoothstep( + float3 a=float3(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(745) +]] +{ return math::smoothstep(a,b,l); } + +export float4 smoothstep( + float4 a=float4(1.) [[ + anno::description("Lower interpolation edge per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Upper interpolation edge per component.") + ]], + float l=0. [[ + anno::description("Scalar input value applied to all components.") + ]]) +[[ + anno::display_name("Smoothstep"), + anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Smoothstep"), + icon(".icons/Smoothstep.svg"), + anno::ui_order(746) +]] +{ return math::smoothstep(a,b,l); } + +export float sqrt(float a=0.) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(750) +]] +{ return math::sqrt(a); } + +export float2 sqrt(float2 a=float2(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(751) +]] +{ return math::sqrt(a); } + +export float3 sqrt(float3 a=float3(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(752) +]] +{ return math::sqrt(a); } + +export float4 sqrt(float4 a=float4(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(753) +]] +{ return math::sqrt(a); } + +export color sqrt(color a=color(0.)) +[[ + anno::display_name("Sqrt"), + anno::description("Returns the square root of the input. The operation is performed per color channel."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Sqrt"), + icon(".icons/Sqrt.svg"), + anno::ui_order(754) +]] +{ return math::sqrt(a); } + +export float step( + float a=0. [[ + anno::description("Threshold value.") + ]], + float b=0. [[ + anno::description("Input compared against the threshold.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(760) +]] +{ return math::step(a,b); } + +export float2 step( + float2 a=float2(0.) [[ + anno::description("Threshold value per component.") + ]], + float2 b=float2(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(761) +]] +{ return math::step(a,b); } + +export float3 step( + float3 a=float3(0.) [[ + anno::description("Threshold value per component.") + ]], + float3 b=float3(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(762) +]] +{ return math::step(a,b); } + +export float4 step( + float4 a=float4(0.) [[ + anno::description("Threshold value per component.") + ]], + float4 b=float4(0.) [[ + anno::description("Input compared against the threshold per component.") + ]]) +[[ + anno::display_name("Step"), + anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Step"), + icon(".icons/Step.svg"), + anno::ui_order(763) +]] +{ return math::step(a,b); } + +export float tan(float a=0.) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(770) +]] +{ return math::tan(a); } + +export float2 tan(float2 a=float2(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(771) +]] +{ return math::tan(a); } + +export float3 tan(float3 a=float3(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(772) +]] +{ return math::tan(a); } + +export float4 tan(float4 a=float4(0.)) +[[ + anno::display_name("Tan"), + anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Tan"), + icon(".icons/Tan.svg"), + anno::ui_order(773) +]] +{ return math::tan(a); } + +export float remap( + float a=0. [[ + anno::description("Input value in the source range.") + ]], + float start_old=0. [[ + anno::description("Lower bound of the source range.") + ]], + float end_old=1. [[ + anno::description("Upper bound of the source range.") + ]], + float start_new=0. [[ + anno::description("Lower bound of the destination range.") + ]], + float end_new=1. [[ + anno::description("Upper bound of the destination range.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(680) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float2 remap( + float2 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float2 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float2 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float2 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float2 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x and y)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(681) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float3 remap( + float3 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float3 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float3 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float3 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float3 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x, y, and z)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(682) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } + +export float4 remap( + float4 a=0. [[ + anno::description("Input value in the source range, evaluated per component.") + ]], + float4 start_old=0. [[ + anno::description("Lower bound of the source range per component.") + ]], + float4 end_old=1. [[ + anno::description("Upper bound of the source range per component.") + ]], + float4 start_new=0. [[ + anno::description("Lower bound of the destination range per component.") + ]], + float4 end_new=1. [[ + anno::description("Upper bound of the destination range per component.") + ]]) +[[ + anno::display_name("Remap"), + anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x, y, z, and w)."), + anno::author("NVIDIA Corporation"), + anno::in_group("Math", "Functions", "Remap"), + icon(".icons/Remap.svg"), + anno::ui_order(683) +]] +{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); } diff --git a/yaskawa_motoman_next_nex10/payloads/Physics/mujoco.usda b/yaskawa_motoman_next_nex10/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..53535b239e530a2c0808cc1daf106cf21dcfc064 --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/Physics/mujoco.usda @@ -0,0 +1,153 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "NEX10_C00" +{ + over "joints" + { + } + + over "base_link" + { + over "base" + { + } + + over "visuals" + { + over "nex10_base_link" + { + } + } + + over "collisions" + { + over "nex10_base_link" + { + } + } + } + + over "link_1_s" + { + over "visuals" + { + over "nex10_link_1_s" + { + } + } + + over "collisions" + { + over "nex10_link_1_s" + { + } + } + } + + over "link_2_l" + { + over "visuals" + { + over "nex10_link_2_l" + { + } + } + + over "collisions" + { + over "nex10_link_2_l" + { + } + } + } + + over "link_3_u" + { + over "visuals" + { + over "nex10_link_3_u" + { + } + } + + over "collisions" + { + over "nex10_link_3_u" + { + } + } + } + + over "link_4_r" + { + over "visuals" + { + over "nex10_link_4_r" + { + } + } + + over "collisions" + { + over "nex10_link_4_r" + { + } + } + } + + over "link_5_b" + { + over "visuals" + { + over "nex10_link_5_b" + { + } + } + + over "collisions" + { + over "nex10_link_5_b" + { + } + } + } + + over "link_6_t" + { + over "flange" + { + over "tool0" + { + } + } + + over "visuals" + { + over "nex10_link_6_t" + { + } + } + + over "collisions" + { + over "nex10_link_6_t" + { + } + } + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/yaskawa_motoman_next_nex10/payloads/Physics/none.usda b/yaskawa_motoman_next_nex10/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..87b07037c105d9393536d55af0932df897edf70f --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "NEX10_C00" + metersPerUnit = 1 + upAxis = "Z" +) + +def "NEX10_C00" +{ +} + diff --git a/yaskawa_motoman_next_nex10/payloads/Physics/physics.usda b/yaskawa_motoman_next_nex10/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..b8ba44c66cf5794fbbe0e95f00280796504de6e3 --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/Physics/physics.usda @@ -0,0 +1,328 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "NEX10_C00" + metersPerUnit = 1 + upAxis = "Z" +) + +over "NEX10_C00" +{ + over "joints" + { + def PhysicsRevoluteJoint "joint_1_s" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 10 + float drive:angular:physics:maxForce = 311.25 + float drive:angular:physics:stiffness = 1000000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 1.0110446 + point3f physics:localPos0 = (0, 0, 0.34) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -180 + float physics:upperLimit = 180 + } + + def PhysicsRevoluteJoint "joint_2_l" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 10 + float drive:angular:physics:maxForce = 494.7 + float drive:angular:physics:stiffness = 1000000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 2.0751345 + point3f physics:localPos0 = (0.04, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.49999997, -0.49999997, -0.49999997, -0.49999997) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -99.99999 + float physics:upperLimit = 144.99998 + } + + def PhysicsRevoluteJoint "joint_3_u" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 10 + float drive:angular:physics:maxForce = 219.75 + float drive:angular:physics:stiffness = 1000000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 6.5653863 + point3f physics:localPos0 = (0.53, 0, -0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (-4.371139e-8, -1, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -69.99999 + float physics:upperLimit = 190 + } + + def PhysicsRevoluteJoint "joint_4_r" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 10 + float drive:angular:physics:maxForce = 52 + float drive:angular:physics:stiffness = 1000000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 2.6419768 + point3f physics:localPos0 = (0.04, -0.53, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70710677, -0.70710677, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -190 + float physics:upperLimit = 190 + } + + def PhysicsRevoluteJoint "joint_5_b" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 10 + float drive:angular:physics:maxForce = 35 + float drive:angular:physics:stiffness = 1000000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.013165901 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.70710677, 0.70710677, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -45 + float physics:upperLimit = 224.99998 + } + + def PhysicsRevoluteJoint "joint_6_t" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:damping = 10 + float drive:angular:physics:maxForce = 20 + float drive:angular:physics:stiffness = 1000000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Z" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.010776786 + point3f physics:localPos0 = (-0.08, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0.49999997, 0.49999997, 0.49999997, 0.49999997) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + } + + over "base_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.01198136, -0.000119839, 0.10056914) + float3 physics:diagonalInertia = (0.05808248, 0.07503303, 0.06467061) + float physics:mass = 11.614652 + quatf physics:principalAxes = (0.9863996, 0.002508747, -0.16413265, 0.00837754) + + over "collisions" + { + over "nex10_base_link" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "link_1_s" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.027872732, -0.010899885, -0.03788301) + float3 physics:diagonalInertia = (0.12746927, 0.14925094, 0.0801998) + float physics:mass = 14.601211 + quatf physics:principalAxes = (0.98834735, -0.0036697686, 0.010638784, -0.15179862) + + over "collisions" + { + over "nex10_link_1_s" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "link_2_l" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.2484611, 0.023415923, 0.02753708) + float3 physics:diagonalInertia = (0.10809787, 1.2312869, 1.1907539) + float physics:mass = 12.134303 + quatf physics:principalAxes = (0.9986402, -0.008814074, -0.038541242, 0.033983476) + + over "collisions" + { + over "nex10_link_2_l" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "link_3_u" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.020784779, -0.027763654, 0.01915227) + float3 physics:diagonalInertia = (0.08354388, 0.04613562, 0.08268743) + float physics:mass = 11.575628 + quatf physics:principalAxes = (0.9688947, -0.02455694, 0.116744846, 0.2168195) + + over "collisions" + { + over "nex10_link_3_u" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "link_4_r" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.014823696, 0.0003283439, 0.09921236) + float3 physics:diagonalInertia = (0.3316955, 0.33131036, 0.016044986) + float physics:mass = 6.467002 + quatf physics:principalAxes = (0.99987227, -0.000021192867, 0.00028428956, 0.01598017) + + over "collisions" + { + over "nex10_link_4_r" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "link_5_b" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-7.0659905e-7, -0.0014020336, 0.010049637) + float3 physics:diagonalInertia = (0.0016160536, 0.0016113184, 0.0013319314) + float physics:mass = 1.4924486 + quatf physics:principalAxes = (0.9965224, -0.076940075, 0.0023120362, 0.031907506) + + over "collisions" + { + over "nex10_link_5_b" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "link_6_t" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.0000073005326, -9.981324e-7, -0.022010613) + float3 physics:diagonalInertia = (0.00061684684, 0.00069023157, 0.00049323885) + float physics:mass = 0.67431736 + quatf physics:principalAxes = (0.99999976, 0.000021364887, 0.00032018035, 0.0007338926) + + over "collisions" + { + over "nex10_link_6_t" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/yaskawa_motoman_next_nex10/payloads/Physics/physx.usda b/yaskawa_motoman_next_nex10/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..0a93199528da0309339086eee1b1d9fdaab9cb8e --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/Physics/physx.usda @@ -0,0 +1,69 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "NEX10_C00" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "NEX10_C00" +{ + over "joints" + { + over "joint_1_s" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 299.99997 + } + + over "joint_2_l" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 249.99998 + } + + over "joint_3_u" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 339.99997 + } + + over "joint_4_r" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 499.99997 + } + + over "joint_5_b" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 470 + } + + over "joint_6_t" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 799.99994 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 1 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/yaskawa_motoman_next_nex10/payloads/Sensor/dependencies/nex10_c00_sensor.usd b/yaskawa_motoman_next_nex10/payloads/Sensor/dependencies/nex10_c00_sensor.usd new file mode 100644 index 0000000000000000000000000000000000000000..69377656312e93a3925b939f8ec91b7c11332f36 Binary files /dev/null and b/yaskawa_motoman_next_nex10/payloads/Sensor/dependencies/nex10_c00_sensor.usd differ diff --git a/yaskawa_motoman_next_nex10/payloads/Sensor/none.usda b/yaskawa_motoman_next_nex10/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..87b07037c105d9393536d55af0932df897edf70f --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "NEX10_C00" + metersPerUnit = 1 + upAxis = "Z" +) + +def "NEX10_C00" +{ +} + diff --git a/yaskawa_motoman_next_nex10/payloads/Sensor/sensors.usda b/yaskawa_motoman_next_nex10/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..556168fb5b25af4f3a0358fd005f096c99d2cc9e --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/Sensor/sensors.usda @@ -0,0 +1,17 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "NEX10_C00" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "motoman_next_nex10_c00" +{ +} + +def "NEX10_C00" +{ +} + diff --git a/yaskawa_motoman_next_nex10/payloads/base.usda b/yaskawa_motoman_next_nex10/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..deeb1c0e743a6f6fa2b4833cb5f32d67203665e9 --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/base.usda @@ -0,0 +1,351 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "NEX10_C00" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "NEX10_C00" ( + prepend apiSchemas = ["IsaacReferencePointAPI"] +) +{ + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Scope "Looks" + { + } + + def Scope "joints" + { + } + + def Xform "base_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "base" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.3400000035762787) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "nex10_base_link" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "nex10_base_link" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "link_1_s" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.3400000035762787) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "nex10_link_1_s" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.3400000036) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "nex10_link_1_s" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, -0.3400000036) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "link_2_l" + { + quatd xformOp:orient = (0.4999999701976776, -0.4999999701976776, -0.4999999701976776, -0.4999999701976776) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.03999999910593033, 0, 0.3400000035762787) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "nex10_link_2_l" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.4999999702, 0.5000000099, 0.5000000099, 0.5000000099) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.3400000036, -0.03999999911, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "nex10_link_2_l" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.4999999702, 0.5000000099, 0.5000000099, 0.5000000099) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.3400000036, -0.03999999911, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "link_3_u" + { + quatd xformOp:orient = (-0.5, -0.4999999403953552, 0.5, -0.4999999403953552) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.039999909698963165, 0, 0.869999885559082) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "nex10_link_3_u" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.4999999702, -0.5000000099, 0.5000000099, -0.5000000099) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.8700000048, 0.03999999911, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "nex10_link_3_u" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.4999999702, -0.5000000099, 0.5000000099, -0.5000000099) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.8700000048, 0.03999999911, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "link_4_r" + { + quatd xformOp:orient = (-0.7071067094802856, 2.9802322387695312e-8, 0.7071067094802856, 2.9802322387695312e-8) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.5699998140335083, 0, 0.9099999070167542) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "nex10_link_4_r" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.7071067691, 0, 0.7071067933, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.9100000262, 0, 0.5699999928) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "nex10_link_4_r" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071067691, 0, 0.7071067933, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.9100000262, 0, 0.5699999928) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "link_5_b" + { + quatd xformOp:orient = (-0.4999999701976776, -0.49999991059303284, 0.4999999701976776, -0.49999991059303284) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.5699998140335083, 0, 0.9099999070167542) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "nex10_link_5_b" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0.4999999702, -0.5000000099, 0.5000000099, -0.5000000099) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.9100000262, 0.5699999928, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "nex10_link_5_b" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.4999999702, -0.5000000099, 0.5000000099, -0.5000000099) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.9100000262, 0.5699999928, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Xform "link_6_t" + { + quatd xformOp:orient = (-5.960464477539063e-8, 0, 0, -0.9999998807907104) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.5699998140335083, 0, 0.8299999237060547) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "flange" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "tool0" + { + quatd xformOp:orient = (-4.371138828673793e-8, 1, 0, -0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "nex10_link_6_t" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + token visibility = "inherited" + quatd xformOp:orient = (0, 0, 0, 1) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.5699999928, 0, -0.8299999833) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + + def Xform "collisions" ( + instanceable = false + ) + { + def Xform "nex10_link_6_t" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0, 0, 0, 1) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.5699999928, 0, -0.8299999833) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/yaskawa_motoman_next_nex10/payloads/geometries.usd b/yaskawa_motoman_next_nex10/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..25eb5655ce146e8fc28c0764e6ef18a76b9a3c76 --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9287cdfe20153ec44e2b010743fdd429be82ae3358fe41a2d2d3aec2a7dd265 +size 15289216 diff --git a/yaskawa_motoman_next_nex10/payloads/instances.usda b/yaskawa_motoman_next_nex10/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..6bc2bdd4caefdaf28192490936fc98f593af2bff --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/instances.usda @@ -0,0 +1,858 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "mesh" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "f1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f3" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.337255, 0.72549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f5" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2, 0.2, 0.2) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.752941, 0.752941, 0.752941) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_1" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_1" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + } + } + + def Xform "mesh_2" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_2" + { + over "mesh" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "f1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.72549, 0.756863, 0.772549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_3" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_3" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + } + } + + def Xform "mesh_4" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "f2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.72549, 0.756863, 0.772549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_5" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_5" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + } + } + + def Xform "mesh_6" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_6" + { + over "mesh" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "f1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f3" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.337255, 0.72549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.72549, 0.756863, 0.772549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_7" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_7" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + } + } + + def Xform "mesh_8" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_8" + { + over "nex10_link_4_r" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "nex10_link_4_r2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "nex10_link_4_r1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "nex10_link_4_r3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "nex10_link_4_r4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "nex10_link_4_r5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "f1_020" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8, 0.8, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f3_017" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.666667, 0.639216, 0.619608) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f3" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.337255, 0.72549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.72549, 0.756863, 0.772549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_9" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_9" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + } + } + + def Xform "mesh_10" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_10" + { + over "mesh" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "mesh4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "f1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f3" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.337255, 0.72549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f4_0" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.588235, 0.588235, 0.588235) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.72549, 0.756863, 0.772549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_11" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_11" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + } + } + + def Xform "mesh_12" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_12" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "f1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + } + } + + def Xform "mesh_13" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_13" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + } + } +} + diff --git a/yaskawa_motoman_next_nex10/payloads/materials.usda b/yaskawa_motoman_next_nex10/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..d3e428a1521c8e7fa8546a538eff95ab5d546a31 --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/materials.usda @@ -0,0 +1,1379 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "f1" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "f1" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0, 0, 0) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0, 0) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f3" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "f3" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0, 0.337255, 0.72549) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.337255, 0.72549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f5" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "f5" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (1, 1, 1) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f4" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "f4" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.2, 0.2, 0.2) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.2, 0.2, 0.2) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f6" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "f6" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.752941, 0.752941, 0.752941) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.752941, 0.752941, 0.752941) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f2" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "f2" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.72549, 0.756863, 0.772549) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.72549, 0.756863, 0.772549) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f1_020" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "f1_020" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.8, 0.8, 0.8) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8, 0.8, 0.8) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f3_017" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "f3_017" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.666667, 0.639216, 0.619608) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.666667, 0.639216, 0.619608) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } + + def Material "f4_0" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "aluminum" + custom token omni:simready:nonvisual:coating = "paint" + token outputs:displacement ( + displayGroup = "Outputs" + ) + prepend token outputs:mdl:displacement.connect = + prepend token outputs:mdl:surface.connect = + prepend token outputs:mdl:volume.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "f4" ( + apiSchemas = ["NodeDefAPI"] + ) + { + token info:implementationSource = "sourceAsset" + asset info:mdl:sourceAsset = @../materials/mdl/OmniPBR.mdl@ + token info:mdl:sourceAsset:subIdentifier = "OmniPBR" + color3f inputs:diffuse_color_constant = (0.588235, 0.588235, 0.588235) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Albedo" + ) + color3f inputs:emissive_color = (1, 1, 1) ( + customData = { + float3 default = (1, 1, 1) + dictionary range = { + float3 max = (1, 1, 1) + float3 min = (0, 0, 0) + } + } + displayGroup = "Emissive" + ) + float inputs:emissive_intensity = 10000 ( + customData = { + double default = 10000 + dictionary range = { + double max = 100000 + double min = 0 + } + } + displayGroup = "Emissive" + ) + bool inputs:enable_emission = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Emissive" + ) + bool inputs:enable_opacity = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + bool inputs:enable_opacity_texture = 0 ( + customData = { + bool default = 0 + } + displayGroup = "Opacity" + ) + float inputs:opacity_constant = 1 ( + customData = { + double default = 1 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + int inputs:opacity_mode = 1 ( + customData = { + int default = 1 + dictionary range = { + int max = 3 + int min = 0 + } + } + displayGroup = "Opacity" + renderType = "::base::mono_mode" + sdrMetadata = { + string __SDR__enum_value = "mono_average" + string options = "mono_alpha:0|mono_average:1|mono_luminance:2|mono_maximum:3" + } + ) + float inputs:opacity_threshold = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 1 + double min = 0 + } + } + displayGroup = "Opacity" + ) + float inputs:texture_rotate = 0 ( + customData = { + double default = 0 + dictionary range = { + double max = 360 + double min = 0 + } + } + displayGroup = "UV" + ) + float2 inputs:texture_scale = (1, 1) ( + customData = { + float2 default = (1, 1) + } + displayGroup = "UV" + ) + float2 inputs:texture_translate = (0, 0) ( + customData = { + float2 default = (0, 0) + } + displayGroup = "UV" + ) + token outputs:out + } + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.588235, 0.588235, 0.588235) + float inputs:metallic = 0 + float inputs:opacity = 1 + float inputs:roughness = 0.5 + token outputs:surface + } + + def Shader "SimReadyUV" + { + token info:id = "UsdPrimvarReader_float2" + token inputs:varname = "st" + float2 outputs:result + } + } +} + diff --git a/yaskawa_motoman_next_nex10/payloads/robot.usda b/yaskawa_motoman_next_nex10/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..4642140a27224ff40cccbaa7aae0387594663725 --- /dev/null +++ b/yaskawa_motoman_next_nex10/payloads/robot.usda @@ -0,0 +1,187 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "NEX10_C00" + metersPerUnit = 1 + upAxis = "Z" +) + +over "NEX10_C00" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:nameOverride ( + displayName = "Name Override" + doc = "Name override for prim lookup in base name search" + ) + string isaac:namespace ( + displayName = "Namespace" + doc = "Namespace of the prim in Isaac Sim" + ) + rel isaac:physics:robotJoints ( + displayName = "Robot Joints" + ) + prepend rel isaac:physics:robotJoints = [ + , + , + , + , + , + , + , + ] + rel isaac:physics:robotLinks ( + displayName = "Robot Links" + ) + prepend rel isaac:physics:robotLinks = [ + , + , + , + , + , + , + , + , + ] + token isaac:robotType = "Manipulator" ( + displayName = "Robot Type" + ) + string isaac:source ( + displayName = "Source" + ) + string isaac:version ( + displayName = "Version" + ) + + over "joints" + { + over "joint_1_s" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + + over "joint_2_l" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + + over "joint_3_u" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + + over "joint_4_r" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + + over "joint_5_b" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + + over "joint_6_t" ( + prepend apiSchemas = ["IsaacJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "base_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride ( + displayName = "Name Override" + doc = "Name override for prim lookup in base name search" + ) + + over "base" ( + prepend apiSchemas = ["IsaacSiteAPI"] + ) + { + } + } + + over "link_1_s" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride ( + displayName = "Name Override" + doc = "Name override for prim lookup in base name search" + ) + } + + over "link_2_l" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride ( + displayName = "Name Override" + doc = "Name override for prim lookup in base name search" + ) + } + + over "link_3_u" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride ( + displayName = "Name Override" + doc = "Name override for prim lookup in base name search" + ) + } + + over "link_4_r" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride ( + displayName = "Name Override" + doc = "Name override for prim lookup in base name search" + ) + } + + over "link_5_b" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride ( + displayName = "Name Override" + doc = "Name override for prim lookup in base name search" + ) + } + + over "link_6_t" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride ( + displayName = "Name Override" + doc = "Name override for prim lookup in base name search" + ) + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/yaskawa_motoman_next_nex10/runnables/physics/mujoco.usda b/yaskawa_motoman_next_nex10/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..b8ee28eb41e276903a894bbd45528705d39f64ca --- /dev/null +++ b/yaskawa_motoman_next_nex10/runnables/physics/mujoco.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "NEX10_C00" +) + +def "NEX10_C00" +{ + over "base_link" + { + over "collisions" + { + over "nex10_base_link" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_1_s" + { + over "collisions" + { + over "nex10_link_1_s" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_2_l" + { + over "collisions" + { + over "nex10_link_2_l" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_3_u" + { + over "collisions" + { + over "nex10_link_3_u" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_4_r" + { + over "collisions" + { + over "nex10_link_4_r" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_5_b" + { + over "collisions" + { + over "nex10_link_5_b" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_6_t" + { + over "collisions" + { + over "nex10_link_6_t" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "joint_1_s" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "joint_2_l" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "joint_3_u" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "joint_4_r" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "joint_5_b" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "joint_6_t" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_NEX10_C00_joints_joint_1_s" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -57295779.513082325, -572.9577951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 311.25 + double mjc:forceRange:min = -311.25 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_NEX10_C00_joints_joint_2_l" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -57295779.513082325, -572.9577951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 494.70001220703125 + double mjc:forceRange:min = -494.70001220703125 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_NEX10_C00_joints_joint_3_u" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -57295779.513082325, -572.9577951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 219.75 + double mjc:forceRange:min = -219.75 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_NEX10_C00_joints_joint_4_r" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -57295779.513082325, -572.9577951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 52 + double mjc:forceRange:min = -52 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_NEX10_C00_joints_joint_5_b" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -57295779.513082325, -572.9577951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 35 + double mjc:forceRange:min = -35 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_NEX10_C00_joints_joint_6_t" ( + doc = "Source-derived force-drive PD bias; control is additive effort. Zero control preserves source position and velocity targets. Standard USD drive is retained for neutral and other runtimes; MuJoCo consumers must use this actuator exclusively." + ) + { + double[] mjc:biasPrm = [0, -57295779.513082325, -572.9577951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 20 + double mjc:forceRange:min = -20 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/yaskawa_motoman_next_nex10/runnables/physics/newton.usda b/yaskawa_motoman_next_nex10/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..4351a038fe570544de1a02a2360341134fa92de6 --- /dev/null +++ b/yaskawa_motoman_next_nex10/runnables/physics/newton.usda @@ -0,0 +1,190 @@ +#usda 1.0 +( + defaultPrim = "NEX10_C00" +) + +over "NEX10_C00" +{ + over "base_link" + { + over "collisions" + { + over "nex10_base_link" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_1_s" + { + over "collisions" + { + over "nex10_link_1_s" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_2_l" + { + over "collisions" + { + over "nex10_link_2_l" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_3_u" + { + over "collisions" + { + over "nex10_link_3_u" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_4_r" + { + over "collisions" + { + over "nex10_link_4_r" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_5_b" + { + over "collisions" + { + over "nex10_link_5_b" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "link_6_t" + { + over "collisions" + { + over "nex10_link_6_t" + { + over "mesh_13" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] + ) + { + bool newton:selfCollisionEnabled = 0 + } + + over "joints" + { + over "joint_1_s" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 38.9062 + float newton:damping = 1.296875 + float newton:velocityLimit = 299.99997 + } + + over "joint_2_l" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 222.615 + float newton:damping = 2.4735 + float newton:velocityLimit = 249.99998 + } + + over "joint_3_u" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 242.371 + float newton:damping = 0.807904 + float newton:velocityLimit = 339.99997 + } + + over "joint_4_r" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 3.9 + float newton:damping = 0.13 + float newton:velocityLimit = 499.99997 + } + + over "joint_5_b" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2.7925 + float newton:damping = 0.093085 + float newton:velocityLimit = 470 + } + + over "joint_6_t" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0.9375 + float newton:damping = 0.03125 + float newton:velocityLimit = 799.99994 + } + } +} + diff --git a/yaskawa_motoman_next_nex10/runnables/physics/physx.usda b/yaskawa_motoman_next_nex10/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..62252c3988f6c27f9ef832408309ce7cc912796e --- /dev/null +++ b/yaskawa_motoman_next_nex10/runnables/physics/physx.usda @@ -0,0 +1,171 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "NEX10_C00" + metersPerUnit = 1 + upAxis = "Z" +) + +over "NEX10_C00" +{ + over "joints" + { + over "joint_1_s" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 299.99997 + } + + over "joint_2_l" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 249.99998 + } + + over "joint_3_u" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 339.99997 + } + + over "joint_4_r" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 499.99997 + } + + over "joint_5_b" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 470 + } + + over "joint_6_t" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 799.99994 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "base_link" + { + over "collisions" + { + over "nex10_base_link" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "link_1_s" + { + over "collisions" + { + over "nex10_link_1_s" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "link_2_l" + { + over "collisions" + { + over "nex10_link_2_l" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "link_3_u" + { + over "collisions" + { + over "nex10_link_3_u" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "link_4_r" + { + over "collisions" + { + over "nex10_link_4_r" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "link_5_b" + { + over "collisions" + { + over "nex10_link_5_b" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "link_6_t" + { + over "collisions" + { + over "nex10_link_6_t" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} +