diff --git a/object_place2/glue/.collect.mapping.json b/object_place2/glue/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..8e3479f326841fadc71078142d78416ea3b4c8a2 --- /dev/null +++ b/object_place2/glue/.collect.mapping.json @@ -0,0 +1,149 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base2_converted.usd", + "source_hash": "8d123c7177d146075506b7b753f48e18703f80c7", + "target_url": "./095_glue_base2_converted.usd", + "target_hash": "ff15b5730793bac304aa358d7ef11f8b7aaea38b" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_diffuse.png", + "source_hash": "7f36c57325b60e33c71a629c927a245d938bf012", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_diffuse.png", + "target_hash": "2661ad531f36eeebb11d12a683dbcdfc1fc962d1" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "5ba289352e01e47d4c698848d9d5bf5ed243a181", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "fafaf0d6eeb2dee0401dde5688340d0cdde0f2c9" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_normal.png", + "source_hash": "fbbacd0f97dca502e64eeb32e9928d852cb78893", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_normal.png", + "target_hash": "dbee750a0fb796855d08f5f5a2e46907200d8618" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base4_converted.usd", + "source_hash": "72e314691d1cd75efa18fa31661ebc33ff393272", + "target_url": "./095_glue_base4_converted.usd", + "target_hash": "9ba9cd0515cfec15bcf482eddce45de95a9307ce" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_diffuse.png", + "source_hash": "20df3dfb40523d6091bd15f405ab63dfa3d08b27", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_diffuse.png", + "target_hash": "c5b75f30e17eb615e25143df98ca49999c8358cf" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "3a614086cc156adda4f8ba98efd861fe2a90a17a", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "d645b3f862a2dbd446ff2759e8b448d841351e79" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_normal.png", + "source_hash": "fe4e9b95ec7f93872737cd6f03f35b8db0e21f6b", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_normal.png", + "target_hash": "8646dcebc5bb144d0e7df3ae4b2df2559018ee49" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base5_converted.usd", + "source_hash": "ae9adbf29a0beb3f926c8fe6935359d8d6c68112", + "target_url": "./095_glue_base5_converted.usd", + "target_hash": "97c66bfe4dba12f7401f66b3223787a43abfea40" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_diffuse.png", + "source_hash": "3dbd0261a42c0a87dc6772104e893fa4fd102263", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_diffuse.png", + "target_hash": "5c4e33c51c3025e51a558b1bbc263c0a9f1f9155" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "3c28aa4568002a91c176980c080971d7d3961527", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "a8234e6796e6ee9b8d8fb175a838f4379b9015c1" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_normal.png", + "source_hash": "10dcbc20db5589b0f1f13cf62a4f411eb79daad3", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_normal.png", + "target_hash": "ac55beec7c6372272ab1d79113e96d9a5f17f44b" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base0_converted.usd", + "source_hash": "95c7d8be9cf9f57a750859a6055783309e4aa918", + "target_url": "./095_glue_base0_converted.usd", + "target_hash": "1dc43ba9872cca53116a13ab95b47916f0506916" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_diffuse.png", + "source_hash": "35fbb70825062926ae29065ef89e81eea6aef58b", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_diffuse.png", + "target_hash": "233b64db47077f82a75c4db0983eb0fd4b265e10" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "5a15da22125f3facc7fd8ca9803c488ae76fee27", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "c3ff1460fe555f9ea7919109c6cbbfbb12ece1b2" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_normal.png", + "source_hash": "782d0fc5c363c5198f6483feb3847c1007ab63fe", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_normal.png", + "target_hash": "3415b672918d2671074c48d4d865d348b5dd4ce9" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base1_converted.usd", + "source_hash": "1b0cbb8ce9071f3fbfd4a6cacdb85d9830b398dc", + "target_url": "./095_glue_base1_converted.usd", + "target_hash": "83fefbe876e6e7cf4b29b44e453e9cd4a2605190" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_diffuse.png", + "source_hash": "e175fd3bee644ec6af17b93f71a5cef76ee81eac", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_diffuse.png", + "target_hash": "070189ffe259b5ef14f4e5caca0ed5d861013334" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "bc95c43f05601567581108a0b7dd8f188267cd20", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "39d7813aa144b0ef2378118788de47aa34e582cf" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_normal.png", + "source_hash": "6983699473d31217d2fa5520f89eb66253618221", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_normal.png", + "target_hash": "e902188595037e22191653700c90662d5dcb602c" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base6_converted.usd", + "source_hash": "eae0de43618598d48b76e6f7d083727bbca8f528", + "target_url": "./095_glue_base6_converted.usd", + "target_hash": "907846c4b8774c2a8998e4855e690630257b6999" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_diffuse.png", + "source_hash": "01bf5850d2eb7e6ed39b2acc8f9b976ea27b9c00", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_diffuse.png", + "target_hash": "481bdfc5d7116d00d24f016b1167a38325f898bf" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "eb8bec40a2b55f488d286a0d0e390d4ad2ee99bc", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "f70bcdd573c5293d20b1e801a5dc76629a72a6be" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_normal.png", + "source_hash": "aa027556e4eab8ff22d165b256e6ac34a8d177f1", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_normal.png", + "target_hash": "c2ce93f080a6162344d0538757775ccd87b1691a" + } + ] +} \ No newline at end of file diff --git a/object_place2/glue/base0.usda b/object_place2/glue/base0.usda new file mode 100644 index 0000000000000000000000000000000000000000..64c3ad2ea720b8d1f0dfa9935f974f39c045edc5 --- /dev/null +++ b/object_place2/glue/base0.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base0" ( + prepend payload = @./base0.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/glue/base1.usda b/object_place2/glue/base1.usda new file mode 100644 index 0000000000000000000000000000000000000000..33880493dc64eeb52a84ab54c7fd980b63ee1596 --- /dev/null +++ b/object_place2/glue/base1.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base1" ( + prepend payload = @./base1.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/glue/base2.usda b/object_place2/glue/base2.usda new file mode 100644 index 0000000000000000000000000000000000000000..78ad472d0393aece98afe0720780e05678adcc46 --- /dev/null +++ b/object_place2/glue/base2.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base2" ( + prepend payload = @./base2.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/glue/base3.usda b/object_place2/glue/base3.usda new file mode 100644 index 0000000000000000000000000000000000000000..9209fe1edc7cce283234090329801e290e8a123f --- /dev/null +++ b/object_place2/glue/base3.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base3" ( + prepend payload = @./base3.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/glue_eval/.collect.mapping.json b/object_place2/glue_eval/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..8e3479f326841fadc71078142d78416ea3b4c8a2 --- /dev/null +++ b/object_place2/glue_eval/.collect.mapping.json @@ -0,0 +1,149 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base2_converted.usd", + "source_hash": "8d123c7177d146075506b7b753f48e18703f80c7", + "target_url": "./095_glue_base2_converted.usd", + "target_hash": "ff15b5730793bac304aa358d7ef11f8b7aaea38b" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_diffuse.png", + "source_hash": "7f36c57325b60e33c71a629c927a245d938bf012", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_diffuse.png", + "target_hash": "2661ad531f36eeebb11d12a683dbcdfc1fc962d1" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "5ba289352e01e47d4c698848d9d5bf5ed243a181", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "fafaf0d6eeb2dee0401dde5688340d0cdde0f2c9" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_normal.png", + "source_hash": "fbbacd0f97dca502e64eeb32e9928d852cb78893", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base2_converted/textures/texture_normal.png", + "target_hash": "dbee750a0fb796855d08f5f5a2e46907200d8618" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base4_converted.usd", + "source_hash": "72e314691d1cd75efa18fa31661ebc33ff393272", + "target_url": "./095_glue_base4_converted.usd", + "target_hash": "9ba9cd0515cfec15bcf482eddce45de95a9307ce" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_diffuse.png", + "source_hash": "20df3dfb40523d6091bd15f405ab63dfa3d08b27", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_diffuse.png", + "target_hash": "c5b75f30e17eb615e25143df98ca49999c8358cf" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "3a614086cc156adda4f8ba98efd861fe2a90a17a", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "d645b3f862a2dbd446ff2759e8b448d841351e79" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_normal.png", + "source_hash": "fe4e9b95ec7f93872737cd6f03f35b8db0e21f6b", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base4_converted/textures/texture_normal.png", + "target_hash": "8646dcebc5bb144d0e7df3ae4b2df2559018ee49" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base5_converted.usd", + "source_hash": "ae9adbf29a0beb3f926c8fe6935359d8d6c68112", + "target_url": "./095_glue_base5_converted.usd", + "target_hash": "97c66bfe4dba12f7401f66b3223787a43abfea40" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_diffuse.png", + "source_hash": "3dbd0261a42c0a87dc6772104e893fa4fd102263", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_diffuse.png", + "target_hash": "5c4e33c51c3025e51a558b1bbc263c0a9f1f9155" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "3c28aa4568002a91c176980c080971d7d3961527", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "a8234e6796e6ee9b8d8fb175a838f4379b9015c1" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_normal.png", + "source_hash": "10dcbc20db5589b0f1f13cf62a4f411eb79daad3", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base5_converted/textures/texture_normal.png", + "target_hash": "ac55beec7c6372272ab1d79113e96d9a5f17f44b" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base0_converted.usd", + "source_hash": "95c7d8be9cf9f57a750859a6055783309e4aa918", + "target_url": "./095_glue_base0_converted.usd", + "target_hash": "1dc43ba9872cca53116a13ab95b47916f0506916" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_diffuse.png", + "source_hash": "35fbb70825062926ae29065ef89e81eea6aef58b", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_diffuse.png", + "target_hash": "233b64db47077f82a75c4db0983eb0fd4b265e10" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "5a15da22125f3facc7fd8ca9803c488ae76fee27", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "c3ff1460fe555f9ea7919109c6cbbfbb12ece1b2" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_normal.png", + "source_hash": "782d0fc5c363c5198f6483feb3847c1007ab63fe", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base0_converted/textures/texture_normal.png", + "target_hash": "3415b672918d2671074c48d4d865d348b5dd4ce9" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base1_converted.usd", + "source_hash": "1b0cbb8ce9071f3fbfd4a6cacdb85d9830b398dc", + "target_url": "./095_glue_base1_converted.usd", + "target_hash": "83fefbe876e6e7cf4b29b44e453e9cd4a2605190" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_diffuse.png", + "source_hash": "e175fd3bee644ec6af17b93f71a5cef76ee81eac", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_diffuse.png", + "target_hash": "070189ffe259b5ef14f4e5caca0ed5d861013334" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "bc95c43f05601567581108a0b7dd8f188267cd20", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "39d7813aa144b0ef2378118788de47aa34e582cf" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_normal.png", + "source_hash": "6983699473d31217d2fa5520f89eb66253618221", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base1_converted/textures/texture_normal.png", + "target_hash": "e902188595037e22191653700c90662d5dcb602c" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_object/glue/095_glue_base6_converted.usd", + "source_hash": "eae0de43618598d48b76e6f7d083727bbca8f528", + "target_url": "./095_glue_base6_converted.usd", + "target_hash": "907846c4b8774c2a8998e4855e690630257b6999" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_diffuse.png", + "source_hash": "01bf5850d2eb7e6ed39b2acc8f9b976ea27b9c00", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_diffuse.png", + "target_hash": "481bdfc5d7116d00d24f016b1167a38325f898bf" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "eb8bec40a2b55f488d286a0d0e390d4ad2ee99bc", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "f70bcdd573c5293d20b1e801a5dc76629a72a6be" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_normal.png", + "source_hash": "aa027556e4eab8ff22d165b256e6ac34a8d177f1", + "target_url": "./saved/assets/scene_usds/IROS_scenes/object_place2/glue/095_glue_base6_converted/textures/texture_normal.png", + "target_hash": "c2ce93f080a6162344d0538757775ccd87b1691a" + } + ] +} \ No newline at end of file diff --git a/object_place2/glue_eval/base0.usda b/object_place2/glue_eval/base0.usda new file mode 100644 index 0000000000000000000000000000000000000000..64c3ad2ea720b8d1f0dfa9935f974f39c045edc5 --- /dev/null +++ b/object_place2/glue_eval/base0.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base0" ( + prepend payload = @./base0.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/glue_eval/base1.usda b/object_place2/glue_eval/base1.usda new file mode 100644 index 0000000000000000000000000000000000000000..33880493dc64eeb52a84ab54c7fd980b63ee1596 --- /dev/null +++ b/object_place2/glue_eval/base1.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base1" ( + prepend payload = @./base1.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/glue_eval/base2.usda b/object_place2/glue_eval/base2.usda new file mode 100644 index 0000000000000000000000000000000000000000..78ad472d0393aece98afe0720780e05678adcc46 --- /dev/null +++ b/object_place2/glue_eval/base2.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base2" ( + prepend payload = @./base2.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/glue_eval/base3.usda b/object_place2/glue_eval/base3.usda new file mode 100644 index 0000000000000000000000000000000000000000..9209fe1edc7cce283234090329801e290e8a123f --- /dev/null +++ b/object_place2/glue_eval/base3.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base3" ( + prepend payload = @./base3.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/glue_eval/base4.usda b/object_place2/glue_eval/base4.usda new file mode 100644 index 0000000000000000000000000000000000000000..57906f183998298f6acffc231c728f8b80465902 --- /dev/null +++ b/object_place2/glue_eval/base4.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base4" ( + prepend payload = @./base4.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/glue_eval/base5.usda b/object_place2/glue_eval/base5.usda new file mode 100644 index 0000000000000000000000000000000000000000..024bf3108ded67127032b24221fe011b28ac0ebb --- /dev/null +++ b/object_place2/glue_eval/base5.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base5" ( + prepend payload = @./base5.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/objaverse_usd/398c1b3b8114409a89eb02f9b42f8064.usda b/object_place2/objaverse_usd/398c1b3b8114409a89eb02f9b42f8064.usda new file mode 100644 index 0000000000000000000000000000000000000000..0d457482e98a7398ab47fa73fe3f289368b0d2ce --- /dev/null +++ b/object_place2/objaverse_usd/398c1b3b8114409a89eb02f9b42f8064.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_398c1b3b8114409a89eb02f9b42f8064" ( + prepend payload = @./398c1b3b8114409a89eb02f9b42f8064.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/objaverse_usd/74c95870e2a141a9903815715d25b8a7.usda b/object_place2/objaverse_usd/74c95870e2a141a9903815715d25b8a7.usda new file mode 100644 index 0000000000000000000000000000000000000000..350b00d6b9c148072f7b279c10f688721e1c2506 --- /dev/null +++ b/object_place2/objaverse_usd/74c95870e2a141a9903815715d25b8a7.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_74c95870e2a141a9903815715d25b8a7" ( + prepend payload = @./74c95870e2a141a9903815715d25b8a7.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/objaverse_usd/f8a2cdc9970846da95585a428697d173.usda b/object_place2/objaverse_usd/f8a2cdc9970846da95585a428697d173.usda new file mode 100644 index 0000000000000000000000000000000000000000..08f1cb9b41d190ab175bfd84da66077261cc39c4 --- /dev/null +++ b/object_place2/objaverse_usd/f8a2cdc9970846da95585a428697d173.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_f8a2cdc9970846da95585a428697d173" ( + prepend payload = @./f8a2cdc9970846da95585a428697d173.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Num5e5507e87d6a6300013c8091.mdl b/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Num5e5507e87d6a6300013c8091.mdl new file mode 100644 index 0000000000000000000000000000000000000000..aeb7dcdc009e7ab1585cdda1e9e73fe6fc461a01 --- /dev/null +++ b/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Num5e5507e87d6a6300013c8091.mdl @@ -0,0 +1,284 @@ +mdl 1.6; + +import ::math::*; +import ::state::*; +import ::tex::*; +import ::anno::*; +using OmniUe4Function import *; +using OmniUe4Base import *; + +export annotation sampler_color(); +export annotation sampler_normal(); +export annotation sampler_grayscale(); +export annotation sampler_alpha(); +export annotation sampler_masks(); +export annotation sampler_distancefield(); +export annotation dither_masked_off(); +export annotation world_space_normal(); + +export material Num5e5507e87d6a6300013c8091( + uniform texture_2d Normal_Tex = texture_2d("./Textures/normal.png",::tex::gamma_linear) + [[ + anno::display_name("Normal_Tex"), + anno::ui_order(32), + anno::in_group("Normal"), + sampler_normal() + ]], + float4 Normal_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Normal_UVA"), + anno::ui_order(32), + anno::in_group("Normal") + ]], + float EmissiveIntensity = 0.0 + [[ + anno::display_name("EmissiveIntensity"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + float IsEmissiveTex = 0.0 + [[ + anno::display_name("IsEmissiveTex"), + anno::in_group("EmissiveColor") + ]], + float4 Emissive_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("Emissive_Color"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + uniform texture_2d Emissive_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Emissive_Tex"), + anno::ui_order(32), + anno::in_group("EmissiveColor"), + sampler_color() + ]], + float4 Emissive_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Emissive_UVA"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + float IsBaseColorTex = 0.0 + [[ + anno::display_name("IsBaseColorTex"), + anno::in_group("BaseColor") + ]], + float4 BaseColor_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("BaseColor_Color"), + anno::ui_order(32), + anno::in_group("BaseColor") + ]], + uniform texture_2d BaseColor_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("BaseColor_Tex"), + anno::ui_order(32), + anno::in_group("BaseColor"), + sampler_color() + ]], + float4 BaseColor_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("BaseColor_UVA"), + anno::ui_order(32), + anno::in_group("BaseColor") + ]], + float IsMetallicTex = 0.0 + [[ + anno::display_name("IsMetallicTex"), + anno::in_group("Metallic") + ]], + float4 Metallic_Color = float4(0.0,0.0,0.0,1.0) + [[ + anno::display_name("Metallic_Color"), + anno::ui_order(32), + anno::in_group("Metallic") + ]], + uniform texture_2d Metallic_Tex = texture_2d("./Textures/black.png",::tex::gamma_srgb) + [[ + anno::display_name("Metallic_Tex"), + anno::ui_order(32), + anno::in_group("Metallic"), + sampler_color() + ]], + float4 Metallic_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Metallic_UVA"), + anno::ui_order(32), + anno::in_group("Metallic") + ]], + float IsSpecularTex = 0.0 + [[ + anno::display_name("IsSpecularTex"), + anno::in_group("Specular") + ]], + float4 Specular_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("Specular_Color"), + anno::ui_order(32), + anno::in_group("Specular") + ]], + uniform texture_2d Specular_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Specular_Tex"), + anno::ui_order(32), + anno::in_group("Specular"), + sampler_color() + ]], + float4 Specular_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Specular_UVA"), + anno::ui_order(32), + anno::in_group("Specular") + ]], + float IsGlossTex = 0.0 + [[ + anno::display_name("IsGlossTex"), + anno::in_group("Roughness") + ]], + float4 Gloss_Color = float4(0.1,0.1,0.1,1.0) + [[ + anno::display_name("Gloss_Color"), + anno::ui_order(32), + anno::in_group("Roughness") + ]], + uniform texture_2d Gloss_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Gloss_Tex"), + anno::ui_order(32), + anno::in_group("Roughness"), + sampler_color() + ]], + float4 Gloss_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Gloss_UVA"), + anno::ui_order(32), + anno::in_group("Roughness") + ]], + float PolygonOffset = 0.0 + [[ + anno::display_name("PolygonOffset"), + anno::ui_order(32), + anno::in_group("WorldPosition") + ]], + int MaxTexCoordIndex = 3 + [[ + anno::hidden() + ]]) + = + let { + float3 Local82 = ::camera_position(); + float3 Local83 = (Local82 - (::convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), true)*state::meters_per_scene_unit()*100.0)); + float Local84 = math::dot(Local83, Local83); + float Local85 = math::sqrt(Local84); + float3 Local86 = (Local83 / Local85); + float3 Local87 = (Local86 * PolygonOffset); + + float3 WorldPositionOffset_mdl = Local87; + float2 CustomizedUV0_mdl = float2(state::texture_coordinate(math::min(0,MaxTexCoordIndex)).x,1.0-state::texture_coordinate(math::min(0,MaxTexCoordIndex)).y); + + float2 Local0 = (float2(0.5,0.5) * -1.0); + float Local1 = (CustomizedUV0_mdl.x * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).x); + float Local2 = (CustomizedUV0_mdl.y * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).y); + float2 Local3 = (Local0 + float2(Local1,Local2)); + float Local4 = (3.141592 * -2.0); + float Local5 = (float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).z / Local4); + float Local6 = (Local5 * 6.283185); + float Local7 = math::cos(Local6); + float Local8 = math::sin(Local6); + float Local9 = (Local8 * -1.0); + float Local10 = math::dot(Local3, float2(Local7,Local9)); + float Local11 = math::dot(Local3, float2(Local8,Local7)); + float2 Local12 = (float2(0.5,0.5) + float2(Local10,Local11)); + float4 Local13 = ::unpack_normal_map(tex::lookup_float4(Normal_Tex,float2(Local12.x,1.0-Local12.y),tex::wrap_repeat,tex::wrap_repeat)); + float3 Local14 = ((math::abs(1.0 - 1.0) > 0.00001) ? (float3(0.0,0.0,0.0)) : float3(Local13.x,Local13.y,Local13.z)); + + float3 Normal_mdl = Local14; + + float Local15 = (CustomizedUV0_mdl.x * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).x); + float Local16 = (CustomizedUV0_mdl.y * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).y); + float2 Local17 = (Local0 + float2(Local15,Local16)); + float Local18 = (float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).z / Local4); + float Local19 = (Local18 * 6.283185); + float Local20 = math::cos(Local19); + float Local21 = math::sin(Local19); + float Local22 = (Local21 * -1.0); + float Local23 = math::dot(Local17, float2(Local20,Local22)); + float Local24 = math::dot(Local17, float2(Local21,Local20)); + float2 Local25 = (float2(0.5,0.5) + float2(Local23,Local24)); + float4 Local26 = tex::lookup_float4(Emissive_Tex,float2(Local25.x,1.0-Local25.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local27 = ((math::abs(IsEmissiveTex - 1.0) > 0.00001) ? (float3(Emissive_Color.x,Emissive_Color.y,Emissive_Color.z)) : float3(Local26.x,Local26.y,Local26.z)); + float3 Local28 = (EmissiveIntensity * Local27); + float Local29 = (CustomizedUV0_mdl.x * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).x); + float Local30 = (CustomizedUV0_mdl.y * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).y); + float2 Local31 = (Local0 + float2(Local29,Local30)); + float Local32 = (float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).z / Local4); + float Local33 = (Local32 * 6.283185); + float Local34 = math::cos(Local33); + float Local35 = math::sin(Local33); + float Local36 = (Local35 * -1.0); + float Local37 = math::dot(Local31, float2(Local34,Local36)); + float Local38 = math::dot(Local31, float2(Local35,Local34)); + float2 Local39 = (float2(0.5,0.5) + float2(Local37,Local38)); + float4 Local40 = tex::lookup_float4(BaseColor_Tex,float2(Local39.x,1.0-Local39.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local41 = ((math::abs(IsBaseColorTex - 1.0) > 0.00001) ? (float3(BaseColor_Color.x,BaseColor_Color.y,BaseColor_Color.z)) : float3(Local40.x,Local40.y,Local40.z)); + float Local42 = (CustomizedUV0_mdl.x * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).x); + float Local43 = (CustomizedUV0_mdl.y * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).y); + float2 Local44 = (Local0 + float2(Local42,Local43)); + float Local45 = (float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).z / Local4); + float Local46 = (Local45 * 6.283185); + float Local47 = math::cos(Local46); + float Local48 = math::sin(Local46); + float Local49 = (Local48 * -1.0); + float Local50 = math::dot(Local44, float2(Local47,Local49)); + float Local51 = math::dot(Local44, float2(Local48,Local47)); + float2 Local52 = (float2(0.5,0.5) + float2(Local50,Local51)); + float4 Local53 = tex::lookup_float4(Metallic_Tex,float2(Local52.x,1.0-Local52.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local54 = ((math::abs(IsMetallicTex - 1.0) > 0.00001) ? (float3(Metallic_Color.x,Metallic_Color.y,Metallic_Color.z)) : float3(Local53.x,Local53.y,Local53.z)); + float Local55 = (CustomizedUV0_mdl.x * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).x); + float Local56 = (CustomizedUV0_mdl.y * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).y); + float2 Local57 = (Local0 + float2(Local55,Local56)); + float Local58 = (float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).z / Local4); + float Local59 = (Local58 * 6.283185); + float Local60 = math::cos(Local59); + float Local61 = math::sin(Local59); + float Local62 = (Local61 * -1.0); + float Local63 = math::dot(Local57, float2(Local60,Local62)); + float Local64 = math::dot(Local57, float2(Local61,Local60)); + float2 Local65 = (float2(0.5,0.5) + float2(Local63,Local64)); + float4 Local66 = tex::lookup_float4(Specular_Tex,float2(Local65.x,1.0-Local65.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local67 = ((math::abs(IsSpecularTex - 1.0) > 0.00001) ? (float3(Specular_Color.x,Specular_Color.y,Specular_Color.z)) : float3(Local66.x,Local66.y,Local66.z)); + float Local68 = (CustomizedUV0_mdl.x * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).x); + float Local69 = (CustomizedUV0_mdl.y * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).y); + float2 Local70 = (Local0 + float2(Local68,Local69)); + float Local71 = (float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).z / Local4); + float Local72 = (Local71 * 6.283185); + float Local73 = math::cos(Local72); + float Local74 = math::sin(Local72); + float Local75 = (Local74 * -1.0); + float Local76 = math::dot(Local70, float2(Local73,Local75)); + float Local77 = math::dot(Local70, float2(Local74,Local73)); + float2 Local78 = (float2(0.5,0.5) + float2(Local76,Local77)); + float4 Local79 = tex::lookup_float4(Gloss_Tex,float2(Local78.x,1.0-Local78.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local80 = ((math::abs(IsGlossTex - 1.0) > 0.00001) ? (float3(Gloss_Color.x,Gloss_Color.y,Gloss_Color.z)) : float3(Local79.x,Local79.y,Local79.z)); + float3 Local81 = (1.0 - Local80); + + float3 EmissiveColor_mdl = Local28; + float OpacityMask_mdl = 1.0; + float3 BaseColor_mdl = Local41; + float Metallic_mdl = Local54.x; + float Specular_mdl = Local67.x; + float Roughness_mdl = Local81.x; + + } in + ::OmniUe4Base( + base_color: BaseColor_mdl, + metallic: Metallic_mdl, + roughness: Roughness_mdl, + specular: Specular_mdl, + normal: Normal_mdl, + opacity: OpacityMask_mdl, + emissive_color: EmissiveColor_mdl, + displacement: WorldPositionOffset_mdl, + two_sided: false); diff --git a/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Base.mdl b/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Base.mdl @@ -0,0 +1,224 @@ +/*************************************************************************************************** + * Copyright 2020 NVIDIA Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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. + **************************************************************************************************/ + +//* 1.0.0 - first version +//* 1.0.1 - merge unlit template +//* 1.0.2 - Fix EDF in the back side: the EDF contained in surface is only used for the front side and not for the back side +//* 1.0.3 - UE4 normal mapping: Geometry normal shouldn't be changed +//* 1.0.4 - using absolute import paths when importing standard modules + +mdl 1.3; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::tex::*; +import ::anno::*; + +float emissive_multiplier() +[[ + anno::description("the multiplier to convert UE4 emissive to raw data"), + anno::noinline() +]] +{ + return 20.0f * 128.0f; +} + +float3 tangent_space_normal( + float3 normal = float3(0.0,0.0,1.0), + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0) +) +[[ + anno::description("Interprets the vector in tangent space"), + anno::noinline() +]] +{ + return math::normalize( + tangent_u * normal.x - /* flip_tangent_v */ + tangent_v * normal.y + + state::normal() * (normal.z)); +} + +float3 world_space_normal( + float3 normal = float3(0.0,0.0,1.0), + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0) +) +[[ + anno::description("Interprets the vector in world space"), + anno::noinline() +]] +{ + return tangent_space_normal( + math::normalize( + normal.x * float3(tangent_u.x, tangent_v.x, state::normal().x) - + normal.y * float3(tangent_u.y, tangent_v.y, state::normal().y) + + normal.z * float3(tangent_u.z, tangent_v.z, state::normal().z)), + tangent_u, + tangent_v + ); +} + +export material OmniUe4Base( + float3 base_color = float3(0.0, 0.0, 0.0), + float metallic = 0.0, + float roughness = 0.5, + float specular = 0.5, + float3 normal = float3(0.0,0.0,1.0), + float clearcoat_weight = 0.0, + float clearcoat_roughness = 0.0, + float3 clearcoat_normal = float3(0.0,0.0,1.0), + uniform bool enable_opacity = true, + float opacity = 1.0, + float3 emissive_color = float3(0.0, 0.0, 0.0), + float3 displacement = float3(0.0), + uniform bool is_tangent_space_normal = true, + uniform bool two_sided = false, + uniform bool is_unlit = false +) +[[ + anno::display_name("Omni UE4 Base"), + anno::description("Omni UE4 Base, supports UE4 default lit and clearcoat shading model"), + anno::version( 1, 0, 0), + anno::author("NVIDIA CORPORATION"), + anno::key_words(string[]("omni", "UE4", "omniverse", "lit", "clearcoat", "generic")) +]] + = let { + color final_base_color = math::saturate(base_color); + float final_metallic = math::saturate(metallic); + float final_roughness = math::saturate(roughness); + float final_specular = math::saturate(specular); + color final_emissive_color = math::max(emissive_color, 0.0f) * emissive_multiplier(); /*factor for converting ue4 emissive to raw value*/ + float final_clearcoat_weight = math::saturate(clearcoat_weight); + float final_clearcoat_roughness = math::saturate(clearcoat_roughness); + float3 final_normal = math::normalize(normal); + float3 final_clearcoat_normal = math::normalize(clearcoat_normal); + + // - compute final roughness by squaring the "roughness" parameter + float alpha = final_roughness * final_roughness; + // reduce the reflectivity at grazing angles to avoid "dark edges" for high roughness due to the layering + float grazing_refl = math::max((1.0 - final_roughness), 0.0); + + float3 the_normal = is_unlit ? state::normal() : + (is_tangent_space_normal ? + tangent_space_normal( + normal: final_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ) : world_space_normal( + normal: final_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + )); + + // for the dielectric component we layer the glossy component on top of the diffuse one, + // the glossy layer has no color tint + + bsdf dielectric_component = df::custom_curve_layer( + weight: final_specular, + normal_reflectivity: 0.08, + grazing_reflectivity: grazing_refl, + layer: df::microfacet_ggx_smith_bsdf(roughness_u: alpha), + base: df::diffuse_reflection_bsdf(tint: final_base_color), + normal: the_normal); + + // the metallic component doesn't have a diffuse component, it's only glossy + // base_color is applied to tint it + bsdf metallic_component = df::microfacet_ggx_smith_bsdf(tint: final_base_color, roughness_u: alpha); + + // final BSDF is a linear blend between dielectric and metallic component + bsdf dielectric_metal_mix = + df::normalized_mix( + components: + df::bsdf_component[]( + df::bsdf_component( + component: metallic_component, + weight: final_metallic), + df::bsdf_component( + component: dielectric_component, + weight: 1.0-final_metallic) + ) + ); + + // clearcoat layer + float clearcoat_grazing_refl = math::max((1.0 - final_clearcoat_roughness), 0.0); + float clearcoat_alpha = final_clearcoat_roughness * final_clearcoat_roughness; + + float3 the_clearcoat_normal = is_tangent_space_normal ? tangent_space_normal( + normal: final_clearcoat_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ) : world_space_normal( + normal: final_clearcoat_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ); + + + bsdf clearcoat = + df::custom_curve_layer( + base: df::weighted_layer( + layer: dielectric_metal_mix, + weight: 1.0, + normal: final_clearcoat_weight == 0.0 ? state::normal() : the_normal + ), + layer: df::microfacet_ggx_smith_bsdf( + roughness_u: clearcoat_alpha, + tint: color(1.0) + ), + normal_reflectivity: 0.04, + grazing_reflectivity: clearcoat_grazing_refl, + normal: the_clearcoat_normal, + weight: final_clearcoat_weight + ); + bsdf surface = is_unlit ? bsdf() : clearcoat; +} +in material( + thin_walled: two_sided, // Graphene? + surface: material_surface( + scattering: surface, + emission: + material_emission ( + emission: df::diffuse_edf (), + intensity: final_emissive_color + ) + ), + backface: material_surface( + emission: + material_emission ( + emission: df::diffuse_edf (), + intensity: final_emissive_color + ) + ), + geometry: material_geometry( + displacement: displacement, + normal: final_clearcoat_weight == 0.0 ? the_normal : state::normal(), + cutout_opacity: enable_opacity ? opacity : 1.0 + ) +); diff --git a/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Function.mdl b/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Function.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f0801afff6f0870ea2574c9e9b6e2043e79e9a79 --- /dev/null +++ b/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Function.mdl @@ -0,0 +1,1413 @@ +/*************************************************************************************************** + * Copyright 2020 NVIDIA Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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. + **************************************************************************************************/ + +//* 1.0.1 - using absolute import paths when importing standard modules + +mdl 1.6; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::tex::*; +import ::anno::*; + + +export float3 convert_to_left_hand(float3 vec3, uniform bool up_z = true, uniform bool is_position = true) +[[ + anno::description("convert from RH to LH"), + anno::noinline() +]] +{ + float4x4 ZupConversion = float4x4( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + float4x4 YupConversion = float4x4( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + float4 vec4 = float4(vec3.x, vec3.y, vec3.z, is_position ? 1.0f : 0.0f); + + vec4 = vec4 * (up_z ? ZupConversion : YupConversion); + + return float3(vec4.x, vec4.y, vec4.z); +} + +export float3 transform_vector_from_tangent_to_world(float3 vector, + uniform bool up_z = true, + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0)) +[[ + anno::description("Transform vector from tangent space to world space"), + anno::noinline() +]] +{ + /* flip_tangent_v */ + return convert_to_left_hand( + tangent_u * vector.x - tangent_v * vector.y + state::normal() * vector.z, + up_z, false); +} + +export float3 transform_vector_from_world_to_tangent(float3 vector, + uniform bool up_z = true, + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0)) +[[ + anno::description("Transform vector from world space to tangent space"), + anno::noinline() +]] +{ + float3 vecRH = convert_to_left_hand(vector, up_z, false); + /* flip_tangent_v */ + return vecRH.x * float3(tangent_u.x, -tangent_v.x, state::normal().x) + + vecRH.y * float3(tangent_u.y, -tangent_v.y, state::normal().y) + + vecRH.z * float3(tangent_u.z, -tangent_v.z, state::normal().z); +} + +export float4 unpack_normal_map( + float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0) + ) +[[ + anno::description("Unpack a normal stored in a normal map"), + anno::noinline() +]] +{ + float2 normal_xy = float2(texture_sample.x, texture_sample.y); + + normal_xy = normal_xy * float2(2.0,2.0) - float2(1.0,1.0); + float normal_z = math::sqrt( math::saturate( 1.0 - math::dot( normal_xy, normal_xy ) ) ); + return float4( normal_xy.x, normal_xy.y, normal_z, 1.0 ); +} + +// for get color value from normal. +export float4 pack_normal_map( + float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0) + ) +[[ + anno::description("Pack to color from a normal") +]] +{ + float2 return_xy = float2(texture_sample.x, texture_sample.y); + + return_xy = (return_xy + float2(1.0,1.0)) / float2(2.0,2.0); + + return float4( return_xy.x, return_xy.y, 0.0, 1.0 ); +} + +export float4 greyscale_texture_lookup( + float4 texture_sample = float4(0.0, 0.0, 0.0, 1.0) + ) +[[ + anno::description("Sampling a greyscale texture"), + anno::noinline() +]] +{ + return float4(texture_sample.x, texture_sample.x, texture_sample.x, texture_sample.x); +} + +export float3 pixel_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Pixel normal in world space"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); +} + +export float3 vertex_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Vertex normal in world space"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); +} + +export float3 landscape_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Landscape normal in world space") +]] +{ + float3 normalFromNormalmap = math::floor((::vertex_normal_world_space(up_z) * 0.5 + 0.5) * 255.0) / 255.0 * 2.0 - 1.0; + + float2 normalXY = float2(normalFromNormalmap.x, normalFromNormalmap.y); + return float3(normalXY.x, normalXY.y, math::sqrt(math::saturate(1.0 - math::dot(normalXY, normalXY)))); +} + +// Different implementation specific between mdl and hlsl for smoothstep +export float smoothstep(float a, float b, float l) +{ + if (a < b) + { + return math::smoothstep(a, b, l); + } + else if (a > b) + { + return 1.0 - math::smoothstep(b, a, l); + } + else + { + return l <= a ? 0.0 : 1.0; + } +} + +export float2 smoothstep(float2 a, float2 b, float2 l) +{ + return float2(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y)); +} + +export float3 smoothstep(float3 a, float3 b, float3 l) +{ + return float3(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z)); +} + +export float4 smoothstep(float4 a, float4 b, float4 l) +{ + return float4(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z), smoothstep(a.w, b.w, l.w)); +} + +export float2 smoothstep(float2 a, float2 b, float l) +{ + return float2(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l)); +} + +export float3 smoothstep(float3 a, float3 b, float l) +{ + return float3(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l)); +} + +export float4 smoothstep(float4 a, float4 b, float l) +{ + return float4(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l), smoothstep(a.w, b.w, l)); +} + +export float2 smoothstep(float a, float b, float2 l) +{ + return float2(smoothstep(a, b, l.x), smoothstep(a, b, l.y)); +} + +export float3 smoothstep(float a, float b, float3 l) +{ + return float3(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z)); +} + +export float4 smoothstep(float a, float b, float4 l) +{ + return float4(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z), smoothstep(a, b, l.w)); +} + +//------------------ Random from UE4 ----------------------- +float length2(float3 v) +{ + return math::dot(v, v); +} + +float3 GetPerlinNoiseGradientTextureAt(uniform texture_2d PerlinNoiseGradientTexture, float3 v) +{ + const float2 ZShear = float2(17.0f, 89.0f); + + float2 OffsetA = v.z * ZShear; + float2 TexA = (float2(v.x, v.y) + OffsetA + 0.5f) / 128.0f; + float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA.x,1.0-TexA.y),tex::wrap_repeat,tex::wrap_repeat); + return float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z) * 2.0 - 1.0; +} + +float3 SkewSimplex(float3 In) +{ + return In + math::dot(In, float3(1.0 / 3.0f) ); +} +float3 UnSkewSimplex(float3 In) +{ + return In - math::dot(In, float3(1.0 / 6.0f) ); +} + +// 3D random number generator inspired by PCGs (permuted congruential generator) +// Using a **simple** Feistel cipher in place of the usual xor shift permutation step +// @param v = 3D integer coordinate +// @return three elements w/ 16 random bits each (0-0xffff). +// ~8 ALU operations for result.x (7 mad, 1 >>) +// ~10 ALU operations for result.xy (8 mad, 2 >>) +// ~12 ALU operations for result.xyz (9 mad, 3 >>) + +//TODO: uint3 +int3 Rand3DPCG16(int3 p) +{ + // taking a signed int then reinterpreting as unsigned gives good behavior for negatives + //TODO: uint3 + int3 v = int3(p); + + // Linear congruential step. These LCG constants are from Numerical Recipies + // For additional #'s, PCG would do multiple LCG steps and scramble each on output + // So v here is the RNG state + v = v * 1664525 + 1013904223; + + // PCG uses xorshift for the final shuffle, but it is expensive (and cheap + // versions of xorshift have visible artifacts). Instead, use simple MAD Feistel steps + // + // Feistel ciphers divide the state into separate parts (usually by bits) + // then apply a series of permutation steps one part at a time. The permutations + // use a reversible operation (usually ^) to part being updated with the result of + // a permutation function on the other parts and the key. + // + // In this case, I'm using v.x, v.y and v.z as the parts, using + instead of ^ for + // the combination function, and just multiplying the other two parts (no key) for + // the permutation function. + // + // That gives a simple mad per round. + v.x += v.y*v.z; + v.y += v.z*v.x; + v.z += v.x*v.y; + v.x += v.y*v.z; + v.y += v.z*v.x; + v.z += v.x*v.y; + + // only top 16 bits are well shuffled + return v >> 16; +} + +// Wraps noise for tiling texture creation +// @param v = unwrapped texture parameter +// @param bTiling = true to tile, false to not tile +// @param RepeatSize = number of units before repeating +// @return either original or wrapped coord +float3 NoiseTileWrap(float3 v, bool bTiling, float RepeatSize) +{ + return bTiling ? (math::frac(v / RepeatSize) * RepeatSize) : v; +} + +// Evaluate polynomial to get smooth transitions for Perlin noise +// only needed by Perlin functions in this file +// scalar(per component): 2 add, 5 mul +float4 PerlinRamp(float4 t) +{ + return t * t * t * (t * (t * 6 - 15) + 10); +} + +// Blum-Blum-Shub-inspired pseudo random number generator +// http://www.umbc.edu/~olano/papers/mNoise.pdf +// real BBS uses ((s*s) mod M) with bignums and M as the product of two huge Blum primes +// instead, we use a single prime M just small enough not to overflow +// note that the above paper used 61, which fits in a half, but is unusably bad +// @param Integer valued floating point seed +// @return random number in range [0,1) +// ~8 ALU operations (5 *, 3 frac) +float RandBBSfloat(float seed) +{ + float BBS_PRIME24 = 4093.0; + float s = math::frac(seed / BBS_PRIME24); + s = math::frac(s * s * BBS_PRIME24); + s = math::frac(s * s * BBS_PRIME24); + return s; +} + +// Modified noise gradient term +// @param seed - random seed for integer lattice position +// @param offset - [-1,1] offset of evaluation point from lattice point +// @return gradient direction (xyz) and contribution (w) from this lattice point +float4 MGradient(int seed, float3 offset) +{ + //TODO uint + int rand = Rand3DPCG16(int3(seed,0,0)).x; + int3 MGradientMask = int3(0x8000, 0x4000, 0x2000); + float3 MGradientScale = float3(1.0 / 0x4000, 1.0 / 0x2000, 1.0 / 0x1000); + float3 direction = float3(int3(rand, rand, rand) & MGradientMask) * MGradientScale - 1; + return float4(direction.x, direction.y, direction.z, math::dot(direction, offset)); +} + +// compute Perlin and related noise corner seed values +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = true to return seed values for a repeating noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @param seed000-seed111 = hash function seeds for the eight corners +// @return fractional part of v +struct SeedValue +{ + float3 fv = float3(0); + float seed000 = 0; + float seed001 = 0; + float seed010 = 0; + float seed011 = 0; + float seed100 = 0; + float seed101 = 0; + float seed110 = 0; + float seed111 = 0; +}; + +SeedValue NoiseSeeds(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds; + seeds.fv = math::frac(v); + float3 iv = math::floor(v); + + const float3 primes = float3(19, 47, 101); + + if (bTiling) + { // can't algebraically combine with primes + seeds.seed000 = math::dot(primes, NoiseTileWrap(iv, true, RepeatSize)); + seeds.seed100 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 0), true, RepeatSize)); + seeds.seed010 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 0), true, RepeatSize)); + seeds.seed110 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 0), true, RepeatSize)); + seeds.seed001 = math::dot(primes, NoiseTileWrap(iv + float3(0, 0, 1), true, RepeatSize)); + seeds.seed101 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 1), true, RepeatSize)); + seeds.seed011 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 1), true, RepeatSize)); + seeds.seed111 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 1), true, RepeatSize)); + } + else + { // get to combine offsets with multiplication by primes in this case + seeds.seed000 = math::dot(iv, primes); + seeds.seed100 = seeds.seed000 + primes.x; + seeds.seed010 = seeds.seed000 + primes.y; + seeds.seed110 = seeds.seed100 + primes.y; + seeds.seed001 = seeds.seed000 + primes.z; + seeds.seed101 = seeds.seed100 + primes.z; + seeds.seed011 = seeds.seed010 + primes.z; + seeds.seed111 = seeds.seed110 + primes.z; + } + + return seeds; +} + +struct SimplexWeights +{ + float4 Result = float4(0); + float3 PosA = float3(0); + float3 PosB = float3(0); + float3 PosC = float3(0); + float3 PosD = float3(0); +}; + +// Computed weights and sample positions for simplex interpolation +// @return float4(a,b,c, d) Barycentric coordinate defined as Filtered = Tex(PosA) * a + Tex(PosB) * b + Tex(PosC) * c + Tex(PosD) * d +SimplexWeights ComputeSimplexWeights3D(float3 OrthogonalPos) +{ + SimplexWeights weights; + float3 OrthogonalPosFloor = math::floor(OrthogonalPos); + + weights.PosA = OrthogonalPosFloor; + weights.PosB = weights.PosA + float3(1, 1, 1); + + OrthogonalPos -= OrthogonalPosFloor; + + float Largest = math::max(OrthogonalPos.x, math::max(OrthogonalPos.y, OrthogonalPos.z)); + float Smallest = math::min(OrthogonalPos.x, math::min(OrthogonalPos.y, OrthogonalPos.z)); + + weights.PosC = weights.PosA + float3(Largest == OrthogonalPos.x, Largest == OrthogonalPos.y, Largest == OrthogonalPos.z); + weights.PosD = weights.PosA + float3(Smallest != OrthogonalPos.x, Smallest != OrthogonalPos.y, Smallest != OrthogonalPos.z); + + float RG = OrthogonalPos.x - OrthogonalPos.y; + float RB = OrthogonalPos.x - OrthogonalPos.z; + float GB = OrthogonalPos.y - OrthogonalPos.z; + + weights.Result.z = + math::min(math::max(0, RG), math::max(0, RB)) // X + + math::min(math::max(0, -RG), math::max(0, GB)) // Y + + math::min(math::max(0, -RB), math::max(0, -GB)); // Z + + weights.Result.w = + math::min(math::max(0, -RG), math::max(0, -RB)) // X + + math::min(math::max(0, RG), math::max(0, -GB)) // Y + + math::min(math::max(0, RB), math::max(0, GB)); // Z + + weights.Result.y = Smallest; + weights.Result.x = 1.0f - weights.Result.y - weights.Result.z - weights.Result.w; + + return weights; +} + +// filtered 3D gradient simple noise (few texture lookups, high quality) +// @param v >0 +// @return random number in the range -1 .. 1 +float SimplexNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 EvalPos) +{ + float3 OrthogonalPos = SkewSimplex(EvalPos); + + SimplexWeights Weights = ComputeSimplexWeights3D(OrthogonalPos); + + // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 32 bit) + float3 A = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosA); + float3 B = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosB); + float3 C = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosC); + float3 D = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosD); + + Weights.PosA = UnSkewSimplex(Weights.PosA); + Weights.PosB = UnSkewSimplex(Weights.PosB); + Weights.PosC = UnSkewSimplex(Weights.PosC); + Weights.PosD = UnSkewSimplex(Weights.PosD); + + float DistanceWeight; + + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosA)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float a = math::dot(A, EvalPos - Weights.PosA) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosB)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float b = math::dot(B, EvalPos - Weights.PosB) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosC)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float c = math::dot(C, EvalPos - Weights.PosC) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosD)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float d = math::dot(D, EvalPos - Weights.PosD) * DistanceWeight; + + return 32 * (a + b + c + d); +} + +// filtered 3D noise, can be optimized +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float GradientNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 v, bool bTiling, float RepeatSize) +{ + bTiling = true; + float3 fv = math::frac(v); + float3 iv0 = NoiseTileWrap(math::floor(v), bTiling, RepeatSize); + float3 iv1 = NoiseTileWrap(iv0 + 1, bTiling, RepeatSize); + + const int2 ZShear = int2(17, 89); + + float2 OffsetA = iv0.z * ZShear; + float2 OffsetB = OffsetA + ZShear; // non-tiling, use relative offset + if (bTiling) // tiling, have to compute from wrapped coordinates + { + OffsetB = iv1.z * ZShear; + } + + // Texture size scale factor + float ts = 1 / 128.0f; + + // texture coordinates for iv0.xy, as offset for both z slices + float2 TexA0 = (float2(iv0.x, iv0.y) + OffsetA + 0.5f) * ts; + float2 TexB0 = (float2(iv0.x, iv0.y) + OffsetB + 0.5f) * ts; + + // texture coordinates for iv1.xy, as offset for both z slices + float2 TexA1 = TexA0 + ts; // for non-tiling, can compute relative to existing coordinates + float2 TexB1 = TexB0 + ts; + if (bTiling) // for tiling, need to compute from wrapped coordinates + { + TexA1 = (float2(iv1.x, iv1.y) + OffsetA + 0.5f) * ts; + TexB1 = (float2(iv1.x, iv1.y) + OffsetB + 0.5f) * ts; + } + + + // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 8, 16 or 32 bit) + float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat); + float3 PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 A = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 B = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 C = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 D = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 E = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 F = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 G = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 H = PerlinNoiseColor * 2 - 1; + + float a = math::dot(A, fv - float3(0, 0, 0)); + float b = math::dot(B, fv - float3(1, 0, 0)); + float c = math::dot(C, fv - float3(0, 1, 0)); + float d = math::dot(D, fv - float3(1, 1, 0)); + float e = math::dot(E, fv - float3(0, 0, 1)); + float f = math::dot(F, fv - float3(1, 0, 1)); + float g = math::dot(G, fv - float3(0, 1, 1)); + float h = math::dot(H, fv - float3(1, 1, 1)); + + float4 Weights = PerlinRamp(math::frac(float4(fv.x, fv.y, fv.z, 0))); + + float i = math::lerp(math::lerp(a, b, Weights.x), math::lerp(c, d, Weights.x), Weights.y); + float j = math::lerp(math::lerp(e, f, Weights.x), math::lerp(g, h, Weights.x), Weights.y); + + return math::lerp(i, j, Weights.z); +} + +// @return random number in the range -1 .. 1 +// scalar: 6 frac, 31 mul/mad, 15 add, +float FastGradientPerlinNoise3D_TEX(uniform texture_3d PerlinNoise3DTexture, float3 xyz) +{ + // needs to be the same value when creating the PerlinNoise3D texture + float Extent = 16; + + // last texel replicated and needed for filtering + // scalar: 3 frac, 6 mul + xyz = math::frac(xyz / (Extent - 1)) * (Extent - 1); + + // scalar: 3 frac + float3 uvw = math::frac(xyz); + // = floor(xyz); + // scalar: 3 add + float3 p0 = xyz - uvw; +// float3 f = math::pow(uvw, 2) * 3.0f - math::pow(uvw, 3) * 2.0f; // original perlin hermite (ok when used without bump mapping) + // scalar: 2*3 add 5*3 mul + float4 pr = PerlinRamp(float4(uvw.x, uvw.y, uvw.z, 0)); + float3 f = float3(pr.x, pr.y, pr.z); // new, better with continues second derivative for bump mapping + // scalar: 3 add + float3 p = p0 + f; + // scalar: 3 mad + // TODO: need reverse??? + float4 NoiseSample = tex::lookup_float4(PerlinNoise3DTexture, p / Extent + 0.5f / Extent); // +0.5f to get rid of bilinear offset + + // reconstruct from 8bit (using mad with 2 constants and dot4 was same instruction count) + // scalar: 4 mad, 3 mul, 3 add + float3 n = float3(NoiseSample.x, NoiseSample.y, NoiseSample.z) * 255.0f / 127.0f - 1.0f; + float d = NoiseSample.w * 255.f - 127; + return math::dot(xyz, n) - d; +} + +// Perlin-style "Modified Noise" +// http://www.umbc.edu/~olano/papers/index.html#mNoise +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float GradientNoise3D_ALU(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize); + + float rand000 = MGradient(int(seeds.seed000), seeds.fv - float3(0, 0, 0)).w; + float rand100 = MGradient(int(seeds.seed100), seeds.fv - float3(1, 0, 0)).w; + float rand010 = MGradient(int(seeds.seed010), seeds.fv - float3(0, 1, 0)).w; + float rand110 = MGradient(int(seeds.seed110), seeds.fv - float3(1, 1, 0)).w; + float rand001 = MGradient(int(seeds.seed001), seeds.fv - float3(0, 0, 1)).w; + float rand101 = MGradient(int(seeds.seed101), seeds.fv - float3(1, 0, 1)).w; + float rand011 = MGradient(int(seeds.seed011), seeds.fv - float3(0, 1, 1)).w; + float rand111 = MGradient(int(seeds.seed111), seeds.fv - float3(1, 1, 1)).w; + + float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0)); + + float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y); + float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y); + return math::lerp(i, j, Weights.z); +} + +// 3D value noise - used to be incorrectly called Perlin noise +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float ValueNoise3D_ALU(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize); + + float rand000 = RandBBSfloat(seeds.seed000) * 2 - 1; + float rand100 = RandBBSfloat(seeds.seed100) * 2 - 1; + float rand010 = RandBBSfloat(seeds.seed010) * 2 - 1; + float rand110 = RandBBSfloat(seeds.seed110) * 2 - 1; + float rand001 = RandBBSfloat(seeds.seed001) * 2 - 1; + float rand101 = RandBBSfloat(seeds.seed101) * 2 - 1; + float rand011 = RandBBSfloat(seeds.seed011) * 2 - 1; + float rand111 = RandBBSfloat(seeds.seed111) * 2 - 1; + + float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0)); + + float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y); + float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y); + return math::lerp(i, j, Weights.z); +} + +// 3D jitter offset within a voronoi noise cell +// @param pos - integer lattice corner +// @return random offsets vector +float3 VoronoiCornerSample(float3 pos, int Quality) +{ + // random values in [-0.5, 0.5] + float3 noise = float3(Rand3DPCG16(int3(pos))) / 0xffff - 0.5; + + // quality level 1 or 2: searches a 2x2x2 neighborhood with points distributed on a sphere + // scale factor to guarantee jittered points will be found within a 2x2x2 search + if (Quality <= 2) + { + return math::normalize(noise) * 0.2588; + } + + // quality level 3: searches a 3x3x3 neighborhood with points distributed on a sphere + // scale factor to guarantee jittered points will be found within a 3x3x3 search + if (Quality == 3) + { + return math::normalize(noise) * 0.3090; + } + + // quality level 4: jitter to anywhere in the cell, needs 4x4x4 search + return noise; +} + +// compare previous best with a new candidate +// not producing point locations makes it easier for compiler to eliminate calculations when they're not needed +// @param minval = location and distance of best candidate seed point before the new one +// @param candidate = candidate seed point +// @param offset = 3D offset to new candidate seed point +// @param bDistanceOnly = if true, only set maxval.w with distance, otherwise maxval.w is distance and maxval.xyz is position +// @return position (if bDistanceOnly is false) and distance to closest seed point so far +float4 VoronoiCompare(float4 minval, float3 candidate, float3 offset, bool bDistanceOnly) +{ + if (bDistanceOnly) + { + return float4(0, 0, 0, math::min(minval.w, math::dot(offset, offset))); + } + else + { + float newdist = math::dot(offset, offset); + return newdist > minval.w ? minval : float4(candidate.x, candidate.y, candidate.z, newdist); + } +} + +// 220 instruction Worley noise +float4 VoronoiNoise3D_ALU(float3 v, int Quality, bool bTiling, float RepeatSize, bool bDistanceOnly) +{ + float3 fv = math::frac(v), fv2 = math::frac(v + 0.5); + float3 iv = math::floor(v), iv2 = math::floor(v + 0.5); + + // with initial minimum distance = infinity (or at least bigger than 4), first min is optimized away + float4 mindist = float4(0,0,0,100); + float3 p, offset; + + // quality level 3: do a 3x3x3 search + if (Quality == 3) + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = -1; offset_x <= 1; ++offset_x) + { + for (offset_y = -1; offset_y <= 1; ++offset_y) + { + for (offset_z = -1; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly); + } + } + } + } + + // everybody else searches a base 2x2x2 neighborhood + else + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = 0; offset_x <= 1; ++offset_x) + { + for (offset_y = 0; offset_y <= 1; ++offset_y) + { + for (offset_z = 0; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // quality level 2, do extra set of points, offset by half a cell + if (Quality == 2) + { + // 467 is just an offset to a different area in the random number field to avoid similar neighbor artifacts + p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize) + 467, Quality); + mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly); + } + } + } + } + } + + // quality level 4: add extra sets of four cells in each direction + if (Quality >= 4) + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = -1; offset_x <= 2; offset_x += 3) + { + for (offset_y = 0; offset_y <= 1; ++offset_y) + { + for (offset_z = 0; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + // along x axis + p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // along y axis + p = float3(offset.y, offset.z, offset.x) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.y, offset.z, offset.x), bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // along z axis + p = float3(offset.z, offset.x, offset.y) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.z, offset.x, offset.y), bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + } + } + } + } + + // transform squared distance to real distance + return float4(mindist.x, mindist.y, mindist.z, math::sqrt(mindist.w)); +} + +// Coordinates for corners of a Simplex tetrahedron +// Based on McEwan et al., Efficient computation of noise in GLSL, JGT 2011 +// @param v = 3D noise argument +// @return 4 corner locations +float4x3 SimplexCorners(float3 v) +{ + // find base corner by skewing to tetrahedral space and back + float3 tet = math::floor(v + v.x/3 + v.y/3 + v.z/3); + float3 base = tet - tet.x/6 - tet.y/6 - tet.z/6; + float3 f = v - base; + + // Find offsets to other corners (McEwan did this in tetrahedral space, + // but since skew is along x=y=z axis, this works in Euclidean space too.) + float3 g = math::step(float3(f.y,f.z,f.x), float3(f.x,f.y,f.z)), h = 1 - float3(g.z, g.x, g.y); + float3 a1 = math::min(g, h) - 1.0 / 6.0, a2 = math::max(g, h) - 1.0 / 3.0; + + // four corners + return float4x3(base, base + a1, base + a2, base + 0.5); +} + +// Improved smoothing function for simplex noise +// @param f = fractional distance to four tetrahedral corners +// @return weight for each corner +float4 SimplexSmooth(float4x3 f) +{ + const float scale = 1024. / 375.; // scale factor to make noise -1..1 + float4 d = float4(math::dot(f[0], f[0]), math::dot(f[1], f[1]), math::dot(f[2], f[2]), math::dot(f[3], f[3])); + float4 s = math::saturate(2 * d); + return (1 * scale + s*(-3 * scale + s*(3 * scale - s*scale))); +} + +// Derivative of simplex noise smoothing function +// @param f = fractional distanc eto four tetrahedral corners +// @return derivative of smoothing function for each corner by x, y and z +float3x4 SimplexDSmooth(float4x3 f) +{ + const float scale = 1024. / 375.; // scale factor to make noise -1..1 + float4 d = float4(math::dot(f[0], f[0]), math::dot(f[1], f[1]), math::dot(f[2], f[2]), math::dot(f[3], f[3])); + float4 s = math::saturate(2 * d); + s = -12 * scale + s*(24 * scale - s * 12 * scale); + + return float3x4( + s * float4(f[0][0], f[1][0], f[2][0], f[3][0]), + s * float4(f[0][1], f[1][1], f[2][1], f[3][1]), + s * float4(f[0][2], f[1][2], f[2][2], f[3][2])); +} + +// Simplex noise and its Jacobian derivative +// @param v = 3D noise argument +// @param bTiling = whether to repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension, must be a multiple of 3 +// @return float3x3 Jacobian in J[*].xyz, vector noise in J[*].w +// J[0].w, J[1].w, J[2].w is a Perlin-style simplex noise with vector output, e.g. (Nx, Ny, Nz) +// J[i].x is X derivative of the i'th component of the noise so J[2].x is dNz/dx +// You can use this to compute the noise, gradient, curl, or divergence: +// float3x4 J = JacobianSimplex_ALU(...); +// float3 VNoise = float3(J[0].w, J[1].w, J[2].w); // 3D noise +// float3 Grad = J[0].xyz; // gradient of J[0].w +// float3 Curl = float3(J[1][2]-J[2][1], J[2][0]-J[0][2], J[0][1]-J[1][2]); +// float Div = J[0][0]+J[1][1]+J[2][2]; +// All of these are confirmed to compile out all unneeded terms. +// So Grad of X doesn't compute Y or Z components, and VNoise doesn't do any of the derivative computation. +float3x4 JacobianSimplex_ALU(float3 v, bool bTiling, float RepeatSize) +{ + int3 MGradientMask = int3(0x8000, 0x4000, 0x2000); + float3 MGradientScale = float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000); + + // corners of tetrahedron + float4x3 T = SimplexCorners(v); + // TODO: uint3 + int3 rand = int3(0); + float4x3 gvec0 = float4x3(1.0); + float4x3 gvec1 = float4x3(1.0); + float4x3 gvec2 = float4x3(1.0); + float4x3 fv = float4x3(1.0); + float3x4 grad = float3x4(1.0); + + // processing of tetrahedral vertices, unrolled + // to compute gradient at each corner + fv[0] = v - T[0]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[0] + 0.5, bTiling, RepeatSize)))); + gvec0[0] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[0] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[0] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][0] = math::dot(gvec0[0], fv[0]); + grad[1][0] = math::dot(gvec1[0], fv[0]); + grad[2][0] = math::dot(gvec2[0], fv[0]); + + fv[1] = v - T[1]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[1] + 0.5, bTiling, RepeatSize)))); + gvec0[1] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[1] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec1[1] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][1] = math::dot(gvec0[1], fv[1]); + grad[1][1] = math::dot(gvec1[1], fv[1]); + grad[2][1] = math::dot(gvec2[1], fv[1]); + + fv[2] = v - T[2]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[2] + 0.5, bTiling, RepeatSize)))); + gvec0[2] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[2] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[2] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][2] = math::dot(gvec0[2], fv[2]); + grad[1][2] = math::dot(gvec1[2], fv[2]); + grad[2][2] = math::dot(gvec2[2], fv[2]); + + fv[3] = v - T[3]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[3] + 0.5, bTiling, RepeatSize)))); + gvec0[3] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[3] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[3] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][3] = math::dot(gvec0[3], fv[3]); + grad[1][3] = math::dot(gvec1[3], fv[3]); + grad[2][3] = math::dot(gvec2[3], fv[3]); + + // blend gradients + float4 sv = SimplexSmooth(fv); + float3x4 ds = SimplexDSmooth(fv); + + float3x4 jacobian = float3x4(1.0); + float3 vec0 = gvec0*sv + grad[0]*ds; // NOTE: mdl is column major, convert from UE4 (row major) + jacobian[0] = float4(vec0.x, vec0.y, vec0.z, math::dot(sv, grad[0])); + float3 vec1 = gvec1*sv + grad[1]*ds; + jacobian[1] = float4(vec1.x, vec1.y, vec1.z, math::dot(sv, grad[1])); + float3 vec2 = gvec2*sv + grad[2]*ds; + jacobian[2] = float4(vec2.x, vec2.y, vec2.z, math::dot(sv, grad[2])); + + return jacobian; +} + +// While RepeatSize is a float here, the expectation is that it would be largely integer values coming in from the UI. The downstream logic assumes +// floats for all called functions (NoiseTileWrap) and this prevents any float-to-int conversion errors from automatic type conversion. +float Noise3D_Multiplexer(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, int Function, float3 Position, int Quality, bool bTiling, float RepeatSize) +{ + // verified, HLSL compiled out the switch if Function is a constant + switch(Function) + { + case 0: + return SimplexNoise3D_TEX(PerlinNoiseGradientTexture, Position); + case 1: + return GradientNoise3D_TEX(PerlinNoiseGradientTexture, Position, bTiling, RepeatSize); + case 2: + return FastGradientPerlinNoise3D_TEX(PerlinNoise3DTexture, Position); + case 3: + return GradientNoise3D_ALU(Position, bTiling, RepeatSize); + case 4: + return ValueNoise3D_ALU(Position, bTiling, RepeatSize); + case 5: + return VoronoiNoise3D_ALU(Position, Quality, bTiling, RepeatSize, true).w * 2.0 - 1.0; + } + return 0; +} +//---------------------------------------------------------- + +export float noise(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, float3 Position, float Scale, float Quality, float Function, float Turbulence, float Levels, float OutputMin, float OutputMax, float LevelScale, float FilterWidth, float Tiling, float RepeatSize) +[[ + anno::description("Noise"), + anno::noinline() +]] +{ + Position *= Scale; + FilterWidth *= Scale; + + float Out = 0.0f; + float OutScale = 1.0f; + float InvLevelScale = 1.0f / LevelScale; + + int iFunction(Function); + int iQuality(Quality); + int iLevels(Levels); + bool bTurbulence(Turbulence); + bool bTiling(Tiling); + + for(int i = 0; i < iLevels; ++i) + { + // fade out noise level that are too high frequent (not done through dynamic branching as it usually requires gradient instructions) + OutScale *= math::saturate(1.0 - FilterWidth); + + if(bTurbulence) + { + Out += math::abs(Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize)) * OutScale; + } + else + { + Out += Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize) * OutScale; + } + + Position *= LevelScale; + RepeatSize *= LevelScale; + OutScale *= InvLevelScale; + FilterWidth *= LevelScale; + } + + if(!bTurbulence) + { + // bring -1..1 to 0..1 range + Out = Out * 0.5f + 0.5f; + } + + // Out is in 0..1 range + return math::lerp(OutputMin, OutputMax, Out); +} + +// Material node for noise functions returning a vector value +// @param LevelScale usually 2 but higher values allow efficient use of few levels +// @return in user defined range (OutputMin..OutputMax) +export float4 vector4_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize) +[[ + anno::description("Vector Noise"), + anno::noinline() +]] +{ + float4 result = float4(0,0,0,1); + float3 ret = float3(0); + int iQuality = int(Quality); + int iFunction = int(Function); + bool bTiling = Tiling > 0.0; + + float3x4 Jacobian = JacobianSimplex_ALU(Position, bTiling, TileSize); // compiled out if not used + + // verified, HLSL compiled out the switch if Function is a constant + switch (iFunction) + { + case 0: // Cellnoise + ret = float3(Rand3DPCG16(int3(math::floor(NoiseTileWrap(Position, bTiling, TileSize))))) / 0xffff; + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 1: // Color noise + ret = float3(Jacobian[0].w, Jacobian[1].w, Jacobian[2].w); + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 2: // Gradient + result = Jacobian[0]; + break; + case 3: // Curl + ret = float3(Jacobian[2][1] - Jacobian[1][2], Jacobian[0][2] - Jacobian[2][0], Jacobian[1][0] - Jacobian[0][1]); + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 4: // Voronoi + result = VoronoiNoise3D_ALU(Position, iQuality, bTiling, TileSize, false); + break; + } + return result; +} + +export float3 vector3_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize) +[[ + anno::description("Vector Noise float3 version"), + anno::noinline() +]] +{ + float4 noise = vector4_noise(Position, Quality, Function, Tiling, TileSize); + return float3(noise.x, noise.y, noise.z); +} + + +// workaround for ue4 fresnel (without supporting for camera vector) : replacing it with 0.0, means facing to the view +export float fresnel(float exponent [[anno::unused()]], float base_reflect_fraction [[anno::unused()]], float3 normal [[anno::unused()]]) +[[ + anno::description("Fresnel"), + anno::noinline() +]] +{ + return 0.0; +} + +export float fresnel_function(float3 normal_vector [[anno::unused()]], float3 camera_vector [[anno::unused()]], + bool invert_fresnel [[anno::unused()]], float power [[anno::unused()]], + bool use_cheap_contrast [[anno::unused()]], float cheap_contrast_dark [[anno::unused()]], float cheap_contrast_bright [[anno::unused()]], + bool clamp_fresnel_dot_product [[anno::unused()]]) +[[ + anno::description("Fresnel Function"), + anno::noinline() +]] +{ + return 0.0; +} + +export float3 camera_vector(uniform bool up_z = true) +[[ + anno::description("Camera Vector"), + anno::noinline() +]] +{ + // assume camera postion is 0,0,0 + return math::normalize(float3(0) - convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z)); +} + +export float pixel_depth() +[[ + anno::description("Pixel Depth"), + anno::noinline() +]] +{ + return 256.0f; +} + +export float scene_depth() +[[ + anno::description("Scene Depth") +]] +{ + return 65500.0f; +} + +export float3 scene_color() +[[ + anno::description("Scene Color") +]] +{ + return float3(1.0f); +} + +export float4 vertex_color() +[[ + anno::description("Vertex Color"), + anno::noinline() +]] +{ + return float4(1.0f); +} + +export float4 vertex_color_from_coordinate(int VertexColorCoordinateIndex) +[[ + anno::description("Vertex Color for float2 PrimVar"), + anno::noinline() +]] +{ + // Kit only supports 4 uv sets, 2 uvs are available to vertex color. if vertex color index is invalid, output the constant WHITE color intead + return (VertexColorCoordinateIndex > 2) ? float4(1.0f) : float4(state::texture_coordinate(VertexColorCoordinateIndex).x, state::texture_coordinate(VertexColorCoordinateIndex).y, state::texture_coordinate(VertexColorCoordinateIndex+1).x, state::texture_coordinate(VertexColorCoordinateIndex+1).y); +} + +export float3 camera_position() +[[ + anno::description("Camera Position"), + anno::noinline() +]] +{ + return float3(1000.0f, 0, 0); +} + +export float3 rotate_about_axis(float4 NormalizedRotationAxisAndAngle, float3 PositionOnAxis, float3 Position) +[[ + anno::description("Rotates Position about the given axis by the given angle") +]] +{ + // Project Position onto the rotation axis and find the closest point on the axis to Position + float3 NormalizedRotationAxis = float3(NormalizedRotationAxisAndAngle.x,NormalizedRotationAxisAndAngle.y,NormalizedRotationAxisAndAngle.z); + float3 ClosestPointOnAxis = PositionOnAxis + NormalizedRotationAxis * math::dot(NormalizedRotationAxis, Position - PositionOnAxis); + // Construct orthogonal axes in the plane of the rotation + float3 UAxis = Position - ClosestPointOnAxis; + float3 VAxis = math::cross(NormalizedRotationAxis, UAxis); + float[2] SinCosAngle = math::sincos(NormalizedRotationAxisAndAngle.w); + // Rotate using the orthogonal axes + float3 R = UAxis * SinCosAngle[1] + VAxis * SinCosAngle[0]; + // Reconstruct the rotated world space position + float3 RotatedPosition = ClosestPointOnAxis + R; + // Convert from position to a position offset + return RotatedPosition - Position; +} + +export float2 rotate_scale_offset_texcoords(float2 InTexCoords, float4 InRotationScale, float2 InOffset) +[[ + anno::description("Returns a float2 texture coordinate after 2x2 transform and offset applied") +]] +{ + return float2(math::dot(InTexCoords, float2(InRotationScale.x, InRotationScale.y)), math::dot(InTexCoords, float2(InRotationScale.z, InRotationScale.w))) + InOffset; +} + +export float3 reflection_custom_world_normal(float3 WorldNormal, bool bNormalizeInputNormal, uniform bool up_z = true) +[[ + anno::description("Reflection vector about the specified world space normal") +]] +{ + if (bNormalizeInputNormal) + { + WorldNormal = math::normalize(WorldNormal); + } + + return -camera_vector(up_z) + WorldNormal * math::dot(WorldNormal, camera_vector(up_z)) * 2.0; +} + +export float3 reflection_vector(uniform bool up_z = true) +[[ + anno::description("Reflection Vector"), + anno::noinline() +]] +{ + float3 normal = convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); + return reflection_custom_world_normal(normal, false, up_z); +} + +export float dither_temporalAA(float AlphaThreshold = 0.5f, float Random = 1.0f [[anno::unused()]]) +[[ + anno::description("Dither TemporalAA"), + anno::noinline() +]] +{ + return AlphaThreshold; +} + +export float3 black_body( float Temp ) +[[ + anno::description("Black Body"), + anno::noinline() +]] +{ + float u = ( 0.860117757f + 1.54118254e-4f * Temp + 1.28641212e-7f * Temp*Temp ) / ( 1.0f + 8.42420235e-4f * Temp + 7.08145163e-7f * Temp*Temp ); + float v = ( 0.317398726f + 4.22806245e-5f * Temp + 4.20481691e-8f * Temp*Temp ) / ( 1.0f - 2.89741816e-5f * Temp + 1.61456053e-7f * Temp*Temp ); + + float x = 3*u / ( 2*u - 8*v + 4 ); + float y = 2*v / ( 2*u - 8*v + 4 ); + float z = 1 - x - y; + + float Y = 1; + float X = Y/y * x; + float Z = Y/y * z; + + float3x3 XYZtoRGB = float3x3( + float3(3.2404542, -1.5371385, -0.4985314), + float3(-0.9692660, 1.8760108, 0.0415560), + float3(0.0556434, -0.2040259, 1.0572252) + ); + + return XYZtoRGB * float3( X, Y, Z ) * math::pow( 0.0004 * Temp, 4 ); +} + +export float per_instance_random(uniform texture_2d PerlinNoiseGradientTexture, int NumberInstances) +[[ + anno::description("Per Instance Random"), + anno::noinline() +]] +{ + float weight = state::object_id() / float(NumberInstances); + return NumberInstances == 0 ? 0.0 : tex::lookup_float4(PerlinNoiseGradientTexture, float2(weight, 1.0 - weight), tex::wrap_repeat, tex::wrap_repeat).x; +} + +//------------------ Hair from UE4 ----------------------- +float3 hair_absorption_to_color(float3 A) +{ + const float B = 0.3f; + float b2 = B * B; + float b3 = B * b2; + float b4 = b2 * b2; + float b5 = B * b4; + float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5); + return math::exp(-math::sqrt(A) * D); +} + +float3 hair_color_to_absorption(float3 C) +{ + const float B = 0.3f; + float b2 = B * B; + float b3 = B * b2; + float b4 = b2 * b2; + float b5 = B * b4; + float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5); + return math::pow(math::log(C) / D, 2.0f); +} + +export float3 get_hair_color_from_melanin(float InMelanin, float InRedness, float3 InDyeColor) +[[ + anno::description("Hair Color") +]] +{ + InMelanin = math::saturate(InMelanin); + InRedness = math::saturate(InRedness); + float Melanin = -math::log(math::max(1 - InMelanin, 0.0001f)); + float Eumelanin = Melanin * (1 - InRedness); + float Pheomelanin = Melanin * InRedness; + + float3 DyeAbsorption = hair_color_to_absorption(math::saturate(InDyeColor)); + float3 Absorption = Eumelanin * float3(0.506f, 0.841f, 1.653f) + Pheomelanin * float3(0.343f, 0.733f, 1.924f); + + return hair_absorption_to_color(Absorption + DyeAbsorption); +} + +export float3 local_object_bounds_min() +[[ + anno::description("Local Object Bounds Min"), + anno::noinline() +]] +{ + return float3(0.0); +} + +export float3 local_object_bounds_max() +[[ + anno::description("Local Object Bounds Max"), + anno::noinline() +]] +{ + return float3(100.0); +} + +export float3 object_bounds() +[[ + anno::description("Object Bounds"), + anno::noinline() +]] +{ + return float3(100.0); +} + +export float object_radius() +[[ + anno::description("Object Radius"), + anno::noinline() +]] +{ + return 100.0f; +} + +export float3 object_world_position(uniform bool up_z = true) +[[ + anno::description("Object World Position"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z)*state::meters_per_scene_unit()*100.0; +} + +export float3 object_orientation() +[[ + anno::description("Object Orientation"), + anno::noinline() +]] +{ + return float3(0); +} + +export float rcp(float x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float2 rcp(float2 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float3 rcp(float3 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float4 rcp(float4 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export int BitFieldExtractI32(int Data, int Size, int Offset) +[[ + anno::description("BitFieldExtractI32 int"), + anno::noinline() +]] +{ + Size &= 3; + Offset &= 3; + + if (Size == 0) + return 0; + else if (Offset + Size < 32) + return (Data << (32 - Size - Offset)) >> (32 - Size); + else + return Data >> Offset; +} + +export int BitFieldExtractI32(float Data, float Size, float Offset) +[[ + anno::description("BitFieldExtractI32 float"), + anno::noinline() +]] +{ + return BitFieldExtractI32(int(Data), int(Size), int(Offset)); +} + +export int BitFieldExtractU32(float Data, float Size, float Offset) +[[ + anno::description("BitFieldExtractU32 float"), + anno::noinline() +]] +{ + return BitFieldExtractI32(Data, Size, Offset); +} + +export int BitFieldExtractU32(int Data, int Size, int Offset) +[[ + anno::description("BitFieldExtractU32 int"), + anno::noinline() +]] +{ + return BitFieldExtractI32(Data, Size, Offset); +} + +export float3 EyeAdaptationInverseLookup(float3 LightValue, float Alpha) +[[ + anno::description("EyeAdaptationInverseLookup"), + anno::noinline() +]] +{ + float Adaptation = 1.0f; + + // When Alpha=0.0, we want to multiply by 1.0. when Alpha = 1.0, we want to multiply by 1/Adaptation. + // So the lerped value is: + // LerpLogScale = Lerp(log(1),log(1/Adaptaiton),T) + // Which is simplified as: + // LerpLogScale = Lerp(0,-log(Adaptation),T) + // LerpLogScale = -T * logAdaptation; + + float LerpLogScale = -Alpha * math::log(Adaptation); + float Scale = math::exp(LerpLogScale); + return LightValue * Scale; +} diff --git a/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/instance.usda b/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/instance.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_instance" ( + prepend payload = @./instance.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_cup/.collect.mapping.json b/scene_cup/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..5f9c805377ebdc95f6933322b7a599e2a3183056 --- /dev/null +++ b/scene_cup/.collect.mapping.json @@ -0,0 +1,431 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/scene_cups/base_2.usd", + "source_hash": "336450f646ffa301fb12a8ac675245ce8fdda032", + "target_url": "./base_2.usd", + "target_hash": "0b5ae64623703ef6cee0056f6ed23bac26f2490d" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes/scene_cups/Downloads/brown_photostudio_02_4k.exr", + "source_hash": "22301c01621b664c94bca978947b2fe16ecfbd1b", + "target_url": "./Downloads/brown_photostudio_02_4k.exr", + "target_hash": "29725f32af8b6e95bef1fb6953bafb98f8df8d9e" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/instance.usd", + "source_hash": "66d167b2718143b0eb9161477acb588df4c9f958", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/instance.usd", + "target_hash": "31cf945c73fdaace11541742435e98728f6d6843" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/07aa5f57ff324d4e8785ded90d2e5c52.usd", + "source_hash": "38af1fe8199304c3b028aa4aa4f0356ed76a0691", + "target_url": "./object_usds/objaverse_usd/07aa5f57ff324d4e8785ded90d2e5c52.usd", + "target_hash": "7da380e85537ed00a79c87eedbf9a9e4fc45fb99" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/149d47c6c27648a6af26d6c912c03826.usd", + "source_hash": "ea48dee6e9deed4c78ccbafaba067af6a2b1b85d", + "target_url": "./object_usds/objaverse_usd/149d47c6c27648a6af26d6c912c03826.usd", + "target_hash": "356c9fc7b46608effc1de9081142a0746bf8d4b1" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/52704c1bafd44bfd9e98538276ad5614.usd", + "source_hash": "fdba93667bc18f9917bca03628e1204c6bbdad3a", + "target_url": "./object_usds/objaverse_usd/52704c1bafd44bfd9e98538276ad5614.usd", + "target_hash": "e4e74a8803eef5ea6d8d17ca75d0261517d1b64e" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/797e7c7f61104b6785c3bd0fdb99c74d.usd", + "source_hash": "716020e42631634867464aaccd02cc7f04f068d1", + "target_url": "./object_usds/objaverse_usd/797e7c7f61104b6785c3bd0fdb99c74d.usd", + "target_hash": "a7b8d0e444e236a575051f04b1fa6d8c3c93e6ec" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/9f79ee359a23478ab9d2cc0d0da3fc39.usd", + "source_hash": "e25dde4596a8ebd1ceebcf7edcb86f164bc20fef", + "target_url": "./object_usds/objaverse_usd/9f79ee359a23478ab9d2cc0d0da3fc39.usd", + "target_hash": "d96ec64777e14d8d138646f385d2d7655c4db8b7" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/b6c09ed6acaa45ebb20c53696372ce3a.usd", + "source_hash": "92cf23caac6a2ff3f859eece57d2bb899a5807c0", + "target_url": "./object_usds/objaverse_usd/b6c09ed6acaa45ebb20c53696372ce3a.usd", + "target_hash": "9d7e6ab037ab284c9f4eaa9cc0a1844d65b42aa4" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/c594cb43f36140c8a422b069d6d9714d.usd", + "source_hash": "f0dd15c90e9069fb2a320a5390022b59a3ac4db7", + "target_url": "./object_usds/objaverse_usd/c594cb43f36140c8a422b069d6d9714d.usd", + "target_hash": "9a0c678cd6998ce8e32cc98031a31d13b644e79a" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/daf860020fdf4ed392f07933977ee89b.usd", + "source_hash": "7fd941a7f02f8d844cea2acb747c191b38f8bb8d", + "target_url": "./object_usds/objaverse_usd/daf860020fdf4ed392f07933977ee89b.usd", + "target_hash": "6d4eb3f82a6e8ea363d5595bc523ba30528a1a4d" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/f0a9fc8b51004680904f320e7133e951.usd", + "source_hash": "d031017706ff87ba1d281a28db0d81273d241519", + "target_url": "./object_usds/objaverse_usd/f0a9fc8b51004680904f320e7133e951.usd", + "target_hash": "8769621b49df73c4ac2e83e6160778e22bfff0dc" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/149d47c6c27648a6af26d6c912c03826_texture0.jpg", + "source_hash": "ffb2c347f80a4234b0be0d61d15941c79abffb0a", + "target_url": "./object_usds/objaverse_usd/textures/149d47c6c27648a6af26d6c912c03826_texture0.jpg", + "target_hash": "d26c0325460eeba406e8f28278680a76c78fa7f6" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/c594cb43f36140c8a422b069d6d9714d_texture0.jpg", + "source_hash": "d72ae28f3c5c4439b17efe51421124b3201f9ff6", + "target_url": "./object_usds/objaverse_usd/textures/c594cb43f36140c8a422b069d6d9714d_texture0.jpg", + "target_hash": "2f424798f1c81146d6106da682837a2d9d2f12a7" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/c594cb43f36140c8a422b069d6d9714d_texture1.jpg", + "source_hash": "b78dcd6e0300069379f290a5c22bfe3d10ea445a", + "target_url": "./object_usds/objaverse_usd/textures/c594cb43f36140c8a422b069d6d9714d_texture1.jpg", + "target_hash": "822d2e789245145d836b37b1c8c82fe5ac791307" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture0.png", + "source_hash": "4c5c306b030830b2eb64a1411f8b776579cd2f86", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture0.png", + "target_hash": "5b59c0ae4cecc80603457324ad298a43991bfed6" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture1.png", + "source_hash": "941a937f671d923cd68d1c919275fc74e922f174", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture1.png", + "target_hash": "790cb4951b5335c18197062eb0662835d1465319" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture2.png", + "source_hash": "1f27c4c61e4895fae2131a867cca5aace0d0fe98", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture2.png", + "target_hash": "188d5ef02d1845680efb011aa6af25b745b08953" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture3.png", + "source_hash": "5b3dda6578519470f85058fc37551b4643a6e2bd", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture3.png", + "target_hash": "587f87a678d0259f85b30545947c53798de2f917" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture4.png", + "source_hash": "8531231729e729066a63830c45de291b6d8eea10", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture4.png", + "target_hash": "91f767eed981b6c3958e0a3ea72d964233ad0db4" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture5.png", + "source_hash": "8531231729e729066a63830c45de291b6d8eea10", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture5.png", + "target_hash": "04313915997c8c45d55519e75cb72fa3eadbd9d3" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture6.png", + "source_hash": "16e51c21db003e4b5f7527f5d9577c7002c52733", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture6.png", + "target_hash": "60840a4228177d4f618b572378f661136dbe13b5" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture0.png", + "source_hash": "a1b8a7500befee42b939b244c63bca62e49ed406", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture0.png", + "target_hash": "ad49826428e4a2a84b3b20f2c5eaaa45ff072ed1" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture1.png", + "source_hash": "e90a4fdf2b5c2bcd26d79fa40b0d2cf14b46df45", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture1.png", + "target_hash": "a5be82c729d322d0b3e697cae6455401592f61d2" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture2.png", + "source_hash": "c80d3fe3cf7bbdc99cba70279a29325b784b1aba", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture2.png", + "target_hash": "2b9b843790f96dd861a2ebffb7ca7ade3fa89b33" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture3.png", + "source_hash": "c8841992588e2db42e600040e3fa6a399f27eb61", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture3.png", + "target_hash": "a44bd7c8fc9159bb70673b766165a67be7d7a44a" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture4.png", + "source_hash": "413995304ded06b05a6ff2cf8b4463bd59e0b74f", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture4.png", + "target_hash": "a9981529b9c52c88439f16e9736ad00a379d5189" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture5.png", + "source_hash": "e76d63b592ad923349af7ca8d8bf4cefbfe50b4d", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture5.png", + "target_hash": "723be4ddbe95481581a5eff5083b9c538f4f6c25" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture6.png", + "source_hash": "3f58f7ccd9f20fec9431b16572fd4923cb4135cf", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture6.png", + "target_hash": "44590f08ede5f1ca3888231f28a9bce19dcb7e60" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture7.png", + "source_hash": "b22c41bd346804705b4e1d148b24652e0023535b", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture7.png", + "target_hash": "34e8c93bc63688ee8419d2d66606da54008b34d2" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture0.png", + "source_hash": "574d7cac24f08dc3834f2b9be683cb4e54f0ca8f", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture0.png", + "target_hash": "b00d86dc93be68534440cdb369563635f6e900ae" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture1.png", + "source_hash": "18e12ad22cd9bdf91845930cfe6e595978b33c73", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture1.png", + "target_hash": "49fd7fe01ece38006164314f856051521b6f5b4c" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture10.png", + "source_hash": "9d0183d32e2ed70b27b3dbc009d1357b0ed17c31", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture10.png", + "target_hash": "8af0e0e31b1191f701d367731f5a9647aafdc69a" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture11.png", + "source_hash": "9d0183d32e2ed70b27b3dbc009d1357b0ed17c31", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture11.png", + "target_hash": "e2854af28d7c844218f701c5079643d003432a58" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture12.png", + "source_hash": "babc25e1cadfabfa357d3675a639d0f9ec50d437", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture12.png", + "target_hash": "4aad43dc41b112d7d55a657921791c55591878f9" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture13.png", + "source_hash": "0af287708527e96e65633273e25dce71f036a674", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture13.png", + "target_hash": "d90fe0d77e7cc98cbd3a98f907c426ab619a64f9" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture14.png", + "source_hash": "d44d881dd3b99ba89d47845b5a8ed038516c54ff", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture14.png", + "target_hash": "40a6a44ffe9593dbfbe8f63a0f5ad0ad1e490525" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture15.png", + "source_hash": "d44d881dd3b99ba89d47845b5a8ed038516c54ff", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture15.png", + "target_hash": "e71b1c50327cc4e7b1e4b39a792ceb9c1b8a7e02" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture2.png", + "source_hash": "6f34c5d35276a6b95e8405bd2c5c12a592ee0d74", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture2.png", + "target_hash": "eb9f080d1d6f0ede65c26e77227e40fd86744d21" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture3.png", + "source_hash": "5f480632d2ff7c64a1b1b5bb5c078accd2611f18", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture3.png", + "target_hash": "f26254dcb4d1649fa5a6d873005e44bddea068ab" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture4.png", + "source_hash": "39e00cb52f603bb4d81bb065d245755db35740bb", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture4.png", + "target_hash": "21a75900aaf25e80cd6d4b912549bb81878320da" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture5.png", + "source_hash": "e1d53cfa0ccb9451c4d9c2b90d4a73846c4c53c3", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture5.png", + "target_hash": "66c4e25de149d51aafb2713c95283ed3b4d10830" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture6.png", + "source_hash": "9188d44c7d375147b131700f1bcb539c7d48dabd", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture6.png", + "target_hash": "99f07a15e0b02889db97355ccc5e79190532bf25" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture7.png", + "source_hash": "9188d44c7d375147b131700f1bcb539c7d48dabd", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture7.png", + "target_hash": "4705aec3e2b60d765a4d2afc8ce0e1cf5086776d" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture8.png", + "source_hash": "bb88a6b5b6963c82514f2185faed86c9e3be0d1f", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture8.png", + "target_hash": "5ed8e32a4931bb26d2b487a0890050b29285da33" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture9.png", + "source_hash": "af612b4ce7e635421f947d6902e2ea8ea436d305", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture9.png", + "target_hash": "e0951694e99da6cf74114ed3182356bd577f291f" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture0.png", + "source_hash": "50d7ed2d36a569da159bc4cc22e8360af2b47b07", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture0.png", + "target_hash": "330289ef8639446800825e6571d0fe808160aba2" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture1.png", + "source_hash": "24c23209425ba8fcbb202af691bdf963a3f9e64e", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture1.png", + "target_hash": "5c18c00a0e7e995d8eecefb90f1efdeac069b9ab" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture2.png", + "source_hash": "dc71c3feeb8e70410f50dccdc06fd5fd221eefab", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture2.png", + "target_hash": "58bf58d386328108045941f29f1f89639a4ecc15" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture3.png", + "source_hash": "1f0e4ad43911928444d9cd359591ee6a1d2d69c9", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture3.png", + "target_hash": "4442e2335c4cec45bcc05b78867887465629d106" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture4.png", + "source_hash": "6c4a1fa4593c17ef0f2ac6eabb85929c195a1959", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture4.png", + "target_hash": "e3658a0c155d1433b70abe6291a97e094b728f7f" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture5.png", + "source_hash": "fc17e8e4d762c42e8ee7c55e6506c435e879269a", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture5.png", + "target_hash": "4dc6cde318efbdcf7eed4ca825a6d871823b0d55" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture6.png", + "source_hash": "7929ca63f7abe312a4df07cdf6d4f172a7aac27c", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture6.png", + "target_hash": "7a60a6103cb063db1eaa441c1a05efe8b95db448" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture7.png", + "source_hash": "9355c348341f095994159dc4824326f5ac0f09e2", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture7.png", + "target_hash": "3a531f8b4f8d81c3b599f0f51ed368371f11a15a" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture0.png", + "source_hash": "2b65f89b66771371306830dbf0833f7e9d58becd", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture0.png", + "target_hash": "3d52979da1d5df9fb4705c9874142293f03a3d5a" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture1.png", + "source_hash": "f23adccb89b0ed65ca457b756e9ccf893d8d9339", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture1.png", + "target_hash": "be5938f4815a5fb2047303eefb9397f4d59bc13a" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture2.png", + "source_hash": "c2e087bf9cd024ac3f3b9a0bc405b7d634a130fe", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture2.png", + "target_hash": "14f2ad462db859be582f74ad48bb1ed563ad7d92" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture3.png", + "source_hash": "ea10077666b43fd0151286e860fecd13c1eae0f8", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture3.png", + "target_hash": "288aa2477fe8073d2d2a9253d2d2880314ceb999" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture4.png", + "source_hash": "6228e088857d7b17330da4d0b5f1f416154d9cca", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture4.png", + "target_hash": "fb993072d4de818431a0d0f723dd9a3287b7f5e1" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture5.png", + "source_hash": "4cc3e27461f6e96fa01b12db78d477fa71e7a72f", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture5.png", + "target_hash": "4800201d8b07975b54e0b50133a36f36ccf539b0" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture6.png", + "source_hash": "c0e6b182354db565945f0c25ad40050c6334e8d3", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture6.png", + "target_hash": "c6920429f5051dbf3d47179e213275d63af6311b" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture7.png", + "source_hash": "0c5755a21f940410b7d75515638c14aef1e06877", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture7.png", + "target_hash": "f38568c7bd2ba4c55f8ca4177fa1f72dcbd02245" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture8.png", + "source_hash": "5617626fd20f2e400854397dd9d79f7d1d07286a", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture8.png", + "target_hash": "b839c97153f16d695d9f5e2b6306d81202b418b8" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture9.png", + "source_hash": "71b2342edce35b33f931befb1874c3ff36c31bf6", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture9.png", + "target_hash": "e68edb0cfb16b5d1f4315cc4aa92c4de3181fb47" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/60a267dce113f60001afea51_color.png", + "source_hash": "952da70eda053651abe77c38b3fc617390f82069", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/60a267dce113f60001afea51_color.png", + "target_hash": "89c8c1be66f0c8413279615ea854c251d5499e0f" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/black.png", + "source_hash": "18400c8e6a1803c76221d02e1b893455ab131221", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/black.png", + "target_hash": "7df0a932cba948b8d299210750e2788a7a224b0e" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/normal.png", + "source_hash": "bd3bde253fa401d0abbc9821ed448997f99637c3", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/normal.png", + "target_hash": "84f8434b41159087b73cfe0d77f96ab2d5d8cc26" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/white.png", + "source_hash": "c58f0c81bedafc9346a94609c5c95dd88cc17103", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/white.png", + "target_hash": "591bcf8c09fde1a6f73d7dbd28eb6faf73c66b0b" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Num608bbc47c6ff5a0001d607d8.mdl", + "source_hash": "9d78d3853b60edd913ecfcf97b98fa678c8e14a7", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Num608bbc47c6ff5a0001d607d8.mdl", + "target_hash": "132ac282d3075962de62456603a379b323fc77f0" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Function.mdl", + "source_hash": "22f824fc8fb4cfb3a445d87505fa734323bf5c5c", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Function.mdl", + "target_hash": "7af4085cdbfca7aab80e9c53838434bc7ab53445" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Base.mdl", + "source_hash": "9b11e1feffb0366fdf88f73e19e15f6469fe98f6", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Base.mdl", + "target_hash": "960bd79c3b52fc2bf1e5fc9f97018ff60d7ab84f" + } + ] +} \ No newline at end of file diff --git a/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Num608bbc47c6ff5a0001d607d8.mdl b/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Num608bbc47c6ff5a0001d607d8.mdl new file mode 100644 index 0000000000000000000000000000000000000000..92c8894264a8f0c6f75d1dcf1497e3809991116f --- /dev/null +++ b/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Num608bbc47c6ff5a0001d607d8.mdl @@ -0,0 +1,284 @@ +mdl 1.6; + +import ::math::*; +import ::state::*; +import ::tex::*; +import ::anno::*; +using OmniUe4Function import *; +using OmniUe4Base import *; + +export annotation sampler_color(); +export annotation sampler_normal(); +export annotation sampler_grayscale(); +export annotation sampler_alpha(); +export annotation sampler_masks(); +export annotation sampler_distancefield(); +export annotation dither_masked_off(); +export annotation world_space_normal(); + +export material Num608bbc47c6ff5a0001d607d8( + uniform texture_2d Normal_Tex = texture_2d("./Textures/normal.png",::tex::gamma_linear) + [[ + anno::display_name("Normal_Tex"), + anno::ui_order(32), + anno::in_group("Normal"), + sampler_normal() + ]], + float4 Normal_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Normal_UVA"), + anno::ui_order(32), + anno::in_group("Normal") + ]], + float EmissiveIntensity = 0.0 + [[ + anno::display_name("EmissiveIntensity"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + float IsEmissiveTex = 0.0 + [[ + anno::display_name("IsEmissiveTex"), + anno::in_group("EmissiveColor") + ]], + float4 Emissive_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("Emissive_Color"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + uniform texture_2d Emissive_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Emissive_Tex"), + anno::ui_order(32), + anno::in_group("EmissiveColor"), + sampler_color() + ]], + float4 Emissive_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Emissive_UVA"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + float IsBaseColorTex = 0.0 + [[ + anno::display_name("IsBaseColorTex"), + anno::in_group("BaseColor") + ]], + float4 BaseColor_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("BaseColor_Color"), + anno::ui_order(32), + anno::in_group("BaseColor") + ]], + uniform texture_2d BaseColor_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("BaseColor_Tex"), + anno::ui_order(32), + anno::in_group("BaseColor"), + sampler_color() + ]], + float4 BaseColor_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("BaseColor_UVA"), + anno::ui_order(32), + anno::in_group("BaseColor") + ]], + float IsMetallicTex = 0.0 + [[ + anno::display_name("IsMetallicTex"), + anno::in_group("Metallic") + ]], + float4 Metallic_Color = float4(0.0,0.0,0.0,1.0) + [[ + anno::display_name("Metallic_Color"), + anno::ui_order(32), + anno::in_group("Metallic") + ]], + uniform texture_2d Metallic_Tex = texture_2d("./Textures/black.png",::tex::gamma_srgb) + [[ + anno::display_name("Metallic_Tex"), + anno::ui_order(32), + anno::in_group("Metallic"), + sampler_color() + ]], + float4 Metallic_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Metallic_UVA"), + anno::ui_order(32), + anno::in_group("Metallic") + ]], + float IsSpecularTex = 0.0 + [[ + anno::display_name("IsSpecularTex"), + anno::in_group("Specular") + ]], + float4 Specular_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("Specular_Color"), + anno::ui_order(32), + anno::in_group("Specular") + ]], + uniform texture_2d Specular_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Specular_Tex"), + anno::ui_order(32), + anno::in_group("Specular"), + sampler_color() + ]], + float4 Specular_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Specular_UVA"), + anno::ui_order(32), + anno::in_group("Specular") + ]], + float IsGlossTex = 0.0 + [[ + anno::display_name("IsGlossTex"), + anno::in_group("Roughness") + ]], + float4 Gloss_Color = float4(0.1,0.1,0.1,1.0) + [[ + anno::display_name("Gloss_Color"), + anno::ui_order(32), + anno::in_group("Roughness") + ]], + uniform texture_2d Gloss_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Gloss_Tex"), + anno::ui_order(32), + anno::in_group("Roughness"), + sampler_color() + ]], + float4 Gloss_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Gloss_UVA"), + anno::ui_order(32), + anno::in_group("Roughness") + ]], + float PolygonOffset = 0.0 + [[ + anno::display_name("PolygonOffset"), + anno::ui_order(32), + anno::in_group("WorldPosition") + ]], + int MaxTexCoordIndex = 3 + [[ + anno::hidden() + ]]) + = + let { + float3 Local82 = ::camera_position(); + float3 Local83 = (Local82 - (::convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), true)*state::meters_per_scene_unit()*100.0)); + float Local84 = math::dot(Local83, Local83); + float Local85 = math::sqrt(Local84); + float3 Local86 = (Local83 / Local85); + float3 Local87 = (Local86 * PolygonOffset); + + float3 WorldPositionOffset_mdl = Local87; + float2 CustomizedUV0_mdl = float2(state::texture_coordinate(math::min(0,MaxTexCoordIndex)).x,1.0-state::texture_coordinate(math::min(0,MaxTexCoordIndex)).y); + + float2 Local0 = (float2(0.5,0.5) * -1.0); + float Local1 = (CustomizedUV0_mdl.x * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).x); + float Local2 = (CustomizedUV0_mdl.y * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).y); + float2 Local3 = (Local0 + float2(Local1,Local2)); + float Local4 = (3.141592 * -2.0); + float Local5 = (float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).z / Local4); + float Local6 = (Local5 * 6.283185); + float Local7 = math::cos(Local6); + float Local8 = math::sin(Local6); + float Local9 = (Local8 * -1.0); + float Local10 = math::dot(Local3, float2(Local7,Local9)); + float Local11 = math::dot(Local3, float2(Local8,Local7)); + float2 Local12 = (float2(0.5,0.5) + float2(Local10,Local11)); + float4 Local13 = ::unpack_normal_map(tex::lookup_float4(Normal_Tex,float2(Local12.x,1.0-Local12.y),tex::wrap_repeat,tex::wrap_repeat)); + float3 Local14 = ((math::abs(1.0 - 1.0) > 0.00001) ? (float3(0.0,0.0,0.0)) : float3(Local13.x,Local13.y,Local13.z)); + + float3 Normal_mdl = Local14; + + float Local15 = (CustomizedUV0_mdl.x * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).x); + float Local16 = (CustomizedUV0_mdl.y * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).y); + float2 Local17 = (Local0 + float2(Local15,Local16)); + float Local18 = (float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).z / Local4); + float Local19 = (Local18 * 6.283185); + float Local20 = math::cos(Local19); + float Local21 = math::sin(Local19); + float Local22 = (Local21 * -1.0); + float Local23 = math::dot(Local17, float2(Local20,Local22)); + float Local24 = math::dot(Local17, float2(Local21,Local20)); + float2 Local25 = (float2(0.5,0.5) + float2(Local23,Local24)); + float4 Local26 = tex::lookup_float4(Emissive_Tex,float2(Local25.x,1.0-Local25.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local27 = ((math::abs(IsEmissiveTex - 1.0) > 0.00001) ? (float3(Emissive_Color.x,Emissive_Color.y,Emissive_Color.z)) : float3(Local26.x,Local26.y,Local26.z)); + float3 Local28 = (EmissiveIntensity * Local27); + float Local29 = (CustomizedUV0_mdl.x * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).x); + float Local30 = (CustomizedUV0_mdl.y * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).y); + float2 Local31 = (Local0 + float2(Local29,Local30)); + float Local32 = (float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).z / Local4); + float Local33 = (Local32 * 6.283185); + float Local34 = math::cos(Local33); + float Local35 = math::sin(Local33); + float Local36 = (Local35 * -1.0); + float Local37 = math::dot(Local31, float2(Local34,Local36)); + float Local38 = math::dot(Local31, float2(Local35,Local34)); + float2 Local39 = (float2(0.5,0.5) + float2(Local37,Local38)); + float4 Local40 = tex::lookup_float4(BaseColor_Tex,float2(Local39.x,1.0-Local39.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local41 = ((math::abs(IsBaseColorTex - 1.0) > 0.00001) ? (float3(BaseColor_Color.x,BaseColor_Color.y,BaseColor_Color.z)) : float3(Local40.x,Local40.y,Local40.z)); + float Local42 = (CustomizedUV0_mdl.x * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).x); + float Local43 = (CustomizedUV0_mdl.y * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).y); + float2 Local44 = (Local0 + float2(Local42,Local43)); + float Local45 = (float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).z / Local4); + float Local46 = (Local45 * 6.283185); + float Local47 = math::cos(Local46); + float Local48 = math::sin(Local46); + float Local49 = (Local48 * -1.0); + float Local50 = math::dot(Local44, float2(Local47,Local49)); + float Local51 = math::dot(Local44, float2(Local48,Local47)); + float2 Local52 = (float2(0.5,0.5) + float2(Local50,Local51)); + float4 Local53 = tex::lookup_float4(Metallic_Tex,float2(Local52.x,1.0-Local52.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local54 = ((math::abs(IsMetallicTex - 1.0) > 0.00001) ? (float3(Metallic_Color.x,Metallic_Color.y,Metallic_Color.z)) : float3(Local53.x,Local53.y,Local53.z)); + float Local55 = (CustomizedUV0_mdl.x * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).x); + float Local56 = (CustomizedUV0_mdl.y * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).y); + float2 Local57 = (Local0 + float2(Local55,Local56)); + float Local58 = (float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).z / Local4); + float Local59 = (Local58 * 6.283185); + float Local60 = math::cos(Local59); + float Local61 = math::sin(Local59); + float Local62 = (Local61 * -1.0); + float Local63 = math::dot(Local57, float2(Local60,Local62)); + float Local64 = math::dot(Local57, float2(Local61,Local60)); + float2 Local65 = (float2(0.5,0.5) + float2(Local63,Local64)); + float4 Local66 = tex::lookup_float4(Specular_Tex,float2(Local65.x,1.0-Local65.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local67 = ((math::abs(IsSpecularTex - 1.0) > 0.00001) ? (float3(Specular_Color.x,Specular_Color.y,Specular_Color.z)) : float3(Local66.x,Local66.y,Local66.z)); + float Local68 = (CustomizedUV0_mdl.x * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).x); + float Local69 = (CustomizedUV0_mdl.y * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).y); + float2 Local70 = (Local0 + float2(Local68,Local69)); + float Local71 = (float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).z / Local4); + float Local72 = (Local71 * 6.283185); + float Local73 = math::cos(Local72); + float Local74 = math::sin(Local72); + float Local75 = (Local74 * -1.0); + float Local76 = math::dot(Local70, float2(Local73,Local75)); + float Local77 = math::dot(Local70, float2(Local74,Local73)); + float2 Local78 = (float2(0.5,0.5) + float2(Local76,Local77)); + float4 Local79 = tex::lookup_float4(Gloss_Tex,float2(Local78.x,1.0-Local78.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local80 = ((math::abs(IsGlossTex - 1.0) > 0.00001) ? (float3(Gloss_Color.x,Gloss_Color.y,Gloss_Color.z)) : float3(Local79.x,Local79.y,Local79.z)); + float3 Local81 = (1.0 - Local80); + + float3 EmissiveColor_mdl = Local28; + float OpacityMask_mdl = 1.0; + float3 BaseColor_mdl = Local41; + float Metallic_mdl = Local54.x; + float Specular_mdl = Local67.x; + float Roughness_mdl = Local81.x; + + } in + ::OmniUe4Base( + base_color: BaseColor_mdl, + metallic: Metallic_mdl, + roughness: Roughness_mdl, + specular: Specular_mdl, + normal: Normal_mdl, + opacity: OpacityMask_mdl, + emissive_color: EmissiveColor_mdl, + displacement: WorldPositionOffset_mdl, + two_sided: false); diff --git a/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Base.mdl b/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Base.mdl @@ -0,0 +1,224 @@ +/*************************************************************************************************** + * Copyright 2020 NVIDIA Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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. + **************************************************************************************************/ + +//* 1.0.0 - first version +//* 1.0.1 - merge unlit template +//* 1.0.2 - Fix EDF in the back side: the EDF contained in surface is only used for the front side and not for the back side +//* 1.0.3 - UE4 normal mapping: Geometry normal shouldn't be changed +//* 1.0.4 - using absolute import paths when importing standard modules + +mdl 1.3; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::tex::*; +import ::anno::*; + +float emissive_multiplier() +[[ + anno::description("the multiplier to convert UE4 emissive to raw data"), + anno::noinline() +]] +{ + return 20.0f * 128.0f; +} + +float3 tangent_space_normal( + float3 normal = float3(0.0,0.0,1.0), + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0) +) +[[ + anno::description("Interprets the vector in tangent space"), + anno::noinline() +]] +{ + return math::normalize( + tangent_u * normal.x - /* flip_tangent_v */ + tangent_v * normal.y + + state::normal() * (normal.z)); +} + +float3 world_space_normal( + float3 normal = float3(0.0,0.0,1.0), + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0) +) +[[ + anno::description("Interprets the vector in world space"), + anno::noinline() +]] +{ + return tangent_space_normal( + math::normalize( + normal.x * float3(tangent_u.x, tangent_v.x, state::normal().x) - + normal.y * float3(tangent_u.y, tangent_v.y, state::normal().y) + + normal.z * float3(tangent_u.z, tangent_v.z, state::normal().z)), + tangent_u, + tangent_v + ); +} + +export material OmniUe4Base( + float3 base_color = float3(0.0, 0.0, 0.0), + float metallic = 0.0, + float roughness = 0.5, + float specular = 0.5, + float3 normal = float3(0.0,0.0,1.0), + float clearcoat_weight = 0.0, + float clearcoat_roughness = 0.0, + float3 clearcoat_normal = float3(0.0,0.0,1.0), + uniform bool enable_opacity = true, + float opacity = 1.0, + float3 emissive_color = float3(0.0, 0.0, 0.0), + float3 displacement = float3(0.0), + uniform bool is_tangent_space_normal = true, + uniform bool two_sided = false, + uniform bool is_unlit = false +) +[[ + anno::display_name("Omni UE4 Base"), + anno::description("Omni UE4 Base, supports UE4 default lit and clearcoat shading model"), + anno::version( 1, 0, 0), + anno::author("NVIDIA CORPORATION"), + anno::key_words(string[]("omni", "UE4", "omniverse", "lit", "clearcoat", "generic")) +]] + = let { + color final_base_color = math::saturate(base_color); + float final_metallic = math::saturate(metallic); + float final_roughness = math::saturate(roughness); + float final_specular = math::saturate(specular); + color final_emissive_color = math::max(emissive_color, 0.0f) * emissive_multiplier(); /*factor for converting ue4 emissive to raw value*/ + float final_clearcoat_weight = math::saturate(clearcoat_weight); + float final_clearcoat_roughness = math::saturate(clearcoat_roughness); + float3 final_normal = math::normalize(normal); + float3 final_clearcoat_normal = math::normalize(clearcoat_normal); + + // - compute final roughness by squaring the "roughness" parameter + float alpha = final_roughness * final_roughness; + // reduce the reflectivity at grazing angles to avoid "dark edges" for high roughness due to the layering + float grazing_refl = math::max((1.0 - final_roughness), 0.0); + + float3 the_normal = is_unlit ? state::normal() : + (is_tangent_space_normal ? + tangent_space_normal( + normal: final_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ) : world_space_normal( + normal: final_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + )); + + // for the dielectric component we layer the glossy component on top of the diffuse one, + // the glossy layer has no color tint + + bsdf dielectric_component = df::custom_curve_layer( + weight: final_specular, + normal_reflectivity: 0.08, + grazing_reflectivity: grazing_refl, + layer: df::microfacet_ggx_smith_bsdf(roughness_u: alpha), + base: df::diffuse_reflection_bsdf(tint: final_base_color), + normal: the_normal); + + // the metallic component doesn't have a diffuse component, it's only glossy + // base_color is applied to tint it + bsdf metallic_component = df::microfacet_ggx_smith_bsdf(tint: final_base_color, roughness_u: alpha); + + // final BSDF is a linear blend between dielectric and metallic component + bsdf dielectric_metal_mix = + df::normalized_mix( + components: + df::bsdf_component[]( + df::bsdf_component( + component: metallic_component, + weight: final_metallic), + df::bsdf_component( + component: dielectric_component, + weight: 1.0-final_metallic) + ) + ); + + // clearcoat layer + float clearcoat_grazing_refl = math::max((1.0 - final_clearcoat_roughness), 0.0); + float clearcoat_alpha = final_clearcoat_roughness * final_clearcoat_roughness; + + float3 the_clearcoat_normal = is_tangent_space_normal ? tangent_space_normal( + normal: final_clearcoat_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ) : world_space_normal( + normal: final_clearcoat_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ); + + + bsdf clearcoat = + df::custom_curve_layer( + base: df::weighted_layer( + layer: dielectric_metal_mix, + weight: 1.0, + normal: final_clearcoat_weight == 0.0 ? state::normal() : the_normal + ), + layer: df::microfacet_ggx_smith_bsdf( + roughness_u: clearcoat_alpha, + tint: color(1.0) + ), + normal_reflectivity: 0.04, + grazing_reflectivity: clearcoat_grazing_refl, + normal: the_clearcoat_normal, + weight: final_clearcoat_weight + ); + bsdf surface = is_unlit ? bsdf() : clearcoat; +} +in material( + thin_walled: two_sided, // Graphene? + surface: material_surface( + scattering: surface, + emission: + material_emission ( + emission: df::diffuse_edf (), + intensity: final_emissive_color + ) + ), + backface: material_surface( + emission: + material_emission ( + emission: df::diffuse_edf (), + intensity: final_emissive_color + ) + ), + geometry: material_geometry( + displacement: displacement, + normal: final_clearcoat_weight == 0.0 ? the_normal : state::normal(), + cutout_opacity: enable_opacity ? opacity : 1.0 + ) +); diff --git a/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Function.mdl b/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Function.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f0801afff6f0870ea2574c9e9b6e2043e79e9a79 --- /dev/null +++ b/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Function.mdl @@ -0,0 +1,1413 @@ +/*************************************************************************************************** + * Copyright 2020 NVIDIA Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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. + **************************************************************************************************/ + +//* 1.0.1 - using absolute import paths when importing standard modules + +mdl 1.6; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::tex::*; +import ::anno::*; + + +export float3 convert_to_left_hand(float3 vec3, uniform bool up_z = true, uniform bool is_position = true) +[[ + anno::description("convert from RH to LH"), + anno::noinline() +]] +{ + float4x4 ZupConversion = float4x4( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + float4x4 YupConversion = float4x4( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + float4 vec4 = float4(vec3.x, vec3.y, vec3.z, is_position ? 1.0f : 0.0f); + + vec4 = vec4 * (up_z ? ZupConversion : YupConversion); + + return float3(vec4.x, vec4.y, vec4.z); +} + +export float3 transform_vector_from_tangent_to_world(float3 vector, + uniform bool up_z = true, + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0)) +[[ + anno::description("Transform vector from tangent space to world space"), + anno::noinline() +]] +{ + /* flip_tangent_v */ + return convert_to_left_hand( + tangent_u * vector.x - tangent_v * vector.y + state::normal() * vector.z, + up_z, false); +} + +export float3 transform_vector_from_world_to_tangent(float3 vector, + uniform bool up_z = true, + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0)) +[[ + anno::description("Transform vector from world space to tangent space"), + anno::noinline() +]] +{ + float3 vecRH = convert_to_left_hand(vector, up_z, false); + /* flip_tangent_v */ + return vecRH.x * float3(tangent_u.x, -tangent_v.x, state::normal().x) + + vecRH.y * float3(tangent_u.y, -tangent_v.y, state::normal().y) + + vecRH.z * float3(tangent_u.z, -tangent_v.z, state::normal().z); +} + +export float4 unpack_normal_map( + float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0) + ) +[[ + anno::description("Unpack a normal stored in a normal map"), + anno::noinline() +]] +{ + float2 normal_xy = float2(texture_sample.x, texture_sample.y); + + normal_xy = normal_xy * float2(2.0,2.0) - float2(1.0,1.0); + float normal_z = math::sqrt( math::saturate( 1.0 - math::dot( normal_xy, normal_xy ) ) ); + return float4( normal_xy.x, normal_xy.y, normal_z, 1.0 ); +} + +// for get color value from normal. +export float4 pack_normal_map( + float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0) + ) +[[ + anno::description("Pack to color from a normal") +]] +{ + float2 return_xy = float2(texture_sample.x, texture_sample.y); + + return_xy = (return_xy + float2(1.0,1.0)) / float2(2.0,2.0); + + return float4( return_xy.x, return_xy.y, 0.0, 1.0 ); +} + +export float4 greyscale_texture_lookup( + float4 texture_sample = float4(0.0, 0.0, 0.0, 1.0) + ) +[[ + anno::description("Sampling a greyscale texture"), + anno::noinline() +]] +{ + return float4(texture_sample.x, texture_sample.x, texture_sample.x, texture_sample.x); +} + +export float3 pixel_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Pixel normal in world space"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); +} + +export float3 vertex_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Vertex normal in world space"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); +} + +export float3 landscape_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Landscape normal in world space") +]] +{ + float3 normalFromNormalmap = math::floor((::vertex_normal_world_space(up_z) * 0.5 + 0.5) * 255.0) / 255.0 * 2.0 - 1.0; + + float2 normalXY = float2(normalFromNormalmap.x, normalFromNormalmap.y); + return float3(normalXY.x, normalXY.y, math::sqrt(math::saturate(1.0 - math::dot(normalXY, normalXY)))); +} + +// Different implementation specific between mdl and hlsl for smoothstep +export float smoothstep(float a, float b, float l) +{ + if (a < b) + { + return math::smoothstep(a, b, l); + } + else if (a > b) + { + return 1.0 - math::smoothstep(b, a, l); + } + else + { + return l <= a ? 0.0 : 1.0; + } +} + +export float2 smoothstep(float2 a, float2 b, float2 l) +{ + return float2(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y)); +} + +export float3 smoothstep(float3 a, float3 b, float3 l) +{ + return float3(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z)); +} + +export float4 smoothstep(float4 a, float4 b, float4 l) +{ + return float4(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z), smoothstep(a.w, b.w, l.w)); +} + +export float2 smoothstep(float2 a, float2 b, float l) +{ + return float2(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l)); +} + +export float3 smoothstep(float3 a, float3 b, float l) +{ + return float3(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l)); +} + +export float4 smoothstep(float4 a, float4 b, float l) +{ + return float4(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l), smoothstep(a.w, b.w, l)); +} + +export float2 smoothstep(float a, float b, float2 l) +{ + return float2(smoothstep(a, b, l.x), smoothstep(a, b, l.y)); +} + +export float3 smoothstep(float a, float b, float3 l) +{ + return float3(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z)); +} + +export float4 smoothstep(float a, float b, float4 l) +{ + return float4(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z), smoothstep(a, b, l.w)); +} + +//------------------ Random from UE4 ----------------------- +float length2(float3 v) +{ + return math::dot(v, v); +} + +float3 GetPerlinNoiseGradientTextureAt(uniform texture_2d PerlinNoiseGradientTexture, float3 v) +{ + const float2 ZShear = float2(17.0f, 89.0f); + + float2 OffsetA = v.z * ZShear; + float2 TexA = (float2(v.x, v.y) + OffsetA + 0.5f) / 128.0f; + float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA.x,1.0-TexA.y),tex::wrap_repeat,tex::wrap_repeat); + return float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z) * 2.0 - 1.0; +} + +float3 SkewSimplex(float3 In) +{ + return In + math::dot(In, float3(1.0 / 3.0f) ); +} +float3 UnSkewSimplex(float3 In) +{ + return In - math::dot(In, float3(1.0 / 6.0f) ); +} + +// 3D random number generator inspired by PCGs (permuted congruential generator) +// Using a **simple** Feistel cipher in place of the usual xor shift permutation step +// @param v = 3D integer coordinate +// @return three elements w/ 16 random bits each (0-0xffff). +// ~8 ALU operations for result.x (7 mad, 1 >>) +// ~10 ALU operations for result.xy (8 mad, 2 >>) +// ~12 ALU operations for result.xyz (9 mad, 3 >>) + +//TODO: uint3 +int3 Rand3DPCG16(int3 p) +{ + // taking a signed int then reinterpreting as unsigned gives good behavior for negatives + //TODO: uint3 + int3 v = int3(p); + + // Linear congruential step. These LCG constants are from Numerical Recipies + // For additional #'s, PCG would do multiple LCG steps and scramble each on output + // So v here is the RNG state + v = v * 1664525 + 1013904223; + + // PCG uses xorshift for the final shuffle, but it is expensive (and cheap + // versions of xorshift have visible artifacts). Instead, use simple MAD Feistel steps + // + // Feistel ciphers divide the state into separate parts (usually by bits) + // then apply a series of permutation steps one part at a time. The permutations + // use a reversible operation (usually ^) to part being updated with the result of + // a permutation function on the other parts and the key. + // + // In this case, I'm using v.x, v.y and v.z as the parts, using + instead of ^ for + // the combination function, and just multiplying the other two parts (no key) for + // the permutation function. + // + // That gives a simple mad per round. + v.x += v.y*v.z; + v.y += v.z*v.x; + v.z += v.x*v.y; + v.x += v.y*v.z; + v.y += v.z*v.x; + v.z += v.x*v.y; + + // only top 16 bits are well shuffled + return v >> 16; +} + +// Wraps noise for tiling texture creation +// @param v = unwrapped texture parameter +// @param bTiling = true to tile, false to not tile +// @param RepeatSize = number of units before repeating +// @return either original or wrapped coord +float3 NoiseTileWrap(float3 v, bool bTiling, float RepeatSize) +{ + return bTiling ? (math::frac(v / RepeatSize) * RepeatSize) : v; +} + +// Evaluate polynomial to get smooth transitions for Perlin noise +// only needed by Perlin functions in this file +// scalar(per component): 2 add, 5 mul +float4 PerlinRamp(float4 t) +{ + return t * t * t * (t * (t * 6 - 15) + 10); +} + +// Blum-Blum-Shub-inspired pseudo random number generator +// http://www.umbc.edu/~olano/papers/mNoise.pdf +// real BBS uses ((s*s) mod M) with bignums and M as the product of two huge Blum primes +// instead, we use a single prime M just small enough not to overflow +// note that the above paper used 61, which fits in a half, but is unusably bad +// @param Integer valued floating point seed +// @return random number in range [0,1) +// ~8 ALU operations (5 *, 3 frac) +float RandBBSfloat(float seed) +{ + float BBS_PRIME24 = 4093.0; + float s = math::frac(seed / BBS_PRIME24); + s = math::frac(s * s * BBS_PRIME24); + s = math::frac(s * s * BBS_PRIME24); + return s; +} + +// Modified noise gradient term +// @param seed - random seed for integer lattice position +// @param offset - [-1,1] offset of evaluation point from lattice point +// @return gradient direction (xyz) and contribution (w) from this lattice point +float4 MGradient(int seed, float3 offset) +{ + //TODO uint + int rand = Rand3DPCG16(int3(seed,0,0)).x; + int3 MGradientMask = int3(0x8000, 0x4000, 0x2000); + float3 MGradientScale = float3(1.0 / 0x4000, 1.0 / 0x2000, 1.0 / 0x1000); + float3 direction = float3(int3(rand, rand, rand) & MGradientMask) * MGradientScale - 1; + return float4(direction.x, direction.y, direction.z, math::dot(direction, offset)); +} + +// compute Perlin and related noise corner seed values +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = true to return seed values for a repeating noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @param seed000-seed111 = hash function seeds for the eight corners +// @return fractional part of v +struct SeedValue +{ + float3 fv = float3(0); + float seed000 = 0; + float seed001 = 0; + float seed010 = 0; + float seed011 = 0; + float seed100 = 0; + float seed101 = 0; + float seed110 = 0; + float seed111 = 0; +}; + +SeedValue NoiseSeeds(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds; + seeds.fv = math::frac(v); + float3 iv = math::floor(v); + + const float3 primes = float3(19, 47, 101); + + if (bTiling) + { // can't algebraically combine with primes + seeds.seed000 = math::dot(primes, NoiseTileWrap(iv, true, RepeatSize)); + seeds.seed100 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 0), true, RepeatSize)); + seeds.seed010 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 0), true, RepeatSize)); + seeds.seed110 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 0), true, RepeatSize)); + seeds.seed001 = math::dot(primes, NoiseTileWrap(iv + float3(0, 0, 1), true, RepeatSize)); + seeds.seed101 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 1), true, RepeatSize)); + seeds.seed011 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 1), true, RepeatSize)); + seeds.seed111 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 1), true, RepeatSize)); + } + else + { // get to combine offsets with multiplication by primes in this case + seeds.seed000 = math::dot(iv, primes); + seeds.seed100 = seeds.seed000 + primes.x; + seeds.seed010 = seeds.seed000 + primes.y; + seeds.seed110 = seeds.seed100 + primes.y; + seeds.seed001 = seeds.seed000 + primes.z; + seeds.seed101 = seeds.seed100 + primes.z; + seeds.seed011 = seeds.seed010 + primes.z; + seeds.seed111 = seeds.seed110 + primes.z; + } + + return seeds; +} + +struct SimplexWeights +{ + float4 Result = float4(0); + float3 PosA = float3(0); + float3 PosB = float3(0); + float3 PosC = float3(0); + float3 PosD = float3(0); +}; + +// Computed weights and sample positions for simplex interpolation +// @return float4(a,b,c, d) Barycentric coordinate defined as Filtered = Tex(PosA) * a + Tex(PosB) * b + Tex(PosC) * c + Tex(PosD) * d +SimplexWeights ComputeSimplexWeights3D(float3 OrthogonalPos) +{ + SimplexWeights weights; + float3 OrthogonalPosFloor = math::floor(OrthogonalPos); + + weights.PosA = OrthogonalPosFloor; + weights.PosB = weights.PosA + float3(1, 1, 1); + + OrthogonalPos -= OrthogonalPosFloor; + + float Largest = math::max(OrthogonalPos.x, math::max(OrthogonalPos.y, OrthogonalPos.z)); + float Smallest = math::min(OrthogonalPos.x, math::min(OrthogonalPos.y, OrthogonalPos.z)); + + weights.PosC = weights.PosA + float3(Largest == OrthogonalPos.x, Largest == OrthogonalPos.y, Largest == OrthogonalPos.z); + weights.PosD = weights.PosA + float3(Smallest != OrthogonalPos.x, Smallest != OrthogonalPos.y, Smallest != OrthogonalPos.z); + + float RG = OrthogonalPos.x - OrthogonalPos.y; + float RB = OrthogonalPos.x - OrthogonalPos.z; + float GB = OrthogonalPos.y - OrthogonalPos.z; + + weights.Result.z = + math::min(math::max(0, RG), math::max(0, RB)) // X + + math::min(math::max(0, -RG), math::max(0, GB)) // Y + + math::min(math::max(0, -RB), math::max(0, -GB)); // Z + + weights.Result.w = + math::min(math::max(0, -RG), math::max(0, -RB)) // X + + math::min(math::max(0, RG), math::max(0, -GB)) // Y + + math::min(math::max(0, RB), math::max(0, GB)); // Z + + weights.Result.y = Smallest; + weights.Result.x = 1.0f - weights.Result.y - weights.Result.z - weights.Result.w; + + return weights; +} + +// filtered 3D gradient simple noise (few texture lookups, high quality) +// @param v >0 +// @return random number in the range -1 .. 1 +float SimplexNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 EvalPos) +{ + float3 OrthogonalPos = SkewSimplex(EvalPos); + + SimplexWeights Weights = ComputeSimplexWeights3D(OrthogonalPos); + + // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 32 bit) + float3 A = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosA); + float3 B = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosB); + float3 C = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosC); + float3 D = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosD); + + Weights.PosA = UnSkewSimplex(Weights.PosA); + Weights.PosB = UnSkewSimplex(Weights.PosB); + Weights.PosC = UnSkewSimplex(Weights.PosC); + Weights.PosD = UnSkewSimplex(Weights.PosD); + + float DistanceWeight; + + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosA)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float a = math::dot(A, EvalPos - Weights.PosA) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosB)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float b = math::dot(B, EvalPos - Weights.PosB) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosC)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float c = math::dot(C, EvalPos - Weights.PosC) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosD)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float d = math::dot(D, EvalPos - Weights.PosD) * DistanceWeight; + + return 32 * (a + b + c + d); +} + +// filtered 3D noise, can be optimized +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float GradientNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 v, bool bTiling, float RepeatSize) +{ + bTiling = true; + float3 fv = math::frac(v); + float3 iv0 = NoiseTileWrap(math::floor(v), bTiling, RepeatSize); + float3 iv1 = NoiseTileWrap(iv0 + 1, bTiling, RepeatSize); + + const int2 ZShear = int2(17, 89); + + float2 OffsetA = iv0.z * ZShear; + float2 OffsetB = OffsetA + ZShear; // non-tiling, use relative offset + if (bTiling) // tiling, have to compute from wrapped coordinates + { + OffsetB = iv1.z * ZShear; + } + + // Texture size scale factor + float ts = 1 / 128.0f; + + // texture coordinates for iv0.xy, as offset for both z slices + float2 TexA0 = (float2(iv0.x, iv0.y) + OffsetA + 0.5f) * ts; + float2 TexB0 = (float2(iv0.x, iv0.y) + OffsetB + 0.5f) * ts; + + // texture coordinates for iv1.xy, as offset for both z slices + float2 TexA1 = TexA0 + ts; // for non-tiling, can compute relative to existing coordinates + float2 TexB1 = TexB0 + ts; + if (bTiling) // for tiling, need to compute from wrapped coordinates + { + TexA1 = (float2(iv1.x, iv1.y) + OffsetA + 0.5f) * ts; + TexB1 = (float2(iv1.x, iv1.y) + OffsetB + 0.5f) * ts; + } + + + // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 8, 16 or 32 bit) + float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat); + float3 PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 A = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 B = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 C = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 D = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 E = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 F = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 G = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 H = PerlinNoiseColor * 2 - 1; + + float a = math::dot(A, fv - float3(0, 0, 0)); + float b = math::dot(B, fv - float3(1, 0, 0)); + float c = math::dot(C, fv - float3(0, 1, 0)); + float d = math::dot(D, fv - float3(1, 1, 0)); + float e = math::dot(E, fv - float3(0, 0, 1)); + float f = math::dot(F, fv - float3(1, 0, 1)); + float g = math::dot(G, fv - float3(0, 1, 1)); + float h = math::dot(H, fv - float3(1, 1, 1)); + + float4 Weights = PerlinRamp(math::frac(float4(fv.x, fv.y, fv.z, 0))); + + float i = math::lerp(math::lerp(a, b, Weights.x), math::lerp(c, d, Weights.x), Weights.y); + float j = math::lerp(math::lerp(e, f, Weights.x), math::lerp(g, h, Weights.x), Weights.y); + + return math::lerp(i, j, Weights.z); +} + +// @return random number in the range -1 .. 1 +// scalar: 6 frac, 31 mul/mad, 15 add, +float FastGradientPerlinNoise3D_TEX(uniform texture_3d PerlinNoise3DTexture, float3 xyz) +{ + // needs to be the same value when creating the PerlinNoise3D texture + float Extent = 16; + + // last texel replicated and needed for filtering + // scalar: 3 frac, 6 mul + xyz = math::frac(xyz / (Extent - 1)) * (Extent - 1); + + // scalar: 3 frac + float3 uvw = math::frac(xyz); + // = floor(xyz); + // scalar: 3 add + float3 p0 = xyz - uvw; +// float3 f = math::pow(uvw, 2) * 3.0f - math::pow(uvw, 3) * 2.0f; // original perlin hermite (ok when used without bump mapping) + // scalar: 2*3 add 5*3 mul + float4 pr = PerlinRamp(float4(uvw.x, uvw.y, uvw.z, 0)); + float3 f = float3(pr.x, pr.y, pr.z); // new, better with continues second derivative for bump mapping + // scalar: 3 add + float3 p = p0 + f; + // scalar: 3 mad + // TODO: need reverse??? + float4 NoiseSample = tex::lookup_float4(PerlinNoise3DTexture, p / Extent + 0.5f / Extent); // +0.5f to get rid of bilinear offset + + // reconstruct from 8bit (using mad with 2 constants and dot4 was same instruction count) + // scalar: 4 mad, 3 mul, 3 add + float3 n = float3(NoiseSample.x, NoiseSample.y, NoiseSample.z) * 255.0f / 127.0f - 1.0f; + float d = NoiseSample.w * 255.f - 127; + return math::dot(xyz, n) - d; +} + +// Perlin-style "Modified Noise" +// http://www.umbc.edu/~olano/papers/index.html#mNoise +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float GradientNoise3D_ALU(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize); + + float rand000 = MGradient(int(seeds.seed000), seeds.fv - float3(0, 0, 0)).w; + float rand100 = MGradient(int(seeds.seed100), seeds.fv - float3(1, 0, 0)).w; + float rand010 = MGradient(int(seeds.seed010), seeds.fv - float3(0, 1, 0)).w; + float rand110 = MGradient(int(seeds.seed110), seeds.fv - float3(1, 1, 0)).w; + float rand001 = MGradient(int(seeds.seed001), seeds.fv - float3(0, 0, 1)).w; + float rand101 = MGradient(int(seeds.seed101), seeds.fv - float3(1, 0, 1)).w; + float rand011 = MGradient(int(seeds.seed011), seeds.fv - float3(0, 1, 1)).w; + float rand111 = MGradient(int(seeds.seed111), seeds.fv - float3(1, 1, 1)).w; + + float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0)); + + float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y); + float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y); + return math::lerp(i, j, Weights.z); +} + +// 3D value noise - used to be incorrectly called Perlin noise +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float ValueNoise3D_ALU(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize); + + float rand000 = RandBBSfloat(seeds.seed000) * 2 - 1; + float rand100 = RandBBSfloat(seeds.seed100) * 2 - 1; + float rand010 = RandBBSfloat(seeds.seed010) * 2 - 1; + float rand110 = RandBBSfloat(seeds.seed110) * 2 - 1; + float rand001 = RandBBSfloat(seeds.seed001) * 2 - 1; + float rand101 = RandBBSfloat(seeds.seed101) * 2 - 1; + float rand011 = RandBBSfloat(seeds.seed011) * 2 - 1; + float rand111 = RandBBSfloat(seeds.seed111) * 2 - 1; + + float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0)); + + float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y); + float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y); + return math::lerp(i, j, Weights.z); +} + +// 3D jitter offset within a voronoi noise cell +// @param pos - integer lattice corner +// @return random offsets vector +float3 VoronoiCornerSample(float3 pos, int Quality) +{ + // random values in [-0.5, 0.5] + float3 noise = float3(Rand3DPCG16(int3(pos))) / 0xffff - 0.5; + + // quality level 1 or 2: searches a 2x2x2 neighborhood with points distributed on a sphere + // scale factor to guarantee jittered points will be found within a 2x2x2 search + if (Quality <= 2) + { + return math::normalize(noise) * 0.2588; + } + + // quality level 3: searches a 3x3x3 neighborhood with points distributed on a sphere + // scale factor to guarantee jittered points will be found within a 3x3x3 search + if (Quality == 3) + { + return math::normalize(noise) * 0.3090; + } + + // quality level 4: jitter to anywhere in the cell, needs 4x4x4 search + return noise; +} + +// compare previous best with a new candidate +// not producing point locations makes it easier for compiler to eliminate calculations when they're not needed +// @param minval = location and distance of best candidate seed point before the new one +// @param candidate = candidate seed point +// @param offset = 3D offset to new candidate seed point +// @param bDistanceOnly = if true, only set maxval.w with distance, otherwise maxval.w is distance and maxval.xyz is position +// @return position (if bDistanceOnly is false) and distance to closest seed point so far +float4 VoronoiCompare(float4 minval, float3 candidate, float3 offset, bool bDistanceOnly) +{ + if (bDistanceOnly) + { + return float4(0, 0, 0, math::min(minval.w, math::dot(offset, offset))); + } + else + { + float newdist = math::dot(offset, offset); + return newdist > minval.w ? minval : float4(candidate.x, candidate.y, candidate.z, newdist); + } +} + +// 220 instruction Worley noise +float4 VoronoiNoise3D_ALU(float3 v, int Quality, bool bTiling, float RepeatSize, bool bDistanceOnly) +{ + float3 fv = math::frac(v), fv2 = math::frac(v + 0.5); + float3 iv = math::floor(v), iv2 = math::floor(v + 0.5); + + // with initial minimum distance = infinity (or at least bigger than 4), first min is optimized away + float4 mindist = float4(0,0,0,100); + float3 p, offset; + + // quality level 3: do a 3x3x3 search + if (Quality == 3) + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = -1; offset_x <= 1; ++offset_x) + { + for (offset_y = -1; offset_y <= 1; ++offset_y) + { + for (offset_z = -1; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly); + } + } + } + } + + // everybody else searches a base 2x2x2 neighborhood + else + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = 0; offset_x <= 1; ++offset_x) + { + for (offset_y = 0; offset_y <= 1; ++offset_y) + { + for (offset_z = 0; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // quality level 2, do extra set of points, offset by half a cell + if (Quality == 2) + { + // 467 is just an offset to a different area in the random number field to avoid similar neighbor artifacts + p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize) + 467, Quality); + mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly); + } + } + } + } + } + + // quality level 4: add extra sets of four cells in each direction + if (Quality >= 4) + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = -1; offset_x <= 2; offset_x += 3) + { + for (offset_y = 0; offset_y <= 1; ++offset_y) + { + for (offset_z = 0; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + // along x axis + p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // along y axis + p = float3(offset.y, offset.z, offset.x) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.y, offset.z, offset.x), bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // along z axis + p = float3(offset.z, offset.x, offset.y) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.z, offset.x, offset.y), bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + } + } + } + } + + // transform squared distance to real distance + return float4(mindist.x, mindist.y, mindist.z, math::sqrt(mindist.w)); +} + +// Coordinates for corners of a Simplex tetrahedron +// Based on McEwan et al., Efficient computation of noise in GLSL, JGT 2011 +// @param v = 3D noise argument +// @return 4 corner locations +float4x3 SimplexCorners(float3 v) +{ + // find base corner by skewing to tetrahedral space and back + float3 tet = math::floor(v + v.x/3 + v.y/3 + v.z/3); + float3 base = tet - tet.x/6 - tet.y/6 - tet.z/6; + float3 f = v - base; + + // Find offsets to other corners (McEwan did this in tetrahedral space, + // but since skew is along x=y=z axis, this works in Euclidean space too.) + float3 g = math::step(float3(f.y,f.z,f.x), float3(f.x,f.y,f.z)), h = 1 - float3(g.z, g.x, g.y); + float3 a1 = math::min(g, h) - 1.0 / 6.0, a2 = math::max(g, h) - 1.0 / 3.0; + + // four corners + return float4x3(base, base + a1, base + a2, base + 0.5); +} + +// Improved smoothing function for simplex noise +// @param f = fractional distance to four tetrahedral corners +// @return weight for each corner +float4 SimplexSmooth(float4x3 f) +{ + const float scale = 1024. / 375.; // scale factor to make noise -1..1 + float4 d = float4(math::dot(f[0], f[0]), math::dot(f[1], f[1]), math::dot(f[2], f[2]), math::dot(f[3], f[3])); + float4 s = math::saturate(2 * d); + return (1 * scale + s*(-3 * scale + s*(3 * scale - s*scale))); +} + +// Derivative of simplex noise smoothing function +// @param f = fractional distanc eto four tetrahedral corners +// @return derivative of smoothing function for each corner by x, y and z +float3x4 SimplexDSmooth(float4x3 f) +{ + const float scale = 1024. / 375.; // scale factor to make noise -1..1 + float4 d = float4(math::dot(f[0], f[0]), math::dot(f[1], f[1]), math::dot(f[2], f[2]), math::dot(f[3], f[3])); + float4 s = math::saturate(2 * d); + s = -12 * scale + s*(24 * scale - s * 12 * scale); + + return float3x4( + s * float4(f[0][0], f[1][0], f[2][0], f[3][0]), + s * float4(f[0][1], f[1][1], f[2][1], f[3][1]), + s * float4(f[0][2], f[1][2], f[2][2], f[3][2])); +} + +// Simplex noise and its Jacobian derivative +// @param v = 3D noise argument +// @param bTiling = whether to repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension, must be a multiple of 3 +// @return float3x3 Jacobian in J[*].xyz, vector noise in J[*].w +// J[0].w, J[1].w, J[2].w is a Perlin-style simplex noise with vector output, e.g. (Nx, Ny, Nz) +// J[i].x is X derivative of the i'th component of the noise so J[2].x is dNz/dx +// You can use this to compute the noise, gradient, curl, or divergence: +// float3x4 J = JacobianSimplex_ALU(...); +// float3 VNoise = float3(J[0].w, J[1].w, J[2].w); // 3D noise +// float3 Grad = J[0].xyz; // gradient of J[0].w +// float3 Curl = float3(J[1][2]-J[2][1], J[2][0]-J[0][2], J[0][1]-J[1][2]); +// float Div = J[0][0]+J[1][1]+J[2][2]; +// All of these are confirmed to compile out all unneeded terms. +// So Grad of X doesn't compute Y or Z components, and VNoise doesn't do any of the derivative computation. +float3x4 JacobianSimplex_ALU(float3 v, bool bTiling, float RepeatSize) +{ + int3 MGradientMask = int3(0x8000, 0x4000, 0x2000); + float3 MGradientScale = float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000); + + // corners of tetrahedron + float4x3 T = SimplexCorners(v); + // TODO: uint3 + int3 rand = int3(0); + float4x3 gvec0 = float4x3(1.0); + float4x3 gvec1 = float4x3(1.0); + float4x3 gvec2 = float4x3(1.0); + float4x3 fv = float4x3(1.0); + float3x4 grad = float3x4(1.0); + + // processing of tetrahedral vertices, unrolled + // to compute gradient at each corner + fv[0] = v - T[0]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[0] + 0.5, bTiling, RepeatSize)))); + gvec0[0] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[0] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[0] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][0] = math::dot(gvec0[0], fv[0]); + grad[1][0] = math::dot(gvec1[0], fv[0]); + grad[2][0] = math::dot(gvec2[0], fv[0]); + + fv[1] = v - T[1]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[1] + 0.5, bTiling, RepeatSize)))); + gvec0[1] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[1] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec1[1] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][1] = math::dot(gvec0[1], fv[1]); + grad[1][1] = math::dot(gvec1[1], fv[1]); + grad[2][1] = math::dot(gvec2[1], fv[1]); + + fv[2] = v - T[2]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[2] + 0.5, bTiling, RepeatSize)))); + gvec0[2] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[2] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[2] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][2] = math::dot(gvec0[2], fv[2]); + grad[1][2] = math::dot(gvec1[2], fv[2]); + grad[2][2] = math::dot(gvec2[2], fv[2]); + + fv[3] = v - T[3]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[3] + 0.5, bTiling, RepeatSize)))); + gvec0[3] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[3] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[3] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][3] = math::dot(gvec0[3], fv[3]); + grad[1][3] = math::dot(gvec1[3], fv[3]); + grad[2][3] = math::dot(gvec2[3], fv[3]); + + // blend gradients + float4 sv = SimplexSmooth(fv); + float3x4 ds = SimplexDSmooth(fv); + + float3x4 jacobian = float3x4(1.0); + float3 vec0 = gvec0*sv + grad[0]*ds; // NOTE: mdl is column major, convert from UE4 (row major) + jacobian[0] = float4(vec0.x, vec0.y, vec0.z, math::dot(sv, grad[0])); + float3 vec1 = gvec1*sv + grad[1]*ds; + jacobian[1] = float4(vec1.x, vec1.y, vec1.z, math::dot(sv, grad[1])); + float3 vec2 = gvec2*sv + grad[2]*ds; + jacobian[2] = float4(vec2.x, vec2.y, vec2.z, math::dot(sv, grad[2])); + + return jacobian; +} + +// While RepeatSize is a float here, the expectation is that it would be largely integer values coming in from the UI. The downstream logic assumes +// floats for all called functions (NoiseTileWrap) and this prevents any float-to-int conversion errors from automatic type conversion. +float Noise3D_Multiplexer(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, int Function, float3 Position, int Quality, bool bTiling, float RepeatSize) +{ + // verified, HLSL compiled out the switch if Function is a constant + switch(Function) + { + case 0: + return SimplexNoise3D_TEX(PerlinNoiseGradientTexture, Position); + case 1: + return GradientNoise3D_TEX(PerlinNoiseGradientTexture, Position, bTiling, RepeatSize); + case 2: + return FastGradientPerlinNoise3D_TEX(PerlinNoise3DTexture, Position); + case 3: + return GradientNoise3D_ALU(Position, bTiling, RepeatSize); + case 4: + return ValueNoise3D_ALU(Position, bTiling, RepeatSize); + case 5: + return VoronoiNoise3D_ALU(Position, Quality, bTiling, RepeatSize, true).w * 2.0 - 1.0; + } + return 0; +} +//---------------------------------------------------------- + +export float noise(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, float3 Position, float Scale, float Quality, float Function, float Turbulence, float Levels, float OutputMin, float OutputMax, float LevelScale, float FilterWidth, float Tiling, float RepeatSize) +[[ + anno::description("Noise"), + anno::noinline() +]] +{ + Position *= Scale; + FilterWidth *= Scale; + + float Out = 0.0f; + float OutScale = 1.0f; + float InvLevelScale = 1.0f / LevelScale; + + int iFunction(Function); + int iQuality(Quality); + int iLevels(Levels); + bool bTurbulence(Turbulence); + bool bTiling(Tiling); + + for(int i = 0; i < iLevels; ++i) + { + // fade out noise level that are too high frequent (not done through dynamic branching as it usually requires gradient instructions) + OutScale *= math::saturate(1.0 - FilterWidth); + + if(bTurbulence) + { + Out += math::abs(Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize)) * OutScale; + } + else + { + Out += Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize) * OutScale; + } + + Position *= LevelScale; + RepeatSize *= LevelScale; + OutScale *= InvLevelScale; + FilterWidth *= LevelScale; + } + + if(!bTurbulence) + { + // bring -1..1 to 0..1 range + Out = Out * 0.5f + 0.5f; + } + + // Out is in 0..1 range + return math::lerp(OutputMin, OutputMax, Out); +} + +// Material node for noise functions returning a vector value +// @param LevelScale usually 2 but higher values allow efficient use of few levels +// @return in user defined range (OutputMin..OutputMax) +export float4 vector4_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize) +[[ + anno::description("Vector Noise"), + anno::noinline() +]] +{ + float4 result = float4(0,0,0,1); + float3 ret = float3(0); + int iQuality = int(Quality); + int iFunction = int(Function); + bool bTiling = Tiling > 0.0; + + float3x4 Jacobian = JacobianSimplex_ALU(Position, bTiling, TileSize); // compiled out if not used + + // verified, HLSL compiled out the switch if Function is a constant + switch (iFunction) + { + case 0: // Cellnoise + ret = float3(Rand3DPCG16(int3(math::floor(NoiseTileWrap(Position, bTiling, TileSize))))) / 0xffff; + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 1: // Color noise + ret = float3(Jacobian[0].w, Jacobian[1].w, Jacobian[2].w); + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 2: // Gradient + result = Jacobian[0]; + break; + case 3: // Curl + ret = float3(Jacobian[2][1] - Jacobian[1][2], Jacobian[0][2] - Jacobian[2][0], Jacobian[1][0] - Jacobian[0][1]); + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 4: // Voronoi + result = VoronoiNoise3D_ALU(Position, iQuality, bTiling, TileSize, false); + break; + } + return result; +} + +export float3 vector3_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize) +[[ + anno::description("Vector Noise float3 version"), + anno::noinline() +]] +{ + float4 noise = vector4_noise(Position, Quality, Function, Tiling, TileSize); + return float3(noise.x, noise.y, noise.z); +} + + +// workaround for ue4 fresnel (without supporting for camera vector) : replacing it with 0.0, means facing to the view +export float fresnel(float exponent [[anno::unused()]], float base_reflect_fraction [[anno::unused()]], float3 normal [[anno::unused()]]) +[[ + anno::description("Fresnel"), + anno::noinline() +]] +{ + return 0.0; +} + +export float fresnel_function(float3 normal_vector [[anno::unused()]], float3 camera_vector [[anno::unused()]], + bool invert_fresnel [[anno::unused()]], float power [[anno::unused()]], + bool use_cheap_contrast [[anno::unused()]], float cheap_contrast_dark [[anno::unused()]], float cheap_contrast_bright [[anno::unused()]], + bool clamp_fresnel_dot_product [[anno::unused()]]) +[[ + anno::description("Fresnel Function"), + anno::noinline() +]] +{ + return 0.0; +} + +export float3 camera_vector(uniform bool up_z = true) +[[ + anno::description("Camera Vector"), + anno::noinline() +]] +{ + // assume camera postion is 0,0,0 + return math::normalize(float3(0) - convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z)); +} + +export float pixel_depth() +[[ + anno::description("Pixel Depth"), + anno::noinline() +]] +{ + return 256.0f; +} + +export float scene_depth() +[[ + anno::description("Scene Depth") +]] +{ + return 65500.0f; +} + +export float3 scene_color() +[[ + anno::description("Scene Color") +]] +{ + return float3(1.0f); +} + +export float4 vertex_color() +[[ + anno::description("Vertex Color"), + anno::noinline() +]] +{ + return float4(1.0f); +} + +export float4 vertex_color_from_coordinate(int VertexColorCoordinateIndex) +[[ + anno::description("Vertex Color for float2 PrimVar"), + anno::noinline() +]] +{ + // Kit only supports 4 uv sets, 2 uvs are available to vertex color. if vertex color index is invalid, output the constant WHITE color intead + return (VertexColorCoordinateIndex > 2) ? float4(1.0f) : float4(state::texture_coordinate(VertexColorCoordinateIndex).x, state::texture_coordinate(VertexColorCoordinateIndex).y, state::texture_coordinate(VertexColorCoordinateIndex+1).x, state::texture_coordinate(VertexColorCoordinateIndex+1).y); +} + +export float3 camera_position() +[[ + anno::description("Camera Position"), + anno::noinline() +]] +{ + return float3(1000.0f, 0, 0); +} + +export float3 rotate_about_axis(float4 NormalizedRotationAxisAndAngle, float3 PositionOnAxis, float3 Position) +[[ + anno::description("Rotates Position about the given axis by the given angle") +]] +{ + // Project Position onto the rotation axis and find the closest point on the axis to Position + float3 NormalizedRotationAxis = float3(NormalizedRotationAxisAndAngle.x,NormalizedRotationAxisAndAngle.y,NormalizedRotationAxisAndAngle.z); + float3 ClosestPointOnAxis = PositionOnAxis + NormalizedRotationAxis * math::dot(NormalizedRotationAxis, Position - PositionOnAxis); + // Construct orthogonal axes in the plane of the rotation + float3 UAxis = Position - ClosestPointOnAxis; + float3 VAxis = math::cross(NormalizedRotationAxis, UAxis); + float[2] SinCosAngle = math::sincos(NormalizedRotationAxisAndAngle.w); + // Rotate using the orthogonal axes + float3 R = UAxis * SinCosAngle[1] + VAxis * SinCosAngle[0]; + // Reconstruct the rotated world space position + float3 RotatedPosition = ClosestPointOnAxis + R; + // Convert from position to a position offset + return RotatedPosition - Position; +} + +export float2 rotate_scale_offset_texcoords(float2 InTexCoords, float4 InRotationScale, float2 InOffset) +[[ + anno::description("Returns a float2 texture coordinate after 2x2 transform and offset applied") +]] +{ + return float2(math::dot(InTexCoords, float2(InRotationScale.x, InRotationScale.y)), math::dot(InTexCoords, float2(InRotationScale.z, InRotationScale.w))) + InOffset; +} + +export float3 reflection_custom_world_normal(float3 WorldNormal, bool bNormalizeInputNormal, uniform bool up_z = true) +[[ + anno::description("Reflection vector about the specified world space normal") +]] +{ + if (bNormalizeInputNormal) + { + WorldNormal = math::normalize(WorldNormal); + } + + return -camera_vector(up_z) + WorldNormal * math::dot(WorldNormal, camera_vector(up_z)) * 2.0; +} + +export float3 reflection_vector(uniform bool up_z = true) +[[ + anno::description("Reflection Vector"), + anno::noinline() +]] +{ + float3 normal = convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); + return reflection_custom_world_normal(normal, false, up_z); +} + +export float dither_temporalAA(float AlphaThreshold = 0.5f, float Random = 1.0f [[anno::unused()]]) +[[ + anno::description("Dither TemporalAA"), + anno::noinline() +]] +{ + return AlphaThreshold; +} + +export float3 black_body( float Temp ) +[[ + anno::description("Black Body"), + anno::noinline() +]] +{ + float u = ( 0.860117757f + 1.54118254e-4f * Temp + 1.28641212e-7f * Temp*Temp ) / ( 1.0f + 8.42420235e-4f * Temp + 7.08145163e-7f * Temp*Temp ); + float v = ( 0.317398726f + 4.22806245e-5f * Temp + 4.20481691e-8f * Temp*Temp ) / ( 1.0f - 2.89741816e-5f * Temp + 1.61456053e-7f * Temp*Temp ); + + float x = 3*u / ( 2*u - 8*v + 4 ); + float y = 2*v / ( 2*u - 8*v + 4 ); + float z = 1 - x - y; + + float Y = 1; + float X = Y/y * x; + float Z = Y/y * z; + + float3x3 XYZtoRGB = float3x3( + float3(3.2404542, -1.5371385, -0.4985314), + float3(-0.9692660, 1.8760108, 0.0415560), + float3(0.0556434, -0.2040259, 1.0572252) + ); + + return XYZtoRGB * float3( X, Y, Z ) * math::pow( 0.0004 * Temp, 4 ); +} + +export float per_instance_random(uniform texture_2d PerlinNoiseGradientTexture, int NumberInstances) +[[ + anno::description("Per Instance Random"), + anno::noinline() +]] +{ + float weight = state::object_id() / float(NumberInstances); + return NumberInstances == 0 ? 0.0 : tex::lookup_float4(PerlinNoiseGradientTexture, float2(weight, 1.0 - weight), tex::wrap_repeat, tex::wrap_repeat).x; +} + +//------------------ Hair from UE4 ----------------------- +float3 hair_absorption_to_color(float3 A) +{ + const float B = 0.3f; + float b2 = B * B; + float b3 = B * b2; + float b4 = b2 * b2; + float b5 = B * b4; + float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5); + return math::exp(-math::sqrt(A) * D); +} + +float3 hair_color_to_absorption(float3 C) +{ + const float B = 0.3f; + float b2 = B * B; + float b3 = B * b2; + float b4 = b2 * b2; + float b5 = B * b4; + float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5); + return math::pow(math::log(C) / D, 2.0f); +} + +export float3 get_hair_color_from_melanin(float InMelanin, float InRedness, float3 InDyeColor) +[[ + anno::description("Hair Color") +]] +{ + InMelanin = math::saturate(InMelanin); + InRedness = math::saturate(InRedness); + float Melanin = -math::log(math::max(1 - InMelanin, 0.0001f)); + float Eumelanin = Melanin * (1 - InRedness); + float Pheomelanin = Melanin * InRedness; + + float3 DyeAbsorption = hair_color_to_absorption(math::saturate(InDyeColor)); + float3 Absorption = Eumelanin * float3(0.506f, 0.841f, 1.653f) + Pheomelanin * float3(0.343f, 0.733f, 1.924f); + + return hair_absorption_to_color(Absorption + DyeAbsorption); +} + +export float3 local_object_bounds_min() +[[ + anno::description("Local Object Bounds Min"), + anno::noinline() +]] +{ + return float3(0.0); +} + +export float3 local_object_bounds_max() +[[ + anno::description("Local Object Bounds Max"), + anno::noinline() +]] +{ + return float3(100.0); +} + +export float3 object_bounds() +[[ + anno::description("Object Bounds"), + anno::noinline() +]] +{ + return float3(100.0); +} + +export float object_radius() +[[ + anno::description("Object Radius"), + anno::noinline() +]] +{ + return 100.0f; +} + +export float3 object_world_position(uniform bool up_z = true) +[[ + anno::description("Object World Position"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z)*state::meters_per_scene_unit()*100.0; +} + +export float3 object_orientation() +[[ + anno::description("Object Orientation"), + anno::noinline() +]] +{ + return float3(0); +} + +export float rcp(float x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float2 rcp(float2 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float3 rcp(float3 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float4 rcp(float4 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export int BitFieldExtractI32(int Data, int Size, int Offset) +[[ + anno::description("BitFieldExtractI32 int"), + anno::noinline() +]] +{ + Size &= 3; + Offset &= 3; + + if (Size == 0) + return 0; + else if (Offset + Size < 32) + return (Data << (32 - Size - Offset)) >> (32 - Size); + else + return Data >> Offset; +} + +export int BitFieldExtractI32(float Data, float Size, float Offset) +[[ + anno::description("BitFieldExtractI32 float"), + anno::noinline() +]] +{ + return BitFieldExtractI32(int(Data), int(Size), int(Offset)); +} + +export int BitFieldExtractU32(float Data, float Size, float Offset) +[[ + anno::description("BitFieldExtractU32 float"), + anno::noinline() +]] +{ + return BitFieldExtractI32(Data, Size, Offset); +} + +export int BitFieldExtractU32(int Data, int Size, int Offset) +[[ + anno::description("BitFieldExtractU32 int"), + anno::noinline() +]] +{ + return BitFieldExtractI32(Data, Size, Offset); +} + +export float3 EyeAdaptationInverseLookup(float3 LightValue, float Alpha) +[[ + anno::description("EyeAdaptationInverseLookup"), + anno::noinline() +]] +{ + float Adaptation = 1.0f; + + // When Alpha=0.0, we want to multiply by 1.0. when Alpha = 1.0, we want to multiply by 1/Adaptation. + // So the lerped value is: + // LerpLogScale = Lerp(log(1),log(1/Adaptaiton),T) + // Which is simplified as: + // LerpLogScale = Lerp(0,-log(Adaptation),T) + // LerpLogScale = -T * logAdaptation; + + float LerpLogScale = -Alpha * math::log(Adaptation); + float Scale = math::exp(LerpLogScale); + return LightValue * Scale; +} diff --git a/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/instance.usda b/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/instance.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_instance" ( + prepend payload = @./instance.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_cup/object_usds/objaverse_usd/07aa5f57ff324d4e8785ded90d2e5c52.usda b/scene_cup/object_usds/objaverse_usd/07aa5f57ff324d4e8785ded90d2e5c52.usda new file mode 100644 index 0000000000000000000000000000000000000000..adcbdcb8b6f4d7912f121a83cd41e241d671f3dc --- /dev/null +++ b/scene_cup/object_usds/objaverse_usd/07aa5f57ff324d4e8785ded90d2e5c52.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_07aa5f57ff324d4e8785ded90d2e5c52" ( + prepend payload = @./07aa5f57ff324d4e8785ded90d2e5c52.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_cup/object_usds/objaverse_usd/daf860020fdf4ed392f07933977ee89b.usda b/scene_cup/object_usds/objaverse_usd/daf860020fdf4ed392f07933977ee89b.usda new file mode 100644 index 0000000000000000000000000000000000000000..00f9a551dbefcb64e57c1e74c23fe0f02d06d9a6 --- /dev/null +++ b/scene_cup/object_usds/objaverse_usd/daf860020fdf4ed392f07933977ee89b.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_daf860020fdf4ed392f07933977ee89b" ( + prepend payload = @./daf860020fdf4ed392f07933977ee89b.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_cup/saved/assets/scene_usds/IROS_scenes_collected/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Num608bbc47c6ff5a0001d607d8.mdl b/scene_cup/saved/assets/scene_usds/IROS_scenes_collected/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Num608bbc47c6ff5a0001d607d8.mdl new file mode 100644 index 0000000000000000000000000000000000000000..92c8894264a8f0c6f75d1dcf1497e3809991116f --- /dev/null +++ b/scene_cup/saved/assets/scene_usds/IROS_scenes_collected/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Num608bbc47c6ff5a0001d607d8.mdl @@ -0,0 +1,284 @@ +mdl 1.6; + +import ::math::*; +import ::state::*; +import ::tex::*; +import ::anno::*; +using OmniUe4Function import *; +using OmniUe4Base import *; + +export annotation sampler_color(); +export annotation sampler_normal(); +export annotation sampler_grayscale(); +export annotation sampler_alpha(); +export annotation sampler_masks(); +export annotation sampler_distancefield(); +export annotation dither_masked_off(); +export annotation world_space_normal(); + +export material Num608bbc47c6ff5a0001d607d8( + uniform texture_2d Normal_Tex = texture_2d("./Textures/normal.png",::tex::gamma_linear) + [[ + anno::display_name("Normal_Tex"), + anno::ui_order(32), + anno::in_group("Normal"), + sampler_normal() + ]], + float4 Normal_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Normal_UVA"), + anno::ui_order(32), + anno::in_group("Normal") + ]], + float EmissiveIntensity = 0.0 + [[ + anno::display_name("EmissiveIntensity"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + float IsEmissiveTex = 0.0 + [[ + anno::display_name("IsEmissiveTex"), + anno::in_group("EmissiveColor") + ]], + float4 Emissive_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("Emissive_Color"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + uniform texture_2d Emissive_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Emissive_Tex"), + anno::ui_order(32), + anno::in_group("EmissiveColor"), + sampler_color() + ]], + float4 Emissive_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Emissive_UVA"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + float IsBaseColorTex = 0.0 + [[ + anno::display_name("IsBaseColorTex"), + anno::in_group("BaseColor") + ]], + float4 BaseColor_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("BaseColor_Color"), + anno::ui_order(32), + anno::in_group("BaseColor") + ]], + uniform texture_2d BaseColor_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("BaseColor_Tex"), + anno::ui_order(32), + anno::in_group("BaseColor"), + sampler_color() + ]], + float4 BaseColor_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("BaseColor_UVA"), + anno::ui_order(32), + anno::in_group("BaseColor") + ]], + float IsMetallicTex = 0.0 + [[ + anno::display_name("IsMetallicTex"), + anno::in_group("Metallic") + ]], + float4 Metallic_Color = float4(0.0,0.0,0.0,1.0) + [[ + anno::display_name("Metallic_Color"), + anno::ui_order(32), + anno::in_group("Metallic") + ]], + uniform texture_2d Metallic_Tex = texture_2d("./Textures/black.png",::tex::gamma_srgb) + [[ + anno::display_name("Metallic_Tex"), + anno::ui_order(32), + anno::in_group("Metallic"), + sampler_color() + ]], + float4 Metallic_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Metallic_UVA"), + anno::ui_order(32), + anno::in_group("Metallic") + ]], + float IsSpecularTex = 0.0 + [[ + anno::display_name("IsSpecularTex"), + anno::in_group("Specular") + ]], + float4 Specular_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("Specular_Color"), + anno::ui_order(32), + anno::in_group("Specular") + ]], + uniform texture_2d Specular_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Specular_Tex"), + anno::ui_order(32), + anno::in_group("Specular"), + sampler_color() + ]], + float4 Specular_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Specular_UVA"), + anno::ui_order(32), + anno::in_group("Specular") + ]], + float IsGlossTex = 0.0 + [[ + anno::display_name("IsGlossTex"), + anno::in_group("Roughness") + ]], + float4 Gloss_Color = float4(0.1,0.1,0.1,1.0) + [[ + anno::display_name("Gloss_Color"), + anno::ui_order(32), + anno::in_group("Roughness") + ]], + uniform texture_2d Gloss_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Gloss_Tex"), + anno::ui_order(32), + anno::in_group("Roughness"), + sampler_color() + ]], + float4 Gloss_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Gloss_UVA"), + anno::ui_order(32), + anno::in_group("Roughness") + ]], + float PolygonOffset = 0.0 + [[ + anno::display_name("PolygonOffset"), + anno::ui_order(32), + anno::in_group("WorldPosition") + ]], + int MaxTexCoordIndex = 3 + [[ + anno::hidden() + ]]) + = + let { + float3 Local82 = ::camera_position(); + float3 Local83 = (Local82 - (::convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), true)*state::meters_per_scene_unit()*100.0)); + float Local84 = math::dot(Local83, Local83); + float Local85 = math::sqrt(Local84); + float3 Local86 = (Local83 / Local85); + float3 Local87 = (Local86 * PolygonOffset); + + float3 WorldPositionOffset_mdl = Local87; + float2 CustomizedUV0_mdl = float2(state::texture_coordinate(math::min(0,MaxTexCoordIndex)).x,1.0-state::texture_coordinate(math::min(0,MaxTexCoordIndex)).y); + + float2 Local0 = (float2(0.5,0.5) * -1.0); + float Local1 = (CustomizedUV0_mdl.x * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).x); + float Local2 = (CustomizedUV0_mdl.y * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).y); + float2 Local3 = (Local0 + float2(Local1,Local2)); + float Local4 = (3.141592 * -2.0); + float Local5 = (float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).z / Local4); + float Local6 = (Local5 * 6.283185); + float Local7 = math::cos(Local6); + float Local8 = math::sin(Local6); + float Local9 = (Local8 * -1.0); + float Local10 = math::dot(Local3, float2(Local7,Local9)); + float Local11 = math::dot(Local3, float2(Local8,Local7)); + float2 Local12 = (float2(0.5,0.5) + float2(Local10,Local11)); + float4 Local13 = ::unpack_normal_map(tex::lookup_float4(Normal_Tex,float2(Local12.x,1.0-Local12.y),tex::wrap_repeat,tex::wrap_repeat)); + float3 Local14 = ((math::abs(1.0 - 1.0) > 0.00001) ? (float3(0.0,0.0,0.0)) : float3(Local13.x,Local13.y,Local13.z)); + + float3 Normal_mdl = Local14; + + float Local15 = (CustomizedUV0_mdl.x * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).x); + float Local16 = (CustomizedUV0_mdl.y * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).y); + float2 Local17 = (Local0 + float2(Local15,Local16)); + float Local18 = (float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).z / Local4); + float Local19 = (Local18 * 6.283185); + float Local20 = math::cos(Local19); + float Local21 = math::sin(Local19); + float Local22 = (Local21 * -1.0); + float Local23 = math::dot(Local17, float2(Local20,Local22)); + float Local24 = math::dot(Local17, float2(Local21,Local20)); + float2 Local25 = (float2(0.5,0.5) + float2(Local23,Local24)); + float4 Local26 = tex::lookup_float4(Emissive_Tex,float2(Local25.x,1.0-Local25.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local27 = ((math::abs(IsEmissiveTex - 1.0) > 0.00001) ? (float3(Emissive_Color.x,Emissive_Color.y,Emissive_Color.z)) : float3(Local26.x,Local26.y,Local26.z)); + float3 Local28 = (EmissiveIntensity * Local27); + float Local29 = (CustomizedUV0_mdl.x * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).x); + float Local30 = (CustomizedUV0_mdl.y * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).y); + float2 Local31 = (Local0 + float2(Local29,Local30)); + float Local32 = (float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).z / Local4); + float Local33 = (Local32 * 6.283185); + float Local34 = math::cos(Local33); + float Local35 = math::sin(Local33); + float Local36 = (Local35 * -1.0); + float Local37 = math::dot(Local31, float2(Local34,Local36)); + float Local38 = math::dot(Local31, float2(Local35,Local34)); + float2 Local39 = (float2(0.5,0.5) + float2(Local37,Local38)); + float4 Local40 = tex::lookup_float4(BaseColor_Tex,float2(Local39.x,1.0-Local39.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local41 = ((math::abs(IsBaseColorTex - 1.0) > 0.00001) ? (float3(BaseColor_Color.x,BaseColor_Color.y,BaseColor_Color.z)) : float3(Local40.x,Local40.y,Local40.z)); + float Local42 = (CustomizedUV0_mdl.x * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).x); + float Local43 = (CustomizedUV0_mdl.y * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).y); + float2 Local44 = (Local0 + float2(Local42,Local43)); + float Local45 = (float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).z / Local4); + float Local46 = (Local45 * 6.283185); + float Local47 = math::cos(Local46); + float Local48 = math::sin(Local46); + float Local49 = (Local48 * -1.0); + float Local50 = math::dot(Local44, float2(Local47,Local49)); + float Local51 = math::dot(Local44, float2(Local48,Local47)); + float2 Local52 = (float2(0.5,0.5) + float2(Local50,Local51)); + float4 Local53 = tex::lookup_float4(Metallic_Tex,float2(Local52.x,1.0-Local52.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local54 = ((math::abs(IsMetallicTex - 1.0) > 0.00001) ? (float3(Metallic_Color.x,Metallic_Color.y,Metallic_Color.z)) : float3(Local53.x,Local53.y,Local53.z)); + float Local55 = (CustomizedUV0_mdl.x * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).x); + float Local56 = (CustomizedUV0_mdl.y * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).y); + float2 Local57 = (Local0 + float2(Local55,Local56)); + float Local58 = (float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).z / Local4); + float Local59 = (Local58 * 6.283185); + float Local60 = math::cos(Local59); + float Local61 = math::sin(Local59); + float Local62 = (Local61 * -1.0); + float Local63 = math::dot(Local57, float2(Local60,Local62)); + float Local64 = math::dot(Local57, float2(Local61,Local60)); + float2 Local65 = (float2(0.5,0.5) + float2(Local63,Local64)); + float4 Local66 = tex::lookup_float4(Specular_Tex,float2(Local65.x,1.0-Local65.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local67 = ((math::abs(IsSpecularTex - 1.0) > 0.00001) ? (float3(Specular_Color.x,Specular_Color.y,Specular_Color.z)) : float3(Local66.x,Local66.y,Local66.z)); + float Local68 = (CustomizedUV0_mdl.x * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).x); + float Local69 = (CustomizedUV0_mdl.y * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).y); + float2 Local70 = (Local0 + float2(Local68,Local69)); + float Local71 = (float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).z / Local4); + float Local72 = (Local71 * 6.283185); + float Local73 = math::cos(Local72); + float Local74 = math::sin(Local72); + float Local75 = (Local74 * -1.0); + float Local76 = math::dot(Local70, float2(Local73,Local75)); + float Local77 = math::dot(Local70, float2(Local74,Local73)); + float2 Local78 = (float2(0.5,0.5) + float2(Local76,Local77)); + float4 Local79 = tex::lookup_float4(Gloss_Tex,float2(Local78.x,1.0-Local78.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local80 = ((math::abs(IsGlossTex - 1.0) > 0.00001) ? (float3(Gloss_Color.x,Gloss_Color.y,Gloss_Color.z)) : float3(Local79.x,Local79.y,Local79.z)); + float3 Local81 = (1.0 - Local80); + + float3 EmissiveColor_mdl = Local28; + float OpacityMask_mdl = 1.0; + float3 BaseColor_mdl = Local41; + float Metallic_mdl = Local54.x; + float Specular_mdl = Local67.x; + float Roughness_mdl = Local81.x; + + } in + ::OmniUe4Base( + base_color: BaseColor_mdl, + metallic: Metallic_mdl, + roughness: Roughness_mdl, + specular: Specular_mdl, + normal: Normal_mdl, + opacity: OpacityMask_mdl, + emissive_color: EmissiveColor_mdl, + displacement: WorldPositionOffset_mdl, + two_sided: false); diff --git a/scene_cup/saved/assets/scene_usds/IROS_scenes_collected/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Base.mdl b/scene_cup/saved/assets/scene_usds/IROS_scenes_collected/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/scene_cup/saved/assets/scene_usds/IROS_scenes_collected/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Base.mdl @@ -0,0 +1,224 @@ +/*************************************************************************************************** + * Copyright 2020 NVIDIA Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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. + **************************************************************************************************/ + +//* 1.0.0 - first version +//* 1.0.1 - merge unlit template +//* 1.0.2 - Fix EDF in the back side: the EDF contained in surface is only used for the front side and not for the back side +//* 1.0.3 - UE4 normal mapping: Geometry normal shouldn't be changed +//* 1.0.4 - using absolute import paths when importing standard modules + +mdl 1.3; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::tex::*; +import ::anno::*; + +float emissive_multiplier() +[[ + anno::description("the multiplier to convert UE4 emissive to raw data"), + anno::noinline() +]] +{ + return 20.0f * 128.0f; +} + +float3 tangent_space_normal( + float3 normal = float3(0.0,0.0,1.0), + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0) +) +[[ + anno::description("Interprets the vector in tangent space"), + anno::noinline() +]] +{ + return math::normalize( + tangent_u * normal.x - /* flip_tangent_v */ + tangent_v * normal.y + + state::normal() * (normal.z)); +} + +float3 world_space_normal( + float3 normal = float3(0.0,0.0,1.0), + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0) +) +[[ + anno::description("Interprets the vector in world space"), + anno::noinline() +]] +{ + return tangent_space_normal( + math::normalize( + normal.x * float3(tangent_u.x, tangent_v.x, state::normal().x) - + normal.y * float3(tangent_u.y, tangent_v.y, state::normal().y) + + normal.z * float3(tangent_u.z, tangent_v.z, state::normal().z)), + tangent_u, + tangent_v + ); +} + +export material OmniUe4Base( + float3 base_color = float3(0.0, 0.0, 0.0), + float metallic = 0.0, + float roughness = 0.5, + float specular = 0.5, + float3 normal = float3(0.0,0.0,1.0), + float clearcoat_weight = 0.0, + float clearcoat_roughness = 0.0, + float3 clearcoat_normal = float3(0.0,0.0,1.0), + uniform bool enable_opacity = true, + float opacity = 1.0, + float3 emissive_color = float3(0.0, 0.0, 0.0), + float3 displacement = float3(0.0), + uniform bool is_tangent_space_normal = true, + uniform bool two_sided = false, + uniform bool is_unlit = false +) +[[ + anno::display_name("Omni UE4 Base"), + anno::description("Omni UE4 Base, supports UE4 default lit and clearcoat shading model"), + anno::version( 1, 0, 0), + anno::author("NVIDIA CORPORATION"), + anno::key_words(string[]("omni", "UE4", "omniverse", "lit", "clearcoat", "generic")) +]] + = let { + color final_base_color = math::saturate(base_color); + float final_metallic = math::saturate(metallic); + float final_roughness = math::saturate(roughness); + float final_specular = math::saturate(specular); + color final_emissive_color = math::max(emissive_color, 0.0f) * emissive_multiplier(); /*factor for converting ue4 emissive to raw value*/ + float final_clearcoat_weight = math::saturate(clearcoat_weight); + float final_clearcoat_roughness = math::saturate(clearcoat_roughness); + float3 final_normal = math::normalize(normal); + float3 final_clearcoat_normal = math::normalize(clearcoat_normal); + + // - compute final roughness by squaring the "roughness" parameter + float alpha = final_roughness * final_roughness; + // reduce the reflectivity at grazing angles to avoid "dark edges" for high roughness due to the layering + float grazing_refl = math::max((1.0 - final_roughness), 0.0); + + float3 the_normal = is_unlit ? state::normal() : + (is_tangent_space_normal ? + tangent_space_normal( + normal: final_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ) : world_space_normal( + normal: final_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + )); + + // for the dielectric component we layer the glossy component on top of the diffuse one, + // the glossy layer has no color tint + + bsdf dielectric_component = df::custom_curve_layer( + weight: final_specular, + normal_reflectivity: 0.08, + grazing_reflectivity: grazing_refl, + layer: df::microfacet_ggx_smith_bsdf(roughness_u: alpha), + base: df::diffuse_reflection_bsdf(tint: final_base_color), + normal: the_normal); + + // the metallic component doesn't have a diffuse component, it's only glossy + // base_color is applied to tint it + bsdf metallic_component = df::microfacet_ggx_smith_bsdf(tint: final_base_color, roughness_u: alpha); + + // final BSDF is a linear blend between dielectric and metallic component + bsdf dielectric_metal_mix = + df::normalized_mix( + components: + df::bsdf_component[]( + df::bsdf_component( + component: metallic_component, + weight: final_metallic), + df::bsdf_component( + component: dielectric_component, + weight: 1.0-final_metallic) + ) + ); + + // clearcoat layer + float clearcoat_grazing_refl = math::max((1.0 - final_clearcoat_roughness), 0.0); + float clearcoat_alpha = final_clearcoat_roughness * final_clearcoat_roughness; + + float3 the_clearcoat_normal = is_tangent_space_normal ? tangent_space_normal( + normal: final_clearcoat_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ) : world_space_normal( + normal: final_clearcoat_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ); + + + bsdf clearcoat = + df::custom_curve_layer( + base: df::weighted_layer( + layer: dielectric_metal_mix, + weight: 1.0, + normal: final_clearcoat_weight == 0.0 ? state::normal() : the_normal + ), + layer: df::microfacet_ggx_smith_bsdf( + roughness_u: clearcoat_alpha, + tint: color(1.0) + ), + normal_reflectivity: 0.04, + grazing_reflectivity: clearcoat_grazing_refl, + normal: the_clearcoat_normal, + weight: final_clearcoat_weight + ); + bsdf surface = is_unlit ? bsdf() : clearcoat; +} +in material( + thin_walled: two_sided, // Graphene? + surface: material_surface( + scattering: surface, + emission: + material_emission ( + emission: df::diffuse_edf (), + intensity: final_emissive_color + ) + ), + backface: material_surface( + emission: + material_emission ( + emission: df::diffuse_edf (), + intensity: final_emissive_color + ) + ), + geometry: material_geometry( + displacement: displacement, + normal: final_clearcoat_weight == 0.0 ? the_normal : state::normal(), + cutout_opacity: enable_opacity ? opacity : 1.0 + ) +); diff --git a/scene_cup/saved/assets/scene_usds/IROS_scenes_collected/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Function.mdl b/scene_cup/saved/assets/scene_usds/IROS_scenes_collected/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Function.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f0801afff6f0870ea2574c9e9b6e2043e79e9a79 --- /dev/null +++ b/scene_cup/saved/assets/scene_usds/IROS_scenes_collected/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Function.mdl @@ -0,0 +1,1413 @@ +/*************************************************************************************************** + * Copyright 2020 NVIDIA Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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. + **************************************************************************************************/ + +//* 1.0.1 - using absolute import paths when importing standard modules + +mdl 1.6; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::tex::*; +import ::anno::*; + + +export float3 convert_to_left_hand(float3 vec3, uniform bool up_z = true, uniform bool is_position = true) +[[ + anno::description("convert from RH to LH"), + anno::noinline() +]] +{ + float4x4 ZupConversion = float4x4( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + float4x4 YupConversion = float4x4( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + float4 vec4 = float4(vec3.x, vec3.y, vec3.z, is_position ? 1.0f : 0.0f); + + vec4 = vec4 * (up_z ? ZupConversion : YupConversion); + + return float3(vec4.x, vec4.y, vec4.z); +} + +export float3 transform_vector_from_tangent_to_world(float3 vector, + uniform bool up_z = true, + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0)) +[[ + anno::description("Transform vector from tangent space to world space"), + anno::noinline() +]] +{ + /* flip_tangent_v */ + return convert_to_left_hand( + tangent_u * vector.x - tangent_v * vector.y + state::normal() * vector.z, + up_z, false); +} + +export float3 transform_vector_from_world_to_tangent(float3 vector, + uniform bool up_z = true, + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0)) +[[ + anno::description("Transform vector from world space to tangent space"), + anno::noinline() +]] +{ + float3 vecRH = convert_to_left_hand(vector, up_z, false); + /* flip_tangent_v */ + return vecRH.x * float3(tangent_u.x, -tangent_v.x, state::normal().x) + + vecRH.y * float3(tangent_u.y, -tangent_v.y, state::normal().y) + + vecRH.z * float3(tangent_u.z, -tangent_v.z, state::normal().z); +} + +export float4 unpack_normal_map( + float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0) + ) +[[ + anno::description("Unpack a normal stored in a normal map"), + anno::noinline() +]] +{ + float2 normal_xy = float2(texture_sample.x, texture_sample.y); + + normal_xy = normal_xy * float2(2.0,2.0) - float2(1.0,1.0); + float normal_z = math::sqrt( math::saturate( 1.0 - math::dot( normal_xy, normal_xy ) ) ); + return float4( normal_xy.x, normal_xy.y, normal_z, 1.0 ); +} + +// for get color value from normal. +export float4 pack_normal_map( + float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0) + ) +[[ + anno::description("Pack to color from a normal") +]] +{ + float2 return_xy = float2(texture_sample.x, texture_sample.y); + + return_xy = (return_xy + float2(1.0,1.0)) / float2(2.0,2.0); + + return float4( return_xy.x, return_xy.y, 0.0, 1.0 ); +} + +export float4 greyscale_texture_lookup( + float4 texture_sample = float4(0.0, 0.0, 0.0, 1.0) + ) +[[ + anno::description("Sampling a greyscale texture"), + anno::noinline() +]] +{ + return float4(texture_sample.x, texture_sample.x, texture_sample.x, texture_sample.x); +} + +export float3 pixel_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Pixel normal in world space"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); +} + +export float3 vertex_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Vertex normal in world space"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); +} + +export float3 landscape_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Landscape normal in world space") +]] +{ + float3 normalFromNormalmap = math::floor((::vertex_normal_world_space(up_z) * 0.5 + 0.5) * 255.0) / 255.0 * 2.0 - 1.0; + + float2 normalXY = float2(normalFromNormalmap.x, normalFromNormalmap.y); + return float3(normalXY.x, normalXY.y, math::sqrt(math::saturate(1.0 - math::dot(normalXY, normalXY)))); +} + +// Different implementation specific between mdl and hlsl for smoothstep +export float smoothstep(float a, float b, float l) +{ + if (a < b) + { + return math::smoothstep(a, b, l); + } + else if (a > b) + { + return 1.0 - math::smoothstep(b, a, l); + } + else + { + return l <= a ? 0.0 : 1.0; + } +} + +export float2 smoothstep(float2 a, float2 b, float2 l) +{ + return float2(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y)); +} + +export float3 smoothstep(float3 a, float3 b, float3 l) +{ + return float3(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z)); +} + +export float4 smoothstep(float4 a, float4 b, float4 l) +{ + return float4(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z), smoothstep(a.w, b.w, l.w)); +} + +export float2 smoothstep(float2 a, float2 b, float l) +{ + return float2(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l)); +} + +export float3 smoothstep(float3 a, float3 b, float l) +{ + return float3(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l)); +} + +export float4 smoothstep(float4 a, float4 b, float l) +{ + return float4(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l), smoothstep(a.w, b.w, l)); +} + +export float2 smoothstep(float a, float b, float2 l) +{ + return float2(smoothstep(a, b, l.x), smoothstep(a, b, l.y)); +} + +export float3 smoothstep(float a, float b, float3 l) +{ + return float3(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z)); +} + +export float4 smoothstep(float a, float b, float4 l) +{ + return float4(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z), smoothstep(a, b, l.w)); +} + +//------------------ Random from UE4 ----------------------- +float length2(float3 v) +{ + return math::dot(v, v); +} + +float3 GetPerlinNoiseGradientTextureAt(uniform texture_2d PerlinNoiseGradientTexture, float3 v) +{ + const float2 ZShear = float2(17.0f, 89.0f); + + float2 OffsetA = v.z * ZShear; + float2 TexA = (float2(v.x, v.y) + OffsetA + 0.5f) / 128.0f; + float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA.x,1.0-TexA.y),tex::wrap_repeat,tex::wrap_repeat); + return float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z) * 2.0 - 1.0; +} + +float3 SkewSimplex(float3 In) +{ + return In + math::dot(In, float3(1.0 / 3.0f) ); +} +float3 UnSkewSimplex(float3 In) +{ + return In - math::dot(In, float3(1.0 / 6.0f) ); +} + +// 3D random number generator inspired by PCGs (permuted congruential generator) +// Using a **simple** Feistel cipher in place of the usual xor shift permutation step +// @param v = 3D integer coordinate +// @return three elements w/ 16 random bits each (0-0xffff). +// ~8 ALU operations for result.x (7 mad, 1 >>) +// ~10 ALU operations for result.xy (8 mad, 2 >>) +// ~12 ALU operations for result.xyz (9 mad, 3 >>) + +//TODO: uint3 +int3 Rand3DPCG16(int3 p) +{ + // taking a signed int then reinterpreting as unsigned gives good behavior for negatives + //TODO: uint3 + int3 v = int3(p); + + // Linear congruential step. These LCG constants are from Numerical Recipies + // For additional #'s, PCG would do multiple LCG steps and scramble each on output + // So v here is the RNG state + v = v * 1664525 + 1013904223; + + // PCG uses xorshift for the final shuffle, but it is expensive (and cheap + // versions of xorshift have visible artifacts). Instead, use simple MAD Feistel steps + // + // Feistel ciphers divide the state into separate parts (usually by bits) + // then apply a series of permutation steps one part at a time. The permutations + // use a reversible operation (usually ^) to part being updated with the result of + // a permutation function on the other parts and the key. + // + // In this case, I'm using v.x, v.y and v.z as the parts, using + instead of ^ for + // the combination function, and just multiplying the other two parts (no key) for + // the permutation function. + // + // That gives a simple mad per round. + v.x += v.y*v.z; + v.y += v.z*v.x; + v.z += v.x*v.y; + v.x += v.y*v.z; + v.y += v.z*v.x; + v.z += v.x*v.y; + + // only top 16 bits are well shuffled + return v >> 16; +} + +// Wraps noise for tiling texture creation +// @param v = unwrapped texture parameter +// @param bTiling = true to tile, false to not tile +// @param RepeatSize = number of units before repeating +// @return either original or wrapped coord +float3 NoiseTileWrap(float3 v, bool bTiling, float RepeatSize) +{ + return bTiling ? (math::frac(v / RepeatSize) * RepeatSize) : v; +} + +// Evaluate polynomial to get smooth transitions for Perlin noise +// only needed by Perlin functions in this file +// scalar(per component): 2 add, 5 mul +float4 PerlinRamp(float4 t) +{ + return t * t * t * (t * (t * 6 - 15) + 10); +} + +// Blum-Blum-Shub-inspired pseudo random number generator +// http://www.umbc.edu/~olano/papers/mNoise.pdf +// real BBS uses ((s*s) mod M) with bignums and M as the product of two huge Blum primes +// instead, we use a single prime M just small enough not to overflow +// note that the above paper used 61, which fits in a half, but is unusably bad +// @param Integer valued floating point seed +// @return random number in range [0,1) +// ~8 ALU operations (5 *, 3 frac) +float RandBBSfloat(float seed) +{ + float BBS_PRIME24 = 4093.0; + float s = math::frac(seed / BBS_PRIME24); + s = math::frac(s * s * BBS_PRIME24); + s = math::frac(s * s * BBS_PRIME24); + return s; +} + +// Modified noise gradient term +// @param seed - random seed for integer lattice position +// @param offset - [-1,1] offset of evaluation point from lattice point +// @return gradient direction (xyz) and contribution (w) from this lattice point +float4 MGradient(int seed, float3 offset) +{ + //TODO uint + int rand = Rand3DPCG16(int3(seed,0,0)).x; + int3 MGradientMask = int3(0x8000, 0x4000, 0x2000); + float3 MGradientScale = float3(1.0 / 0x4000, 1.0 / 0x2000, 1.0 / 0x1000); + float3 direction = float3(int3(rand, rand, rand) & MGradientMask) * MGradientScale - 1; + return float4(direction.x, direction.y, direction.z, math::dot(direction, offset)); +} + +// compute Perlin and related noise corner seed values +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = true to return seed values for a repeating noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @param seed000-seed111 = hash function seeds for the eight corners +// @return fractional part of v +struct SeedValue +{ + float3 fv = float3(0); + float seed000 = 0; + float seed001 = 0; + float seed010 = 0; + float seed011 = 0; + float seed100 = 0; + float seed101 = 0; + float seed110 = 0; + float seed111 = 0; +}; + +SeedValue NoiseSeeds(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds; + seeds.fv = math::frac(v); + float3 iv = math::floor(v); + + const float3 primes = float3(19, 47, 101); + + if (bTiling) + { // can't algebraically combine with primes + seeds.seed000 = math::dot(primes, NoiseTileWrap(iv, true, RepeatSize)); + seeds.seed100 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 0), true, RepeatSize)); + seeds.seed010 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 0), true, RepeatSize)); + seeds.seed110 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 0), true, RepeatSize)); + seeds.seed001 = math::dot(primes, NoiseTileWrap(iv + float3(0, 0, 1), true, RepeatSize)); + seeds.seed101 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 1), true, RepeatSize)); + seeds.seed011 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 1), true, RepeatSize)); + seeds.seed111 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 1), true, RepeatSize)); + } + else + { // get to combine offsets with multiplication by primes in this case + seeds.seed000 = math::dot(iv, primes); + seeds.seed100 = seeds.seed000 + primes.x; + seeds.seed010 = seeds.seed000 + primes.y; + seeds.seed110 = seeds.seed100 + primes.y; + seeds.seed001 = seeds.seed000 + primes.z; + seeds.seed101 = seeds.seed100 + primes.z; + seeds.seed011 = seeds.seed010 + primes.z; + seeds.seed111 = seeds.seed110 + primes.z; + } + + return seeds; +} + +struct SimplexWeights +{ + float4 Result = float4(0); + float3 PosA = float3(0); + float3 PosB = float3(0); + float3 PosC = float3(0); + float3 PosD = float3(0); +}; + +// Computed weights and sample positions for simplex interpolation +// @return float4(a,b,c, d) Barycentric coordinate defined as Filtered = Tex(PosA) * a + Tex(PosB) * b + Tex(PosC) * c + Tex(PosD) * d +SimplexWeights ComputeSimplexWeights3D(float3 OrthogonalPos) +{ + SimplexWeights weights; + float3 OrthogonalPosFloor = math::floor(OrthogonalPos); + + weights.PosA = OrthogonalPosFloor; + weights.PosB = weights.PosA + float3(1, 1, 1); + + OrthogonalPos -= OrthogonalPosFloor; + + float Largest = math::max(OrthogonalPos.x, math::max(OrthogonalPos.y, OrthogonalPos.z)); + float Smallest = math::min(OrthogonalPos.x, math::min(OrthogonalPos.y, OrthogonalPos.z)); + + weights.PosC = weights.PosA + float3(Largest == OrthogonalPos.x, Largest == OrthogonalPos.y, Largest == OrthogonalPos.z); + weights.PosD = weights.PosA + float3(Smallest != OrthogonalPos.x, Smallest != OrthogonalPos.y, Smallest != OrthogonalPos.z); + + float RG = OrthogonalPos.x - OrthogonalPos.y; + float RB = OrthogonalPos.x - OrthogonalPos.z; + float GB = OrthogonalPos.y - OrthogonalPos.z; + + weights.Result.z = + math::min(math::max(0, RG), math::max(0, RB)) // X + + math::min(math::max(0, -RG), math::max(0, GB)) // Y + + math::min(math::max(0, -RB), math::max(0, -GB)); // Z + + weights.Result.w = + math::min(math::max(0, -RG), math::max(0, -RB)) // X + + math::min(math::max(0, RG), math::max(0, -GB)) // Y + + math::min(math::max(0, RB), math::max(0, GB)); // Z + + weights.Result.y = Smallest; + weights.Result.x = 1.0f - weights.Result.y - weights.Result.z - weights.Result.w; + + return weights; +} + +// filtered 3D gradient simple noise (few texture lookups, high quality) +// @param v >0 +// @return random number in the range -1 .. 1 +float SimplexNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 EvalPos) +{ + float3 OrthogonalPos = SkewSimplex(EvalPos); + + SimplexWeights Weights = ComputeSimplexWeights3D(OrthogonalPos); + + // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 32 bit) + float3 A = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosA); + float3 B = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosB); + float3 C = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosC); + float3 D = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosD); + + Weights.PosA = UnSkewSimplex(Weights.PosA); + Weights.PosB = UnSkewSimplex(Weights.PosB); + Weights.PosC = UnSkewSimplex(Weights.PosC); + Weights.PosD = UnSkewSimplex(Weights.PosD); + + float DistanceWeight; + + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosA)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float a = math::dot(A, EvalPos - Weights.PosA) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosB)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float b = math::dot(B, EvalPos - Weights.PosB) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosC)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float c = math::dot(C, EvalPos - Weights.PosC) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosD)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float d = math::dot(D, EvalPos - Weights.PosD) * DistanceWeight; + + return 32 * (a + b + c + d); +} + +// filtered 3D noise, can be optimized +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float GradientNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 v, bool bTiling, float RepeatSize) +{ + bTiling = true; + float3 fv = math::frac(v); + float3 iv0 = NoiseTileWrap(math::floor(v), bTiling, RepeatSize); + float3 iv1 = NoiseTileWrap(iv0 + 1, bTiling, RepeatSize); + + const int2 ZShear = int2(17, 89); + + float2 OffsetA = iv0.z * ZShear; + float2 OffsetB = OffsetA + ZShear; // non-tiling, use relative offset + if (bTiling) // tiling, have to compute from wrapped coordinates + { + OffsetB = iv1.z * ZShear; + } + + // Texture size scale factor + float ts = 1 / 128.0f; + + // texture coordinates for iv0.xy, as offset for both z slices + float2 TexA0 = (float2(iv0.x, iv0.y) + OffsetA + 0.5f) * ts; + float2 TexB0 = (float2(iv0.x, iv0.y) + OffsetB + 0.5f) * ts; + + // texture coordinates for iv1.xy, as offset for both z slices + float2 TexA1 = TexA0 + ts; // for non-tiling, can compute relative to existing coordinates + float2 TexB1 = TexB0 + ts; + if (bTiling) // for tiling, need to compute from wrapped coordinates + { + TexA1 = (float2(iv1.x, iv1.y) + OffsetA + 0.5f) * ts; + TexB1 = (float2(iv1.x, iv1.y) + OffsetB + 0.5f) * ts; + } + + + // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 8, 16 or 32 bit) + float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat); + float3 PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 A = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 B = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 C = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 D = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 E = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 F = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 G = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 H = PerlinNoiseColor * 2 - 1; + + float a = math::dot(A, fv - float3(0, 0, 0)); + float b = math::dot(B, fv - float3(1, 0, 0)); + float c = math::dot(C, fv - float3(0, 1, 0)); + float d = math::dot(D, fv - float3(1, 1, 0)); + float e = math::dot(E, fv - float3(0, 0, 1)); + float f = math::dot(F, fv - float3(1, 0, 1)); + float g = math::dot(G, fv - float3(0, 1, 1)); + float h = math::dot(H, fv - float3(1, 1, 1)); + + float4 Weights = PerlinRamp(math::frac(float4(fv.x, fv.y, fv.z, 0))); + + float i = math::lerp(math::lerp(a, b, Weights.x), math::lerp(c, d, Weights.x), Weights.y); + float j = math::lerp(math::lerp(e, f, Weights.x), math::lerp(g, h, Weights.x), Weights.y); + + return math::lerp(i, j, Weights.z); +} + +// @return random number in the range -1 .. 1 +// scalar: 6 frac, 31 mul/mad, 15 add, +float FastGradientPerlinNoise3D_TEX(uniform texture_3d PerlinNoise3DTexture, float3 xyz) +{ + // needs to be the same value when creating the PerlinNoise3D texture + float Extent = 16; + + // last texel replicated and needed for filtering + // scalar: 3 frac, 6 mul + xyz = math::frac(xyz / (Extent - 1)) * (Extent - 1); + + // scalar: 3 frac + float3 uvw = math::frac(xyz); + // = floor(xyz); + // scalar: 3 add + float3 p0 = xyz - uvw; +// float3 f = math::pow(uvw, 2) * 3.0f - math::pow(uvw, 3) * 2.0f; // original perlin hermite (ok when used without bump mapping) + // scalar: 2*3 add 5*3 mul + float4 pr = PerlinRamp(float4(uvw.x, uvw.y, uvw.z, 0)); + float3 f = float3(pr.x, pr.y, pr.z); // new, better with continues second derivative for bump mapping + // scalar: 3 add + float3 p = p0 + f; + // scalar: 3 mad + // TODO: need reverse??? + float4 NoiseSample = tex::lookup_float4(PerlinNoise3DTexture, p / Extent + 0.5f / Extent); // +0.5f to get rid of bilinear offset + + // reconstruct from 8bit (using mad with 2 constants and dot4 was same instruction count) + // scalar: 4 mad, 3 mul, 3 add + float3 n = float3(NoiseSample.x, NoiseSample.y, NoiseSample.z) * 255.0f / 127.0f - 1.0f; + float d = NoiseSample.w * 255.f - 127; + return math::dot(xyz, n) - d; +} + +// Perlin-style "Modified Noise" +// http://www.umbc.edu/~olano/papers/index.html#mNoise +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float GradientNoise3D_ALU(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize); + + float rand000 = MGradient(int(seeds.seed000), seeds.fv - float3(0, 0, 0)).w; + float rand100 = MGradient(int(seeds.seed100), seeds.fv - float3(1, 0, 0)).w; + float rand010 = MGradient(int(seeds.seed010), seeds.fv - float3(0, 1, 0)).w; + float rand110 = MGradient(int(seeds.seed110), seeds.fv - float3(1, 1, 0)).w; + float rand001 = MGradient(int(seeds.seed001), seeds.fv - float3(0, 0, 1)).w; + float rand101 = MGradient(int(seeds.seed101), seeds.fv - float3(1, 0, 1)).w; + float rand011 = MGradient(int(seeds.seed011), seeds.fv - float3(0, 1, 1)).w; + float rand111 = MGradient(int(seeds.seed111), seeds.fv - float3(1, 1, 1)).w; + + float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0)); + + float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y); + float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y); + return math::lerp(i, j, Weights.z); +} + +// 3D value noise - used to be incorrectly called Perlin noise +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float ValueNoise3D_ALU(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize); + + float rand000 = RandBBSfloat(seeds.seed000) * 2 - 1; + float rand100 = RandBBSfloat(seeds.seed100) * 2 - 1; + float rand010 = RandBBSfloat(seeds.seed010) * 2 - 1; + float rand110 = RandBBSfloat(seeds.seed110) * 2 - 1; + float rand001 = RandBBSfloat(seeds.seed001) * 2 - 1; + float rand101 = RandBBSfloat(seeds.seed101) * 2 - 1; + float rand011 = RandBBSfloat(seeds.seed011) * 2 - 1; + float rand111 = RandBBSfloat(seeds.seed111) * 2 - 1; + + float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0)); + + float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y); + float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y); + return math::lerp(i, j, Weights.z); +} + +// 3D jitter offset within a voronoi noise cell +// @param pos - integer lattice corner +// @return random offsets vector +float3 VoronoiCornerSample(float3 pos, int Quality) +{ + // random values in [-0.5, 0.5] + float3 noise = float3(Rand3DPCG16(int3(pos))) / 0xffff - 0.5; + + // quality level 1 or 2: searches a 2x2x2 neighborhood with points distributed on a sphere + // scale factor to guarantee jittered points will be found within a 2x2x2 search + if (Quality <= 2) + { + return math::normalize(noise) * 0.2588; + } + + // quality level 3: searches a 3x3x3 neighborhood with points distributed on a sphere + // scale factor to guarantee jittered points will be found within a 3x3x3 search + if (Quality == 3) + { + return math::normalize(noise) * 0.3090; + } + + // quality level 4: jitter to anywhere in the cell, needs 4x4x4 search + return noise; +} + +// compare previous best with a new candidate +// not producing point locations makes it easier for compiler to eliminate calculations when they're not needed +// @param minval = location and distance of best candidate seed point before the new one +// @param candidate = candidate seed point +// @param offset = 3D offset to new candidate seed point +// @param bDistanceOnly = if true, only set maxval.w with distance, otherwise maxval.w is distance and maxval.xyz is position +// @return position (if bDistanceOnly is false) and distance to closest seed point so far +float4 VoronoiCompare(float4 minval, float3 candidate, float3 offset, bool bDistanceOnly) +{ + if (bDistanceOnly) + { + return float4(0, 0, 0, math::min(minval.w, math::dot(offset, offset))); + } + else + { + float newdist = math::dot(offset, offset); + return newdist > minval.w ? minval : float4(candidate.x, candidate.y, candidate.z, newdist); + } +} + +// 220 instruction Worley noise +float4 VoronoiNoise3D_ALU(float3 v, int Quality, bool bTiling, float RepeatSize, bool bDistanceOnly) +{ + float3 fv = math::frac(v), fv2 = math::frac(v + 0.5); + float3 iv = math::floor(v), iv2 = math::floor(v + 0.5); + + // with initial minimum distance = infinity (or at least bigger than 4), first min is optimized away + float4 mindist = float4(0,0,0,100); + float3 p, offset; + + // quality level 3: do a 3x3x3 search + if (Quality == 3) + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = -1; offset_x <= 1; ++offset_x) + { + for (offset_y = -1; offset_y <= 1; ++offset_y) + { + for (offset_z = -1; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly); + } + } + } + } + + // everybody else searches a base 2x2x2 neighborhood + else + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = 0; offset_x <= 1; ++offset_x) + { + for (offset_y = 0; offset_y <= 1; ++offset_y) + { + for (offset_z = 0; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // quality level 2, do extra set of points, offset by half a cell + if (Quality == 2) + { + // 467 is just an offset to a different area in the random number field to avoid similar neighbor artifacts + p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize) + 467, Quality); + mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly); + } + } + } + } + } + + // quality level 4: add extra sets of four cells in each direction + if (Quality >= 4) + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = -1; offset_x <= 2; offset_x += 3) + { + for (offset_y = 0; offset_y <= 1; ++offset_y) + { + for (offset_z = 0; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + // along x axis + p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // along y axis + p = float3(offset.y, offset.z, offset.x) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.y, offset.z, offset.x), bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // along z axis + p = float3(offset.z, offset.x, offset.y) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.z, offset.x, offset.y), bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + } + } + } + } + + // transform squared distance to real distance + return float4(mindist.x, mindist.y, mindist.z, math::sqrt(mindist.w)); +} + +// Coordinates for corners of a Simplex tetrahedron +// Based on McEwan et al., Efficient computation of noise in GLSL, JGT 2011 +// @param v = 3D noise argument +// @return 4 corner locations +float4x3 SimplexCorners(float3 v) +{ + // find base corner by skewing to tetrahedral space and back + float3 tet = math::floor(v + v.x/3 + v.y/3 + v.z/3); + float3 base = tet - tet.x/6 - tet.y/6 - tet.z/6; + float3 f = v - base; + + // Find offsets to other corners (McEwan did this in tetrahedral space, + // but since skew is along x=y=z axis, this works in Euclidean space too.) + float3 g = math::step(float3(f.y,f.z,f.x), float3(f.x,f.y,f.z)), h = 1 - float3(g.z, g.x, g.y); + float3 a1 = math::min(g, h) - 1.0 / 6.0, a2 = math::max(g, h) - 1.0 / 3.0; + + // four corners + return float4x3(base, base + a1, base + a2, base + 0.5); +} + +// Improved smoothing function for simplex noise +// @param f = fractional distance to four tetrahedral corners +// @return weight for each corner +float4 SimplexSmooth(float4x3 f) +{ + const float scale = 1024. / 375.; // scale factor to make noise -1..1 + float4 d = float4(math::dot(f[0], f[0]), math::dot(f[1], f[1]), math::dot(f[2], f[2]), math::dot(f[3], f[3])); + float4 s = math::saturate(2 * d); + return (1 * scale + s*(-3 * scale + s*(3 * scale - s*scale))); +} + +// Derivative of simplex noise smoothing function +// @param f = fractional distanc eto four tetrahedral corners +// @return derivative of smoothing function for each corner by x, y and z +float3x4 SimplexDSmooth(float4x3 f) +{ + const float scale = 1024. / 375.; // scale factor to make noise -1..1 + float4 d = float4(math::dot(f[0], f[0]), math::dot(f[1], f[1]), math::dot(f[2], f[2]), math::dot(f[3], f[3])); + float4 s = math::saturate(2 * d); + s = -12 * scale + s*(24 * scale - s * 12 * scale); + + return float3x4( + s * float4(f[0][0], f[1][0], f[2][0], f[3][0]), + s * float4(f[0][1], f[1][1], f[2][1], f[3][1]), + s * float4(f[0][2], f[1][2], f[2][2], f[3][2])); +} + +// Simplex noise and its Jacobian derivative +// @param v = 3D noise argument +// @param bTiling = whether to repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension, must be a multiple of 3 +// @return float3x3 Jacobian in J[*].xyz, vector noise in J[*].w +// J[0].w, J[1].w, J[2].w is a Perlin-style simplex noise with vector output, e.g. (Nx, Ny, Nz) +// J[i].x is X derivative of the i'th component of the noise so J[2].x is dNz/dx +// You can use this to compute the noise, gradient, curl, or divergence: +// float3x4 J = JacobianSimplex_ALU(...); +// float3 VNoise = float3(J[0].w, J[1].w, J[2].w); // 3D noise +// float3 Grad = J[0].xyz; // gradient of J[0].w +// float3 Curl = float3(J[1][2]-J[2][1], J[2][0]-J[0][2], J[0][1]-J[1][2]); +// float Div = J[0][0]+J[1][1]+J[2][2]; +// All of these are confirmed to compile out all unneeded terms. +// So Grad of X doesn't compute Y or Z components, and VNoise doesn't do any of the derivative computation. +float3x4 JacobianSimplex_ALU(float3 v, bool bTiling, float RepeatSize) +{ + int3 MGradientMask = int3(0x8000, 0x4000, 0x2000); + float3 MGradientScale = float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000); + + // corners of tetrahedron + float4x3 T = SimplexCorners(v); + // TODO: uint3 + int3 rand = int3(0); + float4x3 gvec0 = float4x3(1.0); + float4x3 gvec1 = float4x3(1.0); + float4x3 gvec2 = float4x3(1.0); + float4x3 fv = float4x3(1.0); + float3x4 grad = float3x4(1.0); + + // processing of tetrahedral vertices, unrolled + // to compute gradient at each corner + fv[0] = v - T[0]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[0] + 0.5, bTiling, RepeatSize)))); + gvec0[0] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[0] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[0] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][0] = math::dot(gvec0[0], fv[0]); + grad[1][0] = math::dot(gvec1[0], fv[0]); + grad[2][0] = math::dot(gvec2[0], fv[0]); + + fv[1] = v - T[1]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[1] + 0.5, bTiling, RepeatSize)))); + gvec0[1] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[1] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec1[1] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][1] = math::dot(gvec0[1], fv[1]); + grad[1][1] = math::dot(gvec1[1], fv[1]); + grad[2][1] = math::dot(gvec2[1], fv[1]); + + fv[2] = v - T[2]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[2] + 0.5, bTiling, RepeatSize)))); + gvec0[2] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[2] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[2] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][2] = math::dot(gvec0[2], fv[2]); + grad[1][2] = math::dot(gvec1[2], fv[2]); + grad[2][2] = math::dot(gvec2[2], fv[2]); + + fv[3] = v - T[3]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[3] + 0.5, bTiling, RepeatSize)))); + gvec0[3] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[3] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[3] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][3] = math::dot(gvec0[3], fv[3]); + grad[1][3] = math::dot(gvec1[3], fv[3]); + grad[2][3] = math::dot(gvec2[3], fv[3]); + + // blend gradients + float4 sv = SimplexSmooth(fv); + float3x4 ds = SimplexDSmooth(fv); + + float3x4 jacobian = float3x4(1.0); + float3 vec0 = gvec0*sv + grad[0]*ds; // NOTE: mdl is column major, convert from UE4 (row major) + jacobian[0] = float4(vec0.x, vec0.y, vec0.z, math::dot(sv, grad[0])); + float3 vec1 = gvec1*sv + grad[1]*ds; + jacobian[1] = float4(vec1.x, vec1.y, vec1.z, math::dot(sv, grad[1])); + float3 vec2 = gvec2*sv + grad[2]*ds; + jacobian[2] = float4(vec2.x, vec2.y, vec2.z, math::dot(sv, grad[2])); + + return jacobian; +} + +// While RepeatSize is a float here, the expectation is that it would be largely integer values coming in from the UI. The downstream logic assumes +// floats for all called functions (NoiseTileWrap) and this prevents any float-to-int conversion errors from automatic type conversion. +float Noise3D_Multiplexer(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, int Function, float3 Position, int Quality, bool bTiling, float RepeatSize) +{ + // verified, HLSL compiled out the switch if Function is a constant + switch(Function) + { + case 0: + return SimplexNoise3D_TEX(PerlinNoiseGradientTexture, Position); + case 1: + return GradientNoise3D_TEX(PerlinNoiseGradientTexture, Position, bTiling, RepeatSize); + case 2: + return FastGradientPerlinNoise3D_TEX(PerlinNoise3DTexture, Position); + case 3: + return GradientNoise3D_ALU(Position, bTiling, RepeatSize); + case 4: + return ValueNoise3D_ALU(Position, bTiling, RepeatSize); + case 5: + return VoronoiNoise3D_ALU(Position, Quality, bTiling, RepeatSize, true).w * 2.0 - 1.0; + } + return 0; +} +//---------------------------------------------------------- + +export float noise(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, float3 Position, float Scale, float Quality, float Function, float Turbulence, float Levels, float OutputMin, float OutputMax, float LevelScale, float FilterWidth, float Tiling, float RepeatSize) +[[ + anno::description("Noise"), + anno::noinline() +]] +{ + Position *= Scale; + FilterWidth *= Scale; + + float Out = 0.0f; + float OutScale = 1.0f; + float InvLevelScale = 1.0f / LevelScale; + + int iFunction(Function); + int iQuality(Quality); + int iLevels(Levels); + bool bTurbulence(Turbulence); + bool bTiling(Tiling); + + for(int i = 0; i < iLevels; ++i) + { + // fade out noise level that are too high frequent (not done through dynamic branching as it usually requires gradient instructions) + OutScale *= math::saturate(1.0 - FilterWidth); + + if(bTurbulence) + { + Out += math::abs(Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize)) * OutScale; + } + else + { + Out += Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize) * OutScale; + } + + Position *= LevelScale; + RepeatSize *= LevelScale; + OutScale *= InvLevelScale; + FilterWidth *= LevelScale; + } + + if(!bTurbulence) + { + // bring -1..1 to 0..1 range + Out = Out * 0.5f + 0.5f; + } + + // Out is in 0..1 range + return math::lerp(OutputMin, OutputMax, Out); +} + +// Material node for noise functions returning a vector value +// @param LevelScale usually 2 but higher values allow efficient use of few levels +// @return in user defined range (OutputMin..OutputMax) +export float4 vector4_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize) +[[ + anno::description("Vector Noise"), + anno::noinline() +]] +{ + float4 result = float4(0,0,0,1); + float3 ret = float3(0); + int iQuality = int(Quality); + int iFunction = int(Function); + bool bTiling = Tiling > 0.0; + + float3x4 Jacobian = JacobianSimplex_ALU(Position, bTiling, TileSize); // compiled out if not used + + // verified, HLSL compiled out the switch if Function is a constant + switch (iFunction) + { + case 0: // Cellnoise + ret = float3(Rand3DPCG16(int3(math::floor(NoiseTileWrap(Position, bTiling, TileSize))))) / 0xffff; + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 1: // Color noise + ret = float3(Jacobian[0].w, Jacobian[1].w, Jacobian[2].w); + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 2: // Gradient + result = Jacobian[0]; + break; + case 3: // Curl + ret = float3(Jacobian[2][1] - Jacobian[1][2], Jacobian[0][2] - Jacobian[2][0], Jacobian[1][0] - Jacobian[0][1]); + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 4: // Voronoi + result = VoronoiNoise3D_ALU(Position, iQuality, bTiling, TileSize, false); + break; + } + return result; +} + +export float3 vector3_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize) +[[ + anno::description("Vector Noise float3 version"), + anno::noinline() +]] +{ + float4 noise = vector4_noise(Position, Quality, Function, Tiling, TileSize); + return float3(noise.x, noise.y, noise.z); +} + + +// workaround for ue4 fresnel (without supporting for camera vector) : replacing it with 0.0, means facing to the view +export float fresnel(float exponent [[anno::unused()]], float base_reflect_fraction [[anno::unused()]], float3 normal [[anno::unused()]]) +[[ + anno::description("Fresnel"), + anno::noinline() +]] +{ + return 0.0; +} + +export float fresnel_function(float3 normal_vector [[anno::unused()]], float3 camera_vector [[anno::unused()]], + bool invert_fresnel [[anno::unused()]], float power [[anno::unused()]], + bool use_cheap_contrast [[anno::unused()]], float cheap_contrast_dark [[anno::unused()]], float cheap_contrast_bright [[anno::unused()]], + bool clamp_fresnel_dot_product [[anno::unused()]]) +[[ + anno::description("Fresnel Function"), + anno::noinline() +]] +{ + return 0.0; +} + +export float3 camera_vector(uniform bool up_z = true) +[[ + anno::description("Camera Vector"), + anno::noinline() +]] +{ + // assume camera postion is 0,0,0 + return math::normalize(float3(0) - convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z)); +} + +export float pixel_depth() +[[ + anno::description("Pixel Depth"), + anno::noinline() +]] +{ + return 256.0f; +} + +export float scene_depth() +[[ + anno::description("Scene Depth") +]] +{ + return 65500.0f; +} + +export float3 scene_color() +[[ + anno::description("Scene Color") +]] +{ + return float3(1.0f); +} + +export float4 vertex_color() +[[ + anno::description("Vertex Color"), + anno::noinline() +]] +{ + return float4(1.0f); +} + +export float4 vertex_color_from_coordinate(int VertexColorCoordinateIndex) +[[ + anno::description("Vertex Color for float2 PrimVar"), + anno::noinline() +]] +{ + // Kit only supports 4 uv sets, 2 uvs are available to vertex color. if vertex color index is invalid, output the constant WHITE color intead + return (VertexColorCoordinateIndex > 2) ? float4(1.0f) : float4(state::texture_coordinate(VertexColorCoordinateIndex).x, state::texture_coordinate(VertexColorCoordinateIndex).y, state::texture_coordinate(VertexColorCoordinateIndex+1).x, state::texture_coordinate(VertexColorCoordinateIndex+1).y); +} + +export float3 camera_position() +[[ + anno::description("Camera Position"), + anno::noinline() +]] +{ + return float3(1000.0f, 0, 0); +} + +export float3 rotate_about_axis(float4 NormalizedRotationAxisAndAngle, float3 PositionOnAxis, float3 Position) +[[ + anno::description("Rotates Position about the given axis by the given angle") +]] +{ + // Project Position onto the rotation axis and find the closest point on the axis to Position + float3 NormalizedRotationAxis = float3(NormalizedRotationAxisAndAngle.x,NormalizedRotationAxisAndAngle.y,NormalizedRotationAxisAndAngle.z); + float3 ClosestPointOnAxis = PositionOnAxis + NormalizedRotationAxis * math::dot(NormalizedRotationAxis, Position - PositionOnAxis); + // Construct orthogonal axes in the plane of the rotation + float3 UAxis = Position - ClosestPointOnAxis; + float3 VAxis = math::cross(NormalizedRotationAxis, UAxis); + float[2] SinCosAngle = math::sincos(NormalizedRotationAxisAndAngle.w); + // Rotate using the orthogonal axes + float3 R = UAxis * SinCosAngle[1] + VAxis * SinCosAngle[0]; + // Reconstruct the rotated world space position + float3 RotatedPosition = ClosestPointOnAxis + R; + // Convert from position to a position offset + return RotatedPosition - Position; +} + +export float2 rotate_scale_offset_texcoords(float2 InTexCoords, float4 InRotationScale, float2 InOffset) +[[ + anno::description("Returns a float2 texture coordinate after 2x2 transform and offset applied") +]] +{ + return float2(math::dot(InTexCoords, float2(InRotationScale.x, InRotationScale.y)), math::dot(InTexCoords, float2(InRotationScale.z, InRotationScale.w))) + InOffset; +} + +export float3 reflection_custom_world_normal(float3 WorldNormal, bool bNormalizeInputNormal, uniform bool up_z = true) +[[ + anno::description("Reflection vector about the specified world space normal") +]] +{ + if (bNormalizeInputNormal) + { + WorldNormal = math::normalize(WorldNormal); + } + + return -camera_vector(up_z) + WorldNormal * math::dot(WorldNormal, camera_vector(up_z)) * 2.0; +} + +export float3 reflection_vector(uniform bool up_z = true) +[[ + anno::description("Reflection Vector"), + anno::noinline() +]] +{ + float3 normal = convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); + return reflection_custom_world_normal(normal, false, up_z); +} + +export float dither_temporalAA(float AlphaThreshold = 0.5f, float Random = 1.0f [[anno::unused()]]) +[[ + anno::description("Dither TemporalAA"), + anno::noinline() +]] +{ + return AlphaThreshold; +} + +export float3 black_body( float Temp ) +[[ + anno::description("Black Body"), + anno::noinline() +]] +{ + float u = ( 0.860117757f + 1.54118254e-4f * Temp + 1.28641212e-7f * Temp*Temp ) / ( 1.0f + 8.42420235e-4f * Temp + 7.08145163e-7f * Temp*Temp ); + float v = ( 0.317398726f + 4.22806245e-5f * Temp + 4.20481691e-8f * Temp*Temp ) / ( 1.0f - 2.89741816e-5f * Temp + 1.61456053e-7f * Temp*Temp ); + + float x = 3*u / ( 2*u - 8*v + 4 ); + float y = 2*v / ( 2*u - 8*v + 4 ); + float z = 1 - x - y; + + float Y = 1; + float X = Y/y * x; + float Z = Y/y * z; + + float3x3 XYZtoRGB = float3x3( + float3(3.2404542, -1.5371385, -0.4985314), + float3(-0.9692660, 1.8760108, 0.0415560), + float3(0.0556434, -0.2040259, 1.0572252) + ); + + return XYZtoRGB * float3( X, Y, Z ) * math::pow( 0.0004 * Temp, 4 ); +} + +export float per_instance_random(uniform texture_2d PerlinNoiseGradientTexture, int NumberInstances) +[[ + anno::description("Per Instance Random"), + anno::noinline() +]] +{ + float weight = state::object_id() / float(NumberInstances); + return NumberInstances == 0 ? 0.0 : tex::lookup_float4(PerlinNoiseGradientTexture, float2(weight, 1.0 - weight), tex::wrap_repeat, tex::wrap_repeat).x; +} + +//------------------ Hair from UE4 ----------------------- +float3 hair_absorption_to_color(float3 A) +{ + const float B = 0.3f; + float b2 = B * B; + float b3 = B * b2; + float b4 = b2 * b2; + float b5 = B * b4; + float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5); + return math::exp(-math::sqrt(A) * D); +} + +float3 hair_color_to_absorption(float3 C) +{ + const float B = 0.3f; + float b2 = B * B; + float b3 = B * b2; + float b4 = b2 * b2; + float b5 = B * b4; + float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5); + return math::pow(math::log(C) / D, 2.0f); +} + +export float3 get_hair_color_from_melanin(float InMelanin, float InRedness, float3 InDyeColor) +[[ + anno::description("Hair Color") +]] +{ + InMelanin = math::saturate(InMelanin); + InRedness = math::saturate(InRedness); + float Melanin = -math::log(math::max(1 - InMelanin, 0.0001f)); + float Eumelanin = Melanin * (1 - InRedness); + float Pheomelanin = Melanin * InRedness; + + float3 DyeAbsorption = hair_color_to_absorption(math::saturate(InDyeColor)); + float3 Absorption = Eumelanin * float3(0.506f, 0.841f, 1.653f) + Pheomelanin * float3(0.343f, 0.733f, 1.924f); + + return hair_absorption_to_color(Absorption + DyeAbsorption); +} + +export float3 local_object_bounds_min() +[[ + anno::description("Local Object Bounds Min"), + anno::noinline() +]] +{ + return float3(0.0); +} + +export float3 local_object_bounds_max() +[[ + anno::description("Local Object Bounds Max"), + anno::noinline() +]] +{ + return float3(100.0); +} + +export float3 object_bounds() +[[ + anno::description("Object Bounds"), + anno::noinline() +]] +{ + return float3(100.0); +} + +export float object_radius() +[[ + anno::description("Object Radius"), + anno::noinline() +]] +{ + return 100.0f; +} + +export float3 object_world_position(uniform bool up_z = true) +[[ + anno::description("Object World Position"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z)*state::meters_per_scene_unit()*100.0; +} + +export float3 object_orientation() +[[ + anno::description("Object Orientation"), + anno::noinline() +]] +{ + return float3(0); +} + +export float rcp(float x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float2 rcp(float2 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float3 rcp(float3 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float4 rcp(float4 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export int BitFieldExtractI32(int Data, int Size, int Offset) +[[ + anno::description("BitFieldExtractI32 int"), + anno::noinline() +]] +{ + Size &= 3; + Offset &= 3; + + if (Size == 0) + return 0; + else if (Offset + Size < 32) + return (Data << (32 - Size - Offset)) >> (32 - Size); + else + return Data >> Offset; +} + +export int BitFieldExtractI32(float Data, float Size, float Offset) +[[ + anno::description("BitFieldExtractI32 float"), + anno::noinline() +]] +{ + return BitFieldExtractI32(int(Data), int(Size), int(Offset)); +} + +export int BitFieldExtractU32(float Data, float Size, float Offset) +[[ + anno::description("BitFieldExtractU32 float"), + anno::noinline() +]] +{ + return BitFieldExtractI32(Data, Size, Offset); +} + +export int BitFieldExtractU32(int Data, int Size, int Offset) +[[ + anno::description("BitFieldExtractU32 int"), + anno::noinline() +]] +{ + return BitFieldExtractI32(Data, Size, Offset); +} + +export float3 EyeAdaptationInverseLookup(float3 LightValue, float Alpha) +[[ + anno::description("EyeAdaptationInverseLookup"), + anno::noinline() +]] +{ + float Adaptation = 1.0f; + + // When Alpha=0.0, we want to multiply by 1.0. when Alpha = 1.0, we want to multiply by 1/Adaptation. + // So the lerped value is: + // LerpLogScale = Lerp(log(1),log(1/Adaptaiton),T) + // Which is simplified as: + // LerpLogScale = Lerp(0,-log(Adaptation),T) + // LerpLogScale = -T * logAdaptation; + + float LerpLogScale = -Alpha * math::log(Adaptation); + float Scale = math::exp(LerpLogScale); + return LightValue * Scale; +} diff --git a/scene_cup/saved/plates/.collect.mapping.json b/scene_cup/saved/plates/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..612c31f936283930f9c6ae8717dbebeaf6929d88 --- /dev/null +++ b/scene_cup/saved/plates/.collect.mapping.json @@ -0,0 +1,35 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_cup/plates/plate_purple.usd", + "source_hash": "fdf6b8b94cc797107fcb7cec135e3de2245ca7cf", + "target_url": "./plate_purple.usd", + "target_hash": "d0843f5ecb24384810039be1ea3128deb1a3edc6" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_cup/plates/plate_golden.usd", + "source_hash": "e0e2d95d8e51351401142c6fef2bc0fb1b40c42f", + "target_url": "./plate_golden.usd", + "target_hash": "6c7afa3c48cafea7f3aec058b0be94da8627a231" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_cup/plates/plate_red.usd", + "source_hash": "58524e26f95d1a5d7a98b92bc22d32ddafdad33e", + "target_url": "./plate_red.usd", + "target_hash": "09fc9823c4a597bb374e94923735ad2c4898cd3d" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_cup/plates/plate_pink.usd", + "source_hash": "666e12c0b4367a8ef0bae75e3bafe0a1f2613319", + "target_url": "./plate_pink.usd", + "target_hash": "b2851c3a808b71eafefcda6332e6f89237dfdc99" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_cup/plates/plate_green.usd", + "source_hash": "03881c3df7d65cb941de09f4641a963d35dd054c", + "target_url": "./plate_green.usd", + "target_hash": "f5031d457907170bea2991bb243de26229896a1a" + } + ] +} \ No newline at end of file diff --git a/scene_cup/saved/plates/plate_golden.usda b/scene_cup/saved/plates/plate_golden.usda new file mode 100644 index 0000000000000000000000000000000000000000..3ee30e0cefcaebad6a6e63d2cad778c0c8078d19 --- /dev/null +++ b/scene_cup/saved/plates/plate_golden.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_plate_golden" ( + prepend payload = @./plate_golden.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_cup/saved/plates/plate_green.usda b/scene_cup/saved/plates/plate_green.usda new file mode 100644 index 0000000000000000000000000000000000000000..fed85af6a27db3b404c5d920c259c7a90ce30905 --- /dev/null +++ b/scene_cup/saved/plates/plate_green.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_plate_green" ( + prepend payload = @./plate_green.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_cup/saved/plates/plate_pink.usda b/scene_cup/saved/plates/plate_pink.usda new file mode 100644 index 0000000000000000000000000000000000000000..9f7866829735f85e343e6429f4173386c84b723d --- /dev/null +++ b/scene_cup/saved/plates/plate_pink.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_plate_pink" ( + prepend payload = @./plate_pink.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_cup/saved/plates/plate_purple.usda b/scene_cup/saved/plates/plate_purple.usda new file mode 100644 index 0000000000000000000000000000000000000000..74852b9ba3b5f9d11fcf8a6212ed60a812136127 --- /dev/null +++ b/scene_cup/saved/plates/plate_purple.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_plate_purple" ( + prepend payload = @./plate_purple.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_cup/saved/plates/plate_red.usda b/scene_cup/saved/plates/plate_red.usda new file mode 100644 index 0000000000000000000000000000000000000000..fad860f87bd9dc1b95534829dee1cfcb5faf38ef --- /dev/null +++ b/scene_cup/saved/plates/plate_red.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_plate_red" ( + prepend payload = @./plate_red.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/bottles_eval/base15_base_glb.usda b/scene_drink/bottles_eval/base15_base_glb.usda new file mode 100644 index 0000000000000000000000000000000000000000..e3dd67b2213ab60a6cf153c6240d58c7b18a9562 --- /dev/null +++ b/scene_drink/bottles_eval/base15_base_glb.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base15_base_glb" ( + prepend payload = @./base15_base_glb.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/bottles_eval/base9_base_glb.usda b/scene_drink/bottles_eval/base9_base_glb.usda new file mode 100644 index 0000000000000000000000000000000000000000..cacc5f8a5ad841075934cf9a5be0713c4d3a94da --- /dev/null +++ b/scene_drink/bottles_eval/base9_base_glb.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_base9_base_glb" ( + prepend payload = @./base9_base_glb.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_3e2323f49db4793bd087e67b20ac350.usda b/scene_drink/objects/obj_3e2323f49db4793bd087e67b20ac350.usda new file mode 100644 index 0000000000000000000000000000000000000000..de4f8bed4f34ef99c01481a3b61a5d9da2ab7248 --- /dev/null +++ b/scene_drink/objects/obj_3e2323f49db4793bd087e67b20ac350.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_3e2323f49db4793bd087e67b20ac350" ( + prepend payload = @./obj_3e2323f49db4793bd087e67b20ac350.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_76f8b64886f4edbae88e74f68d065c9.usd b/scene_drink/objects/obj_76f8b64886f4edbae88e74f68d065c9.usd new file mode 100644 index 0000000000000000000000000000000000000000..2fd0f39d5165a14a4dca891d8744a78964055bdf Binary files /dev/null and b/scene_drink/objects/obj_76f8b64886f4edbae88e74f68d065c9.usd differ diff --git a/scene_drink/objects/obj_76f8b64886f4edbae88e74f68d065c9.usda b/scene_drink/objects/obj_76f8b64886f4edbae88e74f68d065c9.usda new file mode 100644 index 0000000000000000000000000000000000000000..ca1c1ebc70b93fdcb6c432e925352238ddc5ee61 --- /dev/null +++ b/scene_drink/objects/obj_76f8b64886f4edbae88e74f68d065c9.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_76f8b64886f4edbae88e74f68d065c9" ( + prepend payload = @./obj_76f8b64886f4edbae88e74f68d065c9.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_8a6aed1dff24e57b6836ade47a46ead.usda b/scene_drink/objects/obj_8a6aed1dff24e57b6836ade47a46ead.usda new file mode 100644 index 0000000000000000000000000000000000000000..d2cec88017654e09b59fbd2905e6f4af76c5938e --- /dev/null +++ b/scene_drink/objects/obj_8a6aed1dff24e57b6836ade47a46ead.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_8a6aed1dff24e57b6836ade47a46ead" ( + prepend payload = @./obj_8a6aed1dff24e57b6836ade47a46ead.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_8d23f3cd9254e38a696060a962ebb7f.usda b/scene_drink/objects/obj_8d23f3cd9254e38a696060a962ebb7f.usda new file mode 100644 index 0000000000000000000000000000000000000000..92c44abbb97d32a47c18450f5d93726d3d2100d8 --- /dev/null +++ b/scene_drink/objects/obj_8d23f3cd9254e38a696060a962ebb7f.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_8d23f3cd9254e38a696060a962ebb7f" ( + prepend payload = @./obj_8d23f3cd9254e38a696060a962ebb7f.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_91d0e4cb6a1409ea72d960d0ab144ea.usd b/scene_drink/objects/obj_91d0e4cb6a1409ea72d960d0ab144ea.usd new file mode 100644 index 0000000000000000000000000000000000000000..2b23e7d1c8088ef7c0fd7f5610111ed2c01bd67b Binary files /dev/null and b/scene_drink/objects/obj_91d0e4cb6a1409ea72d960d0ab144ea.usd differ diff --git a/scene_drink/objects/obj_91d0e4cb6a1409ea72d960d0ab144ea.usda b/scene_drink/objects/obj_91d0e4cb6a1409ea72d960d0ab144ea.usda new file mode 100644 index 0000000000000000000000000000000000000000..29d0ece0cebc817af8be7ecc386950838edee9b5 --- /dev/null +++ b/scene_drink/objects/obj_91d0e4cb6a1409ea72d960d0ab144ea.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_91d0e4cb6a1409ea72d960d0ab144ea" ( + prepend payload = @./obj_91d0e4cb6a1409ea72d960d0ab144ea.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_96181392c1f4e2d9316bf2eeafc3042.usda b/scene_drink/objects/obj_96181392c1f4e2d9316bf2eeafc3042.usda new file mode 100644 index 0000000000000000000000000000000000000000..a0f426a9da77b423329cdaf2a93efaf6523694e5 --- /dev/null +++ b/scene_drink/objects/obj_96181392c1f4e2d9316bf2eeafc3042.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_96181392c1f4e2d9316bf2eeafc3042" ( + prepend payload = @./obj_96181392c1f4e2d9316bf2eeafc3042.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_acdfc046a5149cc890c992da89b48c0.usda b/scene_drink/objects/obj_acdfc046a5149cc890c992da89b48c0.usda new file mode 100644 index 0000000000000000000000000000000000000000..f1c78ed3061fc3331ed8451f7a0ee6ce871d220a --- /dev/null +++ b/scene_drink/objects/obj_acdfc046a5149cc890c992da89b48c0.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_acdfc046a5149cc890c992da89b48c0" ( + prepend payload = @./obj_acdfc046a5149cc890c992da89b48c0.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_b87502ac41f4eb2b2ba7b0cce6517aa.usda b/scene_drink/objects/obj_b87502ac41f4eb2b2ba7b0cce6517aa.usda new file mode 100644 index 0000000000000000000000000000000000000000..2fc2ad22c09e3aa151b2c5f4ac561edfd2f6657f --- /dev/null +++ b/scene_drink/objects/obj_b87502ac41f4eb2b2ba7b0cce6517aa.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_b87502ac41f4eb2b2ba7b0cce6517aa" ( + prepend payload = @./obj_b87502ac41f4eb2b2ba7b0cce6517aa.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_base_glb_09.usda b/scene_drink/objects/obj_base_glb_09.usda new file mode 100644 index 0000000000000000000000000000000000000000..57e997e9b931aa6df52abbf1dbf3aa7fbb875c54 --- /dev/null +++ b/scene_drink/objects/obj_base_glb_09.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_base_glb_09" ( + prepend payload = @./obj_base_glb_09.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_c7aa636f24e345b3b831271bf7f1fe02.usda b/scene_drink/objects/obj_c7aa636f24e345b3b831271bf7f1fe02.usda new file mode 100644 index 0000000000000000000000000000000000000000..470874c69dc58a1f9d70fa647fa45bc2d790035e --- /dev/null +++ b/scene_drink/objects/obj_c7aa636f24e345b3b831271bf7f1fe02.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_c7aa636f24e345b3b831271bf7f1fe02" ( + prepend payload = @./obj_c7aa636f24e345b3b831271bf7f1fe02.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_d56e83387b64684ae7a1b4a20040d67.usda b/scene_drink/objects/obj_d56e83387b64684ae7a1b4a20040d67.usda new file mode 100644 index 0000000000000000000000000000000000000000..4ef1032b300831717b11dc2ba8e815355d76c107 --- /dev/null +++ b/scene_drink/objects/obj_d56e83387b64684ae7a1b4a20040d67.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_d56e83387b64684ae7a1b4a20040d67" ( + prepend payload = @./obj_d56e83387b64684ae7a1b4a20040d67.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_eced95f9f49e4ef9b6f8d576f908bc6b.usda b/scene_drink/objects/obj_eced95f9f49e4ef9b6f8d576f908bc6b.usda new file mode 100644 index 0000000000000000000000000000000000000000..d253737d5ceb5efb9960122ec6ea172e795939b2 --- /dev/null +++ b/scene_drink/objects/obj_eced95f9f49e4ef9b6f8d576f908bc6b.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_eced95f9f49e4ef9b6f8d576f908bc6b" ( + prepend payload = @./obj_eced95f9f49e4ef9b6f8d576f908bc6b.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_f9f025d995c4554bcc39b97eed20c7d.usda b/scene_drink/objects/obj_f9f025d995c4554bcc39b97eed20c7d.usda new file mode 100644 index 0000000000000000000000000000000000000000..a36ece9733b1b298183a0844052518640e713906 --- /dev/null +++ b/scene_drink/objects/obj_f9f025d995c4554bcc39b97eed20c7d.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_f9f025d995c4554bcc39b97eed20c7d" ( + prepend payload = @./obj_f9f025d995c4554bcc39b97eed20c7d.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_drink/objects/obj_instance.usda b/scene_drink/objects/obj_instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..0260ba40a1797a6311823191942f798130922ff2 --- /dev/null +++ b/scene_drink/objects/obj_instance.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_obj_instance" ( + prepend payload = @./obj_instance.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Num604604837fdaa40001bb718c.mdl b/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Num604604837fdaa40001bb718c.mdl new file mode 100644 index 0000000000000000000000000000000000000000..03da8ecd7abaf7cc3b4782ee6316fda03541c7ef --- /dev/null +++ b/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Num604604837fdaa40001bb718c.mdl @@ -0,0 +1,284 @@ +mdl 1.6; + +import ::math::*; +import ::state::*; +import ::tex::*; +import ::anno::*; +using OmniUe4Function import *; +using OmniUe4Base import *; + +export annotation sampler_color(); +export annotation sampler_normal(); +export annotation sampler_grayscale(); +export annotation sampler_alpha(); +export annotation sampler_masks(); +export annotation sampler_distancefield(); +export annotation dither_masked_off(); +export annotation world_space_normal(); + +export material Num604604837fdaa40001bb718c( + uniform texture_2d Normal_Tex = texture_2d("./Textures/normal.png",::tex::gamma_linear) + [[ + anno::display_name("Normal_Tex"), + anno::ui_order(32), + anno::in_group("Normal"), + sampler_normal() + ]], + float4 Normal_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Normal_UVA"), + anno::ui_order(32), + anno::in_group("Normal") + ]], + float EmissiveIntensity = 0.0 + [[ + anno::display_name("EmissiveIntensity"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + float IsEmissiveTex = 0.0 + [[ + anno::display_name("IsEmissiveTex"), + anno::in_group("EmissiveColor") + ]], + float4 Emissive_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("Emissive_Color"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + uniform texture_2d Emissive_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Emissive_Tex"), + anno::ui_order(32), + anno::in_group("EmissiveColor"), + sampler_color() + ]], + float4 Emissive_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Emissive_UVA"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + float IsBaseColorTex = 0.0 + [[ + anno::display_name("IsBaseColorTex"), + anno::in_group("BaseColor") + ]], + float4 BaseColor_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("BaseColor_Color"), + anno::ui_order(32), + anno::in_group("BaseColor") + ]], + uniform texture_2d BaseColor_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("BaseColor_Tex"), + anno::ui_order(32), + anno::in_group("BaseColor"), + sampler_color() + ]], + float4 BaseColor_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("BaseColor_UVA"), + anno::ui_order(32), + anno::in_group("BaseColor") + ]], + float IsMetallicTex = 0.0 + [[ + anno::display_name("IsMetallicTex"), + anno::in_group("Metallic") + ]], + float4 Metallic_Color = float4(0.0,0.0,0.0,1.0) + [[ + anno::display_name("Metallic_Color"), + anno::ui_order(32), + anno::in_group("Metallic") + ]], + uniform texture_2d Metallic_Tex = texture_2d("./Textures/black.png",::tex::gamma_srgb) + [[ + anno::display_name("Metallic_Tex"), + anno::ui_order(32), + anno::in_group("Metallic"), + sampler_color() + ]], + float4 Metallic_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Metallic_UVA"), + anno::ui_order(32), + anno::in_group("Metallic") + ]], + float IsSpecularTex = 0.0 + [[ + anno::display_name("IsSpecularTex"), + anno::in_group("Specular") + ]], + float4 Specular_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("Specular_Color"), + anno::ui_order(32), + anno::in_group("Specular") + ]], + uniform texture_2d Specular_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Specular_Tex"), + anno::ui_order(32), + anno::in_group("Specular"), + sampler_color() + ]], + float4 Specular_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Specular_UVA"), + anno::ui_order(32), + anno::in_group("Specular") + ]], + float IsGlossTex = 0.0 + [[ + anno::display_name("IsGlossTex"), + anno::in_group("Roughness") + ]], + float4 Gloss_Color = float4(0.1,0.1,0.1,1.0) + [[ + anno::display_name("Gloss_Color"), + anno::ui_order(32), + anno::in_group("Roughness") + ]], + uniform texture_2d Gloss_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Gloss_Tex"), + anno::ui_order(32), + anno::in_group("Roughness"), + sampler_color() + ]], + float4 Gloss_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Gloss_UVA"), + anno::ui_order(32), + anno::in_group("Roughness") + ]], + float PolygonOffset = 0.0 + [[ + anno::display_name("PolygonOffset"), + anno::ui_order(32), + anno::in_group("WorldPosition") + ]], + int MaxTexCoordIndex = 3 + [[ + anno::hidden() + ]]) + = + let { + float3 Local82 = ::camera_position(); + float3 Local83 = (Local82 - (::convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), true)*state::meters_per_scene_unit()*100.0)); + float Local84 = math::dot(Local83, Local83); + float Local85 = math::sqrt(Local84); + float3 Local86 = (Local83 / Local85); + float3 Local87 = (Local86 * PolygonOffset); + + float3 WorldPositionOffset_mdl = Local87; + float2 CustomizedUV0_mdl = float2(state::texture_coordinate(math::min(0,MaxTexCoordIndex)).x,1.0-state::texture_coordinate(math::min(0,MaxTexCoordIndex)).y); + + float2 Local0 = (float2(0.5,0.5) * -1.0); + float Local1 = (CustomizedUV0_mdl.x * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).x); + float Local2 = (CustomizedUV0_mdl.y * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).y); + float2 Local3 = (Local0 + float2(Local1,Local2)); + float Local4 = (3.141592 * -2.0); + float Local5 = (float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).z / Local4); + float Local6 = (Local5 * 6.283185); + float Local7 = math::cos(Local6); + float Local8 = math::sin(Local6); + float Local9 = (Local8 * -1.0); + float Local10 = math::dot(Local3, float2(Local7,Local9)); + float Local11 = math::dot(Local3, float2(Local8,Local7)); + float2 Local12 = (float2(0.5,0.5) + float2(Local10,Local11)); + float4 Local13 = ::unpack_normal_map(tex::lookup_float4(Normal_Tex,float2(Local12.x,1.0-Local12.y),tex::wrap_repeat,tex::wrap_repeat)); + float3 Local14 = ((math::abs(1.0 - 1.0) > 0.00001) ? (float3(0.0,0.0,0.0)) : float3(Local13.x,Local13.y,Local13.z)); + + float3 Normal_mdl = Local14; + + float Local15 = (CustomizedUV0_mdl.x * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).x); + float Local16 = (CustomizedUV0_mdl.y * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).y); + float2 Local17 = (Local0 + float2(Local15,Local16)); + float Local18 = (float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).z / Local4); + float Local19 = (Local18 * 6.283185); + float Local20 = math::cos(Local19); + float Local21 = math::sin(Local19); + float Local22 = (Local21 * -1.0); + float Local23 = math::dot(Local17, float2(Local20,Local22)); + float Local24 = math::dot(Local17, float2(Local21,Local20)); + float2 Local25 = (float2(0.5,0.5) + float2(Local23,Local24)); + float4 Local26 = tex::lookup_float4(Emissive_Tex,float2(Local25.x,1.0-Local25.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local27 = ((math::abs(IsEmissiveTex - 1.0) > 0.00001) ? (float3(Emissive_Color.x,Emissive_Color.y,Emissive_Color.z)) : float3(Local26.x,Local26.y,Local26.z)); + float3 Local28 = (EmissiveIntensity * Local27); + float Local29 = (CustomizedUV0_mdl.x * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).x); + float Local30 = (CustomizedUV0_mdl.y * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).y); + float2 Local31 = (Local0 + float2(Local29,Local30)); + float Local32 = (float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).z / Local4); + float Local33 = (Local32 * 6.283185); + float Local34 = math::cos(Local33); + float Local35 = math::sin(Local33); + float Local36 = (Local35 * -1.0); + float Local37 = math::dot(Local31, float2(Local34,Local36)); + float Local38 = math::dot(Local31, float2(Local35,Local34)); + float2 Local39 = (float2(0.5,0.5) + float2(Local37,Local38)); + float4 Local40 = tex::lookup_float4(BaseColor_Tex,float2(Local39.x,1.0-Local39.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local41 = ((math::abs(IsBaseColorTex - 1.0) > 0.00001) ? (float3(BaseColor_Color.x,BaseColor_Color.y,BaseColor_Color.z)) : float3(Local40.x,Local40.y,Local40.z)); + float Local42 = (CustomizedUV0_mdl.x * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).x); + float Local43 = (CustomizedUV0_mdl.y * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).y); + float2 Local44 = (Local0 + float2(Local42,Local43)); + float Local45 = (float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).z / Local4); + float Local46 = (Local45 * 6.283185); + float Local47 = math::cos(Local46); + float Local48 = math::sin(Local46); + float Local49 = (Local48 * -1.0); + float Local50 = math::dot(Local44, float2(Local47,Local49)); + float Local51 = math::dot(Local44, float2(Local48,Local47)); + float2 Local52 = (float2(0.5,0.5) + float2(Local50,Local51)); + float4 Local53 = tex::lookup_float4(Metallic_Tex,float2(Local52.x,1.0-Local52.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local54 = ((math::abs(IsMetallicTex - 1.0) > 0.00001) ? (float3(Metallic_Color.x,Metallic_Color.y,Metallic_Color.z)) : float3(Local53.x,Local53.y,Local53.z)); + float Local55 = (CustomizedUV0_mdl.x * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).x); + float Local56 = (CustomizedUV0_mdl.y * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).y); + float2 Local57 = (Local0 + float2(Local55,Local56)); + float Local58 = (float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).z / Local4); + float Local59 = (Local58 * 6.283185); + float Local60 = math::cos(Local59); + float Local61 = math::sin(Local59); + float Local62 = (Local61 * -1.0); + float Local63 = math::dot(Local57, float2(Local60,Local62)); + float Local64 = math::dot(Local57, float2(Local61,Local60)); + float2 Local65 = (float2(0.5,0.5) + float2(Local63,Local64)); + float4 Local66 = tex::lookup_float4(Specular_Tex,float2(Local65.x,1.0-Local65.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local67 = ((math::abs(IsSpecularTex - 1.0) > 0.00001) ? (float3(Specular_Color.x,Specular_Color.y,Specular_Color.z)) : float3(Local66.x,Local66.y,Local66.z)); + float Local68 = (CustomizedUV0_mdl.x * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).x); + float Local69 = (CustomizedUV0_mdl.y * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).y); + float2 Local70 = (Local0 + float2(Local68,Local69)); + float Local71 = (float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).z / Local4); + float Local72 = (Local71 * 6.283185); + float Local73 = math::cos(Local72); + float Local74 = math::sin(Local72); + float Local75 = (Local74 * -1.0); + float Local76 = math::dot(Local70, float2(Local73,Local75)); + float Local77 = math::dot(Local70, float2(Local74,Local73)); + float2 Local78 = (float2(0.5,0.5) + float2(Local76,Local77)); + float4 Local79 = tex::lookup_float4(Gloss_Tex,float2(Local78.x,1.0-Local78.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local80 = ((math::abs(IsGlossTex - 1.0) > 0.00001) ? (float3(Gloss_Color.x,Gloss_Color.y,Gloss_Color.z)) : float3(Local79.x,Local79.y,Local79.z)); + float3 Local81 = (1.0 - Local80); + + float3 EmissiveColor_mdl = Local28; + float OpacityMask_mdl = 1.0; + float3 BaseColor_mdl = Local41; + float Metallic_mdl = Local54.x; + float Specular_mdl = Local67.x; + float Roughness_mdl = Local81.x; + + } in + ::OmniUe4Base( + base_color: BaseColor_mdl, + metallic: Metallic_mdl, + roughness: Roughness_mdl, + specular: Specular_mdl, + normal: Normal_mdl, + opacity: OpacityMask_mdl, + emissive_color: EmissiveColor_mdl, + displacement: WorldPositionOffset_mdl, + two_sided: false); diff --git a/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Base.mdl b/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Base.mdl @@ -0,0 +1,224 @@ +/*************************************************************************************************** + * Copyright 2020 NVIDIA Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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. + **************************************************************************************************/ + +//* 1.0.0 - first version +//* 1.0.1 - merge unlit template +//* 1.0.2 - Fix EDF in the back side: the EDF contained in surface is only used for the front side and not for the back side +//* 1.0.3 - UE4 normal mapping: Geometry normal shouldn't be changed +//* 1.0.4 - using absolute import paths when importing standard modules + +mdl 1.3; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::tex::*; +import ::anno::*; + +float emissive_multiplier() +[[ + anno::description("the multiplier to convert UE4 emissive to raw data"), + anno::noinline() +]] +{ + return 20.0f * 128.0f; +} + +float3 tangent_space_normal( + float3 normal = float3(0.0,0.0,1.0), + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0) +) +[[ + anno::description("Interprets the vector in tangent space"), + anno::noinline() +]] +{ + return math::normalize( + tangent_u * normal.x - /* flip_tangent_v */ + tangent_v * normal.y + + state::normal() * (normal.z)); +} + +float3 world_space_normal( + float3 normal = float3(0.0,0.0,1.0), + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0) +) +[[ + anno::description("Interprets the vector in world space"), + anno::noinline() +]] +{ + return tangent_space_normal( + math::normalize( + normal.x * float3(tangent_u.x, tangent_v.x, state::normal().x) - + normal.y * float3(tangent_u.y, tangent_v.y, state::normal().y) + + normal.z * float3(tangent_u.z, tangent_v.z, state::normal().z)), + tangent_u, + tangent_v + ); +} + +export material OmniUe4Base( + float3 base_color = float3(0.0, 0.0, 0.0), + float metallic = 0.0, + float roughness = 0.5, + float specular = 0.5, + float3 normal = float3(0.0,0.0,1.0), + float clearcoat_weight = 0.0, + float clearcoat_roughness = 0.0, + float3 clearcoat_normal = float3(0.0,0.0,1.0), + uniform bool enable_opacity = true, + float opacity = 1.0, + float3 emissive_color = float3(0.0, 0.0, 0.0), + float3 displacement = float3(0.0), + uniform bool is_tangent_space_normal = true, + uniform bool two_sided = false, + uniform bool is_unlit = false +) +[[ + anno::display_name("Omni UE4 Base"), + anno::description("Omni UE4 Base, supports UE4 default lit and clearcoat shading model"), + anno::version( 1, 0, 0), + anno::author("NVIDIA CORPORATION"), + anno::key_words(string[]("omni", "UE4", "omniverse", "lit", "clearcoat", "generic")) +]] + = let { + color final_base_color = math::saturate(base_color); + float final_metallic = math::saturate(metallic); + float final_roughness = math::saturate(roughness); + float final_specular = math::saturate(specular); + color final_emissive_color = math::max(emissive_color, 0.0f) * emissive_multiplier(); /*factor for converting ue4 emissive to raw value*/ + float final_clearcoat_weight = math::saturate(clearcoat_weight); + float final_clearcoat_roughness = math::saturate(clearcoat_roughness); + float3 final_normal = math::normalize(normal); + float3 final_clearcoat_normal = math::normalize(clearcoat_normal); + + // - compute final roughness by squaring the "roughness" parameter + float alpha = final_roughness * final_roughness; + // reduce the reflectivity at grazing angles to avoid "dark edges" for high roughness due to the layering + float grazing_refl = math::max((1.0 - final_roughness), 0.0); + + float3 the_normal = is_unlit ? state::normal() : + (is_tangent_space_normal ? + tangent_space_normal( + normal: final_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ) : world_space_normal( + normal: final_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + )); + + // for the dielectric component we layer the glossy component on top of the diffuse one, + // the glossy layer has no color tint + + bsdf dielectric_component = df::custom_curve_layer( + weight: final_specular, + normal_reflectivity: 0.08, + grazing_reflectivity: grazing_refl, + layer: df::microfacet_ggx_smith_bsdf(roughness_u: alpha), + base: df::diffuse_reflection_bsdf(tint: final_base_color), + normal: the_normal); + + // the metallic component doesn't have a diffuse component, it's only glossy + // base_color is applied to tint it + bsdf metallic_component = df::microfacet_ggx_smith_bsdf(tint: final_base_color, roughness_u: alpha); + + // final BSDF is a linear blend between dielectric and metallic component + bsdf dielectric_metal_mix = + df::normalized_mix( + components: + df::bsdf_component[]( + df::bsdf_component( + component: metallic_component, + weight: final_metallic), + df::bsdf_component( + component: dielectric_component, + weight: 1.0-final_metallic) + ) + ); + + // clearcoat layer + float clearcoat_grazing_refl = math::max((1.0 - final_clearcoat_roughness), 0.0); + float clearcoat_alpha = final_clearcoat_roughness * final_clearcoat_roughness; + + float3 the_clearcoat_normal = is_tangent_space_normal ? tangent_space_normal( + normal: final_clearcoat_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ) : world_space_normal( + normal: final_clearcoat_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ); + + + bsdf clearcoat = + df::custom_curve_layer( + base: df::weighted_layer( + layer: dielectric_metal_mix, + weight: 1.0, + normal: final_clearcoat_weight == 0.0 ? state::normal() : the_normal + ), + layer: df::microfacet_ggx_smith_bsdf( + roughness_u: clearcoat_alpha, + tint: color(1.0) + ), + normal_reflectivity: 0.04, + grazing_reflectivity: clearcoat_grazing_refl, + normal: the_clearcoat_normal, + weight: final_clearcoat_weight + ); + bsdf surface = is_unlit ? bsdf() : clearcoat; +} +in material( + thin_walled: two_sided, // Graphene? + surface: material_surface( + scattering: surface, + emission: + material_emission ( + emission: df::diffuse_edf (), + intensity: final_emissive_color + ) + ), + backface: material_surface( + emission: + material_emission ( + emission: df::diffuse_edf (), + intensity: final_emissive_color + ) + ), + geometry: material_geometry( + displacement: displacement, + normal: final_clearcoat_weight == 0.0 ? the_normal : state::normal(), + cutout_opacity: enable_opacity ? opacity : 1.0 + ) +); diff --git a/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Function.mdl b/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Function.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f0801afff6f0870ea2574c9e9b6e2043e79e9a79 --- /dev/null +++ b/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Function.mdl @@ -0,0 +1,1413 @@ +/*************************************************************************************************** + * Copyright 2020 NVIDIA Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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. + **************************************************************************************************/ + +//* 1.0.1 - using absolute import paths when importing standard modules + +mdl 1.6; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::tex::*; +import ::anno::*; + + +export float3 convert_to_left_hand(float3 vec3, uniform bool up_z = true, uniform bool is_position = true) +[[ + anno::description("convert from RH to LH"), + anno::noinline() +]] +{ + float4x4 ZupConversion = float4x4( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + float4x4 YupConversion = float4x4( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + float4 vec4 = float4(vec3.x, vec3.y, vec3.z, is_position ? 1.0f : 0.0f); + + vec4 = vec4 * (up_z ? ZupConversion : YupConversion); + + return float3(vec4.x, vec4.y, vec4.z); +} + +export float3 transform_vector_from_tangent_to_world(float3 vector, + uniform bool up_z = true, + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0)) +[[ + anno::description("Transform vector from tangent space to world space"), + anno::noinline() +]] +{ + /* flip_tangent_v */ + return convert_to_left_hand( + tangent_u * vector.x - tangent_v * vector.y + state::normal() * vector.z, + up_z, false); +} + +export float3 transform_vector_from_world_to_tangent(float3 vector, + uniform bool up_z = true, + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0)) +[[ + anno::description("Transform vector from world space to tangent space"), + anno::noinline() +]] +{ + float3 vecRH = convert_to_left_hand(vector, up_z, false); + /* flip_tangent_v */ + return vecRH.x * float3(tangent_u.x, -tangent_v.x, state::normal().x) + + vecRH.y * float3(tangent_u.y, -tangent_v.y, state::normal().y) + + vecRH.z * float3(tangent_u.z, -tangent_v.z, state::normal().z); +} + +export float4 unpack_normal_map( + float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0) + ) +[[ + anno::description("Unpack a normal stored in a normal map"), + anno::noinline() +]] +{ + float2 normal_xy = float2(texture_sample.x, texture_sample.y); + + normal_xy = normal_xy * float2(2.0,2.0) - float2(1.0,1.0); + float normal_z = math::sqrt( math::saturate( 1.0 - math::dot( normal_xy, normal_xy ) ) ); + return float4( normal_xy.x, normal_xy.y, normal_z, 1.0 ); +} + +// for get color value from normal. +export float4 pack_normal_map( + float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0) + ) +[[ + anno::description("Pack to color from a normal") +]] +{ + float2 return_xy = float2(texture_sample.x, texture_sample.y); + + return_xy = (return_xy + float2(1.0,1.0)) / float2(2.0,2.0); + + return float4( return_xy.x, return_xy.y, 0.0, 1.0 ); +} + +export float4 greyscale_texture_lookup( + float4 texture_sample = float4(0.0, 0.0, 0.0, 1.0) + ) +[[ + anno::description("Sampling a greyscale texture"), + anno::noinline() +]] +{ + return float4(texture_sample.x, texture_sample.x, texture_sample.x, texture_sample.x); +} + +export float3 pixel_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Pixel normal in world space"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); +} + +export float3 vertex_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Vertex normal in world space"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); +} + +export float3 landscape_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Landscape normal in world space") +]] +{ + float3 normalFromNormalmap = math::floor((::vertex_normal_world_space(up_z) * 0.5 + 0.5) * 255.0) / 255.0 * 2.0 - 1.0; + + float2 normalXY = float2(normalFromNormalmap.x, normalFromNormalmap.y); + return float3(normalXY.x, normalXY.y, math::sqrt(math::saturate(1.0 - math::dot(normalXY, normalXY)))); +} + +// Different implementation specific between mdl and hlsl for smoothstep +export float smoothstep(float a, float b, float l) +{ + if (a < b) + { + return math::smoothstep(a, b, l); + } + else if (a > b) + { + return 1.0 - math::smoothstep(b, a, l); + } + else + { + return l <= a ? 0.0 : 1.0; + } +} + +export float2 smoothstep(float2 a, float2 b, float2 l) +{ + return float2(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y)); +} + +export float3 smoothstep(float3 a, float3 b, float3 l) +{ + return float3(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z)); +} + +export float4 smoothstep(float4 a, float4 b, float4 l) +{ + return float4(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z), smoothstep(a.w, b.w, l.w)); +} + +export float2 smoothstep(float2 a, float2 b, float l) +{ + return float2(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l)); +} + +export float3 smoothstep(float3 a, float3 b, float l) +{ + return float3(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l)); +} + +export float4 smoothstep(float4 a, float4 b, float l) +{ + return float4(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l), smoothstep(a.w, b.w, l)); +} + +export float2 smoothstep(float a, float b, float2 l) +{ + return float2(smoothstep(a, b, l.x), smoothstep(a, b, l.y)); +} + +export float3 smoothstep(float a, float b, float3 l) +{ + return float3(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z)); +} + +export float4 smoothstep(float a, float b, float4 l) +{ + return float4(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z), smoothstep(a, b, l.w)); +} + +//------------------ Random from UE4 ----------------------- +float length2(float3 v) +{ + return math::dot(v, v); +} + +float3 GetPerlinNoiseGradientTextureAt(uniform texture_2d PerlinNoiseGradientTexture, float3 v) +{ + const float2 ZShear = float2(17.0f, 89.0f); + + float2 OffsetA = v.z * ZShear; + float2 TexA = (float2(v.x, v.y) + OffsetA + 0.5f) / 128.0f; + float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA.x,1.0-TexA.y),tex::wrap_repeat,tex::wrap_repeat); + return float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z) * 2.0 - 1.0; +} + +float3 SkewSimplex(float3 In) +{ + return In + math::dot(In, float3(1.0 / 3.0f) ); +} +float3 UnSkewSimplex(float3 In) +{ + return In - math::dot(In, float3(1.0 / 6.0f) ); +} + +// 3D random number generator inspired by PCGs (permuted congruential generator) +// Using a **simple** Feistel cipher in place of the usual xor shift permutation step +// @param v = 3D integer coordinate +// @return three elements w/ 16 random bits each (0-0xffff). +// ~8 ALU operations for result.x (7 mad, 1 >>) +// ~10 ALU operations for result.xy (8 mad, 2 >>) +// ~12 ALU operations for result.xyz (9 mad, 3 >>) + +//TODO: uint3 +int3 Rand3DPCG16(int3 p) +{ + // taking a signed int then reinterpreting as unsigned gives good behavior for negatives + //TODO: uint3 + int3 v = int3(p); + + // Linear congruential step. These LCG constants are from Numerical Recipies + // For additional #'s, PCG would do multiple LCG steps and scramble each on output + // So v here is the RNG state + v = v * 1664525 + 1013904223; + + // PCG uses xorshift for the final shuffle, but it is expensive (and cheap + // versions of xorshift have visible artifacts). Instead, use simple MAD Feistel steps + // + // Feistel ciphers divide the state into separate parts (usually by bits) + // then apply a series of permutation steps one part at a time. The permutations + // use a reversible operation (usually ^) to part being updated with the result of + // a permutation function on the other parts and the key. + // + // In this case, I'm using v.x, v.y and v.z as the parts, using + instead of ^ for + // the combination function, and just multiplying the other two parts (no key) for + // the permutation function. + // + // That gives a simple mad per round. + v.x += v.y*v.z; + v.y += v.z*v.x; + v.z += v.x*v.y; + v.x += v.y*v.z; + v.y += v.z*v.x; + v.z += v.x*v.y; + + // only top 16 bits are well shuffled + return v >> 16; +} + +// Wraps noise for tiling texture creation +// @param v = unwrapped texture parameter +// @param bTiling = true to tile, false to not tile +// @param RepeatSize = number of units before repeating +// @return either original or wrapped coord +float3 NoiseTileWrap(float3 v, bool bTiling, float RepeatSize) +{ + return bTiling ? (math::frac(v / RepeatSize) * RepeatSize) : v; +} + +// Evaluate polynomial to get smooth transitions for Perlin noise +// only needed by Perlin functions in this file +// scalar(per component): 2 add, 5 mul +float4 PerlinRamp(float4 t) +{ + return t * t * t * (t * (t * 6 - 15) + 10); +} + +// Blum-Blum-Shub-inspired pseudo random number generator +// http://www.umbc.edu/~olano/papers/mNoise.pdf +// real BBS uses ((s*s) mod M) with bignums and M as the product of two huge Blum primes +// instead, we use a single prime M just small enough not to overflow +// note that the above paper used 61, which fits in a half, but is unusably bad +// @param Integer valued floating point seed +// @return random number in range [0,1) +// ~8 ALU operations (5 *, 3 frac) +float RandBBSfloat(float seed) +{ + float BBS_PRIME24 = 4093.0; + float s = math::frac(seed / BBS_PRIME24); + s = math::frac(s * s * BBS_PRIME24); + s = math::frac(s * s * BBS_PRIME24); + return s; +} + +// Modified noise gradient term +// @param seed - random seed for integer lattice position +// @param offset - [-1,1] offset of evaluation point from lattice point +// @return gradient direction (xyz) and contribution (w) from this lattice point +float4 MGradient(int seed, float3 offset) +{ + //TODO uint + int rand = Rand3DPCG16(int3(seed,0,0)).x; + int3 MGradientMask = int3(0x8000, 0x4000, 0x2000); + float3 MGradientScale = float3(1.0 / 0x4000, 1.0 / 0x2000, 1.0 / 0x1000); + float3 direction = float3(int3(rand, rand, rand) & MGradientMask) * MGradientScale - 1; + return float4(direction.x, direction.y, direction.z, math::dot(direction, offset)); +} + +// compute Perlin and related noise corner seed values +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = true to return seed values for a repeating noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @param seed000-seed111 = hash function seeds for the eight corners +// @return fractional part of v +struct SeedValue +{ + float3 fv = float3(0); + float seed000 = 0; + float seed001 = 0; + float seed010 = 0; + float seed011 = 0; + float seed100 = 0; + float seed101 = 0; + float seed110 = 0; + float seed111 = 0; +}; + +SeedValue NoiseSeeds(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds; + seeds.fv = math::frac(v); + float3 iv = math::floor(v); + + const float3 primes = float3(19, 47, 101); + + if (bTiling) + { // can't algebraically combine with primes + seeds.seed000 = math::dot(primes, NoiseTileWrap(iv, true, RepeatSize)); + seeds.seed100 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 0), true, RepeatSize)); + seeds.seed010 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 0), true, RepeatSize)); + seeds.seed110 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 0), true, RepeatSize)); + seeds.seed001 = math::dot(primes, NoiseTileWrap(iv + float3(0, 0, 1), true, RepeatSize)); + seeds.seed101 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 1), true, RepeatSize)); + seeds.seed011 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 1), true, RepeatSize)); + seeds.seed111 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 1), true, RepeatSize)); + } + else + { // get to combine offsets with multiplication by primes in this case + seeds.seed000 = math::dot(iv, primes); + seeds.seed100 = seeds.seed000 + primes.x; + seeds.seed010 = seeds.seed000 + primes.y; + seeds.seed110 = seeds.seed100 + primes.y; + seeds.seed001 = seeds.seed000 + primes.z; + seeds.seed101 = seeds.seed100 + primes.z; + seeds.seed011 = seeds.seed010 + primes.z; + seeds.seed111 = seeds.seed110 + primes.z; + } + + return seeds; +} + +struct SimplexWeights +{ + float4 Result = float4(0); + float3 PosA = float3(0); + float3 PosB = float3(0); + float3 PosC = float3(0); + float3 PosD = float3(0); +}; + +// Computed weights and sample positions for simplex interpolation +// @return float4(a,b,c, d) Barycentric coordinate defined as Filtered = Tex(PosA) * a + Tex(PosB) * b + Tex(PosC) * c + Tex(PosD) * d +SimplexWeights ComputeSimplexWeights3D(float3 OrthogonalPos) +{ + SimplexWeights weights; + float3 OrthogonalPosFloor = math::floor(OrthogonalPos); + + weights.PosA = OrthogonalPosFloor; + weights.PosB = weights.PosA + float3(1, 1, 1); + + OrthogonalPos -= OrthogonalPosFloor; + + float Largest = math::max(OrthogonalPos.x, math::max(OrthogonalPos.y, OrthogonalPos.z)); + float Smallest = math::min(OrthogonalPos.x, math::min(OrthogonalPos.y, OrthogonalPos.z)); + + weights.PosC = weights.PosA + float3(Largest == OrthogonalPos.x, Largest == OrthogonalPos.y, Largest == OrthogonalPos.z); + weights.PosD = weights.PosA + float3(Smallest != OrthogonalPos.x, Smallest != OrthogonalPos.y, Smallest != OrthogonalPos.z); + + float RG = OrthogonalPos.x - OrthogonalPos.y; + float RB = OrthogonalPos.x - OrthogonalPos.z; + float GB = OrthogonalPos.y - OrthogonalPos.z; + + weights.Result.z = + math::min(math::max(0, RG), math::max(0, RB)) // X + + math::min(math::max(0, -RG), math::max(0, GB)) // Y + + math::min(math::max(0, -RB), math::max(0, -GB)); // Z + + weights.Result.w = + math::min(math::max(0, -RG), math::max(0, -RB)) // X + + math::min(math::max(0, RG), math::max(0, -GB)) // Y + + math::min(math::max(0, RB), math::max(0, GB)); // Z + + weights.Result.y = Smallest; + weights.Result.x = 1.0f - weights.Result.y - weights.Result.z - weights.Result.w; + + return weights; +} + +// filtered 3D gradient simple noise (few texture lookups, high quality) +// @param v >0 +// @return random number in the range -1 .. 1 +float SimplexNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 EvalPos) +{ + float3 OrthogonalPos = SkewSimplex(EvalPos); + + SimplexWeights Weights = ComputeSimplexWeights3D(OrthogonalPos); + + // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 32 bit) + float3 A = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosA); + float3 B = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosB); + float3 C = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosC); + float3 D = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosD); + + Weights.PosA = UnSkewSimplex(Weights.PosA); + Weights.PosB = UnSkewSimplex(Weights.PosB); + Weights.PosC = UnSkewSimplex(Weights.PosC); + Weights.PosD = UnSkewSimplex(Weights.PosD); + + float DistanceWeight; + + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosA)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float a = math::dot(A, EvalPos - Weights.PosA) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosB)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float b = math::dot(B, EvalPos - Weights.PosB) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosC)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float c = math::dot(C, EvalPos - Weights.PosC) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosD)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float d = math::dot(D, EvalPos - Weights.PosD) * DistanceWeight; + + return 32 * (a + b + c + d); +} + +// filtered 3D noise, can be optimized +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float GradientNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 v, bool bTiling, float RepeatSize) +{ + bTiling = true; + float3 fv = math::frac(v); + float3 iv0 = NoiseTileWrap(math::floor(v), bTiling, RepeatSize); + float3 iv1 = NoiseTileWrap(iv0 + 1, bTiling, RepeatSize); + + const int2 ZShear = int2(17, 89); + + float2 OffsetA = iv0.z * ZShear; + float2 OffsetB = OffsetA + ZShear; // non-tiling, use relative offset + if (bTiling) // tiling, have to compute from wrapped coordinates + { + OffsetB = iv1.z * ZShear; + } + + // Texture size scale factor + float ts = 1 / 128.0f; + + // texture coordinates for iv0.xy, as offset for both z slices + float2 TexA0 = (float2(iv0.x, iv0.y) + OffsetA + 0.5f) * ts; + float2 TexB0 = (float2(iv0.x, iv0.y) + OffsetB + 0.5f) * ts; + + // texture coordinates for iv1.xy, as offset for both z slices + float2 TexA1 = TexA0 + ts; // for non-tiling, can compute relative to existing coordinates + float2 TexB1 = TexB0 + ts; + if (bTiling) // for tiling, need to compute from wrapped coordinates + { + TexA1 = (float2(iv1.x, iv1.y) + OffsetA + 0.5f) * ts; + TexB1 = (float2(iv1.x, iv1.y) + OffsetB + 0.5f) * ts; + } + + + // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 8, 16 or 32 bit) + float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat); + float3 PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 A = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 B = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 C = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 D = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 E = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 F = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 G = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 H = PerlinNoiseColor * 2 - 1; + + float a = math::dot(A, fv - float3(0, 0, 0)); + float b = math::dot(B, fv - float3(1, 0, 0)); + float c = math::dot(C, fv - float3(0, 1, 0)); + float d = math::dot(D, fv - float3(1, 1, 0)); + float e = math::dot(E, fv - float3(0, 0, 1)); + float f = math::dot(F, fv - float3(1, 0, 1)); + float g = math::dot(G, fv - float3(0, 1, 1)); + float h = math::dot(H, fv - float3(1, 1, 1)); + + float4 Weights = PerlinRamp(math::frac(float4(fv.x, fv.y, fv.z, 0))); + + float i = math::lerp(math::lerp(a, b, Weights.x), math::lerp(c, d, Weights.x), Weights.y); + float j = math::lerp(math::lerp(e, f, Weights.x), math::lerp(g, h, Weights.x), Weights.y); + + return math::lerp(i, j, Weights.z); +} + +// @return random number in the range -1 .. 1 +// scalar: 6 frac, 31 mul/mad, 15 add, +float FastGradientPerlinNoise3D_TEX(uniform texture_3d PerlinNoise3DTexture, float3 xyz) +{ + // needs to be the same value when creating the PerlinNoise3D texture + float Extent = 16; + + // last texel replicated and needed for filtering + // scalar: 3 frac, 6 mul + xyz = math::frac(xyz / (Extent - 1)) * (Extent - 1); + + // scalar: 3 frac + float3 uvw = math::frac(xyz); + // = floor(xyz); + // scalar: 3 add + float3 p0 = xyz - uvw; +// float3 f = math::pow(uvw, 2) * 3.0f - math::pow(uvw, 3) * 2.0f; // original perlin hermite (ok when used without bump mapping) + // scalar: 2*3 add 5*3 mul + float4 pr = PerlinRamp(float4(uvw.x, uvw.y, uvw.z, 0)); + float3 f = float3(pr.x, pr.y, pr.z); // new, better with continues second derivative for bump mapping + // scalar: 3 add + float3 p = p0 + f; + // scalar: 3 mad + // TODO: need reverse??? + float4 NoiseSample = tex::lookup_float4(PerlinNoise3DTexture, p / Extent + 0.5f / Extent); // +0.5f to get rid of bilinear offset + + // reconstruct from 8bit (using mad with 2 constants and dot4 was same instruction count) + // scalar: 4 mad, 3 mul, 3 add + float3 n = float3(NoiseSample.x, NoiseSample.y, NoiseSample.z) * 255.0f / 127.0f - 1.0f; + float d = NoiseSample.w * 255.f - 127; + return math::dot(xyz, n) - d; +} + +// Perlin-style "Modified Noise" +// http://www.umbc.edu/~olano/papers/index.html#mNoise +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float GradientNoise3D_ALU(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize); + + float rand000 = MGradient(int(seeds.seed000), seeds.fv - float3(0, 0, 0)).w; + float rand100 = MGradient(int(seeds.seed100), seeds.fv - float3(1, 0, 0)).w; + float rand010 = MGradient(int(seeds.seed010), seeds.fv - float3(0, 1, 0)).w; + float rand110 = MGradient(int(seeds.seed110), seeds.fv - float3(1, 1, 0)).w; + float rand001 = MGradient(int(seeds.seed001), seeds.fv - float3(0, 0, 1)).w; + float rand101 = MGradient(int(seeds.seed101), seeds.fv - float3(1, 0, 1)).w; + float rand011 = MGradient(int(seeds.seed011), seeds.fv - float3(0, 1, 1)).w; + float rand111 = MGradient(int(seeds.seed111), seeds.fv - float3(1, 1, 1)).w; + + float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0)); + + float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y); + float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y); + return math::lerp(i, j, Weights.z); +} + +// 3D value noise - used to be incorrectly called Perlin noise +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float ValueNoise3D_ALU(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize); + + float rand000 = RandBBSfloat(seeds.seed000) * 2 - 1; + float rand100 = RandBBSfloat(seeds.seed100) * 2 - 1; + float rand010 = RandBBSfloat(seeds.seed010) * 2 - 1; + float rand110 = RandBBSfloat(seeds.seed110) * 2 - 1; + float rand001 = RandBBSfloat(seeds.seed001) * 2 - 1; + float rand101 = RandBBSfloat(seeds.seed101) * 2 - 1; + float rand011 = RandBBSfloat(seeds.seed011) * 2 - 1; + float rand111 = RandBBSfloat(seeds.seed111) * 2 - 1; + + float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0)); + + float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y); + float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y); + return math::lerp(i, j, Weights.z); +} + +// 3D jitter offset within a voronoi noise cell +// @param pos - integer lattice corner +// @return random offsets vector +float3 VoronoiCornerSample(float3 pos, int Quality) +{ + // random values in [-0.5, 0.5] + float3 noise = float3(Rand3DPCG16(int3(pos))) / 0xffff - 0.5; + + // quality level 1 or 2: searches a 2x2x2 neighborhood with points distributed on a sphere + // scale factor to guarantee jittered points will be found within a 2x2x2 search + if (Quality <= 2) + { + return math::normalize(noise) * 0.2588; + } + + // quality level 3: searches a 3x3x3 neighborhood with points distributed on a sphere + // scale factor to guarantee jittered points will be found within a 3x3x3 search + if (Quality == 3) + { + return math::normalize(noise) * 0.3090; + } + + // quality level 4: jitter to anywhere in the cell, needs 4x4x4 search + return noise; +} + +// compare previous best with a new candidate +// not producing point locations makes it easier for compiler to eliminate calculations when they're not needed +// @param minval = location and distance of best candidate seed point before the new one +// @param candidate = candidate seed point +// @param offset = 3D offset to new candidate seed point +// @param bDistanceOnly = if true, only set maxval.w with distance, otherwise maxval.w is distance and maxval.xyz is position +// @return position (if bDistanceOnly is false) and distance to closest seed point so far +float4 VoronoiCompare(float4 minval, float3 candidate, float3 offset, bool bDistanceOnly) +{ + if (bDistanceOnly) + { + return float4(0, 0, 0, math::min(minval.w, math::dot(offset, offset))); + } + else + { + float newdist = math::dot(offset, offset); + return newdist > minval.w ? minval : float4(candidate.x, candidate.y, candidate.z, newdist); + } +} + +// 220 instruction Worley noise +float4 VoronoiNoise3D_ALU(float3 v, int Quality, bool bTiling, float RepeatSize, bool bDistanceOnly) +{ + float3 fv = math::frac(v), fv2 = math::frac(v + 0.5); + float3 iv = math::floor(v), iv2 = math::floor(v + 0.5); + + // with initial minimum distance = infinity (or at least bigger than 4), first min is optimized away + float4 mindist = float4(0,0,0,100); + float3 p, offset; + + // quality level 3: do a 3x3x3 search + if (Quality == 3) + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = -1; offset_x <= 1; ++offset_x) + { + for (offset_y = -1; offset_y <= 1; ++offset_y) + { + for (offset_z = -1; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly); + } + } + } + } + + // everybody else searches a base 2x2x2 neighborhood + else + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = 0; offset_x <= 1; ++offset_x) + { + for (offset_y = 0; offset_y <= 1; ++offset_y) + { + for (offset_z = 0; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // quality level 2, do extra set of points, offset by half a cell + if (Quality == 2) + { + // 467 is just an offset to a different area in the random number field to avoid similar neighbor artifacts + p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize) + 467, Quality); + mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly); + } + } + } + } + } + + // quality level 4: add extra sets of four cells in each direction + if (Quality >= 4) + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = -1; offset_x <= 2; offset_x += 3) + { + for (offset_y = 0; offset_y <= 1; ++offset_y) + { + for (offset_z = 0; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + // along x axis + p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // along y axis + p = float3(offset.y, offset.z, offset.x) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.y, offset.z, offset.x), bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // along z axis + p = float3(offset.z, offset.x, offset.y) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.z, offset.x, offset.y), bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + } + } + } + } + + // transform squared distance to real distance + return float4(mindist.x, mindist.y, mindist.z, math::sqrt(mindist.w)); +} + +// Coordinates for corners of a Simplex tetrahedron +// Based on McEwan et al., Efficient computation of noise in GLSL, JGT 2011 +// @param v = 3D noise argument +// @return 4 corner locations +float4x3 SimplexCorners(float3 v) +{ + // find base corner by skewing to tetrahedral space and back + float3 tet = math::floor(v + v.x/3 + v.y/3 + v.z/3); + float3 base = tet - tet.x/6 - tet.y/6 - tet.z/6; + float3 f = v - base; + + // Find offsets to other corners (McEwan did this in tetrahedral space, + // but since skew is along x=y=z axis, this works in Euclidean space too.) + float3 g = math::step(float3(f.y,f.z,f.x), float3(f.x,f.y,f.z)), h = 1 - float3(g.z, g.x, g.y); + float3 a1 = math::min(g, h) - 1.0 / 6.0, a2 = math::max(g, h) - 1.0 / 3.0; + + // four corners + return float4x3(base, base + a1, base + a2, base + 0.5); +} + +// Improved smoothing function for simplex noise +// @param f = fractional distance to four tetrahedral corners +// @return weight for each corner +float4 SimplexSmooth(float4x3 f) +{ + const float scale = 1024. / 375.; // scale factor to make noise -1..1 + float4 d = float4(math::dot(f[0], f[0]), math::dot(f[1], f[1]), math::dot(f[2], f[2]), math::dot(f[3], f[3])); + float4 s = math::saturate(2 * d); + return (1 * scale + s*(-3 * scale + s*(3 * scale - s*scale))); +} + +// Derivative of simplex noise smoothing function +// @param f = fractional distanc eto four tetrahedral corners +// @return derivative of smoothing function for each corner by x, y and z +float3x4 SimplexDSmooth(float4x3 f) +{ + const float scale = 1024. / 375.; // scale factor to make noise -1..1 + float4 d = float4(math::dot(f[0], f[0]), math::dot(f[1], f[1]), math::dot(f[2], f[2]), math::dot(f[3], f[3])); + float4 s = math::saturate(2 * d); + s = -12 * scale + s*(24 * scale - s * 12 * scale); + + return float3x4( + s * float4(f[0][0], f[1][0], f[2][0], f[3][0]), + s * float4(f[0][1], f[1][1], f[2][1], f[3][1]), + s * float4(f[0][2], f[1][2], f[2][2], f[3][2])); +} + +// Simplex noise and its Jacobian derivative +// @param v = 3D noise argument +// @param bTiling = whether to repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension, must be a multiple of 3 +// @return float3x3 Jacobian in J[*].xyz, vector noise in J[*].w +// J[0].w, J[1].w, J[2].w is a Perlin-style simplex noise with vector output, e.g. (Nx, Ny, Nz) +// J[i].x is X derivative of the i'th component of the noise so J[2].x is dNz/dx +// You can use this to compute the noise, gradient, curl, or divergence: +// float3x4 J = JacobianSimplex_ALU(...); +// float3 VNoise = float3(J[0].w, J[1].w, J[2].w); // 3D noise +// float3 Grad = J[0].xyz; // gradient of J[0].w +// float3 Curl = float3(J[1][2]-J[2][1], J[2][0]-J[0][2], J[0][1]-J[1][2]); +// float Div = J[0][0]+J[1][1]+J[2][2]; +// All of these are confirmed to compile out all unneeded terms. +// So Grad of X doesn't compute Y or Z components, and VNoise doesn't do any of the derivative computation. +float3x4 JacobianSimplex_ALU(float3 v, bool bTiling, float RepeatSize) +{ + int3 MGradientMask = int3(0x8000, 0x4000, 0x2000); + float3 MGradientScale = float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000); + + // corners of tetrahedron + float4x3 T = SimplexCorners(v); + // TODO: uint3 + int3 rand = int3(0); + float4x3 gvec0 = float4x3(1.0); + float4x3 gvec1 = float4x3(1.0); + float4x3 gvec2 = float4x3(1.0); + float4x3 fv = float4x3(1.0); + float3x4 grad = float3x4(1.0); + + // processing of tetrahedral vertices, unrolled + // to compute gradient at each corner + fv[0] = v - T[0]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[0] + 0.5, bTiling, RepeatSize)))); + gvec0[0] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[0] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[0] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][0] = math::dot(gvec0[0], fv[0]); + grad[1][0] = math::dot(gvec1[0], fv[0]); + grad[2][0] = math::dot(gvec2[0], fv[0]); + + fv[1] = v - T[1]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[1] + 0.5, bTiling, RepeatSize)))); + gvec0[1] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[1] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec1[1] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][1] = math::dot(gvec0[1], fv[1]); + grad[1][1] = math::dot(gvec1[1], fv[1]); + grad[2][1] = math::dot(gvec2[1], fv[1]); + + fv[2] = v - T[2]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[2] + 0.5, bTiling, RepeatSize)))); + gvec0[2] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[2] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[2] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][2] = math::dot(gvec0[2], fv[2]); + grad[1][2] = math::dot(gvec1[2], fv[2]); + grad[2][2] = math::dot(gvec2[2], fv[2]); + + fv[3] = v - T[3]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[3] + 0.5, bTiling, RepeatSize)))); + gvec0[3] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[3] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[3] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][3] = math::dot(gvec0[3], fv[3]); + grad[1][3] = math::dot(gvec1[3], fv[3]); + grad[2][3] = math::dot(gvec2[3], fv[3]); + + // blend gradients + float4 sv = SimplexSmooth(fv); + float3x4 ds = SimplexDSmooth(fv); + + float3x4 jacobian = float3x4(1.0); + float3 vec0 = gvec0*sv + grad[0]*ds; // NOTE: mdl is column major, convert from UE4 (row major) + jacobian[0] = float4(vec0.x, vec0.y, vec0.z, math::dot(sv, grad[0])); + float3 vec1 = gvec1*sv + grad[1]*ds; + jacobian[1] = float4(vec1.x, vec1.y, vec1.z, math::dot(sv, grad[1])); + float3 vec2 = gvec2*sv + grad[2]*ds; + jacobian[2] = float4(vec2.x, vec2.y, vec2.z, math::dot(sv, grad[2])); + + return jacobian; +} + +// While RepeatSize is a float here, the expectation is that it would be largely integer values coming in from the UI. The downstream logic assumes +// floats for all called functions (NoiseTileWrap) and this prevents any float-to-int conversion errors from automatic type conversion. +float Noise3D_Multiplexer(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, int Function, float3 Position, int Quality, bool bTiling, float RepeatSize) +{ + // verified, HLSL compiled out the switch if Function is a constant + switch(Function) + { + case 0: + return SimplexNoise3D_TEX(PerlinNoiseGradientTexture, Position); + case 1: + return GradientNoise3D_TEX(PerlinNoiseGradientTexture, Position, bTiling, RepeatSize); + case 2: + return FastGradientPerlinNoise3D_TEX(PerlinNoise3DTexture, Position); + case 3: + return GradientNoise3D_ALU(Position, bTiling, RepeatSize); + case 4: + return ValueNoise3D_ALU(Position, bTiling, RepeatSize); + case 5: + return VoronoiNoise3D_ALU(Position, Quality, bTiling, RepeatSize, true).w * 2.0 - 1.0; + } + return 0; +} +//---------------------------------------------------------- + +export float noise(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, float3 Position, float Scale, float Quality, float Function, float Turbulence, float Levels, float OutputMin, float OutputMax, float LevelScale, float FilterWidth, float Tiling, float RepeatSize) +[[ + anno::description("Noise"), + anno::noinline() +]] +{ + Position *= Scale; + FilterWidth *= Scale; + + float Out = 0.0f; + float OutScale = 1.0f; + float InvLevelScale = 1.0f / LevelScale; + + int iFunction(Function); + int iQuality(Quality); + int iLevels(Levels); + bool bTurbulence(Turbulence); + bool bTiling(Tiling); + + for(int i = 0; i < iLevels; ++i) + { + // fade out noise level that are too high frequent (not done through dynamic branching as it usually requires gradient instructions) + OutScale *= math::saturate(1.0 - FilterWidth); + + if(bTurbulence) + { + Out += math::abs(Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize)) * OutScale; + } + else + { + Out += Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize) * OutScale; + } + + Position *= LevelScale; + RepeatSize *= LevelScale; + OutScale *= InvLevelScale; + FilterWidth *= LevelScale; + } + + if(!bTurbulence) + { + // bring -1..1 to 0..1 range + Out = Out * 0.5f + 0.5f; + } + + // Out is in 0..1 range + return math::lerp(OutputMin, OutputMax, Out); +} + +// Material node for noise functions returning a vector value +// @param LevelScale usually 2 but higher values allow efficient use of few levels +// @return in user defined range (OutputMin..OutputMax) +export float4 vector4_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize) +[[ + anno::description("Vector Noise"), + anno::noinline() +]] +{ + float4 result = float4(0,0,0,1); + float3 ret = float3(0); + int iQuality = int(Quality); + int iFunction = int(Function); + bool bTiling = Tiling > 0.0; + + float3x4 Jacobian = JacobianSimplex_ALU(Position, bTiling, TileSize); // compiled out if not used + + // verified, HLSL compiled out the switch if Function is a constant + switch (iFunction) + { + case 0: // Cellnoise + ret = float3(Rand3DPCG16(int3(math::floor(NoiseTileWrap(Position, bTiling, TileSize))))) / 0xffff; + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 1: // Color noise + ret = float3(Jacobian[0].w, Jacobian[1].w, Jacobian[2].w); + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 2: // Gradient + result = Jacobian[0]; + break; + case 3: // Curl + ret = float3(Jacobian[2][1] - Jacobian[1][2], Jacobian[0][2] - Jacobian[2][0], Jacobian[1][0] - Jacobian[0][1]); + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 4: // Voronoi + result = VoronoiNoise3D_ALU(Position, iQuality, bTiling, TileSize, false); + break; + } + return result; +} + +export float3 vector3_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize) +[[ + anno::description("Vector Noise float3 version"), + anno::noinline() +]] +{ + float4 noise = vector4_noise(Position, Quality, Function, Tiling, TileSize); + return float3(noise.x, noise.y, noise.z); +} + + +// workaround for ue4 fresnel (without supporting for camera vector) : replacing it with 0.0, means facing to the view +export float fresnel(float exponent [[anno::unused()]], float base_reflect_fraction [[anno::unused()]], float3 normal [[anno::unused()]]) +[[ + anno::description("Fresnel"), + anno::noinline() +]] +{ + return 0.0; +} + +export float fresnel_function(float3 normal_vector [[anno::unused()]], float3 camera_vector [[anno::unused()]], + bool invert_fresnel [[anno::unused()]], float power [[anno::unused()]], + bool use_cheap_contrast [[anno::unused()]], float cheap_contrast_dark [[anno::unused()]], float cheap_contrast_bright [[anno::unused()]], + bool clamp_fresnel_dot_product [[anno::unused()]]) +[[ + anno::description("Fresnel Function"), + anno::noinline() +]] +{ + return 0.0; +} + +export float3 camera_vector(uniform bool up_z = true) +[[ + anno::description("Camera Vector"), + anno::noinline() +]] +{ + // assume camera postion is 0,0,0 + return math::normalize(float3(0) - convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z)); +} + +export float pixel_depth() +[[ + anno::description("Pixel Depth"), + anno::noinline() +]] +{ + return 256.0f; +} + +export float scene_depth() +[[ + anno::description("Scene Depth") +]] +{ + return 65500.0f; +} + +export float3 scene_color() +[[ + anno::description("Scene Color") +]] +{ + return float3(1.0f); +} + +export float4 vertex_color() +[[ + anno::description("Vertex Color"), + anno::noinline() +]] +{ + return float4(1.0f); +} + +export float4 vertex_color_from_coordinate(int VertexColorCoordinateIndex) +[[ + anno::description("Vertex Color for float2 PrimVar"), + anno::noinline() +]] +{ + // Kit only supports 4 uv sets, 2 uvs are available to vertex color. if vertex color index is invalid, output the constant WHITE color intead + return (VertexColorCoordinateIndex > 2) ? float4(1.0f) : float4(state::texture_coordinate(VertexColorCoordinateIndex).x, state::texture_coordinate(VertexColorCoordinateIndex).y, state::texture_coordinate(VertexColorCoordinateIndex+1).x, state::texture_coordinate(VertexColorCoordinateIndex+1).y); +} + +export float3 camera_position() +[[ + anno::description("Camera Position"), + anno::noinline() +]] +{ + return float3(1000.0f, 0, 0); +} + +export float3 rotate_about_axis(float4 NormalizedRotationAxisAndAngle, float3 PositionOnAxis, float3 Position) +[[ + anno::description("Rotates Position about the given axis by the given angle") +]] +{ + // Project Position onto the rotation axis and find the closest point on the axis to Position + float3 NormalizedRotationAxis = float3(NormalizedRotationAxisAndAngle.x,NormalizedRotationAxisAndAngle.y,NormalizedRotationAxisAndAngle.z); + float3 ClosestPointOnAxis = PositionOnAxis + NormalizedRotationAxis * math::dot(NormalizedRotationAxis, Position - PositionOnAxis); + // Construct orthogonal axes in the plane of the rotation + float3 UAxis = Position - ClosestPointOnAxis; + float3 VAxis = math::cross(NormalizedRotationAxis, UAxis); + float[2] SinCosAngle = math::sincos(NormalizedRotationAxisAndAngle.w); + // Rotate using the orthogonal axes + float3 R = UAxis * SinCosAngle[1] + VAxis * SinCosAngle[0]; + // Reconstruct the rotated world space position + float3 RotatedPosition = ClosestPointOnAxis + R; + // Convert from position to a position offset + return RotatedPosition - Position; +} + +export float2 rotate_scale_offset_texcoords(float2 InTexCoords, float4 InRotationScale, float2 InOffset) +[[ + anno::description("Returns a float2 texture coordinate after 2x2 transform and offset applied") +]] +{ + return float2(math::dot(InTexCoords, float2(InRotationScale.x, InRotationScale.y)), math::dot(InTexCoords, float2(InRotationScale.z, InRotationScale.w))) + InOffset; +} + +export float3 reflection_custom_world_normal(float3 WorldNormal, bool bNormalizeInputNormal, uniform bool up_z = true) +[[ + anno::description("Reflection vector about the specified world space normal") +]] +{ + if (bNormalizeInputNormal) + { + WorldNormal = math::normalize(WorldNormal); + } + + return -camera_vector(up_z) + WorldNormal * math::dot(WorldNormal, camera_vector(up_z)) * 2.0; +} + +export float3 reflection_vector(uniform bool up_z = true) +[[ + anno::description("Reflection Vector"), + anno::noinline() +]] +{ + float3 normal = convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); + return reflection_custom_world_normal(normal, false, up_z); +} + +export float dither_temporalAA(float AlphaThreshold = 0.5f, float Random = 1.0f [[anno::unused()]]) +[[ + anno::description("Dither TemporalAA"), + anno::noinline() +]] +{ + return AlphaThreshold; +} + +export float3 black_body( float Temp ) +[[ + anno::description("Black Body"), + anno::noinline() +]] +{ + float u = ( 0.860117757f + 1.54118254e-4f * Temp + 1.28641212e-7f * Temp*Temp ) / ( 1.0f + 8.42420235e-4f * Temp + 7.08145163e-7f * Temp*Temp ); + float v = ( 0.317398726f + 4.22806245e-5f * Temp + 4.20481691e-8f * Temp*Temp ) / ( 1.0f - 2.89741816e-5f * Temp + 1.61456053e-7f * Temp*Temp ); + + float x = 3*u / ( 2*u - 8*v + 4 ); + float y = 2*v / ( 2*u - 8*v + 4 ); + float z = 1 - x - y; + + float Y = 1; + float X = Y/y * x; + float Z = Y/y * z; + + float3x3 XYZtoRGB = float3x3( + float3(3.2404542, -1.5371385, -0.4985314), + float3(-0.9692660, 1.8760108, 0.0415560), + float3(0.0556434, -0.2040259, 1.0572252) + ); + + return XYZtoRGB * float3( X, Y, Z ) * math::pow( 0.0004 * Temp, 4 ); +} + +export float per_instance_random(uniform texture_2d PerlinNoiseGradientTexture, int NumberInstances) +[[ + anno::description("Per Instance Random"), + anno::noinline() +]] +{ + float weight = state::object_id() / float(NumberInstances); + return NumberInstances == 0 ? 0.0 : tex::lookup_float4(PerlinNoiseGradientTexture, float2(weight, 1.0 - weight), tex::wrap_repeat, tex::wrap_repeat).x; +} + +//------------------ Hair from UE4 ----------------------- +float3 hair_absorption_to_color(float3 A) +{ + const float B = 0.3f; + float b2 = B * B; + float b3 = B * b2; + float b4 = b2 * b2; + float b5 = B * b4; + float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5); + return math::exp(-math::sqrt(A) * D); +} + +float3 hair_color_to_absorption(float3 C) +{ + const float B = 0.3f; + float b2 = B * B; + float b3 = B * b2; + float b4 = b2 * b2; + float b5 = B * b4; + float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5); + return math::pow(math::log(C) / D, 2.0f); +} + +export float3 get_hair_color_from_melanin(float InMelanin, float InRedness, float3 InDyeColor) +[[ + anno::description("Hair Color") +]] +{ + InMelanin = math::saturate(InMelanin); + InRedness = math::saturate(InRedness); + float Melanin = -math::log(math::max(1 - InMelanin, 0.0001f)); + float Eumelanin = Melanin * (1 - InRedness); + float Pheomelanin = Melanin * InRedness; + + float3 DyeAbsorption = hair_color_to_absorption(math::saturate(InDyeColor)); + float3 Absorption = Eumelanin * float3(0.506f, 0.841f, 1.653f) + Pheomelanin * float3(0.343f, 0.733f, 1.924f); + + return hair_absorption_to_color(Absorption + DyeAbsorption); +} + +export float3 local_object_bounds_min() +[[ + anno::description("Local Object Bounds Min"), + anno::noinline() +]] +{ + return float3(0.0); +} + +export float3 local_object_bounds_max() +[[ + anno::description("Local Object Bounds Max"), + anno::noinline() +]] +{ + return float3(100.0); +} + +export float3 object_bounds() +[[ + anno::description("Object Bounds"), + anno::noinline() +]] +{ + return float3(100.0); +} + +export float object_radius() +[[ + anno::description("Object Radius"), + anno::noinline() +]] +{ + return 100.0f; +} + +export float3 object_world_position(uniform bool up_z = true) +[[ + anno::description("Object World Position"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z)*state::meters_per_scene_unit()*100.0; +} + +export float3 object_orientation() +[[ + anno::description("Object Orientation"), + anno::noinline() +]] +{ + return float3(0); +} + +export float rcp(float x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float2 rcp(float2 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float3 rcp(float3 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float4 rcp(float4 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export int BitFieldExtractI32(int Data, int Size, int Offset) +[[ + anno::description("BitFieldExtractI32 int"), + anno::noinline() +]] +{ + Size &= 3; + Offset &= 3; + + if (Size == 0) + return 0; + else if (Offset + Size < 32) + return (Data << (32 - Size - Offset)) >> (32 - Size); + else + return Data >> Offset; +} + +export int BitFieldExtractI32(float Data, float Size, float Offset) +[[ + anno::description("BitFieldExtractI32 float"), + anno::noinline() +]] +{ + return BitFieldExtractI32(int(Data), int(Size), int(Offset)); +} + +export int BitFieldExtractU32(float Data, float Size, float Offset) +[[ + anno::description("BitFieldExtractU32 float"), + anno::noinline() +]] +{ + return BitFieldExtractI32(Data, Size, Offset); +} + +export int BitFieldExtractU32(int Data, int Size, int Offset) +[[ + anno::description("BitFieldExtractU32 int"), + anno::noinline() +]] +{ + return BitFieldExtractI32(Data, Size, Offset); +} + +export float3 EyeAdaptationInverseLookup(float3 LightValue, float Alpha) +[[ + anno::description("EyeAdaptationInverseLookup"), + anno::noinline() +]] +{ + float Adaptation = 1.0f; + + // When Alpha=0.0, we want to multiply by 1.0. when Alpha = 1.0, we want to multiply by 1/Adaptation. + // So the lerped value is: + // LerpLogScale = Lerp(log(1),log(1/Adaptaiton),T) + // Which is simplified as: + // LerpLogScale = Lerp(0,-log(Adaptation),T) + // LerpLogScale = -T * logAdaptation; + + float LerpLogScale = -Alpha * math::log(Adaptation); + float Scale = math::exp(LerpLogScale); + return LightValue * Scale; +} diff --git a/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/instance.usda b/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/instance.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_instance" ( + prepend payload = @./instance.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/object_usds/objaverse_usd/4044fb4864184c0fa360bf327a84ee4d.usda b/scene_paint/object_usds/objaverse_usd/4044fb4864184c0fa360bf327a84ee4d.usda new file mode 100644 index 0000000000000000000000000000000000000000..ac1fcd681ad8b344003790d143b33c5c3130678a --- /dev/null +++ b/scene_paint/object_usds/objaverse_usd/4044fb4864184c0fa360bf327a84ee4d.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_4044fb4864184c0fa360bf327a84ee4d" ( + prepend payload = @./4044fb4864184c0fa360bf327a84ee4d.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/object_usds/objaverse_usd/6281bf3703584323bb4d8326f1f1b59d.usda b/scene_paint/object_usds/objaverse_usd/6281bf3703584323bb4d8326f1f1b59d.usda new file mode 100644 index 0000000000000000000000000000000000000000..07c41e25b73f8f8cae7c85cfcb72f0cc5094f984 --- /dev/null +++ b/scene_paint/object_usds/objaverse_usd/6281bf3703584323bb4d8326f1f1b59d.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_6281bf3703584323bb4d8326f1f1b59d" ( + prepend payload = @./6281bf3703584323bb4d8326f1f1b59d.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/object_usds/objaverse_usd/6a9e1ece41cb40efa69dae21e9fe704b.usda b/scene_paint/object_usds/objaverse_usd/6a9e1ece41cb40efa69dae21e9fe704b.usda new file mode 100644 index 0000000000000000000000000000000000000000..2100daf83dd564c12728631c4ae8a50fa9e31101 --- /dev/null +++ b/scene_paint/object_usds/objaverse_usd/6a9e1ece41cb40efa69dae21e9fe704b.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_6a9e1ece41cb40efa69dae21e9fe704b" ( + prepend payload = @./6a9e1ece41cb40efa69dae21e9fe704b.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/object_usds/objaverse_usd/7f24dc2cae76416bae7daeb4cf6db77c.usda b/scene_paint/object_usds/objaverse_usd/7f24dc2cae76416bae7daeb4cf6db77c.usda new file mode 100644 index 0000000000000000000000000000000000000000..12e44bc85f4abb3ac390009828997f81f51c89d9 --- /dev/null +++ b/scene_paint/object_usds/objaverse_usd/7f24dc2cae76416bae7daeb4cf6db77c.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_7f24dc2cae76416bae7daeb4cf6db77c" ( + prepend payload = @./7f24dc2cae76416bae7daeb4cf6db77c.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/object_usds/real2sim_usd/Container/86b6f1422adb44658bcc56dd6f74711e.usda b/scene_paint/object_usds/real2sim_usd/Container/86b6f1422adb44658bcc56dd6f74711e.usda new file mode 100644 index 0000000000000000000000000000000000000000..8da2363e1f747cabbf308ccc700885eef74b8778 --- /dev/null +++ b/scene_paint/object_usds/real2sim_usd/Container/86b6f1422adb44658bcc56dd6f74711e.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_86b6f1422adb44658bcc56dd6f74711e" ( + prepend payload = @./86b6f1422adb44658bcc56dd6f74711e.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/object_usds/real2sim_usd/Container/8ab394f2ed7040f78d653eff07a30c7a.usda b/scene_paint/object_usds/real2sim_usd/Container/8ab394f2ed7040f78d653eff07a30c7a.usda new file mode 100644 index 0000000000000000000000000000000000000000..7ba5c331c86280a13147e6adbf4eaa04e38938ba --- /dev/null +++ b/scene_paint/object_usds/real2sim_usd/Container/8ab394f2ed7040f78d653eff07a30c7a.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_8ab394f2ed7040f78d653eff07a30c7a" ( + prepend payload = @./8ab394f2ed7040f78d653eff07a30c7a.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/object_usds/real2sim_usd/Container/d73771be18d4414ca3cccaa312622cd0.usda b/scene_paint/object_usds/real2sim_usd/Container/d73771be18d4414ca3cccaa312622cd0.usda new file mode 100644 index 0000000000000000000000000000000000000000..0f252e876db45e7c8176363935c51bd2d9d7e64f --- /dev/null +++ b/scene_paint/object_usds/real2sim_usd/Container/d73771be18d4414ca3cccaa312622cd0.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_d73771be18d4414ca3cccaa312622cd0" ( + prepend payload = @./d73771be18d4414ca3cccaa312622cd0.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/scene_paint/paints/.collect.mapping.json b/scene_paint/scene_paint/paints/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..f23343a19842132f4ba04e146daf11f63abc779b --- /dev/null +++ b/scene_paint/scene_paint/paints/.collect.mapping.json @@ -0,0 +1,167 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/8776786ebf594e8f8b163766fa88c8a7_baked_mesh_8016210d_ao0.png", + "source_hash": "ee302e189413a3b4db82d93178a76aa1a0c2f35f", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/8776786ebf594e8f8b163766fa88c8a7_baked_mesh_8016210d_ao0.png", + "target_hash": "ecb8c2e98d4ffd245cbdde22295600ce068d8847" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/8776786ebf594e8f8b163766fa88c8a7_baked_mesh_8016210d_norm0.png", + "source_hash": "02093963310094a5541a182b2a48f0572e2f8704", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/8776786ebf594e8f8b163766fa88c8a7_baked_mesh_8016210d_norm0.png", + "target_hash": "c18f7db410ba656e098ed9feeeb4687ef3297f7e" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/8776786ebf594e8f8b163766fa88c8a7_baked_mesh_8016210d_tex0.png", + "source_hash": "0f3d1fe57ca548f62c6029e339e6db9495507a53", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/8776786ebf594e8f8b163766fa88c8a7_baked_mesh_8016210d_tex0.png", + "target_hash": "0a642b41c70a458d598bf5555a1cbaaa7b044455" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_paint/paints/895c79b70b8c43a096ba9886d67aea90.usd", + "source_hash": "0df8c5b7ac7ff3a7a17729af9ba96de3e2f00d6e", + "target_url": "./895c79b70b8c43a096ba9886d67aea90.usd", + "target_hash": "886e9bc8de383f1aa37f868b0bcf44989a20d75f" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/895c79b70b8c43a096ba9886d67aea90_baked_mesh_9f9caa78_ao0.png", + "source_hash": "aec881149d4ad26d4c56f3dcb662a15e176dd4e6", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/895c79b70b8c43a096ba9886d67aea90_baked_mesh_9f9caa78_ao0.png", + "target_hash": "3b7c2af73d850c9d12f8a0f51a6f0138179bfc38" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/895c79b70b8c43a096ba9886d67aea90_baked_mesh_9f9caa78_norm0.png", + "source_hash": "994e266a55fb7aa136815bc530e53967db9356e9", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/895c79b70b8c43a096ba9886d67aea90_baked_mesh_9f9caa78_norm0.png", + "target_hash": "09d8cbe0a520546e921338c17f3d2255d04e74b6" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/895c79b70b8c43a096ba9886d67aea90_baked_mesh_9f9caa78_tex0.png", + "source_hash": "778c5285142f1896d56db6ca51c6550a959d4fbf", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/895c79b70b8c43a096ba9886d67aea90_baked_mesh_9f9caa78_tex0.png", + "target_hash": "8009cc1f6f7e88068aac70d5800e5064b437d5f8" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_paint/paints/619adeeeb2ba4bdfa281e7c6b902ac63.usd", + "source_hash": "ba2c410f31db66c010d5a5121185fe33e0f0dd05", + "target_url": "./619adeeeb2ba4bdfa281e7c6b902ac63.usd", + "target_hash": "95194eba789a33af1db5594a6c8d4fbf505b34fc" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/619adeeeb2ba4bdfa281e7c6b902ac63_baked_mesh_244706b2_ao0.png", + "source_hash": "1219226869a85b891bd21c4b95149fa24e4985d1", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/619adeeeb2ba4bdfa281e7c6b902ac63_baked_mesh_244706b2_ao0.png", + "target_hash": "3f524226471c3d1f27ec3b15c09fe3656c1c2e69" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/619adeeeb2ba4bdfa281e7c6b902ac63_baked_mesh_244706b2_norm0.png", + "source_hash": "c35655e7bd5a4a5115ea876be48f9a23fac21060", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/619adeeeb2ba4bdfa281e7c6b902ac63_baked_mesh_244706b2_norm0.png", + "target_hash": "6cbad78ff1471a7c1587969a233b2f2a2b7c8387" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/619adeeeb2ba4bdfa281e7c6b902ac63_baked_mesh_244706b2_tex0.png", + "source_hash": "bbbfedfdc8f9759c803ed370b7a21bde78647b41", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/619adeeeb2ba4bdfa281e7c6b902ac63_baked_mesh_244706b2_tex0.png", + "target_hash": "d0720144c53a490e636733a7be0b0ea7b4d33191" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_paint/paints/289e401e0d734f1badbd80aeb3ee952e.usd", + "source_hash": "89843673972c06884d10ce19841873152b900aa8", + "target_url": "./289e401e0d734f1badbd80aeb3ee952e.usd", + "target_hash": "b3e2fb49250241688c77e4825b60a8cb98ffc455" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/289e401e0d734f1badbd80aeb3ee952e_baked_mesh_243981ef_ao0.png", + "source_hash": "e51bd671a01738e408f0dd77f5df57505ef19fa3", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/289e401e0d734f1badbd80aeb3ee952e_baked_mesh_243981ef_ao0.png", + "target_hash": "2e70db04aaeffb95fbec8837834a7328ea682a3f" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/289e401e0d734f1badbd80aeb3ee952e_baked_mesh_243981ef_norm0.png", + "source_hash": "b3e2827c7297aaca2b9217c0400d0fc4d5d9019e", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/289e401e0d734f1badbd80aeb3ee952e_baked_mesh_243981ef_norm0.png", + "target_hash": "dd7740bc4596d1737ac1998d9ac402de9c04e0f0" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/289e401e0d734f1badbd80aeb3ee952e_baked_mesh_243981ef_tex0.png", + "source_hash": "da0a2cc0f1645d2cd9753bccf20d04f3bebe7c3c", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/289e401e0d734f1badbd80aeb3ee952e_baked_mesh_243981ef_tex0.png", + "target_hash": "db5a2becd86182a156996db6812d5643c845697e" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_paint/paints/a0772f8aa40f4dea806e5c870c87cebc.usd", + "source_hash": "ae58138509e89a074cbdf9b119b0e99bce641555", + "target_url": "./a0772f8aa40f4dea806e5c870c87cebc.usd", + "target_hash": "d98557463d90d19b4e2519cd3b6471507f087759" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/a0772f8aa40f4dea806e5c870c87cebc_baked_mesh_14e255bb_ao0.png", + "source_hash": "0ef261d082e687328a0013099e195ba15986072a", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/a0772f8aa40f4dea806e5c870c87cebc_baked_mesh_14e255bb_ao0.png", + "target_hash": "e2b4d0ecf7dddc7c31e6509a2400845473fa7e32" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/a0772f8aa40f4dea806e5c870c87cebc_baked_mesh_14e255bb_norm0.png", + "source_hash": "7b3e4047994225aca6e66d55936451e5b5f69794", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/a0772f8aa40f4dea806e5c870c87cebc_baked_mesh_14e255bb_norm0.png", + "target_hash": "e1f2740115e10dc6f94f74629f7044cdc95307b4" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/a0772f8aa40f4dea806e5c870c87cebc_baked_mesh_14e255bb_tex0.png", + "source_hash": "471e814308cddfd12b0c349b6c7f349859221269", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/a0772f8aa40f4dea806e5c870c87cebc_baked_mesh_14e255bb_tex0.png", + "target_hash": "88399c511ed4aaf59e0303c36bc154dd8c16e1e3" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_paint/paints/6f506ec337504f0dba27b31ee84bc577.usd", + "source_hash": "764dbd24b2d1748a4c5d60a7cb974355133ad67b", + "target_url": "./6f506ec337504f0dba27b31ee84bc577.usd", + "target_hash": "b1ebff9bedd5f6bb14765c36d6a437254d0997b1" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/6f506ec337504f0dba27b31ee84bc577_baked_mesh_b98d2a74_ao0.png", + "source_hash": "254006cbc8c14289e79b58674ca461d250dbf23f", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/6f506ec337504f0dba27b31ee84bc577_baked_mesh_b98d2a74_ao0.png", + "target_hash": "f281e83dc093303b07e96ced1910fc4d00189608" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/6f506ec337504f0dba27b31ee84bc577_baked_mesh_b98d2a74_norm0.png", + "source_hash": "8c61e9e291629094a081cc292341b3c8dcd51cdc", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/6f506ec337504f0dba27b31ee84bc577_baked_mesh_b98d2a74_norm0.png", + "target_hash": "1b7369c31de935a16034aace1d08a2b2bd9c23d0" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/6f506ec337504f0dba27b31ee84bc577_baked_mesh_b98d2a74_tex0.png", + "source_hash": "979a7ea0721310bdf0074e974da62a262ac5507f", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/6f506ec337504f0dba27b31ee84bc577_baked_mesh_b98d2a74_tex0.png", + "target_hash": "b7b43deccb18e81d84335eb3613d734db13fc5ce" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/scene_usds/merged_usds/scene_paint/paints/f282725f35c1462db807ee323c0508e3.usd", + "source_hash": "7a43f173195732c9e242a7dc7a364081d5ec9196", + "target_url": "./f282725f35c1462db807ee323c0508e3.usd", + "target_hash": "a49ed1ee88267a737d4b7f1117c5a835b0488e6e" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/f282725f35c1462db807ee323c0508e3_baked_mesh_1dfa6978_ao0.png", + "source_hash": "d985429b4838a434c0f3c2c014078d0e091538cb", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/f282725f35c1462db807ee323c0508e3_baked_mesh_1dfa6978_ao0.png", + "target_hash": "2ff413ee4703a417ecb5f48fd8a55923bf27df9b" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/f282725f35c1462db807ee323c0508e3_baked_mesh_1dfa6978_norm0.png", + "source_hash": "6ab471ab23a6157435b70af19207ce050ba0643a", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/f282725f35c1462db807ee323c0508e3_baked_mesh_1dfa6978_norm0.png", + "target_hash": "4607cefceb8403e1ee933070fe0e066691ca0d27" + }, + { + "source_url": "/home/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/f282725f35c1462db807ee323c0508e3_baked_mesh_1dfa6978_tex0.png", + "source_hash": "01c1be8889095ff5f1a66943756bd74d250ea510", + "target_url": "./saved/assets/scene_usds/IROS_scenes_collected/scene_paint/paints/0/f282725f35c1462db807ee323c0508e3_baked_mesh_1dfa6978_tex0.png", + "target_hash": "ec307fd202b7aa92bf02bb73a690aeb6fe4bd1ef" + } + ] +} \ No newline at end of file diff --git a/scene_paint/scene_paint/paints/289e401e0d734f1badbd80aeb3ee952e.usda b/scene_paint/scene_paint/paints/289e401e0d734f1badbd80aeb3ee952e.usda new file mode 100644 index 0000000000000000000000000000000000000000..27eecd523d6173da732d4445065e5d213e2a4cd9 --- /dev/null +++ b/scene_paint/scene_paint/paints/289e401e0d734f1badbd80aeb3ee952e.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_289e401e0d734f1badbd80aeb3ee952e" ( + prepend payload = @./289e401e0d734f1badbd80aeb3ee952e.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/scene_paint/paints/619adeeeb2ba4bdfa281e7c6b902ac63.usda b/scene_paint/scene_paint/paints/619adeeeb2ba4bdfa281e7c6b902ac63.usda new file mode 100644 index 0000000000000000000000000000000000000000..6af5a2e387a8d3c6d1d94dad3b5591cc7cd44da1 --- /dev/null +++ b/scene_paint/scene_paint/paints/619adeeeb2ba4bdfa281e7c6b902ac63.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_619adeeeb2ba4bdfa281e7c6b902ac63" ( + prepend payload = @./619adeeeb2ba4bdfa281e7c6b902ac63.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/scene_paint/paints/6f506ec337504f0dba27b31ee84bc577.usda b/scene_paint/scene_paint/paints/6f506ec337504f0dba27b31ee84bc577.usda new file mode 100644 index 0000000000000000000000000000000000000000..9e97ed09e6f633db3de64325bdbbdcd46b6a7bae --- /dev/null +++ b/scene_paint/scene_paint/paints/6f506ec337504f0dba27b31ee84bc577.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_6f506ec337504f0dba27b31ee84bc577" ( + prepend payload = @./6f506ec337504f0dba27b31ee84bc577.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/scene_paint/paints/8776786ebf594e8f8b163766fa88c8a7.usda b/scene_paint/scene_paint/paints/8776786ebf594e8f8b163766fa88c8a7.usda new file mode 100644 index 0000000000000000000000000000000000000000..1401f740deaa37a0f0a332c02ec11bae6ceb452c --- /dev/null +++ b/scene_paint/scene_paint/paints/8776786ebf594e8f8b163766fa88c8a7.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_8776786ebf594e8f8b163766fa88c8a7" ( + prepend payload = @./8776786ebf594e8f8b163766fa88c8a7.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/scene_paint/paints/895c79b70b8c43a096ba9886d67aea90.usda b/scene_paint/scene_paint/paints/895c79b70b8c43a096ba9886d67aea90.usda new file mode 100644 index 0000000000000000000000000000000000000000..8857e60310fcd1bd5da5333bec3e2bcb4bff0ced --- /dev/null +++ b/scene_paint/scene_paint/paints/895c79b70b8c43a096ba9886d67aea90.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_895c79b70b8c43a096ba9886d67aea90" ( + prepend payload = @./895c79b70b8c43a096ba9886d67aea90.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/scene_paint/paints/a0772f8aa40f4dea806e5c870c87cebc.usda b/scene_paint/scene_paint/paints/a0772f8aa40f4dea806e5c870c87cebc.usda new file mode 100644 index 0000000000000000000000000000000000000000..11e8ad2015ac5324dbdc12c66bcf91e6c0534f85 --- /dev/null +++ b/scene_paint/scene_paint/paints/a0772f8aa40f4dea806e5c870c87cebc.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_a0772f8aa40f4dea806e5c870c87cebc" ( + prepend payload = @./a0772f8aa40f4dea806e5c870c87cebc.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/scene_paint/paints/f282725f35c1462db807ee323c0508e3.usda b/scene_paint/scene_paint/paints/f282725f35c1462db807ee323c0508e3.usda new file mode 100644 index 0000000000000000000000000000000000000000..d9cec85a82cf776c9a7b4216aaa0196ee9dd3181 --- /dev/null +++ b/scene_paint/scene_paint/paints/f282725f35c1462db807ee323c0508e3.usda @@ -0,0 +1,78 @@ +#usda 1.0 +( + customLayerData = { + dictionary omni_layer = { + dictionary locked = { + } + dictionary muteness = { + } + } + dictionary renderSettings = { + float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0) + float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75) + float3 "rtx:index:backgroundColor" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMax" = (0, 0, 0) + float3 "rtx:index:regionOfInterestMin" = (0, 0, 0) + float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0) + float3 "rtx:post:colorcorr:contrast" = (1, 1, 1) + float3 "rtx:post:colorcorr:gain" = (1, 1, 1) + float3 "rtx:post:colorcorr:gamma" = (1, 1, 1) + float3 "rtx:post:colorcorr:offset" = (0, 0, 0) + float3 "rtx:post:colorcorr:saturation" = (1, 1, 1) + float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0) + float3 "rtx:post:colorgrad:contrast" = (1, 1, 1) + float3 "rtx:post:colorgrad:gain" = (1, 1, 1) + float3 "rtx:post:colorgrad:gamma" = (1, 1, 1) + float3 "rtx:post:colorgrad:lift" = (0, 0, 0) + float3 "rtx:post:colorgrad:multiply" = (1, 1, 1) + float3 "rtx:post:colorgrad:offset" = (0, 0, 0) + float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1) + float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50) + float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500) + float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10) + float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2) + float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10) + float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75) + float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50) + float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1) + float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32) + float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9) + float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5) + float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1) + double "rtx:translucency:worldEps" = 0.005 + } + } + defaultPrim = "World" + endTimeCode = 1000000 + metersPerUnit = 1.0 + startTimeCode = 0 + timeCodesPerSecond = 60 + upAxis = "Z" +) + +over "Render" ( + hide_in_stage_window = true +) +{ +} + +def Xform "World" +{ + def "_f282725f35c1462db807ee323c0508e3" ( + prepend payload = @./f282725f35c1462db807ee323c0508e3.usd@ + ) + { + float3 xformOp:rotateXYZ = (0, 0, 0) + float3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + } +} + +def Xform "Environment" +{ + double3 xformOp:rotateXYZ = (0, 0, 0) + double3 xformOp:scale = (1, 1, 1) + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] +} diff --git a/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Num604604837fdaa40001bb718c.mdl b/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Num604604837fdaa40001bb718c.mdl new file mode 100644 index 0000000000000000000000000000000000000000..03da8ecd7abaf7cc3b4782ee6316fda03541c7ef --- /dev/null +++ b/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Num604604837fdaa40001bb718c.mdl @@ -0,0 +1,284 @@ +mdl 1.6; + +import ::math::*; +import ::state::*; +import ::tex::*; +import ::anno::*; +using OmniUe4Function import *; +using OmniUe4Base import *; + +export annotation sampler_color(); +export annotation sampler_normal(); +export annotation sampler_grayscale(); +export annotation sampler_alpha(); +export annotation sampler_masks(); +export annotation sampler_distancefield(); +export annotation dither_masked_off(); +export annotation world_space_normal(); + +export material Num604604837fdaa40001bb718c( + uniform texture_2d Normal_Tex = texture_2d("./Textures/normal.png",::tex::gamma_linear) + [[ + anno::display_name("Normal_Tex"), + anno::ui_order(32), + anno::in_group("Normal"), + sampler_normal() + ]], + float4 Normal_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Normal_UVA"), + anno::ui_order(32), + anno::in_group("Normal") + ]], + float EmissiveIntensity = 0.0 + [[ + anno::display_name("EmissiveIntensity"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + float IsEmissiveTex = 0.0 + [[ + anno::display_name("IsEmissiveTex"), + anno::in_group("EmissiveColor") + ]], + float4 Emissive_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("Emissive_Color"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + uniform texture_2d Emissive_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Emissive_Tex"), + anno::ui_order(32), + anno::in_group("EmissiveColor"), + sampler_color() + ]], + float4 Emissive_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Emissive_UVA"), + anno::ui_order(32), + anno::in_group("EmissiveColor") + ]], + float IsBaseColorTex = 0.0 + [[ + anno::display_name("IsBaseColorTex"), + anno::in_group("BaseColor") + ]], + float4 BaseColor_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("BaseColor_Color"), + anno::ui_order(32), + anno::in_group("BaseColor") + ]], + uniform texture_2d BaseColor_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("BaseColor_Tex"), + anno::ui_order(32), + anno::in_group("BaseColor"), + sampler_color() + ]], + float4 BaseColor_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("BaseColor_UVA"), + anno::ui_order(32), + anno::in_group("BaseColor") + ]], + float IsMetallicTex = 0.0 + [[ + anno::display_name("IsMetallicTex"), + anno::in_group("Metallic") + ]], + float4 Metallic_Color = float4(0.0,0.0,0.0,1.0) + [[ + anno::display_name("Metallic_Color"), + anno::ui_order(32), + anno::in_group("Metallic") + ]], + uniform texture_2d Metallic_Tex = texture_2d("./Textures/black.png",::tex::gamma_srgb) + [[ + anno::display_name("Metallic_Tex"), + anno::ui_order(32), + anno::in_group("Metallic"), + sampler_color() + ]], + float4 Metallic_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Metallic_UVA"), + anno::ui_order(32), + anno::in_group("Metallic") + ]], + float IsSpecularTex = 0.0 + [[ + anno::display_name("IsSpecularTex"), + anno::in_group("Specular") + ]], + float4 Specular_Color = float4(1.0,1.0,1.0,1.0) + [[ + anno::display_name("Specular_Color"), + anno::ui_order(32), + anno::in_group("Specular") + ]], + uniform texture_2d Specular_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Specular_Tex"), + anno::ui_order(32), + anno::in_group("Specular"), + sampler_color() + ]], + float4 Specular_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Specular_UVA"), + anno::ui_order(32), + anno::in_group("Specular") + ]], + float IsGlossTex = 0.0 + [[ + anno::display_name("IsGlossTex"), + anno::in_group("Roughness") + ]], + float4 Gloss_Color = float4(0.1,0.1,0.1,1.0) + [[ + anno::display_name("Gloss_Color"), + anno::ui_order(32), + anno::in_group("Roughness") + ]], + uniform texture_2d Gloss_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb) + [[ + anno::display_name("Gloss_Tex"), + anno::ui_order(32), + anno::in_group("Roughness"), + sampler_color() + ]], + float4 Gloss_UVA = float4(1.0,1.0,0.0,0.0) + [[ + anno::display_name("Gloss_UVA"), + anno::ui_order(32), + anno::in_group("Roughness") + ]], + float PolygonOffset = 0.0 + [[ + anno::display_name("PolygonOffset"), + anno::ui_order(32), + anno::in_group("WorldPosition") + ]], + int MaxTexCoordIndex = 3 + [[ + anno::hidden() + ]]) + = + let { + float3 Local82 = ::camera_position(); + float3 Local83 = (Local82 - (::convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), true)*state::meters_per_scene_unit()*100.0)); + float Local84 = math::dot(Local83, Local83); + float Local85 = math::sqrt(Local84); + float3 Local86 = (Local83 / Local85); + float3 Local87 = (Local86 * PolygonOffset); + + float3 WorldPositionOffset_mdl = Local87; + float2 CustomizedUV0_mdl = float2(state::texture_coordinate(math::min(0,MaxTexCoordIndex)).x,1.0-state::texture_coordinate(math::min(0,MaxTexCoordIndex)).y); + + float2 Local0 = (float2(0.5,0.5) * -1.0); + float Local1 = (CustomizedUV0_mdl.x * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).x); + float Local2 = (CustomizedUV0_mdl.y * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).y); + float2 Local3 = (Local0 + float2(Local1,Local2)); + float Local4 = (3.141592 * -2.0); + float Local5 = (float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).z / Local4); + float Local6 = (Local5 * 6.283185); + float Local7 = math::cos(Local6); + float Local8 = math::sin(Local6); + float Local9 = (Local8 * -1.0); + float Local10 = math::dot(Local3, float2(Local7,Local9)); + float Local11 = math::dot(Local3, float2(Local8,Local7)); + float2 Local12 = (float2(0.5,0.5) + float2(Local10,Local11)); + float4 Local13 = ::unpack_normal_map(tex::lookup_float4(Normal_Tex,float2(Local12.x,1.0-Local12.y),tex::wrap_repeat,tex::wrap_repeat)); + float3 Local14 = ((math::abs(1.0 - 1.0) > 0.00001) ? (float3(0.0,0.0,0.0)) : float3(Local13.x,Local13.y,Local13.z)); + + float3 Normal_mdl = Local14; + + float Local15 = (CustomizedUV0_mdl.x * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).x); + float Local16 = (CustomizedUV0_mdl.y * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).y); + float2 Local17 = (Local0 + float2(Local15,Local16)); + float Local18 = (float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).z / Local4); + float Local19 = (Local18 * 6.283185); + float Local20 = math::cos(Local19); + float Local21 = math::sin(Local19); + float Local22 = (Local21 * -1.0); + float Local23 = math::dot(Local17, float2(Local20,Local22)); + float Local24 = math::dot(Local17, float2(Local21,Local20)); + float2 Local25 = (float2(0.5,0.5) + float2(Local23,Local24)); + float4 Local26 = tex::lookup_float4(Emissive_Tex,float2(Local25.x,1.0-Local25.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local27 = ((math::abs(IsEmissiveTex - 1.0) > 0.00001) ? (float3(Emissive_Color.x,Emissive_Color.y,Emissive_Color.z)) : float3(Local26.x,Local26.y,Local26.z)); + float3 Local28 = (EmissiveIntensity * Local27); + float Local29 = (CustomizedUV0_mdl.x * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).x); + float Local30 = (CustomizedUV0_mdl.y * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).y); + float2 Local31 = (Local0 + float2(Local29,Local30)); + float Local32 = (float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).z / Local4); + float Local33 = (Local32 * 6.283185); + float Local34 = math::cos(Local33); + float Local35 = math::sin(Local33); + float Local36 = (Local35 * -1.0); + float Local37 = math::dot(Local31, float2(Local34,Local36)); + float Local38 = math::dot(Local31, float2(Local35,Local34)); + float2 Local39 = (float2(0.5,0.5) + float2(Local37,Local38)); + float4 Local40 = tex::lookup_float4(BaseColor_Tex,float2(Local39.x,1.0-Local39.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local41 = ((math::abs(IsBaseColorTex - 1.0) > 0.00001) ? (float3(BaseColor_Color.x,BaseColor_Color.y,BaseColor_Color.z)) : float3(Local40.x,Local40.y,Local40.z)); + float Local42 = (CustomizedUV0_mdl.x * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).x); + float Local43 = (CustomizedUV0_mdl.y * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).y); + float2 Local44 = (Local0 + float2(Local42,Local43)); + float Local45 = (float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).z / Local4); + float Local46 = (Local45 * 6.283185); + float Local47 = math::cos(Local46); + float Local48 = math::sin(Local46); + float Local49 = (Local48 * -1.0); + float Local50 = math::dot(Local44, float2(Local47,Local49)); + float Local51 = math::dot(Local44, float2(Local48,Local47)); + float2 Local52 = (float2(0.5,0.5) + float2(Local50,Local51)); + float4 Local53 = tex::lookup_float4(Metallic_Tex,float2(Local52.x,1.0-Local52.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local54 = ((math::abs(IsMetallicTex - 1.0) > 0.00001) ? (float3(Metallic_Color.x,Metallic_Color.y,Metallic_Color.z)) : float3(Local53.x,Local53.y,Local53.z)); + float Local55 = (CustomizedUV0_mdl.x * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).x); + float Local56 = (CustomizedUV0_mdl.y * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).y); + float2 Local57 = (Local0 + float2(Local55,Local56)); + float Local58 = (float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).z / Local4); + float Local59 = (Local58 * 6.283185); + float Local60 = math::cos(Local59); + float Local61 = math::sin(Local59); + float Local62 = (Local61 * -1.0); + float Local63 = math::dot(Local57, float2(Local60,Local62)); + float Local64 = math::dot(Local57, float2(Local61,Local60)); + float2 Local65 = (float2(0.5,0.5) + float2(Local63,Local64)); + float4 Local66 = tex::lookup_float4(Specular_Tex,float2(Local65.x,1.0-Local65.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local67 = ((math::abs(IsSpecularTex - 1.0) > 0.00001) ? (float3(Specular_Color.x,Specular_Color.y,Specular_Color.z)) : float3(Local66.x,Local66.y,Local66.z)); + float Local68 = (CustomizedUV0_mdl.x * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).x); + float Local69 = (CustomizedUV0_mdl.y * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).y); + float2 Local70 = (Local0 + float2(Local68,Local69)); + float Local71 = (float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).z / Local4); + float Local72 = (Local71 * 6.283185); + float Local73 = math::cos(Local72); + float Local74 = math::sin(Local72); + float Local75 = (Local74 * -1.0); + float Local76 = math::dot(Local70, float2(Local73,Local75)); + float Local77 = math::dot(Local70, float2(Local74,Local73)); + float2 Local78 = (float2(0.5,0.5) + float2(Local76,Local77)); + float4 Local79 = tex::lookup_float4(Gloss_Tex,float2(Local78.x,1.0-Local78.y),tex::wrap_repeat,tex::wrap_repeat); + float3 Local80 = ((math::abs(IsGlossTex - 1.0) > 0.00001) ? (float3(Gloss_Color.x,Gloss_Color.y,Gloss_Color.z)) : float3(Local79.x,Local79.y,Local79.z)); + float3 Local81 = (1.0 - Local80); + + float3 EmissiveColor_mdl = Local28; + float OpacityMask_mdl = 1.0; + float3 BaseColor_mdl = Local41; + float Metallic_mdl = Local54.x; + float Specular_mdl = Local67.x; + float Roughness_mdl = Local81.x; + + } in + ::OmniUe4Base( + base_color: BaseColor_mdl, + metallic: Metallic_mdl, + roughness: Roughness_mdl, + specular: Specular_mdl, + normal: Normal_mdl, + opacity: OpacityMask_mdl, + emissive_color: EmissiveColor_mdl, + displacement: WorldPositionOffset_mdl, + two_sided: false); diff --git a/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Base.mdl b/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Base.mdl @@ -0,0 +1,224 @@ +/*************************************************************************************************** + * Copyright 2020 NVIDIA Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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. + **************************************************************************************************/ + +//* 1.0.0 - first version +//* 1.0.1 - merge unlit template +//* 1.0.2 - Fix EDF in the back side: the EDF contained in surface is only used for the front side and not for the back side +//* 1.0.3 - UE4 normal mapping: Geometry normal shouldn't be changed +//* 1.0.4 - using absolute import paths when importing standard modules + +mdl 1.3; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::tex::*; +import ::anno::*; + +float emissive_multiplier() +[[ + anno::description("the multiplier to convert UE4 emissive to raw data"), + anno::noinline() +]] +{ + return 20.0f * 128.0f; +} + +float3 tangent_space_normal( + float3 normal = float3(0.0,0.0,1.0), + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0) +) +[[ + anno::description("Interprets the vector in tangent space"), + anno::noinline() +]] +{ + return math::normalize( + tangent_u * normal.x - /* flip_tangent_v */ + tangent_v * normal.y + + state::normal() * (normal.z)); +} + +float3 world_space_normal( + float3 normal = float3(0.0,0.0,1.0), + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0) +) +[[ + anno::description("Interprets the vector in world space"), + anno::noinline() +]] +{ + return tangent_space_normal( + math::normalize( + normal.x * float3(tangent_u.x, tangent_v.x, state::normal().x) - + normal.y * float3(tangent_u.y, tangent_v.y, state::normal().y) + + normal.z * float3(tangent_u.z, tangent_v.z, state::normal().z)), + tangent_u, + tangent_v + ); +} + +export material OmniUe4Base( + float3 base_color = float3(0.0, 0.0, 0.0), + float metallic = 0.0, + float roughness = 0.5, + float specular = 0.5, + float3 normal = float3(0.0,0.0,1.0), + float clearcoat_weight = 0.0, + float clearcoat_roughness = 0.0, + float3 clearcoat_normal = float3(0.0,0.0,1.0), + uniform bool enable_opacity = true, + float opacity = 1.0, + float3 emissive_color = float3(0.0, 0.0, 0.0), + float3 displacement = float3(0.0), + uniform bool is_tangent_space_normal = true, + uniform bool two_sided = false, + uniform bool is_unlit = false +) +[[ + anno::display_name("Omni UE4 Base"), + anno::description("Omni UE4 Base, supports UE4 default lit and clearcoat shading model"), + anno::version( 1, 0, 0), + anno::author("NVIDIA CORPORATION"), + anno::key_words(string[]("omni", "UE4", "omniverse", "lit", "clearcoat", "generic")) +]] + = let { + color final_base_color = math::saturate(base_color); + float final_metallic = math::saturate(metallic); + float final_roughness = math::saturate(roughness); + float final_specular = math::saturate(specular); + color final_emissive_color = math::max(emissive_color, 0.0f) * emissive_multiplier(); /*factor for converting ue4 emissive to raw value*/ + float final_clearcoat_weight = math::saturate(clearcoat_weight); + float final_clearcoat_roughness = math::saturate(clearcoat_roughness); + float3 final_normal = math::normalize(normal); + float3 final_clearcoat_normal = math::normalize(clearcoat_normal); + + // - compute final roughness by squaring the "roughness" parameter + float alpha = final_roughness * final_roughness; + // reduce the reflectivity at grazing angles to avoid "dark edges" for high roughness due to the layering + float grazing_refl = math::max((1.0 - final_roughness), 0.0); + + float3 the_normal = is_unlit ? state::normal() : + (is_tangent_space_normal ? + tangent_space_normal( + normal: final_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ) : world_space_normal( + normal: final_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + )); + + // for the dielectric component we layer the glossy component on top of the diffuse one, + // the glossy layer has no color tint + + bsdf dielectric_component = df::custom_curve_layer( + weight: final_specular, + normal_reflectivity: 0.08, + grazing_reflectivity: grazing_refl, + layer: df::microfacet_ggx_smith_bsdf(roughness_u: alpha), + base: df::diffuse_reflection_bsdf(tint: final_base_color), + normal: the_normal); + + // the metallic component doesn't have a diffuse component, it's only glossy + // base_color is applied to tint it + bsdf metallic_component = df::microfacet_ggx_smith_bsdf(tint: final_base_color, roughness_u: alpha); + + // final BSDF is a linear blend between dielectric and metallic component + bsdf dielectric_metal_mix = + df::normalized_mix( + components: + df::bsdf_component[]( + df::bsdf_component( + component: metallic_component, + weight: final_metallic), + df::bsdf_component( + component: dielectric_component, + weight: 1.0-final_metallic) + ) + ); + + // clearcoat layer + float clearcoat_grazing_refl = math::max((1.0 - final_clearcoat_roughness), 0.0); + float clearcoat_alpha = final_clearcoat_roughness * final_clearcoat_roughness; + + float3 the_clearcoat_normal = is_tangent_space_normal ? tangent_space_normal( + normal: final_clearcoat_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ) : world_space_normal( + normal: final_clearcoat_normal, + tangent_u: state::texture_tangent_u(0), + tangent_v: state::texture_tangent_v(0) + ); + + + bsdf clearcoat = + df::custom_curve_layer( + base: df::weighted_layer( + layer: dielectric_metal_mix, + weight: 1.0, + normal: final_clearcoat_weight == 0.0 ? state::normal() : the_normal + ), + layer: df::microfacet_ggx_smith_bsdf( + roughness_u: clearcoat_alpha, + tint: color(1.0) + ), + normal_reflectivity: 0.04, + grazing_reflectivity: clearcoat_grazing_refl, + normal: the_clearcoat_normal, + weight: final_clearcoat_weight + ); + bsdf surface = is_unlit ? bsdf() : clearcoat; +} +in material( + thin_walled: two_sided, // Graphene? + surface: material_surface( + scattering: surface, + emission: + material_emission ( + emission: df::diffuse_edf (), + intensity: final_emissive_color + ) + ), + backface: material_surface( + emission: + material_emission ( + emission: df::diffuse_edf (), + intensity: final_emissive_color + ) + ), + geometry: material_geometry( + displacement: displacement, + normal: final_clearcoat_weight == 0.0 ? the_normal : state::normal(), + cutout_opacity: enable_opacity ? opacity : 1.0 + ) +); diff --git a/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Function.mdl b/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Function.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f0801afff6f0870ea2574c9e9b6e2043e79e9a79 --- /dev/null +++ b/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Function.mdl @@ -0,0 +1,1413 @@ +/*************************************************************************************************** + * Copyright 2020 NVIDIA Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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. + **************************************************************************************************/ + +//* 1.0.1 - using absolute import paths when importing standard modules + +mdl 1.6; + +import ::df::*; +import ::state::*; +import ::math::*; +import ::tex::*; +import ::anno::*; + + +export float3 convert_to_left_hand(float3 vec3, uniform bool up_z = true, uniform bool is_position = true) +[[ + anno::description("convert from RH to LH"), + anno::noinline() +]] +{ + float4x4 ZupConversion = float4x4( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + float4x4 YupConversion = float4x4( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + float4 vec4 = float4(vec3.x, vec3.y, vec3.z, is_position ? 1.0f : 0.0f); + + vec4 = vec4 * (up_z ? ZupConversion : YupConversion); + + return float3(vec4.x, vec4.y, vec4.z); +} + +export float3 transform_vector_from_tangent_to_world(float3 vector, + uniform bool up_z = true, + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0)) +[[ + anno::description("Transform vector from tangent space to world space"), + anno::noinline() +]] +{ + /* flip_tangent_v */ + return convert_to_left_hand( + tangent_u * vector.x - tangent_v * vector.y + state::normal() * vector.z, + up_z, false); +} + +export float3 transform_vector_from_world_to_tangent(float3 vector, + uniform bool up_z = true, + float3 tangent_u = state::texture_tangent_u(0), + float3 tangent_v = state::texture_tangent_v(0)) +[[ + anno::description("Transform vector from world space to tangent space"), + anno::noinline() +]] +{ + float3 vecRH = convert_to_left_hand(vector, up_z, false); + /* flip_tangent_v */ + return vecRH.x * float3(tangent_u.x, -tangent_v.x, state::normal().x) + + vecRH.y * float3(tangent_u.y, -tangent_v.y, state::normal().y) + + vecRH.z * float3(tangent_u.z, -tangent_v.z, state::normal().z); +} + +export float4 unpack_normal_map( + float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0) + ) +[[ + anno::description("Unpack a normal stored in a normal map"), + anno::noinline() +]] +{ + float2 normal_xy = float2(texture_sample.x, texture_sample.y); + + normal_xy = normal_xy * float2(2.0,2.0) - float2(1.0,1.0); + float normal_z = math::sqrt( math::saturate( 1.0 - math::dot( normal_xy, normal_xy ) ) ); + return float4( normal_xy.x, normal_xy.y, normal_z, 1.0 ); +} + +// for get color value from normal. +export float4 pack_normal_map( + float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0) + ) +[[ + anno::description("Pack to color from a normal") +]] +{ + float2 return_xy = float2(texture_sample.x, texture_sample.y); + + return_xy = (return_xy + float2(1.0,1.0)) / float2(2.0,2.0); + + return float4( return_xy.x, return_xy.y, 0.0, 1.0 ); +} + +export float4 greyscale_texture_lookup( + float4 texture_sample = float4(0.0, 0.0, 0.0, 1.0) + ) +[[ + anno::description("Sampling a greyscale texture"), + anno::noinline() +]] +{ + return float4(texture_sample.x, texture_sample.x, texture_sample.x, texture_sample.x); +} + +export float3 pixel_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Pixel normal in world space"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); +} + +export float3 vertex_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Vertex normal in world space"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); +} + +export float3 landscape_normal_world_space(uniform bool up_z = true) +[[ + anno::description("Landscape normal in world space") +]] +{ + float3 normalFromNormalmap = math::floor((::vertex_normal_world_space(up_z) * 0.5 + 0.5) * 255.0) / 255.0 * 2.0 - 1.0; + + float2 normalXY = float2(normalFromNormalmap.x, normalFromNormalmap.y); + return float3(normalXY.x, normalXY.y, math::sqrt(math::saturate(1.0 - math::dot(normalXY, normalXY)))); +} + +// Different implementation specific between mdl and hlsl for smoothstep +export float smoothstep(float a, float b, float l) +{ + if (a < b) + { + return math::smoothstep(a, b, l); + } + else if (a > b) + { + return 1.0 - math::smoothstep(b, a, l); + } + else + { + return l <= a ? 0.0 : 1.0; + } +} + +export float2 smoothstep(float2 a, float2 b, float2 l) +{ + return float2(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y)); +} + +export float3 smoothstep(float3 a, float3 b, float3 l) +{ + return float3(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z)); +} + +export float4 smoothstep(float4 a, float4 b, float4 l) +{ + return float4(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z), smoothstep(a.w, b.w, l.w)); +} + +export float2 smoothstep(float2 a, float2 b, float l) +{ + return float2(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l)); +} + +export float3 smoothstep(float3 a, float3 b, float l) +{ + return float3(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l)); +} + +export float4 smoothstep(float4 a, float4 b, float l) +{ + return float4(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l), smoothstep(a.w, b.w, l)); +} + +export float2 smoothstep(float a, float b, float2 l) +{ + return float2(smoothstep(a, b, l.x), smoothstep(a, b, l.y)); +} + +export float3 smoothstep(float a, float b, float3 l) +{ + return float3(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z)); +} + +export float4 smoothstep(float a, float b, float4 l) +{ + return float4(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z), smoothstep(a, b, l.w)); +} + +//------------------ Random from UE4 ----------------------- +float length2(float3 v) +{ + return math::dot(v, v); +} + +float3 GetPerlinNoiseGradientTextureAt(uniform texture_2d PerlinNoiseGradientTexture, float3 v) +{ + const float2 ZShear = float2(17.0f, 89.0f); + + float2 OffsetA = v.z * ZShear; + float2 TexA = (float2(v.x, v.y) + OffsetA + 0.5f) / 128.0f; + float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA.x,1.0-TexA.y),tex::wrap_repeat,tex::wrap_repeat); + return float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z) * 2.0 - 1.0; +} + +float3 SkewSimplex(float3 In) +{ + return In + math::dot(In, float3(1.0 / 3.0f) ); +} +float3 UnSkewSimplex(float3 In) +{ + return In - math::dot(In, float3(1.0 / 6.0f) ); +} + +// 3D random number generator inspired by PCGs (permuted congruential generator) +// Using a **simple** Feistel cipher in place of the usual xor shift permutation step +// @param v = 3D integer coordinate +// @return three elements w/ 16 random bits each (0-0xffff). +// ~8 ALU operations for result.x (7 mad, 1 >>) +// ~10 ALU operations for result.xy (8 mad, 2 >>) +// ~12 ALU operations for result.xyz (9 mad, 3 >>) + +//TODO: uint3 +int3 Rand3DPCG16(int3 p) +{ + // taking a signed int then reinterpreting as unsigned gives good behavior for negatives + //TODO: uint3 + int3 v = int3(p); + + // Linear congruential step. These LCG constants are from Numerical Recipies + // For additional #'s, PCG would do multiple LCG steps and scramble each on output + // So v here is the RNG state + v = v * 1664525 + 1013904223; + + // PCG uses xorshift for the final shuffle, but it is expensive (and cheap + // versions of xorshift have visible artifacts). Instead, use simple MAD Feistel steps + // + // Feistel ciphers divide the state into separate parts (usually by bits) + // then apply a series of permutation steps one part at a time. The permutations + // use a reversible operation (usually ^) to part being updated with the result of + // a permutation function on the other parts and the key. + // + // In this case, I'm using v.x, v.y and v.z as the parts, using + instead of ^ for + // the combination function, and just multiplying the other two parts (no key) for + // the permutation function. + // + // That gives a simple mad per round. + v.x += v.y*v.z; + v.y += v.z*v.x; + v.z += v.x*v.y; + v.x += v.y*v.z; + v.y += v.z*v.x; + v.z += v.x*v.y; + + // only top 16 bits are well shuffled + return v >> 16; +} + +// Wraps noise for tiling texture creation +// @param v = unwrapped texture parameter +// @param bTiling = true to tile, false to not tile +// @param RepeatSize = number of units before repeating +// @return either original or wrapped coord +float3 NoiseTileWrap(float3 v, bool bTiling, float RepeatSize) +{ + return bTiling ? (math::frac(v / RepeatSize) * RepeatSize) : v; +} + +// Evaluate polynomial to get smooth transitions for Perlin noise +// only needed by Perlin functions in this file +// scalar(per component): 2 add, 5 mul +float4 PerlinRamp(float4 t) +{ + return t * t * t * (t * (t * 6 - 15) + 10); +} + +// Blum-Blum-Shub-inspired pseudo random number generator +// http://www.umbc.edu/~olano/papers/mNoise.pdf +// real BBS uses ((s*s) mod M) with bignums and M as the product of two huge Blum primes +// instead, we use a single prime M just small enough not to overflow +// note that the above paper used 61, which fits in a half, but is unusably bad +// @param Integer valued floating point seed +// @return random number in range [0,1) +// ~8 ALU operations (5 *, 3 frac) +float RandBBSfloat(float seed) +{ + float BBS_PRIME24 = 4093.0; + float s = math::frac(seed / BBS_PRIME24); + s = math::frac(s * s * BBS_PRIME24); + s = math::frac(s * s * BBS_PRIME24); + return s; +} + +// Modified noise gradient term +// @param seed - random seed for integer lattice position +// @param offset - [-1,1] offset of evaluation point from lattice point +// @return gradient direction (xyz) and contribution (w) from this lattice point +float4 MGradient(int seed, float3 offset) +{ + //TODO uint + int rand = Rand3DPCG16(int3(seed,0,0)).x; + int3 MGradientMask = int3(0x8000, 0x4000, 0x2000); + float3 MGradientScale = float3(1.0 / 0x4000, 1.0 / 0x2000, 1.0 / 0x1000); + float3 direction = float3(int3(rand, rand, rand) & MGradientMask) * MGradientScale - 1; + return float4(direction.x, direction.y, direction.z, math::dot(direction, offset)); +} + +// compute Perlin and related noise corner seed values +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = true to return seed values for a repeating noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @param seed000-seed111 = hash function seeds for the eight corners +// @return fractional part of v +struct SeedValue +{ + float3 fv = float3(0); + float seed000 = 0; + float seed001 = 0; + float seed010 = 0; + float seed011 = 0; + float seed100 = 0; + float seed101 = 0; + float seed110 = 0; + float seed111 = 0; +}; + +SeedValue NoiseSeeds(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds; + seeds.fv = math::frac(v); + float3 iv = math::floor(v); + + const float3 primes = float3(19, 47, 101); + + if (bTiling) + { // can't algebraically combine with primes + seeds.seed000 = math::dot(primes, NoiseTileWrap(iv, true, RepeatSize)); + seeds.seed100 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 0), true, RepeatSize)); + seeds.seed010 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 0), true, RepeatSize)); + seeds.seed110 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 0), true, RepeatSize)); + seeds.seed001 = math::dot(primes, NoiseTileWrap(iv + float3(0, 0, 1), true, RepeatSize)); + seeds.seed101 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 1), true, RepeatSize)); + seeds.seed011 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 1), true, RepeatSize)); + seeds.seed111 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 1), true, RepeatSize)); + } + else + { // get to combine offsets with multiplication by primes in this case + seeds.seed000 = math::dot(iv, primes); + seeds.seed100 = seeds.seed000 + primes.x; + seeds.seed010 = seeds.seed000 + primes.y; + seeds.seed110 = seeds.seed100 + primes.y; + seeds.seed001 = seeds.seed000 + primes.z; + seeds.seed101 = seeds.seed100 + primes.z; + seeds.seed011 = seeds.seed010 + primes.z; + seeds.seed111 = seeds.seed110 + primes.z; + } + + return seeds; +} + +struct SimplexWeights +{ + float4 Result = float4(0); + float3 PosA = float3(0); + float3 PosB = float3(0); + float3 PosC = float3(0); + float3 PosD = float3(0); +}; + +// Computed weights and sample positions for simplex interpolation +// @return float4(a,b,c, d) Barycentric coordinate defined as Filtered = Tex(PosA) * a + Tex(PosB) * b + Tex(PosC) * c + Tex(PosD) * d +SimplexWeights ComputeSimplexWeights3D(float3 OrthogonalPos) +{ + SimplexWeights weights; + float3 OrthogonalPosFloor = math::floor(OrthogonalPos); + + weights.PosA = OrthogonalPosFloor; + weights.PosB = weights.PosA + float3(1, 1, 1); + + OrthogonalPos -= OrthogonalPosFloor; + + float Largest = math::max(OrthogonalPos.x, math::max(OrthogonalPos.y, OrthogonalPos.z)); + float Smallest = math::min(OrthogonalPos.x, math::min(OrthogonalPos.y, OrthogonalPos.z)); + + weights.PosC = weights.PosA + float3(Largest == OrthogonalPos.x, Largest == OrthogonalPos.y, Largest == OrthogonalPos.z); + weights.PosD = weights.PosA + float3(Smallest != OrthogonalPos.x, Smallest != OrthogonalPos.y, Smallest != OrthogonalPos.z); + + float RG = OrthogonalPos.x - OrthogonalPos.y; + float RB = OrthogonalPos.x - OrthogonalPos.z; + float GB = OrthogonalPos.y - OrthogonalPos.z; + + weights.Result.z = + math::min(math::max(0, RG), math::max(0, RB)) // X + + math::min(math::max(0, -RG), math::max(0, GB)) // Y + + math::min(math::max(0, -RB), math::max(0, -GB)); // Z + + weights.Result.w = + math::min(math::max(0, -RG), math::max(0, -RB)) // X + + math::min(math::max(0, RG), math::max(0, -GB)) // Y + + math::min(math::max(0, RB), math::max(0, GB)); // Z + + weights.Result.y = Smallest; + weights.Result.x = 1.0f - weights.Result.y - weights.Result.z - weights.Result.w; + + return weights; +} + +// filtered 3D gradient simple noise (few texture lookups, high quality) +// @param v >0 +// @return random number in the range -1 .. 1 +float SimplexNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 EvalPos) +{ + float3 OrthogonalPos = SkewSimplex(EvalPos); + + SimplexWeights Weights = ComputeSimplexWeights3D(OrthogonalPos); + + // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 32 bit) + float3 A = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosA); + float3 B = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosB); + float3 C = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosC); + float3 D = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosD); + + Weights.PosA = UnSkewSimplex(Weights.PosA); + Weights.PosB = UnSkewSimplex(Weights.PosB); + Weights.PosC = UnSkewSimplex(Weights.PosC); + Weights.PosD = UnSkewSimplex(Weights.PosD); + + float DistanceWeight; + + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosA)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float a = math::dot(A, EvalPos - Weights.PosA) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosB)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float b = math::dot(B, EvalPos - Weights.PosB) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosC)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float c = math::dot(C, EvalPos - Weights.PosC) * DistanceWeight; + DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosD)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight; + float d = math::dot(D, EvalPos - Weights.PosD) * DistanceWeight; + + return 32 * (a + b + c + d); +} + +// filtered 3D noise, can be optimized +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float GradientNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 v, bool bTiling, float RepeatSize) +{ + bTiling = true; + float3 fv = math::frac(v); + float3 iv0 = NoiseTileWrap(math::floor(v), bTiling, RepeatSize); + float3 iv1 = NoiseTileWrap(iv0 + 1, bTiling, RepeatSize); + + const int2 ZShear = int2(17, 89); + + float2 OffsetA = iv0.z * ZShear; + float2 OffsetB = OffsetA + ZShear; // non-tiling, use relative offset + if (bTiling) // tiling, have to compute from wrapped coordinates + { + OffsetB = iv1.z * ZShear; + } + + // Texture size scale factor + float ts = 1 / 128.0f; + + // texture coordinates for iv0.xy, as offset for both z slices + float2 TexA0 = (float2(iv0.x, iv0.y) + OffsetA + 0.5f) * ts; + float2 TexB0 = (float2(iv0.x, iv0.y) + OffsetB + 0.5f) * ts; + + // texture coordinates for iv1.xy, as offset for both z slices + float2 TexA1 = TexA0 + ts; // for non-tiling, can compute relative to existing coordinates + float2 TexB1 = TexB0 + ts; + if (bTiling) // for tiling, need to compute from wrapped coordinates + { + TexA1 = (float2(iv1.x, iv1.y) + OffsetA + 0.5f) * ts; + TexB1 = (float2(iv1.x, iv1.y) + OffsetB + 0.5f) * ts; + } + + + // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 8, 16 or 32 bit) + float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat); + float3 PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 A = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 B = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 C = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 D = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 E = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 F = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 G = PerlinNoiseColor * 2 - 1; + PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat); + PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z); + float3 H = PerlinNoiseColor * 2 - 1; + + float a = math::dot(A, fv - float3(0, 0, 0)); + float b = math::dot(B, fv - float3(1, 0, 0)); + float c = math::dot(C, fv - float3(0, 1, 0)); + float d = math::dot(D, fv - float3(1, 1, 0)); + float e = math::dot(E, fv - float3(0, 0, 1)); + float f = math::dot(F, fv - float3(1, 0, 1)); + float g = math::dot(G, fv - float3(0, 1, 1)); + float h = math::dot(H, fv - float3(1, 1, 1)); + + float4 Weights = PerlinRamp(math::frac(float4(fv.x, fv.y, fv.z, 0))); + + float i = math::lerp(math::lerp(a, b, Weights.x), math::lerp(c, d, Weights.x), Weights.y); + float j = math::lerp(math::lerp(e, f, Weights.x), math::lerp(g, h, Weights.x), Weights.y); + + return math::lerp(i, j, Weights.z); +} + +// @return random number in the range -1 .. 1 +// scalar: 6 frac, 31 mul/mad, 15 add, +float FastGradientPerlinNoise3D_TEX(uniform texture_3d PerlinNoise3DTexture, float3 xyz) +{ + // needs to be the same value when creating the PerlinNoise3D texture + float Extent = 16; + + // last texel replicated and needed for filtering + // scalar: 3 frac, 6 mul + xyz = math::frac(xyz / (Extent - 1)) * (Extent - 1); + + // scalar: 3 frac + float3 uvw = math::frac(xyz); + // = floor(xyz); + // scalar: 3 add + float3 p0 = xyz - uvw; +// float3 f = math::pow(uvw, 2) * 3.0f - math::pow(uvw, 3) * 2.0f; // original perlin hermite (ok when used without bump mapping) + // scalar: 2*3 add 5*3 mul + float4 pr = PerlinRamp(float4(uvw.x, uvw.y, uvw.z, 0)); + float3 f = float3(pr.x, pr.y, pr.z); // new, better with continues second derivative for bump mapping + // scalar: 3 add + float3 p = p0 + f; + // scalar: 3 mad + // TODO: need reverse??? + float4 NoiseSample = tex::lookup_float4(PerlinNoise3DTexture, p / Extent + 0.5f / Extent); // +0.5f to get rid of bilinear offset + + // reconstruct from 8bit (using mad with 2 constants and dot4 was same instruction count) + // scalar: 4 mad, 3 mul, 3 add + float3 n = float3(NoiseSample.x, NoiseSample.y, NoiseSample.z) * 255.0f / 127.0f - 1.0f; + float d = NoiseSample.w * 255.f - 127; + return math::dot(xyz, n) - d; +} + +// Perlin-style "Modified Noise" +// http://www.umbc.edu/~olano/papers/index.html#mNoise +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float GradientNoise3D_ALU(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize); + + float rand000 = MGradient(int(seeds.seed000), seeds.fv - float3(0, 0, 0)).w; + float rand100 = MGradient(int(seeds.seed100), seeds.fv - float3(1, 0, 0)).w; + float rand010 = MGradient(int(seeds.seed010), seeds.fv - float3(0, 1, 0)).w; + float rand110 = MGradient(int(seeds.seed110), seeds.fv - float3(1, 1, 0)).w; + float rand001 = MGradient(int(seeds.seed001), seeds.fv - float3(0, 0, 1)).w; + float rand101 = MGradient(int(seeds.seed101), seeds.fv - float3(1, 0, 1)).w; + float rand011 = MGradient(int(seeds.seed011), seeds.fv - float3(0, 1, 1)).w; + float rand111 = MGradient(int(seeds.seed111), seeds.fv - float3(1, 1, 1)).w; + + float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0)); + + float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y); + float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y); + return math::lerp(i, j, Weights.z); +} + +// 3D value noise - used to be incorrectly called Perlin noise +// @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D +// @param bTiling = repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension +// @return random number in the range -1 .. 1 +float ValueNoise3D_ALU(float3 v, bool bTiling, float RepeatSize) +{ + SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize); + + float rand000 = RandBBSfloat(seeds.seed000) * 2 - 1; + float rand100 = RandBBSfloat(seeds.seed100) * 2 - 1; + float rand010 = RandBBSfloat(seeds.seed010) * 2 - 1; + float rand110 = RandBBSfloat(seeds.seed110) * 2 - 1; + float rand001 = RandBBSfloat(seeds.seed001) * 2 - 1; + float rand101 = RandBBSfloat(seeds.seed101) * 2 - 1; + float rand011 = RandBBSfloat(seeds.seed011) * 2 - 1; + float rand111 = RandBBSfloat(seeds.seed111) * 2 - 1; + + float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0)); + + float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y); + float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y); + return math::lerp(i, j, Weights.z); +} + +// 3D jitter offset within a voronoi noise cell +// @param pos - integer lattice corner +// @return random offsets vector +float3 VoronoiCornerSample(float3 pos, int Quality) +{ + // random values in [-0.5, 0.5] + float3 noise = float3(Rand3DPCG16(int3(pos))) / 0xffff - 0.5; + + // quality level 1 or 2: searches a 2x2x2 neighborhood with points distributed on a sphere + // scale factor to guarantee jittered points will be found within a 2x2x2 search + if (Quality <= 2) + { + return math::normalize(noise) * 0.2588; + } + + // quality level 3: searches a 3x3x3 neighborhood with points distributed on a sphere + // scale factor to guarantee jittered points will be found within a 3x3x3 search + if (Quality == 3) + { + return math::normalize(noise) * 0.3090; + } + + // quality level 4: jitter to anywhere in the cell, needs 4x4x4 search + return noise; +} + +// compare previous best with a new candidate +// not producing point locations makes it easier for compiler to eliminate calculations when they're not needed +// @param minval = location and distance of best candidate seed point before the new one +// @param candidate = candidate seed point +// @param offset = 3D offset to new candidate seed point +// @param bDistanceOnly = if true, only set maxval.w with distance, otherwise maxval.w is distance and maxval.xyz is position +// @return position (if bDistanceOnly is false) and distance to closest seed point so far +float4 VoronoiCompare(float4 minval, float3 candidate, float3 offset, bool bDistanceOnly) +{ + if (bDistanceOnly) + { + return float4(0, 0, 0, math::min(minval.w, math::dot(offset, offset))); + } + else + { + float newdist = math::dot(offset, offset); + return newdist > minval.w ? minval : float4(candidate.x, candidate.y, candidate.z, newdist); + } +} + +// 220 instruction Worley noise +float4 VoronoiNoise3D_ALU(float3 v, int Quality, bool bTiling, float RepeatSize, bool bDistanceOnly) +{ + float3 fv = math::frac(v), fv2 = math::frac(v + 0.5); + float3 iv = math::floor(v), iv2 = math::floor(v + 0.5); + + // with initial minimum distance = infinity (or at least bigger than 4), first min is optimized away + float4 mindist = float4(0,0,0,100); + float3 p, offset; + + // quality level 3: do a 3x3x3 search + if (Quality == 3) + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = -1; offset_x <= 1; ++offset_x) + { + for (offset_y = -1; offset_y <= 1; ++offset_y) + { + for (offset_z = -1; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly); + } + } + } + } + + // everybody else searches a base 2x2x2 neighborhood + else + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = 0; offset_x <= 1; ++offset_x) + { + for (offset_y = 0; offset_y <= 1; ++offset_y) + { + for (offset_z = 0; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // quality level 2, do extra set of points, offset by half a cell + if (Quality == 2) + { + // 467 is just an offset to a different area in the random number field to avoid similar neighbor artifacts + p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize) + 467, Quality); + mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly); + } + } + } + } + } + + // quality level 4: add extra sets of four cells in each direction + if (Quality >= 4) + { + int offset_x; + int offset_y; + int offset_z; + for (offset_x = -1; offset_x <= 2; offset_x += 3) + { + for (offset_y = 0; offset_y <= 1; ++offset_y) + { + for (offset_z = 0; offset_z <= 1; ++offset_z) + { + offset = float3(offset_x, offset_y, offset_z); + // along x axis + p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // along y axis + p = float3(offset.y, offset.z, offset.x) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.y, offset.z, offset.x), bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + + // along z axis + p = float3(offset.z, offset.x, offset.y) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.z, offset.x, offset.y), bTiling, RepeatSize), Quality); + mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly); + } + } + } + } + + // transform squared distance to real distance + return float4(mindist.x, mindist.y, mindist.z, math::sqrt(mindist.w)); +} + +// Coordinates for corners of a Simplex tetrahedron +// Based on McEwan et al., Efficient computation of noise in GLSL, JGT 2011 +// @param v = 3D noise argument +// @return 4 corner locations +float4x3 SimplexCorners(float3 v) +{ + // find base corner by skewing to tetrahedral space and back + float3 tet = math::floor(v + v.x/3 + v.y/3 + v.z/3); + float3 base = tet - tet.x/6 - tet.y/6 - tet.z/6; + float3 f = v - base; + + // Find offsets to other corners (McEwan did this in tetrahedral space, + // but since skew is along x=y=z axis, this works in Euclidean space too.) + float3 g = math::step(float3(f.y,f.z,f.x), float3(f.x,f.y,f.z)), h = 1 - float3(g.z, g.x, g.y); + float3 a1 = math::min(g, h) - 1.0 / 6.0, a2 = math::max(g, h) - 1.0 / 3.0; + + // four corners + return float4x3(base, base + a1, base + a2, base + 0.5); +} + +// Improved smoothing function for simplex noise +// @param f = fractional distance to four tetrahedral corners +// @return weight for each corner +float4 SimplexSmooth(float4x3 f) +{ + const float scale = 1024. / 375.; // scale factor to make noise -1..1 + float4 d = float4(math::dot(f[0], f[0]), math::dot(f[1], f[1]), math::dot(f[2], f[2]), math::dot(f[3], f[3])); + float4 s = math::saturate(2 * d); + return (1 * scale + s*(-3 * scale + s*(3 * scale - s*scale))); +} + +// Derivative of simplex noise smoothing function +// @param f = fractional distanc eto four tetrahedral corners +// @return derivative of smoothing function for each corner by x, y and z +float3x4 SimplexDSmooth(float4x3 f) +{ + const float scale = 1024. / 375.; // scale factor to make noise -1..1 + float4 d = float4(math::dot(f[0], f[0]), math::dot(f[1], f[1]), math::dot(f[2], f[2]), math::dot(f[3], f[3])); + float4 s = math::saturate(2 * d); + s = -12 * scale + s*(24 * scale - s * 12 * scale); + + return float3x4( + s * float4(f[0][0], f[1][0], f[2][0], f[3][0]), + s * float4(f[0][1], f[1][1], f[2][1], f[3][1]), + s * float4(f[0][2], f[1][2], f[2][2], f[3][2])); +} + +// Simplex noise and its Jacobian derivative +// @param v = 3D noise argument +// @param bTiling = whether to repeat noise pattern +// @param RepeatSize = integer units before tiling in each dimension, must be a multiple of 3 +// @return float3x3 Jacobian in J[*].xyz, vector noise in J[*].w +// J[0].w, J[1].w, J[2].w is a Perlin-style simplex noise with vector output, e.g. (Nx, Ny, Nz) +// J[i].x is X derivative of the i'th component of the noise so J[2].x is dNz/dx +// You can use this to compute the noise, gradient, curl, or divergence: +// float3x4 J = JacobianSimplex_ALU(...); +// float3 VNoise = float3(J[0].w, J[1].w, J[2].w); // 3D noise +// float3 Grad = J[0].xyz; // gradient of J[0].w +// float3 Curl = float3(J[1][2]-J[2][1], J[2][0]-J[0][2], J[0][1]-J[1][2]); +// float Div = J[0][0]+J[1][1]+J[2][2]; +// All of these are confirmed to compile out all unneeded terms. +// So Grad of X doesn't compute Y or Z components, and VNoise doesn't do any of the derivative computation. +float3x4 JacobianSimplex_ALU(float3 v, bool bTiling, float RepeatSize) +{ + int3 MGradientMask = int3(0x8000, 0x4000, 0x2000); + float3 MGradientScale = float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000); + + // corners of tetrahedron + float4x3 T = SimplexCorners(v); + // TODO: uint3 + int3 rand = int3(0); + float4x3 gvec0 = float4x3(1.0); + float4x3 gvec1 = float4x3(1.0); + float4x3 gvec2 = float4x3(1.0); + float4x3 fv = float4x3(1.0); + float3x4 grad = float3x4(1.0); + + // processing of tetrahedral vertices, unrolled + // to compute gradient at each corner + fv[0] = v - T[0]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[0] + 0.5, bTiling, RepeatSize)))); + gvec0[0] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[0] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[0] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][0] = math::dot(gvec0[0], fv[0]); + grad[1][0] = math::dot(gvec1[0], fv[0]); + grad[2][0] = math::dot(gvec2[0], fv[0]); + + fv[1] = v - T[1]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[1] + 0.5, bTiling, RepeatSize)))); + gvec0[1] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[1] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec1[1] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][1] = math::dot(gvec0[1], fv[1]); + grad[1][1] = math::dot(gvec1[1], fv[1]); + grad[2][1] = math::dot(gvec2[1], fv[1]); + + fv[2] = v - T[2]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[2] + 0.5, bTiling, RepeatSize)))); + gvec0[2] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[2] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[2] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][2] = math::dot(gvec0[2], fv[2]); + grad[1][2] = math::dot(gvec1[2], fv[2]); + grad[2][2] = math::dot(gvec2[2], fv[2]); + + fv[3] = v - T[3]; + rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[3] + 0.5, bTiling, RepeatSize)))); + gvec0[3] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1; + gvec1[3] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1; + gvec2[3] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1; + grad[0][3] = math::dot(gvec0[3], fv[3]); + grad[1][3] = math::dot(gvec1[3], fv[3]); + grad[2][3] = math::dot(gvec2[3], fv[3]); + + // blend gradients + float4 sv = SimplexSmooth(fv); + float3x4 ds = SimplexDSmooth(fv); + + float3x4 jacobian = float3x4(1.0); + float3 vec0 = gvec0*sv + grad[0]*ds; // NOTE: mdl is column major, convert from UE4 (row major) + jacobian[0] = float4(vec0.x, vec0.y, vec0.z, math::dot(sv, grad[0])); + float3 vec1 = gvec1*sv + grad[1]*ds; + jacobian[1] = float4(vec1.x, vec1.y, vec1.z, math::dot(sv, grad[1])); + float3 vec2 = gvec2*sv + grad[2]*ds; + jacobian[2] = float4(vec2.x, vec2.y, vec2.z, math::dot(sv, grad[2])); + + return jacobian; +} + +// While RepeatSize is a float here, the expectation is that it would be largely integer values coming in from the UI. The downstream logic assumes +// floats for all called functions (NoiseTileWrap) and this prevents any float-to-int conversion errors from automatic type conversion. +float Noise3D_Multiplexer(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, int Function, float3 Position, int Quality, bool bTiling, float RepeatSize) +{ + // verified, HLSL compiled out the switch if Function is a constant + switch(Function) + { + case 0: + return SimplexNoise3D_TEX(PerlinNoiseGradientTexture, Position); + case 1: + return GradientNoise3D_TEX(PerlinNoiseGradientTexture, Position, bTiling, RepeatSize); + case 2: + return FastGradientPerlinNoise3D_TEX(PerlinNoise3DTexture, Position); + case 3: + return GradientNoise3D_ALU(Position, bTiling, RepeatSize); + case 4: + return ValueNoise3D_ALU(Position, bTiling, RepeatSize); + case 5: + return VoronoiNoise3D_ALU(Position, Quality, bTiling, RepeatSize, true).w * 2.0 - 1.0; + } + return 0; +} +//---------------------------------------------------------- + +export float noise(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, float3 Position, float Scale, float Quality, float Function, float Turbulence, float Levels, float OutputMin, float OutputMax, float LevelScale, float FilterWidth, float Tiling, float RepeatSize) +[[ + anno::description("Noise"), + anno::noinline() +]] +{ + Position *= Scale; + FilterWidth *= Scale; + + float Out = 0.0f; + float OutScale = 1.0f; + float InvLevelScale = 1.0f / LevelScale; + + int iFunction(Function); + int iQuality(Quality); + int iLevels(Levels); + bool bTurbulence(Turbulence); + bool bTiling(Tiling); + + for(int i = 0; i < iLevels; ++i) + { + // fade out noise level that are too high frequent (not done through dynamic branching as it usually requires gradient instructions) + OutScale *= math::saturate(1.0 - FilterWidth); + + if(bTurbulence) + { + Out += math::abs(Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize)) * OutScale; + } + else + { + Out += Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize) * OutScale; + } + + Position *= LevelScale; + RepeatSize *= LevelScale; + OutScale *= InvLevelScale; + FilterWidth *= LevelScale; + } + + if(!bTurbulence) + { + // bring -1..1 to 0..1 range + Out = Out * 0.5f + 0.5f; + } + + // Out is in 0..1 range + return math::lerp(OutputMin, OutputMax, Out); +} + +// Material node for noise functions returning a vector value +// @param LevelScale usually 2 but higher values allow efficient use of few levels +// @return in user defined range (OutputMin..OutputMax) +export float4 vector4_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize) +[[ + anno::description("Vector Noise"), + anno::noinline() +]] +{ + float4 result = float4(0,0,0,1); + float3 ret = float3(0); + int iQuality = int(Quality); + int iFunction = int(Function); + bool bTiling = Tiling > 0.0; + + float3x4 Jacobian = JacobianSimplex_ALU(Position, bTiling, TileSize); // compiled out if not used + + // verified, HLSL compiled out the switch if Function is a constant + switch (iFunction) + { + case 0: // Cellnoise + ret = float3(Rand3DPCG16(int3(math::floor(NoiseTileWrap(Position, bTiling, TileSize))))) / 0xffff; + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 1: // Color noise + ret = float3(Jacobian[0].w, Jacobian[1].w, Jacobian[2].w); + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 2: // Gradient + result = Jacobian[0]; + break; + case 3: // Curl + ret = float3(Jacobian[2][1] - Jacobian[1][2], Jacobian[0][2] - Jacobian[2][0], Jacobian[1][0] - Jacobian[0][1]); + result = float4(ret.x, ret.y, ret.z, 1); + break; + case 4: // Voronoi + result = VoronoiNoise3D_ALU(Position, iQuality, bTiling, TileSize, false); + break; + } + return result; +} + +export float3 vector3_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize) +[[ + anno::description("Vector Noise float3 version"), + anno::noinline() +]] +{ + float4 noise = vector4_noise(Position, Quality, Function, Tiling, TileSize); + return float3(noise.x, noise.y, noise.z); +} + + +// workaround for ue4 fresnel (without supporting for camera vector) : replacing it with 0.0, means facing to the view +export float fresnel(float exponent [[anno::unused()]], float base_reflect_fraction [[anno::unused()]], float3 normal [[anno::unused()]]) +[[ + anno::description("Fresnel"), + anno::noinline() +]] +{ + return 0.0; +} + +export float fresnel_function(float3 normal_vector [[anno::unused()]], float3 camera_vector [[anno::unused()]], + bool invert_fresnel [[anno::unused()]], float power [[anno::unused()]], + bool use_cheap_contrast [[anno::unused()]], float cheap_contrast_dark [[anno::unused()]], float cheap_contrast_bright [[anno::unused()]], + bool clamp_fresnel_dot_product [[anno::unused()]]) +[[ + anno::description("Fresnel Function"), + anno::noinline() +]] +{ + return 0.0; +} + +export float3 camera_vector(uniform bool up_z = true) +[[ + anno::description("Camera Vector"), + anno::noinline() +]] +{ + // assume camera postion is 0,0,0 + return math::normalize(float3(0) - convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z)); +} + +export float pixel_depth() +[[ + anno::description("Pixel Depth"), + anno::noinline() +]] +{ + return 256.0f; +} + +export float scene_depth() +[[ + anno::description("Scene Depth") +]] +{ + return 65500.0f; +} + +export float3 scene_color() +[[ + anno::description("Scene Color") +]] +{ + return float3(1.0f); +} + +export float4 vertex_color() +[[ + anno::description("Vertex Color"), + anno::noinline() +]] +{ + return float4(1.0f); +} + +export float4 vertex_color_from_coordinate(int VertexColorCoordinateIndex) +[[ + anno::description("Vertex Color for float2 PrimVar"), + anno::noinline() +]] +{ + // Kit only supports 4 uv sets, 2 uvs are available to vertex color. if vertex color index is invalid, output the constant WHITE color intead + return (VertexColorCoordinateIndex > 2) ? float4(1.0f) : float4(state::texture_coordinate(VertexColorCoordinateIndex).x, state::texture_coordinate(VertexColorCoordinateIndex).y, state::texture_coordinate(VertexColorCoordinateIndex+1).x, state::texture_coordinate(VertexColorCoordinateIndex+1).y); +} + +export float3 camera_position() +[[ + anno::description("Camera Position"), + anno::noinline() +]] +{ + return float3(1000.0f, 0, 0); +} + +export float3 rotate_about_axis(float4 NormalizedRotationAxisAndAngle, float3 PositionOnAxis, float3 Position) +[[ + anno::description("Rotates Position about the given axis by the given angle") +]] +{ + // Project Position onto the rotation axis and find the closest point on the axis to Position + float3 NormalizedRotationAxis = float3(NormalizedRotationAxisAndAngle.x,NormalizedRotationAxisAndAngle.y,NormalizedRotationAxisAndAngle.z); + float3 ClosestPointOnAxis = PositionOnAxis + NormalizedRotationAxis * math::dot(NormalizedRotationAxis, Position - PositionOnAxis); + // Construct orthogonal axes in the plane of the rotation + float3 UAxis = Position - ClosestPointOnAxis; + float3 VAxis = math::cross(NormalizedRotationAxis, UAxis); + float[2] SinCosAngle = math::sincos(NormalizedRotationAxisAndAngle.w); + // Rotate using the orthogonal axes + float3 R = UAxis * SinCosAngle[1] + VAxis * SinCosAngle[0]; + // Reconstruct the rotated world space position + float3 RotatedPosition = ClosestPointOnAxis + R; + // Convert from position to a position offset + return RotatedPosition - Position; +} + +export float2 rotate_scale_offset_texcoords(float2 InTexCoords, float4 InRotationScale, float2 InOffset) +[[ + anno::description("Returns a float2 texture coordinate after 2x2 transform and offset applied") +]] +{ + return float2(math::dot(InTexCoords, float2(InRotationScale.x, InRotationScale.y)), math::dot(InTexCoords, float2(InRotationScale.z, InRotationScale.w))) + InOffset; +} + +export float3 reflection_custom_world_normal(float3 WorldNormal, bool bNormalizeInputNormal, uniform bool up_z = true) +[[ + anno::description("Reflection vector about the specified world space normal") +]] +{ + if (bNormalizeInputNormal) + { + WorldNormal = math::normalize(WorldNormal); + } + + return -camera_vector(up_z) + WorldNormal * math::dot(WorldNormal, camera_vector(up_z)) * 2.0; +} + +export float3 reflection_vector(uniform bool up_z = true) +[[ + anno::description("Reflection Vector"), + anno::noinline() +]] +{ + float3 normal = convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false); + return reflection_custom_world_normal(normal, false, up_z); +} + +export float dither_temporalAA(float AlphaThreshold = 0.5f, float Random = 1.0f [[anno::unused()]]) +[[ + anno::description("Dither TemporalAA"), + anno::noinline() +]] +{ + return AlphaThreshold; +} + +export float3 black_body( float Temp ) +[[ + anno::description("Black Body"), + anno::noinline() +]] +{ + float u = ( 0.860117757f + 1.54118254e-4f * Temp + 1.28641212e-7f * Temp*Temp ) / ( 1.0f + 8.42420235e-4f * Temp + 7.08145163e-7f * Temp*Temp ); + float v = ( 0.317398726f + 4.22806245e-5f * Temp + 4.20481691e-8f * Temp*Temp ) / ( 1.0f - 2.89741816e-5f * Temp + 1.61456053e-7f * Temp*Temp ); + + float x = 3*u / ( 2*u - 8*v + 4 ); + float y = 2*v / ( 2*u - 8*v + 4 ); + float z = 1 - x - y; + + float Y = 1; + float X = Y/y * x; + float Z = Y/y * z; + + float3x3 XYZtoRGB = float3x3( + float3(3.2404542, -1.5371385, -0.4985314), + float3(-0.9692660, 1.8760108, 0.0415560), + float3(0.0556434, -0.2040259, 1.0572252) + ); + + return XYZtoRGB * float3( X, Y, Z ) * math::pow( 0.0004 * Temp, 4 ); +} + +export float per_instance_random(uniform texture_2d PerlinNoiseGradientTexture, int NumberInstances) +[[ + anno::description("Per Instance Random"), + anno::noinline() +]] +{ + float weight = state::object_id() / float(NumberInstances); + return NumberInstances == 0 ? 0.0 : tex::lookup_float4(PerlinNoiseGradientTexture, float2(weight, 1.0 - weight), tex::wrap_repeat, tex::wrap_repeat).x; +} + +//------------------ Hair from UE4 ----------------------- +float3 hair_absorption_to_color(float3 A) +{ + const float B = 0.3f; + float b2 = B * B; + float b3 = B * b2; + float b4 = b2 * b2; + float b5 = B * b4; + float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5); + return math::exp(-math::sqrt(A) * D); +} + +float3 hair_color_to_absorption(float3 C) +{ + const float B = 0.3f; + float b2 = B * B; + float b3 = B * b2; + float b4 = b2 * b2; + float b5 = B * b4; + float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5); + return math::pow(math::log(C) / D, 2.0f); +} + +export float3 get_hair_color_from_melanin(float InMelanin, float InRedness, float3 InDyeColor) +[[ + anno::description("Hair Color") +]] +{ + InMelanin = math::saturate(InMelanin); + InRedness = math::saturate(InRedness); + float Melanin = -math::log(math::max(1 - InMelanin, 0.0001f)); + float Eumelanin = Melanin * (1 - InRedness); + float Pheomelanin = Melanin * InRedness; + + float3 DyeAbsorption = hair_color_to_absorption(math::saturate(InDyeColor)); + float3 Absorption = Eumelanin * float3(0.506f, 0.841f, 1.653f) + Pheomelanin * float3(0.343f, 0.733f, 1.924f); + + return hair_absorption_to_color(Absorption + DyeAbsorption); +} + +export float3 local_object_bounds_min() +[[ + anno::description("Local Object Bounds Min"), + anno::noinline() +]] +{ + return float3(0.0); +} + +export float3 local_object_bounds_max() +[[ + anno::description("Local Object Bounds Max"), + anno::noinline() +]] +{ + return float3(100.0); +} + +export float3 object_bounds() +[[ + anno::description("Object Bounds"), + anno::noinline() +]] +{ + return float3(100.0); +} + +export float object_radius() +[[ + anno::description("Object Radius"), + anno::noinline() +]] +{ + return 100.0f; +} + +export float3 object_world_position(uniform bool up_z = true) +[[ + anno::description("Object World Position"), + anno::noinline() +]] +{ + return convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z)*state::meters_per_scene_unit()*100.0; +} + +export float3 object_orientation() +[[ + anno::description("Object Orientation"), + anno::noinline() +]] +{ + return float3(0); +} + +export float rcp(float x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float2 rcp(float2 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float3 rcp(float3 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export float4 rcp(float4 x) +[[ + anno::description("hlsl rcp"), + anno::noinline() +]] +{ + return 1.0f / x; +} + +export int BitFieldExtractI32(int Data, int Size, int Offset) +[[ + anno::description("BitFieldExtractI32 int"), + anno::noinline() +]] +{ + Size &= 3; + Offset &= 3; + + if (Size == 0) + return 0; + else if (Offset + Size < 32) + return (Data << (32 - Size - Offset)) >> (32 - Size); + else + return Data >> Offset; +} + +export int BitFieldExtractI32(float Data, float Size, float Offset) +[[ + anno::description("BitFieldExtractI32 float"), + anno::noinline() +]] +{ + return BitFieldExtractI32(int(Data), int(Size), int(Offset)); +} + +export int BitFieldExtractU32(float Data, float Size, float Offset) +[[ + anno::description("BitFieldExtractU32 float"), + anno::noinline() +]] +{ + return BitFieldExtractI32(Data, Size, Offset); +} + +export int BitFieldExtractU32(int Data, int Size, int Offset) +[[ + anno::description("BitFieldExtractU32 int"), + anno::noinline() +]] +{ + return BitFieldExtractI32(Data, Size, Offset); +} + +export float3 EyeAdaptationInverseLookup(float3 LightValue, float Alpha) +[[ + anno::description("EyeAdaptationInverseLookup"), + anno::noinline() +]] +{ + float Adaptation = 1.0f; + + // When Alpha=0.0, we want to multiply by 1.0. when Alpha = 1.0, we want to multiply by 1/Adaptation. + // So the lerped value is: + // LerpLogScale = Lerp(log(1),log(1/Adaptaiton),T) + // Which is simplified as: + // LerpLogScale = Lerp(0,-log(Adaptation),T) + // LerpLogScale = -T * logAdaptation; + + float LerpLogScale = -Alpha * math::log(Adaptation); + float Scale = math::exp(LerpLogScale); + return LightValue * Scale; +}