diff --git a/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/.collect.mapping.json b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..71df0afcbf2c4c791275479cdd9c88a0c454353a --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/.collect.mapping.json @@ -0,0 +1,95 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/base.usd", + "source_hash": "514ff93c2bbff6e704bcdbf9946a37d58b3b9659", + "target_url": "./base.usd", + "target_hash": "24313ddba3efa6752f04a22b6b23cb73ea2474e9" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/Downloads/brown_photostudio_02_4k.exr", + "source_hash": "479391ea8dde71f7febcfc532f5f659f7f182d42", + "target_url": "./Downloads/brown_photostudio_02_4k.exr", + "target_hash": "bd42076847e29d91e40db14bd71c54bd8bb5d27c" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/objaverse_usd/74c95870e2a141a9903815715d25b8a7.usd", + "source_hash": "cbf01178ec5b7ac92617eafbe671c32c21000e41", + "target_url": "./objaverse_usd/74c95870e2a141a9903815715d25b8a7.usd", + "target_hash": "2c22c9792d7ad928ccff6efb2eb49eb2be0194b4" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/instance.usd", + "source_hash": "b1a7fb86b7281e047da417f6591db504fd9311ec", + "target_url": "./object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/instance.usd", + "target_hash": "f44b9bf531ef9cb12d4b835afb4341e50986bcfc" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Textures/5d2d975cb5cb692c5b4f2b82_color.png", + "source_hash": "d4963d35eed95d2440479e519189710ad9d4fdc8", + "target_url": "./object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Textures/5d2d975cb5cb692c5b4f2b82_color.png", + "target_hash": "e067fad7bc53fbc7d91d9bf316a98c5efd6a93c7" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Textures/black.png", + "source_hash": "bb017ee7443691190290a303ad5db832402fcb40", + "target_url": "./object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Textures/black.png", + "target_hash": "babfaa9888fff7ef79987263e8c3af04cd68962b" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Textures/normal.png", + "source_hash": "b8607af5f71548bfa7df04b5785a2a63e1605e69", + "target_url": "./object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Textures/normal.png", + "target_hash": "a7aaaf8ac0015a395bd723a7ccc11cb8bd210eac" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Textures/white.png", + "source_hash": "f863a8750629c7f799881f2b3914ad81e18d9a3b", + "target_url": "./object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Textures/white.png", + "target_hash": "266846b9da348866ebab4f115d3d416bd4a14ceb" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/74c95870e2a141a9903815715d25b8a7_texture0.jpg", + "source_hash": "5e9c692ef9b80898a1d33de9dd51db60d0ca6a05", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/74c95870e2a141a9903815715d25b8a7_texture0.jpg", + "target_hash": "94fc6abd7272ac0d09cf5314deb08209e0412220" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/74c95870e2a141a9903815715d25b8a7_texture1.jpg", + "source_hash": "b90cc464ec962de27cbba6a4e6177da5bcff427d", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/74c95870e2a141a9903815715d25b8a7_texture1.jpg", + "target_hash": "e1794ef8f9269e521ffb7d64b39c790e18310f1a" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/74c95870e2a141a9903815715d25b8a7_texture2.png", + "source_hash": "3bb170a21e9a9f25dbe731109e8e77353bd13f5f", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/74c95870e2a141a9903815715d25b8a7_texture2.png", + "target_hash": "8bd8acc71f6f62b476c08ab2a29b8a6a3f9d5fd4" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/74c95870e2a141a9903815715d25b8a7_texture3.png", + "source_hash": "2406bbdb4675f8c66976c4d2a5cd4a7b0fd21cb8", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/74c95870e2a141a9903815715d25b8a7_texture3.png", + "target_hash": "d7608c3d9ab8186dab00064684a936e9f0767557" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Num5e5507e87d6a6300013c8091.mdl", + "source_hash": "e7db97e924b6116e5936e29189e402b6e0c105ef", + "target_url": "./object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Num5e5507e87d6a6300013c8091.mdl", + "target_hash": "09ecccc3009a0c0d8bb99659a60ea881665431b5" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Function.mdl", + "source_hash": "c1cec73d6fcda46278543be8aaeb22d4ef737583", + "target_url": "./object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Function.mdl", + "target_hash": "5d59f418240f4a40fbcd9ef8e6aa89899db3134c" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place2/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Base.mdl", + "source_hash": "57f20d4f607ce0339ffde7296c66c2de59b21951", + "target_url": "./object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Base.mdl", + "target_hash": "c77f6803a1316d3784af88943dc64897cde20532" + } + ] +} \ No newline at end of file diff --git a/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/objaverse_usd/74c95870e2a141a9903815715d25b8a7.usda b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/objaverse_usd/74c95870e2a141a9903815715d25b8a7.usda new file mode 100644 index 0000000000000000000000000000000000000000..350b00d6b9c148072f7b279c10f688721e1c2506 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Num5e5507e87d6a6300013c8091.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/Num5e5507e87d6a6300013c8091.mdl new file mode 100644 index 0000000000000000000000000000000000000000..aeb7dcdc009e7ab1585cdda1e9e73fe6fc461a01 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Base.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Function.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/Materials/OmniUe4Function.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f0801afff6f0870ea2574c9e9b6e2043e79e9a79 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/object_usds/grutopia_usd/Table/table/42bfd814921da5caa11f98e41e207019/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place2/base/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/.collect.mapping.json b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..822f4d98236b2e416faccd5e9e2f3358b68703eb --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/.collect.mapping.json @@ -0,0 +1,101 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/base.usd", + "source_hash": "c1bb50ee8ac11d39854db1c475c03418b892cddd", + "target_url": "./base.usd", + "target_hash": "115e0639332cf1c5cb8a9f6cf78a295f413809dc" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/Downloads/brown_photostudio_02_4k.exr", + "source_hash": "98eedcef3e8f7b0d2e453875ef66a34377467035", + "target_url": "./Downloads/brown_photostudio_02_4k.exr", + "target_hash": "5e3eb08488ab5f7de302c6bc669e78b2979c6e21" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/objaverse_usd/f8a2cdc9970846da95585a428697d173.usd", + "source_hash": "229126e9eb305fbd0be6f76d9c89c58b36807895", + "target_url": "./objaverse_usd/f8a2cdc9970846da95585a428697d173.usd", + "target_hash": "5f806193ac50edc11235a40abb303e327210b5bf" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/instance.usd", + "source_hash": "92e5438996e71e91d3a1649b8098dbe4bff9580a", + "target_url": "./object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/instance.usd", + "target_hash": "06c490089664056872cceb9bf4cbd0e0af975915" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/f8a2cdc9970846da95585a428697d173_texture0.jpg", + "source_hash": "64e76d6a89fc21a50a1339c97931bba8e98a0d24", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/f8a2cdc9970846da95585a428697d173_texture0.jpg", + "target_hash": "71f1fa9a73292db7401981443b49b6edca9d41aa" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/f8a2cdc9970846da95585a428697d173_texture1.png", + "source_hash": "3f29d1e21d572ef96931f8631bcf2a18acd814d2", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/f8a2cdc9970846da95585a428697d173_texture1.png", + "target_hash": "170c6e6f11992749f5526957687b1929f58cf978" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/f8a2cdc9970846da95585a428697d173_texture2.png", + "source_hash": "4143eed4621015a177574c098b73202422715997", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/f8a2cdc9970846da95585a428697d173_texture2.png", + "target_hash": "00abaee30e47fa52edb02ec9db5fda5b037bd5e0" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/f8a2cdc9970846da95585a428697d173_texture3.png", + "source_hash": "a0eeeeb2f90249a3a5e553df1e303f1c5d3d45bb", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/f8a2cdc9970846da95585a428697d173_texture3.png", + "target_hash": "b09d3d4d8578711c3aae3bb76b97ae3a0f38ec36" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Textures/5e9d08267fdaa400012796f0_color.png", + "source_hash": "6c6db7f5088cec9d9a88f9c6a945875003cc460b", + "target_url": "./object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Textures/5e9d08267fdaa400012796f0_color.png", + "target_hash": "f188693bafaf0ef420d1a6127411e3eaf76a826d" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Textures/5e9d08267fdaa400012796f0_metallic.png", + "source_hash": "c786dc0088ae871a8e61ab0ab02a1eb4c3401277", + "target_url": "./object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Textures/5e9d08267fdaa400012796f0_metallic.png", + "target_hash": "fc42b6fc697bcf0f8a8e87c0fb81cb8cc8564f29" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Textures/black.png", + "source_hash": "149f6900edacbff29bcbd43d400bda93f469f755", + "target_url": "./object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Textures/black.png", + "target_hash": "7485f88e3017accd51ee97306dca7099325e1d44" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Textures/normal.png", + "source_hash": "88f72696dae0d4300c9752357ce6657edfb8d76e", + "target_url": "./object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Textures/normal.png", + "target_hash": "4dadab22ab7cca1b47dec6e451a84b11d5e5747f" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Textures/white.png", + "source_hash": "b995780761005995c8e0b065c9ade83bf6e1b862", + "target_url": "./object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Textures/white.png", + "target_hash": "2f766543abc2a3a774bac205dd731f0a66c0b5d0" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Num598d732cd01f6a04681ce164.mdl", + "source_hash": "0b73dc26343abc81c69b5d9503e0816c08f1de30", + "target_url": "./object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Num598d732cd01f6a04681ce164.mdl", + "target_hash": "3044d1de7370f375e9775a70eb6f3c30784f7c41" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/OmniUe4Function.mdl", + "source_hash": "12cf289987bb9a9514988fc0a28f46d21e63a5b7", + "target_url": "./object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/OmniUe4Function.mdl", + "target_hash": "f4b3d8df8505d2570b108d8a292d3f2cc2bd1c5d" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place3/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/OmniUe4Base.mdl", + "source_hash": "cffcfc2a134e0bef5f204f2e93beb18c3bc1929f", + "target_url": "./object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/OmniUe4Base.mdl", + "target_hash": "911d7995b8c10cf29028f55a7173f7cdef8d5285" + } + ] +} \ No newline at end of file diff --git a/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/objaverse_usd/f8a2cdc9970846da95585a428697d173.usda b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/objaverse_usd/f8a2cdc9970846da95585a428697d173.usda new file mode 100644 index 0000000000000000000000000000000000000000..08f1cb9b41d190ab175bfd84da66077261cc39c4 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Num598d732cd01f6a04681ce164.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Num598d732cd01f6a04681ce164.mdl new file mode 100644 index 0000000000000000000000000000000000000000..1cbdd8ffe3b72599ab1ef87252132a9d14a1f97b --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/Num598d732cd01f6a04681ce164.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 Num598d732cd01f6a04681ce164( + 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/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/OmniUe4Base.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/OmniUe4Function.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/Materials/OmniUe4Function.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f0801afff6f0870ea2574c9e9b6e2043e79e9a79 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place3/base/object_usds/grutopia_usd/Table/table/350758cf2c427364e1d8210d3691b962/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/.collect.mapping.json b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..19b0de11a2c8862af65c3070bb62fe83e2312ae4 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/.collect.mapping.json @@ -0,0 +1,95 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/base.usd", + "source_hash": "095ebeda2ab73d71b8edae8c972a101ee515b82f", + "target_url": "./base.usd", + "target_hash": "c2494156f2f7f2c19ca8986dab034d197a162ad5" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/Downloads/brown_photostudio_02_4k.exr", + "source_hash": "475c5a055ae34125d19707eb03bf9950de25612c", + "target_url": "./Downloads/brown_photostudio_02_4k.exr", + "target_hash": "3c7342a3a59d94b95b9fae3d20209b866c6f475b" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/objaverse_usd/398c1b3b8114409a89eb02f9b42f8064.usd", + "source_hash": "511df2259459138cb18bf51280fe07131c56682f", + "target_url": "./objaverse_usd/398c1b3b8114409a89eb02f9b42f8064.usd", + "target_hash": "058ad17f6fbce5bb37e28c986905f6d93333bd79" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/instance.usd", + "source_hash": "51ab13ce6e0af0613f0848ba88cf965f09008cbf", + "target_url": "./object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/instance.usd", + "target_hash": "80ed0e2ef3809a3658cae10f2ef29ec2795b00dc" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/398c1b3b8114409a89eb02f9b42f8064_texture0.jpg", + "source_hash": "18bcea177382d3b8b8509ef031ae199e81addc09", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/398c1b3b8114409a89eb02f9b42f8064_texture0.jpg", + "target_hash": "0d65e3fb5e04aac19a63930215dc81c1ed435cd9" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/398c1b3b8114409a89eb02f9b42f8064_texture1.png", + "source_hash": "94a6a1417ac6a462e5c866da1c919a1f0af246e5", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/398c1b3b8114409a89eb02f9b42f8064_texture1.png", + "target_hash": "e3b42f1a4fa15321dcbb65b13069cad2b6e8eb05" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/398c1b3b8114409a89eb02f9b42f8064_texture2.png", + "source_hash": "d81e590e442098b97ee90edc06d898c228aa46db", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/398c1b3b8114409a89eb02f9b42f8064_texture2.png", + "target_hash": "81ed4cdeda1c4d2605d1970ad24d1b68d3996ea2" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/398c1b3b8114409a89eb02f9b42f8064_texture3.png", + "source_hash": "dc0aa9e84c0e8de9eb40ee2ab64addaaff6e4715", + "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/398c1b3b8114409a89eb02f9b42f8064_texture3.png", + "target_hash": "54191461189d33ad75f7c1bbbd7aa6bab77a590d" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Textures/5d3f935344b61600019162e4_color.png", + "source_hash": "12c15b9468602b59dd021144fd1ff12f0ba87022", + "target_url": "./object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Textures/5d3f935344b61600019162e4_color.png", + "target_hash": "d649878d9f3b63b3f150adfffc872a34bc43b8e3" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Textures/black.png", + "source_hash": "ecadd10cf819abd0902b7ffd856d52b6a20e344b", + "target_url": "./object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Textures/black.png", + "target_hash": "a1b580eaf4d3d1f9e0651999ec95fd5032ef044f" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Textures/normal.png", + "source_hash": "6af724f848e738fad67c405199092b3343f4ac5f", + "target_url": "./object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Textures/normal.png", + "target_hash": "58661fa7be703ffdc2ba0fe9db737a464039e548" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Textures/white.png", + "source_hash": "f41096a713941bb68aba9b4f9d479a9e1b9607bc", + "target_url": "./object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Textures/white.png", + "target_hash": "f9ec377b46bcc7578422358f9d7d57ca96535b90" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Num5dd77cea7d6a630001bffad3.mdl", + "source_hash": "5aaeefe2ce0b565ae3b3cf2eb0fe6a469823e2d1", + "target_url": "./object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Num5dd77cea7d6a630001bffad3.mdl", + "target_hash": "90bad7cacda1744159da14ac1cebeab1ab48abd7" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/OmniUe4Function.mdl", + "source_hash": "c13d7f38bb86542a6bd396e45375064199660e49", + "target_url": "./object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/OmniUe4Function.mdl", + "target_hash": "163810b2998546423051bba70f05781d981ba414" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place4/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/OmniUe4Base.mdl", + "source_hash": "30f37e52f6b22b4fe6b4d036b0cc40534f9235b3", + "target_url": "./object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/OmniUe4Base.mdl", + "target_hash": "377dfa0fcf8778d803a060c616a731a71c98a10b" + } + ] +} \ No newline at end of file diff --git a/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Num5dd77cea7d6a630001bffad3.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Num5dd77cea7d6a630001bffad3.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a4ffc285359ecb5d218c7124fad29e114af22ab1 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/Num5dd77cea7d6a630001bffad3.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 Num5dd77cea7d6a630001bffad3( + 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/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/OmniUe4Base.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/OmniUe4Function.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/Materials/OmniUe4Function.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f0801afff6f0870ea2574c9e9b6e2043e79e9a79 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/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/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/object_usds/grutopia_usd/Table/table/3dbeb144ae457af96d0302f474965981/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/.collect.mapping.json b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..9e9bdb7bc0b861d17e9f6fd2d76dbabcf0add566 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/.collect.mapping.json @@ -0,0 +1,173 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/base.usd", + "source_hash": "07c2268d8ab0fedeb825eb49bc02e70703c26ab7", + "target_url": "./base.usd", + "target_hash": "78090b3e3fe65d76231bc460b9720d0b8117e460" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/Downloads/brown_photostudio_02_4k.exr", + "source_hash": "7f354f01a2ebd26f6955f9920fd3cdc2e7dab034", + "target_url": "./Downloads/brown_photostudio_02_4k.exr", + "target_hash": "b5d7170cfddc269c350b7e9905efbd2edc50840b" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/0b1bd36f662743fc83a396d40bd75230.usd", + "source_hash": "77865bccc440d903b315e4e92d91b73b21fc95ab", + "target_url": "./mnt/data/assets/ivis-usd/0b1bd36f662743fc83a396d40bd75230.usd", + "target_hash": "86a8d0b4af926b3d86e94b853904a7344ff851fd" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/c4723331d1a2400d942c00004d59e1cc.usd", + "source_hash": "b4554dc8e596f748650e535852c3b7751a9752a7", + "target_url": "./mnt/data/assets/ivis-usd/c4723331d1a2400d942c00004d59e1cc.usd", + "target_hash": "cfd9bde7757aa8833cb462368f63d82b7c6666ba" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/f91e012840494cb1b60fe511f95716a2.usd", + "source_hash": "a91af592ec8dee54748085fc7b40b8c90749b8dd", + "target_url": "./mnt/data/assets/ivis-usd/f91e012840494cb1b60fe511f95716a2.usd", + "target_hash": "785c184df43a052ac67f52dc7cccf2ff98f4cc65" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/instance.usd", + "source_hash": "671d7f0aa1aa58bca16ffb570221c2ce9d71dd69", + "target_url": "./object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/instance.usd", + "target_hash": "b8581475f82e59f75d25e3f74b260aedb01e837f" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/scene_box/obj_36741e7913334f328f97f7e80403d9a0.usd", + "source_hash": "0f7314c00e1585614c80e17d145130deb44b9622", + "target_url": "./scene_box/obj_36741e7913334f328f97f7e80403d9a0.usd", + "target_hash": "7956225562d994a5d31eb613f0bb40235509f024" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/scene_box/obj_36741e7913334f328f97f7e80403d9a0_02.usd", + "source_hash": "a9fd3816aefc4fd2a9a46f4b13e2bccc9a3924a2", + "target_url": "./scene_box/obj_36741e7913334f328f97f7e80403d9a0_02.usd", + "target_hash": "01d502ccc9aaca43a211a5b7d00a5c51b31b4168" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/scene_box/obj_5ce63640d40340be940138c9b90d5eec.usd", + "source_hash": "34da42201797cb3e4c63a5cfa587cdc7d2c90908", + "target_url": "./scene_box/obj_5ce63640d40340be940138c9b90d5eec.usd", + "target_hash": "3b04b8a5726b59415a440ac0ef4c8b212a4711e9" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/c4723331d1a2400d942c00004d59e1cc_texture0.png", + "source_hash": "23dc718a474e1565a993d1d981ab88ac24c4c3a2", + "target_url": "./mnt/data/assets/ivis-usd/textures/c4723331d1a2400d942c00004d59e1cc_texture0.png", + "target_hash": "a9e5a8cfc957c2dedfc6681e1d37047a4c5929e9" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/c4723331d1a2400d942c00004d59e1cc_texture1.png", + "source_hash": "2da3b508a7de00022ed9068dcd755117acbc5f91", + "target_url": "./mnt/data/assets/ivis-usd/textures/c4723331d1a2400d942c00004d59e1cc_texture1.png", + "target_hash": "63fff882c32e18f3df9823af9caeb793cc291479" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/c4723331d1a2400d942c00004d59e1cc_texture2.png", + "source_hash": "1f09a173c5ffd69040dc7f68f8f9bd64f9078e5b", + "target_url": "./mnt/data/assets/ivis-usd/textures/c4723331d1a2400d942c00004d59e1cc_texture2.png", + "target_hash": "6814ee2e45a8c22a1e1b1c387cdcdf2f4f38b4ab" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/c4723331d1a2400d942c00004d59e1cc_texture3.png", + "source_hash": "3c33cb083ac6032fe1d0b407e5d7772ba5120380", + "target_url": "./mnt/data/assets/ivis-usd/textures/c4723331d1a2400d942c00004d59e1cc_texture3.png", + "target_hash": "a4b2415311ebab607996efa85791b5293a205ae5" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/c4723331d1a2400d942c00004d59e1cc_texture4.png", + "source_hash": "55ebc983b0140c5686bbf6f92efd8b6812e52837", + "target_url": "./mnt/data/assets/ivis-usd/textures/c4723331d1a2400d942c00004d59e1cc_texture4.png", + "target_hash": "e26110b7584795e55fc2c6701b8e21384a79ec0b" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Textures/5e6b45d7e113f60001ddbc25_color.png", + "source_hash": "a665a984f11643d16f46c5cbbc9e6aaab743a2b3", + "target_url": "./object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Textures/5e6b45d7e113f60001ddbc25_color.png", + "target_hash": "9fd0035976c75573ca98ce64941dd94dcdc378fe" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Textures/644a3bbad5d4e00001ef23cf_gloss.png", + "source_hash": "ca937791aea101a40827a174e8498e0a7b377ea1", + "target_url": "./object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Textures/644a3bbad5d4e00001ef23cf_gloss.png", + "target_hash": "dc9281d83b3994e365b37be187f782cb8ce08f5d" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Textures/black.png", + "source_hash": "088679b1428d1759857026e8b0948c9334a9678a", + "target_url": "./object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Textures/black.png", + "target_hash": "a8ef4a1bd271f2f28615d01c95ca2388f8cb7be0" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Textures/normal.png", + "source_hash": "3be3d3f7df66487073accdf51928b33dc3f0ea64", + "target_url": "./object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Textures/normal.png", + "target_hash": "b3b062c75b63096a73f664225cd0f9a51603924a" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Textures/white.png", + "source_hash": "068ef3fd9693d80c2d1da9cb8d82a31e1f269d0e", + "target_url": "./object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Textures/white.png", + "target_hash": "2b0a1c8d8d1781d22d646b7151c5532716128bc9" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/0b1bd36f662743fc83a396d40bd75230_texture0.jpg", + "source_hash": "ba3c3a64af725f09cd1149f22c89a660c78548c9", + "target_url": "./mnt/data/assets/ivis-usd/textures/0b1bd36f662743fc83a396d40bd75230_texture0.jpg", + "target_hash": "29b74fdfc9236e6c91ed5ef971c339a5eb63ea7a" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/0b1bd36f662743fc83a396d40bd75230_texture1.jpg", + "source_hash": "e56f31ac8ec638ad51c15cfbd2451f1837305e00", + "target_url": "./mnt/data/assets/ivis-usd/textures/0b1bd36f662743fc83a396d40bd75230_texture1.jpg", + "target_hash": "4e16f09f087cdad0f2fcf3b1259098e4d14fb402" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/0b1bd36f662743fc83a396d40bd75230_texture2.png", + "source_hash": "4084538a3692fd13f2dfd4f901cbba623b99c0f1", + "target_url": "./mnt/data/assets/ivis-usd/textures/0b1bd36f662743fc83a396d40bd75230_texture2.png", + "target_hash": "043f24e4af72a4327328fa32ec65ffd94b297544" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/0b1bd36f662743fc83a396d40bd75230_texture3.png", + "source_hash": "bd7a0e8ff9c0d6da1833c0dc29f81b4d1b4433ee", + "target_url": "./mnt/data/assets/ivis-usd/textures/0b1bd36f662743fc83a396d40bd75230_texture3.png", + "target_hash": "4aa4276541d1104e180c9a336b3a00a08b2b55a1" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/0b1bd36f662743fc83a396d40bd75230_texture4.png", + "source_hash": "f19262c15e0193e0311e8b4a0de560cfd257c403", + "target_url": "./mnt/data/assets/ivis-usd/textures/0b1bd36f662743fc83a396d40bd75230_texture4.png", + "target_hash": "f13de0810c3e2c7b1ad0b1bc95685b28501cf3f1" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/mnt/data/assets/ivis-usd/textures/f91e012840494cb1b60fe511f95716a2_texture0.jpg", + "source_hash": "1574516d458d5b3787dc239b8c6ee8fa0d7578d5", + "target_url": "./mnt/data/assets/ivis-usd/textures/f91e012840494cb1b60fe511f95716a2_texture0.jpg", + "target_hash": "85e4a4f2d921c1c616f9758df7c21e46d27bd25d" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Num61bc3c50c1ac85000150e185.mdl", + "source_hash": "c7e5985e4ed31f4f0b0785776d933823a4c90596", + "target_url": "./object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Num61bc3c50c1ac85000150e185.mdl", + "target_hash": "b60f1e6285c6e11f92649222d7b24686a22b3f32" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/OmniUe4Function.mdl", + "source_hash": "cadbe26c7153018cfce7fe7aa7e41873c4ce4189", + "target_url": "./object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/OmniUe4Function.mdl", + "target_hash": "bca48c386dccbfab1091288fe93032362664c95c" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_box/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/OmniUe4Base.mdl", + "source_hash": "468a4ae665607d9013aa8afaf78271e647235ec3", + "target_url": "./object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/OmniUe4Base.mdl", + "target_hash": "315580dd9476e7138a355bb718a55571a01cfe03" + } + ] +} \ No newline at end of file diff --git a/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/mnt/data/assets/ivis-usd/0b1bd36f662743fc83a396d40bd75230.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/mnt/data/assets/ivis-usd/0b1bd36f662743fc83a396d40bd75230.usda new file mode 100644 index 0000000000000000000000000000000000000000..2c29a4408cd200dbd02879ef97b4eb6559abf0a1 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/mnt/data/assets/ivis-usd/0b1bd36f662743fc83a396d40bd75230.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 "_0b1bd36f662743fc83a396d40bd75230" ( + prepend payload = @./0b1bd36f662743fc83a396d40bd75230.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/mnt/data/assets/ivis-usd/c4723331d1a2400d942c00004d59e1cc.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/mnt/data/assets/ivis-usd/c4723331d1a2400d942c00004d59e1cc.usda new file mode 100644 index 0000000000000000000000000000000000000000..960df61333d986d10a971a5cad429feebc9f07ff --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/mnt/data/assets/ivis-usd/c4723331d1a2400d942c00004d59e1cc.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 "_c4723331d1a2400d942c00004d59e1cc" ( + prepend payload = @./c4723331d1a2400d942c00004d59e1cc.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/mnt/data/assets/ivis-usd/f91e012840494cb1b60fe511f95716a2.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/mnt/data/assets/ivis-usd/f91e012840494cb1b60fe511f95716a2.usda new file mode 100644 index 0000000000000000000000000000000000000000..cf659817940f68566d9e810b3e74347eca0dbf41 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/mnt/data/assets/ivis-usd/f91e012840494cb1b60fe511f95716a2.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 "_f91e012840494cb1b60fe511f95716a2" ( + prepend payload = @./f91e012840494cb1b60fe511f95716a2.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Num61bc3c50c1ac85000150e185.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Num61bc3c50c1ac85000150e185.mdl new file mode 100644 index 0000000000000000000000000000000000000000..5b57a3398e71889025f00217965232d169cf8d14 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/Num61bc3c50c1ac85000150e185.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 Num61bc3c50c1ac85000150e185( + 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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/OmniUe4Base.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/OmniUe4Function.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/Materials/OmniUe4Function.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f0801afff6f0870ea2574c9e9b6e2043e79e9a79 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/object_usds/grutopia_usd/Table/table/21b7a06c3d66b12be13be31e59ba5392/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/scene_box/obj_36741e7913334f328f97f7e80403d9a0.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/scene_box/obj_36741e7913334f328f97f7e80403d9a0.usda new file mode 100644 index 0000000000000000000000000000000000000000..a0ec90a5599d25561be96288a5cc60760950e4e5 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/scene_box/obj_36741e7913334f328f97f7e80403d9a0.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_36741e7913334f328f97f7e80403d9a0" ( + prepend payload = @./obj_36741e7913334f328f97f7e80403d9a0.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/scene_box/obj_36741e7913334f328f97f7e80403d9a0_02.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/scene_box/obj_36741e7913334f328f97f7e80403d9a0_02.usda new file mode 100644 index 0000000000000000000000000000000000000000..1bf64fdbba62596e5906d214b240a165e039db09 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/scene_box/obj_36741e7913334f328f97f7e80403d9a0_02.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_36741e7913334f328f97f7e80403d9a0_02" ( + prepend payload = @./obj_36741e7913334f328f97f7e80403d9a0_02.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/scene_box/obj_5ce63640d40340be940138c9b90d5eec.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/scene_box/obj_5ce63640d40340be940138c9b90d5eec.usda new file mode 100644 index 0000000000000000000000000000000000000000..c6db24b4c101c0435ac427945c3f995032f93e0d --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_box/base/scene_box/obj_5ce63640d40340be940138c9b90d5eec.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_5ce63640d40340be940138c9b90d5eec" ( + prepend payload = @./obj_5ce63640d40340be940138c9b90d5eec.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/.collect.mapping.json b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..598839d3e096e22e49bfb2b7c36ebc67c3980348 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/.collect.mapping.json @@ -0,0 +1,425 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2.usd", + "source_hash": "00a928b3516af26d4bddb949f178daaefd3c700b", + "target_url": "./base_2.usd", + "target_hash": "8aacc72b9b6f0b1ed174bc33e06d59cf1bbc564c" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/Downloads/brown_photostudio_02_4k.exr", + "source_hash": "29725f32af8b6e95bef1fb6953bafb98f8df8d9e", + "target_url": "./Downloads/brown_photostudio_02_4k.exr", + "target_hash": "e2191354d7579e253546c30f944977f29f382034" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/instance.usd", + "source_hash": "31cf945c73fdaace11541742435e98728f6d6843", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/instance.usd", + "target_hash": "ce7b2a70358a143118052b137a2275dafb561bbb" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/149d47c6c27648a6af26d6c912c03826.usd", + "source_hash": "356c9fc7b46608effc1de9081142a0746bf8d4b1", + "target_url": "./object_usds/objaverse_usd/149d47c6c27648a6af26d6c912c03826.usd", + "target_hash": "6ceffbd81146d153a913515765b4adac87cf6aec" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/52704c1bafd44bfd9e98538276ad5614.usd", + "source_hash": "e4e74a8803eef5ea6d8d17ca75d0261517d1b64e", + "target_url": "./object_usds/objaverse_usd/52704c1bafd44bfd9e98538276ad5614.usd", + "target_hash": "556c7eedcf39f02cf15767f85d483b464574c94e" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/797e7c7f61104b6785c3bd0fdb99c74d.usd", + "source_hash": "a7b8d0e444e236a575051f04b1fa6d8c3c93e6ec", + "target_url": "./object_usds/objaverse_usd/797e7c7f61104b6785c3bd0fdb99c74d.usd", + "target_hash": "a304b90786825d2e7f624bf0c4427afeb339dbc6" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/9f79ee359a23478ab9d2cc0d0da3fc39.usd", + "source_hash": "d96ec64777e14d8d138646f385d2d7655c4db8b7", + "target_url": "./object_usds/objaverse_usd/9f79ee359a23478ab9d2cc0d0da3fc39.usd", + "target_hash": "87de95788a3ff638a1a264df70c8a87c037fe455" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/b6c09ed6acaa45ebb20c53696372ce3a.usd", + "source_hash": "9d7e6ab037ab284c9f4eaa9cc0a1844d65b42aa4", + "target_url": "./object_usds/objaverse_usd/b6c09ed6acaa45ebb20c53696372ce3a.usd", + "target_hash": "eaa95aa511d5a576416941f278f6a3068862acd1" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/c594cb43f36140c8a422b069d6d9714d.usd", + "source_hash": "9a0c678cd6998ce8e32cc98031a31d13b644e79a", + "target_url": "./object_usds/objaverse_usd/c594cb43f36140c8a422b069d6d9714d.usd", + "target_hash": "f65be6912c769f6db0233d568342de322cddee5f" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/daf860020fdf4ed392f07933977ee89b.usd", + "source_hash": "6d4eb3f82a6e8ea363d5595bc523ba30528a1a4d", + "target_url": "./object_usds/objaverse_usd/daf860020fdf4ed392f07933977ee89b.usd", + "target_hash": "ec6561427e2be381426f41b600f890e0124fbf9f" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/f0a9fc8b51004680904f320e7133e951.usd", + "source_hash": "8769621b49df73c4ac2e83e6160778e22bfff0dc", + "target_url": "./object_usds/objaverse_usd/f0a9fc8b51004680904f320e7133e951.usd", + "target_hash": "5bb2816280ea64a6fba5567dec75ae77d7d6a7c5" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/c594cb43f36140c8a422b069d6d9714d_texture0.jpg", + "source_hash": "2f424798f1c81146d6106da682837a2d9d2f12a7", + "target_url": "./object_usds/objaverse_usd/textures/c594cb43f36140c8a422b069d6d9714d_texture0.jpg", + "target_hash": "07238c53bad1430d78ceb550616d4dcd46e00b98" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/c594cb43f36140c8a422b069d6d9714d_texture1.jpg", + "source_hash": "822d2e789245145d836b37b1c8c82fe5ac791307", + "target_url": "./object_usds/objaverse_usd/textures/c594cb43f36140c8a422b069d6d9714d_texture1.jpg", + "target_hash": "f83b328abed1f419872978edae08b55510c26df0" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/60a267dce113f60001afea51_color.png", + "source_hash": "89c8c1be66f0c8413279615ea854c251d5499e0f", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/60a267dce113f60001afea51_color.png", + "target_hash": "edf04cae9bc1c8c907467d546b50191175449472" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/black.png", + "source_hash": "7df0a932cba948b8d299210750e2788a7a224b0e", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/black.png", + "target_hash": "6bc97026ee939f0e081312429b00f21af44679b2" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/normal.png", + "source_hash": "84f8434b41159087b73cfe0d77f96ab2d5d8cc26", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/normal.png", + "target_hash": "e65632b14f2df81f7b4212499a46548c3153a65a" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/white.png", + "source_hash": "591bcf8c09fde1a6f73d7dbd28eb6faf73c66b0b", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Textures/white.png", + "target_hash": "d1b94ca56efea56786b00b3f400a5f72b298973c" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture0.png", + "source_hash": "b00d86dc93be68534440cdb369563635f6e900ae", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture0.png", + "target_hash": "3934833ba63154a7da49520c6bb4dc7e989efaff" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture1.png", + "source_hash": "49fd7fe01ece38006164314f856051521b6f5b4c", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture1.png", + "target_hash": "440448d69e57606fa18d075ba88087bf317c8c53" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture10.png", + "source_hash": "8af0e0e31b1191f701d367731f5a9647aafdc69a", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture10.png", + "target_hash": "6fad8aa48bc4e31e78a32441b1c4fa436b92bb6a" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture11.png", + "source_hash": "e2854af28d7c844218f701c5079643d003432a58", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture11.png", + "target_hash": "fbebb76e9e5d6d8ff1ab2bd9127d0c946dfbd778" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture12.png", + "source_hash": "4aad43dc41b112d7d55a657921791c55591878f9", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture12.png", + "target_hash": "c8d3c38be87236a0ab1e3dc3d07a7e7e24cbacf3" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture13.png", + "source_hash": "d90fe0d77e7cc98cbd3a98f907c426ab619a64f9", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture13.png", + "target_hash": "c2cabb81bb6b3c6db031ab5ac12fc000146f5b4f" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture14.png", + "source_hash": "40a6a44ffe9593dbfbe8f63a0f5ad0ad1e490525", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture14.png", + "target_hash": "b40ff874014683e7d2e3035a71584b6460b14a77" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture15.png", + "source_hash": "e71b1c50327cc4e7b1e4b39a792ceb9c1b8a7e02", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture15.png", + "target_hash": "c7deff889f2c279062214aab107ab42d6a2042e3" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture2.png", + "source_hash": "eb9f080d1d6f0ede65c26e77227e40fd86744d21", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture2.png", + "target_hash": "a4179b7232203e09e7d06669420ead092284052c" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture3.png", + "source_hash": "f26254dcb4d1649fa5a6d873005e44bddea068ab", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture3.png", + "target_hash": "21a7432497d00071db289e78f3c81dd03242f40c" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture4.png", + "source_hash": "21a75900aaf25e80cd6d4b912549bb81878320da", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture4.png", + "target_hash": "5b67cc6d5968bf5ba28af98e473088a0c5d2dbf4" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture5.png", + "source_hash": "66c4e25de149d51aafb2713c95283ed3b4d10830", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture5.png", + "target_hash": "42d384b74c043b3d84223eef92fc707448b16826" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture6.png", + "source_hash": "99f07a15e0b02889db97355ccc5e79190532bf25", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture6.png", + "target_hash": "1348e71c852db3fbd3ba150fde46a3e2f77af568" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture7.png", + "source_hash": "4705aec3e2b60d765a4d2afc8ce0e1cf5086776d", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture7.png", + "target_hash": "5dcc51d185f6151e98ae1f2c884b5953860577db" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture8.png", + "source_hash": "5ed8e32a4931bb26d2b487a0890050b29285da33", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture8.png", + "target_hash": "c7d40035712c0c2af096a91e6b88e599ce932ef6" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture9.png", + "source_hash": "e0951694e99da6cf74114ed3182356bd577f291f", + "target_url": "./object_usds/objaverse_usd/textures/daf860020fdf4ed392f07933977ee89b_texture9.png", + "target_hash": "124f60bf0466199d3113541adfc5f556b4729d39" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture0.png", + "source_hash": "5b59c0ae4cecc80603457324ad298a43991bfed6", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture0.png", + "target_hash": "ed0f88c6ed88214367627b58cb0af3e225543e6b" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture1.png", + "source_hash": "790cb4951b5335c18197062eb0662835d1465319", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture1.png", + "target_hash": "6bfad9fca62959732effb53b6358ebf0376b5303" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture2.png", + "source_hash": "188d5ef02d1845680efb011aa6af25b745b08953", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture2.png", + "target_hash": "35a8cfb227a321a7576230ececc67820c0ba4217" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture3.png", + "source_hash": "587f87a678d0259f85b30545947c53798de2f917", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture3.png", + "target_hash": "59cd1a4543a854b76c59d9ae80a8ba01c1492c86" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture4.png", + "source_hash": "91f767eed981b6c3958e0a3ea72d964233ad0db4", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture4.png", + "target_hash": "a8481565f9d13a03e2421853d5dd44294b3ca087" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture5.png", + "source_hash": "04313915997c8c45d55519e75cb72fa3eadbd9d3", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture5.png", + "target_hash": "6f1d40ead5652d14aaa7bbef77cd24ca2d09ffdc" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture6.png", + "source_hash": "60840a4228177d4f618b572378f661136dbe13b5", + "target_url": "./object_usds/objaverse_usd/textures/f0a9fc8b51004680904f320e7133e951_texture6.png", + "target_hash": "5b2973b10930ac00075fa80b662b15f7794a9ba0" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture0.png", + "source_hash": "330289ef8639446800825e6571d0fe808160aba2", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture0.png", + "target_hash": "04c28e17bec68862c67853962e55b25453cf7a16" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture1.png", + "source_hash": "5c18c00a0e7e995d8eecefb90f1efdeac069b9ab", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture1.png", + "target_hash": "ebb00a6f5caccd1b2652af02a2cbb80c263915b4" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture2.png", + "source_hash": "58bf58d386328108045941f29f1f89639a4ecc15", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture2.png", + "target_hash": "0a99acfb462fb85e0ed9a0e1a107b0bbcaaadbf9" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture3.png", + "source_hash": "4442e2335c4cec45bcc05b78867887465629d106", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture3.png", + "target_hash": "477ed1e63e511cb23a4d4959e256ea130200773e" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture4.png", + "source_hash": "e3658a0c155d1433b70abe6291a97e094b728f7f", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture4.png", + "target_hash": "1bdafeb2e947452b8461c2638562dc07b61bd6fc" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture5.png", + "source_hash": "4dc6cde318efbdcf7eed4ca825a6d871823b0d55", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture5.png", + "target_hash": "6c2af7d9ad4f9c53e3840fea593f5a07b3cacda0" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture6.png", + "source_hash": "7a60a6103cb063db1eaa441c1a05efe8b95db448", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture6.png", + "target_hash": "45899095ca5f9daca5a072422dc733523c798476" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture7.png", + "source_hash": "3a531f8b4f8d81c3b599f0f51ed368371f11a15a", + "target_url": "./object_usds/objaverse_usd/textures/797e7c7f61104b6785c3bd0fdb99c74d_texture7.png", + "target_hash": "80ceb873988082e4c1e5a7505ecf6b6449eafef8" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture0.png", + "source_hash": "ad49826428e4a2a84b3b20f2c5eaaa45ff072ed1", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture0.png", + "target_hash": "d77ada956d69d427675ec267b6074f29df5ea2dd" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture1.png", + "source_hash": "a5be82c729d322d0b3e697cae6455401592f61d2", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture1.png", + "target_hash": "0ae216e84b2ee2bbe3ffa17a38ef2e2288f84086" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture2.png", + "source_hash": "2b9b843790f96dd861a2ebffb7ca7ade3fa89b33", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture2.png", + "target_hash": "552494c319610505064a68a217f3639e4059366d" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture3.png", + "source_hash": "a44bd7c8fc9159bb70673b766165a67be7d7a44a", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture3.png", + "target_hash": "51732dbf1f38cc3770930a98ab27257e6c814d7e" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture4.png", + "source_hash": "a9981529b9c52c88439f16e9736ad00a379d5189", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture4.png", + "target_hash": "e4e9eaa4d7d7ecaec51923b34cb9d2d527508210" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture5.png", + "source_hash": "723be4ddbe95481581a5eff5083b9c538f4f6c25", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture5.png", + "target_hash": "a39117242eb7cf269df3dfaa400731cca4e117f4" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture6.png", + "source_hash": "44590f08ede5f1ca3888231f28a9bce19dcb7e60", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture6.png", + "target_hash": "b849eb466536f6a0f8d4cd275f6a2f90dca14ad9" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture7.png", + "source_hash": "34e8c93bc63688ee8419d2d66606da54008b34d2", + "target_url": "./object_usds/objaverse_usd/textures/52704c1bafd44bfd9e98538276ad5614_texture7.png", + "target_hash": "7715d4b07991edba10e55859c240aa91014d61fb" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/149d47c6c27648a6af26d6c912c03826_texture0.jpg", + "source_hash": "d26c0325460eeba406e8f28278680a76c78fa7f6", + "target_url": "./object_usds/objaverse_usd/textures/149d47c6c27648a6af26d6c912c03826_texture0.jpg", + "target_hash": "2aa6718453d7f16da2006b8d679793895b3dd715" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture0.png", + "source_hash": "3d52979da1d5df9fb4705c9874142293f03a3d5a", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture0.png", + "target_hash": "d03b4da6e2bfe51613eb283777fd0db59ff0e266" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture1.png", + "source_hash": "be5938f4815a5fb2047303eefb9397f4d59bc13a", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture1.png", + "target_hash": "aa5522c6610b27b406529dbb15d4cd8a6c6999a8" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture2.png", + "source_hash": "14f2ad462db859be582f74ad48bb1ed563ad7d92", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture2.png", + "target_hash": "9a5c94de54a61e5b742a9419b678242c6bfb039d" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture3.png", + "source_hash": "288aa2477fe8073d2d2a9253d2d2880314ceb999", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture3.png", + "target_hash": "16367d5e10c1784c87dc0d7a288c0042934b9182" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture4.png", + "source_hash": "fb993072d4de818431a0d0f723dd9a3287b7f5e1", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture4.png", + "target_hash": "db3871dca8bd123c3a43ddb74f43421e046852aa" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture5.png", + "source_hash": "4800201d8b07975b54e0b50133a36f36ccf539b0", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture5.png", + "target_hash": "9ee865b14ac9921f4ead51593e3656cb55b663a0" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture6.png", + "source_hash": "c6920429f5051dbf3d47179e213275d63af6311b", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture6.png", + "target_hash": "842e5786b721693496137892e478f3acd0eb21a5" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture7.png", + "source_hash": "f38568c7bd2ba4c55f8ca4177fa1f72dcbd02245", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture7.png", + "target_hash": "eb516a12fa1bf7b589eeb2948803c540710ad581" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture8.png", + "source_hash": "b839c97153f16d695d9f5e2b6306d81202b418b8", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture8.png", + "target_hash": "1972d09903f25915468fad2eb4a3199e750847db" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture9.png", + "source_hash": "e68edb0cfb16b5d1f4315cc4aa92c4de3181fb47", + "target_url": "./object_usds/objaverse_usd/textures/9f79ee359a23478ab9d2cc0d0da3fc39_texture9.png", + "target_hash": "9fd029c2fce7864814962710e9538536a6fc22c4" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Num608bbc47c6ff5a0001d607d8.mdl", + "source_hash": "132ac282d3075962de62456603a379b323fc77f0", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/Num608bbc47c6ff5a0001d607d8.mdl", + "target_hash": "84d3c3d2cbb1655aaa7d42206dce12b5b73a0ce2" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Function.mdl", + "source_hash": "7af4085cdbfca7aab80e9c53838434bc7ab53445", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Function.mdl", + "target_hash": "c90afd6df18ec79ff3aaa03a5cffaff332cff8ef" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_cup/object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Base.mdl", + "source_hash": "960bd79c3b52fc2bf1e5fc9f97018ff60d7ab84f", + "target_url": "./object_usds/grutopia_usd/Table/table/638809136a3aed4ed81d9d8a63967d30/Materials/OmniUe4Base.mdl", + "target_hash": "642ba95d46601f74525d6a76b7e0091e7d695e00" + } + ] +} \ No newline at end of file diff --git a/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/149d47c6c27648a6af26d6c912c03826.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/149d47c6c27648a6af26d6c912c03826.usda new file mode 100644 index 0000000000000000000000000000000000000000..22bde0f734461decb12384b02a63cc3186ec1a46 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/149d47c6c27648a6af26d6c912c03826.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 "_149d47c6c27648a6af26d6c912c03826" ( + prepend payload = @./149d47c6c27648a6af26d6c912c03826.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/52704c1bafd44bfd9e98538276ad5614.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/52704c1bafd44bfd9e98538276ad5614.usda new file mode 100644 index 0000000000000000000000000000000000000000..0391cb265819fcf966dc0a480f0caa26205ed828 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/52704c1bafd44bfd9e98538276ad5614.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 "_52704c1bafd44bfd9e98538276ad5614" ( + prepend payload = @./52704c1bafd44bfd9e98538276ad5614.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/797e7c7f61104b6785c3bd0fdb99c74d.usd b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/797e7c7f61104b6785c3bd0fdb99c74d.usd new file mode 100644 index 0000000000000000000000000000000000000000..5c309f2740ecece1b04736c8a14fea066235b4a7 Binary files /dev/null and b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/797e7c7f61104b6785c3bd0fdb99c74d.usd differ diff --git a/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/797e7c7f61104b6785c3bd0fdb99c74d.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/797e7c7f61104b6785c3bd0fdb99c74d.usda new file mode 100644 index 0000000000000000000000000000000000000000..dec04d99cc7da0a6eff7895c6107dceca60fec8a --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/797e7c7f61104b6785c3bd0fdb99c74d.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 "_797e7c7f61104b6785c3bd0fdb99c74d" ( + prepend payload = @./797e7c7f61104b6785c3bd0fdb99c74d.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/9f79ee359a23478ab9d2cc0d0da3fc39.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/9f79ee359a23478ab9d2cc0d0da3fc39.usda new file mode 100644 index 0000000000000000000000000000000000000000..8f7ae3b6ee0c8fbe5e75cfe4aca71b8d43d1ad77 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/9f79ee359a23478ab9d2cc0d0da3fc39.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 "_9f79ee359a23478ab9d2cc0d0da3fc39" ( + prepend payload = @./9f79ee359a23478ab9d2cc0d0da3fc39.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/b6c09ed6acaa45ebb20c53696372ce3a.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/b6c09ed6acaa45ebb20c53696372ce3a.usda new file mode 100644 index 0000000000000000000000000000000000000000..dac4592c19ce34d5ee61e0e98343d1f7cd668fe8 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/b6c09ed6acaa45ebb20c53696372ce3a.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 "_b6c09ed6acaa45ebb20c53696372ce3a" ( + prepend payload = @./b6c09ed6acaa45ebb20c53696372ce3a.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/c594cb43f36140c8a422b069d6d9714d.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/c594cb43f36140c8a422b069d6d9714d.usda new file mode 100644 index 0000000000000000000000000000000000000000..0d2d2a047fea4cbbce34f730633d7ee96f46a9e4 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/c594cb43f36140c8a422b069d6d9714d.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 "_c594cb43f36140c8a422b069d6d9714d" ( + prepend payload = @./c594cb43f36140c8a422b069d6d9714d.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/daf860020fdf4ed392f07933977ee89b.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/daf860020fdf4ed392f07933977ee89b.usda new file mode 100644 index 0000000000000000000000000000000000000000..00f9a551dbefcb64e57c1e74c23fe0f02d06d9a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/f0a9fc8b51004680904f320e7133e951.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/f0a9fc8b51004680904f320e7133e951.usda new file mode 100644 index 0000000000000000000000000000000000000000..15747b4320fde92e5c2c9289acaf37f607416985 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_cup/base_2/object_usds/objaverse_usd/f0a9fc8b51004680904f320e7133e951.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 "_f0a9fc8b51004680904f320e7133e951" ( + prepend payload = @./f0a9fc8b51004680904f320e7133e951.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Num5df0a8e15974ed0001f1de95.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Num5df0a8e15974ed0001f1de95.mdl new file mode 100644 index 0000000000000000000000000000000000000000..ba73cea245a1ed30b11059d89aed687bb70e3d1c --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Num5df0a8e15974ed0001f1de95.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 Num5df0a8e15974ed0001f1de95( + 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/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/OmniUe4Base.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/objects/obj_base_glb_09.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/objects/obj_base_glb_09.usda new file mode 100644 index 0000000000000000000000000000000000000000..57e997e9b931aa6df52abbf1dbf3aa7fbb875c54 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/.collect.mapping.json b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..fc3a5339dd0c1bccb968b5ec73b8ff3cf0898734 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/.collect.mapping.json @@ -0,0 +1,275 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/base.usd", + "source_hash": "16db79aaf8d79e88b9a8d6d30773aa31f98ebf7e", + "target_url": "./base.usd", + "target_hash": "bf2446ce40af2a07666f28df6bf87bde7af41f3d" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/Downloads/brown_photostudio_02_4k.exr", + "source_hash": "5f3c38d9a19306cbcf8b71f5b5db65c59b8b811b", + "target_url": "./Downloads/brown_photostudio_02_4k.exr", + "target_hash": "4da4b3b94ccb1103d8517f3e1a400695e70f6504" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/instance.usd", + "source_hash": "9482fdd1b2753add8d73b69c3eff24f01368dbf2", + "target_url": "./object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/instance.usd", + "target_hash": "2ae92f89e406151feb8b2591a400e1fec613ba1f" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/4044fb4864184c0fa360bf327a84ee4d.usd", + "source_hash": "5f7b3021fd3972e16a2c87805e0ddec5f3930848", + "target_url": "./object_usds/objaverse_usd/4044fb4864184c0fa360bf327a84ee4d.usd", + "target_hash": "60b3727ac6f4cf461bd34cdab5c1f192208f4800" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/6281bf3703584323bb4d8326f1f1b59d.usd", + "source_hash": "c9047b3d5a0f43c81e0656620aef02eb944e1d11", + "target_url": "./object_usds/objaverse_usd/6281bf3703584323bb4d8326f1f1b59d.usd", + "target_hash": "e1ebd0540106dcd562341778613c083b78946d93" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/6a9e1ece41cb40efa69dae21e9fe704b.usd", + "source_hash": "12f5757a7e1f229a1f78638d5f795535a5f3446f", + "target_url": "./object_usds/objaverse_usd/6a9e1ece41cb40efa69dae21e9fe704b.usd", + "target_hash": "a4231b8ed77fb08d22e09b4fdd9ee6c812e1843e" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/7f24dc2cae76416bae7daeb4cf6db77c.usd", + "source_hash": "6cfb93efecadfc11a49769deed911e4c4ffd5ff0", + "target_url": "./object_usds/objaverse_usd/7f24dc2cae76416bae7daeb4cf6db77c.usd", + "target_hash": "a93b985020f47a4f580e72bea10012be89a90236" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/scene_paint/obj_brush_pen.usd", + "source_hash": "682553dfe4d63b41055e189990c4495df3ef56ea", + "target_url": "./scene_paint/obj_brush_pen.usd", + "target_hash": "56ecea660d86f9456d164e07baa3f0e405c7275c" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6a9e1ece41cb40efa69dae21e9fe704b_texture0.png", + "source_hash": "683e5533d0ce8c411e25ecb9b47c4016281cb832", + "target_url": "./object_usds/objaverse_usd/textures/6a9e1ece41cb40efa69dae21e9fe704b_texture0.png", + "target_hash": "b6987502821b86f9d650569eb9e5c83e99a4b68c" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6a9e1ece41cb40efa69dae21e9fe704b_texture1.png", + "source_hash": "8988e13b5319f7ed1ce7d2d5e7044d8e5993aa4f", + "target_url": "./object_usds/objaverse_usd/textures/6a9e1ece41cb40efa69dae21e9fe704b_texture1.png", + "target_hash": "766b218140972ecadb2c23fb1f0757561e134558" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6a9e1ece41cb40efa69dae21e9fe704b_texture2.png", + "source_hash": "894cc49de04dba89d203f6a87ce3b7f651469285", + "target_url": "./object_usds/objaverse_usd/textures/6a9e1ece41cb40efa69dae21e9fe704b_texture2.png", + "target_hash": "665b498884752d211e9acf74e6f727005f260304" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/4044fb4864184c0fa360bf327a84ee4d_texture0.png", + "source_hash": "8aa46a89f89eff6d7e56a0b3da71fcd186984e91", + "target_url": "./object_usds/objaverse_usd/textures/4044fb4864184c0fa360bf327a84ee4d_texture0.png", + "target_hash": "f2ff12443bc8574645df643646fd4f486beb5db2" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/4044fb4864184c0fa360bf327a84ee4d_texture1.png", + "source_hash": "6d61bc56f9ac4ac5fa71650b757a453de1793ad9", + "target_url": "./object_usds/objaverse_usd/textures/4044fb4864184c0fa360bf327a84ee4d_texture1.png", + "target_hash": "e8c21ce900148f01b51e2c09a08b6c384f7c1852" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/4044fb4864184c0fa360bf327a84ee4d_texture2.png", + "source_hash": "77a9e8f45f5478f5576f233a760157f2fbdfe1fc", + "target_url": "./object_usds/objaverse_usd/textures/4044fb4864184c0fa360bf327a84ee4d_texture2.png", + "target_hash": "e0273ca36d4bfc22fe6defc7e15f7b686489fd63" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/repos/RoboTwin/assets/objects/usds/093_brush-pen_base1_converted/textures/texture_diffuse.png", + "source_hash": "72f47ad3c0a10b489cca07b8cc0d1f2f2fb17697", + "target_url": "./scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/repos/RoboTwin/assets/objects/usds/093_brush-pen_base1_converted/textures/texture_diffuse.png", + "target_hash": "912a5687d71a33d9db7930611d6dbb3bced285a8" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/repos/RoboTwin/assets/objects/usds/093_brush-pen_base1_converted/textures/texture_metallic-texture_roughness.png", + "source_hash": "952bfcc24522ac3579dc7c09816f5b3588243a21", + "target_url": "./scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/repos/RoboTwin/assets/objects/usds/093_brush-pen_base1_converted/textures/texture_metallic-texture_roughness.png", + "target_hash": "e19058c3ec01ca344cfbd65f5457d13266ebcb29" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/repos/RoboTwin/assets/objects/usds/093_brush-pen_base1_converted/textures/texture_normal.png", + "source_hash": "52f932fb00e7fe898e8a9a7143874faa894855cf", + "target_url": "./scene_paint/saved/assets/scene_usds/IROS_scenes_collected/scene_paint/repos/RoboTwin/assets/objects/usds/093_brush-pen_base1_converted/textures/texture_normal.png", + "target_hash": "15f5cf71f72776e2973208a7a04fd656bf1cd2fd" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture0.jpg", + "source_hash": "f53a43484ea9dc8ebe108a1eb48d0c405e942b80", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture0.jpg", + "target_hash": "0e47b462c864cdc7b0defb903038d75026a3f049" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture1.png", + "source_hash": "3ef3032461e7c3f872e91c17bc718d4d33da9b78", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture1.png", + "target_hash": "86300d4610318435c5d80569fd529999b8bdbbf8" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture10.png", + "source_hash": "4ecfe932ae18a99f421d39109e059776df824fd7", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture10.png", + "target_hash": "05a6b31389de71e164856af7a16897e351b007b5" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture11.png", + "source_hash": "8e4ab61262c74a1e1175c78d89413b5c735ca3db", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture11.png", + "target_hash": "b6619d1479e7c119509997ed926032e85a8fcf8c" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture12.jpg", + "source_hash": "8b3f72839fa36b7680728736e0953ed6cc6dceb3", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture12.jpg", + "target_hash": "8eb1859aa5f4b0882ffaf6060f0b202e8bd22bbb" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture13.png", + "source_hash": "b3016ad43c085fd2b777cbcad1d525e0626fb5e8", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture13.png", + "target_hash": "385343fd3dbdba5eac4184a0caf8e31f68be5c47" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture14.png", + "source_hash": "210b046c43370ddeb839378149eac9717202f790", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture14.png", + "target_hash": "e0a6e31eedd4018c7c52012f31b1627bd2bfe09f" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture15.png", + "source_hash": "8784091644bb14855de48a91ba74b34b8be72d0b", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture15.png", + "target_hash": "19541671b6a35f1b03dc4e6a83ef1107b835e289" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture2.png", + "source_hash": "b51d5616d252204a1a85494365616ace9d29224e", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture2.png", + "target_hash": "ac1ed17ae387fb0fd17c240e9f1918ba542aa17a" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture3.png", + "source_hash": "b87c4cd6670b42d17c6227165698d53c199291f2", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture3.png", + "target_hash": "3a6e273abb1836a89483e76faef79988d63cb5da" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture4.jpg", + "source_hash": "4ba083753ccc6f7415c8e8726e9dbb76bcc3cb2d", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture4.jpg", + "target_hash": "9d778aa35b9e9fe18d0504176b377383739e531d" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture5.png", + "source_hash": "10019f974c0056ae2f3b6b113a6103ac4a62a28f", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture5.png", + "target_hash": "a06807701b90be6cf695167c4f87bae46cfc8526" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture6.png", + "source_hash": "3e10fb103a1e5d9720e80210193b6639c653830b", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture6.png", + "target_hash": "c5eb9e951bdbdd2def1a143deec5838fd624dcee" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture7.png", + "source_hash": "d0d7d78259d10c9c5bb797ac921aecb98a69d40d", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture7.png", + "target_hash": "c95748070aeae1a1ab53ab6bab623e375bddebea" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture8.jpg", + "source_hash": "6da2bc170ab42fe8d6a9bf3f99d0e81a7c38dff1", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture8.jpg", + "target_hash": "e03d8f5c647f01be84d6656c322fb14706cc60e9" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture9.png", + "source_hash": "aed3c1a67bc2b1e9c4d7a3b8926a4a0a02dd91b2", + "target_url": "./object_usds/objaverse_usd/textures/6281bf3703584323bb4d8326f1f1b59d_texture9.png", + "target_hash": "9dd2ae6808b022aa711e7b03b4938acde3190b40" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/636950a3c37a2a000199804b_color.png", + "source_hash": "8af343a4123622389a60e1dea964d07c93206f41", + "target_url": "./object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/636950a3c37a2a000199804b_color.png", + "target_hash": "7495d9bd6b1be35c03e11a968b6b33d8c694d30a" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/636950a3c37a2a000199804b_metallic.png", + "source_hash": "98b245a2445d4930072ef49d753d58a05af31d7e", + "target_url": "./object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/636950a3c37a2a000199804b_metallic.png", + "target_hash": "38c3e15a1598238dd4e38f680f87ccd770b992f5" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/636950a3c37a2a000199804b_specular.png", + "source_hash": "6a15d9aae8574d9c7f08d40d379a2c5c36aceb68", + "target_url": "./object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/636950a3c37a2a000199804b_specular.png", + "target_hash": "167e4eae279d0b6c98c1ec5be5b79af307998616" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/black.png", + "source_hash": "8025e81a08fae2991dabb2864ba5ae66e9bac85b", + "target_url": "./object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/black.png", + "target_hash": "7e2989b7994ef95db8835381eef1174c08fb2f69" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/normal.png", + "source_hash": "16000eb8075f88b16a7626dfd4fd69481dd90bd3", + "target_url": "./object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/normal.png", + "target_hash": "5bb8a217fae0cf9885f5d5ae0924742ffd0dae54" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/white.png", + "source_hash": "9715143db05539b37f62edd9758d00713b778132", + "target_url": "./object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Textures/white.png", + "target_hash": "02e87a55578813fecdc927a823d40ae996a615b6" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/7f24dc2cae76416bae7daeb4cf6db77c_texture0.png", + "source_hash": "2689b45782b12d06219ec1cc58c68c9a9bef7f4e", + "target_url": "./object_usds/objaverse_usd/textures/7f24dc2cae76416bae7daeb4cf6db77c_texture0.png", + "target_hash": "d7cdf9bbeff3a41917c79dc05112ec06d2ca495b" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/7f24dc2cae76416bae7daeb4cf6db77c_texture1.png", + "source_hash": "568446ade50a822614ea93e1ac29e08f39941a39", + "target_url": "./object_usds/objaverse_usd/textures/7f24dc2cae76416bae7daeb4cf6db77c_texture1.png", + "target_hash": "3ca8885e0cfc17f7e02f0f3da47355554356d7af" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/objaverse_usd/textures/7f24dc2cae76416bae7daeb4cf6db77c_texture2.png", + "source_hash": "c9b0d106a17d5fc8682eaaf076488b8b1c6559fd", + "target_url": "./object_usds/objaverse_usd/textures/7f24dc2cae76416bae7daeb4cf6db77c_texture2.png", + "target_hash": "f4caad4afbeefa0136ca36096970fb5b4d4766d7" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Num604604837fdaa40001bb718c.mdl", + "source_hash": "8324c0843bab339921345bd6b30214e899348ac9", + "target_url": "./object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Num604604837fdaa40001bb718c.mdl", + "target_hash": "5a4286cea15e2b998b192c95a631bb3968e6a51a" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Function.mdl", + "source_hash": "c88c885f1c6317d90aed72f8df3f7dbfe57c2da1", + "target_url": "./object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Function.mdl", + "target_hash": "58e44e77728d58d71e31db597d22e5d07ee1830f" + }, + { + "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_paint/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Base.mdl", + "source_hash": "8911ecc8bbac46b6e4e8eb745b0a8175f3cf4281", + "target_url": "./object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Base.mdl", + "target_hash": "1845cea57f1025da8837c319ca403f6455cdef1b" + } + ] +} \ No newline at end of file diff --git a/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Num604604837fdaa40001bb718c.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/Num604604837fdaa40001bb718c.mdl new file mode 100644 index 0000000000000000000000000000000000000000..03da8ecd7abaf7cc3b4782ee6316fda03541c7ef --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Base.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Base.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a441fbaf28040302c7aaabfbcf14b24a85bdf643 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Function.mdl b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/Materials/OmniUe4Function.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f0801afff6f0870ea2574c9e9b6e2043e79e9a79 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/instance.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/grutopia_usd/Table/table/3d1b722b5ed484506cfdc126de353335/instance.usda new file mode 100644 index 0000000000000000000000000000000000000000..f6d300f4e0478635a99547a874ee7f192385b4a6 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/objaverse_usd/4044fb4864184c0fa360bf327a84ee4d.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/objaverse_usd/4044fb4864184c0fa360bf327a84ee4d.usda new file mode 100644 index 0000000000000000000000000000000000000000..ac1fcd681ad8b344003790d143b33c5c3130678a --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/objaverse_usd/6281bf3703584323bb4d8326f1f1b59d.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/objaverse_usd/6281bf3703584323bb4d8326f1f1b59d.usda new file mode 100644 index 0000000000000000000000000000000000000000..07c41e25b73f8f8cae7c85cfcb72f0cc5094f984 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/objaverse_usd/6a9e1ece41cb40efa69dae21e9fe704b.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/objaverse_usd/6a9e1ece41cb40efa69dae21e9fe704b.usda new file mode 100644 index 0000000000000000000000000000000000000000..2100daf83dd564c12728631c4ae8a50fa9e31101 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/objaverse_usd/7f24dc2cae76416bae7daeb4cf6db77c.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/object_usds/objaverse_usd/7f24dc2cae76416bae7daeb4cf6db77c.usda new file mode 100644 index 0000000000000000000000000000000000000000..12e44bc85f4abb3ac390009828997f81f51c89d9 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/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/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/scene_paint/obj_brush_pen.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/scene_paint/obj_brush_pen.usda new file mode 100644 index 0000000000000000000000000000000000000000..dc6b29184b8de29b3a631bd8823acf2df972e88f --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_paint/base/scene_paint/obj_brush_pen.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_brush_pen" ( + prepend payload = @./obj_brush_pen.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_beef.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_beef.usda new file mode 100644 index 0000000000000000000000000000000000000000..e2fd2ea9eddd6ecc0f67d1ded297571f86f2e0bb --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_beef.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_beef" ( + prepend payload = @./obj_beef.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board1.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board1.usda new file mode 100644 index 0000000000000000000000000000000000000000..3d8d08250571f7e56f853ee630c45849ee75ecea --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board1.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_board1" ( + prepend payload = @./obj_board1.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board2.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board2.usda new file mode 100644 index 0000000000000000000000000000000000000000..1a9da11d86e8d0a1e2dd1dbca8160dc1ef2b8fef --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board2.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_board2" ( + prepend payload = @./obj_board2.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board3.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board3.usda new file mode 100644 index 0000000000000000000000000000000000000000..123add371801e32008aaf3fceee053bf0d1f7b3d --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board3.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_board3" ( + prepend payload = @./obj_board3.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board5.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board5.usda new file mode 100644 index 0000000000000000000000000000000000000000..b5bf0cfc00ada115cabffe26e75a7150b2391ec0 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board5.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_board5" ( + prepend payload = @./obj_board5.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board6.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board6.usda new file mode 100644 index 0000000000000000000000000000000000000000..b51a000b50e10108867a661be1f48fcdde9bde74 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board6.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_board6" ( + prepend payload = @./obj_board6.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board7.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board7.usda new file mode 100644 index 0000000000000000000000000000000000000000..6f8af8d208cf1dc9ba18061f931debfcda24632e --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board7.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_board7" ( + prepend payload = @./obj_board7.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board8.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board8.usda new file mode 100644 index 0000000000000000000000000000000000000000..4babe310b3709d0a60bf31f95d702389406d6602 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board8.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_board8" ( + prepend payload = @./obj_board8.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_bread2.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_bread2.usda new file mode 100644 index 0000000000000000000000000000000000000000..66162028c1ed33f2a3018ab64689058c68cf5259 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_bread2.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_bread2" ( + prepend payload = @./obj_bread2.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_bread4.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_bread4.usda new file mode 100644 index 0000000000000000000000000000000000000000..712dab4e62fb4c0ac3f02b8cefb39a87d6e2dcea --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_bread4.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_bread4" ( + prepend payload = @./obj_bread4.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_lettuce.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_lettuce.usda new file mode 100644 index 0000000000000000000000000000000000000000..deab00fb4974d39d8d5c3f085cdc69ac50193218 --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_lettuce.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_lettuce" ( + prepend payload = @./obj_lettuce.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/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_plate.usda b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_plate.usda new file mode 100644 index 0000000000000000000000000000000000000000..73f402515d4ea89c663b3e8cf992ff2213666efb --- /dev/null +++ b/scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_plate.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_plate" ( + prepend payload = @./obj_plate.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/tasks/Aloha/seen/put_drink_on_basket/000/config.yaml b/tasks/Aloha/seen/put_drink_on_basket/000/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..47d4164111d0f9047f6f4351e3b9f2e01d6cc3bf --- /dev/null +++ b/tasks/Aloha/seen/put_drink_on_basket/000/config.yaml @@ -0,0 +1,458 @@ +demonstration_configs: [] +evaluation_configs: +- domain_randomization: + cameras: + config_path: saved/assets/collected_packages/GenManip-Package-TableTop10Aloha/cameras/fixed_camera_aloha_refined.yml + type: fixed + random_environment: + has_wall: false + hdr: false + robot_base_position: false + robot_eepose: false + table_texture: false + table_type: false + wall_texture: false + rewrite_instruction: false + generation_config: + action_path: + mode: auto + robot: 0 + articulation: [] + goal: + - - - allow_fixed_grasp: true + arm: left + fixed_grasp_config: + translation: + - 0.0 + - 0.0 + - -0.01 + fixed_position: true + force_fixed_grasp: true + obj1_uid: + - drink1 + obj2_uid: + - basket + position: + - top + - - - allow_fixed_grasp: true + arm: right + fixed_grasp_config: + translation: + - 0.0 + - 0.0 + - -0.01 + fixed_position: true + force_fixed_grasp: true + obj1_uid: + - drink3 + obj2_uid: + - basket + position: + - top + mode: manual + planner: curobo + instruction: put the box in the basket. + layout_config: + custom_tableset: + - drink1: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink2: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + drink3: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + - drink1: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink2: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink3: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + ignored_objects: [] + type: random_custom_tableset + mode: manual + num_test: 20 + object_config: + basket: + type: existed_object + uid_list: + - base_glb_09 + cutboard: + is_not_rigid: true + type: existed_object + uid_list: + - 76f8b64886f4edbae88e74f68d065c9 + drink1: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + drink2: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + drink3: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + fruit1: + is_not_rigid: true + type: existed_object + uid_list: + - 3e2323f49db4793bd087e67b20ac350 + fruit2: + is_not_rigid: true + type: existed_object + uid_list: + - c7aa636f24e345b3b831271bf7f1fe02 + fruit3: + is_not_rigid: true + type: existed_object + uid_list: + - 8d23f3cd9254e38a696060a962ebb7f + knife: + is_not_rigid: true + type: existed_object + uid_list: + - 8a6aed1dff24e57b6836ade47a46ead + plant: + is_not_rigid: true + type: existed_object + uid_list: + - f9f025d995c4554bcc39b97eed20c7d + plate: + is_not_rigid: true + type: existed_object + uid_list: + - eced95f9f49e4ef9b6f8d576f908bc6b + vegetable1: + is_not_rigid: true + type: existed_object + uid_list: + - 91d0e4cb6a1409ea72d960d0ab144ea + vegetable2: + is_not_rigid: true + type: existed_object + uid_list: + - acdfc046a5149cc890c992da89b48c0 + vegetable3: + is_not_rigid: true + type: existed_object + uid_list: + - 96181392c1f4e2d9316bf2eeafc3042 + vegetable4: + is_not_rigid: true + type: existed_object + uid_list: + - d56e83387b64684ae7a1b4a20040d67 + vegetable5: + is_not_rigid: true + type: existed_object + uid_list: + - b87502ac41f4eb2b2ba7b0cce6517aa + preprocess_config: + - type: apply_default_physics_material + robots: + - config: + gripper_type: aloha_split + type: aloha_split + table_uid: instance + task_name: Aloha/seen/put_drink_on_basket + usd_name: collected_packages/GenManip-Package-TableTop10Aloha/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/instance +- domain_randomization: + cameras: + config_path: saved/assets/collected_packages/GenManip-Package-TableTop10Aloha/cameras/fixed_camera_aloha_refined.yml + type: fixed + random_environment: + has_wall: false + hdr: false + robot_base_position: false + robot_eepose: false + table_texture: false + table_type: false + wall_texture: false + rewrite_instruction: false + generation_config: + action_path: + mode: auto + robot: 0 + articulation: [] + goal: + - - - allow_fixed_grasp: true + arm: left + fixed_grasp_config: + translation: + - 0.0 + - 0.0 + - -0.01 + fixed_position: true + force_fixed_grasp: true + obj1_uid: + - drink1 + obj2_uid: + - basket + position: + - top + - - - allow_fixed_grasp: true + arm: right + fixed_grasp_config: + translation: + - 0.0 + - 0.0 + - -0.01 + fixed_position: true + force_fixed_grasp: true + obj1_uid: + - drink3 + obj2_uid: + - basket + position: + - top + mode: manual + planner: curobo + instruction: put the box in the basket. + layout_config: + custom_tableset: + - drink1: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink2: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + drink3: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + - drink1: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink2: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink3: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + ignored_objects: [] + type: random_custom_tableset + mode: manual + num_test: 20 + object_config: + basket: + type: existed_object + uid_list: + - base_glb_09 + cutboard: + is_not_rigid: true + type: existed_object + uid_list: + - 76f8b64886f4edbae88e74f68d065c9 + drink1: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + drink2: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + drink3: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + fruit1: + is_not_rigid: true + type: existed_object + uid_list: + - 3e2323f49db4793bd087e67b20ac350 + fruit2: + is_not_rigid: true + type: existed_object + uid_list: + - c7aa636f24e345b3b831271bf7f1fe02 + fruit3: + is_not_rigid: true + type: existed_object + uid_list: + - 8d23f3cd9254e38a696060a962ebb7f + knife: + is_not_rigid: true + type: existed_object + uid_list: + - 8a6aed1dff24e57b6836ade47a46ead + plant: + is_not_rigid: true + type: existed_object + uid_list: + - f9f025d995c4554bcc39b97eed20c7d + plate: + is_not_rigid: true + type: existed_object + uid_list: + - eced95f9f49e4ef9b6f8d576f908bc6b + vegetable1: + is_not_rigid: true + type: existed_object + uid_list: + - 91d0e4cb6a1409ea72d960d0ab144ea + vegetable2: + is_not_rigid: true + type: existed_object + uid_list: + - acdfc046a5149cc890c992da89b48c0 + vegetable3: + is_not_rigid: true + type: existed_object + uid_list: + - 96181392c1f4e2d9316bf2eeafc3042 + vegetable4: + is_not_rigid: true + type: existed_object + uid_list: + - d56e83387b64684ae7a1b4a20040d67 + vegetable5: + is_not_rigid: true + type: existed_object + uid_list: + - b87502ac41f4eb2b2ba7b0cce6517aa + preprocess_config: + - type: apply_default_physics_material + robots: + - config: + gripper_type: aloha_split + type: aloha_split + table_uid: instance + task_name: Aloha/unseen/put_drink_on_basket + usd_name: collected_packages/GenManip-Package-TableTop10Aloha/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/instance diff --git a/tasks/Aloha/seen/put_drink_on_basket/004/config.yaml b/tasks/Aloha/seen/put_drink_on_basket/004/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..47d4164111d0f9047f6f4351e3b9f2e01d6cc3bf --- /dev/null +++ b/tasks/Aloha/seen/put_drink_on_basket/004/config.yaml @@ -0,0 +1,458 @@ +demonstration_configs: [] +evaluation_configs: +- domain_randomization: + cameras: + config_path: saved/assets/collected_packages/GenManip-Package-TableTop10Aloha/cameras/fixed_camera_aloha_refined.yml + type: fixed + random_environment: + has_wall: false + hdr: false + robot_base_position: false + robot_eepose: false + table_texture: false + table_type: false + wall_texture: false + rewrite_instruction: false + generation_config: + action_path: + mode: auto + robot: 0 + articulation: [] + goal: + - - - allow_fixed_grasp: true + arm: left + fixed_grasp_config: + translation: + - 0.0 + - 0.0 + - -0.01 + fixed_position: true + force_fixed_grasp: true + obj1_uid: + - drink1 + obj2_uid: + - basket + position: + - top + - - - allow_fixed_grasp: true + arm: right + fixed_grasp_config: + translation: + - 0.0 + - 0.0 + - -0.01 + fixed_position: true + force_fixed_grasp: true + obj1_uid: + - drink3 + obj2_uid: + - basket + position: + - top + mode: manual + planner: curobo + instruction: put the box in the basket. + layout_config: + custom_tableset: + - drink1: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink2: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + drink3: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + - drink1: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink2: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink3: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + ignored_objects: [] + type: random_custom_tableset + mode: manual + num_test: 20 + object_config: + basket: + type: existed_object + uid_list: + - base_glb_09 + cutboard: + is_not_rigid: true + type: existed_object + uid_list: + - 76f8b64886f4edbae88e74f68d065c9 + drink1: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + drink2: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + drink3: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + fruit1: + is_not_rigid: true + type: existed_object + uid_list: + - 3e2323f49db4793bd087e67b20ac350 + fruit2: + is_not_rigid: true + type: existed_object + uid_list: + - c7aa636f24e345b3b831271bf7f1fe02 + fruit3: + is_not_rigid: true + type: existed_object + uid_list: + - 8d23f3cd9254e38a696060a962ebb7f + knife: + is_not_rigid: true + type: existed_object + uid_list: + - 8a6aed1dff24e57b6836ade47a46ead + plant: + is_not_rigid: true + type: existed_object + uid_list: + - f9f025d995c4554bcc39b97eed20c7d + plate: + is_not_rigid: true + type: existed_object + uid_list: + - eced95f9f49e4ef9b6f8d576f908bc6b + vegetable1: + is_not_rigid: true + type: existed_object + uid_list: + - 91d0e4cb6a1409ea72d960d0ab144ea + vegetable2: + is_not_rigid: true + type: existed_object + uid_list: + - acdfc046a5149cc890c992da89b48c0 + vegetable3: + is_not_rigid: true + type: existed_object + uid_list: + - 96181392c1f4e2d9316bf2eeafc3042 + vegetable4: + is_not_rigid: true + type: existed_object + uid_list: + - d56e83387b64684ae7a1b4a20040d67 + vegetable5: + is_not_rigid: true + type: existed_object + uid_list: + - b87502ac41f4eb2b2ba7b0cce6517aa + preprocess_config: + - type: apply_default_physics_material + robots: + - config: + gripper_type: aloha_split + type: aloha_split + table_uid: instance + task_name: Aloha/seen/put_drink_on_basket + usd_name: collected_packages/GenManip-Package-TableTop10Aloha/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/instance +- domain_randomization: + cameras: + config_path: saved/assets/collected_packages/GenManip-Package-TableTop10Aloha/cameras/fixed_camera_aloha_refined.yml + type: fixed + random_environment: + has_wall: false + hdr: false + robot_base_position: false + robot_eepose: false + table_texture: false + table_type: false + wall_texture: false + rewrite_instruction: false + generation_config: + action_path: + mode: auto + robot: 0 + articulation: [] + goal: + - - - allow_fixed_grasp: true + arm: left + fixed_grasp_config: + translation: + - 0.0 + - 0.0 + - -0.01 + fixed_position: true + force_fixed_grasp: true + obj1_uid: + - drink1 + obj2_uid: + - basket + position: + - top + - - - allow_fixed_grasp: true + arm: right + fixed_grasp_config: + translation: + - 0.0 + - 0.0 + - -0.01 + fixed_position: true + force_fixed_grasp: true + obj1_uid: + - drink3 + obj2_uid: + - basket + position: + - top + mode: manual + planner: curobo + instruction: put the box in the basket. + layout_config: + custom_tableset: + - drink1: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink2: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + drink3: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + - drink1: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink2: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: 0.2 + reset_orientation: true + type: global_range + drink3: + additional_height: 0.01 + buffer_size: 0.05 + random_range_angle: 0 + random_range_h: 0.3 + random_range_w: 0.2 + random_range_x: -0.05 + random_range_y: -0.5 + reset_orientation: true + type: global_range + ignored_objects: [] + type: random_custom_tableset + mode: manual + num_test: 20 + object_config: + basket: + type: existed_object + uid_list: + - base_glb_09 + cutboard: + is_not_rigid: true + type: existed_object + uid_list: + - 76f8b64886f4edbae88e74f68d065c9 + drink1: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + drink2: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + drink3: + filter_rule: [] + fixed_scale: + - 0.001 + - 0.0008 + - 0.001 + max_cached_num: 20 + option: + - plain_replace + path: scene_usds/IROS_scenes_aloha_final/scene_drink/bottles + type: load_object_from_path + without_colliders: true + fruit1: + is_not_rigid: true + type: existed_object + uid_list: + - 3e2323f49db4793bd087e67b20ac350 + fruit2: + is_not_rigid: true + type: existed_object + uid_list: + - c7aa636f24e345b3b831271bf7f1fe02 + fruit3: + is_not_rigid: true + type: existed_object + uid_list: + - 8d23f3cd9254e38a696060a962ebb7f + knife: + is_not_rigid: true + type: existed_object + uid_list: + - 8a6aed1dff24e57b6836ade47a46ead + plant: + is_not_rigid: true + type: existed_object + uid_list: + - f9f025d995c4554bcc39b97eed20c7d + plate: + is_not_rigid: true + type: existed_object + uid_list: + - eced95f9f49e4ef9b6f8d576f908bc6b + vegetable1: + is_not_rigid: true + type: existed_object + uid_list: + - 91d0e4cb6a1409ea72d960d0ab144ea + vegetable2: + is_not_rigid: true + type: existed_object + uid_list: + - acdfc046a5149cc890c992da89b48c0 + vegetable3: + is_not_rigid: true + type: existed_object + uid_list: + - 96181392c1f4e2d9316bf2eeafc3042 + vegetable4: + is_not_rigid: true + type: existed_object + uid_list: + - d56e83387b64684ae7a1b4a20040d67 + vegetable5: + is_not_rigid: true + type: existed_object + uid_list: + - b87502ac41f4eb2b2ba7b0cce6517aa + preprocess_config: + - type: apply_default_physics_material + robots: + - config: + gripper_type: aloha_split + type: aloha_split + table_uid: instance + task_name: Aloha/unseen/put_drink_on_basket + usd_name: collected_packages/GenManip-Package-TableTop10Aloha/scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/instance diff --git a/tasks/Aloha/seen/put_drink_on_basket/004/lmdb/info.json b/tasks/Aloha/seen/put_drink_on_basket/004/lmdb/info.json new file mode 100644 index 0000000000000000000000000000000000000000..7b3f52e487282e1fb25b623ed6156af715fc88f6 --- /dev/null +++ b/tasks/Aloha/seen/put_drink_on_basket/004/lmdb/info.json @@ -0,0 +1 @@ +{"observation/left_camera/camera_params": [[200.0, 0.0, 320.0], [0.0, 200.0, 240.0], [0.0, 0.0, 1.0]], "observation/right_camera/camera_params": [[200.0, 0.0, 320.0], [0.0, 200.0, 240.0], [0.0, 0.0, 1.0]], "observation/top_camera/camera_params": [[152.38095092773438, 0.0, 320.0], [0.0, 152.38095092773438, 240.0], [0.0, 0.0, 1.0]], "observation/tcp_config": [{"idx": 0, "name": "tcp0", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_hand", "position": [0.0, 0.0, 0.0]}, {"idx": 1, "name": "tcp1", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_hand", "position": [0, 0, 0.112]}, {"idx": 2, "name": "tcp2", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_leftfinger", "position": [0, 0.006, 0.054]}, {"idx": 3, "name": "tcp3", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_rightfinger", "position": [0, -0.006, 0.054]}, {"idx": 4, "name": "tcp4", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_leftfinger", "position": [-0.0008, 0.02, 0.0275]}, {"idx": 5, "name": "tcp5", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_rightfinger", "position": [-0.0008, -0.02, 0.0275]}]} \ No newline at end of file diff --git a/tasks/Aloha/seen/put_drink_on_basket/012/lmdb/info.json b/tasks/Aloha/seen/put_drink_on_basket/012/lmdb/info.json new file mode 100644 index 0000000000000000000000000000000000000000..7b3f52e487282e1fb25b623ed6156af715fc88f6 --- /dev/null +++ b/tasks/Aloha/seen/put_drink_on_basket/012/lmdb/info.json @@ -0,0 +1 @@ +{"observation/left_camera/camera_params": [[200.0, 0.0, 320.0], [0.0, 200.0, 240.0], [0.0, 0.0, 1.0]], "observation/right_camera/camera_params": [[200.0, 0.0, 320.0], [0.0, 200.0, 240.0], [0.0, 0.0, 1.0]], "observation/top_camera/camera_params": [[152.38095092773438, 0.0, 320.0], [0.0, 152.38095092773438, 240.0], [0.0, 0.0, 1.0]], "observation/tcp_config": [{"idx": 0, "name": "tcp0", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_hand", "position": [0.0, 0.0, 0.0]}, {"idx": 1, "name": "tcp1", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_hand", "position": [0, 0, 0.112]}, {"idx": 2, "name": "tcp2", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_leftfinger", "position": [0, 0.006, 0.054]}, {"idx": 3, "name": "tcp3", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_rightfinger", "position": [0, -0.006, 0.054]}, {"idx": 4, "name": "tcp4", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_leftfinger", "position": [-0.0008, 0.02, 0.0275]}, {"idx": 5, "name": "tcp5", "orientation": [0.0, 0.0, 0.0, 1.0], "parent_prim_path": "panda_rightfinger", "position": [-0.0008, -0.02, 0.0275]}]} \ No newline at end of file diff --git a/tasks/Aloha/seen/put_drink_on_basket/012/lmdb/lock.mdb b/tasks/Aloha/seen/put_drink_on_basket/012/lmdb/lock.mdb new file mode 100644 index 0000000000000000000000000000000000000000..31a7315e033eb7c06545ad107510203b095f4f09 Binary files /dev/null and b/tasks/Aloha/seen/put_drink_on_basket/012/lmdb/lock.mdb differ