diff --git a/.gitattributes b/.gitattributes index 36f112cf88359919ca3f76ac6b2e144790fba276..9860f46aaf083e07e874b42f109bd3827fc4ad9e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -102,3 +102,14 @@ fanuc_m710ic_20m/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text fanuc_m710ic_45m/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text fanuc_m710ic_50/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text fanuc_m710ic_50e/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m710ic_50s/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m710ic_70/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m710id_50m/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m710id_70/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m800_60_20b/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m900ia150p/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m900ia200p/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m900ib280/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m900ib280l/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m900ib330l/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text +fanuc_m900ib360e/payloads/geometries.usd filter=lfs diff=lfs merge=lfs -text diff --git a/fanuc_m710ic_50s/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m710ic_50s/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..c3fd3fb3b42616df9d5dff1f82de174ce02ddafc --- /dev/null +++ b/fanuc_m710ic_50s/.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:19", + "assets": [ + { + "asset": "m710ic_50s.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/fanuc_m710ic_50s/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m710ic_50s/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..f3006e6a8064bb3879cf392c85a85a1ba8a3d68a --- /dev/null +++ b/fanuc_m710ic_50s/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7545, + "hash": { + "sha256-flat-1mb": "6ba959657ebe5029b98529867c7946e518e08513360f7be7a38ee3c7f055377b", + "sha256": "a8689352e668e642b8c43cba339b0c0270a5ce45b614cf83dcf1370b4efd7c56" + } + }, + { + "relative_path": ".thumbs/256x256/.m710ic_50s.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "4fdb21a1833932ffd33c48c6d31fb5e2837c546be4e844c68827cb056faced7e", + "sha256": "962557a68de0dd0a0a8ef504c3949c971c70bc115e893291030a20f0a05efb59" + } + }, + { + "relative_path": ".thumbs/256x256/m710ic_50s.usda.png", + "size": 46234, + "hash": { + "sha256-flat-1mb": "1f48b5e019dca9ccd6af122534f683243dbc28af87c72038a8d3c47bbcef3bbd", + "sha256": "6cb6f5d9d241594355e88e55ac96f9bb4f55c713d33f1b5656c90a1f5072584a" + } + }, + { + "relative_path": ".thumbs/m710ic_50s.thumb.usd", + "size": 6127, + "hash": { + "sha256-flat-1mb": "b45fbb5fe843804502606a0a2cd1edf56d8f64cfd46d3a342ec9153e517a52e3", + "sha256": "a7bcc4a0c1d70db32b26a66f5b754e53cc58f71754c1aef36951c9b68997cf66" + } + }, + { + "relative_path": "m710ic_50s.usda", + "size": 16003, + "hash": { + "sha256-flat-1mb": "b95513d69fefdb1ea118f01f67a272c9878a68adeb0cc20539ab38f1c2bc5f84", + "sha256": "337d94c3a1c8ee15e4fc3c93c88b724895d18d3ad494abbeee0aac93ae21017a" + } + }, + { + "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": 2918, + "hash": { + "sha256-flat-1mb": "3c61ff28f42740621e0a4a0fb327ad3a43aa2857748ee80425ff88180d597f8e", + "sha256": "86d01c4a5bffc1f31af166ffafac73a1bdfa2deb8b22f99a8e3f33fbb7324116" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "abf572ea6bcf754af3ae1e1bdef06ab9c301f67d649871266ac7d3bbfa84487b", + "sha256": "1b5fe333b8e2e3a2cee2b0df37713085ebcbe8819b1960c198e09a6413073963" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 11984, + "hash": { + "sha256-flat-1mb": "a3e703b31886dda1b0f5ea7d4a833511e9876634e9061930092685852b1d1b4c", + "sha256": "c54ef153b037900723fe4e5c7f05b4f4d9a2142dfb13d1b6fa0b391544414fc4" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 1432, + "hash": { + "sha256-flat-1mb": "26a5f1befac4ea3a9270448d807bca977bf73241ea52b94a09aaf6d27c877dff", + "sha256": "77e2db999b8651ff66f5c0749c3378d1ddd4475b044a7581e4a3ca76d236748f" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "abf572ea6bcf754af3ae1e1bdef06ab9c301f67d649871266ac7d3bbfa84487b", + "sha256": "1b5fe333b8e2e3a2cee2b0df37713085ebcbe8819b1960c198e09a6413073963" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 143, + "hash": { + "sha256-flat-1mb": "59f8a9c5bc1b387309a4804ddef68fcc7af4f1fb42a04ba26e4c12ab6dca16ae", + "sha256": "6848d986eead29277a46344f15ceffb87ecf0c44cc2abfe40341e496412b916e" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 11550, + "hash": { + "sha256-flat-1mb": "8ac53e5554e16ad38a7a9d1e0018ce65a8479c89e571fdf1f7e6f19be8a5f103", + "sha256": "a9381e93792b1aa650192e82bef1ca5b20ce50a20e082edc8f0f489b02c89ada" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 2647863, + "hash": { + "sha256-flat-1mb": "34dbf226038fdfeac6ab05e571c745d95e528f838b715718719adefecd5ed112", + "sha256": "f569708790a1217c7593038cd0f06fb7d350ee7d06afd975799a9ab91df38f33", + "sha256-first1m": "db241b69e558620a2c497e1a0e33749586f586ff1c498c92be542df2e2f5ec9e" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 33626, + "hash": { + "sha256-flat-1mb": "3c22a092e0ac9e245a2ad13f84d318b9d2c429c1679ea70691f49ce1b1a159c3", + "sha256": "944d008076445fdf56b22f2ca14304775723b556935a9bdc73d7b08a6e7169d9" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 46242, + "hash": { + "sha256-flat-1mb": "e2950d3665cc29080be170c6b6dd34b284a4d9622bcc34ddd24783d5b5620352", + "sha256": "6aa87e0a64af9a817aaceb113ead528aebc3f5c2ed45f94438a93e36ff903062" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 2961, + "hash": { + "sha256-flat-1mb": "47165e001d9ead0ebf0f149dbab14ddfd60f8cb64b60748acd788bd993662cc0", + "sha256": "06f65ffecd57ed47f82e1744de541bc505c1244e71ef74060643e5f7a4b19cb4" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 8188, + "hash": { + "sha256-flat-1mb": "8579fc889c291b143d8a2bc152d2f1d43979dec03d9ded3e80e8019e23378632", + "sha256": "ba36252c23613046cdcacfbbb2d5056bad5cabdc46061910c01c13a64395188e" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 4879, + "hash": { + "sha256-flat-1mb": "ee39372d212f495a73c3ad441cdbb662124067bc2de0baae5497328ecce7f20f", + "sha256": "8363696ee96cf9a8eb83b4a19648d4cbd32a60d32dcba4c7c8e476fd008171c6" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 3522, + "hash": { + "sha256-flat-1mb": "a77af5426c8327e43ae371fb29b05fad18fd6325b918401f19c26e5526f1b39f", + "sha256": "b88548a5a5bab131f04bdfa2518f0d71b54562ca90db14e080114bfc43345a0e" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m710ic_50s/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m710ic_50s/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..d7643d84a97d6c144039345c86d9bb002627f180 --- /dev/null +++ b/fanuc_m710ic_50s/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m710ic_50s.usda" + ] +} diff --git a/fanuc_m710ic_50s/.metadata/license.txt b/fanuc_m710ic_50s/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m710ic_50s/.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/fanuc_m710ic_50s/.simready/validation.json b/fanuc_m710ic_50s/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..c6ab69b310886bd9bc5b35c3d6f829fb7cbecc45 --- /dev/null +++ b/fanuc_m710ic_50s/.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/fanuc_m710ic_50s/.thumbs/256x256/.m710ic_50s.usda.last_generated b/fanuc_m710ic_50s/.thumbs/256x256/.m710ic_50s.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..d4f0dd069020a8a7ba90f6d326b05b9274e178c8 --- /dev/null +++ b/fanuc_m710ic_50s/.thumbs/256x256/.m710ic_50s.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:30:39 \ No newline at end of file diff --git a/fanuc_m710ic_50s/.thumbs/256x256/m710ic_50s.usda.png b/fanuc_m710ic_50s/.thumbs/256x256/m710ic_50s.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..4cb242ee7fda4d3fb426ef667666fd1a08a3266d --- /dev/null +++ b/fanuc_m710ic_50s/.thumbs/256x256/m710ic_50s.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cb6f5d9d241594355e88e55ac96f9bb4f55c713d33f1b5656c90a1f5072584a +size 46234 diff --git a/fanuc_m710ic_50s/.thumbs/m710ic_50s.thumb.usd b/fanuc_m710ic_50s/.thumbs/m710ic_50s.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..a7375f7f5f0c638216e4439bc71d7455c6c1d1ce Binary files /dev/null and b/fanuc_m710ic_50s/.thumbs/m710ic_50s.thumb.usd differ diff --git a/fanuc_m710ic_50s/com.nvidia.simready.packaging.json b/fanuc_m710ic_50s/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..8e2ad564e9e75cc3dc4e4f53158840b9eb70f2c5 --- /dev/null +++ b/fanuc_m710ic_50s/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m710ic_50s.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "7a0c78f8cf4c3b1ed6b94d308d065879bc0c00f1c237de77dd47a664dddebfe1" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "1fb5c1d3ddcb0a21f3f5642bf7917603a40c85207257f3ce952871df739b66f0" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "3192a12e26d79b55699b9405dd275ad6e65e82a02e24317b8c8394e083dc8afd" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "15d277d226f7733c2a3004661646f66b1a3fc657ea14c44e6116b15b58ff6247" + }, + "package_hash": { + "sha256": "0ffe12dca8313f09d1d284fa685f082b5c9005e813ad760e19a960db5d6e72cb" + } +} diff --git a/fanuc_m710ic_50s/m710ic_50s.usda b/fanuc_m710ic_50s/m710ic_50s.usda new file mode 100644 index 0000000000000000000000000000000000000000..d91d5e167f51db26ceae31291b1052071375e31a --- /dev/null +++ b/fanuc_m710ic_50s/m710ic_50s.usda @@ -0,0 +1,420 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m710ic_50s" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m710ic_50s" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m710ic_50s" + 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 = (1.22, 0.63194585, 1.2980045) + string asset_license = "CC-BY-4.0" + string asset_name = "m710ic_50s" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 544.8240006566048 + string qcode = "Q40687" + int rigid_body_count = 7 + string source_file = "Fanuc/m710ic_50s/m710ic_50s.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m710ic_50s" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m710ic_50s" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + 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/fanuc_m710ic_50s/materials/mdl/LICENSE.md b/fanuc_m710ic_50s/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m710ic_50s/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/fanuc_m710ic_50s/materials/mdl/OmniPBR.mdl b/fanuc_m710ic_50s/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m710ic_50s/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/fanuc_m710ic_50s/materials/mdl/OmniPBRBase.mdl b/fanuc_m710ic_50s/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m710ic_50s/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/fanuc_m710ic_50s/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m710ic_50s/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m710ic_50s/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/fanuc_m710ic_50s/materials/mdl/aux_definitions.mdl b/fanuc_m710ic_50s/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m710ic_50s/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/fanuc_m710ic_50s/materials/mdl/core_definitions.mdl b/fanuc_m710ic_50s/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m710ic_50s/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/fanuc_m710ic_50s/materials/mdl/support_definitions.mdl b/fanuc_m710ic_50s/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m710ic_50s/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/fanuc_m710ic_50s/payloads/Physics/mujoco.usda b/fanuc_m710ic_50s/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..9763f793afa54d3ad6be36a6879dec8e4f316208 --- /dev/null +++ b/fanuc_m710ic_50s/payloads/Physics/mujoco.usda @@ -0,0 +1,199 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710ic_50s" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m710ic_50s/payloads/Physics/none.usda b/fanuc_m710ic_50s/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..96ce869c7271ee1a76b7f3f3ed88813e14225534 --- /dev/null +++ b/fanuc_m710ic_50s/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_50s" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m710ic_50s" +{ +} + diff --git a/fanuc_m710ic_50s/payloads/Physics/physics.usda b/fanuc_m710ic_50s/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..f7a056a67f79f77a9a9d87c3addf2dafff280f4c --- /dev/null +++ b/fanuc_m710ic_50s/payloads/Physics/physics.usda @@ -0,0 +1,335 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_50s" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710ic_50s" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 5000 + float drive:angular:physics:stiffness = 2500 + 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 = 39.30396 + point3f physics:localPos0 = (0, 0, 0.565) + 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 "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 7000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 36.836826 + point3f physics:localPos0 = (0.15, 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 = -57 + float physics:upperLimit = 111.99999 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 5000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 47.2931 + point3f physics:localPos0 = (0, 0, 0.6) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -42 + float physics:upperLimit = 241.99998 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 800 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 11.48994 + point3f physics:localPos0 = (0, 0, -0.17) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 900 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 5.7520595 + point3f physics:localPos0 = (0.585, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -124.99999 + float physics:upperLimit = 124.99999 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 700 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.020143544 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.0493, -0.000226, 0.119) + float3 physics:diagonalInertia = (3.5975454, 3.6811318, 5.8513227) + float physics:mass = 135 + quatf physics:principalAxes = (0.9982138, 0.00026535263, 0.01211125, -0.0585007) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0518, -0.00682, -0.105) + float3 physics:diagonalInertia = (7.549802, 6.5941634, 8.776035) + float physics:mass = 210 + quatf physics:principalAxes = (0.94905525, -0.060517337, -0.28621554, -0.117101006) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0035, 0.149, 0.236) + float3 physics:diagonalInertia = (3.6693861, 3.948934, 0.6946803) + float physics:mass = 77.5 + quatf physics:principalAxes = (0.99939185, -0.025203256, -0.0022463382, -0.023996651) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0151, -0.032, -0.0842) + float3 physics:diagonalInertia = (1.6405435, 2.3334107, 2.1960456) + float physics:mass = 95.4 + quatf physics:principalAxes = (0.94951874, 0.00087409385, 0.2711128, 0.15783304) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.448, -0.0248, 0.000134) + float3 physics:diagonalInertia = (0.057183444, 0.23781288, 0.23900364) + float physics:mass = 16.8 + quatf physics:principalAxes = (0.9962684, 0.027170004, -0.0026202593, -0.08188019) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0411, 0.00198, -6.48e-10) + float3 physics:diagonalInertia = (0.034566864, 0.052333135, 0.0534) + float physics:mass = 9.62 + quatf physics:principalAxes = (0.99692905, 0, 0, 0.07831036) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.165, -4.6e-18, -1.29e-18) + float3 physics:diagonalInertia = (0.000976, 0.00050600007, 0.0005059999) + float physics:mass = 0.504 + quatf physics:principalAxes = (0.92387956, 0.38268343, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m710ic_50s/payloads/Physics/physx.usda b/fanuc_m710ic_50s/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..e6ee7373016d492c0beb0f97bb15eb59bf8fdd21 --- /dev/null +++ b/fanuc_m710ic_50s/payloads/Physics/physx.usda @@ -0,0 +1,69 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_50s" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m710ic_50s" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 175 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 175 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 175 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 249.99998 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 249.99998 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 355 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m710ic_50s/payloads/Sensor/none.usda b/fanuc_m710ic_50s/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..96ce869c7271ee1a76b7f3f3ed88813e14225534 --- /dev/null +++ b/fanuc_m710ic_50s/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_50s" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m710ic_50s" +{ +} + diff --git a/fanuc_m710ic_50s/payloads/Sensor/sensors.usda b/fanuc_m710ic_50s/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..c75d5d98d1d0597ccd22905b8afff3dd089bfe5a --- /dev/null +++ b/fanuc_m710ic_50s/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_50s" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m710ic_50s" +{ +} + diff --git a/fanuc_m710ic_50s/payloads/base.usda b/fanuc_m710ic_50s/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..2a0a50be6826a572a2ea5c8d1ca4510acaacc83f --- /dev/null +++ b/fanuc_m710ic_50s/payloads/base.usda @@ -0,0 +1,366 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_50s" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m710ic_50s" +{ + 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 "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.5649999976158142) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.5649999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 0.5649999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 1.1649999618530273) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 0.9949999451637268) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.7350000143051147, 0, 0.9949999451637268) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.7350000143051147, 0, 0.9949999451637268) + 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.17499999701976776, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + quatd xformOp:orient = (-3.0908619663705394e-8, 0.7071067690849304, 3.0908619663705394e-8, 0.7071067690849304) + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/fanuc_m710ic_50s/payloads/geometries.usd b/fanuc_m710ic_50s/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..1ce597b9d848355f133688309e37333c7a24a8d2 --- /dev/null +++ b/fanuc_m710ic_50s/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f569708790a1217c7593038cd0f06fb7d350ee7d06afd975799a9ab91df38f33 +size 2647863 diff --git a/fanuc_m710ic_50s/payloads/instances.usda b/fanuc_m710ic_50s/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..ee5384097e07b72be51a551855e71713e8f140e1 --- /dev/null +++ b/fanuc_m710ic_50s/payloads/instances.usda @@ -0,0 +1,973 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.02, 0.02, 0.02) + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.05, 0.05, 0.05) + float inputs:metallic = 1 + 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_2" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_3" ( + 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_2" ( + 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_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" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_3" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_4" ( + 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_5" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.05, 0.05, 0.05) + 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_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 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_3" ( + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.05, 0.05, 0.05) + float inputs:metallic = 1 + 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_2" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_3" ( + 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_2" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_3" ( + 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_2" ( + 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_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" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.05, 0.05, 0.05) + float inputs:metallic = 1 + 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/fanuc_m710ic_50s/payloads/materials.usda b/fanuc_m710ic_50s/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..d31e8e3a26aa8742999567511d9177daa19ee36c --- /dev/null +++ b/fanuc_m710ic_50s/payloads/materials.usda @@ -0,0 +1,1308 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_0" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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.02, 0.02, 0.02) ( + 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.02, 0.02, 0.02) + 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_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" + ) + 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 "Material_1" ( + 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.05, 0.05, 0.05) ( + 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:metallic_constant = 1 + 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.05, 0.05, 0.05) + float inputs:metallic = 1 + 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_2" + { + 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 "Material_2" ( + 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" + 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 "Material_3" + { + 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 "Material_0" ( + 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) ( + 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, 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_4" + { + 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 "Material_0" ( + 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" + 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_5" + { + 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 "Material_1" ( + 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.05, 0.05, 0.05) ( + 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.05, 0.05, 0.05) + 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_6" + { + 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 "Material_2" ( + 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.8000001, 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.8000001, 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 + } + } +} + diff --git a/fanuc_m710ic_50s/payloads/robot.usda b/fanuc_m710ic_50s/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..200bb9780beaa34efb46cebedd3419ee055b3a5e --- /dev/null +++ b/fanuc_m710ic_50s/payloads/robot.usda @@ -0,0 +1,154 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_50s" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710ic_50s" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m710ic_50s/runnables/physics/mujoco.usda b/fanuc_m710ic_50s/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..bd633db73e8a2ba8e6c6061d0c319afde3c60005 --- /dev/null +++ b/fanuc_m710ic_50s/runnables/physics/mujoco.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m710ic_50s" +) + +def "m710ic_50s" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m710ic_50s_joints_J1" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5000 + double mjc:forceRange:min = -5000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710ic_50s_joints_J2" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 7000 + double mjc:forceRange:min = -7000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710ic_50s_joints_J3" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5000 + double mjc:forceRange:min = -5000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710ic_50s_joints_J4" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 800 + double mjc:forceRange:min = -800 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710ic_50s_joints_J5" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 900 + double mjc:forceRange:min = -900 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710ic_50s_joints_J6" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 700 + double mjc:forceRange:min = -700 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m710ic_50s/runnables/physics/newton.usda b/fanuc_m710ic_50s/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..9a0da09ef5efc5370210aa4664c6513bcf143a3f --- /dev/null +++ b/fanuc_m710ic_50s/runnables/physics/newton.usda @@ -0,0 +1,190 @@ +#usda 1.0 +( + defaultPrim = "m710ic_50s" +) + +over "m710ic_50s" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + 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 "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1071.4286 + float newton:damping = 35.714287 + float newton:velocityLimit = 175 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1500 + float newton:damping = 50 + float newton:velocityLimit = 175 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1071.4286 + float newton:damping = 35.714287 + float newton:velocityLimit = 175 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 120 + float newton:damping = 4 + float newton:velocityLimit = 249.99998 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 135 + float newton:damping = 4.5 + float newton:velocityLimit = 249.99998 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 73.9437 + float newton:damping = 2.464789 + float newton:velocityLimit = 355 + } + } +} + diff --git a/fanuc_m710ic_50s/runnables/physics/physx.usda b/fanuc_m710ic_50s/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..eaf6e838aff08d5fa65f493ad35416b3c8a27fef --- /dev/null +++ b/fanuc_m710ic_50s/runnables/physics/physx.usda @@ -0,0 +1,171 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_50s" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710ic_50s" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 175 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 175 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 175 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 249.99998 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 249.99998 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 355 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/fanuc_m710ic_70/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m710ic_70/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..7dd913ed7b6ffd1071913b54b934c257288efb85 --- /dev/null +++ b/fanuc_m710ic_70/.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:20", + "assets": [ + { + "asset": "m710ic_70.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/fanuc_m710ic_70/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m710ic_70/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..64cdcb75f192b947f3fcbbf30ed7d36f8d0436cc --- /dev/null +++ b/fanuc_m710ic_70/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7545, + "hash": { + "sha256-flat-1mb": "6ba959657ebe5029b98529867c7946e518e08513360f7be7a38ee3c7f055377b", + "sha256": "a8689352e668e642b8c43cba339b0c0270a5ce45b614cf83dcf1370b4efd7c56" + } + }, + { + "relative_path": ".thumbs/256x256/.m710ic_70.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "6b5e9d193caa216efc43e9595bec30e8462ebe57a4671428f01d07bac1e0ecb3", + "sha256": "b37754cca8689456bcde6ee92dfdfb4744ceae996422368760e10d5c179d08b5" + } + }, + { + "relative_path": ".thumbs/256x256/m710ic_70.usda.png", + "size": 43275, + "hash": { + "sha256-flat-1mb": "6d24fd8cf0c5ee97d7e5bd57a4ebc1c08aad33e7c1217b073bd1f057e7e46bd3", + "sha256": "90d0642580dd8539a441af86c1c8938cf005b1143cce46e483751ac1892450e8" + } + }, + { + "relative_path": ".thumbs/m710ic_70.thumb.usd", + "size": 6126, + "hash": { + "sha256-flat-1mb": "df8a419ec7014ffdb186d785ae2b9d3438c54e330456322a1f5e037f454c0504", + "sha256": "be80a35814496d449b5fb9916908bdbcc13a7a93925922c37efadeb095390f4f" + } + }, + { + "relative_path": "m710ic_70.usda", + "size": 15996, + "hash": { + "sha256-flat-1mb": "6857ad4ef253ff1202d71e3abea26add9a42632e12ea76dd2725d7f5d88eeea6", + "sha256": "bc09407e7fca8825991e61c45bef7e7bc735c7c173d0ba7b75d678c781fb56a3" + } + }, + { + "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": 2917, + "hash": { + "sha256-flat-1mb": "ccd442e483aaeeff6e2266eef3179b3f1c6c24a37e7848a83fcd7a5ed22b960b", + "sha256": "a87ea4e42f2a787b06149857ba4c7c6a8710f1b773b0697020459418d726f695" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 135, + "hash": { + "sha256-flat-1mb": "19cc53c5b94763e0d71a3c2bc230c4f4d9799ab81531948a7b9ecec8d6033cd4", + "sha256": "6a904afb3f30e8a29b8b0d0ab8c3db7dc8285e5c1d76c0b86b18493ee22c61e8" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 11971, + "hash": { + "sha256-flat-1mb": "a4927a053e984a870aa13075a76827ecc54652a942af6f4f20a9d781e5077177", + "sha256": "313d37416a2e6ee4dc1dd86209d950e02f921e89a6def98aadef1f7125080bbb" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 1442, + "hash": { + "sha256-flat-1mb": "b4897f11bbdb1b5716279762c3b781c22f9b36d61801333f84bdbf65579077f2", + "sha256": "5c702abc7add53d678dff83039688ca4d629d5be63ffc77869768a36e89893e9" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 135, + "hash": { + "sha256-flat-1mb": "19cc53c5b94763e0d71a3c2bc230c4f4d9799ab81531948a7b9ecec8d6033cd4", + "sha256": "6a904afb3f30e8a29b8b0d0ab8c3db7dc8285e5c1d76c0b86b18493ee22c61e8" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 141, + "hash": { + "sha256-flat-1mb": "cfabdcadd9965000d9d2eadff160cf5690132a0229c03a4c86db52622a3f1919", + "sha256": "b6f24b35d35754236e8d175bcba8ea22b22a042ce0408dea627587a2d9257813" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 11547, + "hash": { + "sha256-flat-1mb": "99a8e0a6156b7b0a1b9932cbf8515148b943cf667b573f3c1994382774dd4e6b", + "sha256": "b750d5821b848a3aa05d2dfec2b664db6cab8e610f186918631f16be634e794e" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 2920683, + "hash": { + "sha256-flat-1mb": "c17458d80245fdcef645f483f2c76fc660eedf4dd2ffe6e3a82944a211a784c7", + "sha256": "40566c601753530c7e45905c84bdc476944c2bfec9d33ef49f9f19c5b6b10c61", + "sha256-first1m": "7db75046cae8077b60da69c8b05295ac35e5b2041c3a9923fd72c252f973d8c5" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 31215, + "hash": { + "sha256-flat-1mb": "350394d617ed66c371cc07c5e46133e9886af12a9dfa85d1c06bb40ca8ee3090", + "sha256": "6b540fc4019c726b7eaf7e11686da8f5d5209905b1a6be3ceb7fa6d9c4c02a16" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 46305, + "hash": { + "sha256-flat-1mb": "d835b6118094b219bfda13607da656496e3e7207f186a135120a8c0464fc45b9", + "sha256": "93bf25b6cb8e57d99dae1e622f07057faa39c18c1fb8f1d29669b441ca923f24" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 2945, + "hash": { + "sha256-flat-1mb": "e90e772f8755bf059ac1118e5c15a78e36bcd68804a030e26f1ac2969e6885d1", + "sha256": "f6617c72ae0af3060cdc7e05e705a88aba42e0393b2e39e8430f757de3bb1c66" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 8180, + "hash": { + "sha256-flat-1mb": "ae00b0c426f5307a4fc70171a04b7a154e8abbb103c85aae4b533bf9b0351468", + "sha256": "352aa54d3597bfa08f6fe41d573f175dc3e72b09ef790240b23d6594c0944b3e" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 4898, + "hash": { + "sha256-flat-1mb": "2486cae88339d51acc25e0f7aaca58bc5c2e582cf98ab0f53c4c20e50aa85976", + "sha256": "b815d2cf981eea42538c709bab2d49ee06da419b3b2acc586baa8bed9134b62b" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 3532, + "hash": { + "sha256-flat-1mb": "2c16c49a6eb95517c6bf645347eebff5c8ffbaf698953401488aeddf1d92a830", + "sha256": "1230b7f1ddd13524617c4e7ccb6ff615121ec2320ef6ee0589f305f4cd719ad4" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m710ic_70/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m710ic_70/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..c8786e9f5deafbefb9e99516815ff64162c92f52 --- /dev/null +++ b/fanuc_m710ic_70/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m710ic_70.usda" + ] +} diff --git a/fanuc_m710ic_70/.metadata/license.txt b/fanuc_m710ic_70/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m710ic_70/.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/fanuc_m710ic_70/.simready/validation.json b/fanuc_m710ic_70/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..c6ab69b310886bd9bc5b35c3d6f829fb7cbecc45 --- /dev/null +++ b/fanuc_m710ic_70/.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/fanuc_m710ic_70/.thumbs/256x256/.m710ic_70.usda.last_generated b/fanuc_m710ic_70/.thumbs/256x256/.m710ic_70.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..3278e7f04bccf7ebd7c170c97846e3029f23a1e3 --- /dev/null +++ b/fanuc_m710ic_70/.thumbs/256x256/.m710ic_70.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:30:43 \ No newline at end of file diff --git a/fanuc_m710ic_70/.thumbs/256x256/m710ic_70.usda.png b/fanuc_m710ic_70/.thumbs/256x256/m710ic_70.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..0225a57909fecb0f00deef05c8e169ac53ccabce --- /dev/null +++ b/fanuc_m710ic_70/.thumbs/256x256/m710ic_70.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90d0642580dd8539a441af86c1c8938cf005b1143cce46e483751ac1892450e8 +size 43275 diff --git a/fanuc_m710ic_70/.thumbs/m710ic_70.thumb.usd b/fanuc_m710ic_70/.thumbs/m710ic_70.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..427bed88482765003a8475675d91a28fb788ef3e Binary files /dev/null and b/fanuc_m710ic_70/.thumbs/m710ic_70.thumb.usd differ diff --git a/fanuc_m710ic_70/com.nvidia.simready.packaging.json b/fanuc_m710ic_70/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..b47a8e30ac83b169d1e3f4826bb513dd2ef4eca1 --- /dev/null +++ b/fanuc_m710ic_70/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m710ic_70.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "189430cf1f4b497831fa7b16bcafff8ac94799a51c67f7dd9416e074b4106f2b" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "a458f0fb0e63331deadd705cecd3e0f64e1fbb6ead7102ab39d3235384b0fc73" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "db8bc8fb20716dad6514fe7bfa2ae998f4632b198ca3fefec68e3d5d69531d5d" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "9d6aeefa02204e7e2030c231690d98f0007afb0979db91c439eaf4caf827dbdd" + }, + "package_hash": { + "sha256": "b7f6732415f7c092965159a71065caeadae9c45527a850d8dec9d689bc3f6ab3" + } +} diff --git a/fanuc_m710ic_70/m710ic_70.usda b/fanuc_m710ic_70/m710ic_70.usda new file mode 100644 index 0000000000000000000000000000000000000000..bf4b58df73f540ec75e978e6b29e567a44849a90 --- /dev/null +++ b/fanuc_m710ic_70/m710ic_70.usda @@ -0,0 +1,420 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m710ic_70" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m710ic_70" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m710ic_70" + 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 = (1.651, 0.63194585, 1.7354957) + string asset_license = "CC-BY-4.0" + string asset_name = "m710ic_70" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 560.0130026042461 + string qcode = "Q40687" + int rigid_body_count = 7 + string source_file = "Fanuc/m710ic_70/m710ic_70.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m710ic_70" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m710ic_70" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + 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/fanuc_m710ic_70/materials/mdl/LICENSE.md b/fanuc_m710ic_70/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m710ic_70/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/fanuc_m710ic_70/materials/mdl/OmniPBR.mdl b/fanuc_m710ic_70/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m710ic_70/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/fanuc_m710ic_70/materials/mdl/OmniPBRBase.mdl b/fanuc_m710ic_70/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m710ic_70/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/fanuc_m710ic_70/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m710ic_70/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m710ic_70/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/fanuc_m710ic_70/materials/mdl/aux_definitions.mdl b/fanuc_m710ic_70/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m710ic_70/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/fanuc_m710ic_70/materials/mdl/core_definitions.mdl b/fanuc_m710ic_70/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m710ic_70/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/fanuc_m710ic_70/materials/mdl/support_definitions.mdl b/fanuc_m710ic_70/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m710ic_70/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/fanuc_m710ic_70/payloads/Physics/mujoco.usda b/fanuc_m710ic_70/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..8a1bd3a262ed591b6d7e6ace45b989532c0206c2 --- /dev/null +++ b/fanuc_m710ic_70/payloads/Physics/mujoco.usda @@ -0,0 +1,199 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710ic_70" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m710ic_70/payloads/Physics/none.usda b/fanuc_m710ic_70/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..363e7bc33a19b6d37bf1ed22118d78d0eb1a393b --- /dev/null +++ b/fanuc_m710ic_70/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_70" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m710ic_70" +{ +} + diff --git a/fanuc_m710ic_70/payloads/Physics/physics.usda b/fanuc_m710ic_70/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..c4077c3cf28b7be85b253e82ff44a3c1b18bb13a --- /dev/null +++ b/fanuc_m710ic_70/payloads/Physics/physics.usda @@ -0,0 +1,335 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_70" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710ic_70" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 5000 + float drive:angular:physics:stiffness = 2500 + 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 = 39.95708 + point3f physics:localPos0 = (0, 0, 0.565) + 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 "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 10000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 53.27902 + point3f physics:localPos0 = (0.15, 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 = -90 + float physics:upperLimit = 135 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 6000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 165.80627 + point3f physics:localPos0 = (0, 0, 0.87) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -80.5 + float physics:upperLimit = 204.99998 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 1000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 39.564106 + point3f physics:localPos0 = (0, 0, 0.17) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 1000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 15.472103 + point3f physics:localPos0 = (1.016, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -124.99999 + float physics:upperLimit = 124.99999 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 900 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.019304883 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.0493, -0.000226, 0.119) + float3 physics:diagonalInertia = (3.4476938, 3.5310433, 5.6212626) + float physics:mass = 130 + quatf physics:principalAxes = (0.9983445, 0.0002929545, 0.0120494785, -0.056242265) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0515, -0.00696, -0.105) + float3 physics:diagonalInertia = (7.233535, 6.3128643, 8.413601) + float physics:mass = 201 + quatf physics:principalAxes = (0.94930303, -0.060188685, -0.28715634, -0.112882175) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.00284, 0.154, 0.344) + float3 physics:diagonalInertia = (7.8581862, 8.144408, 0.7434053) + float physics:mass = 90.9 + quatf physics:principalAxes = (0.9989936, -0.020609386, -0.0010001974, -0.039825737) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0214, -0.0311, 0.087) + float3 physics:diagonalInertia = (1.6520561, 2.4575639, 2.3003807) + float physics:mass = 95.4 + quatf physics:principalAxes = (0.9613293, -0.033722654, -0.24010101, 0.13061567) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.682, -0.022, 0.000466) + float3 physics:diagonalInertia = (0.11469172, 1.7062223, 1.7100859) + float physics:mass = 33 + quatf physics:principalAxes = (0.99672025, 0.07454589, -0.0025831927, -0.031387337) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0411, 0.00198, -6.48e-10) + float3 physics:diagonalInertia = (0.033183727, 0.050216272, 0.0512) + float physics:mass = 9.23 + quatf physics:principalAxes = (0.9969215, 0, 0, 0.07840755) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.16499999, -4.6e-18, -1.29e-18) + float3 physics:diagonalInertia = (0.000937, 0.00048500008, 0.0004849999) + float physics:mass = 0.483 + quatf physics:principalAxes = (0.92387956, 0.38268343, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m710ic_70/payloads/Physics/physx.usda b/fanuc_m710ic_70/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..946469aa7d6fdbebdf15421ac6b35d18199d3e58 --- /dev/null +++ b/fanuc_m710ic_70/payloads/Physics/physx.usda @@ -0,0 +1,69 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_70" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m710ic_70" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 159.99998 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 120 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 120 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 224.99998 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 224.99998 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 224.99998 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m710ic_70/payloads/Sensor/none.usda b/fanuc_m710ic_70/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..363e7bc33a19b6d37bf1ed22118d78d0eb1a393b --- /dev/null +++ b/fanuc_m710ic_70/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_70" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m710ic_70" +{ +} + diff --git a/fanuc_m710ic_70/payloads/Sensor/sensors.usda b/fanuc_m710ic_70/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..0ee70c0af066565953b6f2e9d033ab7f987bff73 --- /dev/null +++ b/fanuc_m710ic_70/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_70" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m710ic_70" +{ +} + diff --git a/fanuc_m710ic_70/payloads/base.usda b/fanuc_m710ic_70/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..2a679fb23745f330d3b62ce09d4ee9c83971de51 --- /dev/null +++ b/fanuc_m710ic_70/payloads/base.usda @@ -0,0 +1,366 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_70" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m710ic_70" +{ + 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 "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.5649999976158142) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.5649999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 0.5649999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 1.434999942779541) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 1.6049998998641968) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.1660000085830688, 0, 1.6049998998641968) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.1660000085830688, 0, 1.6049998998641968) + 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.17499999701976776, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + quatd xformOp:orient = (-3.0908619663705394e-8, 0.7071067690849304, 3.0908619663705394e-8, 0.7071067690849304) + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/fanuc_m710ic_70/payloads/geometries.usd b/fanuc_m710ic_70/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..c3663908a9a9fa4dd751b0bb96caa2bcbaa0df34 --- /dev/null +++ b/fanuc_m710ic_70/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40566c601753530c7e45905c84bdc476944c2bfec9d33ef49f9f19c5b6b10c61 +size 2920683 diff --git a/fanuc_m710ic_70/payloads/instances.usda b/fanuc_m710ic_70/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..c9b7da931aab98687a5338d7f26649bf0ab29725 --- /dev/null +++ b/fanuc_m710ic_70/payloads/instances.usda @@ -0,0 +1,907 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.02, 0.02, 0.02) + 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_2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.3333333, 0.9333334, 0.4) + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_3" ( + 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 "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" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_3" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6980392, 0.6980392, 0.6980392) + 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_3" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_5" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 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_3" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_3" ( + 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 "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" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.05, 0.05, 0.05) + float inputs:metallic = 1 + 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/fanuc_m710ic_70/payloads/materials.usda b/fanuc_m710ic_70/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..6c1837f22ee77b8201ac405267125dd977497f66 --- /dev/null +++ b/fanuc_m710ic_70/payloads/materials.usda @@ -0,0 +1,1308 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_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:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Material_0" ( + 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" + 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_1" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_1" ( + 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.02, 0.02, 0.02) ( + 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.02, 0.02, 0.02) + 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_2" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_2" ( + 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.3333333, 0.9333334, 0.4) ( + 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.3333333, 0.9333334, 0.4) + 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 "Material_3" + { + 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 "Material_1" ( + 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) ( + 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, 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_4" + { + 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 "Material_1" ( + 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.6980392, 0.6980392, 0.6980392) ( + 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.6980392, 0.6980392, 0.6980392) + 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_5" + { + 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 "Material_1" ( + 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.8000001, 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.8000001, 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_6" + { + 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 "Material_1" ( + 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.05, 0.05, 0.05) ( + 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:metallic_constant = 1 + 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.05, 0.05, 0.05) + float inputs:metallic = 1 + 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/fanuc_m710ic_70/payloads/robot.usda b/fanuc_m710ic_70/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..8ecdd649c9bfdfb6ef4d57b981cc54b0c3dccb3a --- /dev/null +++ b/fanuc_m710ic_70/payloads/robot.usda @@ -0,0 +1,154 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_70" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710ic_70" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m710ic_70/runnables/physics/mujoco.usda b/fanuc_m710ic_70/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..d3412e8cf1d059e6f690d9e2ca6fab336b6663e6 --- /dev/null +++ b/fanuc_m710ic_70/runnables/physics/mujoco.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m710ic_70" +) + +def "m710ic_70" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m710ic_70_joints_J1" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5000 + double mjc:forceRange:min = -5000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710ic_70_joints_J2" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 10000 + double mjc:forceRange:min = -10000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710ic_70_joints_J3" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 6000 + double mjc:forceRange:min = -6000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710ic_70_joints_J4" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 1000 + double mjc:forceRange:min = -1000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710ic_70_joints_J5" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 1000 + double mjc:forceRange:min = -1000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710ic_70_joints_J6" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 900 + double mjc:forceRange:min = -900 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m710ic_70/runnables/physics/newton.usda b/fanuc_m710ic_70/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..4fb61c99ec5b9ded66c2b347c8c07397adae5af7 --- /dev/null +++ b/fanuc_m710ic_70/runnables/physics/newton.usda @@ -0,0 +1,190 @@ +#usda 1.0 +( + defaultPrim = "m710ic_70" +) + +over "m710ic_70" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + 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 "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1171.8751 + float newton:damping = 39.062504 + float newton:velocityLimit = 159.99998 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 3125 + float newton:damping = 104.166664 + float newton:velocityLimit = 120 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1875 + float newton:damping = 62.5 + float newton:velocityLimit = 120 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 166.6667 + float newton:damping = 5.555556 + float newton:velocityLimit = 224.99998 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 166.6667 + float newton:damping = 5.555556 + float newton:velocityLimit = 224.99998 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 150 + float newton:damping = 5 + float newton:velocityLimit = 224.99998 + } + } +} + diff --git a/fanuc_m710ic_70/runnables/physics/physx.usda b/fanuc_m710ic_70/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..70149f0f4b34c8fe9f5aed481ea31adb8db365da --- /dev/null +++ b/fanuc_m710ic_70/runnables/physics/physx.usda @@ -0,0 +1,171 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710ic_70" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710ic_70" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 159.99998 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 120 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 120 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 224.99998 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 224.99998 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 224.99998 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/fanuc_m710id_50m/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m710id_50m/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..82791ba9e4adab62cace64dab88f10084a589faa --- /dev/null +++ b/fanuc_m710id_50m/.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:20", + "assets": [ + { + "asset": "m710id_50m.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/fanuc_m710id_50m/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m710id_50m/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..7e587790944ba3873838e7d65d827bacfdac8544 --- /dev/null +++ b/fanuc_m710id_50m/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7545, + "hash": { + "sha256-flat-1mb": "6ba959657ebe5029b98529867c7946e518e08513360f7be7a38ee3c7f055377b", + "sha256": "a8689352e668e642b8c43cba339b0c0270a5ce45b614cf83dcf1370b4efd7c56" + } + }, + { + "relative_path": ".thumbs/256x256/.m710id_50m.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "1d772bff3374ea664a75df1822610e288fabb65530affb01fc9a40a2bc8812eb", + "sha256": "84ca795efb2dd8416ceec8c5722ef7efac557c36d937dc307a8335f560392337" + } + }, + { + "relative_path": ".thumbs/256x256/m710id_50m.usda.png", + "size": 42898, + "hash": { + "sha256-flat-1mb": "a39974da98f491dcff85a4ae7b708e03a9098e8cc8de9680181c19082f4e3787", + "sha256": "e140aaaba0b29e232a69f4e88f4ca1fb7e6eaf5c68ed561306cc41a483046eea" + } + }, + { + "relative_path": ".thumbs/m710id_50m.thumb.usd", + "size": 6127, + "hash": { + "sha256-flat-1mb": "6a38fa109cf2a14a478529c48ff2dd0eef649b7c2b331ab4f1120cb1f8af9ab9", + "sha256": "4f1519e4e349e986cdc2d3169045db89e174155b9cf71179a930baf209a5171d" + } + }, + { + "relative_path": "m710id_50m.usda", + "size": 16006, + "hash": { + "sha256-flat-1mb": "8c52f4a39654ee3df968b5262900906d032145fde68cafb60c438fefc66328c6", + "sha256": "522d15f54283c4d23b1429f08165a7c3cc972c7b166072cd4fc67900ea63642c" + } + }, + { + "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": 2918, + "hash": { + "sha256-flat-1mb": "06d991c97736312faaa6442eabb47b583073875f608f900a7fe3bf1fedb94aef", + "sha256": "25abf778bf6eff05927850a9cf5d440909045286b3c370bc09a370ad948561d2" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "a583a6e08af37a4634d7a933c9b8256f095132285fae79c91c73d45ddec3ef3d", + "sha256": "575e1417fe05658456e69f979a75b9f40a32711a47a179a1bcb022f5f4abf640" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 12049, + "hash": { + "sha256-flat-1mb": "6a8f214331115f95f597bf416c50689aa02ce8f8bd90520df38e6b8378bc013d", + "sha256": "aa687a3c7489c4d0598b276475dafb89e1faae1ae680034709d1f8a20045d7cd" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 1420, + "hash": { + "sha256-flat-1mb": "9bee0f8b8e8cb6b6b15cc21c2e331d67173dd6ab68f6e74cb0260b3cb5320a24", + "sha256": "1432361ce25ce45e95c7c04591f21f4318bf9e7e917aa624316c15f65db96e6a" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "a583a6e08af37a4634d7a933c9b8256f095132285fae79c91c73d45ddec3ef3d", + "sha256": "575e1417fe05658456e69f979a75b9f40a32711a47a179a1bcb022f5f4abf640" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 143, + "hash": { + "sha256-flat-1mb": "03c7727896ec82b579e824870508ad52f6be7695cbed873a767609c3be87a3c1", + "sha256": "c6bd9c95b1aad417f83cdb04f17bfaf410c81eeb19dec341ffaeed66cccef0a0" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 11550, + "hash": { + "sha256-flat-1mb": "423115c08145ad440d4dbf7480e2f9a7439c8ce272f93345caa1d927fe08ba6f", + "sha256": "42b9c7823444ead59e4d27be6440636a7bf921c31fd0d1c74d60e87be7236c80" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 6558657, + "hash": { + "sha256-flat-1mb": "befb1c5b351909f9a391d4bb7d3f1b2aa284e8ce3001c54cc28c8864cfe14cfe", + "sha256": "b8e6c11d5d3221f5afb283a9d21e93f66c141afd2c813a0dc7c4236a1dc242ec", + "sha256-first1m": "d3c487627bf6ec9921efaf36c663ed587e28fce335b620eed6d71a2cf83cbc2b" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 33659, + "hash": { + "sha256-flat-1mb": "30ce3789fa31ca2a2fdfbcb28fb6d3fa95e5848d1e7bcc0378c8f55ff99a7618", + "sha256": "0c59749c8fda779e896450c1169c6f9b767fd284ef68b7191096b7a17581f531" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 57830, + "hash": { + "sha256-flat-1mb": "419b37ba2a528f09f95f5e853af4fe717f97739c9dab1982e7855c7acf1aaeca", + "sha256": "a306e7f6856c6f406530cab7480884f5502320e1b1ee874d9ff13017569d37d1" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 2961, + "hash": { + "sha256-flat-1mb": "0af375082772b207e7638be44754178c25c609d5a6d91f39c5f3760895a1dabd", + "sha256": "c8b5be382834a83f5044d099016e514a3a5521b77a872b58408ac5e8abb00e7b" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 8194, + "hash": { + "sha256-flat-1mb": "7073c2709de7ea71b936faa2d784bbc10a6cbdf8cd081353f695a9ec6763d957", + "sha256": "b6747f7b88d7f17a1e91b590fb7197c03181a482b48946ed5a51273dd03b0540" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 4899, + "hash": { + "sha256-flat-1mb": "9054e788fa615e12baef65afaecbd27afdea57557e2d957ba0d97b5624e29902", + "sha256": "152c9f7d33c7f3264989a32f94c602f2c5f3d5fcb4853443020969cac9126bfb" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 3510, + "hash": { + "sha256-flat-1mb": "0ae21d97cd606890af7e5e2c26796fef747ace253dd3dd12d8ff1875c3d9bdc3", + "sha256": "b8e8c441e27a0e1546dcd2c4a8a29a33514ca18460fe6697e2da4d549c1113a2" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m710id_50m/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m710id_50m/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..7d6f853d9be933cc0f77feaedce2270cf3dcedda --- /dev/null +++ b/fanuc_m710id_50m/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m710id_50m.usda" + ] +} diff --git a/fanuc_m710id_50m/.metadata/license.txt b/fanuc_m710id_50m/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m710id_50m/.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/fanuc_m710id_50m/.simready/validation.json b/fanuc_m710id_50m/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..c6ab69b310886bd9bc5b35c3d6f829fb7cbecc45 --- /dev/null +++ b/fanuc_m710id_50m/.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/fanuc_m710id_50m/.thumbs/256x256/.m710id_50m.usda.last_generated b/fanuc_m710id_50m/.thumbs/256x256/.m710id_50m.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..5c9d218940f5e214ead9b7358b5c6afe36a35a39 --- /dev/null +++ b/fanuc_m710id_50m/.thumbs/256x256/.m710id_50m.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:30:47 \ No newline at end of file diff --git a/fanuc_m710id_50m/.thumbs/256x256/m710id_50m.usda.png b/fanuc_m710id_50m/.thumbs/256x256/m710id_50m.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..9d6fefff1c308cde7afb1e64c961783de88dd479 --- /dev/null +++ b/fanuc_m710id_50m/.thumbs/256x256/m710id_50m.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e140aaaba0b29e232a69f4e88f4ca1fb7e6eaf5c68ed561306cc41a483046eea +size 42898 diff --git a/fanuc_m710id_50m/.thumbs/m710id_50m.thumb.usd b/fanuc_m710id_50m/.thumbs/m710id_50m.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..70781bba443da2e3e333f97b42729405b2cb07f3 Binary files /dev/null and b/fanuc_m710id_50m/.thumbs/m710id_50m.thumb.usd differ diff --git a/fanuc_m710id_50m/com.nvidia.simready.packaging.json b/fanuc_m710id_50m/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..e9aef9b508a9235352510d60e24d7e97b3b67f7c --- /dev/null +++ b/fanuc_m710id_50m/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m710id_50m.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "6be0c3fb8870cb29912705d8385071a145ce047bfe00949726e536cfe3cf19c9" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "262139e89a4d1e06f6e491e80a2de30a41de998b2d0b1b26164aa69ce04ddf92" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "ce1537bff9fd1162f1d1ae010a519c70fd3607c876d1bc9fd805588f6760e231" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "aa251bd91e06de25ef5cdb28f4a5afcb776253931ae774bb128e8aa56ef0e34d" + }, + "package_hash": { + "sha256": "b3de868f3eee4bf4943ff3ce69e55adbdb6ce78d889207a93249ed259c2fce98" + } +} diff --git a/fanuc_m710id_50m/m710id_50m.usda b/fanuc_m710id_50m/m710id_50m.usda new file mode 100644 index 0000000000000000000000000000000000000000..2295207abc76094b2d1d2825474e60a97e7dbe44 --- /dev/null +++ b/fanuc_m710id_50m/m710id_50m.usda @@ -0,0 +1,420 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m710id_50m" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m710id_50m" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m710id_50m" + 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 = (1.9584999, 0.6426754, 2.013004) + string asset_license = "CC-BY-4.0" + string asset_name = "m710id_50m" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 599.6850023567677 + string qcode = "Q40687" + int rigid_body_count = 7 + string source_file = "Fanuc/m710id_50m/m710id_50m.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m710id_50m" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m710id_50m" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + 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/fanuc_m710id_50m/materials/mdl/LICENSE.md b/fanuc_m710id_50m/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m710id_50m/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/fanuc_m710id_50m/materials/mdl/OmniPBR.mdl b/fanuc_m710id_50m/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m710id_50m/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/fanuc_m710id_50m/materials/mdl/OmniPBRBase.mdl b/fanuc_m710id_50m/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m710id_50m/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/fanuc_m710id_50m/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m710id_50m/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m710id_50m/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/fanuc_m710id_50m/materials/mdl/aux_definitions.mdl b/fanuc_m710id_50m/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m710id_50m/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/fanuc_m710id_50m/materials/mdl/core_definitions.mdl b/fanuc_m710id_50m/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m710id_50m/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/fanuc_m710id_50m/materials/mdl/support_definitions.mdl b/fanuc_m710id_50m/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m710id_50m/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/fanuc_m710id_50m/payloads/Physics/mujoco.usda b/fanuc_m710id_50m/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..bca2756b1e6d00b7611d42d90426d42b2c7e0ea8 --- /dev/null +++ b/fanuc_m710id_50m/payloads/Physics/mujoco.usda @@ -0,0 +1,199 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710id_50m" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m710id_50m/payloads/Physics/none.usda b/fanuc_m710id_50m/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..148cffa779a41d7439e02bf402396ebdb69f66b3 --- /dev/null +++ b/fanuc_m710id_50m/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_50m" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m710id_50m" +{ +} + diff --git a/fanuc_m710id_50m/payloads/Physics/physics.usda b/fanuc_m710id_50m/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..1b94760754e4657d5a938acca521fae9d054afb6 --- /dev/null +++ b/fanuc_m710id_50m/payloads/Physics/physics.usda @@ -0,0 +1,335 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_50m" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710id_50m" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 8000 + float drive:angular:physics:stiffness = 2500 + 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 = 35.809967 + point3f physics:localPos0 = (0, 0, 0.565) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -185 + float physics:upperLimit = 185 + } + + def PhysicsRevoluteJoint "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 10000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 52.07876 + point3f physics:localPos0 = (0.15, 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 = -74.99999 + float physics:upperLimit = 149.99998 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 5000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 266.59595 + point3f physics:localPos0 = (0, 0, 1.15) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -80.5 + float physics:upperLimit = 204.99998 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 2000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 62.251522 + point3f physics:localPos0 = (0, 0, 0.17) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -399.99997 + float physics:upperLimit = 399.99997 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 1000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 25.189623 + point3f physics:localPos0 = (1.295, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -124.99999 + float physics:upperLimit = 124.99999 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 900 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.016587678 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -399.99997 + float physics:upperLimit = 399.99997 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.056199994, -0.000509, 0.10899998) + float3 physics:diagonalInertia = (2.7944272, 3.0052705, 4.870302) + float physics:mass = 109 + quatf physics:principalAxes = (0.996832, 0.00014981309, 0.0060393373, 0.079306) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0361, -0.00381, -0.0873) + float3 physics:diagonalInertia = (6.5417175, 5.3386955, 7.609586) + float physics:mass = 180 + quatf physics:principalAxes = (0.92621624, -0.11034168, -0.31335258, 0.17820896) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.035, 0.173, 0.519) + float3 physics:diagonalInertia = (24.083424, 25.425367, 2.3512073) + float physics:mass = 167 + quatf physics:principalAxes = (0.99785984, -0.034292378, -0.0022742269, -0.055630013) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0255, -0.005, 0.0679) + float3 physics:diagonalInertia = (1.5873022, 2.4221082, 2.2205899) + float physics:mass = 89.4 + quatf physics:principalAxes = (0.925952, 0.002548489, -0.37207776, 0.06453257) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.722, -0.00464, 0.0000825) + float3 physics:diagonalInertia = (0.18094918, 3.930166, 3.9298854) + float physics:mass = 44.2 + quatf physics:principalAxes = (0.94047755, -0.33985108, 0.0006280418, -0.0017299859) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0325, -0.0138, 6.24e-7) + float3 physics:diagonalInertia = (0.040049925, 0.051850077, 0.0633) + float physics:mass = 9.67 + quatf physics:principalAxes = (0.9633749, -0.0000018713833, -0.000007552832, 0.2681584) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.165, 4.54e-18, 2.83e-18) + float3 physics:diagonalInertia = (0.000809, 0.0004170001, 0.00041699992) + float physics:mass = 0.415 + quatf physics:principalAxes = (0.94163215, 0.3366437, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m710id_50m/payloads/Physics/physx.usda b/fanuc_m710id_50m/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..a63dcd726dd748d2f2fc360c6b17b5c0030b9e9c --- /dev/null +++ b/fanuc_m710id_50m/payloads/Physics/physx.usda @@ -0,0 +1,69 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_50m" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m710id_50m" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 370 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m710id_50m/payloads/Sensor/none.usda b/fanuc_m710id_50m/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..148cffa779a41d7439e02bf402396ebdb69f66b3 --- /dev/null +++ b/fanuc_m710id_50m/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_50m" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m710id_50m" +{ +} + diff --git a/fanuc_m710id_50m/payloads/Sensor/sensors.usda b/fanuc_m710id_50m/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..eeba1c5db7dc2c6c64063759d369250ec976c342 --- /dev/null +++ b/fanuc_m710id_50m/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_50m" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m710id_50m" +{ +} + diff --git a/fanuc_m710id_50m/payloads/base.usda b/fanuc_m710id_50m/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..9b980d7ca5886211b1c55ed1e51c705e1060089f --- /dev/null +++ b/fanuc_m710id_50m/payloads/base.usda @@ -0,0 +1,366 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_50m" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m710id_50m" +{ + 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 "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.5649999976158142) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.5649999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 0.5649999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 1.7149999141693115) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 1.8849998712539673) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.4449999332427979, 0, 1.8849998712539673) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.4449999332427979, 0, 1.8849998712539673) + 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.17499999701976776, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + quatd xformOp:orient = (-3.0908619663705394e-8, 0.7071067690849304, 3.0908619663705394e-8, 0.7071067690849304) + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/fanuc_m710id_50m/payloads/geometries.usd b/fanuc_m710id_50m/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..562ce12924c32b1e056dedbf52369968fd7a5d3c --- /dev/null +++ b/fanuc_m710id_50m/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8e6c11d5d3221f5afb283a9d21e93f66c141afd2c813a0dc7c4236a1dc242ec +size 6558657 diff --git a/fanuc_m710id_50m/payloads/instances.usda b/fanuc_m710id_50m/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..026ce622b96fa63403059ef1d344c3ee2af7e69b --- /dev/null +++ b/fanuc_m710id_50m/payloads/instances.usda @@ -0,0 +1,973 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.02, 0.02, 0.02) + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.02, 0.02, 0.02) + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_2" ( + 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_3" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5, 0.5, 0) + float inputs:metallic = 1 + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_2" ( + 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_3" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5, 0.5, 0) + float inputs:metallic = 1 + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5, 0.5, 0) + float inputs:metallic = 1 + 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_5" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7333333, 0.7333333, 0.7333333) + 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_2" ( + 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_0" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.02, 0.02, 0.02) + 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_3" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5, 0.5, 0) + float inputs:metallic = 1 + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_6" ( + 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_2" ( + 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_7" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.02, 0.02, 0.02) + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_2" ( + 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_8" ( + 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_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 "Material_8" ( + 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", "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/fanuc_m710id_50m/payloads/materials.usda b/fanuc_m710id_50m/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..bd8631497f7b79877678a320a6ce1626ff6047f8 --- /dev/null +++ b/fanuc_m710id_50m/payloads/materials.usda @@ -0,0 +1,1633 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_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:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Material_0" ( + 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.02, 0.02, 0.02) ( + 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.02, 0.02, 0.02) + 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_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" + ) + 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 "Material_1" ( + 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.02, 0.02, 0.02) ( + 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.02, 0.02, 0.02) + 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 "Material_2" + { + 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 "Material_0" ( + 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) ( + 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, 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_3" + { + 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 "Material_1" ( + 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.5, 0.5, 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:metallic_constant = 1 + 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.5, 0.5, 0) + float inputs:metallic = 1 + 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_4" + { + 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 "Material_0" ( + 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.5, 0.5, 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:metallic_constant = 1 + 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.5, 0.5, 0) + float inputs:metallic = 1 + 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_5" + { + 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 "Material_1" ( + 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.7333333, 0.7333333, 0.7333333) ( + 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.7333333, 0.7333333, 0.7333333) + 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_6" + { + 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 "Material_0" ( + 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" + 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_7" + { + 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 "Material_2" ( + 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.8000001, 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.8000001, 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_8" + { + 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 "Material_1" ( + 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" + 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/fanuc_m710id_50m/payloads/robot.usda b/fanuc_m710id_50m/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..1a9929957382ab4f589bdb365dfa23d969fa3444 --- /dev/null +++ b/fanuc_m710id_50m/payloads/robot.usda @@ -0,0 +1,154 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_50m" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710id_50m" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m710id_50m/runnables/physics/mujoco.usda b/fanuc_m710id_50m/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..2a3b77cc844871c17e72ccee326fc4d21ead1735 --- /dev/null +++ b/fanuc_m710id_50m/runnables/physics/mujoco.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m710id_50m" +) + +def "m710id_50m" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m710id_50m_joints_J1" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 8000 + double mjc:forceRange:min = -8000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710id_50m_joints_J2" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 10000 + double mjc:forceRange:min = -10000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710id_50m_joints_J3" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5000 + double mjc:forceRange:min = -5000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710id_50m_joints_J4" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 2000 + double mjc:forceRange:min = -2000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710id_50m_joints_J5" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 1000 + double mjc:forceRange:min = -1000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710id_50m_joints_J6" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 900 + double mjc:forceRange:min = -900 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m710id_50m/runnables/physics/newton.usda b/fanuc_m710id_50m/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..6937bc215d9c988a81d161c3a9b7e0c30fdc5932 --- /dev/null +++ b/fanuc_m710id_50m/runnables/physics/newton.usda @@ -0,0 +1,190 @@ +#usda 1.0 +( + defaultPrim = "m710id_50m" +) + +over "m710id_50m" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + 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 "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1666.6667 + float newton:damping = 55.555557 + float newton:velocityLimit = 180 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2083.3333 + float newton:damping = 69.44444 + float newton:velocityLimit = 180 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1041.6667 + float newton:damping = 34.72222 + float newton:velocityLimit = 180 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 288.4615 + float newton:damping = 9.615385 + float newton:velocityLimit = 260 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 144.2308 + float newton:damping = 4.807692 + float newton:velocityLimit = 260 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 91.2162 + float newton:damping = 3.040541 + float newton:velocityLimit = 370 + } + } +} + diff --git a/fanuc_m710id_50m/runnables/physics/physx.usda b/fanuc_m710id_50m/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..8c9ebbf35aa01a0119ccfacaabc3b6fed4252633 --- /dev/null +++ b/fanuc_m710id_50m/runnables/physics/physx.usda @@ -0,0 +1,171 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_50m" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710id_50m" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 370 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/fanuc_m710id_70/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m710id_70/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..b017edbf92ba030e809bdab7c34923d22ca5c8c8 --- /dev/null +++ b/fanuc_m710id_70/.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:20", + "assets": [ + { + "asset": "m710id_70.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/fanuc_m710id_70/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m710id_70/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..367375f9d069eb2ab13b9e0af41f6c85fba77f4f --- /dev/null +++ b/fanuc_m710id_70/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7545, + "hash": { + "sha256-flat-1mb": "6ba959657ebe5029b98529867c7946e518e08513360f7be7a38ee3c7f055377b", + "sha256": "a8689352e668e642b8c43cba339b0c0270a5ce45b614cf83dcf1370b4efd7c56" + } + }, + { + "relative_path": ".thumbs/256x256/.m710id_70.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "9fb0a508aaff729624d0b395fe3266f8681b349bf1a1e8f01c7cf110babee5fb", + "sha256": "da946c5cd920b2d677ba1ef4a67cd05cd698cbc895f33353d5800adbab60ec06" + } + }, + { + "relative_path": ".thumbs/256x256/m710id_70.usda.png", + "size": 43626, + "hash": { + "sha256-flat-1mb": "503dba682e11844f4d7fb1f7833cd1791d6a265156fc5d768fc54bee02bacdf2", + "sha256": "577adef97e2c5f38de770b7cc922e9c6b95052cd2153548bfe8d880e1c599810" + } + }, + { + "relative_path": ".thumbs/m710id_70.thumb.usd", + "size": 6126, + "hash": { + "sha256-flat-1mb": "3128b69d3eee06b0e408918658ccb61a3317ec17c36424095e97add5b9a32d5a", + "sha256": "a75a7422365dfa57c6e5d5a8de2b267aae1a88793ba7c254a242d90019962990" + } + }, + { + "relative_path": "m710id_70.usda", + "size": 15999, + "hash": { + "sha256-flat-1mb": "1074e813235eeda90e06c53b0d8cdb3fc46dbf2ff44f187baffbb22985583f77", + "sha256": "3f9c3abf024c7a01e37999c07aa4e66f705391d033304c385e6caf4dde86e9be" + } + }, + { + "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": 2917, + "hash": { + "sha256-flat-1mb": "b5ae50185ddf7759b4950188fa23a0d4a5a2a9eff0630145917fd0a8bb3e2ae4", + "sha256": "466962030e5c89b82c1640efe82243d699ce489ae987a892433132e36421f06e" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 135, + "hash": { + "sha256-flat-1mb": "4a3b84d662b4c2c28bc672c694f44ddc389a48798bb98c91451484c52b4bf641", + "sha256": "1a2feeb91f4f436283f2cbfd0e260803342cb2264ebab1f496b87a31191e66b5" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 11998, + "hash": { + "sha256-flat-1mb": "096e0d6487ea7a5b2d8c2f0e1de123e5b6cb56ba6c5f5cef489aff060956f603", + "sha256": "d11a98b188864f55d415a244809879edbac910313167531f14c8edb006a5f43a" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 1418, + "hash": { + "sha256-flat-1mb": "ee664a5db9dfe028193a2279fda403f03f1298bf7a24e3cf439edd9926d68a56", + "sha256": "8a17014dfdb9ae36015c612c23a70127bd32b1ebda61c43f3995d90d777fc5f5" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 135, + "hash": { + "sha256-flat-1mb": "4a3b84d662b4c2c28bc672c694f44ddc389a48798bb98c91451484c52b4bf641", + "sha256": "1a2feeb91f4f436283f2cbfd0e260803342cb2264ebab1f496b87a31191e66b5" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 141, + "hash": { + "sha256-flat-1mb": "f7588f3235a5f5f9dfe2bb6d5042a57ff4b7c9e98b08d075cdea6daec3dee67e", + "sha256": "a471ce3c61557b02b7ddd394bb38f6c580031ce88945eeaee4654faaf61213ae" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 11548, + "hash": { + "sha256-flat-1mb": "e0e9c674963b0be4772f41d3602751f118474613fbe673c0b58134277809e00c", + "sha256": "950e4a38e15a710849db03b3363efd94bfd72659b8c6a4b0e4f4c49c52403307" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 8606607, + "hash": { + "sha256-flat-1mb": "0b1ad9880645a390942bb42fbd5db59bd8be8957a7c281ce7461dda7711c9eb1", + "sha256": "cc84da29d384b189e7f78ea00188fde12250502fe0202b5ddb8354b489dca9e6", + "sha256-first1m": "59e4e83a8ad323fccdcc318c6463eade14218e9d9da6dded356418928a5b1707" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 41014, + "hash": { + "sha256-flat-1mb": "2d277a0651366ba55e405433d31c41dec73d9fdfd079c3ebb8125113aeaaf669", + "sha256": "831c57066fc9bec3a27f083b14faedadafe4f3ad4a6a91e9279ab017d51fe21e" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 63482, + "hash": { + "sha256-flat-1mb": "d7cb2c4624dc8718c107191f56b13b08cfa21ba906d1b6af0b1d3886173208bd", + "sha256": "5322e34383584e08dd7c7e19cc1de45f2bdb9d46b2e658cf3f247ffc0480d852" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 2945, + "hash": { + "sha256-flat-1mb": "59b143520f65acb130c1ce1304506be9d4d55addd8fcc703c6c6224ffb98a52d", + "sha256": "4948f0b820b5b6bd7ddcddac620bf5ee16ae6bd153fc1a7ad5236ae2c2347593" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 8180, + "hash": { + "sha256-flat-1mb": "764cc5c4e1d00c7b71a50a0ae7c50f5093587055936d57be72e92e0d4e68e7d7", + "sha256": "ee6db417859af5ce56e76c3aa4371c4c49be78040133aefdc6c9d90b549951bf" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 4897, + "hash": { + "sha256-flat-1mb": "115d1a624344bf38b6f42fd0fbbd1c74964a8477364a429006ce574e1172c44f", + "sha256": "b7f783fe191ed745a44a314113346dda9260d9474c32e0ac2b27386ea61bd34f" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 3508, + "hash": { + "sha256-flat-1mb": "27960af2f2f52f9fbcd8ab1c11961ab555e8e088e80cd09e1ee4202ce0cb054d", + "sha256": "cbd701dd1250e976eb88dc277f6afb766e340d52ab037a5e85b7c40a728a3fb7" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m710id_70/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m710id_70/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..30160d047de3a418e4423a45565a5f775844fa40 --- /dev/null +++ b/fanuc_m710id_70/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m710id_70.usda" + ] +} diff --git a/fanuc_m710id_70/.metadata/license.txt b/fanuc_m710id_70/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m710id_70/.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/fanuc_m710id_70/.simready/validation.json b/fanuc_m710id_70/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..c6ab69b310886bd9bc5b35c3d6f829fb7cbecc45 --- /dev/null +++ b/fanuc_m710id_70/.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/fanuc_m710id_70/.thumbs/256x256/.m710id_70.usda.last_generated b/fanuc_m710id_70/.thumbs/256x256/.m710id_70.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..b3f9d967e592aed93c9b4c321361936ce98af104 --- /dev/null +++ b/fanuc_m710id_70/.thumbs/256x256/.m710id_70.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:30:51 \ No newline at end of file diff --git a/fanuc_m710id_70/.thumbs/256x256/m710id_70.usda.png b/fanuc_m710id_70/.thumbs/256x256/m710id_70.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..7cd18eae96ce79e61cfbc80aaa3db53e3b5d6a98 --- /dev/null +++ b/fanuc_m710id_70/.thumbs/256x256/m710id_70.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:577adef97e2c5f38de770b7cc922e9c6b95052cd2153548bfe8d880e1c599810 +size 43626 diff --git a/fanuc_m710id_70/.thumbs/m710id_70.thumb.usd b/fanuc_m710id_70/.thumbs/m710id_70.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..998d9fab07f54f03dd766a52441e7c14290ca93a Binary files /dev/null and b/fanuc_m710id_70/.thumbs/m710id_70.thumb.usd differ diff --git a/fanuc_m710id_70/com.nvidia.simready.packaging.json b/fanuc_m710id_70/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..6f180abb65d860ece9a60dafe78be441bdef8b12 --- /dev/null +++ b/fanuc_m710id_70/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m710id_70.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "5c14be74f2cda052663eacce10932d1ca908193ff2563129f351b18720e2b8eb" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "a0c59e351df385f75c97a28347913432ad180d090ad7680a3471cc50699b16c6" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "39bfa542a846e85f50934e63a3c2a6be93ec3b4670450613822469f282c13949" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "dd48382905f8c2564243308230963a0748fb89c6615d004799c0a7fb30d4cdde" + }, + "package_hash": { + "sha256": "bcf86178f01df09232cd28efb5a0d45455a821030ee7f7ca9f5ef580e421cecf" + } +} diff --git a/fanuc_m710id_70/m710id_70.usda b/fanuc_m710id_70/m710id_70.usda new file mode 100644 index 0000000000000000000000000000000000000000..4f7e76a530d66c0ec4991171b20f3ab9fa63bbdc --- /dev/null +++ b/fanuc_m710id_70/m710id_70.usda @@ -0,0 +1,420 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m710id_70" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m710id_70" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m710id_70" + 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 = (1.7084999, 0.6426469, 1.7580043) + string asset_license = "CC-BY-4.0" + string asset_name = "m710id_70" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 580.3470005691051 + string qcode = "Q40687" + int rigid_body_count = 7 + string source_file = "Fanuc/m710id_70/m710id_70.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m710id_70" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m710id_70" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + 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/fanuc_m710id_70/materials/mdl/LICENSE.md b/fanuc_m710id_70/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m710id_70/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/fanuc_m710id_70/materials/mdl/OmniPBR.mdl b/fanuc_m710id_70/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m710id_70/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/fanuc_m710id_70/materials/mdl/OmniPBRBase.mdl b/fanuc_m710id_70/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m710id_70/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/fanuc_m710id_70/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m710id_70/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m710id_70/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/fanuc_m710id_70/materials/mdl/aux_definitions.mdl b/fanuc_m710id_70/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m710id_70/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/fanuc_m710id_70/materials/mdl/core_definitions.mdl b/fanuc_m710id_70/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m710id_70/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/fanuc_m710id_70/materials/mdl/support_definitions.mdl b/fanuc_m710id_70/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m710id_70/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/fanuc_m710id_70/payloads/Physics/mujoco.usda b/fanuc_m710id_70/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..2756b68837082d13ad497988e77d9d8616651271 --- /dev/null +++ b/fanuc_m710id_70/payloads/Physics/mujoco.usda @@ -0,0 +1,199 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710id_70" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m710id_70/payloads/Physics/none.usda b/fanuc_m710id_70/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..2a856a5eeb0ab91f0a39e5787628d3fac0bf4a84 --- /dev/null +++ b/fanuc_m710id_70/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_70" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m710id_70" +{ +} + diff --git a/fanuc_m710id_70/payloads/Physics/physics.usda b/fanuc_m710id_70/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..5b17d0940674c578841c229a580304a4fed25797 --- /dev/null +++ b/fanuc_m710id_70/payloads/Physics/physics.usda @@ -0,0 +1,335 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_70" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710id_70" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 8000 + float drive:angular:physics:stiffness = 2500 + 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 = 37.199448 + point3f physics:localPos0 = (0, 0, 0.565) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -185 + float physics:upperLimit = 185 + } + + def PhysicsRevoluteJoint "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 10000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 50.965122 + point3f physics:localPos0 = (0.15, 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 = -74.99999 + float physics:upperLimit = 149.99998 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 5000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 168.71834 + point3f physics:localPos0 = (0, 0, 0.895) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -80.5 + float physics:upperLimit = 204.99998 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 2000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 38.77679 + point3f physics:localPos0 = (0, 0, 0.17) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -399.99997 + float physics:upperLimit = 399.99997 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 1000 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 17.64606 + point3f physics:localPos0 = (1.045, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -124.99999 + float physics:upperLimit = 124.99999 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 100 + float drive:angular:physics:maxForce = 900 + float drive:angular:physics:stiffness = 2500 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.017869301 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -399.99997 + float physics:upperLimit = 399.99997 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.0562, -0.000509, 0.109) + float3 physics:diagonalInertia = (2.9438672, 3.1558127, 5.12032) + float physics:mass = 115 + quatf physics:principalAxes = (0.99652284, 0.0001765656, 0.0060597467, 0.08309906) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0361, -0.00394, -0.0874) + float3 physics:diagonalInertia = (6.874982, 5.6086173, 7.996402) + float physics:mass = 189 + quatf physics:principalAxes = (0.92619, -0.10974228, -0.3136998, 0.17810453) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.0291, 0.17, 0.4) + float3 physics:diagonalInertia = (13.291258, 14.313526, 1.7952155) + float physics:mass = 137 + quatf physics:principalAxes = (0.99787617, -0.045780633, -0.0014916565, -0.046315435) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0255, -0.005, 0.0679) + float3 physics:diagonalInertia = (1.6706345, 2.542838, 2.3365278) + float physics:mass = 93.9 + quatf physics:principalAxes = (0.92579097, 0.003222581, -0.3723511, 0.06523413) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.612, -0.00489, 0.000279) + float3 physics:diagonalInertia = (0.13991477, 1.8303819, 1.8297036) + float physics:mass = 34.8 + quatf physics:principalAxes = (0.9354552, -0.35342768, 0.0012022132, -0.0033407493) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0344, -0.0134, 9.23e-8) + float3 physics:diagonalInertia = (0.042331565, 0.05496843, 0.0678) + float physics:mass = 10.2 + quatf physics:principalAxes = (0.97391754, 0.000008728777, -0.0000023776624, 0.22690228) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.165, -7.2999997e-19, 3.24e-19) + float3 physics:diagonalInertia = (0.000872, 0.000451, 0.000451) + float physics:mass = 0.447 + quatf physics:principalAxes = (1, 0, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m710id_70/payloads/Physics/physx.usda b/fanuc_m710id_70/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..2445a2d676bdda8487cd74f51497d084140f3d0b --- /dev/null +++ b/fanuc_m710id_70/payloads/Physics/physx.usda @@ -0,0 +1,69 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_70" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m710id_70" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 370 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m710id_70/payloads/Sensor/none.usda b/fanuc_m710id_70/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..2a856a5eeb0ab91f0a39e5787628d3fac0bf4a84 --- /dev/null +++ b/fanuc_m710id_70/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_70" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m710id_70" +{ +} + diff --git a/fanuc_m710id_70/payloads/Sensor/sensors.usda b/fanuc_m710id_70/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..19df03aef805a3ae456f76d0792505487b862a10 --- /dev/null +++ b/fanuc_m710id_70/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_70" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m710id_70" +{ +} + diff --git a/fanuc_m710id_70/payloads/base.usda b/fanuc_m710id_70/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..2d3911079fe679634a6c7087fbf761f25f4d0c56 --- /dev/null +++ b/fanuc_m710id_70/payloads/base.usda @@ -0,0 +1,366 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_70" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m710id_70" +{ + 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 "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.5649999976158142) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.5649999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 0.5649999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 1.4600000381469727) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.15000000596046448, 0, 1.6299999952316284) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.1949999332427979, 0, 1.6299999952316284) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.1949999332427979, 0, 1.6299999952316284) + 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.17499999701976776, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + quatd xformOp:orient = (-3.0908619663705394e-8, 0.7071067690849304, 3.0908619663705394e-8, 0.7071067690849304) + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/fanuc_m710id_70/payloads/geometries.usd b/fanuc_m710id_70/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..d415ed27192aae5cf34259c2b6ea7504ded0a3d1 --- /dev/null +++ b/fanuc_m710id_70/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc84da29d384b189e7f78ea00188fde12250502fe0202b5ddb8354b489dca9e6 +size 8606607 diff --git a/fanuc_m710id_70/payloads/instances.usda b/fanuc_m710id_70/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..9c7673c5b489f943ccdc2ec1e4c4f06a69dd9233 --- /dev/null +++ b/fanuc_m710id_70/payloads/instances.usda @@ -0,0 +1,1174 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_1" ( + 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_2" ( + 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_3" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4666667, 0.5333334, 0.5333334) + 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_5" ( + 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_6" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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_6" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.4666667, 0.5333334, 0.5333334) + 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_0" ( + 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_5" ( + 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_1" ( + 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_2" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_8" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6666667, 0.06666667, 0.06666667) + 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_9" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8666667, 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_7" ( + 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_5" ( + 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_6" ( + 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_10" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_5" ( + 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_10" ( + 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_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" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_6" ( + 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_11" ( + 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", "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/fanuc_m710id_70/payloads/materials.usda b/fanuc_m710id_70/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..a5ca4cae26134bf02d766e7915f057921a8caac7 --- /dev/null +++ b/fanuc_m710id_70/payloads/materials.usda @@ -0,0 +1,1793 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_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:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Material_0" ( + 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" + 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_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" + ) + 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 "Material_1" ( + 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" + 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_2" + { + 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 "Material_2" ( + 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" + 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_3" + { + 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 "Material_3" ( + 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" + 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 "Material_4" + { + 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 "Material_0" ( + 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.4666667, 0.5333334, 0.5333334) ( + 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.4666667, 0.5333334, 0.5333334) + 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_5" + { + 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 "Material_1" ( + 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) ( + 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, 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_7" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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) ( + 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, 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_8" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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.6666667, 0.06666667, 0.06666667) ( + 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.6666667, 0.06666667, 0.06666667) + 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_9" + { + 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 "Material_1" ( + 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.8666667, 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.8666667, 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_10" + { + 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 "Material_5" ( + 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" + 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/fanuc_m710id_70/payloads/robot.usda b/fanuc_m710id_70/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..d63b706983fbce90c20123e362f2b13a97bb6b66 --- /dev/null +++ b/fanuc_m710id_70/payloads/robot.usda @@ -0,0 +1,154 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_70" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710id_70" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m710id_70/runnables/physics/mujoco.usda b/fanuc_m710id_70/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..75cda16153c98996f8069881679b34aeca13e435 --- /dev/null +++ b/fanuc_m710id_70/runnables/physics/mujoco.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m710id_70" +) + +def "m710id_70" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m710id_70_joints_J1" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 8000 + double mjc:forceRange:min = -8000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710id_70_joints_J2" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 10000 + double mjc:forceRange:min = -10000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710id_70_joints_J3" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5000 + double mjc:forceRange:min = -5000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710id_70_joints_J4" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 2000 + double mjc:forceRange:min = -2000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710id_70_joints_J5" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 1000 + double mjc:forceRange:min = -1000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m710id_70_joints_J6" ( + 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, -143239.44878270582, -5729.5779513082325] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 900 + double mjc:forceRange:min = -900 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m710id_70/runnables/physics/newton.usda b/fanuc_m710id_70/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..1bdbec1ba9aa5a7f6bf07b0c276ca43a31e691a0 --- /dev/null +++ b/fanuc_m710id_70/runnables/physics/newton.usda @@ -0,0 +1,190 @@ +#usda 1.0 +( + defaultPrim = "m710id_70" +) + +over "m710id_70" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + 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 "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1666.6667 + float newton:damping = 55.555557 + float newton:velocityLimit = 180 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2083.3333 + float newton:damping = 69.44444 + float newton:velocityLimit = 180 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1041.6667 + float newton:damping = 34.72222 + float newton:velocityLimit = 180 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 288.4615 + float newton:damping = 9.615385 + float newton:velocityLimit = 260 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 144.2308 + float newton:damping = 4.807692 + float newton:velocityLimit = 260 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 91.2162 + float newton:damping = 3.040541 + float newton:velocityLimit = 370 + } + } +} + diff --git a/fanuc_m710id_70/runnables/physics/physx.usda b/fanuc_m710id_70/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..85087df1674b179e03dc2370d6f51f53afcee1f7 --- /dev/null +++ b/fanuc_m710id_70/runnables/physics/physx.usda @@ -0,0 +1,171 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m710id_70" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m710id_70" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 370 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/fanuc_m800_60_20b/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m800_60_20b/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..3e9a2909574cf10a2ebd04c7287244369f39149e --- /dev/null +++ b/fanuc_m800_60_20b/.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:20", + "assets": [ + { + "asset": "m800_60_20b.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/fanuc_m800_60_20b/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m800_60_20b/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..a4238bcfcc415f20ad87e73da9360ec5d6ab23b8 --- /dev/null +++ b/fanuc_m800_60_20b/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7545, + "hash": { + "sha256-flat-1mb": "6ba959657ebe5029b98529867c7946e518e08513360f7be7a38ee3c7f055377b", + "sha256": "a8689352e668e642b8c43cba339b0c0270a5ce45b614cf83dcf1370b4efd7c56" + } + }, + { + "relative_path": ".thumbs/256x256/.m800_60_20b.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "c3b8bb3e4ad1665b8cc66bca45d19c56937d99b79c336b273284d44b6323901e", + "sha256": "0fd25d2cb3eec70b95ef4591097dc315adbca4e116b28a9f7bcb979f7b81f158" + } + }, + { + "relative_path": ".thumbs/256x256/m800_60_20b.usda.png", + "size": 45829, + "hash": { + "sha256-flat-1mb": "cee0c490d310b2c233565a80204f850c554faa9478dc30cfd4cec401af19078b", + "sha256": "e8eaba3ede2b9f90c102b8302226cb0fdc7544ecaa58ecec23e4a64d0bec3658" + } + }, + { + "relative_path": ".thumbs/m800_60_20b.thumb.usd", + "size": 6128, + "hash": { + "sha256-flat-1mb": "61140f7f74b33eaab999c2f9bd88b1688a2689446692778ccca6cbde27446a93", + "sha256": "80c941c6647e2621d4983818589f6b77c8de64a5e0a417b1d4dc8cb12e8b352d" + } + }, + { + "relative_path": "m800_60_20b.usda", + "size": 15141, + "hash": { + "sha256-flat-1mb": "292c2ae46178940ce0f28c135ba65335e359bc40e7fec1f2717b22116cb2e1ee", + "sha256": "bb8dd53d497071e7f8a9b415d59522c3112b3103754dbcc7930a614b061da272" + } + }, + { + "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": 2919, + "hash": { + "sha256-flat-1mb": "8efe62118a15ba6d8a28bde4e67bc965316ecaaac56faa781694f9eca019e9e2", + "sha256": "8b3ffc93cbab27af0f30c9009db8a0fdc48d55b6f0e6f5983472a8bf50168686" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 139, + "hash": { + "sha256-flat-1mb": "4672b488d05fbc23e84c54447ed478cd6ed0a182d12a73e618efd0ccc5e1a8ce", + "sha256": "476338ac40ebe40cf56f674ffe749097b3d82d7815d58b242cba1da3cc8737a5" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 12016, + "hash": { + "sha256-flat-1mb": "bae58601e6d93d84e2e292d2c3d2443ac10b3161df699fc976a351de4a9b7018", + "sha256": "cb170b0b3e5ca45119a684b5dfe7c57c86b443d777d6a441506897237a6c8ab1" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 1446, + "hash": { + "sha256-flat-1mb": "7f553b544b5d917429a4d2c42b81110e293a738d963f3b8129799fe77654d51c", + "sha256": "d00c36fcf314cdcbd78e34311a1b621c6e6c5aad6ace012a77da1affa6b5bebc" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 139, + "hash": { + "sha256-flat-1mb": "4672b488d05fbc23e84c54447ed478cd6ed0a182d12a73e618efd0ccc5e1a8ce", + "sha256": "476338ac40ebe40cf56f674ffe749097b3d82d7815d58b242cba1da3cc8737a5" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 145, + "hash": { + "sha256-flat-1mb": "09cf0ad24f028b5aaba9b22bfaa9cd23aedb5fc727d8b2f35c1eebf6fda4658d", + "sha256": "6857670cc985c96ececbd97131982710eb1c4807fe04859ed0041bfec88dff3e" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 13535, + "hash": { + "sha256-flat-1mb": "969c17aac505b1f8f0d4600442216d07d2c949a26972bc0a25ebdb354bb9b87a", + "sha256": "8ce68dcbcd74c75823a109eb627adde083f6cf191bbad06ea861dc8c35594942" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 4974486, + "hash": { + "sha256-flat-1mb": "98fd0a972fcec21ddf81bd962dceae757b66660ad773234c7360e56a380649f7", + "sha256": "e898d960da7d3eec05b6e9d7e1c693e5a86426c1d2091d1efcf9f06b75342ed7", + "sha256-first1m": "67329aa25dabe1ebe37903dd4d3c9514effdbe2fc71adafe115d52ce1db3903b" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 101822, + "hash": { + "sha256-flat-1mb": "1fc2a7b9cbafff2bfdf7cbee362f923d6a24ca39b94cf9d962479a3085e593b2", + "sha256": "63286687a9d7ca01623c03975cf2e9b938805f43dca1d51469026cde067dd62f" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 109742, + "hash": { + "sha256-flat-1mb": "06338d6ba7112e47e6cb3a1cfb557b5a1e9ff8abff46de93c5b9db6ca8d16fc7", + "sha256": "8e679b58899585e6dee0a1690a4edae1ee37cb13b5948fe31c5764181369ad2e" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 2977, + "hash": { + "sha256-flat-1mb": "1802a827f2f8d11fb60eec2f83076f11939a81db25db3c0da5db8ec40ef4b24e", + "sha256": "bc474b5004e4ed3ccea8b861ae8b4f7a282fe78ecdf3138547ad62b5495b6546" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 8200, + "hash": { + "sha256-flat-1mb": "0fc0894dd96f9877de825e6ae9d904d149959d15c9674b8ef4e54f811904c92e", + "sha256": "1f651c3694455c3bb1019229d4e59f0b9b6bad592cdc096e32e8b94b32fc454e" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 4915, + "hash": { + "sha256-flat-1mb": "99d91cee0f3bd34345038b4ab1baf6596e3ab9c46415215525169b4bbe2ca2df", + "sha256": "eb4012f9b3928557ad5c1d7fd0a577fc9e9f46b39dd4d2984c865d0c565ed553" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 3532, + "hash": { + "sha256-flat-1mb": "d429dced46999240cf411473ead3ed0401b5ff73915b74526b60e43846a237e8", + "sha256": "cc0f095ed172b1e77b8983c8027ffe93114c9c7ac172ce043ce9839fc2c2f952" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m800_60_20b/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m800_60_20b/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..acda8d0c7003ae1ae6bcfd761f1874d0c4f80591 --- /dev/null +++ b/fanuc_m800_60_20b/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m800_60_20b.usda" + ] +} diff --git a/fanuc_m800_60_20b/.metadata/license.txt b/fanuc_m800_60_20b/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m800_60_20b/.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/fanuc_m800_60_20b/.simready/validation.json b/fanuc_m800_60_20b/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..c6ab69b310886bd9bc5b35c3d6f829fb7cbecc45 --- /dev/null +++ b/fanuc_m800_60_20b/.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/fanuc_m800_60_20b/.thumbs/256x256/.m800_60_20b.usda.last_generated b/fanuc_m800_60_20b/.thumbs/256x256/.m800_60_20b.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..0361fc2f34464c16394e35411cbeeac25690f387 --- /dev/null +++ b/fanuc_m800_60_20b/.thumbs/256x256/.m800_60_20b.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:30:56 \ No newline at end of file diff --git a/fanuc_m800_60_20b/.thumbs/256x256/m800_60_20b.usda.png b/fanuc_m800_60_20b/.thumbs/256x256/m800_60_20b.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..98b35dd56d7adb3f1121f8917079610f3e1fcbf8 --- /dev/null +++ b/fanuc_m800_60_20b/.thumbs/256x256/m800_60_20b.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8eaba3ede2b9f90c102b8302226cb0fdc7544ecaa58ecec23e4a64d0bec3658 +size 45829 diff --git a/fanuc_m800_60_20b/.thumbs/m800_60_20b.thumb.usd b/fanuc_m800_60_20b/.thumbs/m800_60_20b.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..b88d3e6911171dd96ca15b29aeaf8d92f76cf0bf Binary files /dev/null and b/fanuc_m800_60_20b/.thumbs/m800_60_20b.thumb.usd differ diff --git a/fanuc_m800_60_20b/com.nvidia.simready.packaging.json b/fanuc_m800_60_20b/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..6f64f43498c8f3b36b645ff6b80b7ea24ed37874 --- /dev/null +++ b/fanuc_m800_60_20b/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m800_60_20b.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "039f095a9a52406b1a25cf063c7ec2f6836c755e33ba7f35c7d236c9353b7c0c" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "54c26e464fdd49c476d854f013279a81f430c1d993efe618f8446c8d54b38867" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "80411a631f989092352d8046c6e702a2c5457ddf08f59901ad0ca6abbd67d744" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "0cf2c9ba0f1f980529a4040fdabe805c80cf56a80a90ff4a34932de1e2191200" + }, + "package_hash": { + "sha256": "dde739fe336c4e5e037e57224124876b02f2e3b5a6e5bcccd0309b2860444d5a" + } +} diff --git a/fanuc_m800_60_20b/m800_60_20b.usda b/fanuc_m800_60_20b/m800_60_20b.usda new file mode 100644 index 0000000000000000000000000000000000000000..2afd90aa81e2b111b8cbe7cbc945857d21900fa1 --- /dev/null +++ b/fanuc_m800_60_20b/m800_60_20b.usda @@ -0,0 +1,378 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m800_60_20b" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m800_60_20b" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m800_60_20b" + 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 = (2.0616, 0.59614414, 1.7500051) + string asset_license = "CC-BY-4.0" + string asset_name = "m800_60_20b" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 820.5330011248589 + string qcode = "Q40687" + int rigid_body_count = 7 + string source_file = "Fanuc/m800_60_20b/m800_60_20b.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m800_60_20b" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m800_60_20b" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "robot_base" + { + over "collisions" + { + token visibility = "invisible" + } + } + + over "J1_link" + { + over "collisions" + { + token visibility = "invisible" + } + } + + over "J2_link" + { + over "collisions" + { + token visibility = "invisible" + } + } + + over "J3_link" + { + over "collisions" + { + token visibility = "invisible" + } + } + + over "J4_link" + { + over "collisions" + { + token visibility = "invisible" + } + } + + over "J5_link" + { + over "collisions" + { + token visibility = "invisible" + } + } + + over "J6_link" + { + over "collisions" + { + 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/fanuc_m800_60_20b/materials/mdl/LICENSE.md b/fanuc_m800_60_20b/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m800_60_20b/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/fanuc_m800_60_20b/materials/mdl/OmniPBR.mdl b/fanuc_m800_60_20b/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m800_60_20b/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/fanuc_m800_60_20b/materials/mdl/OmniPBRBase.mdl b/fanuc_m800_60_20b/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m800_60_20b/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/fanuc_m800_60_20b/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m800_60_20b/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m800_60_20b/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/fanuc_m800_60_20b/materials/mdl/aux_definitions.mdl b/fanuc_m800_60_20b/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m800_60_20b/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/fanuc_m800_60_20b/materials/mdl/core_definitions.mdl b/fanuc_m800_60_20b/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m800_60_20b/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/fanuc_m800_60_20b/materials/mdl/support_definitions.mdl b/fanuc_m800_60_20b/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m800_60_20b/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/fanuc_m800_60_20b/payloads/Physics/mujoco.usda b/fanuc_m800_60_20b/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..4d3f1b2ddb9a22b754ff32a7819f2382f841f68d --- /dev/null +++ b/fanuc_m800_60_20b/payloads/Physics/mujoco.usda @@ -0,0 +1,199 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m800_60_20b" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m800_60_20b/payloads/Physics/none.usda b/fanuc_m800_60_20b/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..9bc798bea2ee1dc47a6468e8679d550877a4eb27 --- /dev/null +++ b/fanuc_m800_60_20b/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m800_60_20b" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m800_60_20b" +{ +} + diff --git a/fanuc_m800_60_20b/payloads/Physics/physics.usda b/fanuc_m800_60_20b/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d82eb6002eba15cbe00bfdd5d1f54b834dc0ac --- /dev/null +++ b/fanuc_m800_60_20b/payloads/Physics/physics.usda @@ -0,0 +1,335 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m800_60_20b" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m800_60_20b" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 10000 + float drive:angular:physics:stiffness = 25000 + 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 = 79.18217 + point3f physics:localPos0 = (0, 0, 0.6) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -185 + float physics:upperLimit = 185 + } + + def PhysicsRevoluteJoint "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 10000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 128.71039 + point3f physics:localPos0 = (0.312, 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 = -90 + float physics:upperLimit = 135 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 7000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 239.7953 + point3f physics:localPos0 = (0, 0, 0.8) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -77 + float physics:upperLimit = 139.99998 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 2000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 58.569027 + point3f physics:localPos0 = (0, 0, 0.225) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 1000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 16.56401 + point3f physics:localPos0 = (0.9, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -124.99999 + float physics:upperLimit = 124.99999 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 600 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.032387007 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.135, 0.0006400001, 0.131) + float3 physics:diagonalInertia = (5.517277, 11.203756, 14.2189665) + float physics:mass = 211 + quatf physics:principalAxes = (0.9996372, -0.003338789, -0.023239374, -0.013204069) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.124, 0.0126, -0.109) + float3 physics:diagonalInertia = (7.779317, 11.3630295, 14.257653) + float physics:mass = 251 + quatf physics:principalAxes = (0.9694117, -0.010567476, -0.23616225, 0.06600667) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.00223, 0.157, 0.388) + float3 physics:diagonalInertia = (13.2978325, 13.80421, 1.6779588) + float physics:mass = 145 + quatf physics:principalAxes = (0.99942183, 0.006389473, 0.0011371798, 0.0333775) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_2" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0772, 0.0191, 0.106) + float3 physics:diagonalInertia = (5.3042545, 3.7137907, 3.3719554) + float physics:mass = 141 + quatf physics:principalAxes = (0.90742713, -0.24024819, 0.33315858, 0.08866942) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.656, -0.000349, -0.000145) + float3 physics:diagonalInertia = (0.45698255, 2.1500175, 2.3) + float physics:mass = 59.9 + quatf physics:principalAxes = (0.9999987, -0.000046733716, -0.00014330701, 0.0015977249) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_4" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0553, -0.00233, -0.00363) + float3 physics:diagonalInertia = (0.04335118, 0.0858197, 0.08252913) + float physics:mass = 11.9 + quatf physics:principalAxes = (0.9991564, -0.027259603, 0.029546818, 0.008390097) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.174, 2.29e-18, 3.93e-18) + float3 physics:diagonalInertia = (0.00125, 0.00069200003, 0.0006919999) + float physics:mass = 0.733 + quatf physics:principalAxes = (0.89014333, 0.45568064, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_6" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m800_60_20b/payloads/Physics/physx.usda b/fanuc_m800_60_20b/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..5e07d74d835c01c6ab7ceff65fdadf66bc7e74b2 --- /dev/null +++ b/fanuc_m800_60_20b/payloads/Physics/physx.usda @@ -0,0 +1,69 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m800_60_20b" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m800_60_20b" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 149.99998 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 149.99998 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 149.99998 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 399.99997 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m800_60_20b/payloads/Sensor/none.usda b/fanuc_m800_60_20b/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..9bc798bea2ee1dc47a6468e8679d550877a4eb27 --- /dev/null +++ b/fanuc_m800_60_20b/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m800_60_20b" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m800_60_20b" +{ +} + diff --git a/fanuc_m800_60_20b/payloads/Sensor/sensors.usda b/fanuc_m800_60_20b/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..13f6b82760ffaa152894913ac6586dae21b9f22a --- /dev/null +++ b/fanuc_m800_60_20b/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m800_60_20b" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m800_60_20b" +{ +} + diff --git a/fanuc_m800_60_20b/payloads/base.usda b/fanuc_m800_60_20b/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..899f77b48262e2a418275f8b16b337f464d1f3dc --- /dev/null +++ b/fanuc_m800_60_20b/payloads/base.usda @@ -0,0 +1,394 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m800_60_20b" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m800_60_20b" +{ + 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 "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.6000000238418579) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071099877, 0.7071035746, 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 "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.6000000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071099877, 0.7071035746, 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 "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.31200000643730164, 0, 0.6000000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071099877, 0.7071035746, 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 "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.31200000643730164, 0, 1.4000000953674316) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071099877, 0.7071035746, 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 "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.31200000643730164, 0, 1.6250001192092896) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071099877, 0.7071035746, 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 "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.2120000123977661, 0, 1.6250001192092896) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071099877, 0.7071035746, 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 "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.2120000123977661, 0, 1.6250001192092896) + 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.1899999976158142, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + quatd xformOp:orient = (-3.0908619663705394e-8, 0.7071067690849304, 3.0908619663705394e-8, 0.7071067690849304) + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + quatd xformOp:orient = (0.7071099877, 0.7071035746, 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 "VisualMaterials" + { + } +} + diff --git a/fanuc_m800_60_20b/payloads/geometries.usd b/fanuc_m800_60_20b/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..1d630f1e4f10aed64d01961b606b8622aed49881 --- /dev/null +++ b/fanuc_m800_60_20b/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e898d960da7d3eec05b6e9d7e1c693e5a86426c1d2091d1efcf9f06b75342ed7 +size 4974486 diff --git a/fanuc_m800_60_20b/payloads/instances.usda b/fanuc_m800_60_20b/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..84847ec1a1ed239e7fbcde197ffb484465b1745e --- /dev/null +++ b/fanuc_m800_60_20b/payloads/instances.usda @@ -0,0 +1,2824 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_1" ( + 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_2" ( + 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_3" ( + 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_4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7294118, 0.7294118, 0.7294118) + 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_5" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7803922, 0.5686275, 0.1137255) + 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_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_1" ( + 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_2" ( + 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_3" ( + 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_4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7294118, 0.7294118, 0.7294118) + 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_5" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7803922, 0.5686275, 0.1137255) + 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_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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_1" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_1" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_7" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_8" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_9" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_10" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_7" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6901961, 0.7686275, 0.8705883) + 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_8" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7529413, 0.7529413, 0.7529413) + 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_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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_9" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8196079, 0.8196079, 0.8196079) + 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.8980393, 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_11" ( + 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_12" ( + 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_13" ( + 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_2" ( + 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_14" ( + 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 Xform "mesh_1_2" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_1" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_7" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_8" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_9" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_10" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_7" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6901961, 0.7686275, 0.8705883) + 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_8" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7529413, 0.7529413, 0.7529413) + 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_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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_9" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8196079, 0.8196079, 0.8196079) + 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.8980393, 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_11" ( + 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_12" ( + 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_13" ( + 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_2" ( + 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_14" ( + 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 Xform "mesh_2" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_2" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_7" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6901961, 0.7686275, 0.8705883) + 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_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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 = (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_2" ( + 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_2_1" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_2" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_7" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6901961, 0.7686275, 0.8705883) + 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_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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 = (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_2" ( + 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_3" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_3" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_7" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_8" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_7" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6901961, 0.7686275, 0.8705883) + 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.6980392, 0.6980392, 0.6980392) + 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_4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7294118, 0.7294118, 0.7294118) + 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_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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.8980393, 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 = (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_2" ( + 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_14" ( + 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 Xform "mesh_3_1" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_3" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_7" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_8" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_7" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6901961, 0.7686275, 0.8705883) + 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.6980392, 0.6980392, 0.6980392) + 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_4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7294118, 0.7294118, 0.7294118) + 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_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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.8980393, 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 = (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_2" ( + 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_14" ( + 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 Xform "mesh_4" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_4" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_12" ( + 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_2" ( + 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_16" ( + 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_17" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5058824, 0.5333334, 0.5490196) + 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 = (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 Xform "mesh_4_1" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_4" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_12" ( + 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_2" ( + 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_16" ( + 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_17" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.5058824, 0.5333334, 0.5490196) + 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 = (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 Xform "mesh_5" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_5" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_12" ( + 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_2" ( + 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_5_1" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_5" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token purpose = "guide" + + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_12" ( + 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_2" ( + 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_6" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_2" ( + 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_6_1" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_6" ( + apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + uniform token purpose = "guide" + } + + def Scope "VisualMaterials" + { + def Material "Material_2" ( + 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 + } + } + } + } +} + diff --git a/fanuc_m800_60_20b/payloads/materials.usda b/fanuc_m800_60_20b/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..42ca3624235c572fd839680ba888904f85feaf2b --- /dev/null +++ b/fanuc_m800_60_20b/payloads/materials.usda @@ -0,0 +1,3089 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_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:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Material_0" ( + 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" + 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_1" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_1" ( + 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" + 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_2" + { + 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 "Material_2" ( + 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" + 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_3" + { + 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 "Material_3" ( + 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" + 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_4" + { + 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 "Material_4" ( + 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.7294118, 0.7294118, 0.7294118) ( + 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.7294118, 0.7294118, 0.7294118) + 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_5" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_5" ( + 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.7803922, 0.5686275, 0.1137255) ( + 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.7803922, 0.5686275, 0.1137255) + 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_6" + { + 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 "Material_6" ( + 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.8000001, 0.8000001, 0.8000001) ( + 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.8000001, 0.8000001, 0.8000001) + 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_7" + { + 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 "Material_1" ( + 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.6901961, 0.7686275, 0.8705883) ( + 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.6901961, 0.7686275, 0.8705883) + 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_8" + { + 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 "Material_2" ( + 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.7529413, 0.7529413, 0.7529413) ( + 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.7529413, 0.7529413, 0.7529413) + 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_9" + { + 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 "Material_4" ( + 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.8196079, 0.8196079, 0.8196079) ( + 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.8196079, 0.8196079, 0.8196079) + 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 = "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 "Material_5" ( + 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.8980393, 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.8980393, 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_11" + { + 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 "Material_6" ( + 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) ( + 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, 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 = "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 "Material_7" ( + 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) ( + 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, 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_13" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_8" ( + 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 "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 "Material_10" ( + 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" + 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 = "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 "Material_2" ( + 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.6980392, 0.6980392, 0.6980392) ( + 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.6980392, 0.6980392, 0.6980392) + 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 = "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 "Material_2" ( + 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) ( + 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, 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 = "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 "Material_3" ( + 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.5058824, 0.5333334, 0.5490196) ( + 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.5058824, 0.5333334, 0.5490196) + 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 = "steel" + 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 "Material_4" ( + 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) ( + 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, 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 + } + } +} + diff --git a/fanuc_m800_60_20b/payloads/robot.usda b/fanuc_m800_60_20b/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..b4df21dbc7a7e841c1ee9713ac791b2fd29591a2 --- /dev/null +++ b/fanuc_m800_60_20b/payloads/robot.usda @@ -0,0 +1,154 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m800_60_20b" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m800_60_20b" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m800_60_20b/runnables/physics/mujoco.usda b/fanuc_m800_60_20b/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..bc62198cbcb3c4bea500b12827f30d4b91a4f84c --- /dev/null +++ b/fanuc_m800_60_20b/runnables/physics/mujoco.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m800_60_20b" +) + +def "m800_60_20b" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_2" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_4" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_6" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m800_60_20b_joints_J1" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 10000 + double mjc:forceRange:min = -10000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m800_60_20b_joints_J2" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 10000 + double mjc:forceRange:min = -10000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m800_60_20b_joints_J3" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 7000 + double mjc:forceRange:min = -7000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m800_60_20b_joints_J4" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 2000 + double mjc:forceRange:min = -2000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m800_60_20b_joints_J5" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 1000 + double mjc:forceRange:min = -1000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m800_60_20b_joints_J6" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 600 + double mjc:forceRange:min = -600 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m800_60_20b/runnables/physics/newton.usda b/fanuc_m800_60_20b/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..4718cdca2f880ec278213770c26ada455718b8cb --- /dev/null +++ b/fanuc_m800_60_20b/runnables/physics/newton.usda @@ -0,0 +1,190 @@ +#usda 1.0 +( + defaultPrim = "m800_60_20b" +) + +over "m800_60_20b" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_2" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_4" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_6" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] + ) + { + bool newton:selfCollisionEnabled = 0 + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2500.0002 + float newton:damping = 83.33334 + float newton:velocityLimit = 149.99998 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2500.0002 + float newton:damping = 83.33334 + float newton:velocityLimit = 149.99998 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1750.0002 + float newton:damping = 58.33334 + float newton:velocityLimit = 149.99998 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 288.4615 + float newton:damping = 9.615385 + float newton:velocityLimit = 260 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 144.2308 + float newton:damping = 4.807692 + float newton:velocityLimit = 260 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 56.25 + float newton:damping = 1.875 + float newton:velocityLimit = 399.99997 + } + } +} + diff --git a/fanuc_m800_60_20b/runnables/physics/physx.usda b/fanuc_m800_60_20b/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..fdb2cab6ea5c82ad7e8218572428d259ee7fbdd5 --- /dev/null +++ b/fanuc_m800_60_20b/runnables/physics/physx.usda @@ -0,0 +1,171 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m800_60_20b" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m800_60_20b" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 149.99998 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 149.99998 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 149.99998 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 260 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 399.99997 + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_2" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_4" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_6" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/fanuc_m900ia150p/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m900ia150p/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..4c3195b6075a81fb1cfff33497a6a8ebcac05503 --- /dev/null +++ b/fanuc_m900ia150p/.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:20", + "assets": [ + { + "asset": "m900ia150p.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/fanuc_m900ia150p/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m900ia150p/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..c9260e0d39a785c318c7fe8a6fb0f3df969547da --- /dev/null +++ b/fanuc_m900ia150p/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7624, + "hash": { + "sha256-flat-1mb": "a7577552d107bba3e2e88d4ac9ab06b285605519e0862fae0b43938aa7c0c137", + "sha256": "a6b7af64162fcc6026569f04d9a8f12e4ed432f6656a6941803c8a52a87b74ed" + } + }, + { + "relative_path": ".thumbs/256x256/.m900ia150p.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "7a8685cf07234d9621818adf848747ee5862fe20c6e244cf65b043a2b1968841", + "sha256": "b75fc0ca1481c5c13db21918656cd259ff2fdf6d72d8818331b5bb3c33746624" + } + }, + { + "relative_path": ".thumbs/256x256/m900ia150p.usda.png", + "size": 44515, + "hash": { + "sha256-flat-1mb": "137189a304c1d64a6cf8ef80a5575f1a476de972ecf9d9da63f6698420aa7302", + "sha256": "7fb4a2a78af1018779ea2325c66b23980a3b80f2c08fa8d35e3fffa741386c0b" + } + }, + { + "relative_path": ".thumbs/m900ia150p.thumb.usd", + "size": 6127, + "hash": { + "sha256-flat-1mb": "e40e3f1d3e63ef3300723db766f6d9dc680bc74f448ab53e7c19d2e9f02cca87", + "sha256": "79a8836c91d2b8001cbc034579bb1aa6d4078a2b231e6e8b8cec29343eff7297" + } + }, + { + "relative_path": "m900ia150p.usda", + "size": 16598, + "hash": { + "sha256-flat-1mb": "8d37e7350fe0de7f3a3f92857a432abe5c63a8954c8989bcc4b28a6f6b50a739", + "sha256": "4271a39ca8e198d2ca84d6466e4fdaf3635e9adeb2af17bed54c05b8b1fd0518" + } + }, + { + "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": 3713, + "hash": { + "sha256-flat-1mb": "795f1a103992e2edfbb71a605d4791829364af7ebf6320cd95506ca5973e78f1", + "sha256": "ff4acd8e6956ee6e0a67e53b3c5187c0d56b0979bb0d8c24917d2f1fe83ce144" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "a0832212a031bbe0f136747dede2834b5fe79c38968f59e04b99c462bbb16b34", + "sha256": "3fc9aa09bd4bcf80dc15f3a0e1c26dd829ea32d4b227309a1b0aa702669578f3" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 16259, + "hash": { + "sha256-flat-1mb": "1e506983003c8cd0914fc20e5b76443be8cb30831e9cb64eabab44fcb8d2c33a", + "sha256": "1b9e883c0ccf07d86b16f37ed7d96758791a3cff17e85208289f8b45d124868a" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 2393, + "hash": { + "sha256-flat-1mb": "cd82d546f775056a63dd66a29f2f8430db0dc00b939bfbcead61bfa54eb53d30", + "sha256": "a396e74777f8b6c568778bdb32a0f89184e8ef53343f7b9675824bc9a45fc0f5" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "a0832212a031bbe0f136747dede2834b5fe79c38968f59e04b99c462bbb16b34", + "sha256": "3fc9aa09bd4bcf80dc15f3a0e1c26dd829ea32d4b227309a1b0aa702669578f3" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 143, + "hash": { + "sha256-flat-1mb": "9322633ce7c9df2cb1c2863baa4b99be6cbd2f4d05230bad02d3e89ccbd91a4e", + "sha256": "2ab1dc2ae04cead48aac2e2f41d14613757505e7eff722892d916ad3d1a5abf3" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 14188, + "hash": { + "sha256-flat-1mb": "38133e9e57ae6d178952d52b76c2bdb8e6e7d2e353f08174b4f93b634319d18e", + "sha256": "b17e0566488f4f835c392e374120270fe155f5b565d9b652a2f9f2a2f135b0b1" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 4178130, + "hash": { + "sha256-flat-1mb": "31c14f01b56e1064f51be49b7c17587ac41b0895fadec0096948bccba69847a9", + "sha256": "3a1bb4509a4af008901d246d6baa2edb181bace9e403d11daad727aa9e1101d6", + "sha256-first1m": "ffe0f7e4286e04091cf884c1abc0cc1ef5dd4b0b2f69ab6076c9a3c11fa81858" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 47785, + "hash": { + "sha256-flat-1mb": "6c2cfbafe47d1bc14bc3ba9518a35d945cff01dd1452ad3c565fe894b3aee21a", + "sha256": "e648459a7b70bd3c5dd999d72aa83e3965c672fa58e72f5d164da469ab0fa7eb" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 63466, + "hash": { + "sha256-flat-1mb": "f70e2609a540ecb32cc17e1e4ddf6976262eecabd5329fd10e3ee603c50ad898", + "sha256": "a0943f7c4848c6fa37fb6e6a9bcfaf7aa3a6f944e03b78d882fd16e4a361fdf0" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 4171, + "hash": { + "sha256-flat-1mb": "541d6d4f1e3fb92e67ca952c6b2de1be419c6f85133d17fd959d2739e0736696", + "sha256": "1e074fe32b0254a9824e50066bab7740270dc4f9ec1d183dae47e409eff12ba8" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 9191, + "hash": { + "sha256-flat-1mb": "c3975185d323ac347d350a963662f8e1e9dc8899eeca546c376266d8abee5cbb", + "sha256": "18088de9ab7adf028d892a052fc66e4524d8e66f51531e24e87fed58706f58a4" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 6667, + "hash": { + "sha256-flat-1mb": "e0a54d4e472964466304ddd16183b36ed72c559057ed83ba153dd338140b7d37", + "sha256": "271649d0f25e7665d7aa47aee0472bfc38fb9762d4ba03074e3a432d9eae0794" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 5135, + "hash": { + "sha256-flat-1mb": "1560e3eac802d179d69251f28167d60f9f378697d956298f9ee10395515cb2ce", + "sha256": "ad5572a813f7a04e1e355148ff2ad9a310af60d35f044b6b6074df2b2bdc9a2d" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m900ia150p/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m900ia150p/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..94ff35a442a6715dc4ad136e0d7ae4b2ea61e111 --- /dev/null +++ b/fanuc_m900ia150p/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m900ia150p.usda" + ] +} diff --git a/fanuc_m900ia150p/.metadata/license.txt b/fanuc_m900ia150p/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m900ia150p/.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/fanuc_m900ia150p/.simready/validation.json b/fanuc_m900ia150p/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fa9d519c7115ed3d699ca78e5a7960d0f7409003 --- /dev/null +++ b/fanuc_m900ia150p/.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/fanuc_m900ia150p/.thumbs/256x256/.m900ia150p.usda.last_generated b/fanuc_m900ia150p/.thumbs/256x256/.m900ia150p.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..367bb39fbd2a1efcdb6182ec4d7d2de040d22788 --- /dev/null +++ b/fanuc_m900ia150p/.thumbs/256x256/.m900ia150p.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:31:00 \ No newline at end of file diff --git a/fanuc_m900ia150p/.thumbs/256x256/m900ia150p.usda.png b/fanuc_m900ia150p/.thumbs/256x256/m900ia150p.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..9b397c3f816c7e092f679a02b37aaa4c92cc8ba9 --- /dev/null +++ b/fanuc_m900ia150p/.thumbs/256x256/m900ia150p.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fb4a2a78af1018779ea2325c66b23980a3b80f2c08fa8d35e3fffa741386c0b +size 44515 diff --git a/fanuc_m900ia150p/.thumbs/m900ia150p.thumb.usd b/fanuc_m900ia150p/.thumbs/m900ia150p.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..3e3a53839afe055d593f78dbe59839b9f85ad7f6 Binary files /dev/null and b/fanuc_m900ia150p/.thumbs/m900ia150p.thumb.usd differ diff --git a/fanuc_m900ia150p/com.nvidia.simready.packaging.json b/fanuc_m900ia150p/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..3f263ff88cc8a4ba2871e922bdb2545fb436d3b6 --- /dev/null +++ b/fanuc_m900ia150p/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m900ia150p.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "8d5d3fbee38b3245f3b0c1b98265f6af9f033c2c7613c8f299190b2528877413" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "f7163b4faa06c3ae199777c61ac1655b675100cdcd8f092ce302ea326bf17877" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "be7b5bd872051877d38189ac021bff0f3227d91692813a9d270491dec82caa85" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "9193c98cdf98d162584c08f7f0c7e858ba6331e38d7e3fc9600600947a25ac76" + }, + "package_hash": { + "sha256": "f5c1cf84b3f420159ef8cb3fa4e03c4705d2c8ce2eb65bc7e48a09564073e7dd" + } +} diff --git a/fanuc_m900ia150p/m900ia150p.usda b/fanuc_m900ia150p/m900ia150p.usda new file mode 100644 index 0000000000000000000000000000000000000000..d30e4a548948aeef72327c787b159391dc1a5a5a --- /dev/null +++ b/fanuc_m900ia150p/m900ia150p.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m900ia150p" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m900ia150p" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m900ia150p" + 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']" + string "optional requirements" = "['com.nvidia.simready.MUJOCO.DJ.002']" + bool passed = 0 + 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 = (2.6815, 1.4140054, 2.5381925) + string asset_license = "CC-BY-4.0" + string asset_name = "m900ia150p" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 1860.4399983882904 + string qcode = "Q40687" + int rigid_body_count = 9 + string source_file = "Fanuc/m900ia150p/m900ia150p.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m900ia150p" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ia150p" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" + { + token visibility = "invisible" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" + { + token visibility = "invisible" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" + { + 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/fanuc_m900ia150p/materials/mdl/LICENSE.md b/fanuc_m900ia150p/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m900ia150p/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/fanuc_m900ia150p/materials/mdl/OmniPBR.mdl b/fanuc_m900ia150p/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m900ia150p/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/fanuc_m900ia150p/materials/mdl/OmniPBRBase.mdl b/fanuc_m900ia150p/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m900ia150p/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/fanuc_m900ia150p/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m900ia150p/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m900ia150p/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/fanuc_m900ia150p/materials/mdl/aux_definitions.mdl b/fanuc_m900ia150p/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m900ia150p/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/fanuc_m900ia150p/materials/mdl/core_definitions.mdl b/fanuc_m900ia150p/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m900ia150p/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/fanuc_m900ia150p/materials/mdl/support_definitions.mdl b/fanuc_m900ia150p/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m900ia150p/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/fanuc_m900ia150p/payloads/Physics/mujoco.usda b/fanuc_m900ia150p/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..8091f93befc8a5d7e997a6ed927f3c7767bd6fc7 --- /dev/null +++ b/fanuc_m900ia150p/payloads/Physics/mujoco.usda @@ -0,0 +1,251 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ia150p" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "P2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P2_01" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "P1_link" + { + over "visuals" + { + over "p1" + { + } + } + + over "collisions" + { + over "p1" + { + } + } + } + + over "P2_link" + { + over "visuals" + { + over "p2" + { + } + } + + over "collisions" + { + over "p2" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ia150p/payloads/Physics/none.usda b/fanuc_m900ia150p/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..8e91146adb04bd50b3b380ea2016a9a90292b7d3 --- /dev/null +++ b/fanuc_m900ia150p/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia150p" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ia150p" +{ +} + diff --git a/fanuc_m900ia150p/payloads/Physics/physics.usda b/fanuc_m900ia150p/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..b83364bbb24329c445d54a4836cc37b746ee266d --- /dev/null +++ b/fanuc_m900ia150p/payloads/Physics/physics.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia150p" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ia150p" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + 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 = 89.11356 + point3f physics:localPos0 = (0, 0, 0.65) + 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 "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 567.6795 + point3f physics:localPos0 = (0.77, 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 = -120 + float physics:upperLimit = 60 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 883.9328 + point3f physics:localPos0 = (1.05, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -66 + float physics:upperLimit = 66 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 5000 + float drive:angular:physics:stiffness = 25000 + 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 = 219.20049 + point3f physics:localPos0 = (0.2, 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 = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 5000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 157.23065 + point3f physics:localPos0 = (0, 0, -1.705) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -115 + float physics:upperLimit = 115 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 3000 + float drive:angular:physics:stiffness = 25000 + 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.2262186 + point3f physics:localPos0 = (0, 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 = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "P1" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + uniform bool physics:excludeFromArticulation = 1 + float physics:JointEquivalentInertia = 17.877907 + point3f physics:localPos0 = (0, 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 = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 14.748425 + point3f physics:localPos0 = (0, 0, 0.4) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2_01" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 14.748425 + point3f physics:localPos0 = (1.05, 0, 0) + point3f physics:localPos1 = (0, 0, 0.39999998) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -92.4 + float physics:upperLimit = 92.4 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.0637, -0.0000336, 0.142) + float3 physics:diagonalInertia = (7.0499434, 11.39999, 15.400065) + float physics:mass = 207 + quatf physics:principalAxes = (0.99999887, -0.0008362285, -0.0012933899, -0.00030766695) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.422, -0.00599, -0.0431) + float3 physics:diagonalInertia = (100.8911, 135.0092, 195.09972) + float physics:mass = 974 + quatf physics:principalAxes = (0.9983921, -0.011094104, -0.053435113, 0.015328914) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.459, -0.0278, -0.02) + float3 physics:diagonalInertia = (5.0901875, 30.431467, 31.128342) + float physics:mass = 237 + quatf physics:principalAxes = (0.9762747, -0.2151847, -0.011766134, 0.02109274) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.149, -0.00209, -0.394) + float3 physics:diagonalInertia = (87.77554, 88.005295, 6.0491595) + float physics:mass = 321 + quatf physics:principalAxes = (0.9968366, -0.0020652662, -0.023434771, 0.07591693) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (6.45e-10, -0.00678, -1.6) + float3 physics:diagonalInertia = (0.21, 0.22864532, 0.10635469) + float physics:mass = 18.1 + quatf physics:principalAxes = (0.9993393, -0.036345154, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (1.04e-8, -0.0269, -0.0506) + float3 physics:diagonalInertia = (0.514, 0.46732903, 0.33567098) + float physics:mass = 33.5 + quatf physics:principalAxes = (0.97542053, 0.22035192, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-5.42e-9, -1.59e-8, -0.254) + float3 physics:diagonalInertia = (0.00856, 0.00856, 0.0167) + float physics:mass = 2.34 + quatf physics:principalAxes = (1, 0, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.00899, 0.139, 0.0893) + float3 physics:diagonalInertia = (1.3411095, 1.8063767, 0.6145139) + float physics:mass = 47.6 + quatf physics:principalAxes = (0.99912924, 0.03650434, -0.019935597, 0.0032809353) + rel physics:simulationOwner + + over "collisions" + { + over "p1" ( + instanceable = false + ) + { + over "mesh_15" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.507, 0.0984, 0.0291) + float3 physics:diagonalInertia = (0.06162617, 1.8500001, 1.8004737) + float physics:mass = 19.9 + quatf physics:principalAxes = (0.9999654, 0.0009766934, 0.0082539525, 0.0000118189455) + rel physics:simulationOwner + + over "collisions" + { + over "p2" ( + instanceable = false + ) + { + over "mesh_17" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m900ia150p/payloads/Physics/physx.usda b/fanuc_m900ia150p/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..cdbaf7fe8792ca6dd1ee78a72897a5acc37fb747 --- /dev/null +++ b/fanuc_m900ia150p/payloads/Physics/physx.usda @@ -0,0 +1,97 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia150p" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m900ia150p" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 164.99998 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m900ia150p/payloads/Sensor/none.usda b/fanuc_m900ia150p/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..8e91146adb04bd50b3b380ea2016a9a90292b7d3 --- /dev/null +++ b/fanuc_m900ia150p/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia150p" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ia150p" +{ +} + diff --git a/fanuc_m900ia150p/payloads/Sensor/sensors.usda b/fanuc_m900ia150p/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..5cbd384768ed90e0a8b7ae9091dda9455a4f3c2b --- /dev/null +++ b/fanuc_m900ia150p/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia150p" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ia150p" +{ +} + diff --git a/fanuc_m900ia150p/payloads/base.usda b/fanuc_m900ia150p/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..cfc356bd8dce8502856864adc80472cfeb30f7fa --- /dev/null +++ b/fanuc_m900ia150p/payloads/base.usda @@ -0,0 +1,450 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia150p" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m900ia150p" +{ + 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 "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.6499999761581421) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.6499999761581421) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.7699999809265137, 0, 0.6499999761581421) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.8199999332427979, 0, 0.6499999761581421) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (2.0199999809265137, 0, 0.6499999761581421) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (2.0199999809265137, 0, -1.0550000667572021) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (2.0199999809265137, 0, -1.0550000667572021) + 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.27000001072883606) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.7699999809265137, 0, 0.6499999761581421) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.7699999809265137, 0, 1.0499999523162842) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ia150p/payloads/geometries.usd b/fanuc_m900ia150p/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..1f5614b923c6abfe8b055ab6328023f7228fcf51 --- /dev/null +++ b/fanuc_m900ia150p/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a1bb4509a4af008901d246d6baa2edb181bace9e403d11daad727aa9e1101d6 +size 4178130 diff --git a/fanuc_m900ia150p/payloads/instances.usda b/fanuc_m900ia150p/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..6d81601fd904d4a6a00886529e40ded03537a3a4 --- /dev/null +++ b/fanuc_m900ia150p/payloads/instances.usda @@ -0,0 +1,1370 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_1" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7333333, 0.7333333, 0.7333333) + 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_3" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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_4" ( + 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_5" ( + 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_6" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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_5" ( + 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_6" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_8" ( + 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_9" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 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_10" ( + 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_11" ( + 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_4" ( + 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_5" ( + 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_6" ( + 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_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" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_5" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_5" ( + 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_12" ( + 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_6" ( + 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_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 "Material_12" ( + 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", "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_14" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_14" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_5" ( + 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_12" ( + 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_6" ( + 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_15" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_15" ( + 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_16" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_16" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_5" ( + 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 "mesh_17" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_17" ( + 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/fanuc_m900ia150p/payloads/materials.usda b/fanuc_m900ia150p/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..7e6431488d8e7b676e7552f281d755e91020a4fe --- /dev/null +++ b/fanuc_m900ia150p/payloads/materials.usda @@ -0,0 +1,1793 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_0" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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" + 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_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" + ) + 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 "Material_1" ( + 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" + 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 = "steel" + 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 "Material_2" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_1" ( + 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.7333333, 0.7333333, 0.7333333) ( + 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.7333333, 0.7333333, 0.7333333) + 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_3" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_2" ( + 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.8000001, 0.8000001, 0.8000001) ( + 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.8000001, 0.8000001, 0.8000001) + 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_4" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_3" ( + 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) ( + 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, 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_5" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_4" ( + 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) ( + 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, 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_6" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_5" ( + 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" + 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_9" + { + 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 "Material_1" ( + 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.8000001, 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.8000001, 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_10" + { + 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 "Material_2" ( + 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" + 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 = "steel" + 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 "Material_3" ( + 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) ( + 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, 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/fanuc_m900ia150p/payloads/robot.usda b/fanuc_m900ia150p/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..83e76d2027b9fc38eab35042b487ea39ea29aa2f --- /dev/null +++ b/fanuc_m900ia150p/payloads/robot.usda @@ -0,0 +1,202 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia150p" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ia150p" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + + over "P2_01" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m900ia150p/runnables/physics/mujoco.usda b/fanuc_m900ia150p/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..655008cf69f5e8cdc9f0d91b4b5c5c7ce3739401 --- /dev/null +++ b/fanuc_m900ia150p/runnables/physics/mujoco.usda @@ -0,0 +1,296 @@ +#usda 1.0 +( + defaultPrim = "m900ia150p" +) + +def "m900ia150p" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2_01" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m900ia150p_joints_J1" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ia150p_joints_J2" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ia150p_joints_J3" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ia150p_joints_J4" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5000 + double mjc:forceRange:min = -5000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ia150p_joints_J5" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5000 + double mjc:forceRange:min = -5000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ia150p_joints_J6" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 3000 + double mjc:forceRange:min = -3000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m900ia150p/runnables/physics/newton.usda b/fanuc_m900ia150p/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..d9bd92e195a49d8288e87ef7b14966e15126ec00 --- /dev/null +++ b/fanuc_m900ia150p/runnables/physics/newton.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m900ia150p" +) + +over "m900ia150p" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] + ) + { + bool newton:selfCollisionEnabled = 0 + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 10227.273 + float newton:damping = 340.90912 + float newton:velocityLimit = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 35526.316 + float newton:damping = 394.73685 + float newton:velocityLimit = 95 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 35526.316 + float newton:damping = 394.73685 + float newton:velocityLimit = 95 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1973.6842 + float newton:damping = 65.789474 + float newton:velocityLimit = 95 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1973.6842 + float newton:damping = 65.789474 + float newton:velocityLimit = 95 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 681.8182 + float newton:damping = 22.727276 + float newton:velocityLimit = 164.99998 + } + + over "P1" ( + prepend apiSchemas = ["NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = 0 + float newton:mimicCoef1 = -1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + uniform bool physics:excludeFromArticulation = 0 + } + + over "P2" ( + prepend apiSchemas = ["NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = -0 + float newton:mimicCoef1 = 1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + } + + over "P2_01" + { + uniform bool physics:excludeFromArticulation = 1 + } + } +} + diff --git a/fanuc_m900ia150p/runnables/physics/physx.usda b/fanuc_m900ia150p/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..e325c776c127295400b407ccf9820fb9654826b4 --- /dev/null +++ b/fanuc_m900ia150p/runnables/physics/physx.usda @@ -0,0 +1,229 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia150p" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ia150p" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 164.99998 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/fanuc_m900ia200p/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m900ia200p/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..50ae4c1c896861203e6dd0308374ea2c4bdf0228 --- /dev/null +++ b/fanuc_m900ia200p/.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:20", + "assets": [ + { + "asset": "m900ia200p.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/fanuc_m900ia200p/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m900ia200p/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..ac99a65e7df5b4e830e213bade5b8d316f1c4c29 --- /dev/null +++ b/fanuc_m900ia200p/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7624, + "hash": { + "sha256-flat-1mb": "a7577552d107bba3e2e88d4ac9ab06b285605519e0862fae0b43938aa7c0c137", + "sha256": "a6b7af64162fcc6026569f04d9a8f12e4ed432f6656a6941803c8a52a87b74ed" + } + }, + { + "relative_path": ".thumbs/256x256/.m900ia200p.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "f190fd22f012fd297123cc67304a0057a137edbe37361b14ebac8dc1a71caf2d", + "sha256": "4ddcc3fb3c9ff7b2cb7282bdf9328b1c0a1b9ce765cea247c1a4c8d9f27663dc" + } + }, + { + "relative_path": ".thumbs/256x256/m900ia200p.usda.png", + "size": 45671, + "hash": { + "sha256-flat-1mb": "9342775c73c5e2cf4ab008ca36e5c2a05b19cdba4754a9e39b3e5d0dfccc1edf", + "sha256": "34b799252f57e0a71e6c99789529878791a4e4477f6ae329ac94db22df5589a1" + } + }, + { + "relative_path": ".thumbs/m900ia200p.thumb.usd", + "size": 6127, + "hash": { + "sha256-flat-1mb": "97085bdd22d4f24fef77ebe3acff03199009e1db08c2e952be3550a700ab63e6", + "sha256": "0740d1c05f0e1b475bdb86459347c0ee0ab46c142a23a9e495202de577fc60dd" + } + }, + { + "relative_path": "m900ia200p.usda", + "size": 16601, + "hash": { + "sha256-flat-1mb": "89343e8c85381947ca75af0dd3deeac75816fefb7c2cc559bb2cf4385334af23", + "sha256": "5517101439b2d166e4238c9b8af107440110f4fb119beb4e1f8376f2788866ce" + } + }, + { + "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": 3713, + "hash": { + "sha256-flat-1mb": "0aad7887ac08a4bfd39660df669715af717080adbc1708e8dc7c1834b4430ba7", + "sha256": "f35fc5d450f70f4a7ffc2f76b16f166a1919f197e3171b5f4c19f9d031890646" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "989434ae0204adfae371573e14d404978c60e898573fbd832e3e49495b751238", + "sha256": "0244ce805be04f1fb35d52ea385fecc79be61a57d12636bc874bd671a13bd1c1" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 16254, + "hash": { + "sha256-flat-1mb": "24b6c052da75e7c74ee027d3145205f4685eabccce4f17406408716f76b5598b", + "sha256": "9f5310e168b63783a9ceefbe304d116c0698a27b2ee3b20dfa36090be6c01404" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 2393, + "hash": { + "sha256-flat-1mb": "6e2ba93240755e77b1631d604fe725cfcddb3adddfa2e1a95b3ea6b78bc14eed", + "sha256": "c00470a0eaff0fa9059dc0aff96c7ec1907cc9035d789f44cbca1aba33ce5a21" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "989434ae0204adfae371573e14d404978c60e898573fbd832e3e49495b751238", + "sha256": "0244ce805be04f1fb35d52ea385fecc79be61a57d12636bc874bd671a13bd1c1" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 143, + "hash": { + "sha256-flat-1mb": "10450c02f24044b4ea51db3757def8675ad7a5ced9b41f0758ffd256a5e895e1", + "sha256": "5f5b7cbd031671c7d544d60abe2db32ce8b4a88c77585c4268afeb54290da88a" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 14103, + "hash": { + "sha256-flat-1mb": "247fe7c877de78efa259bda8fbac6d93610b068cdf8f1d65ab07507fd9a24252", + "sha256": "327d3afc4ed17463afd688c6c8a6522c85011774f83ba2bac150bec813928511" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 6113504, + "hash": { + "sha256-flat-1mb": "b50bbb7da4ab8b44327ff2f6bcb79ed3a1eec098a7fd1c6fe102abc26574d5f0", + "sha256": "c0c92a43ff9ad54cb27d1a591ae7178b1617edfad3e8b2250392f8630b360240", + "sha256-first1m": "8b5e28365251bde1094a3ab7e0257821f30185b4ffd205278f01ef2d51eae175" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 59028, + "hash": { + "sha256-flat-1mb": "673322521aefac96b74baf5d9c8dda0eacebabdda743b744a9161ed27e2507f9", + "sha256": "2d106f458981d39a6546d40e32d7f319bedf3c6b8ad3013bf5141900c6dd6699" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 80853, + "hash": { + "sha256-flat-1mb": "897069b39f47f07521f5f8be249c9c89ce6b8c977a1f5a0052241d3410b8765b", + "sha256": "a9c92841abd9978c2321aeedff623e427bdcb3a6597b67b1f05435b5641a26ce" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 4171, + "hash": { + "sha256-flat-1mb": "f7ee1b2a2363bb5cb72ad3e3b8a8a8ccde98f415d232a364ea0c72ff47b1a0b6", + "sha256": "fb17a83c839ecf09359688185b560233eff4a8271dfb34f1e4353a58278f2468" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 9191, + "hash": { + "sha256-flat-1mb": "ebb113ebcb101ca92d0ef3c2aa6600af2a54b588e4404f0a37f5651f75893fd4", + "sha256": "0daf1e1d9bf6708e5e57a073ef49e4bfc5359b4a427a7a231c49db4fdfe05893" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 6700, + "hash": { + "sha256-flat-1mb": "f87d171327dc8ff23887a1f0fad6fdcf84b96986e37543f5af513b1e04effc87", + "sha256": "f3dd43538f2d2a9d2c93372ef612608dace920551a99dd69afd41f4170a46813" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 5135, + "hash": { + "sha256-flat-1mb": "8b5d77c0396a18e12515c83be32f507ebd8be154d0ab4c33f0e1946e5a741776", + "sha256": "dbbdcd0dc89a531041c6d83d672521f6cd4e6ec400f6867368ed65974ba5b430" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m900ia200p/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m900ia200p/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..0f2b29a1993c6198f59022c118376dfdd842aef8 --- /dev/null +++ b/fanuc_m900ia200p/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m900ia200p.usda" + ] +} diff --git a/fanuc_m900ia200p/.metadata/license.txt b/fanuc_m900ia200p/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m900ia200p/.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/fanuc_m900ia200p/.simready/validation.json b/fanuc_m900ia200p/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fa9d519c7115ed3d699ca78e5a7960d0f7409003 --- /dev/null +++ b/fanuc_m900ia200p/.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/fanuc_m900ia200p/.thumbs/256x256/.m900ia200p.usda.last_generated b/fanuc_m900ia200p/.thumbs/256x256/.m900ia200p.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..918b80cb9e9b4352d306a2694ba8758aa568e941 --- /dev/null +++ b/fanuc_m900ia200p/.thumbs/256x256/.m900ia200p.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:31:05 \ No newline at end of file diff --git a/fanuc_m900ia200p/.thumbs/256x256/m900ia200p.usda.png b/fanuc_m900ia200p/.thumbs/256x256/m900ia200p.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..cb472653717d6c3eccdbd9690b288579c85a22f8 --- /dev/null +++ b/fanuc_m900ia200p/.thumbs/256x256/m900ia200p.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34b799252f57e0a71e6c99789529878791a4e4477f6ae329ac94db22df5589a1 +size 45671 diff --git a/fanuc_m900ia200p/.thumbs/m900ia200p.thumb.usd b/fanuc_m900ia200p/.thumbs/m900ia200p.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..08fd2259ce82480e982b6f34fb1ed3c9619b7a52 Binary files /dev/null and b/fanuc_m900ia200p/.thumbs/m900ia200p.thumb.usd differ diff --git a/fanuc_m900ia200p/com.nvidia.simready.packaging.json b/fanuc_m900ia200p/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..bc992d6fa43cb60da3ef379361089af7ff072bec --- /dev/null +++ b/fanuc_m900ia200p/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m900ia200p.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "3272e7c14cbbf7491ce7460cc83127a91b2a46f209f94db498bd780e24d58185" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "8ca252a113fe0885f58ef52954791e4fdd9e01314305831d691b80626e56cf5c" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "237f97ee17306a85992a8513d9451343c7307eecfd4022aac6ee64ecfbc604cb" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "22e871ef5df971115ea4accade8ef3dc7cf4eb7bac40162e60e2bb4c499f234a" + }, + "package_hash": { + "sha256": "831d4e4128d2bfaaa5d0bc4bfb07968c1aa7612dbbd64645982e1e1a70ceaa85" + } +} diff --git a/fanuc_m900ia200p/m900ia200p.usda b/fanuc_m900ia200p/m900ia200p.usda new file mode 100644 index 0000000000000000000000000000000000000000..ba53d259904412a62ca76d39b42fb6521f608ec6 --- /dev/null +++ b/fanuc_m900ia200p/m900ia200p.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m900ia200p" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m900ia200p" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m900ia200p" + 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']" + string "optional requirements" = "['com.nvidia.simready.MUJOCO.DJ.002']" + bool passed = 0 + 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 = (3.0684056, 1.4980067, 2.5931928) + string asset_license = "CC-BY-4.0" + string asset_name = "m900ia200p" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 2666.8199973106384 + string qcode = "Q40687" + int rigid_body_count = 9 + string source_file = "Fanuc/m900ia200p/m900ia200p.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m900ia200p" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ia200p" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" + { + token visibility = "invisible" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" + { + token visibility = "invisible" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" + { + 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/fanuc_m900ia200p/materials/mdl/LICENSE.md b/fanuc_m900ia200p/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m900ia200p/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/fanuc_m900ia200p/materials/mdl/OmniPBR.mdl b/fanuc_m900ia200p/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m900ia200p/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/fanuc_m900ia200p/materials/mdl/OmniPBRBase.mdl b/fanuc_m900ia200p/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m900ia200p/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/fanuc_m900ia200p/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m900ia200p/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m900ia200p/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/fanuc_m900ia200p/materials/mdl/aux_definitions.mdl b/fanuc_m900ia200p/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m900ia200p/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/fanuc_m900ia200p/materials/mdl/core_definitions.mdl b/fanuc_m900ia200p/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m900ia200p/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/fanuc_m900ia200p/materials/mdl/support_definitions.mdl b/fanuc_m900ia200p/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m900ia200p/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/fanuc_m900ia200p/payloads/Physics/mujoco.usda b/fanuc_m900ia200p/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..063e59416f8c95bde6e57902f99fc3cfac934814 --- /dev/null +++ b/fanuc_m900ia200p/payloads/Physics/mujoco.usda @@ -0,0 +1,251 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ia200p" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "P2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P2_01" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "P1_link" + { + over "visuals" + { + over "p1" + { + } + } + + over "collisions" + { + over "p1" + { + } + } + } + + over "P2_link" + { + over "visuals" + { + over "p2" + { + } + } + + over "collisions" + { + over "p2" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ia200p/payloads/Physics/none.usda b/fanuc_m900ia200p/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..d76ef4ae751a3c056159f841e685dc513f197674 --- /dev/null +++ b/fanuc_m900ia200p/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia200p" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ia200p" +{ +} + diff --git a/fanuc_m900ia200p/payloads/Physics/physics.usda b/fanuc_m900ia200p/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..bff71de4d2a6e9a1c1e65ad7e8e5a462e6c18b47 --- /dev/null +++ b/fanuc_m900ia200p/payloads/Physics/physics.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia200p" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ia200p" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 50000 + float drive:angular:physics:stiffness = 25000 + 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 = 195.83205 + point3f physics:localPos0 = (0, 0, 0.75) + 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 "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 1134.5736 + point3f physics:localPos0 = (0.77, 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 = -120 + float physics:upperLimit = 60 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 1142.9994 + point3f physics:localPos0 = (1.05, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -66 + float physics:upperLimit = 66 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 6000 + float drive:angular:physics:stiffness = 25000 + 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 = 353.35416 + point3f physics:localPos0 = (0.2, 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 = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 7000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 270.44446 + point3f physics:localPos0 = (0, 0, -1.705) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -115 + float physics:upperLimit = 115 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 8000 + float drive:angular:physics:stiffness = 25000 + 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.6381047 + point3f physics:localPos0 = (0, 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 = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "P1" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + uniform bool physics:excludeFromArticulation = 1 + float physics:JointEquivalentInertia = 19.202143 + point3f physics:localPos0 = (0, 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 = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 14.78739 + point3f physics:localPos0 = (0, 0, 0.4) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2_01" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 14.78739 + point3f physics:localPos0 = (1.05, 0, 0) + point3f physics:localPos1 = (0, 0, 0.39999998) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -92.4 + float physics:upperLimit = 92.4 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.0758, 0.0000122, 0.156) + float3 physics:diagonalInertia = (16.497551, 25.89999, 36.102455) + float physics:mass = 336 + quatf physics:principalAxes = (0.9999843, -0.0005411032, -0.0055857804, -0.00018615852) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.25, -0.0199, -0.067) + float3 physics:diagonalInertia = (190.35968, 348.5305, 439.10986) + float physics:mass = 1560 + quatf physics:principalAxes = (0.9986351, -0.012904049, -0.0074654827, 0.050058525) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.434, -0.051, -0.0185) + float3 physics:diagonalInertia = (7.714151, 37.029404, 38.146446) + float physics:mass = 292 + quatf physics:principalAxes = (0.99362874, -0.10173139, -0.0069369553, 0.048005894) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.174, 0.00217, -0.366) + float3 physics:diagonalInertia = (92.94763, 94.20534, 6.087035) + float physics:mass = 324 + quatf physics:principalAxes = (0.999462, -0.0010393562, -0.01230355, -0.030384835) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-3.02e-15, -0.000489, -1.62) + float3 physics:diagonalInertia = (0.303, 0.30416143, 0.16483855) + float physics:mass = 23.3 + quatf physics:principalAxes = (0.9998551, -0.017023174, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-1.04e-17, -0.0244, -0.0802) + float3 physics:diagonalInertia = (1.2, 1.0565699, 0.7454301) + float physics:mass = 54.8 + quatf physics:principalAxes = (0.98033947, 0.19731882, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (1.64e-17, -1.02e-8, -0.306) + float3 physics:diagonalInertia = (0.0265, 0.0265, 0.0518) + float physics:mass = 4.52 + quatf physics:principalAxes = (1, 0, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.00242, 0.175, 0.124) + float3 physics:diagonalInertia = (1.4407097, 1.88913, 0.68316025) + float physics:mass = 52.3 + quatf physics:principalAxes = (0.99683017, 0.07790506, -0.015891008, 0.0028370465) + rel physics:simulationOwner + + over "collisions" + { + over "p1" ( + instanceable = false + ) + { + over "mesh_15" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.508, 0.0982, 0.0286) + float3 physics:diagonalInertia = (0.060951684, 1.8500046, 1.8104438) + float physics:mass = 19.9 + quatf physics:principalAxes = (0.9999535, 0.005389795, 0.008004036, 0.000056041103) + rel physics:simulationOwner + + over "collisions" + { + over "p2" ( + instanceable = false + ) + { + over "mesh_17" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m900ia200p/payloads/Physics/physx.usda b/fanuc_m900ia200p/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..566bfcbe8e1a4a2b26f6b438b4e7ac3beb2d707c --- /dev/null +++ b/fanuc_m900ia200p/payloads/Physics/physx.usda @@ -0,0 +1,97 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia200p" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m900ia200p" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 164.99998 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m900ia200p/payloads/Sensor/none.usda b/fanuc_m900ia200p/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..d76ef4ae751a3c056159f841e685dc513f197674 --- /dev/null +++ b/fanuc_m900ia200p/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia200p" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ia200p" +{ +} + diff --git a/fanuc_m900ia200p/payloads/Sensor/sensors.usda b/fanuc_m900ia200p/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6c1db889387176dec1f515e8816b760e49d84c3 --- /dev/null +++ b/fanuc_m900ia200p/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia200p" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ia200p" +{ +} + diff --git a/fanuc_m900ia200p/payloads/base.usda b/fanuc_m900ia200p/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..2bd1dd9108dc6e7bf58b7c20de50eb66df4c4958 --- /dev/null +++ b/fanuc_m900ia200p/payloads/base.usda @@ -0,0 +1,450 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia200p" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m900ia200p" +{ + 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 "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.75) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.75) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.7699999809265137, 0, 0.75) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.8199999332427979, 0, 0.75) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (2.0199999809265137, 0, 0.75) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (2.0199999809265137, 0, -0.9550000429153442) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (2.0199999809265137, 0, -0.9550000429153442) + 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.32499998807907104) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.7699999809265137, 0, 0.75) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.7699999809265137, 0, 1.149999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ia200p/payloads/geometries.usd b/fanuc_m900ia200p/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..05c2327afe082329c52b2b997fcc8ca336165e9c --- /dev/null +++ b/fanuc_m900ia200p/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0c92a43ff9ad54cb27d1a591ae7178b1617edfad3e8b2250392f8630b360240 +size 6113504 diff --git a/fanuc_m900ia200p/payloads/instances.usda b/fanuc_m900ia200p/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..e7a82fdace5de71c44ec1a82e46aa6ea2b8deb87 --- /dev/null +++ b/fanuc_m900ia200p/payloads/instances.usda @@ -0,0 +1,1673 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7333333, 0.7333333, 0.7333333) + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8666667, 0.6666667, 0.3333333) + 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_2" ( + 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_3" ( + 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_4" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7333333, 0.7333333, 0.7333333) + 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_5" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.9333334, 0.9333334, 0.9333334) + 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_6" ( + 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_7" ( + 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_3" ( + 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_8" ( + 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_9" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6666667, 0.7333333, 0.8666667) + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_9" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6666667, 0.7333333, 0.8666667) + 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_7" ( + 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_3" ( + 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_8" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_7" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + 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, 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_11" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 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_0" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7333333, 0.7333333, 0.7333333) + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8666667, 0.6666667, 0.3333333) + 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_6" ( + 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_7" ( + 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_3" ( + 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_8" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + 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.7333333, 0.5333334, 0.06666667) + 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_7" ( + 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_8" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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_3" ( + 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_8" ( + 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 "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" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_3" ( + 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_8" ( + 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 "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 + } + } + } + } + + def Xform "mesh_14" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_14" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_9" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6666667, 0.7333333, 0.8666667) + 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_7" ( + 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_3" ( + 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_15" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_15" ( + 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_16" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_16" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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 "mesh_17" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_17" ( + 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/fanuc_m900ia200p/payloads/materials.usda b/fanuc_m900ia200p/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..fd5e5c568cb2481c392ea69777fc7b20cc8457fc --- /dev/null +++ b/fanuc_m900ia200p/payloads/materials.usda @@ -0,0 +1,2279 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_0" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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.7333333, 0.7333333, 0.7333333) ( + 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.7333333, 0.7333333, 0.7333333) + 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_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" + ) + 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 "Material_1" ( + 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.8666667, 0.6666667, 0.3333333) ( + 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.8666667, 0.6666667, 0.3333333) + 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_2" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_2" ( + 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" + 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_3" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_3" ( + 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" + 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_4" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_4" ( + 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" + 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 = "steel" + 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 "Material_5" + { + 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 "Material_1" ( + 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.9333334, 0.9333334, 0.9333334) ( + 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.9333334, 0.9333334, 0.9333334) + 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_6" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_2" ( + 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) ( + 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, 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_7" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_3" ( + 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) ( + 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, 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_8" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_5" ( + 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) ( + 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, 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_9" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_6" ( + 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.6666667, 0.7333333, 0.8666667) ( + 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.6666667, 0.7333333, 0.8666667) + 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 = "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 "Material_0" ( + 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" + 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 = "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 "Material_1" ( + 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.8000001, 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.8000001, 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 = "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 "Material_0" ( + 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.7333333, 0.5333334, 0.06666667) ( + 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.7333333, 0.5333334, 0.06666667) + 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/fanuc_m900ia200p/payloads/robot.usda b/fanuc_m900ia200p/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..85a3fcc1404cd835a21e709ba1fb9d9e55d77b3d --- /dev/null +++ b/fanuc_m900ia200p/payloads/robot.usda @@ -0,0 +1,202 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia200p" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ia200p" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + + over "P2_01" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m900ia200p/runnables/physics/mujoco.usda b/fanuc_m900ia200p/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..f31fd3ba4c7f4dac16457fe26c19d3ff2d67b66e --- /dev/null +++ b/fanuc_m900ia200p/runnables/physics/mujoco.usda @@ -0,0 +1,296 @@ +#usda 1.0 +( + defaultPrim = "m900ia200p" +) + +def "m900ia200p" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2_01" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m900ia200p_joints_J1" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 50000 + double mjc:forceRange:min = -50000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ia200p_joints_J2" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ia200p_joints_J3" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ia200p_joints_J4" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 6000 + double mjc:forceRange:min = -6000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ia200p_joints_J5" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 7000 + double mjc:forceRange:min = -7000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ia200p_joints_J6" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 8000 + double mjc:forceRange:min = -8000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m900ia200p/runnables/physics/newton.usda b/fanuc_m900ia200p/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..0fd775f87222585215f95941843ff06ba19298e8 --- /dev/null +++ b/fanuc_m900ia200p/runnables/physics/newton.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m900ia200p" +) + +over "m900ia200p" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] + ) + { + bool newton:selfCollisionEnabled = 0 + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 17045.455 + float newton:damping = 568.1819 + float newton:velocityLimit = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 11842.105 + float newton:damping = 394.73685 + float newton:velocityLimit = 95 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 11842.105 + float newton:damping = 394.73685 + float newton:velocityLimit = 95 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2368.421 + float newton:damping = 78.947365 + float newton:velocityLimit = 95 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2763.158 + float newton:damping = 92.10526 + float newton:velocityLimit = 95 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1818.182 + float newton:damping = 60.606068 + float newton:velocityLimit = 164.99998 + } + + over "P1" ( + prepend apiSchemas = ["NewtonJointAPI", "NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = -0 + float newton:mimicCoef1 = -1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + uniform bool physics:excludeFromArticulation = 0 + } + + over "P2" ( + prepend apiSchemas = ["NewtonJointAPI", "NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = -0 + float newton:mimicCoef1 = 1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + } + + over "P2_01" + { + uniform bool physics:excludeFromArticulation = 1 + } + } +} + diff --git a/fanuc_m900ia200p/runnables/physics/physx.usda b/fanuc_m900ia200p/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..f4f998fe208d20feefd7de6bcee51cd75ec07788 --- /dev/null +++ b/fanuc_m900ia200p/runnables/physics/physx.usda @@ -0,0 +1,229 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ia200p" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ia200p" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 95 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 164.99998 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/fanuc_m900ib280/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m900ib280/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..56dc7bb2a0908147f050bff127de95cb7f8660f0 --- /dev/null +++ b/fanuc_m900ib280/.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:20", + "assets": [ + { + "asset": "m900ib280.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/fanuc_m900ib280/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m900ib280/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..232f73b175f4ffe2267c3c75a8a9641a83dac825 --- /dev/null +++ b/fanuc_m900ib280/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7624, + "hash": { + "sha256-flat-1mb": "a7577552d107bba3e2e88d4ac9ab06b285605519e0862fae0b43938aa7c0c137", + "sha256": "a6b7af64162fcc6026569f04d9a8f12e4ed432f6656a6941803c8a52a87b74ed" + } + }, + { + "relative_path": ".thumbs/256x256/.m900ib280.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "61e388f866955f4562469b970e8b42ed91f1e30f365c8e375ee1533c6a262314", + "sha256": "bc752847d02f926333c2303f99efed37da35a449c3d5206a00a0e8d90bd6dd95" + } + }, + { + "relative_path": ".thumbs/256x256/m900ib280.usda.png", + "size": 44508, + "hash": { + "sha256-flat-1mb": "722daebc20489622299cbb51caf0909788ed3facff8faf277a3ebdc34f0bf173", + "sha256": "135d5fbb5ea331e05dba125e194d56520d3edec65bdfa6705433ea9e952ba54e" + } + }, + { + "relative_path": ".thumbs/m900ib280.thumb.usd", + "size": 6126, + "hash": { + "sha256-flat-1mb": "a110321609101d7d909b5cb526ec032307c03de48aadf511952492b56c9f7004", + "sha256": "0feb9358a98de0a488c77ee3a3a862e48e025be2d63a54ff93ca5a6ad873bae2" + } + }, + { + "relative_path": "m900ib280.usda", + "size": 18433, + "hash": { + "sha256-flat-1mb": "f14e8bbd53e46c27b3fb820b8862c900345157f0eb47e5b10c79da6c77a5bd43", + "sha256": "6c737fcc8e07c05eda4c1f5b3990afeca1febf2eae71708dc97ed07a1ac3fc40" + } + }, + { + "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": 3712, + "hash": { + "sha256-flat-1mb": "db1524b32937a9c132abc73188929bf4db2c22481e32bb88daa30d870504b064", + "sha256": "b0af334888b1749fc2d55201f5363ad8a0115fc9fe207178152b3309222b9b8b" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 135, + "hash": { + "sha256-flat-1mb": "bddcf02219cc635e30b07ed049a438d0f8304f3a3e0142adc406058326231cc1", + "sha256": "d4c3628189f562117e0ac53b063244686b5c23b229e7224bcfb829ed4492d716" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 16275, + "hash": { + "sha256-flat-1mb": "4e990afc1c028c71eae6826801d46efe7a08bd6a083cef41de0c5fe51f37ff7b", + "sha256": "ecd4d591edb5beca8322819f6d3efcc1e58728257a5a765d581066f690e1b228" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 2416, + "hash": { + "sha256-flat-1mb": "a9843e0a9b71fad847f5730abf1e82e37209e7b3c3d30905d56bdd4fe3546f33", + "sha256": "eac034c769b3deeaab65999fb2b8f94b2a9f8738e0aa132ad9fec13c41271d71" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 135, + "hash": { + "sha256-flat-1mb": "bddcf02219cc635e30b07ed049a438d0f8304f3a3e0142adc406058326231cc1", + "sha256": "d4c3628189f562117e0ac53b063244686b5c23b229e7224bcfb829ed4492d716" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 141, + "hash": { + "sha256-flat-1mb": "4241bc85f4710acd3999f1aec383e466fff813d64c87cbe06705c59a2218a729", + "sha256": "a1d53c8308b421c38e96862375685c9cfc5d6068f54bc8b5bc1b45eae80dfa45" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 14257, + "hash": { + "sha256-flat-1mb": "81eefa090575bf82bfebb7742d36c0061c75217669d0f556156887f777817230", + "sha256": "fb03c7e84816ede0090c97297f961dc628d4aefc89b1640c9995668fb0da1b88" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 6084515, + "hash": { + "sha256-flat-1mb": "d5cf9dd600a606708e43fbb7484a6200a61f704b9945c181cc9301ccef16a361", + "sha256": "3f676e5efdbce070dd67031b74e3b13597b038d9737363bce954a7584fc9922e", + "sha256-first1m": "9c4ac52ac85d0ee1eb40b51e0646111da16ebdf40b14df4e7ac5737acce7d6d2" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 47890, + "hash": { + "sha256-flat-1mb": "be8d453e7f7f5e803f9df802e04e12dcb51b3d0b8c8a91667293c1a1dd4ff1e4", + "sha256": "7db683757134ceb7d6fef605d0ff008d47289e15f8ec309ecb2a2a3abe0f7b06" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 63591, + "hash": { + "sha256-flat-1mb": "be53531dcd9165f907702129887d4b7b619f9e644af5f749b49f43538844c006", + "sha256": "5ddcb9827e8802d5c0d288c4a3a2d7615a725b720eaa925f753591339f92b076" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 4151, + "hash": { + "sha256-flat-1mb": "c7c23b7cfeb2a52a4b03888df467ee1a2ac0aafefd594b3fedb3943258936ea0", + "sha256": "78c158d9402f91aa6af36482ceadb3e0a10196f9f287147ec52642976dba9141" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 9177, + "hash": { + "sha256-flat-1mb": "de5ccbe17dd45e5a5f36d2f76fcb493d29609c7914773da6b812a7200df1f8db", + "sha256": "2ce9b5544e58e0a5f08778108b994b704998d5198297fb6935c033df3445cb22" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 6688, + "hash": { + "sha256-flat-1mb": "30bdfed9df726cfb7057a8f8d8d96610013d4ceea21e2d306eb1e4862ee403a3", + "sha256": "739059334fdfa9de6feef537bc6cb624fd9fef2511fc75e4e5ba2479c6302c6e" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 5158, + "hash": { + "sha256-flat-1mb": "5ac0d664b34e4b8c052aa7e9649387d3f3427b4c2628c9fb977bebfaaf011f62", + "sha256": "ff4559f8ab843a9d8ade10e53918db38eb48cf2b4cccac6ef65b77095d5c562c" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m900ib280/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m900ib280/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..cfa7de6b8d7ff44604b6ec57f2b2d1b7ed676e01 --- /dev/null +++ b/fanuc_m900ib280/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m900ib280.usda" + ] +} diff --git a/fanuc_m900ib280/.metadata/license.txt b/fanuc_m900ib280/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m900ib280/.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/fanuc_m900ib280/.simready/validation.json b/fanuc_m900ib280/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fa9d519c7115ed3d699ca78e5a7960d0f7409003 --- /dev/null +++ b/fanuc_m900ib280/.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/fanuc_m900ib280/.thumbs/256x256/.m900ib280.usda.last_generated b/fanuc_m900ib280/.thumbs/256x256/.m900ib280.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..0ee8578bc898197f7b4a85a1153b870f0e5ccf22 --- /dev/null +++ b/fanuc_m900ib280/.thumbs/256x256/.m900ib280.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:31:09 \ No newline at end of file diff --git a/fanuc_m900ib280/.thumbs/256x256/m900ib280.usda.png b/fanuc_m900ib280/.thumbs/256x256/m900ib280.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..7e1967dc401161eca0dc44d88a9939e423e42ebe --- /dev/null +++ b/fanuc_m900ib280/.thumbs/256x256/m900ib280.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:135d5fbb5ea331e05dba125e194d56520d3edec65bdfa6705433ea9e952ba54e +size 44508 diff --git a/fanuc_m900ib280/.thumbs/m900ib280.thumb.usd b/fanuc_m900ib280/.thumbs/m900ib280.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..0dbb53231caf557769b7ff71f23c8e61383c1c01 Binary files /dev/null and b/fanuc_m900ib280/.thumbs/m900ib280.thumb.usd differ diff --git a/fanuc_m900ib280/com.nvidia.simready.packaging.json b/fanuc_m900ib280/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..db3641f4e4774703ff1b799229b94e2835169dcb --- /dev/null +++ b/fanuc_m900ib280/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m900ib280.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "fec71f10c7b7838f320effe78b80a82a47216441e49d1574fbbd3dc0ab3fb718" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "489a6112d10613b54f69f3b1b4da37a685934c3f29ac958b3ed947bd67ea80d6" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "2e5d11025b593660ec931ac6a50a50478c517127a661e88c5bdebd4bb4158c7c" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "a233908586f36e08c8c0d66b3a0c8f6d102179f0a4521019f368d3010cd85122" + }, + "package_hash": { + "sha256": "3601e3c33838d5c4e392fc9b84f5e862fcd63f278ee7de7da1ce26b96984036a" + } +} diff --git a/fanuc_m900ib280/m900ib280.usda b/fanuc_m900ib280/m900ib280.usda new file mode 100644 index 0000000000000000000000000000000000000000..9eb7900213c1edf6920feeb3b40a60fd8e7388a2 --- /dev/null +++ b/fanuc_m900ib280/m900ib280.usda @@ -0,0 +1,478 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m900ib280" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m900ib280" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m900ib280" + 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']" + string "optional requirements" = "['com.nvidia.simready.MUJOCO.DJ.002']" + bool passed = 0 + 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 = (2.6061, 1.2516073, 2.2580042) + string asset_license = "CC-BY-4.0" + string asset_name = "m900ib280" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 1699.1400003433228 + string qcode = "Q40687" + int rigid_body_count = 9 + string source_file = "Fanuc/m900ib280/m900ib280.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m900ib280" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ib280" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ) + uniform token[] xformOpOrder = ["xformOp:transform"] + + over "robot_base" + { + matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0.05665157866761006, 1) ) + uniform token[] xformOpOrder = ["xformOp:transform"] + + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "J1_link" + { + matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0.906651602509468, 1) ) + uniform token[] xformOpOrder = ["xformOp:transform"] + + over "collisions" + { + over "j1" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "J2_link" + { + matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0.3700000047683716, 0, 0.906651602509468, 1) ) + uniform token[] xformOpOrder = ["xformOp:transform"] + + over "collisions" + { + over "j2" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "J3_link" + { + matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0.3700000047683716, 0, 1.9566515548257521, 1) ) + uniform token[] xformOpOrder = ["xformOp:transform"] + + over "collisions" + { + over "j3" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "J4_link" + { + matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0.3700000047683716, 0, 2.1566514833001786, 1) ) + uniform token[] xformOpOrder = ["xformOp:transform"] + + over "collisions" + { + over "j4" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "J5_link" + { + matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (1.6200000047683716, 0, 2.1566514833001786, 1) ) + uniform token[] xformOpOrder = ["xformOp:transform"] + + over "collisions" + { + over "j5" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "J6_link" + { + matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (1.6200000047683716, 0, 2.1566514833001786, 1) ) + uniform token[] xformOpOrder = ["xformOp:transform"] + + over "collisions" + { + over "j6" + { + over "mesh_13" + { + token visibility = "invisible" + } + } + } + } + + over "P1_link" + { + matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0.3700000047683716, 0, 0.906651602509468, 1) ) + uniform token[] xformOpOrder = ["xformOp:transform"] + + over "collisions" + { + over "p1" + { + over "mesh_15" + { + token visibility = "invisible" + } + } + } + } + + over "P2_link" + { + matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (-0.030000001192092896, 0, 0.906651602509468, 1) ) + uniform token[] xformOpOrder = ["xformOp:transform"] + + over "collisions" + { + over "p2" + { + over "mesh_17" + { + 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/fanuc_m900ib280/materials/mdl/LICENSE.md b/fanuc_m900ib280/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m900ib280/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/fanuc_m900ib280/materials/mdl/OmniPBR.mdl b/fanuc_m900ib280/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m900ib280/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/fanuc_m900ib280/materials/mdl/OmniPBRBase.mdl b/fanuc_m900ib280/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m900ib280/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/fanuc_m900ib280/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m900ib280/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m900ib280/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/fanuc_m900ib280/materials/mdl/aux_definitions.mdl b/fanuc_m900ib280/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m900ib280/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/fanuc_m900ib280/materials/mdl/core_definitions.mdl b/fanuc_m900ib280/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m900ib280/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/fanuc_m900ib280/materials/mdl/support_definitions.mdl b/fanuc_m900ib280/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m900ib280/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/fanuc_m900ib280/payloads/Physics/mujoco.usda b/fanuc_m900ib280/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..3945299d29d1da9e00181d07859f00d914310756 --- /dev/null +++ b/fanuc_m900ib280/payloads/Physics/mujoco.usda @@ -0,0 +1,251 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib280" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "P2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P2_01" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "P1_link" + { + over "visuals" + { + over "p1" + { + } + } + + over "collisions" + { + over "p1" + { + } + } + } + + over "P2_link" + { + over "visuals" + { + over "p2" + { + } + } + + over "collisions" + { + over "p2" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ib280/payloads/Physics/none.usda b/fanuc_m900ib280/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..5bd264bb64d25166f3128c1ac81dcfd93959eb30 --- /dev/null +++ b/fanuc_m900ib280/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ib280" +{ +} + diff --git a/fanuc_m900ib280/payloads/Physics/physics.usda b/fanuc_m900ib280/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..2ff80935bdd31c46c601e70b0410e08e015f6b9c --- /dev/null +++ b/fanuc_m900ib280/payloads/Physics/physics.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib280" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 20000 + float drive:angular:physics:stiffness = 25000 + 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 = 207.1817 + point3f physics:localPos0 = (0, 0, 0.85) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -185 + float physics:upperLimit = 185 + } + + def PhysicsRevoluteJoint "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 343.81454 + point3f physics:localPos0 = (0.37, 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 = -74.99999 + float physics:upperLimit = 75.99999 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 663.0519 + point3f physics:localPos0 = (0, 0, 1.05) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -66 + float physics:upperLimit = 66 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 6000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 125.038765 + point3f physics:localPos0 = (0, 0, 0.2) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 6000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 87.79944 + point3f physics:localPos0 = (1.25, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -124.99999 + float physics:upperLimit = 124.99999 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 4000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.2705661 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "P1" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + uniform bool physics:excludeFromArticulation = 1 + float physics:JointEquivalentInertia = 18.909042 + point3f physics:localPos0 = (0, 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 = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 15.731964 + point3f physics:localPos0 = (-0.4, 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 = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2_01" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 15.731964 + point3f physics:localPos0 = (0, 0, 1.05) + point3f physics:localPos1 = (-0.4, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -92.4 + float physics:upperLimit = 92.4 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.14, -0.000614, 0.126) + float3 physics:diagonalInertia = (8.545122, 18.803307, 24.401571) + float physics:mass = 257 + quatf physics:principalAxes = (0.9999465, -0.001186019, -0.0049170135, -0.009032003) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.239, -0.00235, -0.174) + float3 physics:diagonalInertia = (92.56731, 61.108906, 65.92378) + float physics:mass = 757 + quatf physics:principalAxes = (0.92017347, 0.09157625, 0.37547776, -0.06253743) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0199, -0.033, 0.456) + float3 physics:diagonalInertia = (37.942425, 37.17461, 6.262971) + float physics:mass = 288 + quatf physics:principalAxes = (0.9557985, -0.045965057, -0.02074581, -0.28966525) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.185, 0.00478, 0.158) + float3 physics:diagonalInertia = (4.706633, 44.40398, 43.359386) + float physics:mass = 270 + quatf physics:principalAxes = (0.99926585, 0.020251643, -0.032368284, -0.0031425657) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (1.12, -0.0072, -0.000274) + float3 physics:diagonalInertia = (0.11413014, 0.25188133, 0.24398851) + float physics:mass = 20.6 + quatf physics:principalAxes = (0.9989975, 0.020563094, 0.0010426443, -0.039750367) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0531, -0.0259, 1.1e-9) + float3 physics:diagonalInertia = (0.28350237, 0.38849765, 0.454) + float physics:mass = 32.7 + quatf physics:principalAxes = (0.95071167, 0, 0, 0.31007633) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.243, 1.07e-10, 0.0000937) + float3 physics:diagonalInertia = (0.021699999, 0.0112, 0.0112) + float physics:mass = 3.04 + quatf physics:principalAxes = (0.92701256, 0.37503037, -0.00012845744, 0.000051968487) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.108, 0.127, -0.0139) + float3 physics:diagonalInertia = (0.57863647, 1.8332258, 1.4001378) + float physics:mass = 50 + quatf physics:principalAxes = (0.99965304, -0.002586119, -0.006845714, 0.025304608) + rel physics:simulationOwner + + over "collisions" + { + over "p1" ( + instanceable = false + ) + { + over "mesh_15" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-2.38e-19, 0.0973, 0.526) + float3 physics:diagonalInertia = (2.27, 2.29, 0.03499966) + float physics:mass = 20.8 + quatf physics:principalAxes = (1, -0.0001931264, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "p2" ( + instanceable = false + ) + { + over "mesh_17" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m900ib280/payloads/Physics/physx.usda b/fanuc_m900ib280/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..39363ce281715ed400d94526f8a55575808399f3 --- /dev/null +++ b/fanuc_m900ib280/payloads/Physics/physx.usda @@ -0,0 +1,97 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m900ib280" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 104.99999 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 99.99999 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 124.99999 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 124.99999 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 204.99998 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m900ib280/payloads/Sensor/none.usda b/fanuc_m900ib280/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..5bd264bb64d25166f3128c1ac81dcfd93959eb30 --- /dev/null +++ b/fanuc_m900ib280/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ib280" +{ +} + diff --git a/fanuc_m900ib280/payloads/Sensor/sensors.usda b/fanuc_m900ib280/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..c09d504a01ff011b4cd79fde6b000b21dd9f03b9 --- /dev/null +++ b/fanuc_m900ib280/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ib280" +{ +} + diff --git a/fanuc_m900ib280/payloads/base.usda b/fanuc_m900ib280/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..2fa873db1cd3a9c8095776cbfd78ed976e460bda --- /dev/null +++ b/fanuc_m900ib280/payloads/base.usda @@ -0,0 +1,450 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m900ib280" +{ + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.05665157866761006) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Scope "Looks" + { + } + + def Scope "joints" + { + } + + def Xform "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.8500000238418579) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 1.899999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 2.0999999046325684) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.6200000047683716, 0, 2.0999999046325684) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.6200000047683716, 0, 2.0999999046325684) + 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.25999999046325684, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + quatd xformOp:orient = (-3.0908619663705394e-8, 0.7071067690849304, 3.0908619663705394e-8, 0.7071067690849304) + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.030000001192092896, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ib280/payloads/geometries.usd b/fanuc_m900ib280/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..0675f5dd0b80b473139411543e8248907377a5db --- /dev/null +++ b/fanuc_m900ib280/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f676e5efdbce070dd67031b74e3b13597b038d9737363bce954a7584fc9922e +size 6084515 diff --git a/fanuc_m900ib280/payloads/instances.usda b/fanuc_m900ib280/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..54f02701df88d5c87c305bb0a9cbca75cc4efe56 --- /dev/null +++ b/fanuc_m900ib280/payloads/instances.usda @@ -0,0 +1,1370 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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_2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7803922, 0.5647059, 0.1098039) + 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_3" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.01, 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_4" ( + 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_5" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.1333333, 0.1333333, 0.1333333) + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6862745, 0.7686275, 0.8666667) + 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_7" ( + 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_4" ( + 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_8" ( + 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 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_9" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7529413, 0.7529413, 0.7529413) + 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_4" ( + 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_7" ( + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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_4" ( + 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_8" ( + 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_3" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0, 0.01, 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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_2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7803922, 0.5647059, 0.1098039) + 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" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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_4" ( + 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_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 "Material_4" ( + 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", "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_14" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_14" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_4" ( + 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_7" ( + 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 "mesh_15" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_15" ( + 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_16" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_16" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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 "mesh_17" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_17" ( + 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/fanuc_m900ib280/payloads/materials.usda b/fanuc_m900ib280/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..cbfb6529b01c7e127d63460e1fef48ddad661873 --- /dev/null +++ b/fanuc_m900ib280/payloads/materials.usda @@ -0,0 +1,1793 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_0" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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" + 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_1" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_1" ( + 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.8000001, 0.8000001, 0.8000001) ( + 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.8000001, 0.8000001, 0.8000001) + 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_2" + { + 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 "Material_2" ( + 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.7803922, 0.5647059, 0.1098039) ( + 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.7803922, 0.5647059, 0.1098039) + 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_3" + { + 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 "Material_3" ( + 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.01, 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.01, 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_4" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_4" ( + 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" + 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_5" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_5" ( + 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.1333333, 0.1333333, 0.1333333) ( + 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.1333333, 0.1333333, 0.1333333) + 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 = "steel" + 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 "Material_6" + { + 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 "Material_0" ( + 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.6862745, 0.7686275, 0.8666667) ( + 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.6862745, 0.7686275, 0.8666667) + 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_7" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_1" ( + 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) ( + 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, 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_8" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_3" ( + 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) ( + 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, 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_9" + { + 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 "Material_0" ( + 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.7529413, 0.7529413, 0.7529413) ( + 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.7529413, 0.7529413, 0.7529413) + 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/fanuc_m900ib280/payloads/robot.usda b/fanuc_m900ib280/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..517450afa4e91e3812281abfc18f7d1cdf312505 --- /dev/null +++ b/fanuc_m900ib280/payloads/robot.usda @@ -0,0 +1,202 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib280" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + + over "P2_01" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m900ib280/runnables/physics/mujoco.usda b/fanuc_m900ib280/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..c53febd24db66e7c53d7dfd0cc5cf76ce4d04042 --- /dev/null +++ b/fanuc_m900ib280/runnables/physics/mujoco.usda @@ -0,0 +1,296 @@ +#usda 1.0 +( + defaultPrim = "m900ib280" +) + +def "m900ib280" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2_01" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m900ib280_joints_J1" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 20000 + double mjc:forceRange:min = -20000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib280_joints_J2" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib280_joints_J3" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib280_joints_J4" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 6000 + double mjc:forceRange:min = -6000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib280_joints_J5" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 6000 + double mjc:forceRange:min = -6000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib280_joints_J6" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 4000 + double mjc:forceRange:min = -4000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m900ib280/runnables/physics/newton.usda b/fanuc_m900ib280/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..fb6d83d0c9c3293e6c6e2a90387d495b41568c41 --- /dev/null +++ b/fanuc_m900ib280/runnables/physics/newton.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m900ib280" +) + +over "m900ib280" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] + ) + { + bool newton:selfCollisionEnabled = 0 + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 6818.182 + float newton:damping = 227.27274 + float newton:velocityLimit = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 32142.86 + float newton:damping = 357.14288 + float newton:velocityLimit = 104.99999 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 33750.004 + float newton:damping = 375.00003 + float newton:velocityLimit = 99.99999 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1800.0001 + float newton:damping = 60.000004 + float newton:velocityLimit = 124.99999 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1800.0001 + float newton:damping = 60.000004 + float newton:velocityLimit = 124.99999 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 731.7074 + float newton:damping = 24.390245 + float newton:velocityLimit = 204.99998 + } + + over "P1" ( + prepend apiSchemas = ["NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = 0 + float newton:mimicCoef1 = -1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + uniform bool physics:excludeFromArticulation = 0 + } + + over "P2" ( + prepend apiSchemas = ["NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = -0 + float newton:mimicCoef1 = 1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + } + + over "P2_01" + { + uniform bool physics:excludeFromArticulation = 1 + } + } +} + diff --git a/fanuc_m900ib280/runnables/physics/physx.usda b/fanuc_m900ib280/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..b9a495aeb5e4af38947fea5234c5814168e7f428 --- /dev/null +++ b/fanuc_m900ib280/runnables/physics/physx.usda @@ -0,0 +1,229 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib280" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 104.99999 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 99.99999 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 124.99999 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 124.99999 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 204.99998 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/fanuc_m900ib280l/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m900ib280l/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..5576a8b26e1a7e940f7f35e19f69f6d4a56780f7 --- /dev/null +++ b/fanuc_m900ib280l/.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:20", + "assets": [ + { + "asset": "m900ib280l.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/fanuc_m900ib280l/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m900ib280l/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..701c3c2d850e708ca3610e2c0cc18cfece1002ca --- /dev/null +++ b/fanuc_m900ib280l/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7624, + "hash": { + "sha256-flat-1mb": "a7577552d107bba3e2e88d4ac9ab06b285605519e0862fae0b43938aa7c0c137", + "sha256": "a6b7af64162fcc6026569f04d9a8f12e4ed432f6656a6941803c8a52a87b74ed" + } + }, + { + "relative_path": ".thumbs/256x256/.m900ib280l.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "7aad014e615dd7ae74a16904abfb999f71a3de4c12c8478462aa44c929893fab", + "sha256": "b6cfc3c5aefdfa00f5e20a1a03085df33ca7133f44de81015f415ee62de7aacd" + } + }, + { + "relative_path": ".thumbs/256x256/m900ib280l.usda.png", + "size": 46198, + "hash": { + "sha256-flat-1mb": "dc36ca29e7aa0da982fb2a99a450b8dc00028349d6afca2a44e703f1c5c5294d", + "sha256": "09eb364de7c5f1b15b7c32f3777bada17d3c585cbc4ef5665308e1fb34ae4285" + } + }, + { + "relative_path": ".thumbs/m900ib280l.thumb.usd", + "size": 6127, + "hash": { + "sha256-flat-1mb": "e3fb44dafda136f8474a1c547674e5bbf30508e94c6d03c541be0246928364b7", + "sha256": "305efd8a2ef75371a4d9e533417b4286b84a5ad74c9beac538d0056c909ec392" + } + }, + { + "relative_path": "m900ib280l.usda", + "size": 16598, + "hash": { + "sha256-flat-1mb": "b9be47114644f3b7748d5fdb41543814e038f6b17b49752a8122cb9fda611aa0", + "sha256": "c6155a754d3f88f118a8aefb220aeabb0e502b0aec93217912cd80022b765dd3" + } + }, + { + "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": 3713, + "hash": { + "sha256-flat-1mb": "ce11d4923e4b847d75cef03a248f699fb2941817449399096529c0a970c5624f", + "sha256": "c6950f7a4ed1f05e5cfa871e5b379c84fafeed1724295c3b390546dd32e3e973" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "22a5cf2edde259ef9867138dc0415633a77af279cb229273743a499a2e7c2909", + "sha256": "11df43b836b6f8023dca00b867bee7729c8b73428f66fe38ebae28d1cc42e7ea" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 16276, + "hash": { + "sha256-flat-1mb": "8183ad2d3c19d241a2bf8144992a4e0241cb4d10342545f23dce5caecaff838d", + "sha256": "4deb1ed03fd1d30bd80c3b9ede48a191c48b93a1770d9bc724c60a68f70d8a21" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 2420, + "hash": { + "sha256-flat-1mb": "9f5e7073f5ad5ef9647b07ecb80662302825376ef87fd452a85195f218a4993e", + "sha256": "443b6009b7db5e304e6ad207b06f0b7ec74a1b6491dca21ccdcdb43f0a841d16" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "22a5cf2edde259ef9867138dc0415633a77af279cb229273743a499a2e7c2909", + "sha256": "11df43b836b6f8023dca00b867bee7729c8b73428f66fe38ebae28d1cc42e7ea" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 143, + "hash": { + "sha256-flat-1mb": "895eedc5b96b18d3f6430ce651fab119404892054a711befde851dc6186fbb18", + "sha256": "e4eb2683c0d63576406b7d9565745a72ffd1b25b295cdc65ebf1144fc4cd2db4" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 14239, + "hash": { + "sha256-flat-1mb": "3c4fb86e574be5b00d9db41a6131a77e4cccf2d8ce4b81b1bdf8567bf65cc18d", + "sha256": "9b9b44dafc34cf7563d6eb26dcdd207edfbbf07ad3b55f10aa09fe8d51ca2689" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 6784143, + "hash": { + "sha256-flat-1mb": "456edeba219acb6c4ddccaefbeb7b01d7aafb91675e44bf5d17bf95fd5bcad2f", + "sha256": "40e3df6308632b691db995eef439073bce632206385a124c1b09de4f8d72e44f", + "sha256-first1m": "c5ed622771c99ed9e1ff7520b2e016f55346097eeb841488c955e93cd6d40cea" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 49101, + "hash": { + "sha256-flat-1mb": "06c1844a1222abd32aabb8a1d8b04e755cf56edcb43e34f60b679edd03992949", + "sha256": "d2ddbcbb6da200433c4ed078368f1be0a1dd2d560617812cf326c08dd263fbd7" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 86656, + "hash": { + "sha256-flat-1mb": "02af8144e8b7fb42012555ce487309c55c61daa7dd1866ddf41541a7c7b285c6", + "sha256": "098506f212f2c1ae23b28096279920d91670a29aefa6e30c20e529cc6108ecfa" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 4171, + "hash": { + "sha256-flat-1mb": "658927923356cc51f669fe4ab2df2ccf4d20e64a5ef827a768ed42d8fdec1864", + "sha256": "ce95e1a6f54a881f279a204e267abbc0de7a4c85dcd267380179a48e1f90d420" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 9191, + "hash": { + "sha256-flat-1mb": "2ed6fef34877349724865b3d22d1eff36b15e7f9b043f392204449ca85327801", + "sha256": "52c26c8879bbe1b462acd9ffbc0ad2cbb61754f2b0c7da2b6548cd1cff51d829" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 6692, + "hash": { + "sha256-flat-1mb": "3718f44339d1898596f61d2dd8dbabc3090f118e4fe8117a9ff68d6ab8a6dd6f", + "sha256": "9219b5487be7a003c64ce9dc307edf857348366ed20699690c9461133e67ae95" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 5162, + "hash": { + "sha256-flat-1mb": "e84234961cde15857aedb27b30609d8a1b6dad375d63c45cc85184cae39859d0", + "sha256": "3070b3581af2e5d00cb8f9b456b8647963fc350bb68e81c487ac34721fccd570" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m900ib280l/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m900ib280l/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..945a7de9ccfdeaf4de97fff0b94d9d728787d419 --- /dev/null +++ b/fanuc_m900ib280l/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m900ib280l.usda" + ] +} diff --git a/fanuc_m900ib280l/.metadata/license.txt b/fanuc_m900ib280l/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m900ib280l/.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/fanuc_m900ib280l/.simready/validation.json b/fanuc_m900ib280l/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fa9d519c7115ed3d699ca78e5a7960d0f7409003 --- /dev/null +++ b/fanuc_m900ib280l/.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/fanuc_m900ib280l/.thumbs/256x256/.m900ib280l.usda.last_generated b/fanuc_m900ib280l/.thumbs/256x256/.m900ib280l.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..c93ac6f62c810afef44e6d1b00132f635586f0b4 --- /dev/null +++ b/fanuc_m900ib280l/.thumbs/256x256/.m900ib280l.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:31:14 \ No newline at end of file diff --git a/fanuc_m900ib280l/.thumbs/256x256/m900ib280l.usda.png b/fanuc_m900ib280l/.thumbs/256x256/m900ib280l.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..950be87e41be5f1e3ebb876ac4ba495c40d77fc3 --- /dev/null +++ b/fanuc_m900ib280l/.thumbs/256x256/m900ib280l.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09eb364de7c5f1b15b7c32f3777bada17d3c585cbc4ef5665308e1fb34ae4285 +size 46198 diff --git a/fanuc_m900ib280l/.thumbs/m900ib280l.thumb.usd b/fanuc_m900ib280l/.thumbs/m900ib280l.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..4d9b721ec5614ab1aead27d4f3922589c74bc0eb Binary files /dev/null and b/fanuc_m900ib280l/.thumbs/m900ib280l.thumb.usd differ diff --git a/fanuc_m900ib280l/com.nvidia.simready.packaging.json b/fanuc_m900ib280l/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..963aa5f730b030f9006ef5e9e63ff6f37e6233b3 --- /dev/null +++ b/fanuc_m900ib280l/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m900ib280l.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "55e2c14003ec595ee0e3e064a91b7d288806e6f7fce16fd0795107d6fcf37eaa" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "f0b79086dacef2774e21d9fee36fc23ab4889505892f7bc3c7a20ee5ae24c8c2" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "aa89ebc59f65b86abd28e3ae01746f05ed3b72e4bf1f2e2ecbed8f6c6a6d4207" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "2317ca2eeb5512d4dbab74ab47fb624567fbaadea3d2c2abb9ed1d51a81ffac3" + }, + "package_hash": { + "sha256": "fe11735e3350d1880fd49ad5c8de265f34fc488f6fe3046575c808b7157272ca" + } +} diff --git a/fanuc_m900ib280l/m900ib280l.usda b/fanuc_m900ib280l/m900ib280l.usda new file mode 100644 index 0000000000000000000000000000000000000000..8fe7539eb59f07b5f57476507458d1e46cba0ee8 --- /dev/null +++ b/fanuc_m900ib280l/m900ib280l.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m900ib280l" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m900ib280l" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m900ib280l" + 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']" + string "optional requirements" = "['com.nvidia.simready.MUJOCO.DJ.002']" + bool passed = 0 + 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 = (3.0611, 1.2516073, 2.2840044) + string asset_license = "CC-BY-4.0" + string asset_name = "m900ib280l" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 1599.2300019264221 + string qcode = "Q40687" + int rigid_body_count = 9 + string source_file = "Fanuc/m900ib280l/m900ib280l.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m900ib280l" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ib280l" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" + { + token visibility = "invisible" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" + { + token visibility = "invisible" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" + { + 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/fanuc_m900ib280l/materials/mdl/LICENSE.md b/fanuc_m900ib280l/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m900ib280l/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/fanuc_m900ib280l/materials/mdl/OmniPBR.mdl b/fanuc_m900ib280l/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m900ib280l/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/fanuc_m900ib280l/materials/mdl/OmniPBRBase.mdl b/fanuc_m900ib280l/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m900ib280l/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/fanuc_m900ib280l/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m900ib280l/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m900ib280l/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/fanuc_m900ib280l/materials/mdl/aux_definitions.mdl b/fanuc_m900ib280l/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m900ib280l/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/fanuc_m900ib280l/materials/mdl/core_definitions.mdl b/fanuc_m900ib280l/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m900ib280l/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/fanuc_m900ib280l/materials/mdl/support_definitions.mdl b/fanuc_m900ib280l/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m900ib280l/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/fanuc_m900ib280l/payloads/Physics/mujoco.usda b/fanuc_m900ib280l/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..1ecdfa5fa54013e328a27c9ad171f3aeef8b9808 --- /dev/null +++ b/fanuc_m900ib280l/payloads/Physics/mujoco.usda @@ -0,0 +1,251 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib280l" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "P2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P2_01" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "P1_link" + { + over "visuals" + { + over "p1" + { + } + } + + over "collisions" + { + over "p1" + { + } + } + } + + over "P2_link" + { + over "visuals" + { + over "p2" + { + } + } + + over "collisions" + { + over "p2" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ib280l/payloads/Physics/none.usda b/fanuc_m900ib280l/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..8f8600882d39c41ca413c342f94cded1d0bc5fd3 --- /dev/null +++ b/fanuc_m900ib280l/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280l" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ib280l" +{ +} + diff --git a/fanuc_m900ib280l/payloads/Physics/physics.usda b/fanuc_m900ib280l/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..815fd880b02237522fd0983389af484b5c1b8b20 --- /dev/null +++ b/fanuc_m900ib280l/payloads/Physics/physics.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280l" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib280l" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 20000 + float drive:angular:physics:stiffness = 25000 + 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 = 187.96678 + point3f physics:localPos0 = (0, 0, 0.85) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -185 + float physics:upperLimit = 185 + } + + def PhysicsRevoluteJoint "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 336.42422 + point3f physics:localPos0 = (0.37, 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 = -74.99999 + float physics:upperLimit = 75.99999 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 793.8772 + point3f physics:localPos0 = (0, 0, 1.05) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -66 + float physics:upperLimit = 66 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 6000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 200.57906 + point3f physics:localPos0 = (0, 0, 0.2) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 5000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 141.78534 + point3f physics:localPos0 = (1.705, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -124.99999 + float physics:upperLimit = 124.99999 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 3000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.2429676 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "P1" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + uniform bool physics:excludeFromArticulation = 1 + float physics:JointEquivalentInertia = 17.032766 + point3f physics:localPos0 = (0, 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 = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 14.166429 + point3f physics:localPos0 = (-0.4, 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 = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2_01" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 14.166429 + point3f physics:localPos0 = (0, 0, 1.05) + point3f physics:localPos1 = (-0.4, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -92.4 + float physics:upperLimit = 92.4 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.14, -0.000614, 0.126) + float3 physics:diagonalInertia = (7.6856356, 16.902966, 22.0014) + float physics:mass = 231 + quatf physics:principalAxes = (0.9999468, -0.0011791922, -0.0048876656, -0.00901952) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.239, -0.00235, -0.174) + float3 physics:diagonalInertia = (83.16092, 54.842617, 59.296467) + float physics:mass = 680 + quatf physics:principalAxes = (0.920514, 0.088975884, 0.37543997, -0.06149809) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0199, -0.033, 0.456) + float3 physics:diagonalInertia = (34.06694, 33.418167, 5.6248894) + float physics:mass = 259 + quatf physics:principalAxes = (0.9401846, -0.044832252, -0.023012439, -0.33691758) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.386, 0.00307, 0.16) + float3 physics:diagonalInertia = (5.3804283, 87.21153, 86.34803) + float physics:mass = 315 + quatf physics:principalAxes = (0.99834794, 0.05299654, -0.022168878, -0.0012188969) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (1.57, -0.0072, -0.000274) + float3 physics:diagonalInertia = (0.10321618, 0.22679304, 0.2189908) + float physics:mass = 18.5 + quatf physics:principalAxes = (0.9990307, 0.01869054, 0.0011318568, -0.03983664) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0531, -0.0259, 1.1e-9) + float3 physics:diagonalInertia = (0.25431675, 0.34868327, 0.408) + float physics:mass = 29.4 + quatf physics:principalAxes = (0.9509181, 0, 0, 0.309443) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.243, 1.07000006e-10, 0.00009370001) + float3 physics:diagonalInertia = (0.019499999, 0.01, 0.010099998) + float physics:mass = 2.73 + quatf physics:principalAxes = (1, 0, -0.00013936168, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.108, 0.127, -0.0139) + float3 physics:diagonalInertia = (0.51997125, 1.6429027, 1.2501261) + float physics:mass = 44.9 + quatf physics:principalAxes = (0.9996507, -0.0025535075, -0.00693736, 0.025373379) + rel physics:simulationOwner + + over "collisions" + { + over "p1" ( + instanceable = false + ) + { + over "mesh_15" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-2.38e-19, 0.0973, 0.526) + float3 physics:diagonalInertia = (2.04, 2.05, 0.031499695) + float physics:mass = 18.7 + quatf physics:principalAxes = (1, -0.00019370821, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "p2" ( + instanceable = false + ) + { + over "mesh_17" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m900ib280l/payloads/Physics/physx.usda b/fanuc_m900ib280l/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..6f7ce130ff3b5980254c073c8e2c2f2c392b70e7 --- /dev/null +++ b/fanuc_m900ib280l/payloads/Physics/physx.usda @@ -0,0 +1,97 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280l" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m900ib280l" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 104.99999 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 99.99999 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 124.99999 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 124.99999 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 204.99998 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m900ib280l/payloads/Sensor/none.usda b/fanuc_m900ib280l/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..8f8600882d39c41ca413c342f94cded1d0bc5fd3 --- /dev/null +++ b/fanuc_m900ib280l/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280l" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ib280l" +{ +} + diff --git a/fanuc_m900ib280l/payloads/Sensor/sensors.usda b/fanuc_m900ib280l/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..cb7c54292cd57c3de1ef68e49db4eb1696e6d005 --- /dev/null +++ b/fanuc_m900ib280l/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280l" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ib280l" +{ +} + diff --git a/fanuc_m900ib280l/payloads/base.usda b/fanuc_m900ib280l/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..8dc39a6b4947f6f7a20192d99d3a373a10c77fdf --- /dev/null +++ b/fanuc_m900ib280l/payloads/base.usda @@ -0,0 +1,450 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280l" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m900ib280l" +{ + 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 "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.8500000238418579) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 1.899999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 2.0999999046325684) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (2.075000047683716, 0, 2.0999999046325684) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (2.075000047683716, 0, 2.0999999046325684) + 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.25999999046325684, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + quatd xformOp:orient = (-3.0908619663705394e-8, 0.7071067690849304, 3.0908619663705394e-8, 0.7071067690849304) + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.030000001192092896, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ib280l/payloads/geometries.usd b/fanuc_m900ib280l/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..163e3e013ac792d9a80a76f65818b262fe1596a5 --- /dev/null +++ b/fanuc_m900ib280l/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40e3df6308632b691db995eef439073bce632206385a124c1b09de4f8d72e44f +size 6784143 diff --git a/fanuc_m900ib280l/payloads/instances.usda b/fanuc_m900ib280l/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..0dde4d4244e9c4f7622ca319660ba7d1a04c2a44 --- /dev/null +++ b/fanuc_m900ib280l/payloads/instances.usda @@ -0,0 +1,1403 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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_2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7803922, 0.5647059, 0.1098039) + 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_3" ( + 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_4" ( + 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_5" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6862745, 0.7686275, 0.8666667) + 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_7" ( + 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_4" ( + 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_8" ( + 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 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_9" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7529413, 0.7529413, 0.7529413) + 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_4" ( + 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_7" ( + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + 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, 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_11" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8980393, 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.6980392, 0.4980392, 0.09803922) + 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.6980392, 0.6980392, 0.6980392) + 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_8" ( + 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_7" ( + 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_14" ( + 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_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" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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_4" ( + 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_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 "Material_4" ( + 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", "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_14" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_14" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_4" ( + 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_7" ( + 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 "mesh_15" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_15" ( + 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_16" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_16" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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 "mesh_17" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_17" ( + 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/fanuc_m900ib280l/payloads/materials.usda b/fanuc_m900ib280l/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..90892a85bd7a7867a1a2265a259cfc7daf1bfa89 --- /dev/null +++ b/fanuc_m900ib280l/payloads/materials.usda @@ -0,0 +1,2441 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_0" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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" + 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_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" + ) + 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 "Material_1" ( + 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.8000001, 0.8000001, 0.8000001) ( + 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.8000001, 0.8000001, 0.8000001) + 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_2" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_2" ( + 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.7803922, 0.5647059, 0.1098039) ( + 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.7803922, 0.5647059, 0.1098039) + 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_3" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_3" ( + 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" + 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_4" + { + 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 "Material_4" ( + 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" + 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_5" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_5" ( + 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" + 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 = "steel" + 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 "Material_6" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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.6862745, 0.7686275, 0.8666667) ( + 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.6862745, 0.7686275, 0.8666667) + 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_7" + { + 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 "Material_1" ( + 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) ( + 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, 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_8" + { + 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 "Material_3" ( + 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) ( + 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, 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_9" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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.7529413, 0.7529413, 0.7529413) ( + 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.7529413, 0.7529413, 0.7529413) + 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 = "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 "Material_1" ( + 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.8980393, 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.8980393, 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 = "steel" + 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 "Material_2" ( + 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.6980392, 0.4980392, 0.09803922) ( + 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.6980392, 0.4980392, 0.09803922) + 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 = "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 "Material_3" ( + 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.6980392, 0.6980392, 0.6980392) ( + 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.6980392, 0.6980392, 0.6980392) + 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 "Material_6" ( + 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" + 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/fanuc_m900ib280l/payloads/robot.usda b/fanuc_m900ib280l/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..709d033d39d35044e2c3add985117a322aaab8e7 --- /dev/null +++ b/fanuc_m900ib280l/payloads/robot.usda @@ -0,0 +1,202 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280l" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib280l" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + + over "P2_01" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m900ib280l/runnables/physics/mujoco.usda b/fanuc_m900ib280l/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..b3ceaf8adc31a585f592a4632db150a2672768d9 --- /dev/null +++ b/fanuc_m900ib280l/runnables/physics/mujoco.usda @@ -0,0 +1,296 @@ +#usda 1.0 +( + defaultPrim = "m900ib280l" +) + +def "m900ib280l" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2_01" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m900ib280l_joints_J1" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 20000 + double mjc:forceRange:min = -20000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib280l_joints_J2" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib280l_joints_J3" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib280l_joints_J4" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 6000 + double mjc:forceRange:min = -6000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib280l_joints_J5" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 5000 + double mjc:forceRange:min = -5000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib280l_joints_J6" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 3000 + double mjc:forceRange:min = -3000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m900ib280l/runnables/physics/newton.usda b/fanuc_m900ib280l/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..412974f7a3682ceb7967034929befe0bf579a9af --- /dev/null +++ b/fanuc_m900ib280l/runnables/physics/newton.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m900ib280l" +) + +over "m900ib280l" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] + ) + { + bool newton:selfCollisionEnabled = 0 + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 6818.182 + float newton:damping = 227.27274 + float newton:velocityLimit = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 32142.86 + float newton:damping = 357.14288 + float newton:velocityLimit = 104.99999 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 33750.004 + float newton:damping = 375.00003 + float newton:velocityLimit = 99.99999 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1800.0001 + float newton:damping = 60.000004 + float newton:velocityLimit = 124.99999 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 1500.0001 + float newton:damping = 50.000004 + float newton:velocityLimit = 124.99999 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 548.7805 + float newton:damping = 18.292685 + float newton:velocityLimit = 204.99998 + } + + over "P1" ( + prepend apiSchemas = ["NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = 0 + float newton:mimicCoef1 = -1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + uniform bool physics:excludeFromArticulation = 0 + } + + over "P2" ( + prepend apiSchemas = ["NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = -0 + float newton:mimicCoef1 = 1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + } + + over "P2_01" + { + uniform bool physics:excludeFromArticulation = 1 + } + } +} + diff --git a/fanuc_m900ib280l/runnables/physics/physx.usda b/fanuc_m900ib280l/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..1d13474f9241166beb0aaad64e96633e49776378 --- /dev/null +++ b/fanuc_m900ib280l/runnables/physics/physx.usda @@ -0,0 +1,229 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib280l" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib280l" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 104.99999 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 99.99999 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 124.99999 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 124.99999 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 204.99998 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/fanuc_m900ib330l/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m900ib330l/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..35d41e73db6b6a9217835951b9dc67332624c794 --- /dev/null +++ b/fanuc_m900ib330l/.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:21", + "assets": [ + { + "asset": "m900ib330l.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/fanuc_m900ib330l/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m900ib330l/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..cdc229785208202ed18ecd224340d20e5f6f9f61 --- /dev/null +++ b/fanuc_m900ib330l/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7624, + "hash": { + "sha256-flat-1mb": "a7577552d107bba3e2e88d4ac9ab06b285605519e0862fae0b43938aa7c0c137", + "sha256": "a6b7af64162fcc6026569f04d9a8f12e4ed432f6656a6941803c8a52a87b74ed" + } + }, + { + "relative_path": ".thumbs/256x256/.m900ib330l.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "5360238e2bc095fa8221d49efa832e031df464d32f91fd541565f56634e8c0cd", + "sha256": "6aa0852ebd6d8e53fa36f10657f47c8296a5bb036ce4990d80b5e23a62d77b86" + } + }, + { + "relative_path": ".thumbs/256x256/m900ib330l.usda.png", + "size": 46639, + "hash": { + "sha256-flat-1mb": "b983115dde3190274067b73a536236fd427bb838cdd5416ebc7b2ba0a2431e82", + "sha256": "5925d8b535b5e807be6549c6b206ca13fcda82872c3c3ec9c08891483e283095" + } + }, + { + "relative_path": ".thumbs/m900ib330l.thumb.usd", + "size": 6127, + "hash": { + "sha256-flat-1mb": "5bc2193d9bbccf6e8999b774ebff5e41bd2c8e40e196cd692651dfc92e0f7bf8", + "sha256": "9ac1c0744914591cf5a7ae1ae028abf246ad2c1d7761740fc0e41cbe0551a7f8" + } + }, + { + "relative_path": "m900ib330l.usda", + "size": 16597, + "hash": { + "sha256-flat-1mb": "3c377d6f970adcef88b87a9f10fd186673e7b55aeb86e66fb75012b6ef0b53d7", + "sha256": "f9827d20a4fba5c19b4a59969968d476e6e94a1ac264b5c45e07b0b4cebb06af" + } + }, + { + "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": 3713, + "hash": { + "sha256-flat-1mb": "d2e81c03aa66d7f77dc5fff150cbafcd80a2c8ec296b3aa228cf7fdc80020dd8", + "sha256": "ac25161370fa3c454a16d5faec79f253cc4d3e5bdc235dc18d493cdd621ef744" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "7b592b3e80b986c225d4c313a2b574ea8c08ef8e17d1f7a826e7d7920a262e67", + "sha256": "6533cf3902691468753e6de44bb23a66e8a9a3a6f7ca645730ea2fe467d9ba2d" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 16294, + "hash": { + "sha256-flat-1mb": "d4d6fa9f2ac14e9766fd27d755ff448edf38998a381e10b1ffa89d7698233496", + "sha256": "a4c628000c0377b57a96538a3351f3db1ef7d0ed0e2898f1dbe64e00fe4e08e4" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 2410, + "hash": { + "sha256-flat-1mb": "9d3ac66a055b2fcec55e786dcebfa32d44b5e271c6ee9bb4daff94c072fc9895", + "sha256": "8340ea5e5ebf38e6a7867fcf4f48740777847831704e9ae6909fa11b8ed370fa" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "7b592b3e80b986c225d4c313a2b574ea8c08ef8e17d1f7a826e7d7920a262e67", + "sha256": "6533cf3902691468753e6de44bb23a66e8a9a3a6f7ca645730ea2fe467d9ba2d" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 143, + "hash": { + "sha256-flat-1mb": "7f9b03b98b70ceb8c3c809dc92812321db32eb6ac86840a73b50bbf6eb7d6842", + "sha256": "a7e591eb1de8ae7ab195a8b19ed83ce5b0cf8bbe42f0c5e645e763a77a43c43b" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 14237, + "hash": { + "sha256-flat-1mb": "fa11703934ada27dcf7570707c21c7fe006bb4308e2b7ea1455ad3717b77badf", + "sha256": "14ca9e60dd452432e5825ea0844c17aaad5922181e66106d8b75b315c4bbe8ab" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 5752071, + "hash": { + "sha256-flat-1mb": "91f1fec887989091b497e60295932d9d57dc2352273799af64c631868be225fb", + "sha256": "1e7b4ac8e21e3f4a7d414bccb81eb4e502fdb0225536ef88b6a265c16fa176e4", + "sha256-first1m": "dc40319a159ac5c4ab32bf28ee4d0c8b250a15dd7bae0f9a50240a5938e99ce3" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 45424, + "hash": { + "sha256-flat-1mb": "eb541f04cb346175c25e9239b6d8f64e0a8c6fbeaad3bcb4b4199e191f548923", + "sha256": "2a1130aaab2f7c6e251fa75ae784106362fc5224cfc96d1e65dbc3b5e6284b17" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 63558, + "hash": { + "sha256-flat-1mb": "9682a2a5ede3c6cdeab6901c9d528689e3f8b34e4d14054782413a196c6c8e36", + "sha256": "afabd33445d198464278a0e11f39c4abf6a1d13608dae004b5d36aa3bb8e93e1" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 4171, + "hash": { + "sha256-flat-1mb": "857c2c79184f17070049ad0c2b818fec5f36480d510443c1285fd9fa0ebf599d", + "sha256": "1e912537a36602283430a97cfab1697ca4d4d3ef676d07c8fb6a2c9936e81fde" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 9191, + "hash": { + "sha256-flat-1mb": "8d8dfd9523f84be70899e410cc8601aa14d53fe2c2e6a2ea264a501777493629", + "sha256": "59142806c823185cdd51d96ec16811556c53dfb830e4082574aaeec138f7d770" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 6715, + "hash": { + "sha256-flat-1mb": "c6e328a282f3a6d831bdd55dc4def4eb4ce7e0389d25f3ff28495f0162306ffb", + "sha256": "d52f89a6e098f5a884de062f182955a014cd1ead3b904b4c423d235bb26536ee" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 5152, + "hash": { + "sha256-flat-1mb": "d03903f8cceef2ca6d3982cee2037db27f1b95bef1bbc96dbdf47e272b24986b", + "sha256": "de2d16694e8ceb2da3d74f057ecfb4f3127c6fff803586f22de5a03c3c2f20b8" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m900ib330l/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m900ib330l/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..41550dcad110b03c8e6c9ebb4eb76643432cae78 --- /dev/null +++ b/fanuc_m900ib330l/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m900ib330l.usda" + ] +} diff --git a/fanuc_m900ib330l/.metadata/license.txt b/fanuc_m900ib330l/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m900ib330l/.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/fanuc_m900ib330l/.simready/validation.json b/fanuc_m900ib330l/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fa9d519c7115ed3d699ca78e5a7960d0f7409003 --- /dev/null +++ b/fanuc_m900ib330l/.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/fanuc_m900ib330l/.thumbs/256x256/.m900ib330l.usda.last_generated b/fanuc_m900ib330l/.thumbs/256x256/.m900ib330l.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..737783ff47b99febe8afc139d657ebeb5c8309e2 --- /dev/null +++ b/fanuc_m900ib330l/.thumbs/256x256/.m900ib330l.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:31:18 \ No newline at end of file diff --git a/fanuc_m900ib330l/.thumbs/256x256/m900ib330l.usda.png b/fanuc_m900ib330l/.thumbs/256x256/m900ib330l.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..a3661524eaedcff3604ef46aa6c9cfd6d73d706b --- /dev/null +++ b/fanuc_m900ib330l/.thumbs/256x256/m900ib330l.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5925d8b535b5e807be6549c6b206ca13fcda82872c3c3ec9c08891483e283095 +size 46639 diff --git a/fanuc_m900ib330l/.thumbs/m900ib330l.thumb.usd b/fanuc_m900ib330l/.thumbs/m900ib330l.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..e8381aa7f453eecc4b0fb431bddd2bae46be582b Binary files /dev/null and b/fanuc_m900ib330l/.thumbs/m900ib330l.thumb.usd differ diff --git a/fanuc_m900ib330l/com.nvidia.simready.packaging.json b/fanuc_m900ib330l/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..92b750dfd3709fc083cca09649094e0b1e31a65c --- /dev/null +++ b/fanuc_m900ib330l/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m900ib330l.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "0b368c8e71129f22bad54b52b0e6a15130a3ec00bded4e4f32429db313ba7b23" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "0c95e2381423c474d0a697e4d433d1507359a847670360da10ca9ad31ab8a4f3" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "babd4646697ee14108f2184c6e883cecda6178a1565dee021110539a3d808db6" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "178cbf904432b646815e364b8f6616560c8ababee90f15376d9470e60d02e278" + }, + "package_hash": { + "sha256": "7e4d506a180e81f199723aeccb0ed854663ff4ce9966f12dfe75b83b1eacbbb6" + } +} diff --git a/fanuc_m900ib330l/m900ib330l.usda b/fanuc_m900ib330l/m900ib330l.usda new file mode 100644 index 0000000000000000000000000000000000000000..1249871ea6d934a017e53ba0b224d1e441129ebf --- /dev/null +++ b/fanuc_m900ib330l/m900ib330l.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m900ib330l" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m900ib330l" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m900ib330l" + 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']" + string "optional requirements" = "['com.nvidia.simready.MUJOCO.DJ.002']" + bool passed = 0 + 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 = (3.155, 1.2516073, 2.2840044) + string asset_license = "CC-BY-4.0" + string asset_name = "m900ib330l" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 1780.0399997234344 + string qcode = "Q40687" + int rigid_body_count = 9 + string source_file = "Fanuc/m900ib330l/m900ib330l.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m900ib330l" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ib330l" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" + { + token visibility = "invisible" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" + { + token visibility = "invisible" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" + { + 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/fanuc_m900ib330l/materials/mdl/LICENSE.md b/fanuc_m900ib330l/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m900ib330l/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/fanuc_m900ib330l/materials/mdl/OmniPBR.mdl b/fanuc_m900ib330l/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m900ib330l/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/fanuc_m900ib330l/materials/mdl/OmniPBRBase.mdl b/fanuc_m900ib330l/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m900ib330l/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/fanuc_m900ib330l/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m900ib330l/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m900ib330l/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/fanuc_m900ib330l/materials/mdl/aux_definitions.mdl b/fanuc_m900ib330l/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m900ib330l/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/fanuc_m900ib330l/materials/mdl/core_definitions.mdl b/fanuc_m900ib330l/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m900ib330l/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/fanuc_m900ib330l/materials/mdl/support_definitions.mdl b/fanuc_m900ib330l/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m900ib330l/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/fanuc_m900ib330l/payloads/Physics/mujoco.usda b/fanuc_m900ib330l/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..59d77fddccd12d617c9f4b607e90f28cc32cfef5 --- /dev/null +++ b/fanuc_m900ib330l/payloads/Physics/mujoco.usda @@ -0,0 +1,251 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib330l" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "P2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P2_01" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "P1_link" + { + over "visuals" + { + over "p1" + { + } + } + + over "collisions" + { + over "p1" + { + } + } + } + + over "P2_link" + { + over "visuals" + { + over "p2" + { + } + } + + over "collisions" + { + over "p2" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ib330l/payloads/Physics/none.usda b/fanuc_m900ib330l/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..55033052b4997bd49a975c4f15cdcf043e2d8814 --- /dev/null +++ b/fanuc_m900ib330l/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib330l" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ib330l" +{ +} + diff --git a/fanuc_m900ib330l/payloads/Physics/physics.usda b/fanuc_m900ib330l/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..99b8973c4d6cb2e5ff7f02caf0e3ed29793918e8 --- /dev/null +++ b/fanuc_m900ib330l/payloads/Physics/physics.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib330l" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib330l" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 24000 + float drive:angular:physics:stiffness = 25000 + 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 = 182.8945 + point3f physics:localPos0 = (0, 0, 0.85) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -185 + float physics:upperLimit = 185 + } + + def PhysicsRevoluteJoint "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 377.95444 + point3f physics:localPos0 = (0.47, 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 = -74.99999 + float physics:upperLimit = 75.99999 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 800.1933 + point3f physics:localPos0 = (0, 0, 1.05) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -66 + float physics:upperLimit = 66 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 7000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 195.21223 + point3f physics:localPos0 = (0, 0, 0.2) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 6000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 137.28221 + point3f physics:localPos0 = (1.705, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -124.99999 + float physics:upperLimit = 124.99999 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 4000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.23495682 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "P1" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + uniform bool physics:excludeFromArticulation = 1 + float physics:JointEquivalentInertia = 143.21323 + point3f physics:localPos0 = (0, 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 = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 13.72566 + point3f physics:localPos0 = (-0.4, 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 = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2_01" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 13.72566 + point3f physics:localPos0 = (0, 0, 1.05) + point3f physics:localPos1 = (-0.4, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -92.4 + float physics:upperLimit = 92.4 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.133, -0.00148, 0.131) + float3 physics:diagonalInertia = (7.6552796, 15.901758, 20.602962) + float physics:mass = 228 + quatf physics:principalAxes = (0.9999431, -0.001642698, -0.007490156, -0.0074259522) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.299, -0.00453, -0.177) + float3 physics:diagonalInertia = (62.46534, 66.16683, 94.76784) + float physics:mass = 720 + quatf physics:principalAxes = (0.9352816, -0.0729257, -0.30987847, 0.15461423) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0199, -0.033, 0.456) + float3 physics:diagonalInertia = (32.952354, 32.321705, 5.435943) + float physics:mass = 251 + quatf physics:principalAxes = (0.94211596, -0.044816915, -0.02270141, -0.33150232) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.389, 0.00263, 0.159) + float3 physics:diagonalInertia = (5.26431, 85.00853, 84.23716) + float physics:mass = 307 + quatf physics:principalAxes = (0.9986447, 0.04740782, -0.021444468, -0.0012452027) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (1.57, -0.0072, -0.000274) + float3 physics:diagonalInertia = (0.09924169, 0.21876843, 0.21198988) + float physics:mass = 17.9 + quatf physics:principalAxes = (0.99898833, 0.02082972, 0.0010332558, -0.039844137) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0531, -0.0259, 1.44e-8) + float3 physics:diagonalInertia = (0.24639782, 0.3376022, 0.395) + float physics:mass = 28.4 + quatf physics:principalAxes = (0.95089287, 0, 0, 0.3095203) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.243, 3.5e-10, 0.0000937) + float3 physics:diagonalInertia = (0.018899998, 0.0097, 0.009729998) + float physics:mass = 2.64 + quatf physics:principalAxes = (1, -0.0000111674135, -0.00013794984, -1.5405429e-9) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.568, 0.126, 0.0963) + float3 physics:diagonalInertia = (3.8306546, 29.712542, 29.916807) + float physics:mass = 207 + quatf physics:principalAxes = (0.9949713, -0.032289125, 0.09369886, 0.014499167) + rel physics:simulationOwner + + over "collisions" + { + over "p1" ( + instanceable = false + ) + { + over "mesh_15" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (1.28e-18, 0.0973, 0.526) + float3 physics:diagonalInertia = (1.98, 1.9900002, 0.030399708) + float physics:mass = 18.1 + quatf physics:principalAxes = (1, -0.00019315166, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "p2" ( + instanceable = false + ) + { + over "mesh_17" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m900ib330l/payloads/Physics/physx.usda b/fanuc_m900ib330l/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..f1c4f30932dc02da2dbc6b3ece15d58479a768e7 --- /dev/null +++ b/fanuc_m900ib330l/payloads/Physics/physx.usda @@ -0,0 +1,97 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib330l" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m900ib330l" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 99.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 84.99999 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 84.99999 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 90 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 84.99999 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 164.99998 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m900ib330l/payloads/Sensor/none.usda b/fanuc_m900ib330l/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..55033052b4997bd49a975c4f15cdcf043e2d8814 --- /dev/null +++ b/fanuc_m900ib330l/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib330l" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ib330l" +{ +} + diff --git a/fanuc_m900ib330l/payloads/Sensor/sensors.usda b/fanuc_m900ib330l/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..f7126b29ce30696e87d89f7910d20a22aae62bfd --- /dev/null +++ b/fanuc_m900ib330l/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib330l" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ib330l" +{ +} + diff --git a/fanuc_m900ib330l/payloads/base.usda b/fanuc_m900ib330l/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..58411910ecd671ad52c0554e64dfc07d4261e649 --- /dev/null +++ b/fanuc_m900ib330l/payloads/base.usda @@ -0,0 +1,450 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib330l" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m900ib330l" +{ + 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 "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.8500000238418579) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.4699999988079071, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.4699999988079071, 0, 1.899999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.4699999988079071, 0, 2.0999999046325684) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (2.174999952316284, 0, 2.0999999046325684) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (2.174999952316284, 0, 2.0999999046325684) + 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.25999999046325684, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + quatd xformOp:orient = (-3.0908619663705394e-8, 0.7071067690849304, 3.0908619663705394e-8, 0.7071067690849304) + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.4699999988079071, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.06999999284744263, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ib330l/payloads/geometries.usd b/fanuc_m900ib330l/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..150d8bb18229d6d381fef11b0d4bf076dbb5229f --- /dev/null +++ b/fanuc_m900ib330l/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e7b4ac8e21e3f4a7d414bccb81eb4e502fdb0225536ef88b6a265c16fa176e4 +size 5752071 diff --git a/fanuc_m900ib330l/payloads/instances.usda b/fanuc_m900ib330l/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..6e91b183b2f14c1151da05b71f035e115d307ab4 --- /dev/null +++ b/fanuc_m900ib330l/payloads/instances.usda @@ -0,0 +1,1304 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6980392, 0.4980392, 0.09803922) + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6980392, 0.6980392, 0.6980392) + 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_2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7333333, 0.7333333, 0.7333333) + 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_3" ( + 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_4" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_5" ( + 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_6" ( + 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_3" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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_6" ( + 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_3" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_8" ( + 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_9" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 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_0" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6980392, 0.4980392, 0.09803922) + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6980392, 0.6980392, 0.6980392) + 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_5" ( + 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_6" ( + 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_3" ( + 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_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" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_6" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_6" ( + 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_3" ( + 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_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 "Material_3" ( + 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", "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_14" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_14" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_6" ( + 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_3" ( + 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_15" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_15" ( + 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_16" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_16" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_6" ( + 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 "mesh_17" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_17" ( + 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/fanuc_m900ib330l/payloads/materials.usda b/fanuc_m900ib330l/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..60fcc799c018c0015f3a65df22ef5267322fd57d --- /dev/null +++ b/fanuc_m900ib330l/payloads/materials.usda @@ -0,0 +1,1793 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_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:mtlx:surface.connect = + token outputs:surface ( + displayGroup = "Outputs" + ) + token outputs:surface.connect = + token outputs:volume ( + displayGroup = "Outputs" + ) + + def Shader "Material_0" ( + 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.6980392, 0.4980392, 0.09803922) ( + 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.6980392, 0.4980392, 0.09803922) + 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_1" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_1" ( + 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.6980392, 0.6980392, 0.6980392) ( + 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.6980392, 0.6980392, 0.6980392) + 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_2" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_2" ( + 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.7333333, 0.7333333, 0.7333333) ( + 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.7333333, 0.7333333, 0.7333333) + 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_3" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_3" ( + 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" + 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_4" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_4" ( + 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" + 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 = "steel" + 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 "Material_5" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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) ( + 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, 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_6" + { + 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 "Material_1" ( + 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) ( + 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, 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_7" + { + 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 "Material_0" ( + 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) ( + 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.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_8" + { + 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 "Material_0" ( + 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" + 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_9" + { + 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 "Material_1" ( + 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.8000001, 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.8000001, 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 + } + } +} + diff --git a/fanuc_m900ib330l/payloads/robot.usda b/fanuc_m900ib330l/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..c890a641f3783981457050f08f5b9aa702b86cf4 --- /dev/null +++ b/fanuc_m900ib330l/payloads/robot.usda @@ -0,0 +1,202 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib330l" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib330l" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + + over "P2_01" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m900ib330l/runnables/physics/mujoco.usda b/fanuc_m900ib330l/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..10c23660c4a36af11cc7e3cdb424930df85c8f8a --- /dev/null +++ b/fanuc_m900ib330l/runnables/physics/mujoco.usda @@ -0,0 +1,296 @@ +#usda 1.0 +( + defaultPrim = "m900ib330l" +) + +def "m900ib330l" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2_01" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m900ib330l_joints_J1" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 24000 + double mjc:forceRange:min = -24000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib330l_joints_J2" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib330l_joints_J3" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib330l_joints_J4" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 7000 + double mjc:forceRange:min = -7000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib330l_joints_J5" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 6000 + double mjc:forceRange:min = -6000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib330l_joints_J6" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 4000 + double mjc:forceRange:min = -4000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m900ib330l/runnables/physics/newton.usda b/fanuc_m900ib330l/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..3d3e10020e7a9f71cfbc2c586e85d97ad45eb72a --- /dev/null +++ b/fanuc_m900ib330l/runnables/physics/newton.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m900ib330l" +) + +over "m900ib330l" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] + ) + { + bool newton:selfCollisionEnabled = 0 + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 9000.001 + float newton:damping = 300.00003 + float newton:velocityLimit = 99.99999 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 39705.887 + float newton:damping = 441.1765 + float newton:velocityLimit = 84.99999 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 39705.887 + float newton:damping = 441.1765 + float newton:velocityLimit = 84.99999 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2916.6667 + float newton:damping = 97.22222 + float newton:velocityLimit = 90 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2647.059 + float newton:damping = 88.235306 + float newton:velocityLimit = 84.99999 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 909.091 + float newton:damping = 30.303034 + float newton:velocityLimit = 164.99998 + } + + over "P1" ( + prepend apiSchemas = ["NewtonJointAPI", "NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = -0 + float newton:mimicCoef1 = -1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + uniform bool physics:excludeFromArticulation = 0 + } + + over "P2" ( + prepend apiSchemas = ["NewtonJointAPI", "NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = -0 + float newton:mimicCoef1 = 1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + } + + over "P2_01" + { + uniform bool physics:excludeFromArticulation = 1 + } + } +} + diff --git a/fanuc_m900ib330l/runnables/physics/physx.usda b/fanuc_m900ib330l/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..b11c55c8041d345418fbe7ff017b2acab5188439 --- /dev/null +++ b/fanuc_m900ib330l/runnables/physics/physx.usda @@ -0,0 +1,229 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib330l" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib330l" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 99.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 84.99999 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 84.99999 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 90 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 84.99999 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 164.99998 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} + diff --git a/fanuc_m900ib360e/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json b/fanuc_m900ib360e/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..ccafb508bba10ab6e4d738933ccf6d8be2854933 --- /dev/null +++ b/fanuc_m900ib360e/.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:21", + "assets": [ + { + "asset": "m900ib360e.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/fanuc_m900ib360e/.metadata/com.nvidia.simready.packaging.bom.json b/fanuc_m900ib360e/.metadata/com.nvidia.simready.packaging.bom.json new file mode 100644 index 0000000000000000000000000000000000000000..3938aa0622541763233fa5ce0f78cb183b774f99 --- /dev/null +++ b/fanuc_m900ib360e/.metadata/com.nvidia.simready.packaging.bom.json @@ -0,0 +1,214 @@ +{ + "format_version": "1.0", + "items": [ + { + "relative_path": ".simready/validation.json", + "size": 7624, + "hash": { + "sha256-flat-1mb": "a7577552d107bba3e2e88d4ac9ab06b285605519e0862fae0b43938aa7c0c137", + "sha256": "a6b7af64162fcc6026569f04d9a8f12e4ed432f6656a6941803c8a52a87b74ed" + } + }, + { + "relative_path": ".thumbs/256x256/.m900ib360e.usda.last_generated", + "size": 19, + "hash": { + "sha256-flat-1mb": "6501e31989f4bd0d39f97983b982ddab95d0faa0e5b885ce21fa0ab3992b34a2", + "sha256": "7615a4dd4a008a5a8c488a626e1e0e5d62197d71d01ef0453a42432d2c642899" + } + }, + { + "relative_path": ".thumbs/256x256/m900ib360e.usda.png", + "size": 44713, + "hash": { + "sha256-flat-1mb": "a80a3b2410cd29ec67f026bf75c5d9b4310d68df15bd3f7517933ad363c770ea", + "sha256": "3260ab6162d6987cd0695ae09261ee0d3b8ea1853d1ae7e0a8c7ffaf1582e2b1" + } + }, + { + "relative_path": ".thumbs/m900ib360e.thumb.usd", + "size": 6127, + "hash": { + "sha256-flat-1mb": "4b893e267791a69d4a8b1b6c44e5724d74a6383c645f2612bb38b16c666134da", + "sha256": "d7e77be07cd732d2c296e0c82f7d05297f642d7731705206b662e08341cb11af" + } + }, + { + "relative_path": "m900ib360e.usda", + "size": 16598, + "hash": { + "sha256-flat-1mb": "8722be54f71069258fa998058a91c5707eac7548b895e2ba38875bc57b3ad4eb", + "sha256": "72c563ae600808fb49b4102ebce88d7c893ee2833655980125b540673824719d" + } + }, + { + "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": 3713, + "hash": { + "sha256-flat-1mb": "dc8f53a15c4d84b0949b84e14689fdae7972703192956e285b4c74a1ca3a1ed9", + "sha256": "ec519c059d8cf57841d5c3d616af4dd354af58df8751f63fa351d1d618525f1d" + } + }, + { + "relative_path": "payloads/Physics/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "eb7b5534f66caf5422071ba918d100a4ab8851bd52e803169067a1188c1e25ac", + "sha256": "1f623eeca51e74c0fc17f0c752a0217ac7418bdcf52e1df90e33c9c7d6559563" + } + }, + { + "relative_path": "payloads/Physics/physics.usda", + "size": 16273, + "hash": { + "sha256-flat-1mb": "5e79494e6e7f856848ba6dc6896160469aa691801e37e07c93f060173248b651", + "sha256": "906bc604b17bfad16d84d32648a29486116242ad91be2b5808176e246ef278e1" + } + }, + { + "relative_path": "payloads/Physics/physx.usda", + "size": 2414, + "hash": { + "sha256-flat-1mb": "bedb6ef546a5cbdfe7bee44656f7bcce61b3f0130385a669215a1e45a8c1a7ae", + "sha256": "beed4471fb60fcdfa3207678b479a35d891ffbf633ef359cdc636797c7b7c64f" + } + }, + { + "relative_path": "payloads/Sensor/none.usda", + "size": 137, + "hash": { + "sha256-flat-1mb": "eb7b5534f66caf5422071ba918d100a4ab8851bd52e803169067a1188c1e25ac", + "sha256": "1f623eeca51e74c0fc17f0c752a0217ac7418bdcf52e1df90e33c9c7d6559563" + } + }, + { + "relative_path": "payloads/Sensor/sensors.usda", + "size": 143, + "hash": { + "sha256-flat-1mb": "13386709d6c987042ad7a4768bf53741d9aadd2dfd7921b5d5985383641c3432", + "sha256": "65691bcc5db6de29555c69b54c51266cb60576c8f36c14548d1caffc4f713395" + } + }, + { + "relative_path": "payloads/base.usda", + "size": 14241, + "hash": { + "sha256-flat-1mb": "fa36845f0f32c2ff8ccd9bfb14ad24fd4c3d809d7c22d201a8314482e1cf8792", + "sha256": "b511052542629ef11c00546f317bcca48bd0448e4d48039696ab09dda19af15a" + } + }, + { + "relative_path": "payloads/geometries.usd", + "size": 6609723, + "hash": { + "sha256-flat-1mb": "0130049b21ce72d0ee2788485890f6a7a5ec4a3e6c3b5880c7e7a2de1b3fdab5", + "sha256": "e0726436aaaa5d05e290fa30dc8981b0a5cf3f444ded15235349820b1ededf92", + "sha256-first1m": "2372548ffdcdccd045b6b1c03f593cce9c5d7697f33bd48fbb05b6775c470fc8" + } + }, + { + "relative_path": "payloads/instances.usda", + "size": 49122, + "hash": { + "sha256-flat-1mb": "8aabae4959f0aeb60fe7d8de13d3e959e1d3d20469d1c13f67d97577f47693d5", + "sha256": "dfe0ec0cdd03b9f7c7f1074171550f391954936d77d6a59e0d3e98fd0ef156a9" + } + }, + { + "relative_path": "payloads/materials.usda", + "size": 80331, + "hash": { + "sha256-flat-1mb": "0d2f4194ae18d02f43a528632c433a60ff7b58d68b5f0645e66a983d717c028c", + "sha256": "84ac7a38d8ba71595ba7a4761d2c4370225dd6857213c1422fbac7cff8809fb7" + } + }, + { + "relative_path": "payloads/robot.usda", + "size": 4171, + "hash": { + "sha256-flat-1mb": "cec433967f9095b1cf055e01ef0e215375d6c8df007d66d58d184fcfd2ed5c99", + "sha256": "0ec4e3e01633f9cfd775805aaba8d7c6264083db892826a1a5ced3566955b3b9" + } + }, + { + "relative_path": "runnables/physics/mujoco.usda", + "size": 9191, + "hash": { + "sha256-flat-1mb": "78613143ad6e4f99746ab25fb11f4f3446b77392a0190a8e6741b6595f943ad0", + "sha256": "ff5786353fc4c3d23ddd014dacbd335d8ebfb0565b7483a649b3d0ded6f5dd95" + } + }, + { + "relative_path": "runnables/physics/newton.usda", + "size": 6722, + "hash": { + "sha256-flat-1mb": "0351fc2a4f8f984a573e990504b2ecb95e4779a8807789f7c51c4bb43c1165c5", + "sha256": "b7124b5f135349119abc426e9d5fb9992789039c298eb718d7936d24c52dd004" + } + }, + { + "relative_path": "runnables/physics/physx.usda", + "size": 5156, + "hash": { + "sha256-flat-1mb": "7f9518b690b1390c3d5189b0758eebe4e6cbf99794698cc7046453d53b4072b6", + "sha256": "febe088734e9f61c1b114bf656a2643983c04bbd3cd369218e41b84c56c2c4fa" + } + } + ] +} \ No newline at end of file diff --git a/fanuc_m900ib360e/.metadata/com.nvidia.simready.root_usds.json b/fanuc_m900ib360e/.metadata/com.nvidia.simready.root_usds.json new file mode 100644 index 0000000000000000000000000000000000000000..adb660c755492ef4c77b41b197650ef0858f3d05 --- /dev/null +++ b/fanuc_m900ib360e/.metadata/com.nvidia.simready.root_usds.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.0", + "entries": [ + "m900ib360e.usda" + ] +} diff --git a/fanuc_m900ib360e/.metadata/license.txt b/fanuc_m900ib360e/.metadata/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..da6ab6cc8f333d7e89a99812866df8f24374d47c --- /dev/null +++ b/fanuc_m900ib360e/.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/fanuc_m900ib360e/.simready/validation.json b/fanuc_m900ib360e/.simready/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fa9d519c7115ed3d699ca78e5a7960d0f7409003 --- /dev/null +++ b/fanuc_m900ib360e/.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/fanuc_m900ib360e/.thumbs/256x256/.m900ib360e.usda.last_generated b/fanuc_m900ib360e/.thumbs/256x256/.m900ib360e.usda.last_generated new file mode 100644 index 0000000000000000000000000000000000000000..78a50f79d84f9bd12e3747a841333b27d8d7723a --- /dev/null +++ b/fanuc_m900ib360e/.thumbs/256x256/.m900ib360e.usda.last_generated @@ -0,0 +1 @@ +2026-08-11 03:31:23 \ No newline at end of file diff --git a/fanuc_m900ib360e/.thumbs/256x256/m900ib360e.usda.png b/fanuc_m900ib360e/.thumbs/256x256/m900ib360e.usda.png new file mode 100644 index 0000000000000000000000000000000000000000..d46b43ec25ae876b96f3d42b1cb4a9a96c193c07 --- /dev/null +++ b/fanuc_m900ib360e/.thumbs/256x256/m900ib360e.usda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3260ab6162d6987cd0695ae09261ee0d3b8ea1853d1ae7e0a8c7ffaf1582e2b1 +size 44713 diff --git a/fanuc_m900ib360e/.thumbs/m900ib360e.thumb.usd b/fanuc_m900ib360e/.thumbs/m900ib360e.thumb.usd new file mode 100644 index 0000000000000000000000000000000000000000..cd36a4115075965ceb70070ee063f28a5baeb423 Binary files /dev/null and b/fanuc_m900ib360e/.thumbs/m900ib360e.thumb.usd differ diff --git a/fanuc_m900ib360e/com.nvidia.simready.packaging.json b/fanuc_m900ib360e/com.nvidia.simready.packaging.json new file mode 100644 index 0000000000000000000000000000000000000000..b9044f860fa4dbcb8880a757722f4dbcae1ed3c8 --- /dev/null +++ b/fanuc_m900ib360e/com.nvidia.simready.packaging.json @@ -0,0 +1,37 @@ +{ + "format_version": "1.0", + "package_id": "fanuc_m900ib360e.1.0.0", + "license": "CC-BY-4.0", + "metadata": [ + { + "name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json", + "hash": { + "sha256": "7d575b97c84ed5a12fa37f514f12a9c163e4c03d2ae2ac8a2227289d68b9d65b" + } + }, + { + "name": "com.nvidia.simready.packaging.bom.json", + "hash": { + "sha256": "a89d781c28a4436d0265e19f85eaade8054fdd1afbf85744cb40b5f03d9df8c3" + } + }, + { + "name": "com.nvidia.simready.root_usds.json", + "hash": { + "sha256": "f0122143e8025ef696af84e88690a73568604a58a392e28128f77393af5191ef" + } + }, + { + "name": "license.txt", + "hash": { + "sha256": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411" + } + } + ], + "content_hash": { + "sha256": "ad42ea9cde55bdeb954afaaf3b29ed8b77a5c2fa7f818efa95e27f2329f5f3d3" + }, + "package_hash": { + "sha256": "28a80873397c3dc6816a0338edb14166c2ddd6e977ad7a1572a70e6153211eab" + } +} diff --git a/fanuc_m900ib360e/m900ib360e.usda b/fanuc_m900ib360e/m900ib360e.usda new file mode 100644 index 0000000000000000000000000000000000000000..8a223bba90f7671d89c406a37ee973f557e4a3fe --- /dev/null +++ b/fanuc_m900ib360e/m900ib360e.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + dictionary SimReady_Metadata = { + dictionary Variants = { + dictionary Physics = { + dictionary MuJoCo = { + string activateOption = "Enabled" + string prim = "/m900ib360e" + string variantSetName = "MuJoCo" + } + dictionary Newton = { + string activateOption = "Enabled" + string prim = "/m900ib360e" + string variantSetName = "Newton" + } + dictionary PhysX = { + string activateOption = "Enabled" + string prim = "/m900ib360e" + 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']" + string "optional requirements" = "['com.nvidia.simready.MUJOCO.DJ.002']" + bool passed = 0 + 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 = (2.5701, 1.2516073, 2.2840044) + string asset_license = "CC-BY-4.0" + string asset_name = "m900ib360e" + string asset_type = "robot" + string author = "Fanuc" + string category = "robotic arm" + double mass = 1540.4600026607513 + string qcode = "Q40687" + int rigid_body_count = 9 + string source_file = "Fanuc/m900ib360e/m900ib360e.usda" + string usd_date_generated = "2026-10-02" + } + defaultPrim = "m900ib360e" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ib360e" ( + 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"] +) +{ + color3f[] primvars:displayColor = [(0.5, 0.5, 0.5)] ( + interpolation = "constant" + ) + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" + { + token visibility = "invisible" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" + { + token visibility = "invisible" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" + { + token visibility = "invisible" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" + { + token visibility = "invisible" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" + { + token visibility = "invisible" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" + { + token visibility = "invisible" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" + { + token visibility = "invisible" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" + { + token visibility = "invisible" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" + { + 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/fanuc_m900ib360e/materials/mdl/LICENSE.md b/fanuc_m900ib360e/materials/mdl/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a571d2b4f4cfc3d48ff2ca421fc8c950cc1fce --- /dev/null +++ b/fanuc_m900ib360e/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/fanuc_m900ib360e/materials/mdl/OmniPBR.mdl b/fanuc_m900ib360e/materials/mdl/OmniPBR.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bcd0685466a09006ac9e009969d32de43d6d04d9 --- /dev/null +++ b/fanuc_m900ib360e/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/fanuc_m900ib360e/materials/mdl/OmniPBRBase.mdl b/fanuc_m900ib360e/materials/mdl/OmniPBRBase.mdl new file mode 100644 index 0000000000000000000000000000000000000000..417cec0a705f3ed09ceded3f85f5b919acf8dd20 --- /dev/null +++ b/fanuc_m900ib360e/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/fanuc_m900ib360e/materials/mdl/OmniPBR_ClearCoat.mdl b/fanuc_m900ib360e/materials/mdl/OmniPBR_ClearCoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7a2e7e1f06d0708ba56f84998d14b41fdaccf29a --- /dev/null +++ b/fanuc_m900ib360e/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/fanuc_m900ib360e/materials/mdl/aux_definitions.mdl b/fanuc_m900ib360e/materials/mdl/aux_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ceafd716af19521a4733704808ebcc07613217e1 --- /dev/null +++ b/fanuc_m900ib360e/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/fanuc_m900ib360e/materials/mdl/core_definitions.mdl b/fanuc_m900ib360e/materials/mdl/core_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cbe3f174c2da2abe2b6aa211510de9128848089c --- /dev/null +++ b/fanuc_m900ib360e/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/fanuc_m900ib360e/materials/mdl/support_definitions.mdl b/fanuc_m900ib360e/materials/mdl/support_definitions.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8fc835d19c6caa5cad15c8f472ad074645017c9f --- /dev/null +++ b/fanuc_m900ib360e/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/fanuc_m900ib360e/payloads/Physics/mujoco.usda b/fanuc_m900ib360e/payloads/Physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..ac9a3a88e27a1f4e894e6b4b9102a3f4c8e77677 --- /dev/null +++ b/fanuc_m900ib360e/payloads/Physics/mujoco.usda @@ -0,0 +1,251 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib360e" +{ + over "joints" + { + over "J1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J3" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J4" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J5" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "J6" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + } + + over "P2" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P2_01" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + + over "P1" ( + delete apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "robot_base" + { + over "base_link" + { + over "wbase" + { + } + } + + over "visuals" + { + over "base" + { + } + } + + over "collisions" + { + over "base" + { + } + } + } + + over "J1_link" + { + over "visuals" + { + over "j1" + { + } + } + + over "collisions" + { + over "j1" + { + } + } + } + + over "J2_link" + { + over "visuals" + { + over "j2" + { + } + } + + over "collisions" + { + over "j2" + { + } + } + } + + over "J3_link" + { + over "visuals" + { + over "j3" + { + } + } + + over "collisions" + { + over "j3" + { + } + } + } + + over "J4_link" + { + over "visuals" + { + over "j4" + { + } + } + + over "collisions" + { + over "j4" + { + } + } + } + + over "J5_link" + { + over "visuals" + { + over "j5" + { + } + } + + over "collisions" + { + over "j5" + { + } + } + } + + over "J6_link" + { + over "flange" + { + over "ee_link" + { + } + + over "fanuc_flange" + { + } + } + + over "visuals" + { + over "j6" + { + } + } + + over "collisions" + { + over "j6" + { + } + } + } + + over "P1_link" + { + over "visuals" + { + over "p1" + { + } + } + + over "collisions" + { + over "p1" + { + } + } + } + + over "P2_link" + { + over "visuals" + { + over "p2" + { + } + } + + over "collisions" + { + over "p2" + { + } + } + } + + over "root_joint" + { + } + + over "Looks" + { + } + + over "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ib360e/payloads/Physics/none.usda b/fanuc_m900ib360e/payloads/Physics/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..7b078a0d46621638457a2bda19d497dbcd4bf538 --- /dev/null +++ b/fanuc_m900ib360e/payloads/Physics/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib360e" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ib360e" +{ +} + diff --git a/fanuc_m900ib360e/payloads/Physics/physics.usda b/fanuc_m900ib360e/payloads/Physics/physics.usda new file mode 100644 index 0000000000000000000000000000000000000000..0e37ab0cd21afea0345c1e87e40d8f14673bdd38 --- /dev/null +++ b/fanuc_m900ib360e/payloads/Physics/physics.usda @@ -0,0 +1,449 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib360e" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib360e" +{ + over "joints" + { + def PhysicsRevoluteJoint "J1" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 20000 + float drive:angular:physics:stiffness = 25000 + 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 = 185.26663 + point3f physics:localPos0 = (0, 0, 0.85) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -185 + float physics:upperLimit = 185 + } + + def PhysicsRevoluteJoint "J2" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 308.972 + point3f physics:localPos0 = (0.37, 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 = -74.99999 + float physics:upperLimit = 75.99999 + } + + def PhysicsRevoluteJoint "J3" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 598.59015 + point3f physics:localPos0 = (0, 0, 1.05) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -66 + float physics:upperLimit = 66 + } + + def PhysicsRevoluteJoint "J4" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 6000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 113.53352 + point3f physics:localPos0 = (0, 0, 0.2) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "J5" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 6000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 79.73818 + point3f physics:localPos0 = (1.25, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 1, 0, 0) + quatf physics:localRot1 = (0, 1, 0, 0) + float physics:lowerLimit = -124.99999 + float physics:upperLimit = 124.99999 + } + + def PhysicsRevoluteJoint "J6" ( + prepend apiSchemas = ["PhysicsDriveAPI:angular", "PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:maxForce = 4000 + float drive:angular:physics:stiffness = 25000 + float drive:angular:physics:targetPosition = 0 + uniform token drive:angular:physics:type = "force" + uniform token physics:axis = "X" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + float physics:JointEquivalentInertia = 0.24561945 + point3f physics:localPos0 = (0, 0, 0) + point3f physics:localPos1 = (0, 0, 0) + quatf physics:localRot0 = (0, 0, 0, 1) + quatf physics:localRot1 = (0, 0, 0, 1) + float physics:lowerLimit = -360 + float physics:upperLimit = 360 + } + + def PhysicsRevoluteJoint "P1" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + uniform bool physics:excludeFromArticulation = 1 + float physics:JointEquivalentInertia = 17.179354 + point3f physics:localPos0 = (0, 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 = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular"] + ) + { + float drive:angular:physics:damping = 1000 + float drive:angular:physics:stiffness = 25000 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 14.2974615 + point3f physics:localPos0 = (-0.4, 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 = -92.4 + float physics:upperLimit = 92.4 + } + + def PhysicsRevoluteJoint "P2_01" ( + prepend apiSchemas = ["PhysicsJointStateAPI:angular", "PhysicsDriveAPI:angular"] + ) + { + float drive:angular:physics:maxForce = 30000 + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + uniform token physics:axis = "Y" + custom rel physics:body0 = + custom rel physics:body1 = + float physics:breakForce = 3.4028235e38 + float physics:breakTorque = 3.4028235e38 + bool physics:jointEnabled = 1 + float physics:JointEquivalentInertia = 14.2974615 + point3f physics:localPos0 = (0, 0, 1.05) + point3f physics:localPos1 = (-0.4, 0, 0) + quatf physics:localRot0 = (1, 0, 0, 0) + quatf physics:localRot1 = (1, 0, 0, 0) + float physics:lowerLimit = -92.4 + float physics:upperLimit = 92.4 + } + } + + over "robot_base" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.134, -0.00108, 0.126) + float3 physics:diagonalInertia = (7.687376, 16.201452, 21.301172) + float physics:mass = 231 + quatf physics:principalAxes = (0.9999671, -0.0011237451, -0.004589671, -0.006589902) + rel physics:simulationOwner + + over "collisions" + { + over "base" ( + instanceable = false + ) + { + over "mesh_1" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.239, -0.00235, -0.174) + float3 physics:diagonalInertia = (84.06112, 55.444748, 59.994137) + float physics:mass = 688 + quatf physics:principalAxes = (0.92065966, 0.087379746, 0.375578, -0.060759578) + rel physics:simulationOwner + + over "collisions" + { + over "j1" ( + instanceable = false + ) + { + over "mesh_3" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0199, -0.033, 0.456) + float3 physics:diagonalInertia = (34.434612, 33.75411, 5.681283) + float physics:mass = 262 + quatf physics:principalAxes = (0.9512119, -0.04569484, -0.021472054, -0.3043796) + rel physics:simulationOwner + + over "collisions" + { + over "j2" ( + instanceable = false + ) + { + over "mesh_5" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J3_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.187, 0.00296, 0.156) + float3 physics:diagonalInertia = (4.2291126, 39.208206, 38.522682) + float physics:mass = 244 + quatf physics:principalAxes = (0.9983505, 0.04838516, -0.030831316, -0.0021219868) + rel physics:simulationOwner + + over "collisions" + { + over "j3" ( + instanceable = false + ) + { + over "mesh_7" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J4_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (1.12, -0.0072, -0.000274) + float3 physics:diagonalInertia = (0.10420503, 0.22880441, 0.22099057) + float physics:mass = 18.7 + quatf physics:principalAxes = (0.9990224, 0.01888703, 0.0011255937, -0.039954375) + rel physics:simulationOwner + + over "collisions" + { + over "j4" ( + instanceable = false + ) + { + over "mesh_9" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J5_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.0531, -0.0259, 1.1e-9) + float3 physics:diagonalInertia = (0.2578407, 0.3531593, 0.413) + float physics:mass = 29.7 + quatf physics:principalAxes = (0.9506683, 0, 0, 0.31020936) + rel physics:simulationOwner + + over "collisions" + { + over "j5" ( + instanceable = false + ) + { + over "mesh_11" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "J6_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (0.243, 1.07e-10, 0.00009370001) + float3 physics:diagonalInertia = (0.019699998, 0.0101, 0.0101999985) + float physics:mass = 2.76 + quatf physics:principalAxes = (1, 0, -0.00013947369, 0) + rel physics:simulationOwner + + over "collisions" + { + over "j6" ( + instanceable = false + ) + { + over "mesh_13" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P1_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-0.108, 0.127, -0.0139) + float3 physics:diagonalInertia = (0.5249492, 1.6629251, 1.2701255) + float physics:mass = 45.4 + quatf physics:principalAxes = (0.999653, -0.002589969, -0.0068606837, 0.0253015) + rel physics:simulationOwner + + over "collisions" + { + over "p1" ( + instanceable = false + ) + { + over "mesh_15" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + over "P2_link" ( + prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"] + ) + { + point3f physics:centerOfMass = (-2.38e-19, 0.0973, 0.526) + float3 physics:diagonalInertia = (2.07, 2.08, 0.031799693) + float physics:mass = 18.9 + quatf physics:principalAxes = (1, -0.00019309639, 0, 0) + rel physics:simulationOwner + + over "collisions" + { + over "p2" ( + instanceable = false + ) + { + over "mesh_17" ( + prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + } + } + } + } + + def PhysicsFixedJoint "root_joint" ( + prepend apiSchemas = ["PhysicsArticulationRootAPI"] + ) + { + rel physics:body1 = + } +} + diff --git a/fanuc_m900ib360e/payloads/Physics/physx.usda b/fanuc_m900ib360e/payloads/Physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..a40f1c03647827787dd042d4648ec0cbb2cfdaeb --- /dev/null +++ b/fanuc_m900ib360e/payloads/Physics/physx.usda @@ -0,0 +1,97 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib360e" + metersPerUnit = 1 + subLayers = [ + @./physics.usda@ + ] + upAxis = "Z" +) + +def "m900ib360e" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 104.99999 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 99.99999 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } +} + diff --git a/fanuc_m900ib360e/payloads/Sensor/none.usda b/fanuc_m900ib360e/payloads/Sensor/none.usda new file mode 100644 index 0000000000000000000000000000000000000000..7b078a0d46621638457a2bda19d497dbcd4bf538 --- /dev/null +++ b/fanuc_m900ib360e/payloads/Sensor/none.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib360e" + metersPerUnit = 1 + upAxis = "Z" +) + +def "m900ib360e" +{ +} + diff --git a/fanuc_m900ib360e/payloads/Sensor/sensors.usda b/fanuc_m900ib360e/payloads/Sensor/sensors.usda new file mode 100644 index 0000000000000000000000000000000000000000..94f3b99718e799328911f2976a64d7f185955617 --- /dev/null +++ b/fanuc_m900ib360e/payloads/Sensor/sensors.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib360e" + metersPerUnit = 1 + upAxis = "Z" +) + +def Xform "m900ib360e" +{ +} + diff --git a/fanuc_m900ib360e/payloads/base.usda b/fanuc_m900ib360e/payloads/base.usda new file mode 100644 index 0000000000000000000000000000000000000000..80804b0672f40c9106376c836496707f76fd39f7 --- /dev/null +++ b/fanuc_m900ib360e/payloads/base.usda @@ -0,0 +1,450 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib360e" + metersPerUnit = 1 + subLayers = [ + @./robot.usda@ + ] + upAxis = "Z" +) + +def Xform "m900ib360e" +{ + 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 "robot_base" + { + 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 "wbase" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.8500000238418579) + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "base" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J3_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 1.899999976158142) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j3" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j3" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J4_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 2.0999999046325684) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j4" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j4" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J5_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.6200000047683716, 0, 2.0999999046325684) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "j5" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j5" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "J6_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (1.6200000047683716, 0, 2.0999999046325684) + 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.25999999046325684, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "ee_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 "fanuc_flange" + { + quatd xformOp:orient = (-3.0908619663705394e-8, 0.7071067690849304, 3.0908619663705394e-8, 0.7071067690849304) + 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 "j6" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "j6" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P1_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0.3700000047683716, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p1" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p1" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Xform "P2_link" + { + quatd xformOp:orient = (1, 0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (-0.030000001192092896, 0, 0.8500000238418579) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] + + def Xform "visuals" ( + instanceable = false + ) + { + def Xform "p2" ( + 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" ( + apiSchemas = None + instanceable = false + ) + { + rel physics:simulationOwner + + def Xform "p2" ( + instanceable = true + prepend references = @./instances.usda@ + ) + { + uniform token purpose = "guide" + token visibility = "inherited" + } + } + } + + def Scope "VisualMaterials" + { + } +} + diff --git a/fanuc_m900ib360e/payloads/geometries.usd b/fanuc_m900ib360e/payloads/geometries.usd new file mode 100644 index 0000000000000000000000000000000000000000..0fd26c0a343e9a996c817b5d74e93047aac4bae3 --- /dev/null +++ b/fanuc_m900ib360e/payloads/geometries.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0726436aaaa5d05e290fa30dc8981b0a5cf3f444ded15235349820b1ededf92 +size 6609723 diff --git a/fanuc_m900ib360e/payloads/instances.usda b/fanuc_m900ib360e/payloads/instances.usda new file mode 100644 index 0000000000000000000000000000000000000000..608bb8f51c6d54af4b3cf8119922160a9368b96f --- /dev/null +++ b/fanuc_m900ib360e/payloads/instances.usda @@ -0,0 +1,1403 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Instances" +{ + def Xform "mesh" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_0" ( + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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_2" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7803922, 0.5647059, 0.1098039) + 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_3" ( + 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_4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7529413, 0.7529413, 0.7529413) + 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_5" ( + 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_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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_6" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6862745, 0.7686275, 0.8666667) + 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_7" ( + 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_5" ( + 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_8" ( + 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 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_4" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.7529413, 0.7529413, 0.7529413) + 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_5" ( + 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_7" ( + 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_1" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8000001, 0.8000001, 0.8000001) + 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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_2" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_3" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_4" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_5" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_6" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_9" ( + 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_10" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.8980393, 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_11" ( + instanceable = true + prepend references = @./materials.usda@ + ) + { + token outputs:surface.connect = + + def Shader "SimReadyPreviewSurface" + { + token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor = (0.6980392, 0.4980392, 0.09803922) + 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.6980392, 0.6980392, 0.6980392) + 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_8" ( + 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_7" ( + 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_13" ( + 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_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" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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 "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 "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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_5" ( + 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_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 "Material_5" ( + 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", "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_14" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_14" + { + over "Material_0" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + over "Material_1" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + } + + def Scope "VisualMaterials" + { + def Material "Material_5" ( + 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_7" ( + 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 "mesh_15" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_15" ( + 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_16" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_16" ( + apiSchemas = ["MaterialBindingAPI"] + ) + { + custom rel material:binding + prepend rel material:binding = + } + + def Scope "VisualMaterials" + { + def Material "Material_7" ( + 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 "mesh_17" ( + prepend references = @./geometries.usd@ + ) + { + over "mesh_17" ( + 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/fanuc_m900ib360e/payloads/materials.usda b/fanuc_m900ib360e/payloads/materials.usda new file mode 100644 index 0000000000000000000000000000000000000000..f078ac1189f5de0233b567b981ee5a40fb610b69 --- /dev/null +++ b/fanuc_m900ib360e/payloads/materials.usda @@ -0,0 +1,2270 @@ +#usda 1.0 +( + customLayerData = { + } + metersPerUnit = 1 + upAxis = "Z" +) + +def Scope "Materials" +{ + def Material "Material_0" + { + 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 "Material_0" ( + 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" + 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_1" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_1" ( + 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.8000001, 0.8000001, 0.8000001) ( + 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.8000001, 0.8000001, 0.8000001) + 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_2" + { + 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 "Material_2" ( + 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.7803922, 0.5647059, 0.1098039) ( + 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.7803922, 0.5647059, 0.1098039) + 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_3" + { + 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 "Material_3" ( + 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" + 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_4" + { + 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 "Material_4" ( + 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.7529413, 0.7529413, 0.7529413) ( + 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.7529413, 0.7529413, 0.7529413) + 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_5" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_5" ( + 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" + 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 = "steel" + 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 "Material_6" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_0" ( + 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.6862745, 0.7686275, 0.8666667) ( + 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.6862745, 0.7686275, 0.8666667) + 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_7" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_1" ( + 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) ( + 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, 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_8" + { + 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 "Material_3" ( + 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) ( + 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, 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_10" + { + 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 "Material_1" ( + 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.8980393, 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.8980393, 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_11" + { + custom token[] omni:simready:nonvisual:attributes = ["none"] + custom token omni:simready:nonvisual:base = "steel" + 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 "Material_2" ( + 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.6980392, 0.4980392, 0.09803922) ( + 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.6980392, 0.4980392, 0.09803922) + 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 = "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 "Material_3" ( + 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.6980392, 0.6980392, 0.6980392) ( + 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.6980392, 0.6980392, 0.6980392) + 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 = "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 "Material_6" ( + 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" + 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/fanuc_m900ib360e/payloads/robot.usda b/fanuc_m900ib360e/payloads/robot.usda new file mode 100644 index 0000000000000000000000000000000000000000..b46196316da87dfc4adbc85a75af3c77929774ae --- /dev/null +++ b/fanuc_m900ib360e/payloads/robot.usda @@ -0,0 +1,202 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib360e" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib360e" ( + prepend apiSchemas = ["IsaacRobotAPI"] +) +{ + string[] isaac:changelog ( + displayName = "Changelog" + ) + string isaac:description ( + displayName = "Description" + ) + token isaac:license ( + displayName = "License" + ) + string isaac:namespace ( + displayName = "Namespace" + ) + 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 "J1" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + + over "P2_01" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + bool[] isaac:actuator ( + displayName = "Actuator" + ) + string isaac:NameOverride ( + displayName = "Joint Name Override" + ) + token[] isaac:physics:DofOffsetOpOrder ( + displayName = "Dof Offset Op Order" + ) + } + } + + over "robot_base" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J3_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J4_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J5_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "J6_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P1_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "P2_link" ( + prepend apiSchemas = ["IsaacLinkAPI"] + ) + { + string isaac:nameOverride + } + + over "root_joint" ( + prepend apiSchemas = ["IsaacJointAPI"] + ) + { + } +} + diff --git a/fanuc_m900ib360e/runnables/physics/mujoco.usda b/fanuc_m900ib360e/runnables/physics/mujoco.usda new file mode 100644 index 0000000000000000000000000000000000000000..4bb40cbd3eccc0807b24d99d4238218c93ba9a88 --- /dev/null +++ b/fanuc_m900ib360e/runnables/physics/mujoco.usda @@ -0,0 +1,296 @@ +#usda 1.0 +( + defaultPrim = "m900ib360e" +) + +def "m900ib360e" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["MjcCollisionAPI", "PhysicsMeshCollisionAPI", "MjcMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J3" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J4" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J5" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "J6" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + + over "P2_01" ( + prepend apiSchemas = ["MjcJointAPI"] + ) + { + } + } + + def "MuJoCoActuators" + { + def MjcActuator "act_m900ib360e_joints_J1" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 20000 + double mjc:forceRange:min = -20000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib360e_joints_J2" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib360e_joints_J3" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 30000 + double mjc:forceRange:min = -30000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib360e_joints_J4" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 6000 + double mjc:forceRange:min = -6000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib360e_joints_J5" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 6000 + double mjc:forceRange:min = -6000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + + def MjcActuator "act_m900ib360e_joints_J6" ( + 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, -1432394.4878270582, -57295.77951308232] + token mjc:biasType = "affine" + token mjc:ctrlLimited = "false" + token mjc:forceLimited = "true" + double mjc:forceRange:max = 4000 + double mjc:forceRange:min = -4000 + double[] mjc:gainPrm = [1] + token mjc:gainType = "fixed" + rel mjc:target = + } + } +} + diff --git a/fanuc_m900ib360e/runnables/physics/newton.usda b/fanuc_m900ib360e/runnables/physics/newton.usda new file mode 100644 index 0000000000000000000000000000000000000000..1d706f7e40efd9688afc2879e0de99f6c92b9876 --- /dev/null +++ b/fanuc_m900ib360e/runnables/physics/newton.usda @@ -0,0 +1,252 @@ +#usda 1.0 +( + defaultPrim = "m900ib360e" +) + +over "m900ib360e" +{ + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + prepend apiSchemas = ["NewtonCollisionAPI", "NewtonMeshCollisionAPI", "PhysicsMeshCollisionAPI"] + ) + { + uniform token physics:approximation = "convexHull" + } + } + } + } + + over "root_joint" ( + prepend apiSchemas = ["NewtonArticulationRootAPI"] + ) + { + bool newton:selfCollisionEnabled = 0 + } + + over "joints" + { + over "J1" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 6818.182 + float newton:damping = 227.27274 + float newton:velocityLimit = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 10714.286 + float newton:damping = 357.14288 + float newton:velocityLimit = 104.99999 + } + + over "J3" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 11250.001 + float newton:damping = 375.00003 + float newton:velocityLimit = 99.99999 + } + + over "J4" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2045.4547 + float newton:damping = 68.18182 + float newton:velocityLimit = 109.99999 + } + + over "J5" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 2045.4547 + float newton:damping = 68.18182 + float newton:velocityLimit = 109.99999 + } + + over "J6" ( + prepend apiSchemas = ["NewtonJointAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 833.3333 + float newton:damping = 27.777779 + float newton:velocityLimit = 180 + } + + over "P1" ( + prepend apiSchemas = ["NewtonJointAPI", "NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = -0 + float newton:mimicCoef1 = -1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + uniform bool physics:excludeFromArticulation = 0 + } + + over "P2" ( + prepend apiSchemas = ["NewtonJointAPI", "NewtonMimicAPI"] + ) + { + float drive:angular:physics:damping = 0 + float drive:angular:physics:stiffness = 0 + float newton:mimicCoef0 = -0 + float newton:mimicCoef1 = 1 + bool newton:mimicEnabled = 1 + rel newton:mimicJoint = + } + + over "P2_01" + { + uniform bool physics:excludeFromArticulation = 1 + } + } +} + diff --git a/fanuc_m900ib360e/runnables/physics/physx.usda b/fanuc_m900ib360e/runnables/physics/physx.usda new file mode 100644 index 0000000000000000000000000000000000000000..adc62118ce845984f30523976c2844ac1cacad1a --- /dev/null +++ b/fanuc_m900ib360e/runnables/physics/physx.usda @@ -0,0 +1,229 @@ +#usda 1.0 +( + customLayerData = { + } + defaultPrim = "m900ib360e" + metersPerUnit = 1 + upAxis = "Z" +) + +over "m900ib360e" +{ + over "joints" + { + over "J1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 104.99999 + } + + over "J3" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 99.99999 + } + + over "J4" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J5" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 109.99999 + } + + over "J6" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + float physxJoint:maxJointVelocity = 180 + } + + over "P1" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = 1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysxMimicJointAPI:rotY", "PhysicsJointStateAPI:angular"] + ) + { + custom float physxMimicJoint:rotY:dampingRatio = 0.005 + float physxMimicJoint:rotY:gearing = -1 + custom float physxMimicJoint:rotY:naturalFrequency = 25 + float physxMimicJoint:rotY:offset = 0 + rel physxMimicJoint:rotY:referenceJoint = + } + + over "P2_01" ( + prepend apiSchemas = ["PhysxJointAPI", "PhysicsJointStateAPI:angular"] + ) + { + } + } + + over "root_joint" ( + prepend apiSchemas = ["PhysxArticulationAPI"] + ) + { + bool physxArticulation:enabledSelfCollisions = 0 + int physxArticulation:solverPositionIterationCount = 32 + int physxArticulation:solverVelocityIterationCount = 1 + } + + over "robot_base" + { + over "collisions" + { + over "base" + { + over "mesh_1" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J1_link" + { + over "collisions" + { + over "j1" + { + over "mesh_3" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J2_link" + { + over "collisions" + { + over "j2" + { + over "mesh_5" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J3_link" + { + over "collisions" + { + over "j3" + { + over "mesh_7" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J4_link" + { + over "collisions" + { + over "j4" + { + over "mesh_9" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J5_link" + { + over "collisions" + { + over "j5" + { + over "mesh_11" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "J6_link" + { + over "collisions" + { + over "j6" + { + over "mesh_13" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P1_link" + { + over "collisions" + { + over "p1" + { + over "mesh_15" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } + + over "P2_link" + { + over "collisions" + { + over "p2" + { + over "mesh_17" ( + ) + { + token physics:approximation = "convexHull" + } + } + } + } +} +