Axi404 commited on
Commit
081e49f
·
verified ·
1 Parent(s): 6074440

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. .version +1 -0
  2. scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/.collect.mapping.json +83 -0
  3. scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/instance.usda +78 -0
  4. scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/objaverse_usd/8c63e5e160064cd3862e4b5f8781032b.usda +78 -0
  5. scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Num5acdb7530d69eb04199ed4dd.mdl +284 -0
  6. scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/OmniUe4Base.mdl +224 -0
  7. scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/OmniUe4Function.mdl +1413 -0
  8. scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/instance.usda +78 -0
  9. scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/objaverse_usd/398c1b3b8114409a89eb02f9b42f8064.usda +78 -0
  10. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/.collect.mapping.json +323 -0
  11. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/instance.usda +78 -0
  12. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/OmniUe4Function.mdl +1413 -0
  13. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/08d23f3cd9254e38a696060a962ebb7f.usda +78 -0
  14. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/0acdfc046a5149cc890c992da89b48c0.usda +78 -0
  15. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/1f9f025d995c4554bcc39b97eed20c7d.usda +78 -0
  16. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/476f8b64886f4edbae88e74f68d065c9.usd +0 -0
  17. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/476f8b64886f4edbae88e74f68d065c9.usda +78 -0
  18. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/48a6aed1dff24e57b6836ade47a46ead.usda +78 -0
  19. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/5b87502ac41f4eb2b2ba7b0cce6517aa.usda +78 -0
  20. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/63e2323f49db4793bd087e67b20ac350.usda +78 -0
  21. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/691d0e4cb6a1409ea72d960d0ab144ea.usd +0 -0
  22. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/691d0e4cb6a1409ea72d960d0ab144ea.usda +78 -0
  23. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/896181392c1f4e2d9316bf2eeafc3042.usda +78 -0
  24. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/8d56e83387b64684ae7a1b4a20040d67.usda +78 -0
  25. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/c7aa636f24e345b3b831271bf7f1fe02.usda +78 -0
  26. scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/eced95f9f49e4ef9b6f8d576f908bc6b.usda +78 -0
  27. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/.collect.mapping.json +263 -0
  28. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/Downloads/kitchen/Kitchen_KnifeHolders001.usd +0 -0
  29. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/Downloads/kitchen/Kitchen_KnifeHolders001.usda +78 -0
  30. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/Downloads/kitchen/Kitchen_Shelf001.usda +78 -0
  31. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/Downloads/kitchen/SM_P_Flavour_02.usda +78 -0
  32. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/instance.usda +78 -0
  33. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Num5acb437a3cf8ab2e120078b0.mdl +284 -0
  34. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/OmniUe4Base.mdl +224 -0
  35. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/OmniUe4Function.mdl +1413 -0
  36. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/instance.usda +78 -0
  37. scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board4.usda +78 -0
  38. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/.collect.mapping.json +275 -0
  39. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/instance.usda +78 -0
  40. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Num595f215bc6dce910dd2f0f2d.mdl +284 -0
  41. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/OmniUe4Base.mdl +224 -0
  42. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/OmniUe4Function.mdl +1413 -0
  43. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/instance.usda +78 -0
  44. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/objaverse_usd/2b70993763034bef8587d3730c7ca8ff.usd +0 -0
  45. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/objaverse_usd/2b70993763034bef8587d3730c7ca8ff.usda +78 -0
  46. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/objaverse_usd/2cda50e73f69438598eabf8259e27cb7.usda +78 -0
  47. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/objaverse_usd/30f8ba058e1f4e288f5a2ddcba924c3f.usda +78 -0
  48. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/objaverse_usd/cf2af4b2b8c6420da69ba8d8f73744bc.usda +78 -0
  49. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/scene_waste/obj_badbin.usda +78 -0
  50. scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/scene_waste/obj_goodbin.usda +78 -0
.version ADDED
@@ -0,0 +1 @@
 
 
1
+ 0.1.0
scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/.collect.mapping.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0",
3
+ "file_records": [
4
+ {
5
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/base.usd",
6
+ "source_hash": "cf42c783681d9be4aa7f67865dbd1acd0c441774",
7
+ "target_url": "./base.usd",
8
+ "target_hash": "f63bd719073e2ab81755f2aa52ea333f4066d10a"
9
+ },
10
+ {
11
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/Downloads/brown_photostudio_02_4k.exr",
12
+ "source_hash": "1e6ba41f32c58f9673f1dc2701a6eddf7a950fb3",
13
+ "target_url": "./Downloads/brown_photostudio_02_4k.exr",
14
+ "target_hash": "892754ce1ad95b44fc0db1ea4def923c2da1cfe0"
15
+ },
16
+ {
17
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/objaverse_usd/8c63e5e160064cd3862e4b5f8781032b.usd",
18
+ "source_hash": "b6ac7ef3feed333ecad0059230d9ca9178d0d17c",
19
+ "target_url": "./objaverse_usd/8c63e5e160064cd3862e4b5f8781032b.usd",
20
+ "target_hash": "13e451ec625eafa8820dfe37b0aaabb7c80b484d"
21
+ },
22
+ {
23
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/instance.usd",
24
+ "source_hash": "6cb56b0d2a74169f2e7fb0dcb6900c1ae4b613d6",
25
+ "target_url": "./object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/instance.usd",
26
+ "target_hash": "95b58850747681815474c6fc79bc56732720016e"
27
+ },
28
+ {
29
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/8c63e5e160064cd3862e4b5f8781032b_texture0.png",
30
+ "source_hash": "41c015550995362567b59e0a4bba7865560a4cf2",
31
+ "target_url": "./objaverse_usd/saved/assets/scene_usds/IROS_scenes/objaverse_usd/textures/8c63e5e160064cd3862e4b5f8781032b_texture0.png",
32
+ "target_hash": "6b83b0cf51175813c0c82bbaa58e40e2f000417b"
33
+ },
34
+ {
35
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Textures/5e952df017e93b0001a51caa_color.png",
36
+ "source_hash": "db810e6bf14cc86a1f939dc5e97a7dadf373ff64",
37
+ "target_url": "./object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Textures/5e952df017e93b0001a51caa_color.png",
38
+ "target_hash": "b6cd3fff01cc27169d0c6b1f01d8b14dfe94e841"
39
+ },
40
+ {
41
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Textures/5e952df017e93b0001a51caa_metallic.png",
42
+ "source_hash": "920b0d4b3e3b4b35183e71c4cb841a7e666aab64",
43
+ "target_url": "./object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Textures/5e952df017e93b0001a51caa_metallic.png",
44
+ "target_hash": "4751ef63f36d6f3c246ab8752d3b3ecbdae2ec40"
45
+ },
46
+ {
47
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Textures/normal.png",
48
+ "source_hash": "fda3302107811bbbfe98901f8d21f3e9d0d2cab9",
49
+ "target_url": "./object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Textures/normal.png",
50
+ "target_hash": "bdd733c98876fab2ba53010cfdec44af0abedd4b"
51
+ },
52
+ {
53
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Textures/white.png",
54
+ "source_hash": "dc8d8b485f6d70389652db708551f15a2f8738a5",
55
+ "target_url": "./object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Textures/white.png",
56
+ "target_hash": "9f406ab3c3d7c736a861c959d513e552079621dc"
57
+ },
58
+ {
59
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Num5acdb7530d69eb04199ed4dd.mdl",
60
+ "source_hash": "98cba9e14903c4955cd847c6fad6b6af493faf9b",
61
+ "target_url": "./object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Num5acdb7530d69eb04199ed4dd.mdl",
62
+ "target_hash": "525c183e76f311154fd9e6be0a4cd41669fcd05f"
63
+ },
64
+ {
65
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Textures/black.png",
66
+ "source_hash": "9bd9bcd2ed41b7bb8a6f08c5d8bdd461a32cacd5",
67
+ "target_url": "./object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Textures/black.png",
68
+ "target_hash": "1073163bf1318dbf1c06518cb3c2d580d6b04aac"
69
+ },
70
+ {
71
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/OmniUe4Function.mdl",
72
+ "source_hash": "e3c55f1bb5692be493ff772f4c11f415acc5c0e0",
73
+ "target_url": "./object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/OmniUe4Function.mdl",
74
+ "target_hash": "bd17e4476f5beccf66b1d4e8df69f3cc0b0c20ff"
75
+ },
76
+ {
77
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/object_place1/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/OmniUe4Base.mdl",
78
+ "source_hash": "bbd3e10bd83bde12efc7dc69b1b01e10d3a8d136",
79
+ "target_url": "./object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/OmniUe4Base.mdl",
80
+ "target_hash": "e0cd5e23bd5a8bcd5aed4df07175927d021ad165"
81
+ }
82
+ ]
83
+ }
scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/instance.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_instance" (
62
+ prepend payload = @./instance.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/objaverse_usd/8c63e5e160064cd3862e4b5f8781032b.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_8c63e5e160064cd3862e4b5f8781032b" (
62
+ prepend payload = @./8c63e5e160064cd3862e4b5f8781032b.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/Num5acdb7530d69eb04199ed4dd.mdl ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ mdl 1.6;
2
+
3
+ import ::math::*;
4
+ import ::state::*;
5
+ import ::tex::*;
6
+ import ::anno::*;
7
+ using OmniUe4Function import *;
8
+ using OmniUe4Base import *;
9
+
10
+ export annotation sampler_color();
11
+ export annotation sampler_normal();
12
+ export annotation sampler_grayscale();
13
+ export annotation sampler_alpha();
14
+ export annotation sampler_masks();
15
+ export annotation sampler_distancefield();
16
+ export annotation dither_masked_off();
17
+ export annotation world_space_normal();
18
+
19
+ export material Num5acdb7530d69eb04199ed4dd(
20
+ uniform texture_2d Normal_Tex = texture_2d("./Textures/normal.png",::tex::gamma_linear)
21
+ [[
22
+ anno::display_name("Normal_Tex"),
23
+ anno::ui_order(32),
24
+ anno::in_group("Normal"),
25
+ sampler_normal()
26
+ ]],
27
+ float4 Normal_UVA = float4(1.0,1.0,0.0,0.0)
28
+ [[
29
+ anno::display_name("Normal_UVA"),
30
+ anno::ui_order(32),
31
+ anno::in_group("Normal")
32
+ ]],
33
+ float EmissiveIntensity = 0.0
34
+ [[
35
+ anno::display_name("EmissiveIntensity"),
36
+ anno::ui_order(32),
37
+ anno::in_group("EmissiveColor")
38
+ ]],
39
+ float IsEmissiveTex = 0.0
40
+ [[
41
+ anno::display_name("IsEmissiveTex"),
42
+ anno::in_group("EmissiveColor")
43
+ ]],
44
+ float4 Emissive_Color = float4(1.0,1.0,1.0,1.0)
45
+ [[
46
+ anno::display_name("Emissive_Color"),
47
+ anno::ui_order(32),
48
+ anno::in_group("EmissiveColor")
49
+ ]],
50
+ uniform texture_2d Emissive_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
51
+ [[
52
+ anno::display_name("Emissive_Tex"),
53
+ anno::ui_order(32),
54
+ anno::in_group("EmissiveColor"),
55
+ sampler_color()
56
+ ]],
57
+ float4 Emissive_UVA = float4(1.0,1.0,0.0,0.0)
58
+ [[
59
+ anno::display_name("Emissive_UVA"),
60
+ anno::ui_order(32),
61
+ anno::in_group("EmissiveColor")
62
+ ]],
63
+ float IsBaseColorTex = 0.0
64
+ [[
65
+ anno::display_name("IsBaseColorTex"),
66
+ anno::in_group("BaseColor")
67
+ ]],
68
+ float4 BaseColor_Color = float4(1.0,1.0,1.0,1.0)
69
+ [[
70
+ anno::display_name("BaseColor_Color"),
71
+ anno::ui_order(32),
72
+ anno::in_group("BaseColor")
73
+ ]],
74
+ uniform texture_2d BaseColor_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
75
+ [[
76
+ anno::display_name("BaseColor_Tex"),
77
+ anno::ui_order(32),
78
+ anno::in_group("BaseColor"),
79
+ sampler_color()
80
+ ]],
81
+ float4 BaseColor_UVA = float4(1.0,1.0,0.0,0.0)
82
+ [[
83
+ anno::display_name("BaseColor_UVA"),
84
+ anno::ui_order(32),
85
+ anno::in_group("BaseColor")
86
+ ]],
87
+ float IsMetallicTex = 0.0
88
+ [[
89
+ anno::display_name("IsMetallicTex"),
90
+ anno::in_group("Metallic")
91
+ ]],
92
+ float4 Metallic_Color = float4(0.0,0.0,0.0,1.0)
93
+ [[
94
+ anno::display_name("Metallic_Color"),
95
+ anno::ui_order(32),
96
+ anno::in_group("Metallic")
97
+ ]],
98
+ uniform texture_2d Metallic_Tex = texture_2d("./Textures/black.png",::tex::gamma_srgb)
99
+ [[
100
+ anno::display_name("Metallic_Tex"),
101
+ anno::ui_order(32),
102
+ anno::in_group("Metallic"),
103
+ sampler_color()
104
+ ]],
105
+ float4 Metallic_UVA = float4(1.0,1.0,0.0,0.0)
106
+ [[
107
+ anno::display_name("Metallic_UVA"),
108
+ anno::ui_order(32),
109
+ anno::in_group("Metallic")
110
+ ]],
111
+ float IsSpecularTex = 0.0
112
+ [[
113
+ anno::display_name("IsSpecularTex"),
114
+ anno::in_group("Specular")
115
+ ]],
116
+ float4 Specular_Color = float4(1.0,1.0,1.0,1.0)
117
+ [[
118
+ anno::display_name("Specular_Color"),
119
+ anno::ui_order(32),
120
+ anno::in_group("Specular")
121
+ ]],
122
+ uniform texture_2d Specular_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
123
+ [[
124
+ anno::display_name("Specular_Tex"),
125
+ anno::ui_order(32),
126
+ anno::in_group("Specular"),
127
+ sampler_color()
128
+ ]],
129
+ float4 Specular_UVA = float4(1.0,1.0,0.0,0.0)
130
+ [[
131
+ anno::display_name("Specular_UVA"),
132
+ anno::ui_order(32),
133
+ anno::in_group("Specular")
134
+ ]],
135
+ float IsGlossTex = 0.0
136
+ [[
137
+ anno::display_name("IsGlossTex"),
138
+ anno::in_group("Roughness")
139
+ ]],
140
+ float4 Gloss_Color = float4(0.1,0.1,0.1,1.0)
141
+ [[
142
+ anno::display_name("Gloss_Color"),
143
+ anno::ui_order(32),
144
+ anno::in_group("Roughness")
145
+ ]],
146
+ uniform texture_2d Gloss_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
147
+ [[
148
+ anno::display_name("Gloss_Tex"),
149
+ anno::ui_order(32),
150
+ anno::in_group("Roughness"),
151
+ sampler_color()
152
+ ]],
153
+ float4 Gloss_UVA = float4(1.0,1.0,0.0,0.0)
154
+ [[
155
+ anno::display_name("Gloss_UVA"),
156
+ anno::ui_order(32),
157
+ anno::in_group("Roughness")
158
+ ]],
159
+ float PolygonOffset = 0.0
160
+ [[
161
+ anno::display_name("PolygonOffset"),
162
+ anno::ui_order(32),
163
+ anno::in_group("WorldPosition")
164
+ ]],
165
+ int MaxTexCoordIndex = 3
166
+ [[
167
+ anno::hidden()
168
+ ]])
169
+ =
170
+ let {
171
+ float3 Local82 = ::camera_position();
172
+ 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));
173
+ float Local84 = math::dot(Local83, Local83);
174
+ float Local85 = math::sqrt(Local84);
175
+ float3 Local86 = (Local83 / Local85);
176
+ float3 Local87 = (Local86 * PolygonOffset);
177
+
178
+ float3 WorldPositionOffset_mdl = Local87;
179
+ float2 CustomizedUV0_mdl = float2(state::texture_coordinate(math::min(0,MaxTexCoordIndex)).x,1.0-state::texture_coordinate(math::min(0,MaxTexCoordIndex)).y);
180
+
181
+ float2 Local0 = (float2(0.5,0.5) * -1.0);
182
+ float Local1 = (CustomizedUV0_mdl.x * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).x);
183
+ float Local2 = (CustomizedUV0_mdl.y * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).y);
184
+ float2 Local3 = (Local0 + float2(Local1,Local2));
185
+ float Local4 = (3.141592 * -2.0);
186
+ float Local5 = (float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).z / Local4);
187
+ float Local6 = (Local5 * 6.283185);
188
+ float Local7 = math::cos(Local6);
189
+ float Local8 = math::sin(Local6);
190
+ float Local9 = (Local8 * -1.0);
191
+ float Local10 = math::dot(Local3, float2(Local7,Local9));
192
+ float Local11 = math::dot(Local3, float2(Local8,Local7));
193
+ float2 Local12 = (float2(0.5,0.5) + float2(Local10,Local11));
194
+ float4 Local13 = ::unpack_normal_map(tex::lookup_float4(Normal_Tex,float2(Local12.x,1.0-Local12.y),tex::wrap_repeat,tex::wrap_repeat));
195
+ float3 Local14 = ((math::abs(1.0 - 1.0) > 0.00001) ? (float3(0.0,0.0,0.0)) : float3(Local13.x,Local13.y,Local13.z));
196
+
197
+ float3 Normal_mdl = Local14;
198
+
199
+ float Local15 = (CustomizedUV0_mdl.x * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).x);
200
+ float Local16 = (CustomizedUV0_mdl.y * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).y);
201
+ float2 Local17 = (Local0 + float2(Local15,Local16));
202
+ float Local18 = (float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).z / Local4);
203
+ float Local19 = (Local18 * 6.283185);
204
+ float Local20 = math::cos(Local19);
205
+ float Local21 = math::sin(Local19);
206
+ float Local22 = (Local21 * -1.0);
207
+ float Local23 = math::dot(Local17, float2(Local20,Local22));
208
+ float Local24 = math::dot(Local17, float2(Local21,Local20));
209
+ float2 Local25 = (float2(0.5,0.5) + float2(Local23,Local24));
210
+ float4 Local26 = tex::lookup_float4(Emissive_Tex,float2(Local25.x,1.0-Local25.y),tex::wrap_repeat,tex::wrap_repeat);
211
+ 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));
212
+ float3 Local28 = (EmissiveIntensity * Local27);
213
+ float Local29 = (CustomizedUV0_mdl.x * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).x);
214
+ float Local30 = (CustomizedUV0_mdl.y * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).y);
215
+ float2 Local31 = (Local0 + float2(Local29,Local30));
216
+ float Local32 = (float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).z / Local4);
217
+ float Local33 = (Local32 * 6.283185);
218
+ float Local34 = math::cos(Local33);
219
+ float Local35 = math::sin(Local33);
220
+ float Local36 = (Local35 * -1.0);
221
+ float Local37 = math::dot(Local31, float2(Local34,Local36));
222
+ float Local38 = math::dot(Local31, float2(Local35,Local34));
223
+ float2 Local39 = (float2(0.5,0.5) + float2(Local37,Local38));
224
+ float4 Local40 = tex::lookup_float4(BaseColor_Tex,float2(Local39.x,1.0-Local39.y),tex::wrap_repeat,tex::wrap_repeat);
225
+ 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));
226
+ float Local42 = (CustomizedUV0_mdl.x * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).x);
227
+ float Local43 = (CustomizedUV0_mdl.y * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).y);
228
+ float2 Local44 = (Local0 + float2(Local42,Local43));
229
+ float Local45 = (float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).z / Local4);
230
+ float Local46 = (Local45 * 6.283185);
231
+ float Local47 = math::cos(Local46);
232
+ float Local48 = math::sin(Local46);
233
+ float Local49 = (Local48 * -1.0);
234
+ float Local50 = math::dot(Local44, float2(Local47,Local49));
235
+ float Local51 = math::dot(Local44, float2(Local48,Local47));
236
+ float2 Local52 = (float2(0.5,0.5) + float2(Local50,Local51));
237
+ float4 Local53 = tex::lookup_float4(Metallic_Tex,float2(Local52.x,1.0-Local52.y),tex::wrap_repeat,tex::wrap_repeat);
238
+ 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));
239
+ float Local55 = (CustomizedUV0_mdl.x * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).x);
240
+ float Local56 = (CustomizedUV0_mdl.y * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).y);
241
+ float2 Local57 = (Local0 + float2(Local55,Local56));
242
+ float Local58 = (float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).z / Local4);
243
+ float Local59 = (Local58 * 6.283185);
244
+ float Local60 = math::cos(Local59);
245
+ float Local61 = math::sin(Local59);
246
+ float Local62 = (Local61 * -1.0);
247
+ float Local63 = math::dot(Local57, float2(Local60,Local62));
248
+ float Local64 = math::dot(Local57, float2(Local61,Local60));
249
+ float2 Local65 = (float2(0.5,0.5) + float2(Local63,Local64));
250
+ float4 Local66 = tex::lookup_float4(Specular_Tex,float2(Local65.x,1.0-Local65.y),tex::wrap_repeat,tex::wrap_repeat);
251
+ 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));
252
+ float Local68 = (CustomizedUV0_mdl.x * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).x);
253
+ float Local69 = (CustomizedUV0_mdl.y * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).y);
254
+ float2 Local70 = (Local0 + float2(Local68,Local69));
255
+ float Local71 = (float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).z / Local4);
256
+ float Local72 = (Local71 * 6.283185);
257
+ float Local73 = math::cos(Local72);
258
+ float Local74 = math::sin(Local72);
259
+ float Local75 = (Local74 * -1.0);
260
+ float Local76 = math::dot(Local70, float2(Local73,Local75));
261
+ float Local77 = math::dot(Local70, float2(Local74,Local73));
262
+ float2 Local78 = (float2(0.5,0.5) + float2(Local76,Local77));
263
+ float4 Local79 = tex::lookup_float4(Gloss_Tex,float2(Local78.x,1.0-Local78.y),tex::wrap_repeat,tex::wrap_repeat);
264
+ 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));
265
+ float3 Local81 = (1.0 - Local80);
266
+
267
+ float3 EmissiveColor_mdl = Local28;
268
+ float OpacityMask_mdl = 1.0;
269
+ float3 BaseColor_mdl = Local41;
270
+ float Metallic_mdl = Local54.x;
271
+ float Specular_mdl = Local67.x;
272
+ float Roughness_mdl = Local81.x;
273
+
274
+ } in
275
+ ::OmniUe4Base(
276
+ base_color: BaseColor_mdl,
277
+ metallic: Metallic_mdl,
278
+ roughness: Roughness_mdl,
279
+ specular: Specular_mdl,
280
+ normal: Normal_mdl,
281
+ opacity: OpacityMask_mdl,
282
+ emissive_color: EmissiveColor_mdl,
283
+ displacement: WorldPositionOffset_mdl,
284
+ two_sided: false);
scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/OmniUe4Base.mdl ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***************************************************************************************************
2
+ * Copyright 2020 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions
6
+ * are met:
7
+ * * Redistributions of source code must retain the above copyright
8
+ * notice, this list of conditions and the following disclaimer.
9
+ * * Redistributions in binary form must reproduce the above copyright
10
+ * notice, this list of conditions and the following disclaimer in the
11
+ * documentation and/or other materials provided with the distribution.
12
+ * * Neither the name of NVIDIA CORPORATION nor the names of its
13
+ * contributors may be used to endorse or promote products derived
14
+ * from this software without specific prior written permission.
15
+ *
16
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ **************************************************************************************************/
28
+
29
+ //* 1.0.0 - first version
30
+ //* 1.0.1 - merge unlit template
31
+ //* 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
32
+ //* 1.0.3 - UE4 normal mapping: Geometry normal shouldn't be changed
33
+ //* 1.0.4 - using absolute import paths when importing standard modules
34
+
35
+ mdl 1.3;
36
+
37
+ import ::df::*;
38
+ import ::state::*;
39
+ import ::math::*;
40
+ import ::tex::*;
41
+ import ::anno::*;
42
+
43
+ float emissive_multiplier()
44
+ [[
45
+ anno::description("the multiplier to convert UE4 emissive to raw data"),
46
+ anno::noinline()
47
+ ]]
48
+ {
49
+ return 20.0f * 128.0f;
50
+ }
51
+
52
+ float3 tangent_space_normal(
53
+ float3 normal = float3(0.0,0.0,1.0),
54
+ float3 tangent_u = state::texture_tangent_u(0),
55
+ float3 tangent_v = state::texture_tangent_v(0)
56
+ )
57
+ [[
58
+ anno::description("Interprets the vector in tangent space"),
59
+ anno::noinline()
60
+ ]]
61
+ {
62
+ return math::normalize(
63
+ tangent_u * normal.x - /* flip_tangent_v */
64
+ tangent_v * normal.y +
65
+ state::normal() * (normal.z));
66
+ }
67
+
68
+ float3 world_space_normal(
69
+ float3 normal = float3(0.0,0.0,1.0),
70
+ float3 tangent_u = state::texture_tangent_u(0),
71
+ float3 tangent_v = state::texture_tangent_v(0)
72
+ )
73
+ [[
74
+ anno::description("Interprets the vector in world space"),
75
+ anno::noinline()
76
+ ]]
77
+ {
78
+ return tangent_space_normal(
79
+ math::normalize(
80
+ normal.x * float3(tangent_u.x, tangent_v.x, state::normal().x) -
81
+ normal.y * float3(tangent_u.y, tangent_v.y, state::normal().y) +
82
+ normal.z * float3(tangent_u.z, tangent_v.z, state::normal().z)),
83
+ tangent_u,
84
+ tangent_v
85
+ );
86
+ }
87
+
88
+ export material OmniUe4Base(
89
+ float3 base_color = float3(0.0, 0.0, 0.0),
90
+ float metallic = 0.0,
91
+ float roughness = 0.5,
92
+ float specular = 0.5,
93
+ float3 normal = float3(0.0,0.0,1.0),
94
+ float clearcoat_weight = 0.0,
95
+ float clearcoat_roughness = 0.0,
96
+ float3 clearcoat_normal = float3(0.0,0.0,1.0),
97
+ uniform bool enable_opacity = true,
98
+ float opacity = 1.0,
99
+ float3 emissive_color = float3(0.0, 0.0, 0.0),
100
+ float3 displacement = float3(0.0),
101
+ uniform bool is_tangent_space_normal = true,
102
+ uniform bool two_sided = false,
103
+ uniform bool is_unlit = false
104
+ )
105
+ [[
106
+ anno::display_name("Omni UE4 Base"),
107
+ anno::description("Omni UE4 Base, supports UE4 default lit and clearcoat shading model"),
108
+ anno::version( 1, 0, 0),
109
+ anno::author("NVIDIA CORPORATION"),
110
+ anno::key_words(string[]("omni", "UE4", "omniverse", "lit", "clearcoat", "generic"))
111
+ ]]
112
+ = let {
113
+ color final_base_color = math::saturate(base_color);
114
+ float final_metallic = math::saturate(metallic);
115
+ float final_roughness = math::saturate(roughness);
116
+ float final_specular = math::saturate(specular);
117
+ color final_emissive_color = math::max(emissive_color, 0.0f) * emissive_multiplier(); /*factor for converting ue4 emissive to raw value*/
118
+ float final_clearcoat_weight = math::saturate(clearcoat_weight);
119
+ float final_clearcoat_roughness = math::saturate(clearcoat_roughness);
120
+ float3 final_normal = math::normalize(normal);
121
+ float3 final_clearcoat_normal = math::normalize(clearcoat_normal);
122
+
123
+ // - compute final roughness by squaring the "roughness" parameter
124
+ float alpha = final_roughness * final_roughness;
125
+ // reduce the reflectivity at grazing angles to avoid "dark edges" for high roughness due to the layering
126
+ float grazing_refl = math::max((1.0 - final_roughness), 0.0);
127
+
128
+ float3 the_normal = is_unlit ? state::normal() :
129
+ (is_tangent_space_normal ?
130
+ tangent_space_normal(
131
+ normal: final_normal,
132
+ tangent_u: state::texture_tangent_u(0),
133
+ tangent_v: state::texture_tangent_v(0)
134
+ ) : world_space_normal(
135
+ normal: final_normal,
136
+ tangent_u: state::texture_tangent_u(0),
137
+ tangent_v: state::texture_tangent_v(0)
138
+ ));
139
+
140
+ // for the dielectric component we layer the glossy component on top of the diffuse one,
141
+ // the glossy layer has no color tint
142
+
143
+ bsdf dielectric_component = df::custom_curve_layer(
144
+ weight: final_specular,
145
+ normal_reflectivity: 0.08,
146
+ grazing_reflectivity: grazing_refl,
147
+ layer: df::microfacet_ggx_smith_bsdf(roughness_u: alpha),
148
+ base: df::diffuse_reflection_bsdf(tint: final_base_color),
149
+ normal: the_normal);
150
+
151
+ // the metallic component doesn't have a diffuse component, it's only glossy
152
+ // base_color is applied to tint it
153
+ bsdf metallic_component = df::microfacet_ggx_smith_bsdf(tint: final_base_color, roughness_u: alpha);
154
+
155
+ // final BSDF is a linear blend between dielectric and metallic component
156
+ bsdf dielectric_metal_mix =
157
+ df::normalized_mix(
158
+ components:
159
+ df::bsdf_component[](
160
+ df::bsdf_component(
161
+ component: metallic_component,
162
+ weight: final_metallic),
163
+ df::bsdf_component(
164
+ component: dielectric_component,
165
+ weight: 1.0-final_metallic)
166
+ )
167
+ );
168
+
169
+ // clearcoat layer
170
+ float clearcoat_grazing_refl = math::max((1.0 - final_clearcoat_roughness), 0.0);
171
+ float clearcoat_alpha = final_clearcoat_roughness * final_clearcoat_roughness;
172
+
173
+ float3 the_clearcoat_normal = is_tangent_space_normal ? tangent_space_normal(
174
+ normal: final_clearcoat_normal,
175
+ tangent_u: state::texture_tangent_u(0),
176
+ tangent_v: state::texture_tangent_v(0)
177
+ ) : world_space_normal(
178
+ normal: final_clearcoat_normal,
179
+ tangent_u: state::texture_tangent_u(0),
180
+ tangent_v: state::texture_tangent_v(0)
181
+ );
182
+
183
+
184
+ bsdf clearcoat =
185
+ df::custom_curve_layer(
186
+ base: df::weighted_layer(
187
+ layer: dielectric_metal_mix,
188
+ weight: 1.0,
189
+ normal: final_clearcoat_weight == 0.0 ? state::normal() : the_normal
190
+ ),
191
+ layer: df::microfacet_ggx_smith_bsdf(
192
+ roughness_u: clearcoat_alpha,
193
+ tint: color(1.0)
194
+ ),
195
+ normal_reflectivity: 0.04,
196
+ grazing_reflectivity: clearcoat_grazing_refl,
197
+ normal: the_clearcoat_normal,
198
+ weight: final_clearcoat_weight
199
+ );
200
+ bsdf surface = is_unlit ? bsdf() : clearcoat;
201
+ }
202
+ in material(
203
+ thin_walled: two_sided, // Graphene?
204
+ surface: material_surface(
205
+ scattering: surface,
206
+ emission:
207
+ material_emission (
208
+ emission: df::diffuse_edf (),
209
+ intensity: final_emissive_color
210
+ )
211
+ ),
212
+ backface: material_surface(
213
+ emission:
214
+ material_emission (
215
+ emission: df::diffuse_edf (),
216
+ intensity: final_emissive_color
217
+ )
218
+ ),
219
+ geometry: material_geometry(
220
+ displacement: displacement,
221
+ normal: final_clearcoat_weight == 0.0 ? the_normal : state::normal(),
222
+ cutout_opacity: enable_opacity ? opacity : 1.0
223
+ )
224
+ );
scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/Materials/OmniUe4Function.mdl ADDED
@@ -0,0 +1,1413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***************************************************************************************************
2
+ * Copyright 2020 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions
6
+ * are met:
7
+ * * Redistributions of source code must retain the above copyright
8
+ * notice, this list of conditions and the following disclaimer.
9
+ * * Redistributions in binary form must reproduce the above copyright
10
+ * notice, this list of conditions and the following disclaimer in the
11
+ * documentation and/or other materials provided with the distribution.
12
+ * * Neither the name of NVIDIA CORPORATION nor the names of its
13
+ * contributors may be used to endorse or promote products derived
14
+ * from this software without specific prior written permission.
15
+ *
16
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ **************************************************************************************************/
28
+
29
+ //* 1.0.1 - using absolute import paths when importing standard modules
30
+
31
+ mdl 1.6;
32
+
33
+ import ::df::*;
34
+ import ::state::*;
35
+ import ::math::*;
36
+ import ::tex::*;
37
+ import ::anno::*;
38
+
39
+
40
+ export float3 convert_to_left_hand(float3 vec3, uniform bool up_z = true, uniform bool is_position = true)
41
+ [[
42
+ anno::description("convert from RH to LH"),
43
+ anno::noinline()
44
+ ]]
45
+ {
46
+ float4x4 ZupConversion = float4x4(
47
+ 1.0f, 0.0f, 0.0f, 0.0f,
48
+ 0.0f, -1.0f, 0.0f, 0.0f,
49
+ 0.0f, 0.0f, 1.0f, 0.0f,
50
+ 0.0f, 0.0f, 0.0f, 1.0f
51
+ );
52
+
53
+ float4x4 YupConversion = float4x4(
54
+ 1.0f, 0.0f, 0.0f, 0.0f,
55
+ 0.0f, 0.0f, 1.0f, 0.0f,
56
+ 0.0f, 1.0f, 0.0f, 0.0f,
57
+ 0.0f, 0.0f, 0.0f, 1.0f
58
+ );
59
+
60
+ float4 vec4 = float4(vec3.x, vec3.y, vec3.z, is_position ? 1.0f : 0.0f);
61
+
62
+ vec4 = vec4 * (up_z ? ZupConversion : YupConversion);
63
+
64
+ return float3(vec4.x, vec4.y, vec4.z);
65
+ }
66
+
67
+ export float3 transform_vector_from_tangent_to_world(float3 vector,
68
+ uniform bool up_z = true,
69
+ float3 tangent_u = state::texture_tangent_u(0),
70
+ float3 tangent_v = state::texture_tangent_v(0))
71
+ [[
72
+ anno::description("Transform vector from tangent space to world space"),
73
+ anno::noinline()
74
+ ]]
75
+ {
76
+ /* flip_tangent_v */
77
+ return convert_to_left_hand(
78
+ tangent_u * vector.x - tangent_v * vector.y + state::normal() * vector.z,
79
+ up_z, false);
80
+ }
81
+
82
+ export float3 transform_vector_from_world_to_tangent(float3 vector,
83
+ uniform bool up_z = true,
84
+ float3 tangent_u = state::texture_tangent_u(0),
85
+ float3 tangent_v = state::texture_tangent_v(0))
86
+ [[
87
+ anno::description("Transform vector from world space to tangent space"),
88
+ anno::noinline()
89
+ ]]
90
+ {
91
+ float3 vecRH = convert_to_left_hand(vector, up_z, false);
92
+ /* flip_tangent_v */
93
+ return vecRH.x * float3(tangent_u.x, -tangent_v.x, state::normal().x) +
94
+ vecRH.y * float3(tangent_u.y, -tangent_v.y, state::normal().y) +
95
+ vecRH.z * float3(tangent_u.z, -tangent_v.z, state::normal().z);
96
+ }
97
+
98
+ export float4 unpack_normal_map(
99
+ float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0)
100
+ )
101
+ [[
102
+ anno::description("Unpack a normal stored in a normal map"),
103
+ anno::noinline()
104
+ ]]
105
+ {
106
+ float2 normal_xy = float2(texture_sample.x, texture_sample.y);
107
+
108
+ normal_xy = normal_xy * float2(2.0,2.0) - float2(1.0,1.0);
109
+ float normal_z = math::sqrt( math::saturate( 1.0 - math::dot( normal_xy, normal_xy ) ) );
110
+ return float4( normal_xy.x, normal_xy.y, normal_z, 1.0 );
111
+ }
112
+
113
+ // for get color value from normal.
114
+ export float4 pack_normal_map(
115
+ float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0)
116
+ )
117
+ [[
118
+ anno::description("Pack to color from a normal")
119
+ ]]
120
+ {
121
+ float2 return_xy = float2(texture_sample.x, texture_sample.y);
122
+
123
+ return_xy = (return_xy + float2(1.0,1.0)) / float2(2.0,2.0);
124
+
125
+ return float4( return_xy.x, return_xy.y, 0.0, 1.0 );
126
+ }
127
+
128
+ export float4 greyscale_texture_lookup(
129
+ float4 texture_sample = float4(0.0, 0.0, 0.0, 1.0)
130
+ )
131
+ [[
132
+ anno::description("Sampling a greyscale texture"),
133
+ anno::noinline()
134
+ ]]
135
+ {
136
+ return float4(texture_sample.x, texture_sample.x, texture_sample.x, texture_sample.x);
137
+ }
138
+
139
+ export float3 pixel_normal_world_space(uniform bool up_z = true)
140
+ [[
141
+ anno::description("Pixel normal in world space"),
142
+ anno::noinline()
143
+ ]]
144
+ {
145
+ return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
146
+ }
147
+
148
+ export float3 vertex_normal_world_space(uniform bool up_z = true)
149
+ [[
150
+ anno::description("Vertex normal in world space"),
151
+ anno::noinline()
152
+ ]]
153
+ {
154
+ return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
155
+ }
156
+
157
+ export float3 landscape_normal_world_space(uniform bool up_z = true)
158
+ [[
159
+ anno::description("Landscape normal in world space")
160
+ ]]
161
+ {
162
+ float3 normalFromNormalmap = math::floor((::vertex_normal_world_space(up_z) * 0.5 + 0.5) * 255.0) / 255.0 * 2.0 - 1.0;
163
+
164
+ float2 normalXY = float2(normalFromNormalmap.x, normalFromNormalmap.y);
165
+ return float3(normalXY.x, normalXY.y, math::sqrt(math::saturate(1.0 - math::dot(normalXY, normalXY))));
166
+ }
167
+
168
+ // Different implementation specific between mdl and hlsl for smoothstep
169
+ export float smoothstep(float a, float b, float l)
170
+ {
171
+ if (a < b)
172
+ {
173
+ return math::smoothstep(a, b, l);
174
+ }
175
+ else if (a > b)
176
+ {
177
+ return 1.0 - math::smoothstep(b, a, l);
178
+ }
179
+ else
180
+ {
181
+ return l <= a ? 0.0 : 1.0;
182
+ }
183
+ }
184
+
185
+ export float2 smoothstep(float2 a, float2 b, float2 l)
186
+ {
187
+ return float2(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y));
188
+ }
189
+
190
+ export float3 smoothstep(float3 a, float3 b, float3 l)
191
+ {
192
+ return float3(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z));
193
+ }
194
+
195
+ export float4 smoothstep(float4 a, float4 b, float4 l)
196
+ {
197
+ 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));
198
+ }
199
+
200
+ export float2 smoothstep(float2 a, float2 b, float l)
201
+ {
202
+ return float2(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l));
203
+ }
204
+
205
+ export float3 smoothstep(float3 a, float3 b, float l)
206
+ {
207
+ return float3(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l));
208
+ }
209
+
210
+ export float4 smoothstep(float4 a, float4 b, float l)
211
+ {
212
+ 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));
213
+ }
214
+
215
+ export float2 smoothstep(float a, float b, float2 l)
216
+ {
217
+ return float2(smoothstep(a, b, l.x), smoothstep(a, b, l.y));
218
+ }
219
+
220
+ export float3 smoothstep(float a, float b, float3 l)
221
+ {
222
+ return float3(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z));
223
+ }
224
+
225
+ export float4 smoothstep(float a, float b, float4 l)
226
+ {
227
+ return float4(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z), smoothstep(a, b, l.w));
228
+ }
229
+
230
+ //------------------ Random from UE4 -----------------------
231
+ float length2(float3 v)
232
+ {
233
+ return math::dot(v, v);
234
+ }
235
+
236
+ float3 GetPerlinNoiseGradientTextureAt(uniform texture_2d PerlinNoiseGradientTexture, float3 v)
237
+ {
238
+ const float2 ZShear = float2(17.0f, 89.0f);
239
+
240
+ float2 OffsetA = v.z * ZShear;
241
+ float2 TexA = (float2(v.x, v.y) + OffsetA + 0.5f) / 128.0f;
242
+ float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA.x,1.0-TexA.y),tex::wrap_repeat,tex::wrap_repeat);
243
+ return float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z) * 2.0 - 1.0;
244
+ }
245
+
246
+ float3 SkewSimplex(float3 In)
247
+ {
248
+ return In + math::dot(In, float3(1.0 / 3.0f) );
249
+ }
250
+ float3 UnSkewSimplex(float3 In)
251
+ {
252
+ return In - math::dot(In, float3(1.0 / 6.0f) );
253
+ }
254
+
255
+ // 3D random number generator inspired by PCGs (permuted congruential generator)
256
+ // Using a **simple** Feistel cipher in place of the usual xor shift permutation step
257
+ // @param v = 3D integer coordinate
258
+ // @return three elements w/ 16 random bits each (0-0xffff).
259
+ // ~8 ALU operations for result.x (7 mad, 1 >>)
260
+ // ~10 ALU operations for result.xy (8 mad, 2 >>)
261
+ // ~12 ALU operations for result.xyz (9 mad, 3 >>)
262
+
263
+ //TODO: uint3
264
+ int3 Rand3DPCG16(int3 p)
265
+ {
266
+ // taking a signed int then reinterpreting as unsigned gives good behavior for negatives
267
+ //TODO: uint3
268
+ int3 v = int3(p);
269
+
270
+ // Linear congruential step. These LCG constants are from Numerical Recipies
271
+ // For additional #'s, PCG would do multiple LCG steps and scramble each on output
272
+ // So v here is the RNG state
273
+ v = v * 1664525 + 1013904223;
274
+
275
+ // PCG uses xorshift for the final shuffle, but it is expensive (and cheap
276
+ // versions of xorshift have visible artifacts). Instead, use simple MAD Feistel steps
277
+ //
278
+ // Feistel ciphers divide the state into separate parts (usually by bits)
279
+ // then apply a series of permutation steps one part at a time. The permutations
280
+ // use a reversible operation (usually ^) to part being updated with the result of
281
+ // a permutation function on the other parts and the key.
282
+ //
283
+ // In this case, I'm using v.x, v.y and v.z as the parts, using + instead of ^ for
284
+ // the combination function, and just multiplying the other two parts (no key) for
285
+ // the permutation function.
286
+ //
287
+ // That gives a simple mad per round.
288
+ v.x += v.y*v.z;
289
+ v.y += v.z*v.x;
290
+ v.z += v.x*v.y;
291
+ v.x += v.y*v.z;
292
+ v.y += v.z*v.x;
293
+ v.z += v.x*v.y;
294
+
295
+ // only top 16 bits are well shuffled
296
+ return v >> 16;
297
+ }
298
+
299
+ // Wraps noise for tiling texture creation
300
+ // @param v = unwrapped texture parameter
301
+ // @param bTiling = true to tile, false to not tile
302
+ // @param RepeatSize = number of units before repeating
303
+ // @return either original or wrapped coord
304
+ float3 NoiseTileWrap(float3 v, bool bTiling, float RepeatSize)
305
+ {
306
+ return bTiling ? (math::frac(v / RepeatSize) * RepeatSize) : v;
307
+ }
308
+
309
+ // Evaluate polynomial to get smooth transitions for Perlin noise
310
+ // only needed by Perlin functions in this file
311
+ // scalar(per component): 2 add, 5 mul
312
+ float4 PerlinRamp(float4 t)
313
+ {
314
+ return t * t * t * (t * (t * 6 - 15) + 10);
315
+ }
316
+
317
+ // Blum-Blum-Shub-inspired pseudo random number generator
318
+ // http://www.umbc.edu/~olano/papers/mNoise.pdf
319
+ // real BBS uses ((s*s) mod M) with bignums and M as the product of two huge Blum primes
320
+ // instead, we use a single prime M just small enough not to overflow
321
+ // note that the above paper used 61, which fits in a half, but is unusably bad
322
+ // @param Integer valued floating point seed
323
+ // @return random number in range [0,1)
324
+ // ~8 ALU operations (5 *, 3 frac)
325
+ float RandBBSfloat(float seed)
326
+ {
327
+ float BBS_PRIME24 = 4093.0;
328
+ float s = math::frac(seed / BBS_PRIME24);
329
+ s = math::frac(s * s * BBS_PRIME24);
330
+ s = math::frac(s * s * BBS_PRIME24);
331
+ return s;
332
+ }
333
+
334
+ // Modified noise gradient term
335
+ // @param seed - random seed for integer lattice position
336
+ // @param offset - [-1,1] offset of evaluation point from lattice point
337
+ // @return gradient direction (xyz) and contribution (w) from this lattice point
338
+ float4 MGradient(int seed, float3 offset)
339
+ {
340
+ //TODO uint
341
+ int rand = Rand3DPCG16(int3(seed,0,0)).x;
342
+ int3 MGradientMask = int3(0x8000, 0x4000, 0x2000);
343
+ float3 MGradientScale = float3(1.0 / 0x4000, 1.0 / 0x2000, 1.0 / 0x1000);
344
+ float3 direction = float3(int3(rand, rand, rand) & MGradientMask) * MGradientScale - 1;
345
+ return float4(direction.x, direction.y, direction.z, math::dot(direction, offset));
346
+ }
347
+
348
+ // compute Perlin and related noise corner seed values
349
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
350
+ // @param bTiling = true to return seed values for a repeating noise pattern
351
+ // @param RepeatSize = integer units before tiling in each dimension
352
+ // @param seed000-seed111 = hash function seeds for the eight corners
353
+ // @return fractional part of v
354
+ struct SeedValue
355
+ {
356
+ float3 fv = float3(0);
357
+ float seed000 = 0;
358
+ float seed001 = 0;
359
+ float seed010 = 0;
360
+ float seed011 = 0;
361
+ float seed100 = 0;
362
+ float seed101 = 0;
363
+ float seed110 = 0;
364
+ float seed111 = 0;
365
+ };
366
+
367
+ SeedValue NoiseSeeds(float3 v, bool bTiling, float RepeatSize)
368
+ {
369
+ SeedValue seeds;
370
+ seeds.fv = math::frac(v);
371
+ float3 iv = math::floor(v);
372
+
373
+ const float3 primes = float3(19, 47, 101);
374
+
375
+ if (bTiling)
376
+ { // can't algebraically combine with primes
377
+ seeds.seed000 = math::dot(primes, NoiseTileWrap(iv, true, RepeatSize));
378
+ seeds.seed100 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 0), true, RepeatSize));
379
+ seeds.seed010 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 0), true, RepeatSize));
380
+ seeds.seed110 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 0), true, RepeatSize));
381
+ seeds.seed001 = math::dot(primes, NoiseTileWrap(iv + float3(0, 0, 1), true, RepeatSize));
382
+ seeds.seed101 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 1), true, RepeatSize));
383
+ seeds.seed011 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 1), true, RepeatSize));
384
+ seeds.seed111 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 1), true, RepeatSize));
385
+ }
386
+ else
387
+ { // get to combine offsets with multiplication by primes in this case
388
+ seeds.seed000 = math::dot(iv, primes);
389
+ seeds.seed100 = seeds.seed000 + primes.x;
390
+ seeds.seed010 = seeds.seed000 + primes.y;
391
+ seeds.seed110 = seeds.seed100 + primes.y;
392
+ seeds.seed001 = seeds.seed000 + primes.z;
393
+ seeds.seed101 = seeds.seed100 + primes.z;
394
+ seeds.seed011 = seeds.seed010 + primes.z;
395
+ seeds.seed111 = seeds.seed110 + primes.z;
396
+ }
397
+
398
+ return seeds;
399
+ }
400
+
401
+ struct SimplexWeights
402
+ {
403
+ float4 Result = float4(0);
404
+ float3 PosA = float3(0);
405
+ float3 PosB = float3(0);
406
+ float3 PosC = float3(0);
407
+ float3 PosD = float3(0);
408
+ };
409
+
410
+ // Computed weights and sample positions for simplex interpolation
411
+ // @return float4(a,b,c, d) Barycentric coordinate defined as Filtered = Tex(PosA) * a + Tex(PosB) * b + Tex(PosC) * c + Tex(PosD) * d
412
+ SimplexWeights ComputeSimplexWeights3D(float3 OrthogonalPos)
413
+ {
414
+ SimplexWeights weights;
415
+ float3 OrthogonalPosFloor = math::floor(OrthogonalPos);
416
+
417
+ weights.PosA = OrthogonalPosFloor;
418
+ weights.PosB = weights.PosA + float3(1, 1, 1);
419
+
420
+ OrthogonalPos -= OrthogonalPosFloor;
421
+
422
+ float Largest = math::max(OrthogonalPos.x, math::max(OrthogonalPos.y, OrthogonalPos.z));
423
+ float Smallest = math::min(OrthogonalPos.x, math::min(OrthogonalPos.y, OrthogonalPos.z));
424
+
425
+ weights.PosC = weights.PosA + float3(Largest == OrthogonalPos.x, Largest == OrthogonalPos.y, Largest == OrthogonalPos.z);
426
+ weights.PosD = weights.PosA + float3(Smallest != OrthogonalPos.x, Smallest != OrthogonalPos.y, Smallest != OrthogonalPos.z);
427
+
428
+ float RG = OrthogonalPos.x - OrthogonalPos.y;
429
+ float RB = OrthogonalPos.x - OrthogonalPos.z;
430
+ float GB = OrthogonalPos.y - OrthogonalPos.z;
431
+
432
+ weights.Result.z =
433
+ math::min(math::max(0, RG), math::max(0, RB)) // X
434
+ + math::min(math::max(0, -RG), math::max(0, GB)) // Y
435
+ + math::min(math::max(0, -RB), math::max(0, -GB)); // Z
436
+
437
+ weights.Result.w =
438
+ math::min(math::max(0, -RG), math::max(0, -RB)) // X
439
+ + math::min(math::max(0, RG), math::max(0, -GB)) // Y
440
+ + math::min(math::max(0, RB), math::max(0, GB)); // Z
441
+
442
+ weights.Result.y = Smallest;
443
+ weights.Result.x = 1.0f - weights.Result.y - weights.Result.z - weights.Result.w;
444
+
445
+ return weights;
446
+ }
447
+
448
+ // filtered 3D gradient simple noise (few texture lookups, high quality)
449
+ // @param v >0
450
+ // @return random number in the range -1 .. 1
451
+ float SimplexNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 EvalPos)
452
+ {
453
+ float3 OrthogonalPos = SkewSimplex(EvalPos);
454
+
455
+ SimplexWeights Weights = ComputeSimplexWeights3D(OrthogonalPos);
456
+
457
+ // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 32 bit)
458
+ float3 A = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosA);
459
+ float3 B = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosB);
460
+ float3 C = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosC);
461
+ float3 D = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosD);
462
+
463
+ Weights.PosA = UnSkewSimplex(Weights.PosA);
464
+ Weights.PosB = UnSkewSimplex(Weights.PosB);
465
+ Weights.PosC = UnSkewSimplex(Weights.PosC);
466
+ Weights.PosD = UnSkewSimplex(Weights.PosD);
467
+
468
+ float DistanceWeight;
469
+
470
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosA)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
471
+ float a = math::dot(A, EvalPos - Weights.PosA) * DistanceWeight;
472
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosB)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
473
+ float b = math::dot(B, EvalPos - Weights.PosB) * DistanceWeight;
474
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosC)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
475
+ float c = math::dot(C, EvalPos - Weights.PosC) * DistanceWeight;
476
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosD)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
477
+ float d = math::dot(D, EvalPos - Weights.PosD) * DistanceWeight;
478
+
479
+ return 32 * (a + b + c + d);
480
+ }
481
+
482
+ // filtered 3D noise, can be optimized
483
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
484
+ // @param bTiling = repeat noise pattern
485
+ // @param RepeatSize = integer units before tiling in each dimension
486
+ // @return random number in the range -1 .. 1
487
+ float GradientNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 v, bool bTiling, float RepeatSize)
488
+ {
489
+ bTiling = true;
490
+ float3 fv = math::frac(v);
491
+ float3 iv0 = NoiseTileWrap(math::floor(v), bTiling, RepeatSize);
492
+ float3 iv1 = NoiseTileWrap(iv0 + 1, bTiling, RepeatSize);
493
+
494
+ const int2 ZShear = int2(17, 89);
495
+
496
+ float2 OffsetA = iv0.z * ZShear;
497
+ float2 OffsetB = OffsetA + ZShear; // non-tiling, use relative offset
498
+ if (bTiling) // tiling, have to compute from wrapped coordinates
499
+ {
500
+ OffsetB = iv1.z * ZShear;
501
+ }
502
+
503
+ // Texture size scale factor
504
+ float ts = 1 / 128.0f;
505
+
506
+ // texture coordinates for iv0.xy, as offset for both z slices
507
+ float2 TexA0 = (float2(iv0.x, iv0.y) + OffsetA + 0.5f) * ts;
508
+ float2 TexB0 = (float2(iv0.x, iv0.y) + OffsetB + 0.5f) * ts;
509
+
510
+ // texture coordinates for iv1.xy, as offset for both z slices
511
+ float2 TexA1 = TexA0 + ts; // for non-tiling, can compute relative to existing coordinates
512
+ float2 TexB1 = TexB0 + ts;
513
+ if (bTiling) // for tiling, need to compute from wrapped coordinates
514
+ {
515
+ TexA1 = (float2(iv1.x, iv1.y) + OffsetA + 0.5f) * ts;
516
+ TexB1 = (float2(iv1.x, iv1.y) + OffsetB + 0.5f) * ts;
517
+ }
518
+
519
+
520
+ // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 8, 16 or 32 bit)
521
+ float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat);
522
+ float3 PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
523
+ float3 A = PerlinNoiseColor * 2 - 1;
524
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat);
525
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
526
+ float3 B = PerlinNoiseColor * 2 - 1;
527
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat);
528
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
529
+ float3 C = PerlinNoiseColor * 2 - 1;
530
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat);
531
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
532
+ float3 D = PerlinNoiseColor * 2 - 1;
533
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat);
534
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
535
+ float3 E = PerlinNoiseColor * 2 - 1;
536
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat);
537
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
538
+ float3 F = PerlinNoiseColor * 2 - 1;
539
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat);
540
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
541
+ float3 G = PerlinNoiseColor * 2 - 1;
542
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat);
543
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
544
+ float3 H = PerlinNoiseColor * 2 - 1;
545
+
546
+ float a = math::dot(A, fv - float3(0, 0, 0));
547
+ float b = math::dot(B, fv - float3(1, 0, 0));
548
+ float c = math::dot(C, fv - float3(0, 1, 0));
549
+ float d = math::dot(D, fv - float3(1, 1, 0));
550
+ float e = math::dot(E, fv - float3(0, 0, 1));
551
+ float f = math::dot(F, fv - float3(1, 0, 1));
552
+ float g = math::dot(G, fv - float3(0, 1, 1));
553
+ float h = math::dot(H, fv - float3(1, 1, 1));
554
+
555
+ float4 Weights = PerlinRamp(math::frac(float4(fv.x, fv.y, fv.z, 0)));
556
+
557
+ float i = math::lerp(math::lerp(a, b, Weights.x), math::lerp(c, d, Weights.x), Weights.y);
558
+ float j = math::lerp(math::lerp(e, f, Weights.x), math::lerp(g, h, Weights.x), Weights.y);
559
+
560
+ return math::lerp(i, j, Weights.z);
561
+ }
562
+
563
+ // @return random number in the range -1 .. 1
564
+ // scalar: 6 frac, 31 mul/mad, 15 add,
565
+ float FastGradientPerlinNoise3D_TEX(uniform texture_3d PerlinNoise3DTexture, float3 xyz)
566
+ {
567
+ // needs to be the same value when creating the PerlinNoise3D texture
568
+ float Extent = 16;
569
+
570
+ // last texel replicated and needed for filtering
571
+ // scalar: 3 frac, 6 mul
572
+ xyz = math::frac(xyz / (Extent - 1)) * (Extent - 1);
573
+
574
+ // scalar: 3 frac
575
+ float3 uvw = math::frac(xyz);
576
+ // = floor(xyz);
577
+ // scalar: 3 add
578
+ float3 p0 = xyz - uvw;
579
+ // float3 f = math::pow(uvw, 2) * 3.0f - math::pow(uvw, 3) * 2.0f; // original perlin hermite (ok when used without bump mapping)
580
+ // scalar: 2*3 add 5*3 mul
581
+ float4 pr = PerlinRamp(float4(uvw.x, uvw.y, uvw.z, 0));
582
+ float3 f = float3(pr.x, pr.y, pr.z); // new, better with continues second derivative for bump mapping
583
+ // scalar: 3 add
584
+ float3 p = p0 + f;
585
+ // scalar: 3 mad
586
+ // TODO: need reverse???
587
+ float4 NoiseSample = tex::lookup_float4(PerlinNoise3DTexture, p / Extent + 0.5f / Extent); // +0.5f to get rid of bilinear offset
588
+
589
+ // reconstruct from 8bit (using mad with 2 constants and dot4 was same instruction count)
590
+ // scalar: 4 mad, 3 mul, 3 add
591
+ float3 n = float3(NoiseSample.x, NoiseSample.y, NoiseSample.z) * 255.0f / 127.0f - 1.0f;
592
+ float d = NoiseSample.w * 255.f - 127;
593
+ return math::dot(xyz, n) - d;
594
+ }
595
+
596
+ // Perlin-style "Modified Noise"
597
+ // http://www.umbc.edu/~olano/papers/index.html#mNoise
598
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
599
+ // @param bTiling = repeat noise pattern
600
+ // @param RepeatSize = integer units before tiling in each dimension
601
+ // @return random number in the range -1 .. 1
602
+ float GradientNoise3D_ALU(float3 v, bool bTiling, float RepeatSize)
603
+ {
604
+ SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize);
605
+
606
+ float rand000 = MGradient(int(seeds.seed000), seeds.fv - float3(0, 0, 0)).w;
607
+ float rand100 = MGradient(int(seeds.seed100), seeds.fv - float3(1, 0, 0)).w;
608
+ float rand010 = MGradient(int(seeds.seed010), seeds.fv - float3(0, 1, 0)).w;
609
+ float rand110 = MGradient(int(seeds.seed110), seeds.fv - float3(1, 1, 0)).w;
610
+ float rand001 = MGradient(int(seeds.seed001), seeds.fv - float3(0, 0, 1)).w;
611
+ float rand101 = MGradient(int(seeds.seed101), seeds.fv - float3(1, 0, 1)).w;
612
+ float rand011 = MGradient(int(seeds.seed011), seeds.fv - float3(0, 1, 1)).w;
613
+ float rand111 = MGradient(int(seeds.seed111), seeds.fv - float3(1, 1, 1)).w;
614
+
615
+ float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0));
616
+
617
+ float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y);
618
+ float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y);
619
+ return math::lerp(i, j, Weights.z);
620
+ }
621
+
622
+ // 3D value noise - used to be incorrectly called Perlin noise
623
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
624
+ // @param bTiling = repeat noise pattern
625
+ // @param RepeatSize = integer units before tiling in each dimension
626
+ // @return random number in the range -1 .. 1
627
+ float ValueNoise3D_ALU(float3 v, bool bTiling, float RepeatSize)
628
+ {
629
+ SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize);
630
+
631
+ float rand000 = RandBBSfloat(seeds.seed000) * 2 - 1;
632
+ float rand100 = RandBBSfloat(seeds.seed100) * 2 - 1;
633
+ float rand010 = RandBBSfloat(seeds.seed010) * 2 - 1;
634
+ float rand110 = RandBBSfloat(seeds.seed110) * 2 - 1;
635
+ float rand001 = RandBBSfloat(seeds.seed001) * 2 - 1;
636
+ float rand101 = RandBBSfloat(seeds.seed101) * 2 - 1;
637
+ float rand011 = RandBBSfloat(seeds.seed011) * 2 - 1;
638
+ float rand111 = RandBBSfloat(seeds.seed111) * 2 - 1;
639
+
640
+ float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0));
641
+
642
+ float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y);
643
+ float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y);
644
+ return math::lerp(i, j, Weights.z);
645
+ }
646
+
647
+ // 3D jitter offset within a voronoi noise cell
648
+ // @param pos - integer lattice corner
649
+ // @return random offsets vector
650
+ float3 VoronoiCornerSample(float3 pos, int Quality)
651
+ {
652
+ // random values in [-0.5, 0.5]
653
+ float3 noise = float3(Rand3DPCG16(int3(pos))) / 0xffff - 0.5;
654
+
655
+ // quality level 1 or 2: searches a 2x2x2 neighborhood with points distributed on a sphere
656
+ // scale factor to guarantee jittered points will be found within a 2x2x2 search
657
+ if (Quality <= 2)
658
+ {
659
+ return math::normalize(noise) * 0.2588;
660
+ }
661
+
662
+ // quality level 3: searches a 3x3x3 neighborhood with points distributed on a sphere
663
+ // scale factor to guarantee jittered points will be found within a 3x3x3 search
664
+ if (Quality == 3)
665
+ {
666
+ return math::normalize(noise) * 0.3090;
667
+ }
668
+
669
+ // quality level 4: jitter to anywhere in the cell, needs 4x4x4 search
670
+ return noise;
671
+ }
672
+
673
+ // compare previous best with a new candidate
674
+ // not producing point locations makes it easier for compiler to eliminate calculations when they're not needed
675
+ // @param minval = location and distance of best candidate seed point before the new one
676
+ // @param candidate = candidate seed point
677
+ // @param offset = 3D offset to new candidate seed point
678
+ // @param bDistanceOnly = if true, only set maxval.w with distance, otherwise maxval.w is distance and maxval.xyz is position
679
+ // @return position (if bDistanceOnly is false) and distance to closest seed point so far
680
+ float4 VoronoiCompare(float4 minval, float3 candidate, float3 offset, bool bDistanceOnly)
681
+ {
682
+ if (bDistanceOnly)
683
+ {
684
+ return float4(0, 0, 0, math::min(minval.w, math::dot(offset, offset)));
685
+ }
686
+ else
687
+ {
688
+ float newdist = math::dot(offset, offset);
689
+ return newdist > minval.w ? minval : float4(candidate.x, candidate.y, candidate.z, newdist);
690
+ }
691
+ }
692
+
693
+ // 220 instruction Worley noise
694
+ float4 VoronoiNoise3D_ALU(float3 v, int Quality, bool bTiling, float RepeatSize, bool bDistanceOnly)
695
+ {
696
+ float3 fv = math::frac(v), fv2 = math::frac(v + 0.5);
697
+ float3 iv = math::floor(v), iv2 = math::floor(v + 0.5);
698
+
699
+ // with initial minimum distance = infinity (or at least bigger than 4), first min is optimized away
700
+ float4 mindist = float4(0,0,0,100);
701
+ float3 p, offset;
702
+
703
+ // quality level 3: do a 3x3x3 search
704
+ if (Quality == 3)
705
+ {
706
+ int offset_x;
707
+ int offset_y;
708
+ int offset_z;
709
+ for (offset_x = -1; offset_x <= 1; ++offset_x)
710
+ {
711
+ for (offset_y = -1; offset_y <= 1; ++offset_y)
712
+ {
713
+ for (offset_z = -1; offset_z <= 1; ++offset_z)
714
+ {
715
+ offset = float3(offset_x, offset_y, offset_z);
716
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize), Quality);
717
+ mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly);
718
+ }
719
+ }
720
+ }
721
+ }
722
+
723
+ // everybody else searches a base 2x2x2 neighborhood
724
+ else
725
+ {
726
+ int offset_x;
727
+ int offset_y;
728
+ int offset_z;
729
+ for (offset_x = 0; offset_x <= 1; ++offset_x)
730
+ {
731
+ for (offset_y = 0; offset_y <= 1; ++offset_y)
732
+ {
733
+ for (offset_z = 0; offset_z <= 1; ++offset_z)
734
+ {
735
+ offset = float3(offset_x, offset_y, offset_z);
736
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality);
737
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
738
+
739
+ // quality level 2, do extra set of points, offset by half a cell
740
+ if (Quality == 2)
741
+ {
742
+ // 467 is just an offset to a different area in the random number field to avoid similar neighbor artifacts
743
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize) + 467, Quality);
744
+ mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly);
745
+ }
746
+ }
747
+ }
748
+ }
749
+ }
750
+
751
+ // quality level 4: add extra sets of four cells in each direction
752
+ if (Quality >= 4)
753
+ {
754
+ int offset_x;
755
+ int offset_y;
756
+ int offset_z;
757
+ for (offset_x = -1; offset_x <= 2; offset_x += 3)
758
+ {
759
+ for (offset_y = 0; offset_y <= 1; ++offset_y)
760
+ {
761
+ for (offset_z = 0; offset_z <= 1; ++offset_z)
762
+ {
763
+ offset = float3(offset_x, offset_y, offset_z);
764
+ // along x axis
765
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality);
766
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
767
+
768
+ // along y axis
769
+ p = float3(offset.y, offset.z, offset.x) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.y, offset.z, offset.x), bTiling, RepeatSize), Quality);
770
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
771
+
772
+ // along z axis
773
+ p = float3(offset.z, offset.x, offset.y) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.z, offset.x, offset.y), bTiling, RepeatSize), Quality);
774
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
775
+ }
776
+ }
777
+ }
778
+ }
779
+
780
+ // transform squared distance to real distance
781
+ return float4(mindist.x, mindist.y, mindist.z, math::sqrt(mindist.w));
782
+ }
783
+
784
+ // Coordinates for corners of a Simplex tetrahedron
785
+ // Based on McEwan et al., Efficient computation of noise in GLSL, JGT 2011
786
+ // @param v = 3D noise argument
787
+ // @return 4 corner locations
788
+ float4x3 SimplexCorners(float3 v)
789
+ {
790
+ // find base corner by skewing to tetrahedral space and back
791
+ float3 tet = math::floor(v + v.x/3 + v.y/3 + v.z/3);
792
+ float3 base = tet - tet.x/6 - tet.y/6 - tet.z/6;
793
+ float3 f = v - base;
794
+
795
+ // Find offsets to other corners (McEwan did this in tetrahedral space,
796
+ // but since skew is along x=y=z axis, this works in Euclidean space too.)
797
+ 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);
798
+ float3 a1 = math::min(g, h) - 1.0 / 6.0, a2 = math::max(g, h) - 1.0 / 3.0;
799
+
800
+ // four corners
801
+ return float4x3(base, base + a1, base + a2, base + 0.5);
802
+ }
803
+
804
+ // Improved smoothing function for simplex noise
805
+ // @param f = fractional distance to four tetrahedral corners
806
+ // @return weight for each corner
807
+ float4 SimplexSmooth(float4x3 f)
808
+ {
809
+ const float scale = 1024. / 375.; // scale factor to make noise -1..1
810
+ 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]));
811
+ float4 s = math::saturate(2 * d);
812
+ return (1 * scale + s*(-3 * scale + s*(3 * scale - s*scale)));
813
+ }
814
+
815
+ // Derivative of simplex noise smoothing function
816
+ // @param f = fractional distanc eto four tetrahedral corners
817
+ // @return derivative of smoothing function for each corner by x, y and z
818
+ float3x4 SimplexDSmooth(float4x3 f)
819
+ {
820
+ const float scale = 1024. / 375.; // scale factor to make noise -1..1
821
+ 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]));
822
+ float4 s = math::saturate(2 * d);
823
+ s = -12 * scale + s*(24 * scale - s * 12 * scale);
824
+
825
+ return float3x4(
826
+ s * float4(f[0][0], f[1][0], f[2][0], f[3][0]),
827
+ s * float4(f[0][1], f[1][1], f[2][1], f[3][1]),
828
+ s * float4(f[0][2], f[1][2], f[2][2], f[3][2]));
829
+ }
830
+
831
+ // Simplex noise and its Jacobian derivative
832
+ // @param v = 3D noise argument
833
+ // @param bTiling = whether to repeat noise pattern
834
+ // @param RepeatSize = integer units before tiling in each dimension, must be a multiple of 3
835
+ // @return float3x3 Jacobian in J[*].xyz, vector noise in J[*].w
836
+ // J[0].w, J[1].w, J[2].w is a Perlin-style simplex noise with vector output, e.g. (Nx, Ny, Nz)
837
+ // J[i].x is X derivative of the i'th component of the noise so J[2].x is dNz/dx
838
+ // You can use this to compute the noise, gradient, curl, or divergence:
839
+ // float3x4 J = JacobianSimplex_ALU(...);
840
+ // float3 VNoise = float3(J[0].w, J[1].w, J[2].w); // 3D noise
841
+ // float3 Grad = J[0].xyz; // gradient of J[0].w
842
+ // float3 Curl = float3(J[1][2]-J[2][1], J[2][0]-J[0][2], J[0][1]-J[1][2]);
843
+ // float Div = J[0][0]+J[1][1]+J[2][2];
844
+ // All of these are confirmed to compile out all unneeded terms.
845
+ // So Grad of X doesn't compute Y or Z components, and VNoise doesn't do any of the derivative computation.
846
+ float3x4 JacobianSimplex_ALU(float3 v, bool bTiling, float RepeatSize)
847
+ {
848
+ int3 MGradientMask = int3(0x8000, 0x4000, 0x2000);
849
+ float3 MGradientScale = float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000);
850
+
851
+ // corners of tetrahedron
852
+ float4x3 T = SimplexCorners(v);
853
+ // TODO: uint3
854
+ int3 rand = int3(0);
855
+ float4x3 gvec0 = float4x3(1.0);
856
+ float4x3 gvec1 = float4x3(1.0);
857
+ float4x3 gvec2 = float4x3(1.0);
858
+ float4x3 fv = float4x3(1.0);
859
+ float3x4 grad = float3x4(1.0);
860
+
861
+ // processing of tetrahedral vertices, unrolled
862
+ // to compute gradient at each corner
863
+ fv[0] = v - T[0];
864
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[0] + 0.5, bTiling, RepeatSize))));
865
+ gvec0[0] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
866
+ gvec1[0] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
867
+ gvec2[0] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
868
+ grad[0][0] = math::dot(gvec0[0], fv[0]);
869
+ grad[1][0] = math::dot(gvec1[0], fv[0]);
870
+ grad[2][0] = math::dot(gvec2[0], fv[0]);
871
+
872
+ fv[1] = v - T[1];
873
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[1] + 0.5, bTiling, RepeatSize))));
874
+ gvec0[1] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
875
+ gvec1[1] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
876
+ gvec1[1] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
877
+ grad[0][1] = math::dot(gvec0[1], fv[1]);
878
+ grad[1][1] = math::dot(gvec1[1], fv[1]);
879
+ grad[2][1] = math::dot(gvec2[1], fv[1]);
880
+
881
+ fv[2] = v - T[2];
882
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[2] + 0.5, bTiling, RepeatSize))));
883
+ gvec0[2] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
884
+ gvec1[2] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
885
+ gvec2[2] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
886
+ grad[0][2] = math::dot(gvec0[2], fv[2]);
887
+ grad[1][2] = math::dot(gvec1[2], fv[2]);
888
+ grad[2][2] = math::dot(gvec2[2], fv[2]);
889
+
890
+ fv[3] = v - T[3];
891
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[3] + 0.5, bTiling, RepeatSize))));
892
+ gvec0[3] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
893
+ gvec1[3] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
894
+ gvec2[3] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
895
+ grad[0][3] = math::dot(gvec0[3], fv[3]);
896
+ grad[1][3] = math::dot(gvec1[3], fv[3]);
897
+ grad[2][3] = math::dot(gvec2[3], fv[3]);
898
+
899
+ // blend gradients
900
+ float4 sv = SimplexSmooth(fv);
901
+ float3x4 ds = SimplexDSmooth(fv);
902
+
903
+ float3x4 jacobian = float3x4(1.0);
904
+ float3 vec0 = gvec0*sv + grad[0]*ds; // NOTE: mdl is column major, convert from UE4 (row major)
905
+ jacobian[0] = float4(vec0.x, vec0.y, vec0.z, math::dot(sv, grad[0]));
906
+ float3 vec1 = gvec1*sv + grad[1]*ds;
907
+ jacobian[1] = float4(vec1.x, vec1.y, vec1.z, math::dot(sv, grad[1]));
908
+ float3 vec2 = gvec2*sv + grad[2]*ds;
909
+ jacobian[2] = float4(vec2.x, vec2.y, vec2.z, math::dot(sv, grad[2]));
910
+
911
+ return jacobian;
912
+ }
913
+
914
+ // 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
915
+ // floats for all called functions (NoiseTileWrap) and this prevents any float-to-int conversion errors from automatic type conversion.
916
+ float Noise3D_Multiplexer(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, int Function, float3 Position, int Quality, bool bTiling, float RepeatSize)
917
+ {
918
+ // verified, HLSL compiled out the switch if Function is a constant
919
+ switch(Function)
920
+ {
921
+ case 0:
922
+ return SimplexNoise3D_TEX(PerlinNoiseGradientTexture, Position);
923
+ case 1:
924
+ return GradientNoise3D_TEX(PerlinNoiseGradientTexture, Position, bTiling, RepeatSize);
925
+ case 2:
926
+ return FastGradientPerlinNoise3D_TEX(PerlinNoise3DTexture, Position);
927
+ case 3:
928
+ return GradientNoise3D_ALU(Position, bTiling, RepeatSize);
929
+ case 4:
930
+ return ValueNoise3D_ALU(Position, bTiling, RepeatSize);
931
+ case 5:
932
+ return VoronoiNoise3D_ALU(Position, Quality, bTiling, RepeatSize, true).w * 2.0 - 1.0;
933
+ }
934
+ return 0;
935
+ }
936
+ //----------------------------------------------------------
937
+
938
+ 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)
939
+ [[
940
+ anno::description("Noise"),
941
+ anno::noinline()
942
+ ]]
943
+ {
944
+ Position *= Scale;
945
+ FilterWidth *= Scale;
946
+
947
+ float Out = 0.0f;
948
+ float OutScale = 1.0f;
949
+ float InvLevelScale = 1.0f / LevelScale;
950
+
951
+ int iFunction(Function);
952
+ int iQuality(Quality);
953
+ int iLevels(Levels);
954
+ bool bTurbulence(Turbulence);
955
+ bool bTiling(Tiling);
956
+
957
+ for(int i = 0; i < iLevels; ++i)
958
+ {
959
+ // fade out noise level that are too high frequent (not done through dynamic branching as it usually requires gradient instructions)
960
+ OutScale *= math::saturate(1.0 - FilterWidth);
961
+
962
+ if(bTurbulence)
963
+ {
964
+ Out += math::abs(Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize)) * OutScale;
965
+ }
966
+ else
967
+ {
968
+ Out += Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize) * OutScale;
969
+ }
970
+
971
+ Position *= LevelScale;
972
+ RepeatSize *= LevelScale;
973
+ OutScale *= InvLevelScale;
974
+ FilterWidth *= LevelScale;
975
+ }
976
+
977
+ if(!bTurbulence)
978
+ {
979
+ // bring -1..1 to 0..1 range
980
+ Out = Out * 0.5f + 0.5f;
981
+ }
982
+
983
+ // Out is in 0..1 range
984
+ return math::lerp(OutputMin, OutputMax, Out);
985
+ }
986
+
987
+ // Material node for noise functions returning a vector value
988
+ // @param LevelScale usually 2 but higher values allow efficient use of few levels
989
+ // @return in user defined range (OutputMin..OutputMax)
990
+ export float4 vector4_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize)
991
+ [[
992
+ anno::description("Vector Noise"),
993
+ anno::noinline()
994
+ ]]
995
+ {
996
+ float4 result = float4(0,0,0,1);
997
+ float3 ret = float3(0);
998
+ int iQuality = int(Quality);
999
+ int iFunction = int(Function);
1000
+ bool bTiling = Tiling > 0.0;
1001
+
1002
+ float3x4 Jacobian = JacobianSimplex_ALU(Position, bTiling, TileSize); // compiled out if not used
1003
+
1004
+ // verified, HLSL compiled out the switch if Function is a constant
1005
+ switch (iFunction)
1006
+ {
1007
+ case 0: // Cellnoise
1008
+ ret = float3(Rand3DPCG16(int3(math::floor(NoiseTileWrap(Position, bTiling, TileSize))))) / 0xffff;
1009
+ result = float4(ret.x, ret.y, ret.z, 1);
1010
+ break;
1011
+ case 1: // Color noise
1012
+ ret = float3(Jacobian[0].w, Jacobian[1].w, Jacobian[2].w);
1013
+ result = float4(ret.x, ret.y, ret.z, 1);
1014
+ break;
1015
+ case 2: // Gradient
1016
+ result = Jacobian[0];
1017
+ break;
1018
+ case 3: // Curl
1019
+ ret = float3(Jacobian[2][1] - Jacobian[1][2], Jacobian[0][2] - Jacobian[2][0], Jacobian[1][0] - Jacobian[0][1]);
1020
+ result = float4(ret.x, ret.y, ret.z, 1);
1021
+ break;
1022
+ case 4: // Voronoi
1023
+ result = VoronoiNoise3D_ALU(Position, iQuality, bTiling, TileSize, false);
1024
+ break;
1025
+ }
1026
+ return result;
1027
+ }
1028
+
1029
+ export float3 vector3_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize)
1030
+ [[
1031
+ anno::description("Vector Noise float3 version"),
1032
+ anno::noinline()
1033
+ ]]
1034
+ {
1035
+ float4 noise = vector4_noise(Position, Quality, Function, Tiling, TileSize);
1036
+ return float3(noise.x, noise.y, noise.z);
1037
+ }
1038
+
1039
+
1040
+ // workaround for ue4 fresnel (without supporting for camera vector) : replacing it with 0.0, means facing to the view
1041
+ export float fresnel(float exponent [[anno::unused()]], float base_reflect_fraction [[anno::unused()]], float3 normal [[anno::unused()]])
1042
+ [[
1043
+ anno::description("Fresnel"),
1044
+ anno::noinline()
1045
+ ]]
1046
+ {
1047
+ return 0.0;
1048
+ }
1049
+
1050
+ export float fresnel_function(float3 normal_vector [[anno::unused()]], float3 camera_vector [[anno::unused()]],
1051
+ bool invert_fresnel [[anno::unused()]], float power [[anno::unused()]],
1052
+ bool use_cheap_contrast [[anno::unused()]], float cheap_contrast_dark [[anno::unused()]], float cheap_contrast_bright [[anno::unused()]],
1053
+ bool clamp_fresnel_dot_product [[anno::unused()]])
1054
+ [[
1055
+ anno::description("Fresnel Function"),
1056
+ anno::noinline()
1057
+ ]]
1058
+ {
1059
+ return 0.0;
1060
+ }
1061
+
1062
+ export float3 camera_vector(uniform bool up_z = true)
1063
+ [[
1064
+ anno::description("Camera Vector"),
1065
+ anno::noinline()
1066
+ ]]
1067
+ {
1068
+ // assume camera postion is 0,0,0
1069
+ return math::normalize(float3(0) - convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z));
1070
+ }
1071
+
1072
+ export float pixel_depth()
1073
+ [[
1074
+ anno::description("Pixel Depth"),
1075
+ anno::noinline()
1076
+ ]]
1077
+ {
1078
+ return 256.0f;
1079
+ }
1080
+
1081
+ export float scene_depth()
1082
+ [[
1083
+ anno::description("Scene Depth")
1084
+ ]]
1085
+ {
1086
+ return 65500.0f;
1087
+ }
1088
+
1089
+ export float3 scene_color()
1090
+ [[
1091
+ anno::description("Scene Color")
1092
+ ]]
1093
+ {
1094
+ return float3(1.0f);
1095
+ }
1096
+
1097
+ export float4 vertex_color()
1098
+ [[
1099
+ anno::description("Vertex Color"),
1100
+ anno::noinline()
1101
+ ]]
1102
+ {
1103
+ return float4(1.0f);
1104
+ }
1105
+
1106
+ export float4 vertex_color_from_coordinate(int VertexColorCoordinateIndex)
1107
+ [[
1108
+ anno::description("Vertex Color for float2 PrimVar"),
1109
+ anno::noinline()
1110
+ ]]
1111
+ {
1112
+ // 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
1113
+ 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);
1114
+ }
1115
+
1116
+ export float3 camera_position()
1117
+ [[
1118
+ anno::description("Camera Position"),
1119
+ anno::noinline()
1120
+ ]]
1121
+ {
1122
+ return float3(1000.0f, 0, 0);
1123
+ }
1124
+
1125
+ export float3 rotate_about_axis(float4 NormalizedRotationAxisAndAngle, float3 PositionOnAxis, float3 Position)
1126
+ [[
1127
+ anno::description("Rotates Position about the given axis by the given angle")
1128
+ ]]
1129
+ {
1130
+ // Project Position onto the rotation axis and find the closest point on the axis to Position
1131
+ float3 NormalizedRotationAxis = float3(NormalizedRotationAxisAndAngle.x,NormalizedRotationAxisAndAngle.y,NormalizedRotationAxisAndAngle.z);
1132
+ float3 ClosestPointOnAxis = PositionOnAxis + NormalizedRotationAxis * math::dot(NormalizedRotationAxis, Position - PositionOnAxis);
1133
+ // Construct orthogonal axes in the plane of the rotation
1134
+ float3 UAxis = Position - ClosestPointOnAxis;
1135
+ float3 VAxis = math::cross(NormalizedRotationAxis, UAxis);
1136
+ float[2] SinCosAngle = math::sincos(NormalizedRotationAxisAndAngle.w);
1137
+ // Rotate using the orthogonal axes
1138
+ float3 R = UAxis * SinCosAngle[1] + VAxis * SinCosAngle[0];
1139
+ // Reconstruct the rotated world space position
1140
+ float3 RotatedPosition = ClosestPointOnAxis + R;
1141
+ // Convert from position to a position offset
1142
+ return RotatedPosition - Position;
1143
+ }
1144
+
1145
+ export float2 rotate_scale_offset_texcoords(float2 InTexCoords, float4 InRotationScale, float2 InOffset)
1146
+ [[
1147
+ anno::description("Returns a float2 texture coordinate after 2x2 transform and offset applied")
1148
+ ]]
1149
+ {
1150
+ return float2(math::dot(InTexCoords, float2(InRotationScale.x, InRotationScale.y)), math::dot(InTexCoords, float2(InRotationScale.z, InRotationScale.w))) + InOffset;
1151
+ }
1152
+
1153
+ export float3 reflection_custom_world_normal(float3 WorldNormal, bool bNormalizeInputNormal, uniform bool up_z = true)
1154
+ [[
1155
+ anno::description("Reflection vector about the specified world space normal")
1156
+ ]]
1157
+ {
1158
+ if (bNormalizeInputNormal)
1159
+ {
1160
+ WorldNormal = math::normalize(WorldNormal);
1161
+ }
1162
+
1163
+ return -camera_vector(up_z) + WorldNormal * math::dot(WorldNormal, camera_vector(up_z)) * 2.0;
1164
+ }
1165
+
1166
+ export float3 reflection_vector(uniform bool up_z = true)
1167
+ [[
1168
+ anno::description("Reflection Vector"),
1169
+ anno::noinline()
1170
+ ]]
1171
+ {
1172
+ float3 normal = convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
1173
+ return reflection_custom_world_normal(normal, false, up_z);
1174
+ }
1175
+
1176
+ export float dither_temporalAA(float AlphaThreshold = 0.5f, float Random = 1.0f [[anno::unused()]])
1177
+ [[
1178
+ anno::description("Dither TemporalAA"),
1179
+ anno::noinline()
1180
+ ]]
1181
+ {
1182
+ return AlphaThreshold;
1183
+ }
1184
+
1185
+ export float3 black_body( float Temp )
1186
+ [[
1187
+ anno::description("Black Body"),
1188
+ anno::noinline()
1189
+ ]]
1190
+ {
1191
+ float u = ( 0.860117757f + 1.54118254e-4f * Temp + 1.28641212e-7f * Temp*Temp ) / ( 1.0f + 8.42420235e-4f * Temp + 7.08145163e-7f * Temp*Temp );
1192
+ float v = ( 0.317398726f + 4.22806245e-5f * Temp + 4.20481691e-8f * Temp*Temp ) / ( 1.0f - 2.89741816e-5f * Temp + 1.61456053e-7f * Temp*Temp );
1193
+
1194
+ float x = 3*u / ( 2*u - 8*v + 4 );
1195
+ float y = 2*v / ( 2*u - 8*v + 4 );
1196
+ float z = 1 - x - y;
1197
+
1198
+ float Y = 1;
1199
+ float X = Y/y * x;
1200
+ float Z = Y/y * z;
1201
+
1202
+ float3x3 XYZtoRGB = float3x3(
1203
+ float3(3.2404542, -1.5371385, -0.4985314),
1204
+ float3(-0.9692660, 1.8760108, 0.0415560),
1205
+ float3(0.0556434, -0.2040259, 1.0572252)
1206
+ );
1207
+
1208
+ return XYZtoRGB * float3( X, Y, Z ) * math::pow( 0.0004 * Temp, 4 );
1209
+ }
1210
+
1211
+ export float per_instance_random(uniform texture_2d PerlinNoiseGradientTexture, int NumberInstances)
1212
+ [[
1213
+ anno::description("Per Instance Random"),
1214
+ anno::noinline()
1215
+ ]]
1216
+ {
1217
+ float weight = state::object_id() / float(NumberInstances);
1218
+ return NumberInstances == 0 ? 0.0 : tex::lookup_float4(PerlinNoiseGradientTexture, float2(weight, 1.0 - weight), tex::wrap_repeat, tex::wrap_repeat).x;
1219
+ }
1220
+
1221
+ //------------------ Hair from UE4 -----------------------
1222
+ float3 hair_absorption_to_color(float3 A)
1223
+ {
1224
+ const float B = 0.3f;
1225
+ float b2 = B * B;
1226
+ float b3 = B * b2;
1227
+ float b4 = b2 * b2;
1228
+ float b5 = B * b4;
1229
+ float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5);
1230
+ return math::exp(-math::sqrt(A) * D);
1231
+ }
1232
+
1233
+ float3 hair_color_to_absorption(float3 C)
1234
+ {
1235
+ const float B = 0.3f;
1236
+ float b2 = B * B;
1237
+ float b3 = B * b2;
1238
+ float b4 = b2 * b2;
1239
+ float b5 = B * b4;
1240
+ float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5);
1241
+ return math::pow(math::log(C) / D, 2.0f);
1242
+ }
1243
+
1244
+ export float3 get_hair_color_from_melanin(float InMelanin, float InRedness, float3 InDyeColor)
1245
+ [[
1246
+ anno::description("Hair Color")
1247
+ ]]
1248
+ {
1249
+ InMelanin = math::saturate(InMelanin);
1250
+ InRedness = math::saturate(InRedness);
1251
+ float Melanin = -math::log(math::max(1 - InMelanin, 0.0001f));
1252
+ float Eumelanin = Melanin * (1 - InRedness);
1253
+ float Pheomelanin = Melanin * InRedness;
1254
+
1255
+ float3 DyeAbsorption = hair_color_to_absorption(math::saturate(InDyeColor));
1256
+ float3 Absorption = Eumelanin * float3(0.506f, 0.841f, 1.653f) + Pheomelanin * float3(0.343f, 0.733f, 1.924f);
1257
+
1258
+ return hair_absorption_to_color(Absorption + DyeAbsorption);
1259
+ }
1260
+
1261
+ export float3 local_object_bounds_min()
1262
+ [[
1263
+ anno::description("Local Object Bounds Min"),
1264
+ anno::noinline()
1265
+ ]]
1266
+ {
1267
+ return float3(0.0);
1268
+ }
1269
+
1270
+ export float3 local_object_bounds_max()
1271
+ [[
1272
+ anno::description("Local Object Bounds Max"),
1273
+ anno::noinline()
1274
+ ]]
1275
+ {
1276
+ return float3(100.0);
1277
+ }
1278
+
1279
+ export float3 object_bounds()
1280
+ [[
1281
+ anno::description("Object Bounds"),
1282
+ anno::noinline()
1283
+ ]]
1284
+ {
1285
+ return float3(100.0);
1286
+ }
1287
+
1288
+ export float object_radius()
1289
+ [[
1290
+ anno::description("Object Radius"),
1291
+ anno::noinline()
1292
+ ]]
1293
+ {
1294
+ return 100.0f;
1295
+ }
1296
+
1297
+ export float3 object_world_position(uniform bool up_z = true)
1298
+ [[
1299
+ anno::description("Object World Position"),
1300
+ anno::noinline()
1301
+ ]]
1302
+ {
1303
+ 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;
1304
+ }
1305
+
1306
+ export float3 object_orientation()
1307
+ [[
1308
+ anno::description("Object Orientation"),
1309
+ anno::noinline()
1310
+ ]]
1311
+ {
1312
+ return float3(0);
1313
+ }
1314
+
1315
+ export float rcp(float x)
1316
+ [[
1317
+ anno::description("hlsl rcp"),
1318
+ anno::noinline()
1319
+ ]]
1320
+ {
1321
+ return 1.0f / x;
1322
+ }
1323
+
1324
+ export float2 rcp(float2 x)
1325
+ [[
1326
+ anno::description("hlsl rcp"),
1327
+ anno::noinline()
1328
+ ]]
1329
+ {
1330
+ return 1.0f / x;
1331
+ }
1332
+
1333
+ export float3 rcp(float3 x)
1334
+ [[
1335
+ anno::description("hlsl rcp"),
1336
+ anno::noinline()
1337
+ ]]
1338
+ {
1339
+ return 1.0f / x;
1340
+ }
1341
+
1342
+ export float4 rcp(float4 x)
1343
+ [[
1344
+ anno::description("hlsl rcp"),
1345
+ anno::noinline()
1346
+ ]]
1347
+ {
1348
+ return 1.0f / x;
1349
+ }
1350
+
1351
+ export int BitFieldExtractI32(int Data, int Size, int Offset)
1352
+ [[
1353
+ anno::description("BitFieldExtractI32 int"),
1354
+ anno::noinline()
1355
+ ]]
1356
+ {
1357
+ Size &= 3;
1358
+ Offset &= 3;
1359
+
1360
+ if (Size == 0)
1361
+ return 0;
1362
+ else if (Offset + Size < 32)
1363
+ return (Data << (32 - Size - Offset)) >> (32 - Size);
1364
+ else
1365
+ return Data >> Offset;
1366
+ }
1367
+
1368
+ export int BitFieldExtractI32(float Data, float Size, float Offset)
1369
+ [[
1370
+ anno::description("BitFieldExtractI32 float"),
1371
+ anno::noinline()
1372
+ ]]
1373
+ {
1374
+ return BitFieldExtractI32(int(Data), int(Size), int(Offset));
1375
+ }
1376
+
1377
+ export int BitFieldExtractU32(float Data, float Size, float Offset)
1378
+ [[
1379
+ anno::description("BitFieldExtractU32 float"),
1380
+ anno::noinline()
1381
+ ]]
1382
+ {
1383
+ return BitFieldExtractI32(Data, Size, Offset);
1384
+ }
1385
+
1386
+ export int BitFieldExtractU32(int Data, int Size, int Offset)
1387
+ [[
1388
+ anno::description("BitFieldExtractU32 int"),
1389
+ anno::noinline()
1390
+ ]]
1391
+ {
1392
+ return BitFieldExtractI32(Data, Size, Offset);
1393
+ }
1394
+
1395
+ export float3 EyeAdaptationInverseLookup(float3 LightValue, float Alpha)
1396
+ [[
1397
+ anno::description("EyeAdaptationInverseLookup"),
1398
+ anno::noinline()
1399
+ ]]
1400
+ {
1401
+ float Adaptation = 1.0f;
1402
+
1403
+ // When Alpha=0.0, we want to multiply by 1.0. when Alpha = 1.0, we want to multiply by 1/Adaptation.
1404
+ // So the lerped value is:
1405
+ // LerpLogScale = Lerp(log(1),log(1/Adaptaiton),T)
1406
+ // Which is simplified as:
1407
+ // LerpLogScale = Lerp(0,-log(Adaptation),T)
1408
+ // LerpLogScale = -T * logAdaptation;
1409
+
1410
+ float LerpLogScale = -Alpha * math::log(Adaptation);
1411
+ float Scale = math::exp(LerpLogScale);
1412
+ return LightValue * Scale;
1413
+ }
scenes/scene_usds/IROS_scenes_aloha_final/object_place1/base/object_usds/grutopia_usd/Table/table/43605fe0f62607d280497e58fa06473f/instance.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_instance" (
62
+ prepend payload = @./instance.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/object_place4/base/objaverse_usd/398c1b3b8114409a89eb02f9b42f8064.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_398c1b3b8114409a89eb02f9b42f8064" (
62
+ prepend payload = @./398c1b3b8114409a89eb02f9b42f8064.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/.collect.mapping.json ADDED
@@ -0,0 +1,323 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0",
3
+ "file_records": [
4
+ {
5
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/base.usd",
6
+ "source_hash": "376396902a7f9eb3311ac4842e792a1b304dd18a",
7
+ "target_url": "./base.usd",
8
+ "target_hash": "f8d19b66e9c625102fda70bf68124b288af2f397"
9
+ },
10
+ {
11
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/Downloads/brown_photostudio_02_4k.exr",
12
+ "source_hash": "95eb12d6410cf16f32489fbffc89dbc7da289664",
13
+ "target_url": "./Downloads/brown_photostudio_02_4k.exr",
14
+ "target_hash": "76106cbeedc2e855718fb4528f8edeaedecd4fdc"
15
+ },
16
+ {
17
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/instance.usd",
18
+ "source_hash": "d07872a8a2968619979e17bcc8337914b96ea246",
19
+ "target_url": "./object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/instance.usd",
20
+ "target_hash": "b497bd83ebc5dd142edfaea584193cd958637414"
21
+ },
22
+ {
23
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/08d23f3cd9254e38a696060a962ebb7f.usd",
24
+ "source_hash": "f329045643322b0bd3065e8392b64ba29b3a50f8",
25
+ "target_url": "./object_usds/objaverse_usd/08d23f3cd9254e38a696060a962ebb7f.usd",
26
+ "target_hash": "1d543f51c857dc0e08eb668591f4785f6afc9b8a"
27
+ },
28
+ {
29
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/0acdfc046a5149cc890c992da89b48c0.usd",
30
+ "source_hash": "85e4676e62e7c4e42a5a600d961151c944a69878",
31
+ "target_url": "./object_usds/objaverse_usd/0acdfc046a5149cc890c992da89b48c0.usd",
32
+ "target_hash": "9d4227ccba03b4b50520d27f5b11f5886d57ba21"
33
+ },
34
+ {
35
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/1f9f025d995c4554bcc39b97eed20c7d.usd",
36
+ "source_hash": "39940c22dd6fa201addc857955ebbfa801c50dbb",
37
+ "target_url": "./object_usds/objaverse_usd/1f9f025d995c4554bcc39b97eed20c7d.usd",
38
+ "target_hash": "8801471b9b4d0dcfd2bff00883f14d4939877c48"
39
+ },
40
+ {
41
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/476f8b64886f4edbae88e74f68d065c9.usd",
42
+ "source_hash": "7dc8fd560105cb91b57aa6f22b54e5a80cc59896",
43
+ "target_url": "./object_usds/objaverse_usd/476f8b64886f4edbae88e74f68d065c9.usd",
44
+ "target_hash": "4f20cba6c493a025ee20cfea9a598a77e37a653b"
45
+ },
46
+ {
47
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/48a6aed1dff24e57b6836ade47a46ead.usd",
48
+ "source_hash": "602b0e20f0667a28d531ab446cf55bc4dee189c2",
49
+ "target_url": "./object_usds/objaverse_usd/48a6aed1dff24e57b6836ade47a46ead.usd",
50
+ "target_hash": "514be519f82571eb0992489c48dc3865f02f15c7"
51
+ },
52
+ {
53
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/5b87502ac41f4eb2b2ba7b0cce6517aa.usd",
54
+ "source_hash": "da17c2673b4c18931e8e406532ec4994bde896f1",
55
+ "target_url": "./object_usds/objaverse_usd/5b87502ac41f4eb2b2ba7b0cce6517aa.usd",
56
+ "target_hash": "f1bd62f54f36312dacaee33caa1b0ecfd78fd3b1"
57
+ },
58
+ {
59
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/63e2323f49db4793bd087e67b20ac350.usd",
60
+ "source_hash": "0e9edad027f7daa9755a16cb48e6a1fedae0fb72",
61
+ "target_url": "./object_usds/objaverse_usd/63e2323f49db4793bd087e67b20ac350.usd",
62
+ "target_hash": "9245e32d3b1ab83fb7402c8626fd9b9ad192444d"
63
+ },
64
+ {
65
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/691d0e4cb6a1409ea72d960d0ab144ea.usd",
66
+ "source_hash": "bc26a857d831ffb5c9eebd9058c927a2840a70d3",
67
+ "target_url": "./object_usds/objaverse_usd/691d0e4cb6a1409ea72d960d0ab144ea.usd",
68
+ "target_hash": "99066f3b94de9f0710bc2e4a6e1d9b8dcc6c7829"
69
+ },
70
+ {
71
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/896181392c1f4e2d9316bf2eeafc3042.usd",
72
+ "source_hash": "e63bbbad412c64730cafff757108a2b82f2dc4ab",
73
+ "target_url": "./object_usds/objaverse_usd/896181392c1f4e2d9316bf2eeafc3042.usd",
74
+ "target_hash": "5d5c308ba377ebc31a1823217dfcd660f82b7255"
75
+ },
76
+ {
77
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/8d56e83387b64684ae7a1b4a20040d67.usd",
78
+ "source_hash": "690692e1103019d05d9de96198e2a2588a771399",
79
+ "target_url": "./object_usds/objaverse_usd/8d56e83387b64684ae7a1b4a20040d67.usd",
80
+ "target_hash": "33ecfc166e47797bb50b4fe16cfe9d6ee3468681"
81
+ },
82
+ {
83
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/c7aa636f24e345b3b831271bf7f1fe02.usd",
84
+ "source_hash": "624547592e099a916f0115c6bf5a989e03f1af0e",
85
+ "target_url": "./object_usds/objaverse_usd/c7aa636f24e345b3b831271bf7f1fe02.usd",
86
+ "target_hash": "b9cfa27b483e9c5d6f13f207d56aadd2f2f7619b"
87
+ },
88
+ {
89
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/eced95f9f49e4ef9b6f8d576f908bc6b.usd",
90
+ "source_hash": "e0b373b34043de072c076e8fa070df17f27214ae",
91
+ "target_url": "./object_usds/objaverse_usd/eced95f9f49e4ef9b6f8d576f908bc6b.usd",
92
+ "target_hash": "02c5b64afce59100fbb3f33b4a1d8d57166945f6"
93
+ },
94
+ {
95
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/objects/obj_base_glb_09.usd",
96
+ "source_hash": "54816892a3c6dbeb78591f38d82b33b9e5d9a513",
97
+ "target_url": "./objects/obj_base_glb_09.usd",
98
+ "target_hash": "36ee706c1cd85a89dd3bb328108e46605d88626b"
99
+ },
100
+ {
101
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/1f9f025d995c4554bcc39b97eed20c7d_texture0.jpg",
102
+ "source_hash": "bad8d4a191d4051302236c2186cde80905d59aef",
103
+ "target_url": "./object_usds/objaverse_usd/textures/1f9f025d995c4554bcc39b97eed20c7d_texture0.jpg",
104
+ "target_hash": "3c45f7d447fec9bcb4efd144508c450a55816534"
105
+ },
106
+ {
107
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/1f9f025d995c4554bcc39b97eed20c7d_texture1.jpg",
108
+ "source_hash": "077182705059d3376dcfaa0a420ecef421548844",
109
+ "target_url": "./object_usds/objaverse_usd/textures/1f9f025d995c4554bcc39b97eed20c7d_texture1.jpg",
110
+ "target_hash": "da5c2af96e004531418c27ba38167ad6f0348364"
111
+ },
112
+ {
113
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/1f9f025d995c4554bcc39b97eed20c7d_texture2.png",
114
+ "source_hash": "74612de6467a8df73dbcc3dc518701d22070cfb5",
115
+ "target_url": "./object_usds/objaverse_usd/textures/1f9f025d995c4554bcc39b97eed20c7d_texture2.png",
116
+ "target_hash": "9317d3bd07b140e50d808c7a8db7f92cff916072"
117
+ },
118
+ {
119
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/1f9f025d995c4554bcc39b97eed20c7d_texture3.jpg",
120
+ "source_hash": "3ee76a860a3603003b323d634c028e7bb2b19351",
121
+ "target_url": "./object_usds/objaverse_usd/textures/1f9f025d995c4554bcc39b97eed20c7d_texture3.jpg",
122
+ "target_hash": "528bf0c6fa5fce3bb892d03a2393438a3849d3c8"
123
+ },
124
+ {
125
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/896181392c1f4e2d9316bf2eeafc3042_texture0.jpg",
126
+ "source_hash": "2dcc741e1ad540b8e13b19de0e8753bd96e1ff56",
127
+ "target_url": "./object_usds/objaverse_usd/textures/896181392c1f4e2d9316bf2eeafc3042_texture0.jpg",
128
+ "target_hash": "4cc268b6bf636dfb53b33c0c843d0d75c08ebed1"
129
+ },
130
+ {
131
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/objects/saved/assets/scene_usds/IROS_scenes_collected/scene_drink/repos/RoboTwin/assets/objects/usds/062_plasticbox_base7_converted/textures/texture_diffuse.png",
132
+ "source_hash": "0e17e8d340a948966480f783cb33cd31ed098b64",
133
+ "target_url": "./objects/saved/assets/scene_usds/IROS_scenes_collected/scene_drink/repos/RoboTwin/assets/objects/usds/062_plasticbox_base7_converted/textures/texture_diffuse.png",
134
+ "target_hash": "10db33d5f0e70484cdd9f8e8f27b988273004b32"
135
+ },
136
+ {
137
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/objects/saved/assets/scene_usds/IROS_scenes_collected/scene_drink/repos/RoboTwin/assets/objects/usds/062_plasticbox_base7_converted/textures/texture_metallic-texture_roughness.png",
138
+ "source_hash": "b764db3c159b7e8854d58ae02679f0db40085145",
139
+ "target_url": "./objects/saved/assets/scene_usds/IROS_scenes_collected/scene_drink/repos/RoboTwin/assets/objects/usds/062_plasticbox_base7_converted/textures/texture_metallic-texture_roughness.png",
140
+ "target_hash": "e42c1205c68ec5ec9a71f74c456be437aa03dda7"
141
+ },
142
+ {
143
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/objects/saved/assets/scene_usds/IROS_scenes_collected/scene_drink/repos/RoboTwin/assets/objects/usds/062_plasticbox_base7_converted/textures/texture_normal.png",
144
+ "source_hash": "f54d9f085853ffc91d2aa50693c5bb41adcf9f93",
145
+ "target_url": "./objects/saved/assets/scene_usds/IROS_scenes_collected/scene_drink/repos/RoboTwin/assets/objects/usds/062_plasticbox_base7_converted/textures/texture_normal.png",
146
+ "target_hash": "ff054d8488d631325830d7d42880a96f1b7e703d"
147
+ },
148
+ {
149
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/8d56e83387b64684ae7a1b4a20040d67_texture0.png",
150
+ "source_hash": "b9e5f150ab69bfd1ef426fc4cb86ff20c09d3899",
151
+ "target_url": "./object_usds/objaverse_usd/textures/8d56e83387b64684ae7a1b4a20040d67_texture0.png",
152
+ "target_hash": "2eee7a75f10e1804e2ccdd34bc97a556672ee4c5"
153
+ },
154
+ {
155
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/8d56e83387b64684ae7a1b4a20040d67_texture1.png",
156
+ "source_hash": "75f124c1aca5b2116956df88c1615cc121cfc5c6",
157
+ "target_url": "./object_usds/objaverse_usd/textures/8d56e83387b64684ae7a1b4a20040d67_texture1.png",
158
+ "target_hash": "418a8e7ccad1dfeae28d5c8f445015d7f629c381"
159
+ },
160
+ {
161
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/08d23f3cd9254e38a696060a962ebb7f_texture0.jpg",
162
+ "source_hash": "3e4ea271779842ccdd0538462458a1bd85c0abf7",
163
+ "target_url": "./object_usds/objaverse_usd/textures/08d23f3cd9254e38a696060a962ebb7f_texture0.jpg",
164
+ "target_hash": "cc61cef264954c9867e47e6b5b82f8d42601ef4a"
165
+ },
166
+ {
167
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/08d23f3cd9254e38a696060a962ebb7f_texture1.jpg",
168
+ "source_hash": "43bc7629fcd1aa32929748a979a1bd8b213544d7",
169
+ "target_url": "./object_usds/objaverse_usd/textures/08d23f3cd9254e38a696060a962ebb7f_texture1.jpg",
170
+ "target_hash": "589395132666d2f290dfaaf4988a5c791a54b048"
171
+ },
172
+ {
173
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/691d0e4cb6a1409ea72d960d0ab144ea_texture0.png",
174
+ "source_hash": "6885f29131c1d1fe6dd2a0f72bfef04a31fd1f54",
175
+ "target_url": "./object_usds/objaverse_usd/textures/691d0e4cb6a1409ea72d960d0ab144ea_texture0.png",
176
+ "target_hash": "4fbafd8bc09a227c4de80fb3d208d3f819f84be5"
177
+ },
178
+ {
179
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/691d0e4cb6a1409ea72d960d0ab144ea_texture1.png",
180
+ "source_hash": "1ed48b4d442b1a7e3c7af25744f144bc3af2f4fb",
181
+ "target_url": "./object_usds/objaverse_usd/textures/691d0e4cb6a1409ea72d960d0ab144ea_texture1.png",
182
+ "target_hash": "74a37b7317398a7036a33023577615ece49568c2"
183
+ },
184
+ {
185
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/691d0e4cb6a1409ea72d960d0ab144ea_texture2.png",
186
+ "source_hash": "b090199c2d56a49d2486e397505d43c8469642cc",
187
+ "target_url": "./object_usds/objaverse_usd/textures/691d0e4cb6a1409ea72d960d0ab144ea_texture2.png",
188
+ "target_hash": "4a0d5ab99e6482890db8ca343f60e91df9cc5122"
189
+ },
190
+ {
191
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/eced95f9f49e4ef9b6f8d576f908bc6b_texture0.png",
192
+ "source_hash": "e1298a84c4a0a26931bc684fc94a1f77a785802c",
193
+ "target_url": "./object_usds/objaverse_usd/textures/eced95f9f49e4ef9b6f8d576f908bc6b_texture0.png",
194
+ "target_hash": "1d5582af3e0c8af6fb806e064e1666e8d519632d"
195
+ },
196
+ {
197
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/0acdfc046a5149cc890c992da89b48c0_texture0.jpg",
198
+ "source_hash": "04ba565a487782bc052cc22e8e0e2d450448a787",
199
+ "target_url": "./object_usds/objaverse_usd/textures/0acdfc046a5149cc890c992da89b48c0_texture0.jpg",
200
+ "target_hash": "b12dbccb2cca98d80eafca13772abfec9832d3c4"
201
+ },
202
+ {
203
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/5b87502ac41f4eb2b2ba7b0cce6517aa_texture0.png",
204
+ "source_hash": "8cd96cddf55e9a5531aedcb1df1f2eb00dbf7bbf",
205
+ "target_url": "./object_usds/objaverse_usd/textures/5b87502ac41f4eb2b2ba7b0cce6517aa_texture0.png",
206
+ "target_hash": "fabb04b5a55c8c6df6a07919749cea59ffdb0c19"
207
+ },
208
+ {
209
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/476f8b64886f4edbae88e74f68d065c9_texture0.jpg",
210
+ "source_hash": "66ca7814003c2ab8d4ec7f8501d4ec912cc739d1",
211
+ "target_url": "./object_usds/objaverse_usd/textures/476f8b64886f4edbae88e74f68d065c9_texture0.jpg",
212
+ "target_hash": "1df56e75bc94b6664dfbecc3e2008ecf903d9cf5"
213
+ },
214
+ {
215
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/476f8b64886f4edbae88e74f68d065c9_texture1.png",
216
+ "source_hash": "9d57a2346733838a3196b5b6640b17f45008215b",
217
+ "target_url": "./object_usds/objaverse_usd/textures/476f8b64886f4edbae88e74f68d065c9_texture1.png",
218
+ "target_hash": "1b1f818935c40f7c4adb61e868723d5038ba08fd"
219
+ },
220
+ {
221
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/476f8b64886f4edbae88e74f68d065c9_texture2.png",
222
+ "source_hash": "744e15c2df47c6e6f3f28d0dc9c6a44f631eb679",
223
+ "target_url": "./object_usds/objaverse_usd/textures/476f8b64886f4edbae88e74f68d065c9_texture2.png",
224
+ "target_hash": "086d949224cd0d12517f15b6ebeec95d7597ca2b"
225
+ },
226
+ {
227
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/63e2323f49db4793bd087e67b20ac350_texture0.png",
228
+ "source_hash": "8e6f5e16474eb5d62c64f8d553fe8e3a8ededcf6",
229
+ "target_url": "./object_usds/objaverse_usd/textures/63e2323f49db4793bd087e67b20ac350_texture0.png",
230
+ "target_hash": "3979e45e8a7203ba12518acb2afafc1e650f6d84"
231
+ },
232
+ {
233
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/63e2323f49db4793bd087e67b20ac350_texture1.png",
234
+ "source_hash": "fa61592e81f1b5fd25e76935d8856739e13405e6",
235
+ "target_url": "./object_usds/objaverse_usd/textures/63e2323f49db4793bd087e67b20ac350_texture1.png",
236
+ "target_hash": "7a6fc06789acb4551ae1d355b21b33894bf6c6b7"
237
+ },
238
+ {
239
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Textures/5f005b1a5b89690001a5e474_color.png",
240
+ "source_hash": "1e9722d5118f05ddc61040bd5ac3941fcf8229c5",
241
+ "target_url": "./object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Textures/5f005b1a5b89690001a5e474_color.png",
242
+ "target_hash": "66b42c9272abc38718970b2a13442e0604b15396"
243
+ },
244
+ {
245
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Textures/5f005b1a7d6a630001694eb4_color.png",
246
+ "source_hash": "4e8bc64ff00f2e35ff12c7b54556e83ed5a0b2ed",
247
+ "target_url": "./object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Textures/5f005b1a7d6a630001694eb4_color.png",
248
+ "target_hash": "c512d1be80898bbc158ee75f43e3013e3d2f4472"
249
+ },
250
+ {
251
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Textures/black.png",
252
+ "source_hash": "6542e5a67050922e970b1094cc7acdf65c7658bc",
253
+ "target_url": "./object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Textures/black.png",
254
+ "target_hash": "ae64e956611a3a45a40475754a8061c0eda6c1bf"
255
+ },
256
+ {
257
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Textures/normal.png",
258
+ "source_hash": "f30e1cddaf7deafcff0ebe08d73f2d74a57faf6f",
259
+ "target_url": "./object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Textures/normal.png",
260
+ "target_hash": "b246c14f74ddc4c6416f41ae5527e4512335c0ec"
261
+ },
262
+ {
263
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Textures/white.png",
264
+ "source_hash": "f19fcb454d486b954631f0fe379d024fb8a11441",
265
+ "target_url": "./object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Textures/white.png",
266
+ "target_hash": "6f3f8fd9c48ac74270405ed6635d7ba3db6ea990"
267
+ },
268
+ {
269
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/48a6aed1dff24e57b6836ade47a46ead_texture0.jpg",
270
+ "source_hash": "f72a92413835f1393d5630e134a483e202f33741",
271
+ "target_url": "./object_usds/objaverse_usd/textures/48a6aed1dff24e57b6836ade47a46ead_texture0.jpg",
272
+ "target_hash": "852227483004e8bcb00275e320650921d5812818"
273
+ },
274
+ {
275
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/48a6aed1dff24e57b6836ade47a46ead_texture1.png",
276
+ "source_hash": "3929176bde7252f2c8f32be4be5f0e80e9a0ea0b",
277
+ "target_url": "./object_usds/objaverse_usd/textures/48a6aed1dff24e57b6836ade47a46ead_texture1.png",
278
+ "target_hash": "2e334bd523644d70f3edefcf33fcc36005c037ce"
279
+ },
280
+ {
281
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/48a6aed1dff24e57b6836ade47a46ead_texture2.jpg",
282
+ "source_hash": "6451926db3015969475f884f9607d61352b40e71",
283
+ "target_url": "./object_usds/objaverse_usd/textures/48a6aed1dff24e57b6836ade47a46ead_texture2.jpg",
284
+ "target_hash": "90712ae3264ed8244590d614818a6b23b6938034"
285
+ },
286
+ {
287
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/48a6aed1dff24e57b6836ade47a46ead_texture3.jpg",
288
+ "source_hash": "17e5fe26255e5c47c9923a5ddb5c99edf69e8872",
289
+ "target_url": "./object_usds/objaverse_usd/textures/48a6aed1dff24e57b6836ade47a46ead_texture3.jpg",
290
+ "target_hash": "1a840611ac1825886412828a69cab1274f5b9b72"
291
+ },
292
+ {
293
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/48a6aed1dff24e57b6836ade47a46ead_texture4.png",
294
+ "source_hash": "b3d626104e3501b9cc23f3bf20246d6ead423bb8",
295
+ "target_url": "./object_usds/objaverse_usd/textures/48a6aed1dff24e57b6836ade47a46ead_texture4.png",
296
+ "target_hash": "6094f1e3a039f52e676fd708045d32e4eec83d86"
297
+ },
298
+ {
299
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/objaverse_usd/textures/c7aa636f24e345b3b831271bf7f1fe02_texture0.jpg",
300
+ "source_hash": "8502b729749aa052b5c3e8f71e89b5c2b0968c38",
301
+ "target_url": "./object_usds/objaverse_usd/textures/c7aa636f24e345b3b831271bf7f1fe02_texture0.jpg",
302
+ "target_hash": "c37422383604fa93783f7f4eaa60861f7a6a53a7"
303
+ },
304
+ {
305
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Num5df0a8e15974ed0001f1de95.mdl",
306
+ "source_hash": "37cd5602f27c8bb346fa538680526f908789d86d",
307
+ "target_url": "./object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/Num5df0a8e15974ed0001f1de95.mdl",
308
+ "target_hash": "55cdd7bb054f3041706dde552d8470c4ede1bd63"
309
+ },
310
+ {
311
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/OmniUe4Function.mdl",
312
+ "source_hash": "22b31cc0015bb18c7ddcb01436add65fbc6227ef",
313
+ "target_url": "./object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/OmniUe4Function.mdl",
314
+ "target_hash": "cd837b08e065dd12e6568e4b7028bb83c4f6694e"
315
+ },
316
+ {
317
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_drink/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/OmniUe4Base.mdl",
318
+ "source_hash": "5d0fd5dcba283aebbd7768c860eb4effa0027d03",
319
+ "target_url": "./object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/OmniUe4Base.mdl",
320
+ "target_hash": "52c2c9c96888ffaf6fe8a5f522fbbdfdda78380f"
321
+ }
322
+ ]
323
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/instance.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_instance" (
62
+ prepend payload = @./instance.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/grutopia_usd/Table/table/35565d61cac99576e47beb2a926bbf93/Materials/OmniUe4Function.mdl ADDED
@@ -0,0 +1,1413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***************************************************************************************************
2
+ * Copyright 2020 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions
6
+ * are met:
7
+ * * Redistributions of source code must retain the above copyright
8
+ * notice, this list of conditions and the following disclaimer.
9
+ * * Redistributions in binary form must reproduce the above copyright
10
+ * notice, this list of conditions and the following disclaimer in the
11
+ * documentation and/or other materials provided with the distribution.
12
+ * * Neither the name of NVIDIA CORPORATION nor the names of its
13
+ * contributors may be used to endorse or promote products derived
14
+ * from this software without specific prior written permission.
15
+ *
16
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ **************************************************************************************************/
28
+
29
+ //* 1.0.1 - using absolute import paths when importing standard modules
30
+
31
+ mdl 1.6;
32
+
33
+ import ::df::*;
34
+ import ::state::*;
35
+ import ::math::*;
36
+ import ::tex::*;
37
+ import ::anno::*;
38
+
39
+
40
+ export float3 convert_to_left_hand(float3 vec3, uniform bool up_z = true, uniform bool is_position = true)
41
+ [[
42
+ anno::description("convert from RH to LH"),
43
+ anno::noinline()
44
+ ]]
45
+ {
46
+ float4x4 ZupConversion = float4x4(
47
+ 1.0f, 0.0f, 0.0f, 0.0f,
48
+ 0.0f, -1.0f, 0.0f, 0.0f,
49
+ 0.0f, 0.0f, 1.0f, 0.0f,
50
+ 0.0f, 0.0f, 0.0f, 1.0f
51
+ );
52
+
53
+ float4x4 YupConversion = float4x4(
54
+ 1.0f, 0.0f, 0.0f, 0.0f,
55
+ 0.0f, 0.0f, 1.0f, 0.0f,
56
+ 0.0f, 1.0f, 0.0f, 0.0f,
57
+ 0.0f, 0.0f, 0.0f, 1.0f
58
+ );
59
+
60
+ float4 vec4 = float4(vec3.x, vec3.y, vec3.z, is_position ? 1.0f : 0.0f);
61
+
62
+ vec4 = vec4 * (up_z ? ZupConversion : YupConversion);
63
+
64
+ return float3(vec4.x, vec4.y, vec4.z);
65
+ }
66
+
67
+ export float3 transform_vector_from_tangent_to_world(float3 vector,
68
+ uniform bool up_z = true,
69
+ float3 tangent_u = state::texture_tangent_u(0),
70
+ float3 tangent_v = state::texture_tangent_v(0))
71
+ [[
72
+ anno::description("Transform vector from tangent space to world space"),
73
+ anno::noinline()
74
+ ]]
75
+ {
76
+ /* flip_tangent_v */
77
+ return convert_to_left_hand(
78
+ tangent_u * vector.x - tangent_v * vector.y + state::normal() * vector.z,
79
+ up_z, false);
80
+ }
81
+
82
+ export float3 transform_vector_from_world_to_tangent(float3 vector,
83
+ uniform bool up_z = true,
84
+ float3 tangent_u = state::texture_tangent_u(0),
85
+ float3 tangent_v = state::texture_tangent_v(0))
86
+ [[
87
+ anno::description("Transform vector from world space to tangent space"),
88
+ anno::noinline()
89
+ ]]
90
+ {
91
+ float3 vecRH = convert_to_left_hand(vector, up_z, false);
92
+ /* flip_tangent_v */
93
+ return vecRH.x * float3(tangent_u.x, -tangent_v.x, state::normal().x) +
94
+ vecRH.y * float3(tangent_u.y, -tangent_v.y, state::normal().y) +
95
+ vecRH.z * float3(tangent_u.z, -tangent_v.z, state::normal().z);
96
+ }
97
+
98
+ export float4 unpack_normal_map(
99
+ float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0)
100
+ )
101
+ [[
102
+ anno::description("Unpack a normal stored in a normal map"),
103
+ anno::noinline()
104
+ ]]
105
+ {
106
+ float2 normal_xy = float2(texture_sample.x, texture_sample.y);
107
+
108
+ normal_xy = normal_xy * float2(2.0,2.0) - float2(1.0,1.0);
109
+ float normal_z = math::sqrt( math::saturate( 1.0 - math::dot( normal_xy, normal_xy ) ) );
110
+ return float4( normal_xy.x, normal_xy.y, normal_z, 1.0 );
111
+ }
112
+
113
+ // for get color value from normal.
114
+ export float4 pack_normal_map(
115
+ float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0)
116
+ )
117
+ [[
118
+ anno::description("Pack to color from a normal")
119
+ ]]
120
+ {
121
+ float2 return_xy = float2(texture_sample.x, texture_sample.y);
122
+
123
+ return_xy = (return_xy + float2(1.0,1.0)) / float2(2.0,2.0);
124
+
125
+ return float4( return_xy.x, return_xy.y, 0.0, 1.0 );
126
+ }
127
+
128
+ export float4 greyscale_texture_lookup(
129
+ float4 texture_sample = float4(0.0, 0.0, 0.0, 1.0)
130
+ )
131
+ [[
132
+ anno::description("Sampling a greyscale texture"),
133
+ anno::noinline()
134
+ ]]
135
+ {
136
+ return float4(texture_sample.x, texture_sample.x, texture_sample.x, texture_sample.x);
137
+ }
138
+
139
+ export float3 pixel_normal_world_space(uniform bool up_z = true)
140
+ [[
141
+ anno::description("Pixel normal in world space"),
142
+ anno::noinline()
143
+ ]]
144
+ {
145
+ return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
146
+ }
147
+
148
+ export float3 vertex_normal_world_space(uniform bool up_z = true)
149
+ [[
150
+ anno::description("Vertex normal in world space"),
151
+ anno::noinline()
152
+ ]]
153
+ {
154
+ return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
155
+ }
156
+
157
+ export float3 landscape_normal_world_space(uniform bool up_z = true)
158
+ [[
159
+ anno::description("Landscape normal in world space")
160
+ ]]
161
+ {
162
+ float3 normalFromNormalmap = math::floor((::vertex_normal_world_space(up_z) * 0.5 + 0.5) * 255.0) / 255.0 * 2.0 - 1.0;
163
+
164
+ float2 normalXY = float2(normalFromNormalmap.x, normalFromNormalmap.y);
165
+ return float3(normalXY.x, normalXY.y, math::sqrt(math::saturate(1.0 - math::dot(normalXY, normalXY))));
166
+ }
167
+
168
+ // Different implementation specific between mdl and hlsl for smoothstep
169
+ export float smoothstep(float a, float b, float l)
170
+ {
171
+ if (a < b)
172
+ {
173
+ return math::smoothstep(a, b, l);
174
+ }
175
+ else if (a > b)
176
+ {
177
+ return 1.0 - math::smoothstep(b, a, l);
178
+ }
179
+ else
180
+ {
181
+ return l <= a ? 0.0 : 1.0;
182
+ }
183
+ }
184
+
185
+ export float2 smoothstep(float2 a, float2 b, float2 l)
186
+ {
187
+ return float2(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y));
188
+ }
189
+
190
+ export float3 smoothstep(float3 a, float3 b, float3 l)
191
+ {
192
+ return float3(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z));
193
+ }
194
+
195
+ export float4 smoothstep(float4 a, float4 b, float4 l)
196
+ {
197
+ 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));
198
+ }
199
+
200
+ export float2 smoothstep(float2 a, float2 b, float l)
201
+ {
202
+ return float2(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l));
203
+ }
204
+
205
+ export float3 smoothstep(float3 a, float3 b, float l)
206
+ {
207
+ return float3(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l));
208
+ }
209
+
210
+ export float4 smoothstep(float4 a, float4 b, float l)
211
+ {
212
+ 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));
213
+ }
214
+
215
+ export float2 smoothstep(float a, float b, float2 l)
216
+ {
217
+ return float2(smoothstep(a, b, l.x), smoothstep(a, b, l.y));
218
+ }
219
+
220
+ export float3 smoothstep(float a, float b, float3 l)
221
+ {
222
+ return float3(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z));
223
+ }
224
+
225
+ export float4 smoothstep(float a, float b, float4 l)
226
+ {
227
+ return float4(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z), smoothstep(a, b, l.w));
228
+ }
229
+
230
+ //------------------ Random from UE4 -----------------------
231
+ float length2(float3 v)
232
+ {
233
+ return math::dot(v, v);
234
+ }
235
+
236
+ float3 GetPerlinNoiseGradientTextureAt(uniform texture_2d PerlinNoiseGradientTexture, float3 v)
237
+ {
238
+ const float2 ZShear = float2(17.0f, 89.0f);
239
+
240
+ float2 OffsetA = v.z * ZShear;
241
+ float2 TexA = (float2(v.x, v.y) + OffsetA + 0.5f) / 128.0f;
242
+ float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA.x,1.0-TexA.y),tex::wrap_repeat,tex::wrap_repeat);
243
+ return float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z) * 2.0 - 1.0;
244
+ }
245
+
246
+ float3 SkewSimplex(float3 In)
247
+ {
248
+ return In + math::dot(In, float3(1.0 / 3.0f) );
249
+ }
250
+ float3 UnSkewSimplex(float3 In)
251
+ {
252
+ return In - math::dot(In, float3(1.0 / 6.0f) );
253
+ }
254
+
255
+ // 3D random number generator inspired by PCGs (permuted congruential generator)
256
+ // Using a **simple** Feistel cipher in place of the usual xor shift permutation step
257
+ // @param v = 3D integer coordinate
258
+ // @return three elements w/ 16 random bits each (0-0xffff).
259
+ // ~8 ALU operations for result.x (7 mad, 1 >>)
260
+ // ~10 ALU operations for result.xy (8 mad, 2 >>)
261
+ // ~12 ALU operations for result.xyz (9 mad, 3 >>)
262
+
263
+ //TODO: uint3
264
+ int3 Rand3DPCG16(int3 p)
265
+ {
266
+ // taking a signed int then reinterpreting as unsigned gives good behavior for negatives
267
+ //TODO: uint3
268
+ int3 v = int3(p);
269
+
270
+ // Linear congruential step. These LCG constants are from Numerical Recipies
271
+ // For additional #'s, PCG would do multiple LCG steps and scramble each on output
272
+ // So v here is the RNG state
273
+ v = v * 1664525 + 1013904223;
274
+
275
+ // PCG uses xorshift for the final shuffle, but it is expensive (and cheap
276
+ // versions of xorshift have visible artifacts). Instead, use simple MAD Feistel steps
277
+ //
278
+ // Feistel ciphers divide the state into separate parts (usually by bits)
279
+ // then apply a series of permutation steps one part at a time. The permutations
280
+ // use a reversible operation (usually ^) to part being updated with the result of
281
+ // a permutation function on the other parts and the key.
282
+ //
283
+ // In this case, I'm using v.x, v.y and v.z as the parts, using + instead of ^ for
284
+ // the combination function, and just multiplying the other two parts (no key) for
285
+ // the permutation function.
286
+ //
287
+ // That gives a simple mad per round.
288
+ v.x += v.y*v.z;
289
+ v.y += v.z*v.x;
290
+ v.z += v.x*v.y;
291
+ v.x += v.y*v.z;
292
+ v.y += v.z*v.x;
293
+ v.z += v.x*v.y;
294
+
295
+ // only top 16 bits are well shuffled
296
+ return v >> 16;
297
+ }
298
+
299
+ // Wraps noise for tiling texture creation
300
+ // @param v = unwrapped texture parameter
301
+ // @param bTiling = true to tile, false to not tile
302
+ // @param RepeatSize = number of units before repeating
303
+ // @return either original or wrapped coord
304
+ float3 NoiseTileWrap(float3 v, bool bTiling, float RepeatSize)
305
+ {
306
+ return bTiling ? (math::frac(v / RepeatSize) * RepeatSize) : v;
307
+ }
308
+
309
+ // Evaluate polynomial to get smooth transitions for Perlin noise
310
+ // only needed by Perlin functions in this file
311
+ // scalar(per component): 2 add, 5 mul
312
+ float4 PerlinRamp(float4 t)
313
+ {
314
+ return t * t * t * (t * (t * 6 - 15) + 10);
315
+ }
316
+
317
+ // Blum-Blum-Shub-inspired pseudo random number generator
318
+ // http://www.umbc.edu/~olano/papers/mNoise.pdf
319
+ // real BBS uses ((s*s) mod M) with bignums and M as the product of two huge Blum primes
320
+ // instead, we use a single prime M just small enough not to overflow
321
+ // note that the above paper used 61, which fits in a half, but is unusably bad
322
+ // @param Integer valued floating point seed
323
+ // @return random number in range [0,1)
324
+ // ~8 ALU operations (5 *, 3 frac)
325
+ float RandBBSfloat(float seed)
326
+ {
327
+ float BBS_PRIME24 = 4093.0;
328
+ float s = math::frac(seed / BBS_PRIME24);
329
+ s = math::frac(s * s * BBS_PRIME24);
330
+ s = math::frac(s * s * BBS_PRIME24);
331
+ return s;
332
+ }
333
+
334
+ // Modified noise gradient term
335
+ // @param seed - random seed for integer lattice position
336
+ // @param offset - [-1,1] offset of evaluation point from lattice point
337
+ // @return gradient direction (xyz) and contribution (w) from this lattice point
338
+ float4 MGradient(int seed, float3 offset)
339
+ {
340
+ //TODO uint
341
+ int rand = Rand3DPCG16(int3(seed,0,0)).x;
342
+ int3 MGradientMask = int3(0x8000, 0x4000, 0x2000);
343
+ float3 MGradientScale = float3(1.0 / 0x4000, 1.0 / 0x2000, 1.0 / 0x1000);
344
+ float3 direction = float3(int3(rand, rand, rand) & MGradientMask) * MGradientScale - 1;
345
+ return float4(direction.x, direction.y, direction.z, math::dot(direction, offset));
346
+ }
347
+
348
+ // compute Perlin and related noise corner seed values
349
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
350
+ // @param bTiling = true to return seed values for a repeating noise pattern
351
+ // @param RepeatSize = integer units before tiling in each dimension
352
+ // @param seed000-seed111 = hash function seeds for the eight corners
353
+ // @return fractional part of v
354
+ struct SeedValue
355
+ {
356
+ float3 fv = float3(0);
357
+ float seed000 = 0;
358
+ float seed001 = 0;
359
+ float seed010 = 0;
360
+ float seed011 = 0;
361
+ float seed100 = 0;
362
+ float seed101 = 0;
363
+ float seed110 = 0;
364
+ float seed111 = 0;
365
+ };
366
+
367
+ SeedValue NoiseSeeds(float3 v, bool bTiling, float RepeatSize)
368
+ {
369
+ SeedValue seeds;
370
+ seeds.fv = math::frac(v);
371
+ float3 iv = math::floor(v);
372
+
373
+ const float3 primes = float3(19, 47, 101);
374
+
375
+ if (bTiling)
376
+ { // can't algebraically combine with primes
377
+ seeds.seed000 = math::dot(primes, NoiseTileWrap(iv, true, RepeatSize));
378
+ seeds.seed100 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 0), true, RepeatSize));
379
+ seeds.seed010 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 0), true, RepeatSize));
380
+ seeds.seed110 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 0), true, RepeatSize));
381
+ seeds.seed001 = math::dot(primes, NoiseTileWrap(iv + float3(0, 0, 1), true, RepeatSize));
382
+ seeds.seed101 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 1), true, RepeatSize));
383
+ seeds.seed011 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 1), true, RepeatSize));
384
+ seeds.seed111 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 1), true, RepeatSize));
385
+ }
386
+ else
387
+ { // get to combine offsets with multiplication by primes in this case
388
+ seeds.seed000 = math::dot(iv, primes);
389
+ seeds.seed100 = seeds.seed000 + primes.x;
390
+ seeds.seed010 = seeds.seed000 + primes.y;
391
+ seeds.seed110 = seeds.seed100 + primes.y;
392
+ seeds.seed001 = seeds.seed000 + primes.z;
393
+ seeds.seed101 = seeds.seed100 + primes.z;
394
+ seeds.seed011 = seeds.seed010 + primes.z;
395
+ seeds.seed111 = seeds.seed110 + primes.z;
396
+ }
397
+
398
+ return seeds;
399
+ }
400
+
401
+ struct SimplexWeights
402
+ {
403
+ float4 Result = float4(0);
404
+ float3 PosA = float3(0);
405
+ float3 PosB = float3(0);
406
+ float3 PosC = float3(0);
407
+ float3 PosD = float3(0);
408
+ };
409
+
410
+ // Computed weights and sample positions for simplex interpolation
411
+ // @return float4(a,b,c, d) Barycentric coordinate defined as Filtered = Tex(PosA) * a + Tex(PosB) * b + Tex(PosC) * c + Tex(PosD) * d
412
+ SimplexWeights ComputeSimplexWeights3D(float3 OrthogonalPos)
413
+ {
414
+ SimplexWeights weights;
415
+ float3 OrthogonalPosFloor = math::floor(OrthogonalPos);
416
+
417
+ weights.PosA = OrthogonalPosFloor;
418
+ weights.PosB = weights.PosA + float3(1, 1, 1);
419
+
420
+ OrthogonalPos -= OrthogonalPosFloor;
421
+
422
+ float Largest = math::max(OrthogonalPos.x, math::max(OrthogonalPos.y, OrthogonalPos.z));
423
+ float Smallest = math::min(OrthogonalPos.x, math::min(OrthogonalPos.y, OrthogonalPos.z));
424
+
425
+ weights.PosC = weights.PosA + float3(Largest == OrthogonalPos.x, Largest == OrthogonalPos.y, Largest == OrthogonalPos.z);
426
+ weights.PosD = weights.PosA + float3(Smallest != OrthogonalPos.x, Smallest != OrthogonalPos.y, Smallest != OrthogonalPos.z);
427
+
428
+ float RG = OrthogonalPos.x - OrthogonalPos.y;
429
+ float RB = OrthogonalPos.x - OrthogonalPos.z;
430
+ float GB = OrthogonalPos.y - OrthogonalPos.z;
431
+
432
+ weights.Result.z =
433
+ math::min(math::max(0, RG), math::max(0, RB)) // X
434
+ + math::min(math::max(0, -RG), math::max(0, GB)) // Y
435
+ + math::min(math::max(0, -RB), math::max(0, -GB)); // Z
436
+
437
+ weights.Result.w =
438
+ math::min(math::max(0, -RG), math::max(0, -RB)) // X
439
+ + math::min(math::max(0, RG), math::max(0, -GB)) // Y
440
+ + math::min(math::max(0, RB), math::max(0, GB)); // Z
441
+
442
+ weights.Result.y = Smallest;
443
+ weights.Result.x = 1.0f - weights.Result.y - weights.Result.z - weights.Result.w;
444
+
445
+ return weights;
446
+ }
447
+
448
+ // filtered 3D gradient simple noise (few texture lookups, high quality)
449
+ // @param v >0
450
+ // @return random number in the range -1 .. 1
451
+ float SimplexNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 EvalPos)
452
+ {
453
+ float3 OrthogonalPos = SkewSimplex(EvalPos);
454
+
455
+ SimplexWeights Weights = ComputeSimplexWeights3D(OrthogonalPos);
456
+
457
+ // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 32 bit)
458
+ float3 A = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosA);
459
+ float3 B = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosB);
460
+ float3 C = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosC);
461
+ float3 D = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosD);
462
+
463
+ Weights.PosA = UnSkewSimplex(Weights.PosA);
464
+ Weights.PosB = UnSkewSimplex(Weights.PosB);
465
+ Weights.PosC = UnSkewSimplex(Weights.PosC);
466
+ Weights.PosD = UnSkewSimplex(Weights.PosD);
467
+
468
+ float DistanceWeight;
469
+
470
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosA)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
471
+ float a = math::dot(A, EvalPos - Weights.PosA) * DistanceWeight;
472
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosB)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
473
+ float b = math::dot(B, EvalPos - Weights.PosB) * DistanceWeight;
474
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosC)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
475
+ float c = math::dot(C, EvalPos - Weights.PosC) * DistanceWeight;
476
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosD)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
477
+ float d = math::dot(D, EvalPos - Weights.PosD) * DistanceWeight;
478
+
479
+ return 32 * (a + b + c + d);
480
+ }
481
+
482
+ // filtered 3D noise, can be optimized
483
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
484
+ // @param bTiling = repeat noise pattern
485
+ // @param RepeatSize = integer units before tiling in each dimension
486
+ // @return random number in the range -1 .. 1
487
+ float GradientNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 v, bool bTiling, float RepeatSize)
488
+ {
489
+ bTiling = true;
490
+ float3 fv = math::frac(v);
491
+ float3 iv0 = NoiseTileWrap(math::floor(v), bTiling, RepeatSize);
492
+ float3 iv1 = NoiseTileWrap(iv0 + 1, bTiling, RepeatSize);
493
+
494
+ const int2 ZShear = int2(17, 89);
495
+
496
+ float2 OffsetA = iv0.z * ZShear;
497
+ float2 OffsetB = OffsetA + ZShear; // non-tiling, use relative offset
498
+ if (bTiling) // tiling, have to compute from wrapped coordinates
499
+ {
500
+ OffsetB = iv1.z * ZShear;
501
+ }
502
+
503
+ // Texture size scale factor
504
+ float ts = 1 / 128.0f;
505
+
506
+ // texture coordinates for iv0.xy, as offset for both z slices
507
+ float2 TexA0 = (float2(iv0.x, iv0.y) + OffsetA + 0.5f) * ts;
508
+ float2 TexB0 = (float2(iv0.x, iv0.y) + OffsetB + 0.5f) * ts;
509
+
510
+ // texture coordinates for iv1.xy, as offset for both z slices
511
+ float2 TexA1 = TexA0 + ts; // for non-tiling, can compute relative to existing coordinates
512
+ float2 TexB1 = TexB0 + ts;
513
+ if (bTiling) // for tiling, need to compute from wrapped coordinates
514
+ {
515
+ TexA1 = (float2(iv1.x, iv1.y) + OffsetA + 0.5f) * ts;
516
+ TexB1 = (float2(iv1.x, iv1.y) + OffsetB + 0.5f) * ts;
517
+ }
518
+
519
+
520
+ // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 8, 16 or 32 bit)
521
+ float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat);
522
+ float3 PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
523
+ float3 A = PerlinNoiseColor * 2 - 1;
524
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat);
525
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
526
+ float3 B = PerlinNoiseColor * 2 - 1;
527
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat);
528
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
529
+ float3 C = PerlinNoiseColor * 2 - 1;
530
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat);
531
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
532
+ float3 D = PerlinNoiseColor * 2 - 1;
533
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat);
534
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
535
+ float3 E = PerlinNoiseColor * 2 - 1;
536
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat);
537
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
538
+ float3 F = PerlinNoiseColor * 2 - 1;
539
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat);
540
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
541
+ float3 G = PerlinNoiseColor * 2 - 1;
542
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat);
543
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
544
+ float3 H = PerlinNoiseColor * 2 - 1;
545
+
546
+ float a = math::dot(A, fv - float3(0, 0, 0));
547
+ float b = math::dot(B, fv - float3(1, 0, 0));
548
+ float c = math::dot(C, fv - float3(0, 1, 0));
549
+ float d = math::dot(D, fv - float3(1, 1, 0));
550
+ float e = math::dot(E, fv - float3(0, 0, 1));
551
+ float f = math::dot(F, fv - float3(1, 0, 1));
552
+ float g = math::dot(G, fv - float3(0, 1, 1));
553
+ float h = math::dot(H, fv - float3(1, 1, 1));
554
+
555
+ float4 Weights = PerlinRamp(math::frac(float4(fv.x, fv.y, fv.z, 0)));
556
+
557
+ float i = math::lerp(math::lerp(a, b, Weights.x), math::lerp(c, d, Weights.x), Weights.y);
558
+ float j = math::lerp(math::lerp(e, f, Weights.x), math::lerp(g, h, Weights.x), Weights.y);
559
+
560
+ return math::lerp(i, j, Weights.z);
561
+ }
562
+
563
+ // @return random number in the range -1 .. 1
564
+ // scalar: 6 frac, 31 mul/mad, 15 add,
565
+ float FastGradientPerlinNoise3D_TEX(uniform texture_3d PerlinNoise3DTexture, float3 xyz)
566
+ {
567
+ // needs to be the same value when creating the PerlinNoise3D texture
568
+ float Extent = 16;
569
+
570
+ // last texel replicated and needed for filtering
571
+ // scalar: 3 frac, 6 mul
572
+ xyz = math::frac(xyz / (Extent - 1)) * (Extent - 1);
573
+
574
+ // scalar: 3 frac
575
+ float3 uvw = math::frac(xyz);
576
+ // = floor(xyz);
577
+ // scalar: 3 add
578
+ float3 p0 = xyz - uvw;
579
+ // float3 f = math::pow(uvw, 2) * 3.0f - math::pow(uvw, 3) * 2.0f; // original perlin hermite (ok when used without bump mapping)
580
+ // scalar: 2*3 add 5*3 mul
581
+ float4 pr = PerlinRamp(float4(uvw.x, uvw.y, uvw.z, 0));
582
+ float3 f = float3(pr.x, pr.y, pr.z); // new, better with continues second derivative for bump mapping
583
+ // scalar: 3 add
584
+ float3 p = p0 + f;
585
+ // scalar: 3 mad
586
+ // TODO: need reverse???
587
+ float4 NoiseSample = tex::lookup_float4(PerlinNoise3DTexture, p / Extent + 0.5f / Extent); // +0.5f to get rid of bilinear offset
588
+
589
+ // reconstruct from 8bit (using mad with 2 constants and dot4 was same instruction count)
590
+ // scalar: 4 mad, 3 mul, 3 add
591
+ float3 n = float3(NoiseSample.x, NoiseSample.y, NoiseSample.z) * 255.0f / 127.0f - 1.0f;
592
+ float d = NoiseSample.w * 255.f - 127;
593
+ return math::dot(xyz, n) - d;
594
+ }
595
+
596
+ // Perlin-style "Modified Noise"
597
+ // http://www.umbc.edu/~olano/papers/index.html#mNoise
598
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
599
+ // @param bTiling = repeat noise pattern
600
+ // @param RepeatSize = integer units before tiling in each dimension
601
+ // @return random number in the range -1 .. 1
602
+ float GradientNoise3D_ALU(float3 v, bool bTiling, float RepeatSize)
603
+ {
604
+ SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize);
605
+
606
+ float rand000 = MGradient(int(seeds.seed000), seeds.fv - float3(0, 0, 0)).w;
607
+ float rand100 = MGradient(int(seeds.seed100), seeds.fv - float3(1, 0, 0)).w;
608
+ float rand010 = MGradient(int(seeds.seed010), seeds.fv - float3(0, 1, 0)).w;
609
+ float rand110 = MGradient(int(seeds.seed110), seeds.fv - float3(1, 1, 0)).w;
610
+ float rand001 = MGradient(int(seeds.seed001), seeds.fv - float3(0, 0, 1)).w;
611
+ float rand101 = MGradient(int(seeds.seed101), seeds.fv - float3(1, 0, 1)).w;
612
+ float rand011 = MGradient(int(seeds.seed011), seeds.fv - float3(0, 1, 1)).w;
613
+ float rand111 = MGradient(int(seeds.seed111), seeds.fv - float3(1, 1, 1)).w;
614
+
615
+ float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0));
616
+
617
+ float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y);
618
+ float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y);
619
+ return math::lerp(i, j, Weights.z);
620
+ }
621
+
622
+ // 3D value noise - used to be incorrectly called Perlin noise
623
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
624
+ // @param bTiling = repeat noise pattern
625
+ // @param RepeatSize = integer units before tiling in each dimension
626
+ // @return random number in the range -1 .. 1
627
+ float ValueNoise3D_ALU(float3 v, bool bTiling, float RepeatSize)
628
+ {
629
+ SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize);
630
+
631
+ float rand000 = RandBBSfloat(seeds.seed000) * 2 - 1;
632
+ float rand100 = RandBBSfloat(seeds.seed100) * 2 - 1;
633
+ float rand010 = RandBBSfloat(seeds.seed010) * 2 - 1;
634
+ float rand110 = RandBBSfloat(seeds.seed110) * 2 - 1;
635
+ float rand001 = RandBBSfloat(seeds.seed001) * 2 - 1;
636
+ float rand101 = RandBBSfloat(seeds.seed101) * 2 - 1;
637
+ float rand011 = RandBBSfloat(seeds.seed011) * 2 - 1;
638
+ float rand111 = RandBBSfloat(seeds.seed111) * 2 - 1;
639
+
640
+ float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0));
641
+
642
+ float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y);
643
+ float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y);
644
+ return math::lerp(i, j, Weights.z);
645
+ }
646
+
647
+ // 3D jitter offset within a voronoi noise cell
648
+ // @param pos - integer lattice corner
649
+ // @return random offsets vector
650
+ float3 VoronoiCornerSample(float3 pos, int Quality)
651
+ {
652
+ // random values in [-0.5, 0.5]
653
+ float3 noise = float3(Rand3DPCG16(int3(pos))) / 0xffff - 0.5;
654
+
655
+ // quality level 1 or 2: searches a 2x2x2 neighborhood with points distributed on a sphere
656
+ // scale factor to guarantee jittered points will be found within a 2x2x2 search
657
+ if (Quality <= 2)
658
+ {
659
+ return math::normalize(noise) * 0.2588;
660
+ }
661
+
662
+ // quality level 3: searches a 3x3x3 neighborhood with points distributed on a sphere
663
+ // scale factor to guarantee jittered points will be found within a 3x3x3 search
664
+ if (Quality == 3)
665
+ {
666
+ return math::normalize(noise) * 0.3090;
667
+ }
668
+
669
+ // quality level 4: jitter to anywhere in the cell, needs 4x4x4 search
670
+ return noise;
671
+ }
672
+
673
+ // compare previous best with a new candidate
674
+ // not producing point locations makes it easier for compiler to eliminate calculations when they're not needed
675
+ // @param minval = location and distance of best candidate seed point before the new one
676
+ // @param candidate = candidate seed point
677
+ // @param offset = 3D offset to new candidate seed point
678
+ // @param bDistanceOnly = if true, only set maxval.w with distance, otherwise maxval.w is distance and maxval.xyz is position
679
+ // @return position (if bDistanceOnly is false) and distance to closest seed point so far
680
+ float4 VoronoiCompare(float4 minval, float3 candidate, float3 offset, bool bDistanceOnly)
681
+ {
682
+ if (bDistanceOnly)
683
+ {
684
+ return float4(0, 0, 0, math::min(minval.w, math::dot(offset, offset)));
685
+ }
686
+ else
687
+ {
688
+ float newdist = math::dot(offset, offset);
689
+ return newdist > minval.w ? minval : float4(candidate.x, candidate.y, candidate.z, newdist);
690
+ }
691
+ }
692
+
693
+ // 220 instruction Worley noise
694
+ float4 VoronoiNoise3D_ALU(float3 v, int Quality, bool bTiling, float RepeatSize, bool bDistanceOnly)
695
+ {
696
+ float3 fv = math::frac(v), fv2 = math::frac(v + 0.5);
697
+ float3 iv = math::floor(v), iv2 = math::floor(v + 0.5);
698
+
699
+ // with initial minimum distance = infinity (or at least bigger than 4), first min is optimized away
700
+ float4 mindist = float4(0,0,0,100);
701
+ float3 p, offset;
702
+
703
+ // quality level 3: do a 3x3x3 search
704
+ if (Quality == 3)
705
+ {
706
+ int offset_x;
707
+ int offset_y;
708
+ int offset_z;
709
+ for (offset_x = -1; offset_x <= 1; ++offset_x)
710
+ {
711
+ for (offset_y = -1; offset_y <= 1; ++offset_y)
712
+ {
713
+ for (offset_z = -1; offset_z <= 1; ++offset_z)
714
+ {
715
+ offset = float3(offset_x, offset_y, offset_z);
716
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize), Quality);
717
+ mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly);
718
+ }
719
+ }
720
+ }
721
+ }
722
+
723
+ // everybody else searches a base 2x2x2 neighborhood
724
+ else
725
+ {
726
+ int offset_x;
727
+ int offset_y;
728
+ int offset_z;
729
+ for (offset_x = 0; offset_x <= 1; ++offset_x)
730
+ {
731
+ for (offset_y = 0; offset_y <= 1; ++offset_y)
732
+ {
733
+ for (offset_z = 0; offset_z <= 1; ++offset_z)
734
+ {
735
+ offset = float3(offset_x, offset_y, offset_z);
736
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality);
737
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
738
+
739
+ // quality level 2, do extra set of points, offset by half a cell
740
+ if (Quality == 2)
741
+ {
742
+ // 467 is just an offset to a different area in the random number field to avoid similar neighbor artifacts
743
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize) + 467, Quality);
744
+ mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly);
745
+ }
746
+ }
747
+ }
748
+ }
749
+ }
750
+
751
+ // quality level 4: add extra sets of four cells in each direction
752
+ if (Quality >= 4)
753
+ {
754
+ int offset_x;
755
+ int offset_y;
756
+ int offset_z;
757
+ for (offset_x = -1; offset_x <= 2; offset_x += 3)
758
+ {
759
+ for (offset_y = 0; offset_y <= 1; ++offset_y)
760
+ {
761
+ for (offset_z = 0; offset_z <= 1; ++offset_z)
762
+ {
763
+ offset = float3(offset_x, offset_y, offset_z);
764
+ // along x axis
765
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality);
766
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
767
+
768
+ // along y axis
769
+ p = float3(offset.y, offset.z, offset.x) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.y, offset.z, offset.x), bTiling, RepeatSize), Quality);
770
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
771
+
772
+ // along z axis
773
+ p = float3(offset.z, offset.x, offset.y) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.z, offset.x, offset.y), bTiling, RepeatSize), Quality);
774
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
775
+ }
776
+ }
777
+ }
778
+ }
779
+
780
+ // transform squared distance to real distance
781
+ return float4(mindist.x, mindist.y, mindist.z, math::sqrt(mindist.w));
782
+ }
783
+
784
+ // Coordinates for corners of a Simplex tetrahedron
785
+ // Based on McEwan et al., Efficient computation of noise in GLSL, JGT 2011
786
+ // @param v = 3D noise argument
787
+ // @return 4 corner locations
788
+ float4x3 SimplexCorners(float3 v)
789
+ {
790
+ // find base corner by skewing to tetrahedral space and back
791
+ float3 tet = math::floor(v + v.x/3 + v.y/3 + v.z/3);
792
+ float3 base = tet - tet.x/6 - tet.y/6 - tet.z/6;
793
+ float3 f = v - base;
794
+
795
+ // Find offsets to other corners (McEwan did this in tetrahedral space,
796
+ // but since skew is along x=y=z axis, this works in Euclidean space too.)
797
+ 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);
798
+ float3 a1 = math::min(g, h) - 1.0 / 6.0, a2 = math::max(g, h) - 1.0 / 3.0;
799
+
800
+ // four corners
801
+ return float4x3(base, base + a1, base + a2, base + 0.5);
802
+ }
803
+
804
+ // Improved smoothing function for simplex noise
805
+ // @param f = fractional distance to four tetrahedral corners
806
+ // @return weight for each corner
807
+ float4 SimplexSmooth(float4x3 f)
808
+ {
809
+ const float scale = 1024. / 375.; // scale factor to make noise -1..1
810
+ 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]));
811
+ float4 s = math::saturate(2 * d);
812
+ return (1 * scale + s*(-3 * scale + s*(3 * scale - s*scale)));
813
+ }
814
+
815
+ // Derivative of simplex noise smoothing function
816
+ // @param f = fractional distanc eto four tetrahedral corners
817
+ // @return derivative of smoothing function for each corner by x, y and z
818
+ float3x4 SimplexDSmooth(float4x3 f)
819
+ {
820
+ const float scale = 1024. / 375.; // scale factor to make noise -1..1
821
+ 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]));
822
+ float4 s = math::saturate(2 * d);
823
+ s = -12 * scale + s*(24 * scale - s * 12 * scale);
824
+
825
+ return float3x4(
826
+ s * float4(f[0][0], f[1][0], f[2][0], f[3][0]),
827
+ s * float4(f[0][1], f[1][1], f[2][1], f[3][1]),
828
+ s * float4(f[0][2], f[1][2], f[2][2], f[3][2]));
829
+ }
830
+
831
+ // Simplex noise and its Jacobian derivative
832
+ // @param v = 3D noise argument
833
+ // @param bTiling = whether to repeat noise pattern
834
+ // @param RepeatSize = integer units before tiling in each dimension, must be a multiple of 3
835
+ // @return float3x3 Jacobian in J[*].xyz, vector noise in J[*].w
836
+ // J[0].w, J[1].w, J[2].w is a Perlin-style simplex noise with vector output, e.g. (Nx, Ny, Nz)
837
+ // J[i].x is X derivative of the i'th component of the noise so J[2].x is dNz/dx
838
+ // You can use this to compute the noise, gradient, curl, or divergence:
839
+ // float3x4 J = JacobianSimplex_ALU(...);
840
+ // float3 VNoise = float3(J[0].w, J[1].w, J[2].w); // 3D noise
841
+ // float3 Grad = J[0].xyz; // gradient of J[0].w
842
+ // float3 Curl = float3(J[1][2]-J[2][1], J[2][0]-J[0][2], J[0][1]-J[1][2]);
843
+ // float Div = J[0][0]+J[1][1]+J[2][2];
844
+ // All of these are confirmed to compile out all unneeded terms.
845
+ // So Grad of X doesn't compute Y or Z components, and VNoise doesn't do any of the derivative computation.
846
+ float3x4 JacobianSimplex_ALU(float3 v, bool bTiling, float RepeatSize)
847
+ {
848
+ int3 MGradientMask = int3(0x8000, 0x4000, 0x2000);
849
+ float3 MGradientScale = float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000);
850
+
851
+ // corners of tetrahedron
852
+ float4x3 T = SimplexCorners(v);
853
+ // TODO: uint3
854
+ int3 rand = int3(0);
855
+ float4x3 gvec0 = float4x3(1.0);
856
+ float4x3 gvec1 = float4x3(1.0);
857
+ float4x3 gvec2 = float4x3(1.0);
858
+ float4x3 fv = float4x3(1.0);
859
+ float3x4 grad = float3x4(1.0);
860
+
861
+ // processing of tetrahedral vertices, unrolled
862
+ // to compute gradient at each corner
863
+ fv[0] = v - T[0];
864
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[0] + 0.5, bTiling, RepeatSize))));
865
+ gvec0[0] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
866
+ gvec1[0] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
867
+ gvec2[0] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
868
+ grad[0][0] = math::dot(gvec0[0], fv[0]);
869
+ grad[1][0] = math::dot(gvec1[0], fv[0]);
870
+ grad[2][0] = math::dot(gvec2[0], fv[0]);
871
+
872
+ fv[1] = v - T[1];
873
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[1] + 0.5, bTiling, RepeatSize))));
874
+ gvec0[1] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
875
+ gvec1[1] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
876
+ gvec1[1] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
877
+ grad[0][1] = math::dot(gvec0[1], fv[1]);
878
+ grad[1][1] = math::dot(gvec1[1], fv[1]);
879
+ grad[2][1] = math::dot(gvec2[1], fv[1]);
880
+
881
+ fv[2] = v - T[2];
882
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[2] + 0.5, bTiling, RepeatSize))));
883
+ gvec0[2] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
884
+ gvec1[2] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
885
+ gvec2[2] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
886
+ grad[0][2] = math::dot(gvec0[2], fv[2]);
887
+ grad[1][2] = math::dot(gvec1[2], fv[2]);
888
+ grad[2][2] = math::dot(gvec2[2], fv[2]);
889
+
890
+ fv[3] = v - T[3];
891
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[3] + 0.5, bTiling, RepeatSize))));
892
+ gvec0[3] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
893
+ gvec1[3] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
894
+ gvec2[3] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
895
+ grad[0][3] = math::dot(gvec0[3], fv[3]);
896
+ grad[1][3] = math::dot(gvec1[3], fv[3]);
897
+ grad[2][3] = math::dot(gvec2[3], fv[3]);
898
+
899
+ // blend gradients
900
+ float4 sv = SimplexSmooth(fv);
901
+ float3x4 ds = SimplexDSmooth(fv);
902
+
903
+ float3x4 jacobian = float3x4(1.0);
904
+ float3 vec0 = gvec0*sv + grad[0]*ds; // NOTE: mdl is column major, convert from UE4 (row major)
905
+ jacobian[0] = float4(vec0.x, vec0.y, vec0.z, math::dot(sv, grad[0]));
906
+ float3 vec1 = gvec1*sv + grad[1]*ds;
907
+ jacobian[1] = float4(vec1.x, vec1.y, vec1.z, math::dot(sv, grad[1]));
908
+ float3 vec2 = gvec2*sv + grad[2]*ds;
909
+ jacobian[2] = float4(vec2.x, vec2.y, vec2.z, math::dot(sv, grad[2]));
910
+
911
+ return jacobian;
912
+ }
913
+
914
+ // 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
915
+ // floats for all called functions (NoiseTileWrap) and this prevents any float-to-int conversion errors from automatic type conversion.
916
+ float Noise3D_Multiplexer(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, int Function, float3 Position, int Quality, bool bTiling, float RepeatSize)
917
+ {
918
+ // verified, HLSL compiled out the switch if Function is a constant
919
+ switch(Function)
920
+ {
921
+ case 0:
922
+ return SimplexNoise3D_TEX(PerlinNoiseGradientTexture, Position);
923
+ case 1:
924
+ return GradientNoise3D_TEX(PerlinNoiseGradientTexture, Position, bTiling, RepeatSize);
925
+ case 2:
926
+ return FastGradientPerlinNoise3D_TEX(PerlinNoise3DTexture, Position);
927
+ case 3:
928
+ return GradientNoise3D_ALU(Position, bTiling, RepeatSize);
929
+ case 4:
930
+ return ValueNoise3D_ALU(Position, bTiling, RepeatSize);
931
+ case 5:
932
+ return VoronoiNoise3D_ALU(Position, Quality, bTiling, RepeatSize, true).w * 2.0 - 1.0;
933
+ }
934
+ return 0;
935
+ }
936
+ //----------------------------------------------------------
937
+
938
+ 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)
939
+ [[
940
+ anno::description("Noise"),
941
+ anno::noinline()
942
+ ]]
943
+ {
944
+ Position *= Scale;
945
+ FilterWidth *= Scale;
946
+
947
+ float Out = 0.0f;
948
+ float OutScale = 1.0f;
949
+ float InvLevelScale = 1.0f / LevelScale;
950
+
951
+ int iFunction(Function);
952
+ int iQuality(Quality);
953
+ int iLevels(Levels);
954
+ bool bTurbulence(Turbulence);
955
+ bool bTiling(Tiling);
956
+
957
+ for(int i = 0; i < iLevels; ++i)
958
+ {
959
+ // fade out noise level that are too high frequent (not done through dynamic branching as it usually requires gradient instructions)
960
+ OutScale *= math::saturate(1.0 - FilterWidth);
961
+
962
+ if(bTurbulence)
963
+ {
964
+ Out += math::abs(Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize)) * OutScale;
965
+ }
966
+ else
967
+ {
968
+ Out += Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize) * OutScale;
969
+ }
970
+
971
+ Position *= LevelScale;
972
+ RepeatSize *= LevelScale;
973
+ OutScale *= InvLevelScale;
974
+ FilterWidth *= LevelScale;
975
+ }
976
+
977
+ if(!bTurbulence)
978
+ {
979
+ // bring -1..1 to 0..1 range
980
+ Out = Out * 0.5f + 0.5f;
981
+ }
982
+
983
+ // Out is in 0..1 range
984
+ return math::lerp(OutputMin, OutputMax, Out);
985
+ }
986
+
987
+ // Material node for noise functions returning a vector value
988
+ // @param LevelScale usually 2 but higher values allow efficient use of few levels
989
+ // @return in user defined range (OutputMin..OutputMax)
990
+ export float4 vector4_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize)
991
+ [[
992
+ anno::description("Vector Noise"),
993
+ anno::noinline()
994
+ ]]
995
+ {
996
+ float4 result = float4(0,0,0,1);
997
+ float3 ret = float3(0);
998
+ int iQuality = int(Quality);
999
+ int iFunction = int(Function);
1000
+ bool bTiling = Tiling > 0.0;
1001
+
1002
+ float3x4 Jacobian = JacobianSimplex_ALU(Position, bTiling, TileSize); // compiled out if not used
1003
+
1004
+ // verified, HLSL compiled out the switch if Function is a constant
1005
+ switch (iFunction)
1006
+ {
1007
+ case 0: // Cellnoise
1008
+ ret = float3(Rand3DPCG16(int3(math::floor(NoiseTileWrap(Position, bTiling, TileSize))))) / 0xffff;
1009
+ result = float4(ret.x, ret.y, ret.z, 1);
1010
+ break;
1011
+ case 1: // Color noise
1012
+ ret = float3(Jacobian[0].w, Jacobian[1].w, Jacobian[2].w);
1013
+ result = float4(ret.x, ret.y, ret.z, 1);
1014
+ break;
1015
+ case 2: // Gradient
1016
+ result = Jacobian[0];
1017
+ break;
1018
+ case 3: // Curl
1019
+ ret = float3(Jacobian[2][1] - Jacobian[1][2], Jacobian[0][2] - Jacobian[2][0], Jacobian[1][0] - Jacobian[0][1]);
1020
+ result = float4(ret.x, ret.y, ret.z, 1);
1021
+ break;
1022
+ case 4: // Voronoi
1023
+ result = VoronoiNoise3D_ALU(Position, iQuality, bTiling, TileSize, false);
1024
+ break;
1025
+ }
1026
+ return result;
1027
+ }
1028
+
1029
+ export float3 vector3_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize)
1030
+ [[
1031
+ anno::description("Vector Noise float3 version"),
1032
+ anno::noinline()
1033
+ ]]
1034
+ {
1035
+ float4 noise = vector4_noise(Position, Quality, Function, Tiling, TileSize);
1036
+ return float3(noise.x, noise.y, noise.z);
1037
+ }
1038
+
1039
+
1040
+ // workaround for ue4 fresnel (without supporting for camera vector) : replacing it with 0.0, means facing to the view
1041
+ export float fresnel(float exponent [[anno::unused()]], float base_reflect_fraction [[anno::unused()]], float3 normal [[anno::unused()]])
1042
+ [[
1043
+ anno::description("Fresnel"),
1044
+ anno::noinline()
1045
+ ]]
1046
+ {
1047
+ return 0.0;
1048
+ }
1049
+
1050
+ export float fresnel_function(float3 normal_vector [[anno::unused()]], float3 camera_vector [[anno::unused()]],
1051
+ bool invert_fresnel [[anno::unused()]], float power [[anno::unused()]],
1052
+ bool use_cheap_contrast [[anno::unused()]], float cheap_contrast_dark [[anno::unused()]], float cheap_contrast_bright [[anno::unused()]],
1053
+ bool clamp_fresnel_dot_product [[anno::unused()]])
1054
+ [[
1055
+ anno::description("Fresnel Function"),
1056
+ anno::noinline()
1057
+ ]]
1058
+ {
1059
+ return 0.0;
1060
+ }
1061
+
1062
+ export float3 camera_vector(uniform bool up_z = true)
1063
+ [[
1064
+ anno::description("Camera Vector"),
1065
+ anno::noinline()
1066
+ ]]
1067
+ {
1068
+ // assume camera postion is 0,0,0
1069
+ return math::normalize(float3(0) - convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z));
1070
+ }
1071
+
1072
+ export float pixel_depth()
1073
+ [[
1074
+ anno::description("Pixel Depth"),
1075
+ anno::noinline()
1076
+ ]]
1077
+ {
1078
+ return 256.0f;
1079
+ }
1080
+
1081
+ export float scene_depth()
1082
+ [[
1083
+ anno::description("Scene Depth")
1084
+ ]]
1085
+ {
1086
+ return 65500.0f;
1087
+ }
1088
+
1089
+ export float3 scene_color()
1090
+ [[
1091
+ anno::description("Scene Color")
1092
+ ]]
1093
+ {
1094
+ return float3(1.0f);
1095
+ }
1096
+
1097
+ export float4 vertex_color()
1098
+ [[
1099
+ anno::description("Vertex Color"),
1100
+ anno::noinline()
1101
+ ]]
1102
+ {
1103
+ return float4(1.0f);
1104
+ }
1105
+
1106
+ export float4 vertex_color_from_coordinate(int VertexColorCoordinateIndex)
1107
+ [[
1108
+ anno::description("Vertex Color for float2 PrimVar"),
1109
+ anno::noinline()
1110
+ ]]
1111
+ {
1112
+ // 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
1113
+ 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);
1114
+ }
1115
+
1116
+ export float3 camera_position()
1117
+ [[
1118
+ anno::description("Camera Position"),
1119
+ anno::noinline()
1120
+ ]]
1121
+ {
1122
+ return float3(1000.0f, 0, 0);
1123
+ }
1124
+
1125
+ export float3 rotate_about_axis(float4 NormalizedRotationAxisAndAngle, float3 PositionOnAxis, float3 Position)
1126
+ [[
1127
+ anno::description("Rotates Position about the given axis by the given angle")
1128
+ ]]
1129
+ {
1130
+ // Project Position onto the rotation axis and find the closest point on the axis to Position
1131
+ float3 NormalizedRotationAxis = float3(NormalizedRotationAxisAndAngle.x,NormalizedRotationAxisAndAngle.y,NormalizedRotationAxisAndAngle.z);
1132
+ float3 ClosestPointOnAxis = PositionOnAxis + NormalizedRotationAxis * math::dot(NormalizedRotationAxis, Position - PositionOnAxis);
1133
+ // Construct orthogonal axes in the plane of the rotation
1134
+ float3 UAxis = Position - ClosestPointOnAxis;
1135
+ float3 VAxis = math::cross(NormalizedRotationAxis, UAxis);
1136
+ float[2] SinCosAngle = math::sincos(NormalizedRotationAxisAndAngle.w);
1137
+ // Rotate using the orthogonal axes
1138
+ float3 R = UAxis * SinCosAngle[1] + VAxis * SinCosAngle[0];
1139
+ // Reconstruct the rotated world space position
1140
+ float3 RotatedPosition = ClosestPointOnAxis + R;
1141
+ // Convert from position to a position offset
1142
+ return RotatedPosition - Position;
1143
+ }
1144
+
1145
+ export float2 rotate_scale_offset_texcoords(float2 InTexCoords, float4 InRotationScale, float2 InOffset)
1146
+ [[
1147
+ anno::description("Returns a float2 texture coordinate after 2x2 transform and offset applied")
1148
+ ]]
1149
+ {
1150
+ return float2(math::dot(InTexCoords, float2(InRotationScale.x, InRotationScale.y)), math::dot(InTexCoords, float2(InRotationScale.z, InRotationScale.w))) + InOffset;
1151
+ }
1152
+
1153
+ export float3 reflection_custom_world_normal(float3 WorldNormal, bool bNormalizeInputNormal, uniform bool up_z = true)
1154
+ [[
1155
+ anno::description("Reflection vector about the specified world space normal")
1156
+ ]]
1157
+ {
1158
+ if (bNormalizeInputNormal)
1159
+ {
1160
+ WorldNormal = math::normalize(WorldNormal);
1161
+ }
1162
+
1163
+ return -camera_vector(up_z) + WorldNormal * math::dot(WorldNormal, camera_vector(up_z)) * 2.0;
1164
+ }
1165
+
1166
+ export float3 reflection_vector(uniform bool up_z = true)
1167
+ [[
1168
+ anno::description("Reflection Vector"),
1169
+ anno::noinline()
1170
+ ]]
1171
+ {
1172
+ float3 normal = convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
1173
+ return reflection_custom_world_normal(normal, false, up_z);
1174
+ }
1175
+
1176
+ export float dither_temporalAA(float AlphaThreshold = 0.5f, float Random = 1.0f [[anno::unused()]])
1177
+ [[
1178
+ anno::description("Dither TemporalAA"),
1179
+ anno::noinline()
1180
+ ]]
1181
+ {
1182
+ return AlphaThreshold;
1183
+ }
1184
+
1185
+ export float3 black_body( float Temp )
1186
+ [[
1187
+ anno::description("Black Body"),
1188
+ anno::noinline()
1189
+ ]]
1190
+ {
1191
+ float u = ( 0.860117757f + 1.54118254e-4f * Temp + 1.28641212e-7f * Temp*Temp ) / ( 1.0f + 8.42420235e-4f * Temp + 7.08145163e-7f * Temp*Temp );
1192
+ float v = ( 0.317398726f + 4.22806245e-5f * Temp + 4.20481691e-8f * Temp*Temp ) / ( 1.0f - 2.89741816e-5f * Temp + 1.61456053e-7f * Temp*Temp );
1193
+
1194
+ float x = 3*u / ( 2*u - 8*v + 4 );
1195
+ float y = 2*v / ( 2*u - 8*v + 4 );
1196
+ float z = 1 - x - y;
1197
+
1198
+ float Y = 1;
1199
+ float X = Y/y * x;
1200
+ float Z = Y/y * z;
1201
+
1202
+ float3x3 XYZtoRGB = float3x3(
1203
+ float3(3.2404542, -1.5371385, -0.4985314),
1204
+ float3(-0.9692660, 1.8760108, 0.0415560),
1205
+ float3(0.0556434, -0.2040259, 1.0572252)
1206
+ );
1207
+
1208
+ return XYZtoRGB * float3( X, Y, Z ) * math::pow( 0.0004 * Temp, 4 );
1209
+ }
1210
+
1211
+ export float per_instance_random(uniform texture_2d PerlinNoiseGradientTexture, int NumberInstances)
1212
+ [[
1213
+ anno::description("Per Instance Random"),
1214
+ anno::noinline()
1215
+ ]]
1216
+ {
1217
+ float weight = state::object_id() / float(NumberInstances);
1218
+ return NumberInstances == 0 ? 0.0 : tex::lookup_float4(PerlinNoiseGradientTexture, float2(weight, 1.0 - weight), tex::wrap_repeat, tex::wrap_repeat).x;
1219
+ }
1220
+
1221
+ //------------------ Hair from UE4 -----------------------
1222
+ float3 hair_absorption_to_color(float3 A)
1223
+ {
1224
+ const float B = 0.3f;
1225
+ float b2 = B * B;
1226
+ float b3 = B * b2;
1227
+ float b4 = b2 * b2;
1228
+ float b5 = B * b4;
1229
+ float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5);
1230
+ return math::exp(-math::sqrt(A) * D);
1231
+ }
1232
+
1233
+ float3 hair_color_to_absorption(float3 C)
1234
+ {
1235
+ const float B = 0.3f;
1236
+ float b2 = B * B;
1237
+ float b3 = B * b2;
1238
+ float b4 = b2 * b2;
1239
+ float b5 = B * b4;
1240
+ float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5);
1241
+ return math::pow(math::log(C) / D, 2.0f);
1242
+ }
1243
+
1244
+ export float3 get_hair_color_from_melanin(float InMelanin, float InRedness, float3 InDyeColor)
1245
+ [[
1246
+ anno::description("Hair Color")
1247
+ ]]
1248
+ {
1249
+ InMelanin = math::saturate(InMelanin);
1250
+ InRedness = math::saturate(InRedness);
1251
+ float Melanin = -math::log(math::max(1 - InMelanin, 0.0001f));
1252
+ float Eumelanin = Melanin * (1 - InRedness);
1253
+ float Pheomelanin = Melanin * InRedness;
1254
+
1255
+ float3 DyeAbsorption = hair_color_to_absorption(math::saturate(InDyeColor));
1256
+ float3 Absorption = Eumelanin * float3(0.506f, 0.841f, 1.653f) + Pheomelanin * float3(0.343f, 0.733f, 1.924f);
1257
+
1258
+ return hair_absorption_to_color(Absorption + DyeAbsorption);
1259
+ }
1260
+
1261
+ export float3 local_object_bounds_min()
1262
+ [[
1263
+ anno::description("Local Object Bounds Min"),
1264
+ anno::noinline()
1265
+ ]]
1266
+ {
1267
+ return float3(0.0);
1268
+ }
1269
+
1270
+ export float3 local_object_bounds_max()
1271
+ [[
1272
+ anno::description("Local Object Bounds Max"),
1273
+ anno::noinline()
1274
+ ]]
1275
+ {
1276
+ return float3(100.0);
1277
+ }
1278
+
1279
+ export float3 object_bounds()
1280
+ [[
1281
+ anno::description("Object Bounds"),
1282
+ anno::noinline()
1283
+ ]]
1284
+ {
1285
+ return float3(100.0);
1286
+ }
1287
+
1288
+ export float object_radius()
1289
+ [[
1290
+ anno::description("Object Radius"),
1291
+ anno::noinline()
1292
+ ]]
1293
+ {
1294
+ return 100.0f;
1295
+ }
1296
+
1297
+ export float3 object_world_position(uniform bool up_z = true)
1298
+ [[
1299
+ anno::description("Object World Position"),
1300
+ anno::noinline()
1301
+ ]]
1302
+ {
1303
+ 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;
1304
+ }
1305
+
1306
+ export float3 object_orientation()
1307
+ [[
1308
+ anno::description("Object Orientation"),
1309
+ anno::noinline()
1310
+ ]]
1311
+ {
1312
+ return float3(0);
1313
+ }
1314
+
1315
+ export float rcp(float x)
1316
+ [[
1317
+ anno::description("hlsl rcp"),
1318
+ anno::noinline()
1319
+ ]]
1320
+ {
1321
+ return 1.0f / x;
1322
+ }
1323
+
1324
+ export float2 rcp(float2 x)
1325
+ [[
1326
+ anno::description("hlsl rcp"),
1327
+ anno::noinline()
1328
+ ]]
1329
+ {
1330
+ return 1.0f / x;
1331
+ }
1332
+
1333
+ export float3 rcp(float3 x)
1334
+ [[
1335
+ anno::description("hlsl rcp"),
1336
+ anno::noinline()
1337
+ ]]
1338
+ {
1339
+ return 1.0f / x;
1340
+ }
1341
+
1342
+ export float4 rcp(float4 x)
1343
+ [[
1344
+ anno::description("hlsl rcp"),
1345
+ anno::noinline()
1346
+ ]]
1347
+ {
1348
+ return 1.0f / x;
1349
+ }
1350
+
1351
+ export int BitFieldExtractI32(int Data, int Size, int Offset)
1352
+ [[
1353
+ anno::description("BitFieldExtractI32 int"),
1354
+ anno::noinline()
1355
+ ]]
1356
+ {
1357
+ Size &= 3;
1358
+ Offset &= 3;
1359
+
1360
+ if (Size == 0)
1361
+ return 0;
1362
+ else if (Offset + Size < 32)
1363
+ return (Data << (32 - Size - Offset)) >> (32 - Size);
1364
+ else
1365
+ return Data >> Offset;
1366
+ }
1367
+
1368
+ export int BitFieldExtractI32(float Data, float Size, float Offset)
1369
+ [[
1370
+ anno::description("BitFieldExtractI32 float"),
1371
+ anno::noinline()
1372
+ ]]
1373
+ {
1374
+ return BitFieldExtractI32(int(Data), int(Size), int(Offset));
1375
+ }
1376
+
1377
+ export int BitFieldExtractU32(float Data, float Size, float Offset)
1378
+ [[
1379
+ anno::description("BitFieldExtractU32 float"),
1380
+ anno::noinline()
1381
+ ]]
1382
+ {
1383
+ return BitFieldExtractI32(Data, Size, Offset);
1384
+ }
1385
+
1386
+ export int BitFieldExtractU32(int Data, int Size, int Offset)
1387
+ [[
1388
+ anno::description("BitFieldExtractU32 int"),
1389
+ anno::noinline()
1390
+ ]]
1391
+ {
1392
+ return BitFieldExtractI32(Data, Size, Offset);
1393
+ }
1394
+
1395
+ export float3 EyeAdaptationInverseLookup(float3 LightValue, float Alpha)
1396
+ [[
1397
+ anno::description("EyeAdaptationInverseLookup"),
1398
+ anno::noinline()
1399
+ ]]
1400
+ {
1401
+ float Adaptation = 1.0f;
1402
+
1403
+ // When Alpha=0.0, we want to multiply by 1.0. when Alpha = 1.0, we want to multiply by 1/Adaptation.
1404
+ // So the lerped value is:
1405
+ // LerpLogScale = Lerp(log(1),log(1/Adaptaiton),T)
1406
+ // Which is simplified as:
1407
+ // LerpLogScale = Lerp(0,-log(Adaptation),T)
1408
+ // LerpLogScale = -T * logAdaptation;
1409
+
1410
+ float LerpLogScale = -Alpha * math::log(Adaptation);
1411
+ float Scale = math::exp(LerpLogScale);
1412
+ return LightValue * Scale;
1413
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/08d23f3cd9254e38a696060a962ebb7f.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_08d23f3cd9254e38a696060a962ebb7f" (
62
+ prepend payload = @./08d23f3cd9254e38a696060a962ebb7f.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/0acdfc046a5149cc890c992da89b48c0.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_0acdfc046a5149cc890c992da89b48c0" (
62
+ prepend payload = @./0acdfc046a5149cc890c992da89b48c0.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/1f9f025d995c4554bcc39b97eed20c7d.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_1f9f025d995c4554bcc39b97eed20c7d" (
62
+ prepend payload = @./1f9f025d995c4554bcc39b97eed20c7d.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/476f8b64886f4edbae88e74f68d065c9.usd ADDED
Binary file (20.1 kB). View file
 
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/476f8b64886f4edbae88e74f68d065c9.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_476f8b64886f4edbae88e74f68d065c9" (
62
+ prepend payload = @./476f8b64886f4edbae88e74f68d065c9.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/48a6aed1dff24e57b6836ade47a46ead.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_48a6aed1dff24e57b6836ade47a46ead" (
62
+ prepend payload = @./48a6aed1dff24e57b6836ade47a46ead.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/5b87502ac41f4eb2b2ba7b0cce6517aa.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_5b87502ac41f4eb2b2ba7b0cce6517aa" (
62
+ prepend payload = @./5b87502ac41f4eb2b2ba7b0cce6517aa.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/63e2323f49db4793bd087e67b20ac350.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_63e2323f49db4793bd087e67b20ac350" (
62
+ prepend payload = @./63e2323f49db4793bd087e67b20ac350.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/691d0e4cb6a1409ea72d960d0ab144ea.usd ADDED
Binary file (21.8 kB). View file
 
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/691d0e4cb6a1409ea72d960d0ab144ea.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_691d0e4cb6a1409ea72d960d0ab144ea" (
62
+ prepend payload = @./691d0e4cb6a1409ea72d960d0ab144ea.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/896181392c1f4e2d9316bf2eeafc3042.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_896181392c1f4e2d9316bf2eeafc3042" (
62
+ prepend payload = @./896181392c1f4e2d9316bf2eeafc3042.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/8d56e83387b64684ae7a1b4a20040d67.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_8d56e83387b64684ae7a1b4a20040d67" (
62
+ prepend payload = @./8d56e83387b64684ae7a1b4a20040d67.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/c7aa636f24e345b3b831271bf7f1fe02.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_c7aa636f24e345b3b831271bf7f1fe02" (
62
+ prepend payload = @./c7aa636f24e345b3b831271bf7f1fe02.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_drink/base/object_usds/objaverse_usd/eced95f9f49e4ef9b6f8d576f908bc6b.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_eced95f9f49e4ef9b6f8d576f908bc6b" (
62
+ prepend payload = @./eced95f9f49e4ef9b6f8d576f908bc6b.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/.collect.mapping.json ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0",
3
+ "file_records": [
4
+ {
5
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base.usd",
6
+ "source_hash": "abb6fa325c880c087596c8ef24456289c32c7565",
7
+ "target_url": "./base.usd",
8
+ "target_hash": "ed0f40a087b3651c567bcc71f6bdb54f49e2f100"
9
+ },
10
+ {
11
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/Downloads/brown_photostudio_02_4k.exr",
12
+ "source_hash": "26edc4ea55ed199916d66d890e4097c7f0175957",
13
+ "target_url": "./Downloads/brown_photostudio_02_4k.exr",
14
+ "target_hash": "6a971fac36fae4ea817618c601b5ea6507ac0a75"
15
+ },
16
+ {
17
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/Downloads/kitchen/Kitchen_KnifeHolders001.usd",
18
+ "source_hash": "9ce4e2adb4f97995a9770479be48632c7f7995c9",
19
+ "target_url": "./Downloads/kitchen/Kitchen_KnifeHolders001.usd",
20
+ "target_hash": "a074d028125bdb19aebd8cacd80ac408554deca3"
21
+ },
22
+ {
23
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/Downloads/kitchen/Kitchen_Shelf001.usd",
24
+ "source_hash": "cfdb2092c9a62b4031f4610979f3c78de1a948e8",
25
+ "target_url": "./Downloads/kitchen/Kitchen_Shelf001.usd",
26
+ "target_hash": "2c64f1380528c6e94b63def6e2768f3e990e5b4c"
27
+ },
28
+ {
29
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/Downloads/kitchen/SM_P_Flavour_02.usd",
30
+ "source_hash": "37db97c739826f7219d14862595d658fba330326",
31
+ "target_url": "./Downloads/kitchen/SM_P_Flavour_02.usd",
32
+ "target_hash": "fc9013aed679569c9fa825aef2d92a5828c2a724"
33
+ },
34
+ {
35
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/instance.usd",
36
+ "source_hash": "71e3bd9ef0c0e48059720ab8cf37793ea7c7f191",
37
+ "target_url": "./object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/instance.usd",
38
+ "target_hash": "85496b0cb87b52d10d5fe33c23fd3ded28530dbf"
39
+ },
40
+ {
41
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_beef.usd",
42
+ "source_hash": "16bdf048d692eaeac55b0eb6ea588df90595e7cd",
43
+ "target_url": "./scene_sandwich/obj_beef.usd",
44
+ "target_hash": "4099caecfdc954dd62965cfe6387d865c69be4a8"
45
+ },
46
+ {
47
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_board1.usd",
48
+ "source_hash": "99a5f78c16b29c4d2299f04e116b23f08fad00c3",
49
+ "target_url": "./scene_sandwich/obj_board1.usd",
50
+ "target_hash": "6c24e7a2f502e1fb6669923530ebdf1a1332478f"
51
+ },
52
+ {
53
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_board2.usd",
54
+ "source_hash": "3460437d662bed30a51843e5164b8003562e1e70",
55
+ "target_url": "./scene_sandwich/obj_board2.usd",
56
+ "target_hash": "c19873d448d97e3f1f6ce18bbb21f27a3f793204"
57
+ },
58
+ {
59
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_board3.usd",
60
+ "source_hash": "4a92d56ea75f207f06ce7a58aa7754da0cd74b90",
61
+ "target_url": "./scene_sandwich/obj_board3.usd",
62
+ "target_hash": "bcb2beae7ca8d69108a25e43e395e0ba809a58b6"
63
+ },
64
+ {
65
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_board4.usd",
66
+ "source_hash": "91876cfa40165789636e60bb4f9427399c70bb09",
67
+ "target_url": "./scene_sandwich/obj_board4.usd",
68
+ "target_hash": "faddfe5a2b510b9bce6ee56acf3326c5b4d072d7"
69
+ },
70
+ {
71
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_board5.usd",
72
+ "source_hash": "34d7e1e83e6d21483b0ceb35bdbe4949f0668501",
73
+ "target_url": "./scene_sandwich/obj_board5.usd",
74
+ "target_hash": "42d5874e77a34860d0740aa98b9229cc191f2ceb"
75
+ },
76
+ {
77
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_board6.usd",
78
+ "source_hash": "067c050a4db89104fc5e9e87e8a9b4fe1a214486",
79
+ "target_url": "./scene_sandwich/obj_board6.usd",
80
+ "target_hash": "3862d847a33f67ee910d900cff15f87faf360d51"
81
+ },
82
+ {
83
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_board7.usd",
84
+ "source_hash": "b7c2a7efc7606bc92b7f9b2153e63998dd29b20d",
85
+ "target_url": "./scene_sandwich/obj_board7.usd",
86
+ "target_hash": "4823e9dd32f3c1dba6cb77a4655ee7b496e3fe73"
87
+ },
88
+ {
89
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_board8.usd",
90
+ "source_hash": "8063cd5f76e60fe2193ee209e1ef0beb1b1f47a9",
91
+ "target_url": "./scene_sandwich/obj_board8.usd",
92
+ "target_hash": "86593c9c939dfb1b7e42982a1fbcd9e4f93bcd9d"
93
+ },
94
+ {
95
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_bread2.usd",
96
+ "source_hash": "a2374d4334ebba77a4816d9324da8181ace08cda",
97
+ "target_url": "./scene_sandwich/obj_bread2.usd",
98
+ "target_hash": "5fcf3de21a0b240e46e224e5258b23d665de4dd9"
99
+ },
100
+ {
101
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_bread4.usd",
102
+ "source_hash": "6fdf2a3f5ef2dd4efe157f446acc976dff6e0f79",
103
+ "target_url": "./scene_sandwich/obj_bread4.usd",
104
+ "target_hash": "55d48761409f3a2c2bedbfee890a903a93571895"
105
+ },
106
+ {
107
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_lettuce.usd",
108
+ "source_hash": "89f3ff8bae87fae1a810a6275642398643a72540",
109
+ "target_url": "./scene_sandwich/obj_lettuce.usd",
110
+ "target_hash": "408262fdd34fc9873c3fb25b5f8ccef38dd7162a"
111
+ },
112
+ {
113
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/obj_plate.usd",
114
+ "source_hash": "b279153d65a72e6c98a23d0e1f9796db6d1e47ac",
115
+ "target_url": "./scene_sandwich/obj_plate.usd",
116
+ "target_hash": "8ecbe0dd5a2b8ecba0e2f16f8fb9911434ef3be2"
117
+ },
118
+ {
119
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/104_board_base3_converted/textures/texture_diffuse.png",
120
+ "source_hash": "4a652a43eee48b52632f32ebc7e47dd4e8912ddd",
121
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/104_board_base3_converted/textures/texture_diffuse.png",
122
+ "target_hash": "0d94585960660e3d62edf48262b7a2dd3d5415f4"
123
+ },
124
+ {
125
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/104_board_base3_converted/textures/texture_metallic-texture_roughness.png",
126
+ "source_hash": "e25340345a037b07b7b968ba4e8ae01319989c28",
127
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/104_board_base3_converted/textures/texture_metallic-texture_roughness.png",
128
+ "target_hash": "389b8378eb3ee167a55f225f16331071a50a9038"
129
+ },
130
+ {
131
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/104_board_base3_converted/textures/texture_normal.png",
132
+ "source_hash": "da9a6ededdd5dbf6ab6ee1b39d649b5b8160c369",
133
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/104_board_base3_converted/textures/texture_normal.png",
134
+ "target_hash": "7035ea720380b4856e393b24f0b6be1c476228de"
135
+ },
136
+ {
137
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/075_bread_base5_converted/textures/texture_diffuse.png",
138
+ "source_hash": "d9e477e99362e2547f8ee9a357aaf8c5c8550594",
139
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/075_bread_base5_converted/textures/texture_diffuse.png",
140
+ "target_hash": "4e3f84b0386c66158e7ca14fbeac0e59ca5dc392"
141
+ },
142
+ {
143
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/075_bread_base5_converted/textures/texture_metallic-texture_roughness.png",
144
+ "source_hash": "3a7aa45cafd576ffb41eba2681ea8afc3265ac7f",
145
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/075_bread_base5_converted/textures/texture_metallic-texture_roughness.png",
146
+ "target_hash": "60caa588fa6cdf436ba9acf014cf993fa977f3bd"
147
+ },
148
+ {
149
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/075_bread_base5_converted/textures/texture_normal.png",
150
+ "source_hash": "b3694920bfe1604317c04b243d619c815a514a15",
151
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/075_bread_base5_converted/textures/texture_normal.png",
152
+ "target_hash": "dac91a29a63f8a44e4e4934d4122554112bb8dd8"
153
+ },
154
+ {
155
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/Downloads/lettuce/lettuce0/textures/baked_mesh_5085ce69_tex0.png",
156
+ "source_hash": "c2e9e778b8c337e45fea921b61765191a1565074",
157
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/Downloads/lettuce/lettuce0/textures/baked_mesh_5085ce69_tex0.png",
158
+ "target_hash": "060aaba36b6ea401a7b84e349b7aa3f5b06f0496"
159
+ },
160
+ {
161
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/003_plate_base0_converted/textures/Image_0.png",
162
+ "source_hash": "e63bb28be2e75cdda238600d551a44768b380e89",
163
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/003_plate_base0_converted/textures/Image_0.png",
164
+ "target_hash": "f9b31f17e2716836d9f0f9c424cf19396ab6d092"
165
+ },
166
+ {
167
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/003_plate_base0_converted/textures/Image_1.png",
168
+ "source_hash": "7b89c29307d0e896031082946f81a21aa98f236a",
169
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/003_plate_base0_converted/textures/Image_1.png",
170
+ "target_hash": "6dfdd5617ef8fb4a8443e6973dd4f551e905c193"
171
+ },
172
+ {
173
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/003_plate_base0_converted/textures/Image_2.png",
174
+ "source_hash": "11964ff1a364cd7b828223f103906de338899535",
175
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/repos/RoboTwin/assets/objects/usds/003_plate_base0_converted/textures/Image_2.png",
176
+ "target_hash": "b09605299771defb71b92d1d75d89e43d3d3705a"
177
+ },
178
+ {
179
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/Downloads/Lightwheel_KitchenRoom/Kitchen_Other/texture/T_knifeHolders001_BC.png",
180
+ "source_hash": "8a7026b5a115d264c4d80ccf7aa3e9de72ca6018",
181
+ "target_url": "./Downloads/Lightwheel_KitchenRoom/Kitchen_Other/texture/T_knifeHolders001_BC.png",
182
+ "target_hash": "463c6b080d3eecb10e7ecbfc933ec395d0bc77b3"
183
+ },
184
+ {
185
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/Downloads/Lightwheel_KitchenRoom/Kitchen_Other/textures/19913701-files-022.JPG",
186
+ "source_hash": "6f3fc4f1eab72ad0969119368416b05065511c1f",
187
+ "target_url": "./Downloads/Lightwheel_KitchenRoom/Kitchen_Other/textures/19913701-files-022.JPG",
188
+ "target_hash": "e41f606741b90b869bfcf28778b9e9c4cb34dbb6"
189
+ },
190
+ {
191
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/Downloads/Lightwheel_KitchenRoom/Kitchen_Other/textures/19913701-files-023.JPG",
192
+ "source_hash": "bda3172b71d6ee7e332432acfbedb5af5d767e9d",
193
+ "target_url": "./Downloads/Lightwheel_KitchenRoom/Kitchen_Other/textures/19913701-files-023.JPG",
194
+ "target_hash": "2287dc5bda6f72dc5a89e93a101996cbe4f045b4"
195
+ },
196
+ {
197
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/Downloads/Lightwheel_KitchenRoom/Kitchen_Other/textures/19913701-files-024.JPG",
198
+ "source_hash": "c0e4a90f073a303bf873a34e6bc3c536e0154a68",
199
+ "target_url": "./Downloads/Lightwheel_KitchenRoom/Kitchen_Other/textures/19913701-files-024.JPG",
200
+ "target_hash": "95f8dce1762f734a666e57ceadc2c2f2125e29af"
201
+ },
202
+ {
203
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/Downloads/Lightwheel_KitchenRoom/Kitchen_Other/textures/19913701-files-025.JPG",
204
+ "source_hash": "b197c5371a6c081796c5b1f15b1fbdf1406a361a",
205
+ "target_url": "./Downloads/Lightwheel_KitchenRoom/Kitchen_Other/textures/19913701-files-025.JPG",
206
+ "target_hash": "bc1ebdbd570936f134413291e60beae88b36f787"
207
+ },
208
+ {
209
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/Downloads/beef/beef0/textures/baked_mesh_4aebee43_tex0.png",
210
+ "source_hash": "caf6acee443bb0a7751a0c284a8c764bcf751d7f",
211
+ "target_url": "./scene_sandwich/saved/assets/scene_usds/IROS_scenes_collected/scene_sandwich/Downloads/beef/beef0/textures/baked_mesh_4aebee43_tex0.png",
212
+ "target_hash": "46a45c7b7f1f06bdedf180d34c07b15fda67fbdb"
213
+ },
214
+ {
215
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Textures/65139b1302ca6000018df43e_color.png",
216
+ "source_hash": "ae875d6a3f05d9eed3440562ecf5e8c06da49419",
217
+ "target_url": "./object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Textures/65139b1302ca6000018df43e_color.png",
218
+ "target_hash": "b070c10f7b2bca8e1135a4a02d40123c04f43a7f"
219
+ },
220
+ {
221
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Textures/65139b1329931a0001abc2f6_color.png",
222
+ "source_hash": "b87d41526bc9e16e2d9e456f4de54eda4a9f3ef9",
223
+ "target_url": "./object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Textures/65139b1329931a0001abc2f6_color.png",
224
+ "target_hash": "bce990f83767b232fbf46c88a2eec04230f0e5e2"
225
+ },
226
+ {
227
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Textures/black.png",
228
+ "source_hash": "3a18adb577d6ccff8b42107dc1e10f19243edc8d",
229
+ "target_url": "./object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Textures/black.png",
230
+ "target_hash": "8d2eed6aa9405b5327a5f8ff660c395be8f6f95b"
231
+ },
232
+ {
233
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Textures/normal.png",
234
+ "source_hash": "be65f222be2ccec2b7fb0ce9ad98a776553d0b45",
235
+ "target_url": "./object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Textures/normal.png",
236
+ "target_hash": "c354b4994f6e27001e9653bbc168c1cd7cbcc6ad"
237
+ },
238
+ {
239
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Textures/white.png",
240
+ "source_hash": "0d677f1df42bce56877c47e7b7bd8c2b0bea7bea",
241
+ "target_url": "./object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Textures/white.png",
242
+ "target_hash": "8a8bb2dd1362e0d4221c65571638caf9a83773a1"
243
+ },
244
+ {
245
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Num5acb437a3cf8ab2e120078b0.mdl",
246
+ "source_hash": "b0f2d596df7055c3ac5cf80f6434fc2b1027ae32",
247
+ "target_url": "./object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Num5acb437a3cf8ab2e120078b0.mdl",
248
+ "target_hash": "123944a286e4ad70486393fcb01f2c1d77ba78e5"
249
+ },
250
+ {
251
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/OmniUe4Function.mdl",
252
+ "source_hash": "9d303b90a4bd9efe4d5bf95086ad722230a556ef",
253
+ "target_url": "./object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/OmniUe4Function.mdl",
254
+ "target_hash": "8d86b4cb6ee1bdff83a92ce95d0229883af1bacf"
255
+ },
256
+ {
257
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_sandwich/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/OmniUe4Base.mdl",
258
+ "source_hash": "b3e9eaec9349cae7d5f6316b658298b461f0b932",
259
+ "target_url": "./object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/OmniUe4Base.mdl",
260
+ "target_hash": "e09f053f4d3bc78271100a22266ac854ef88e246"
261
+ }
262
+ ]
263
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/Downloads/kitchen/Kitchen_KnifeHolders001.usd ADDED
Binary file (95.9 kB). View file
 
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/Downloads/kitchen/Kitchen_KnifeHolders001.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_Kitchen_KnifeHolders001" (
62
+ prepend payload = @./Kitchen_KnifeHolders001.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/Downloads/kitchen/Kitchen_Shelf001.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_Kitchen_Shelf001" (
62
+ prepend payload = @./Kitchen_Shelf001.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/Downloads/kitchen/SM_P_Flavour_02.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_SM_P_Flavour_02" (
62
+ prepend payload = @./SM_P_Flavour_02.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/instance.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_instance" (
62
+ prepend payload = @./instance.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/Num5acb437a3cf8ab2e120078b0.mdl ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ mdl 1.6;
2
+
3
+ import ::math::*;
4
+ import ::state::*;
5
+ import ::tex::*;
6
+ import ::anno::*;
7
+ using OmniUe4Function import *;
8
+ using OmniUe4Base import *;
9
+
10
+ export annotation sampler_color();
11
+ export annotation sampler_normal();
12
+ export annotation sampler_grayscale();
13
+ export annotation sampler_alpha();
14
+ export annotation sampler_masks();
15
+ export annotation sampler_distancefield();
16
+ export annotation dither_masked_off();
17
+ export annotation world_space_normal();
18
+
19
+ export material Num5acb437a3cf8ab2e120078b0(
20
+ uniform texture_2d Normal_Tex = texture_2d("./Textures/normal.png",::tex::gamma_linear)
21
+ [[
22
+ anno::display_name("Normal_Tex"),
23
+ anno::ui_order(32),
24
+ anno::in_group("Normal"),
25
+ sampler_normal()
26
+ ]],
27
+ float4 Normal_UVA = float4(1.0,1.0,0.0,0.0)
28
+ [[
29
+ anno::display_name("Normal_UVA"),
30
+ anno::ui_order(32),
31
+ anno::in_group("Normal")
32
+ ]],
33
+ float EmissiveIntensity = 0.0
34
+ [[
35
+ anno::display_name("EmissiveIntensity"),
36
+ anno::ui_order(32),
37
+ anno::in_group("EmissiveColor")
38
+ ]],
39
+ float IsEmissiveTex = 0.0
40
+ [[
41
+ anno::display_name("IsEmissiveTex"),
42
+ anno::in_group("EmissiveColor")
43
+ ]],
44
+ float4 Emissive_Color = float4(1.0,1.0,1.0,1.0)
45
+ [[
46
+ anno::display_name("Emissive_Color"),
47
+ anno::ui_order(32),
48
+ anno::in_group("EmissiveColor")
49
+ ]],
50
+ uniform texture_2d Emissive_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
51
+ [[
52
+ anno::display_name("Emissive_Tex"),
53
+ anno::ui_order(32),
54
+ anno::in_group("EmissiveColor"),
55
+ sampler_color()
56
+ ]],
57
+ float4 Emissive_UVA = float4(1.0,1.0,0.0,0.0)
58
+ [[
59
+ anno::display_name("Emissive_UVA"),
60
+ anno::ui_order(32),
61
+ anno::in_group("EmissiveColor")
62
+ ]],
63
+ float IsBaseColorTex = 0.0
64
+ [[
65
+ anno::display_name("IsBaseColorTex"),
66
+ anno::in_group("BaseColor")
67
+ ]],
68
+ float4 BaseColor_Color = float4(1.0,1.0,1.0,1.0)
69
+ [[
70
+ anno::display_name("BaseColor_Color"),
71
+ anno::ui_order(32),
72
+ anno::in_group("BaseColor")
73
+ ]],
74
+ uniform texture_2d BaseColor_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
75
+ [[
76
+ anno::display_name("BaseColor_Tex"),
77
+ anno::ui_order(32),
78
+ anno::in_group("BaseColor"),
79
+ sampler_color()
80
+ ]],
81
+ float4 BaseColor_UVA = float4(1.0,1.0,0.0,0.0)
82
+ [[
83
+ anno::display_name("BaseColor_UVA"),
84
+ anno::ui_order(32),
85
+ anno::in_group("BaseColor")
86
+ ]],
87
+ float IsMetallicTex = 0.0
88
+ [[
89
+ anno::display_name("IsMetallicTex"),
90
+ anno::in_group("Metallic")
91
+ ]],
92
+ float4 Metallic_Color = float4(0.0,0.0,0.0,1.0)
93
+ [[
94
+ anno::display_name("Metallic_Color"),
95
+ anno::ui_order(32),
96
+ anno::in_group("Metallic")
97
+ ]],
98
+ uniform texture_2d Metallic_Tex = texture_2d("./Textures/black.png",::tex::gamma_srgb)
99
+ [[
100
+ anno::display_name("Metallic_Tex"),
101
+ anno::ui_order(32),
102
+ anno::in_group("Metallic"),
103
+ sampler_color()
104
+ ]],
105
+ float4 Metallic_UVA = float4(1.0,1.0,0.0,0.0)
106
+ [[
107
+ anno::display_name("Metallic_UVA"),
108
+ anno::ui_order(32),
109
+ anno::in_group("Metallic")
110
+ ]],
111
+ float IsSpecularTex = 0.0
112
+ [[
113
+ anno::display_name("IsSpecularTex"),
114
+ anno::in_group("Specular")
115
+ ]],
116
+ float4 Specular_Color = float4(1.0,1.0,1.0,1.0)
117
+ [[
118
+ anno::display_name("Specular_Color"),
119
+ anno::ui_order(32),
120
+ anno::in_group("Specular")
121
+ ]],
122
+ uniform texture_2d Specular_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
123
+ [[
124
+ anno::display_name("Specular_Tex"),
125
+ anno::ui_order(32),
126
+ anno::in_group("Specular"),
127
+ sampler_color()
128
+ ]],
129
+ float4 Specular_UVA = float4(1.0,1.0,0.0,0.0)
130
+ [[
131
+ anno::display_name("Specular_UVA"),
132
+ anno::ui_order(32),
133
+ anno::in_group("Specular")
134
+ ]],
135
+ float IsGlossTex = 0.0
136
+ [[
137
+ anno::display_name("IsGlossTex"),
138
+ anno::in_group("Roughness")
139
+ ]],
140
+ float4 Gloss_Color = float4(0.1,0.1,0.1,1.0)
141
+ [[
142
+ anno::display_name("Gloss_Color"),
143
+ anno::ui_order(32),
144
+ anno::in_group("Roughness")
145
+ ]],
146
+ uniform texture_2d Gloss_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
147
+ [[
148
+ anno::display_name("Gloss_Tex"),
149
+ anno::ui_order(32),
150
+ anno::in_group("Roughness"),
151
+ sampler_color()
152
+ ]],
153
+ float4 Gloss_UVA = float4(1.0,1.0,0.0,0.0)
154
+ [[
155
+ anno::display_name("Gloss_UVA"),
156
+ anno::ui_order(32),
157
+ anno::in_group("Roughness")
158
+ ]],
159
+ float PolygonOffset = 0.0
160
+ [[
161
+ anno::display_name("PolygonOffset"),
162
+ anno::ui_order(32),
163
+ anno::in_group("WorldPosition")
164
+ ]],
165
+ int MaxTexCoordIndex = 3
166
+ [[
167
+ anno::hidden()
168
+ ]])
169
+ =
170
+ let {
171
+ float3 Local82 = ::camera_position();
172
+ 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));
173
+ float Local84 = math::dot(Local83, Local83);
174
+ float Local85 = math::sqrt(Local84);
175
+ float3 Local86 = (Local83 / Local85);
176
+ float3 Local87 = (Local86 * PolygonOffset);
177
+
178
+ float3 WorldPositionOffset_mdl = Local87;
179
+ float2 CustomizedUV0_mdl = float2(state::texture_coordinate(math::min(0,MaxTexCoordIndex)).x,1.0-state::texture_coordinate(math::min(0,MaxTexCoordIndex)).y);
180
+
181
+ float2 Local0 = (float2(0.5,0.5) * -1.0);
182
+ float Local1 = (CustomizedUV0_mdl.x * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).x);
183
+ float Local2 = (CustomizedUV0_mdl.y * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).y);
184
+ float2 Local3 = (Local0 + float2(Local1,Local2));
185
+ float Local4 = (3.141592 * -2.0);
186
+ float Local5 = (float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).z / Local4);
187
+ float Local6 = (Local5 * 6.283185);
188
+ float Local7 = math::cos(Local6);
189
+ float Local8 = math::sin(Local6);
190
+ float Local9 = (Local8 * -1.0);
191
+ float Local10 = math::dot(Local3, float2(Local7,Local9));
192
+ float Local11 = math::dot(Local3, float2(Local8,Local7));
193
+ float2 Local12 = (float2(0.5,0.5) + float2(Local10,Local11));
194
+ float4 Local13 = ::unpack_normal_map(tex::lookup_float4(Normal_Tex,float2(Local12.x,1.0-Local12.y),tex::wrap_repeat,tex::wrap_repeat));
195
+ float3 Local14 = ((math::abs(1.0 - 1.0) > 0.00001) ? (float3(0.0,0.0,0.0)) : float3(Local13.x,Local13.y,Local13.z));
196
+
197
+ float3 Normal_mdl = Local14;
198
+
199
+ float Local15 = (CustomizedUV0_mdl.x * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).x);
200
+ float Local16 = (CustomizedUV0_mdl.y * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).y);
201
+ float2 Local17 = (Local0 + float2(Local15,Local16));
202
+ float Local18 = (float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).z / Local4);
203
+ float Local19 = (Local18 * 6.283185);
204
+ float Local20 = math::cos(Local19);
205
+ float Local21 = math::sin(Local19);
206
+ float Local22 = (Local21 * -1.0);
207
+ float Local23 = math::dot(Local17, float2(Local20,Local22));
208
+ float Local24 = math::dot(Local17, float2(Local21,Local20));
209
+ float2 Local25 = (float2(0.5,0.5) + float2(Local23,Local24));
210
+ float4 Local26 = tex::lookup_float4(Emissive_Tex,float2(Local25.x,1.0-Local25.y),tex::wrap_repeat,tex::wrap_repeat);
211
+ 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));
212
+ float3 Local28 = (EmissiveIntensity * Local27);
213
+ float Local29 = (CustomizedUV0_mdl.x * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).x);
214
+ float Local30 = (CustomizedUV0_mdl.y * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).y);
215
+ float2 Local31 = (Local0 + float2(Local29,Local30));
216
+ float Local32 = (float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).z / Local4);
217
+ float Local33 = (Local32 * 6.283185);
218
+ float Local34 = math::cos(Local33);
219
+ float Local35 = math::sin(Local33);
220
+ float Local36 = (Local35 * -1.0);
221
+ float Local37 = math::dot(Local31, float2(Local34,Local36));
222
+ float Local38 = math::dot(Local31, float2(Local35,Local34));
223
+ float2 Local39 = (float2(0.5,0.5) + float2(Local37,Local38));
224
+ float4 Local40 = tex::lookup_float4(BaseColor_Tex,float2(Local39.x,1.0-Local39.y),tex::wrap_repeat,tex::wrap_repeat);
225
+ 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));
226
+ float Local42 = (CustomizedUV0_mdl.x * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).x);
227
+ float Local43 = (CustomizedUV0_mdl.y * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).y);
228
+ float2 Local44 = (Local0 + float2(Local42,Local43));
229
+ float Local45 = (float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).z / Local4);
230
+ float Local46 = (Local45 * 6.283185);
231
+ float Local47 = math::cos(Local46);
232
+ float Local48 = math::sin(Local46);
233
+ float Local49 = (Local48 * -1.0);
234
+ float Local50 = math::dot(Local44, float2(Local47,Local49));
235
+ float Local51 = math::dot(Local44, float2(Local48,Local47));
236
+ float2 Local52 = (float2(0.5,0.5) + float2(Local50,Local51));
237
+ float4 Local53 = tex::lookup_float4(Metallic_Tex,float2(Local52.x,1.0-Local52.y),tex::wrap_repeat,tex::wrap_repeat);
238
+ 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));
239
+ float Local55 = (CustomizedUV0_mdl.x * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).x);
240
+ float Local56 = (CustomizedUV0_mdl.y * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).y);
241
+ float2 Local57 = (Local0 + float2(Local55,Local56));
242
+ float Local58 = (float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).z / Local4);
243
+ float Local59 = (Local58 * 6.283185);
244
+ float Local60 = math::cos(Local59);
245
+ float Local61 = math::sin(Local59);
246
+ float Local62 = (Local61 * -1.0);
247
+ float Local63 = math::dot(Local57, float2(Local60,Local62));
248
+ float Local64 = math::dot(Local57, float2(Local61,Local60));
249
+ float2 Local65 = (float2(0.5,0.5) + float2(Local63,Local64));
250
+ float4 Local66 = tex::lookup_float4(Specular_Tex,float2(Local65.x,1.0-Local65.y),tex::wrap_repeat,tex::wrap_repeat);
251
+ 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));
252
+ float Local68 = (CustomizedUV0_mdl.x * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).x);
253
+ float Local69 = (CustomizedUV0_mdl.y * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).y);
254
+ float2 Local70 = (Local0 + float2(Local68,Local69));
255
+ float Local71 = (float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).z / Local4);
256
+ float Local72 = (Local71 * 6.283185);
257
+ float Local73 = math::cos(Local72);
258
+ float Local74 = math::sin(Local72);
259
+ float Local75 = (Local74 * -1.0);
260
+ float Local76 = math::dot(Local70, float2(Local73,Local75));
261
+ float Local77 = math::dot(Local70, float2(Local74,Local73));
262
+ float2 Local78 = (float2(0.5,0.5) + float2(Local76,Local77));
263
+ float4 Local79 = tex::lookup_float4(Gloss_Tex,float2(Local78.x,1.0-Local78.y),tex::wrap_repeat,tex::wrap_repeat);
264
+ 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));
265
+ float3 Local81 = (1.0 - Local80);
266
+
267
+ float3 EmissiveColor_mdl = Local28;
268
+ float OpacityMask_mdl = 1.0;
269
+ float3 BaseColor_mdl = Local41;
270
+ float Metallic_mdl = Local54.x;
271
+ float Specular_mdl = Local67.x;
272
+ float Roughness_mdl = Local81.x;
273
+
274
+ } in
275
+ ::OmniUe4Base(
276
+ base_color: BaseColor_mdl,
277
+ metallic: Metallic_mdl,
278
+ roughness: Roughness_mdl,
279
+ specular: Specular_mdl,
280
+ normal: Normal_mdl,
281
+ opacity: OpacityMask_mdl,
282
+ emissive_color: EmissiveColor_mdl,
283
+ displacement: WorldPositionOffset_mdl,
284
+ two_sided: false);
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/OmniUe4Base.mdl ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***************************************************************************************************
2
+ * Copyright 2020 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions
6
+ * are met:
7
+ * * Redistributions of source code must retain the above copyright
8
+ * notice, this list of conditions and the following disclaimer.
9
+ * * Redistributions in binary form must reproduce the above copyright
10
+ * notice, this list of conditions and the following disclaimer in the
11
+ * documentation and/or other materials provided with the distribution.
12
+ * * Neither the name of NVIDIA CORPORATION nor the names of its
13
+ * contributors may be used to endorse or promote products derived
14
+ * from this software without specific prior written permission.
15
+ *
16
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ **************************************************************************************************/
28
+
29
+ //* 1.0.0 - first version
30
+ //* 1.0.1 - merge unlit template
31
+ //* 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
32
+ //* 1.0.3 - UE4 normal mapping: Geometry normal shouldn't be changed
33
+ //* 1.0.4 - using absolute import paths when importing standard modules
34
+
35
+ mdl 1.3;
36
+
37
+ import ::df::*;
38
+ import ::state::*;
39
+ import ::math::*;
40
+ import ::tex::*;
41
+ import ::anno::*;
42
+
43
+ float emissive_multiplier()
44
+ [[
45
+ anno::description("the multiplier to convert UE4 emissive to raw data"),
46
+ anno::noinline()
47
+ ]]
48
+ {
49
+ return 20.0f * 128.0f;
50
+ }
51
+
52
+ float3 tangent_space_normal(
53
+ float3 normal = float3(0.0,0.0,1.0),
54
+ float3 tangent_u = state::texture_tangent_u(0),
55
+ float3 tangent_v = state::texture_tangent_v(0)
56
+ )
57
+ [[
58
+ anno::description("Interprets the vector in tangent space"),
59
+ anno::noinline()
60
+ ]]
61
+ {
62
+ return math::normalize(
63
+ tangent_u * normal.x - /* flip_tangent_v */
64
+ tangent_v * normal.y +
65
+ state::normal() * (normal.z));
66
+ }
67
+
68
+ float3 world_space_normal(
69
+ float3 normal = float3(0.0,0.0,1.0),
70
+ float3 tangent_u = state::texture_tangent_u(0),
71
+ float3 tangent_v = state::texture_tangent_v(0)
72
+ )
73
+ [[
74
+ anno::description("Interprets the vector in world space"),
75
+ anno::noinline()
76
+ ]]
77
+ {
78
+ return tangent_space_normal(
79
+ math::normalize(
80
+ normal.x * float3(tangent_u.x, tangent_v.x, state::normal().x) -
81
+ normal.y * float3(tangent_u.y, tangent_v.y, state::normal().y) +
82
+ normal.z * float3(tangent_u.z, tangent_v.z, state::normal().z)),
83
+ tangent_u,
84
+ tangent_v
85
+ );
86
+ }
87
+
88
+ export material OmniUe4Base(
89
+ float3 base_color = float3(0.0, 0.0, 0.0),
90
+ float metallic = 0.0,
91
+ float roughness = 0.5,
92
+ float specular = 0.5,
93
+ float3 normal = float3(0.0,0.0,1.0),
94
+ float clearcoat_weight = 0.0,
95
+ float clearcoat_roughness = 0.0,
96
+ float3 clearcoat_normal = float3(0.0,0.0,1.0),
97
+ uniform bool enable_opacity = true,
98
+ float opacity = 1.0,
99
+ float3 emissive_color = float3(0.0, 0.0, 0.0),
100
+ float3 displacement = float3(0.0),
101
+ uniform bool is_tangent_space_normal = true,
102
+ uniform bool two_sided = false,
103
+ uniform bool is_unlit = false
104
+ )
105
+ [[
106
+ anno::display_name("Omni UE4 Base"),
107
+ anno::description("Omni UE4 Base, supports UE4 default lit and clearcoat shading model"),
108
+ anno::version( 1, 0, 0),
109
+ anno::author("NVIDIA CORPORATION"),
110
+ anno::key_words(string[]("omni", "UE4", "omniverse", "lit", "clearcoat", "generic"))
111
+ ]]
112
+ = let {
113
+ color final_base_color = math::saturate(base_color);
114
+ float final_metallic = math::saturate(metallic);
115
+ float final_roughness = math::saturate(roughness);
116
+ float final_specular = math::saturate(specular);
117
+ color final_emissive_color = math::max(emissive_color, 0.0f) * emissive_multiplier(); /*factor for converting ue4 emissive to raw value*/
118
+ float final_clearcoat_weight = math::saturate(clearcoat_weight);
119
+ float final_clearcoat_roughness = math::saturate(clearcoat_roughness);
120
+ float3 final_normal = math::normalize(normal);
121
+ float3 final_clearcoat_normal = math::normalize(clearcoat_normal);
122
+
123
+ // - compute final roughness by squaring the "roughness" parameter
124
+ float alpha = final_roughness * final_roughness;
125
+ // reduce the reflectivity at grazing angles to avoid "dark edges" for high roughness due to the layering
126
+ float grazing_refl = math::max((1.0 - final_roughness), 0.0);
127
+
128
+ float3 the_normal = is_unlit ? state::normal() :
129
+ (is_tangent_space_normal ?
130
+ tangent_space_normal(
131
+ normal: final_normal,
132
+ tangent_u: state::texture_tangent_u(0),
133
+ tangent_v: state::texture_tangent_v(0)
134
+ ) : world_space_normal(
135
+ normal: final_normal,
136
+ tangent_u: state::texture_tangent_u(0),
137
+ tangent_v: state::texture_tangent_v(0)
138
+ ));
139
+
140
+ // for the dielectric component we layer the glossy component on top of the diffuse one,
141
+ // the glossy layer has no color tint
142
+
143
+ bsdf dielectric_component = df::custom_curve_layer(
144
+ weight: final_specular,
145
+ normal_reflectivity: 0.08,
146
+ grazing_reflectivity: grazing_refl,
147
+ layer: df::microfacet_ggx_smith_bsdf(roughness_u: alpha),
148
+ base: df::diffuse_reflection_bsdf(tint: final_base_color),
149
+ normal: the_normal);
150
+
151
+ // the metallic component doesn't have a diffuse component, it's only glossy
152
+ // base_color is applied to tint it
153
+ bsdf metallic_component = df::microfacet_ggx_smith_bsdf(tint: final_base_color, roughness_u: alpha);
154
+
155
+ // final BSDF is a linear blend between dielectric and metallic component
156
+ bsdf dielectric_metal_mix =
157
+ df::normalized_mix(
158
+ components:
159
+ df::bsdf_component[](
160
+ df::bsdf_component(
161
+ component: metallic_component,
162
+ weight: final_metallic),
163
+ df::bsdf_component(
164
+ component: dielectric_component,
165
+ weight: 1.0-final_metallic)
166
+ )
167
+ );
168
+
169
+ // clearcoat layer
170
+ float clearcoat_grazing_refl = math::max((1.0 - final_clearcoat_roughness), 0.0);
171
+ float clearcoat_alpha = final_clearcoat_roughness * final_clearcoat_roughness;
172
+
173
+ float3 the_clearcoat_normal = is_tangent_space_normal ? tangent_space_normal(
174
+ normal: final_clearcoat_normal,
175
+ tangent_u: state::texture_tangent_u(0),
176
+ tangent_v: state::texture_tangent_v(0)
177
+ ) : world_space_normal(
178
+ normal: final_clearcoat_normal,
179
+ tangent_u: state::texture_tangent_u(0),
180
+ tangent_v: state::texture_tangent_v(0)
181
+ );
182
+
183
+
184
+ bsdf clearcoat =
185
+ df::custom_curve_layer(
186
+ base: df::weighted_layer(
187
+ layer: dielectric_metal_mix,
188
+ weight: 1.0,
189
+ normal: final_clearcoat_weight == 0.0 ? state::normal() : the_normal
190
+ ),
191
+ layer: df::microfacet_ggx_smith_bsdf(
192
+ roughness_u: clearcoat_alpha,
193
+ tint: color(1.0)
194
+ ),
195
+ normal_reflectivity: 0.04,
196
+ grazing_reflectivity: clearcoat_grazing_refl,
197
+ normal: the_clearcoat_normal,
198
+ weight: final_clearcoat_weight
199
+ );
200
+ bsdf surface = is_unlit ? bsdf() : clearcoat;
201
+ }
202
+ in material(
203
+ thin_walled: two_sided, // Graphene?
204
+ surface: material_surface(
205
+ scattering: surface,
206
+ emission:
207
+ material_emission (
208
+ emission: df::diffuse_edf (),
209
+ intensity: final_emissive_color
210
+ )
211
+ ),
212
+ backface: material_surface(
213
+ emission:
214
+ material_emission (
215
+ emission: df::diffuse_edf (),
216
+ intensity: final_emissive_color
217
+ )
218
+ ),
219
+ geometry: material_geometry(
220
+ displacement: displacement,
221
+ normal: final_clearcoat_weight == 0.0 ? the_normal : state::normal(),
222
+ cutout_opacity: enable_opacity ? opacity : 1.0
223
+ )
224
+ );
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/Materials/OmniUe4Function.mdl ADDED
@@ -0,0 +1,1413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***************************************************************************************************
2
+ * Copyright 2020 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions
6
+ * are met:
7
+ * * Redistributions of source code must retain the above copyright
8
+ * notice, this list of conditions and the following disclaimer.
9
+ * * Redistributions in binary form must reproduce the above copyright
10
+ * notice, this list of conditions and the following disclaimer in the
11
+ * documentation and/or other materials provided with the distribution.
12
+ * * Neither the name of NVIDIA CORPORATION nor the names of its
13
+ * contributors may be used to endorse or promote products derived
14
+ * from this software without specific prior written permission.
15
+ *
16
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ **************************************************************************************************/
28
+
29
+ //* 1.0.1 - using absolute import paths when importing standard modules
30
+
31
+ mdl 1.6;
32
+
33
+ import ::df::*;
34
+ import ::state::*;
35
+ import ::math::*;
36
+ import ::tex::*;
37
+ import ::anno::*;
38
+
39
+
40
+ export float3 convert_to_left_hand(float3 vec3, uniform bool up_z = true, uniform bool is_position = true)
41
+ [[
42
+ anno::description("convert from RH to LH"),
43
+ anno::noinline()
44
+ ]]
45
+ {
46
+ float4x4 ZupConversion = float4x4(
47
+ 1.0f, 0.0f, 0.0f, 0.0f,
48
+ 0.0f, -1.0f, 0.0f, 0.0f,
49
+ 0.0f, 0.0f, 1.0f, 0.0f,
50
+ 0.0f, 0.0f, 0.0f, 1.0f
51
+ );
52
+
53
+ float4x4 YupConversion = float4x4(
54
+ 1.0f, 0.0f, 0.0f, 0.0f,
55
+ 0.0f, 0.0f, 1.0f, 0.0f,
56
+ 0.0f, 1.0f, 0.0f, 0.0f,
57
+ 0.0f, 0.0f, 0.0f, 1.0f
58
+ );
59
+
60
+ float4 vec4 = float4(vec3.x, vec3.y, vec3.z, is_position ? 1.0f : 0.0f);
61
+
62
+ vec4 = vec4 * (up_z ? ZupConversion : YupConversion);
63
+
64
+ return float3(vec4.x, vec4.y, vec4.z);
65
+ }
66
+
67
+ export float3 transform_vector_from_tangent_to_world(float3 vector,
68
+ uniform bool up_z = true,
69
+ float3 tangent_u = state::texture_tangent_u(0),
70
+ float3 tangent_v = state::texture_tangent_v(0))
71
+ [[
72
+ anno::description("Transform vector from tangent space to world space"),
73
+ anno::noinline()
74
+ ]]
75
+ {
76
+ /* flip_tangent_v */
77
+ return convert_to_left_hand(
78
+ tangent_u * vector.x - tangent_v * vector.y + state::normal() * vector.z,
79
+ up_z, false);
80
+ }
81
+
82
+ export float3 transform_vector_from_world_to_tangent(float3 vector,
83
+ uniform bool up_z = true,
84
+ float3 tangent_u = state::texture_tangent_u(0),
85
+ float3 tangent_v = state::texture_tangent_v(0))
86
+ [[
87
+ anno::description("Transform vector from world space to tangent space"),
88
+ anno::noinline()
89
+ ]]
90
+ {
91
+ float3 vecRH = convert_to_left_hand(vector, up_z, false);
92
+ /* flip_tangent_v */
93
+ return vecRH.x * float3(tangent_u.x, -tangent_v.x, state::normal().x) +
94
+ vecRH.y * float3(tangent_u.y, -tangent_v.y, state::normal().y) +
95
+ vecRH.z * float3(tangent_u.z, -tangent_v.z, state::normal().z);
96
+ }
97
+
98
+ export float4 unpack_normal_map(
99
+ float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0)
100
+ )
101
+ [[
102
+ anno::description("Unpack a normal stored in a normal map"),
103
+ anno::noinline()
104
+ ]]
105
+ {
106
+ float2 normal_xy = float2(texture_sample.x, texture_sample.y);
107
+
108
+ normal_xy = normal_xy * float2(2.0,2.0) - float2(1.0,1.0);
109
+ float normal_z = math::sqrt( math::saturate( 1.0 - math::dot( normal_xy, normal_xy ) ) );
110
+ return float4( normal_xy.x, normal_xy.y, normal_z, 1.0 );
111
+ }
112
+
113
+ // for get color value from normal.
114
+ export float4 pack_normal_map(
115
+ float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0)
116
+ )
117
+ [[
118
+ anno::description("Pack to color from a normal")
119
+ ]]
120
+ {
121
+ float2 return_xy = float2(texture_sample.x, texture_sample.y);
122
+
123
+ return_xy = (return_xy + float2(1.0,1.0)) / float2(2.0,2.0);
124
+
125
+ return float4( return_xy.x, return_xy.y, 0.0, 1.0 );
126
+ }
127
+
128
+ export float4 greyscale_texture_lookup(
129
+ float4 texture_sample = float4(0.0, 0.0, 0.0, 1.0)
130
+ )
131
+ [[
132
+ anno::description("Sampling a greyscale texture"),
133
+ anno::noinline()
134
+ ]]
135
+ {
136
+ return float4(texture_sample.x, texture_sample.x, texture_sample.x, texture_sample.x);
137
+ }
138
+
139
+ export float3 pixel_normal_world_space(uniform bool up_z = true)
140
+ [[
141
+ anno::description("Pixel normal in world space"),
142
+ anno::noinline()
143
+ ]]
144
+ {
145
+ return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
146
+ }
147
+
148
+ export float3 vertex_normal_world_space(uniform bool up_z = true)
149
+ [[
150
+ anno::description("Vertex normal in world space"),
151
+ anno::noinline()
152
+ ]]
153
+ {
154
+ return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
155
+ }
156
+
157
+ export float3 landscape_normal_world_space(uniform bool up_z = true)
158
+ [[
159
+ anno::description("Landscape normal in world space")
160
+ ]]
161
+ {
162
+ float3 normalFromNormalmap = math::floor((::vertex_normal_world_space(up_z) * 0.5 + 0.5) * 255.0) / 255.0 * 2.0 - 1.0;
163
+
164
+ float2 normalXY = float2(normalFromNormalmap.x, normalFromNormalmap.y);
165
+ return float3(normalXY.x, normalXY.y, math::sqrt(math::saturate(1.0 - math::dot(normalXY, normalXY))));
166
+ }
167
+
168
+ // Different implementation specific between mdl and hlsl for smoothstep
169
+ export float smoothstep(float a, float b, float l)
170
+ {
171
+ if (a < b)
172
+ {
173
+ return math::smoothstep(a, b, l);
174
+ }
175
+ else if (a > b)
176
+ {
177
+ return 1.0 - math::smoothstep(b, a, l);
178
+ }
179
+ else
180
+ {
181
+ return l <= a ? 0.0 : 1.0;
182
+ }
183
+ }
184
+
185
+ export float2 smoothstep(float2 a, float2 b, float2 l)
186
+ {
187
+ return float2(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y));
188
+ }
189
+
190
+ export float3 smoothstep(float3 a, float3 b, float3 l)
191
+ {
192
+ return float3(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z));
193
+ }
194
+
195
+ export float4 smoothstep(float4 a, float4 b, float4 l)
196
+ {
197
+ 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));
198
+ }
199
+
200
+ export float2 smoothstep(float2 a, float2 b, float l)
201
+ {
202
+ return float2(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l));
203
+ }
204
+
205
+ export float3 smoothstep(float3 a, float3 b, float l)
206
+ {
207
+ return float3(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l));
208
+ }
209
+
210
+ export float4 smoothstep(float4 a, float4 b, float l)
211
+ {
212
+ 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));
213
+ }
214
+
215
+ export float2 smoothstep(float a, float b, float2 l)
216
+ {
217
+ return float2(smoothstep(a, b, l.x), smoothstep(a, b, l.y));
218
+ }
219
+
220
+ export float3 smoothstep(float a, float b, float3 l)
221
+ {
222
+ return float3(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z));
223
+ }
224
+
225
+ export float4 smoothstep(float a, float b, float4 l)
226
+ {
227
+ return float4(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z), smoothstep(a, b, l.w));
228
+ }
229
+
230
+ //------------------ Random from UE4 -----------------------
231
+ float length2(float3 v)
232
+ {
233
+ return math::dot(v, v);
234
+ }
235
+
236
+ float3 GetPerlinNoiseGradientTextureAt(uniform texture_2d PerlinNoiseGradientTexture, float3 v)
237
+ {
238
+ const float2 ZShear = float2(17.0f, 89.0f);
239
+
240
+ float2 OffsetA = v.z * ZShear;
241
+ float2 TexA = (float2(v.x, v.y) + OffsetA + 0.5f) / 128.0f;
242
+ float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA.x,1.0-TexA.y),tex::wrap_repeat,tex::wrap_repeat);
243
+ return float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z) * 2.0 - 1.0;
244
+ }
245
+
246
+ float3 SkewSimplex(float3 In)
247
+ {
248
+ return In + math::dot(In, float3(1.0 / 3.0f) );
249
+ }
250
+ float3 UnSkewSimplex(float3 In)
251
+ {
252
+ return In - math::dot(In, float3(1.0 / 6.0f) );
253
+ }
254
+
255
+ // 3D random number generator inspired by PCGs (permuted congruential generator)
256
+ // Using a **simple** Feistel cipher in place of the usual xor shift permutation step
257
+ // @param v = 3D integer coordinate
258
+ // @return three elements w/ 16 random bits each (0-0xffff).
259
+ // ~8 ALU operations for result.x (7 mad, 1 >>)
260
+ // ~10 ALU operations for result.xy (8 mad, 2 >>)
261
+ // ~12 ALU operations for result.xyz (9 mad, 3 >>)
262
+
263
+ //TODO: uint3
264
+ int3 Rand3DPCG16(int3 p)
265
+ {
266
+ // taking a signed int then reinterpreting as unsigned gives good behavior for negatives
267
+ //TODO: uint3
268
+ int3 v = int3(p);
269
+
270
+ // Linear congruential step. These LCG constants are from Numerical Recipies
271
+ // For additional #'s, PCG would do multiple LCG steps and scramble each on output
272
+ // So v here is the RNG state
273
+ v = v * 1664525 + 1013904223;
274
+
275
+ // PCG uses xorshift for the final shuffle, but it is expensive (and cheap
276
+ // versions of xorshift have visible artifacts). Instead, use simple MAD Feistel steps
277
+ //
278
+ // Feistel ciphers divide the state into separate parts (usually by bits)
279
+ // then apply a series of permutation steps one part at a time. The permutations
280
+ // use a reversible operation (usually ^) to part being updated with the result of
281
+ // a permutation function on the other parts and the key.
282
+ //
283
+ // In this case, I'm using v.x, v.y and v.z as the parts, using + instead of ^ for
284
+ // the combination function, and just multiplying the other two parts (no key) for
285
+ // the permutation function.
286
+ //
287
+ // That gives a simple mad per round.
288
+ v.x += v.y*v.z;
289
+ v.y += v.z*v.x;
290
+ v.z += v.x*v.y;
291
+ v.x += v.y*v.z;
292
+ v.y += v.z*v.x;
293
+ v.z += v.x*v.y;
294
+
295
+ // only top 16 bits are well shuffled
296
+ return v >> 16;
297
+ }
298
+
299
+ // Wraps noise for tiling texture creation
300
+ // @param v = unwrapped texture parameter
301
+ // @param bTiling = true to tile, false to not tile
302
+ // @param RepeatSize = number of units before repeating
303
+ // @return either original or wrapped coord
304
+ float3 NoiseTileWrap(float3 v, bool bTiling, float RepeatSize)
305
+ {
306
+ return bTiling ? (math::frac(v / RepeatSize) * RepeatSize) : v;
307
+ }
308
+
309
+ // Evaluate polynomial to get smooth transitions for Perlin noise
310
+ // only needed by Perlin functions in this file
311
+ // scalar(per component): 2 add, 5 mul
312
+ float4 PerlinRamp(float4 t)
313
+ {
314
+ return t * t * t * (t * (t * 6 - 15) + 10);
315
+ }
316
+
317
+ // Blum-Blum-Shub-inspired pseudo random number generator
318
+ // http://www.umbc.edu/~olano/papers/mNoise.pdf
319
+ // real BBS uses ((s*s) mod M) with bignums and M as the product of two huge Blum primes
320
+ // instead, we use a single prime M just small enough not to overflow
321
+ // note that the above paper used 61, which fits in a half, but is unusably bad
322
+ // @param Integer valued floating point seed
323
+ // @return random number in range [0,1)
324
+ // ~8 ALU operations (5 *, 3 frac)
325
+ float RandBBSfloat(float seed)
326
+ {
327
+ float BBS_PRIME24 = 4093.0;
328
+ float s = math::frac(seed / BBS_PRIME24);
329
+ s = math::frac(s * s * BBS_PRIME24);
330
+ s = math::frac(s * s * BBS_PRIME24);
331
+ return s;
332
+ }
333
+
334
+ // Modified noise gradient term
335
+ // @param seed - random seed for integer lattice position
336
+ // @param offset - [-1,1] offset of evaluation point from lattice point
337
+ // @return gradient direction (xyz) and contribution (w) from this lattice point
338
+ float4 MGradient(int seed, float3 offset)
339
+ {
340
+ //TODO uint
341
+ int rand = Rand3DPCG16(int3(seed,0,0)).x;
342
+ int3 MGradientMask = int3(0x8000, 0x4000, 0x2000);
343
+ float3 MGradientScale = float3(1.0 / 0x4000, 1.0 / 0x2000, 1.0 / 0x1000);
344
+ float3 direction = float3(int3(rand, rand, rand) & MGradientMask) * MGradientScale - 1;
345
+ return float4(direction.x, direction.y, direction.z, math::dot(direction, offset));
346
+ }
347
+
348
+ // compute Perlin and related noise corner seed values
349
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
350
+ // @param bTiling = true to return seed values for a repeating noise pattern
351
+ // @param RepeatSize = integer units before tiling in each dimension
352
+ // @param seed000-seed111 = hash function seeds for the eight corners
353
+ // @return fractional part of v
354
+ struct SeedValue
355
+ {
356
+ float3 fv = float3(0);
357
+ float seed000 = 0;
358
+ float seed001 = 0;
359
+ float seed010 = 0;
360
+ float seed011 = 0;
361
+ float seed100 = 0;
362
+ float seed101 = 0;
363
+ float seed110 = 0;
364
+ float seed111 = 0;
365
+ };
366
+
367
+ SeedValue NoiseSeeds(float3 v, bool bTiling, float RepeatSize)
368
+ {
369
+ SeedValue seeds;
370
+ seeds.fv = math::frac(v);
371
+ float3 iv = math::floor(v);
372
+
373
+ const float3 primes = float3(19, 47, 101);
374
+
375
+ if (bTiling)
376
+ { // can't algebraically combine with primes
377
+ seeds.seed000 = math::dot(primes, NoiseTileWrap(iv, true, RepeatSize));
378
+ seeds.seed100 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 0), true, RepeatSize));
379
+ seeds.seed010 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 0), true, RepeatSize));
380
+ seeds.seed110 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 0), true, RepeatSize));
381
+ seeds.seed001 = math::dot(primes, NoiseTileWrap(iv + float3(0, 0, 1), true, RepeatSize));
382
+ seeds.seed101 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 1), true, RepeatSize));
383
+ seeds.seed011 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 1), true, RepeatSize));
384
+ seeds.seed111 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 1), true, RepeatSize));
385
+ }
386
+ else
387
+ { // get to combine offsets with multiplication by primes in this case
388
+ seeds.seed000 = math::dot(iv, primes);
389
+ seeds.seed100 = seeds.seed000 + primes.x;
390
+ seeds.seed010 = seeds.seed000 + primes.y;
391
+ seeds.seed110 = seeds.seed100 + primes.y;
392
+ seeds.seed001 = seeds.seed000 + primes.z;
393
+ seeds.seed101 = seeds.seed100 + primes.z;
394
+ seeds.seed011 = seeds.seed010 + primes.z;
395
+ seeds.seed111 = seeds.seed110 + primes.z;
396
+ }
397
+
398
+ return seeds;
399
+ }
400
+
401
+ struct SimplexWeights
402
+ {
403
+ float4 Result = float4(0);
404
+ float3 PosA = float3(0);
405
+ float3 PosB = float3(0);
406
+ float3 PosC = float3(0);
407
+ float3 PosD = float3(0);
408
+ };
409
+
410
+ // Computed weights and sample positions for simplex interpolation
411
+ // @return float4(a,b,c, d) Barycentric coordinate defined as Filtered = Tex(PosA) * a + Tex(PosB) * b + Tex(PosC) * c + Tex(PosD) * d
412
+ SimplexWeights ComputeSimplexWeights3D(float3 OrthogonalPos)
413
+ {
414
+ SimplexWeights weights;
415
+ float3 OrthogonalPosFloor = math::floor(OrthogonalPos);
416
+
417
+ weights.PosA = OrthogonalPosFloor;
418
+ weights.PosB = weights.PosA + float3(1, 1, 1);
419
+
420
+ OrthogonalPos -= OrthogonalPosFloor;
421
+
422
+ float Largest = math::max(OrthogonalPos.x, math::max(OrthogonalPos.y, OrthogonalPos.z));
423
+ float Smallest = math::min(OrthogonalPos.x, math::min(OrthogonalPos.y, OrthogonalPos.z));
424
+
425
+ weights.PosC = weights.PosA + float3(Largest == OrthogonalPos.x, Largest == OrthogonalPos.y, Largest == OrthogonalPos.z);
426
+ weights.PosD = weights.PosA + float3(Smallest != OrthogonalPos.x, Smallest != OrthogonalPos.y, Smallest != OrthogonalPos.z);
427
+
428
+ float RG = OrthogonalPos.x - OrthogonalPos.y;
429
+ float RB = OrthogonalPos.x - OrthogonalPos.z;
430
+ float GB = OrthogonalPos.y - OrthogonalPos.z;
431
+
432
+ weights.Result.z =
433
+ math::min(math::max(0, RG), math::max(0, RB)) // X
434
+ + math::min(math::max(0, -RG), math::max(0, GB)) // Y
435
+ + math::min(math::max(0, -RB), math::max(0, -GB)); // Z
436
+
437
+ weights.Result.w =
438
+ math::min(math::max(0, -RG), math::max(0, -RB)) // X
439
+ + math::min(math::max(0, RG), math::max(0, -GB)) // Y
440
+ + math::min(math::max(0, RB), math::max(0, GB)); // Z
441
+
442
+ weights.Result.y = Smallest;
443
+ weights.Result.x = 1.0f - weights.Result.y - weights.Result.z - weights.Result.w;
444
+
445
+ return weights;
446
+ }
447
+
448
+ // filtered 3D gradient simple noise (few texture lookups, high quality)
449
+ // @param v >0
450
+ // @return random number in the range -1 .. 1
451
+ float SimplexNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 EvalPos)
452
+ {
453
+ float3 OrthogonalPos = SkewSimplex(EvalPos);
454
+
455
+ SimplexWeights Weights = ComputeSimplexWeights3D(OrthogonalPos);
456
+
457
+ // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 32 bit)
458
+ float3 A = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosA);
459
+ float3 B = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosB);
460
+ float3 C = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosC);
461
+ float3 D = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosD);
462
+
463
+ Weights.PosA = UnSkewSimplex(Weights.PosA);
464
+ Weights.PosB = UnSkewSimplex(Weights.PosB);
465
+ Weights.PosC = UnSkewSimplex(Weights.PosC);
466
+ Weights.PosD = UnSkewSimplex(Weights.PosD);
467
+
468
+ float DistanceWeight;
469
+
470
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosA)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
471
+ float a = math::dot(A, EvalPos - Weights.PosA) * DistanceWeight;
472
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosB)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
473
+ float b = math::dot(B, EvalPos - Weights.PosB) * DistanceWeight;
474
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosC)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
475
+ float c = math::dot(C, EvalPos - Weights.PosC) * DistanceWeight;
476
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosD)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
477
+ float d = math::dot(D, EvalPos - Weights.PosD) * DistanceWeight;
478
+
479
+ return 32 * (a + b + c + d);
480
+ }
481
+
482
+ // filtered 3D noise, can be optimized
483
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
484
+ // @param bTiling = repeat noise pattern
485
+ // @param RepeatSize = integer units before tiling in each dimension
486
+ // @return random number in the range -1 .. 1
487
+ float GradientNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 v, bool bTiling, float RepeatSize)
488
+ {
489
+ bTiling = true;
490
+ float3 fv = math::frac(v);
491
+ float3 iv0 = NoiseTileWrap(math::floor(v), bTiling, RepeatSize);
492
+ float3 iv1 = NoiseTileWrap(iv0 + 1, bTiling, RepeatSize);
493
+
494
+ const int2 ZShear = int2(17, 89);
495
+
496
+ float2 OffsetA = iv0.z * ZShear;
497
+ float2 OffsetB = OffsetA + ZShear; // non-tiling, use relative offset
498
+ if (bTiling) // tiling, have to compute from wrapped coordinates
499
+ {
500
+ OffsetB = iv1.z * ZShear;
501
+ }
502
+
503
+ // Texture size scale factor
504
+ float ts = 1 / 128.0f;
505
+
506
+ // texture coordinates for iv0.xy, as offset for both z slices
507
+ float2 TexA0 = (float2(iv0.x, iv0.y) + OffsetA + 0.5f) * ts;
508
+ float2 TexB0 = (float2(iv0.x, iv0.y) + OffsetB + 0.5f) * ts;
509
+
510
+ // texture coordinates for iv1.xy, as offset for both z slices
511
+ float2 TexA1 = TexA0 + ts; // for non-tiling, can compute relative to existing coordinates
512
+ float2 TexB1 = TexB0 + ts;
513
+ if (bTiling) // for tiling, need to compute from wrapped coordinates
514
+ {
515
+ TexA1 = (float2(iv1.x, iv1.y) + OffsetA + 0.5f) * ts;
516
+ TexB1 = (float2(iv1.x, iv1.y) + OffsetB + 0.5f) * ts;
517
+ }
518
+
519
+
520
+ // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 8, 16 or 32 bit)
521
+ float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat);
522
+ float3 PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
523
+ float3 A = PerlinNoiseColor * 2 - 1;
524
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat);
525
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
526
+ float3 B = PerlinNoiseColor * 2 - 1;
527
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat);
528
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
529
+ float3 C = PerlinNoiseColor * 2 - 1;
530
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat);
531
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
532
+ float3 D = PerlinNoiseColor * 2 - 1;
533
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat);
534
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
535
+ float3 E = PerlinNoiseColor * 2 - 1;
536
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat);
537
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
538
+ float3 F = PerlinNoiseColor * 2 - 1;
539
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat);
540
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
541
+ float3 G = PerlinNoiseColor * 2 - 1;
542
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat);
543
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
544
+ float3 H = PerlinNoiseColor * 2 - 1;
545
+
546
+ float a = math::dot(A, fv - float3(0, 0, 0));
547
+ float b = math::dot(B, fv - float3(1, 0, 0));
548
+ float c = math::dot(C, fv - float3(0, 1, 0));
549
+ float d = math::dot(D, fv - float3(1, 1, 0));
550
+ float e = math::dot(E, fv - float3(0, 0, 1));
551
+ float f = math::dot(F, fv - float3(1, 0, 1));
552
+ float g = math::dot(G, fv - float3(0, 1, 1));
553
+ float h = math::dot(H, fv - float3(1, 1, 1));
554
+
555
+ float4 Weights = PerlinRamp(math::frac(float4(fv.x, fv.y, fv.z, 0)));
556
+
557
+ float i = math::lerp(math::lerp(a, b, Weights.x), math::lerp(c, d, Weights.x), Weights.y);
558
+ float j = math::lerp(math::lerp(e, f, Weights.x), math::lerp(g, h, Weights.x), Weights.y);
559
+
560
+ return math::lerp(i, j, Weights.z);
561
+ }
562
+
563
+ // @return random number in the range -1 .. 1
564
+ // scalar: 6 frac, 31 mul/mad, 15 add,
565
+ float FastGradientPerlinNoise3D_TEX(uniform texture_3d PerlinNoise3DTexture, float3 xyz)
566
+ {
567
+ // needs to be the same value when creating the PerlinNoise3D texture
568
+ float Extent = 16;
569
+
570
+ // last texel replicated and needed for filtering
571
+ // scalar: 3 frac, 6 mul
572
+ xyz = math::frac(xyz / (Extent - 1)) * (Extent - 1);
573
+
574
+ // scalar: 3 frac
575
+ float3 uvw = math::frac(xyz);
576
+ // = floor(xyz);
577
+ // scalar: 3 add
578
+ float3 p0 = xyz - uvw;
579
+ // float3 f = math::pow(uvw, 2) * 3.0f - math::pow(uvw, 3) * 2.0f; // original perlin hermite (ok when used without bump mapping)
580
+ // scalar: 2*3 add 5*3 mul
581
+ float4 pr = PerlinRamp(float4(uvw.x, uvw.y, uvw.z, 0));
582
+ float3 f = float3(pr.x, pr.y, pr.z); // new, better with continues second derivative for bump mapping
583
+ // scalar: 3 add
584
+ float3 p = p0 + f;
585
+ // scalar: 3 mad
586
+ // TODO: need reverse???
587
+ float4 NoiseSample = tex::lookup_float4(PerlinNoise3DTexture, p / Extent + 0.5f / Extent); // +0.5f to get rid of bilinear offset
588
+
589
+ // reconstruct from 8bit (using mad with 2 constants and dot4 was same instruction count)
590
+ // scalar: 4 mad, 3 mul, 3 add
591
+ float3 n = float3(NoiseSample.x, NoiseSample.y, NoiseSample.z) * 255.0f / 127.0f - 1.0f;
592
+ float d = NoiseSample.w * 255.f - 127;
593
+ return math::dot(xyz, n) - d;
594
+ }
595
+
596
+ // Perlin-style "Modified Noise"
597
+ // http://www.umbc.edu/~olano/papers/index.html#mNoise
598
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
599
+ // @param bTiling = repeat noise pattern
600
+ // @param RepeatSize = integer units before tiling in each dimension
601
+ // @return random number in the range -1 .. 1
602
+ float GradientNoise3D_ALU(float3 v, bool bTiling, float RepeatSize)
603
+ {
604
+ SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize);
605
+
606
+ float rand000 = MGradient(int(seeds.seed000), seeds.fv - float3(0, 0, 0)).w;
607
+ float rand100 = MGradient(int(seeds.seed100), seeds.fv - float3(1, 0, 0)).w;
608
+ float rand010 = MGradient(int(seeds.seed010), seeds.fv - float3(0, 1, 0)).w;
609
+ float rand110 = MGradient(int(seeds.seed110), seeds.fv - float3(1, 1, 0)).w;
610
+ float rand001 = MGradient(int(seeds.seed001), seeds.fv - float3(0, 0, 1)).w;
611
+ float rand101 = MGradient(int(seeds.seed101), seeds.fv - float3(1, 0, 1)).w;
612
+ float rand011 = MGradient(int(seeds.seed011), seeds.fv - float3(0, 1, 1)).w;
613
+ float rand111 = MGradient(int(seeds.seed111), seeds.fv - float3(1, 1, 1)).w;
614
+
615
+ float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0));
616
+
617
+ float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y);
618
+ float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y);
619
+ return math::lerp(i, j, Weights.z);
620
+ }
621
+
622
+ // 3D value noise - used to be incorrectly called Perlin noise
623
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
624
+ // @param bTiling = repeat noise pattern
625
+ // @param RepeatSize = integer units before tiling in each dimension
626
+ // @return random number in the range -1 .. 1
627
+ float ValueNoise3D_ALU(float3 v, bool bTiling, float RepeatSize)
628
+ {
629
+ SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize);
630
+
631
+ float rand000 = RandBBSfloat(seeds.seed000) * 2 - 1;
632
+ float rand100 = RandBBSfloat(seeds.seed100) * 2 - 1;
633
+ float rand010 = RandBBSfloat(seeds.seed010) * 2 - 1;
634
+ float rand110 = RandBBSfloat(seeds.seed110) * 2 - 1;
635
+ float rand001 = RandBBSfloat(seeds.seed001) * 2 - 1;
636
+ float rand101 = RandBBSfloat(seeds.seed101) * 2 - 1;
637
+ float rand011 = RandBBSfloat(seeds.seed011) * 2 - 1;
638
+ float rand111 = RandBBSfloat(seeds.seed111) * 2 - 1;
639
+
640
+ float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0));
641
+
642
+ float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y);
643
+ float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y);
644
+ return math::lerp(i, j, Weights.z);
645
+ }
646
+
647
+ // 3D jitter offset within a voronoi noise cell
648
+ // @param pos - integer lattice corner
649
+ // @return random offsets vector
650
+ float3 VoronoiCornerSample(float3 pos, int Quality)
651
+ {
652
+ // random values in [-0.5, 0.5]
653
+ float3 noise = float3(Rand3DPCG16(int3(pos))) / 0xffff - 0.5;
654
+
655
+ // quality level 1 or 2: searches a 2x2x2 neighborhood with points distributed on a sphere
656
+ // scale factor to guarantee jittered points will be found within a 2x2x2 search
657
+ if (Quality <= 2)
658
+ {
659
+ return math::normalize(noise) * 0.2588;
660
+ }
661
+
662
+ // quality level 3: searches a 3x3x3 neighborhood with points distributed on a sphere
663
+ // scale factor to guarantee jittered points will be found within a 3x3x3 search
664
+ if (Quality == 3)
665
+ {
666
+ return math::normalize(noise) * 0.3090;
667
+ }
668
+
669
+ // quality level 4: jitter to anywhere in the cell, needs 4x4x4 search
670
+ return noise;
671
+ }
672
+
673
+ // compare previous best with a new candidate
674
+ // not producing point locations makes it easier for compiler to eliminate calculations when they're not needed
675
+ // @param minval = location and distance of best candidate seed point before the new one
676
+ // @param candidate = candidate seed point
677
+ // @param offset = 3D offset to new candidate seed point
678
+ // @param bDistanceOnly = if true, only set maxval.w with distance, otherwise maxval.w is distance and maxval.xyz is position
679
+ // @return position (if bDistanceOnly is false) and distance to closest seed point so far
680
+ float4 VoronoiCompare(float4 minval, float3 candidate, float3 offset, bool bDistanceOnly)
681
+ {
682
+ if (bDistanceOnly)
683
+ {
684
+ return float4(0, 0, 0, math::min(minval.w, math::dot(offset, offset)));
685
+ }
686
+ else
687
+ {
688
+ float newdist = math::dot(offset, offset);
689
+ return newdist > minval.w ? minval : float4(candidate.x, candidate.y, candidate.z, newdist);
690
+ }
691
+ }
692
+
693
+ // 220 instruction Worley noise
694
+ float4 VoronoiNoise3D_ALU(float3 v, int Quality, bool bTiling, float RepeatSize, bool bDistanceOnly)
695
+ {
696
+ float3 fv = math::frac(v), fv2 = math::frac(v + 0.5);
697
+ float3 iv = math::floor(v), iv2 = math::floor(v + 0.5);
698
+
699
+ // with initial minimum distance = infinity (or at least bigger than 4), first min is optimized away
700
+ float4 mindist = float4(0,0,0,100);
701
+ float3 p, offset;
702
+
703
+ // quality level 3: do a 3x3x3 search
704
+ if (Quality == 3)
705
+ {
706
+ int offset_x;
707
+ int offset_y;
708
+ int offset_z;
709
+ for (offset_x = -1; offset_x <= 1; ++offset_x)
710
+ {
711
+ for (offset_y = -1; offset_y <= 1; ++offset_y)
712
+ {
713
+ for (offset_z = -1; offset_z <= 1; ++offset_z)
714
+ {
715
+ offset = float3(offset_x, offset_y, offset_z);
716
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize), Quality);
717
+ mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly);
718
+ }
719
+ }
720
+ }
721
+ }
722
+
723
+ // everybody else searches a base 2x2x2 neighborhood
724
+ else
725
+ {
726
+ int offset_x;
727
+ int offset_y;
728
+ int offset_z;
729
+ for (offset_x = 0; offset_x <= 1; ++offset_x)
730
+ {
731
+ for (offset_y = 0; offset_y <= 1; ++offset_y)
732
+ {
733
+ for (offset_z = 0; offset_z <= 1; ++offset_z)
734
+ {
735
+ offset = float3(offset_x, offset_y, offset_z);
736
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality);
737
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
738
+
739
+ // quality level 2, do extra set of points, offset by half a cell
740
+ if (Quality == 2)
741
+ {
742
+ // 467 is just an offset to a different area in the random number field to avoid similar neighbor artifacts
743
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize) + 467, Quality);
744
+ mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly);
745
+ }
746
+ }
747
+ }
748
+ }
749
+ }
750
+
751
+ // quality level 4: add extra sets of four cells in each direction
752
+ if (Quality >= 4)
753
+ {
754
+ int offset_x;
755
+ int offset_y;
756
+ int offset_z;
757
+ for (offset_x = -1; offset_x <= 2; offset_x += 3)
758
+ {
759
+ for (offset_y = 0; offset_y <= 1; ++offset_y)
760
+ {
761
+ for (offset_z = 0; offset_z <= 1; ++offset_z)
762
+ {
763
+ offset = float3(offset_x, offset_y, offset_z);
764
+ // along x axis
765
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality);
766
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
767
+
768
+ // along y axis
769
+ p = float3(offset.y, offset.z, offset.x) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.y, offset.z, offset.x), bTiling, RepeatSize), Quality);
770
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
771
+
772
+ // along z axis
773
+ p = float3(offset.z, offset.x, offset.y) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.z, offset.x, offset.y), bTiling, RepeatSize), Quality);
774
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
775
+ }
776
+ }
777
+ }
778
+ }
779
+
780
+ // transform squared distance to real distance
781
+ return float4(mindist.x, mindist.y, mindist.z, math::sqrt(mindist.w));
782
+ }
783
+
784
+ // Coordinates for corners of a Simplex tetrahedron
785
+ // Based on McEwan et al., Efficient computation of noise in GLSL, JGT 2011
786
+ // @param v = 3D noise argument
787
+ // @return 4 corner locations
788
+ float4x3 SimplexCorners(float3 v)
789
+ {
790
+ // find base corner by skewing to tetrahedral space and back
791
+ float3 tet = math::floor(v + v.x/3 + v.y/3 + v.z/3);
792
+ float3 base = tet - tet.x/6 - tet.y/6 - tet.z/6;
793
+ float3 f = v - base;
794
+
795
+ // Find offsets to other corners (McEwan did this in tetrahedral space,
796
+ // but since skew is along x=y=z axis, this works in Euclidean space too.)
797
+ 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);
798
+ float3 a1 = math::min(g, h) - 1.0 / 6.0, a2 = math::max(g, h) - 1.0 / 3.0;
799
+
800
+ // four corners
801
+ return float4x3(base, base + a1, base + a2, base + 0.5);
802
+ }
803
+
804
+ // Improved smoothing function for simplex noise
805
+ // @param f = fractional distance to four tetrahedral corners
806
+ // @return weight for each corner
807
+ float4 SimplexSmooth(float4x3 f)
808
+ {
809
+ const float scale = 1024. / 375.; // scale factor to make noise -1..1
810
+ 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]));
811
+ float4 s = math::saturate(2 * d);
812
+ return (1 * scale + s*(-3 * scale + s*(3 * scale - s*scale)));
813
+ }
814
+
815
+ // Derivative of simplex noise smoothing function
816
+ // @param f = fractional distanc eto four tetrahedral corners
817
+ // @return derivative of smoothing function for each corner by x, y and z
818
+ float3x4 SimplexDSmooth(float4x3 f)
819
+ {
820
+ const float scale = 1024. / 375.; // scale factor to make noise -1..1
821
+ 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]));
822
+ float4 s = math::saturate(2 * d);
823
+ s = -12 * scale + s*(24 * scale - s * 12 * scale);
824
+
825
+ return float3x4(
826
+ s * float4(f[0][0], f[1][0], f[2][0], f[3][0]),
827
+ s * float4(f[0][1], f[1][1], f[2][1], f[3][1]),
828
+ s * float4(f[0][2], f[1][2], f[2][2], f[3][2]));
829
+ }
830
+
831
+ // Simplex noise and its Jacobian derivative
832
+ // @param v = 3D noise argument
833
+ // @param bTiling = whether to repeat noise pattern
834
+ // @param RepeatSize = integer units before tiling in each dimension, must be a multiple of 3
835
+ // @return float3x3 Jacobian in J[*].xyz, vector noise in J[*].w
836
+ // J[0].w, J[1].w, J[2].w is a Perlin-style simplex noise with vector output, e.g. (Nx, Ny, Nz)
837
+ // J[i].x is X derivative of the i'th component of the noise so J[2].x is dNz/dx
838
+ // You can use this to compute the noise, gradient, curl, or divergence:
839
+ // float3x4 J = JacobianSimplex_ALU(...);
840
+ // float3 VNoise = float3(J[0].w, J[1].w, J[2].w); // 3D noise
841
+ // float3 Grad = J[0].xyz; // gradient of J[0].w
842
+ // float3 Curl = float3(J[1][2]-J[2][1], J[2][0]-J[0][2], J[0][1]-J[1][2]);
843
+ // float Div = J[0][0]+J[1][1]+J[2][2];
844
+ // All of these are confirmed to compile out all unneeded terms.
845
+ // So Grad of X doesn't compute Y or Z components, and VNoise doesn't do any of the derivative computation.
846
+ float3x4 JacobianSimplex_ALU(float3 v, bool bTiling, float RepeatSize)
847
+ {
848
+ int3 MGradientMask = int3(0x8000, 0x4000, 0x2000);
849
+ float3 MGradientScale = float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000);
850
+
851
+ // corners of tetrahedron
852
+ float4x3 T = SimplexCorners(v);
853
+ // TODO: uint3
854
+ int3 rand = int3(0);
855
+ float4x3 gvec0 = float4x3(1.0);
856
+ float4x3 gvec1 = float4x3(1.0);
857
+ float4x3 gvec2 = float4x3(1.0);
858
+ float4x3 fv = float4x3(1.0);
859
+ float3x4 grad = float3x4(1.0);
860
+
861
+ // processing of tetrahedral vertices, unrolled
862
+ // to compute gradient at each corner
863
+ fv[0] = v - T[0];
864
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[0] + 0.5, bTiling, RepeatSize))));
865
+ gvec0[0] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
866
+ gvec1[0] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
867
+ gvec2[0] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
868
+ grad[0][0] = math::dot(gvec0[0], fv[0]);
869
+ grad[1][0] = math::dot(gvec1[0], fv[0]);
870
+ grad[2][0] = math::dot(gvec2[0], fv[0]);
871
+
872
+ fv[1] = v - T[1];
873
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[1] + 0.5, bTiling, RepeatSize))));
874
+ gvec0[1] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
875
+ gvec1[1] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
876
+ gvec1[1] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
877
+ grad[0][1] = math::dot(gvec0[1], fv[1]);
878
+ grad[1][1] = math::dot(gvec1[1], fv[1]);
879
+ grad[2][1] = math::dot(gvec2[1], fv[1]);
880
+
881
+ fv[2] = v - T[2];
882
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[2] + 0.5, bTiling, RepeatSize))));
883
+ gvec0[2] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
884
+ gvec1[2] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
885
+ gvec2[2] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
886
+ grad[0][2] = math::dot(gvec0[2], fv[2]);
887
+ grad[1][2] = math::dot(gvec1[2], fv[2]);
888
+ grad[2][2] = math::dot(gvec2[2], fv[2]);
889
+
890
+ fv[3] = v - T[3];
891
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[3] + 0.5, bTiling, RepeatSize))));
892
+ gvec0[3] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
893
+ gvec1[3] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
894
+ gvec2[3] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
895
+ grad[0][3] = math::dot(gvec0[3], fv[3]);
896
+ grad[1][3] = math::dot(gvec1[3], fv[3]);
897
+ grad[2][3] = math::dot(gvec2[3], fv[3]);
898
+
899
+ // blend gradients
900
+ float4 sv = SimplexSmooth(fv);
901
+ float3x4 ds = SimplexDSmooth(fv);
902
+
903
+ float3x4 jacobian = float3x4(1.0);
904
+ float3 vec0 = gvec0*sv + grad[0]*ds; // NOTE: mdl is column major, convert from UE4 (row major)
905
+ jacobian[0] = float4(vec0.x, vec0.y, vec0.z, math::dot(sv, grad[0]));
906
+ float3 vec1 = gvec1*sv + grad[1]*ds;
907
+ jacobian[1] = float4(vec1.x, vec1.y, vec1.z, math::dot(sv, grad[1]));
908
+ float3 vec2 = gvec2*sv + grad[2]*ds;
909
+ jacobian[2] = float4(vec2.x, vec2.y, vec2.z, math::dot(sv, grad[2]));
910
+
911
+ return jacobian;
912
+ }
913
+
914
+ // 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
915
+ // floats for all called functions (NoiseTileWrap) and this prevents any float-to-int conversion errors from automatic type conversion.
916
+ float Noise3D_Multiplexer(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, int Function, float3 Position, int Quality, bool bTiling, float RepeatSize)
917
+ {
918
+ // verified, HLSL compiled out the switch if Function is a constant
919
+ switch(Function)
920
+ {
921
+ case 0:
922
+ return SimplexNoise3D_TEX(PerlinNoiseGradientTexture, Position);
923
+ case 1:
924
+ return GradientNoise3D_TEX(PerlinNoiseGradientTexture, Position, bTiling, RepeatSize);
925
+ case 2:
926
+ return FastGradientPerlinNoise3D_TEX(PerlinNoise3DTexture, Position);
927
+ case 3:
928
+ return GradientNoise3D_ALU(Position, bTiling, RepeatSize);
929
+ case 4:
930
+ return ValueNoise3D_ALU(Position, bTiling, RepeatSize);
931
+ case 5:
932
+ return VoronoiNoise3D_ALU(Position, Quality, bTiling, RepeatSize, true).w * 2.0 - 1.0;
933
+ }
934
+ return 0;
935
+ }
936
+ //----------------------------------------------------------
937
+
938
+ 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)
939
+ [[
940
+ anno::description("Noise"),
941
+ anno::noinline()
942
+ ]]
943
+ {
944
+ Position *= Scale;
945
+ FilterWidth *= Scale;
946
+
947
+ float Out = 0.0f;
948
+ float OutScale = 1.0f;
949
+ float InvLevelScale = 1.0f / LevelScale;
950
+
951
+ int iFunction(Function);
952
+ int iQuality(Quality);
953
+ int iLevels(Levels);
954
+ bool bTurbulence(Turbulence);
955
+ bool bTiling(Tiling);
956
+
957
+ for(int i = 0; i < iLevels; ++i)
958
+ {
959
+ // fade out noise level that are too high frequent (not done through dynamic branching as it usually requires gradient instructions)
960
+ OutScale *= math::saturate(1.0 - FilterWidth);
961
+
962
+ if(bTurbulence)
963
+ {
964
+ Out += math::abs(Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize)) * OutScale;
965
+ }
966
+ else
967
+ {
968
+ Out += Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize) * OutScale;
969
+ }
970
+
971
+ Position *= LevelScale;
972
+ RepeatSize *= LevelScale;
973
+ OutScale *= InvLevelScale;
974
+ FilterWidth *= LevelScale;
975
+ }
976
+
977
+ if(!bTurbulence)
978
+ {
979
+ // bring -1..1 to 0..1 range
980
+ Out = Out * 0.5f + 0.5f;
981
+ }
982
+
983
+ // Out is in 0..1 range
984
+ return math::lerp(OutputMin, OutputMax, Out);
985
+ }
986
+
987
+ // Material node for noise functions returning a vector value
988
+ // @param LevelScale usually 2 but higher values allow efficient use of few levels
989
+ // @return in user defined range (OutputMin..OutputMax)
990
+ export float4 vector4_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize)
991
+ [[
992
+ anno::description("Vector Noise"),
993
+ anno::noinline()
994
+ ]]
995
+ {
996
+ float4 result = float4(0,0,0,1);
997
+ float3 ret = float3(0);
998
+ int iQuality = int(Quality);
999
+ int iFunction = int(Function);
1000
+ bool bTiling = Tiling > 0.0;
1001
+
1002
+ float3x4 Jacobian = JacobianSimplex_ALU(Position, bTiling, TileSize); // compiled out if not used
1003
+
1004
+ // verified, HLSL compiled out the switch if Function is a constant
1005
+ switch (iFunction)
1006
+ {
1007
+ case 0: // Cellnoise
1008
+ ret = float3(Rand3DPCG16(int3(math::floor(NoiseTileWrap(Position, bTiling, TileSize))))) / 0xffff;
1009
+ result = float4(ret.x, ret.y, ret.z, 1);
1010
+ break;
1011
+ case 1: // Color noise
1012
+ ret = float3(Jacobian[0].w, Jacobian[1].w, Jacobian[2].w);
1013
+ result = float4(ret.x, ret.y, ret.z, 1);
1014
+ break;
1015
+ case 2: // Gradient
1016
+ result = Jacobian[0];
1017
+ break;
1018
+ case 3: // Curl
1019
+ ret = float3(Jacobian[2][1] - Jacobian[1][2], Jacobian[0][2] - Jacobian[2][0], Jacobian[1][0] - Jacobian[0][1]);
1020
+ result = float4(ret.x, ret.y, ret.z, 1);
1021
+ break;
1022
+ case 4: // Voronoi
1023
+ result = VoronoiNoise3D_ALU(Position, iQuality, bTiling, TileSize, false);
1024
+ break;
1025
+ }
1026
+ return result;
1027
+ }
1028
+
1029
+ export float3 vector3_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize)
1030
+ [[
1031
+ anno::description("Vector Noise float3 version"),
1032
+ anno::noinline()
1033
+ ]]
1034
+ {
1035
+ float4 noise = vector4_noise(Position, Quality, Function, Tiling, TileSize);
1036
+ return float3(noise.x, noise.y, noise.z);
1037
+ }
1038
+
1039
+
1040
+ // workaround for ue4 fresnel (without supporting for camera vector) : replacing it with 0.0, means facing to the view
1041
+ export float fresnel(float exponent [[anno::unused()]], float base_reflect_fraction [[anno::unused()]], float3 normal [[anno::unused()]])
1042
+ [[
1043
+ anno::description("Fresnel"),
1044
+ anno::noinline()
1045
+ ]]
1046
+ {
1047
+ return 0.0;
1048
+ }
1049
+
1050
+ export float fresnel_function(float3 normal_vector [[anno::unused()]], float3 camera_vector [[anno::unused()]],
1051
+ bool invert_fresnel [[anno::unused()]], float power [[anno::unused()]],
1052
+ bool use_cheap_contrast [[anno::unused()]], float cheap_contrast_dark [[anno::unused()]], float cheap_contrast_bright [[anno::unused()]],
1053
+ bool clamp_fresnel_dot_product [[anno::unused()]])
1054
+ [[
1055
+ anno::description("Fresnel Function"),
1056
+ anno::noinline()
1057
+ ]]
1058
+ {
1059
+ return 0.0;
1060
+ }
1061
+
1062
+ export float3 camera_vector(uniform bool up_z = true)
1063
+ [[
1064
+ anno::description("Camera Vector"),
1065
+ anno::noinline()
1066
+ ]]
1067
+ {
1068
+ // assume camera postion is 0,0,0
1069
+ return math::normalize(float3(0) - convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z));
1070
+ }
1071
+
1072
+ export float pixel_depth()
1073
+ [[
1074
+ anno::description("Pixel Depth"),
1075
+ anno::noinline()
1076
+ ]]
1077
+ {
1078
+ return 256.0f;
1079
+ }
1080
+
1081
+ export float scene_depth()
1082
+ [[
1083
+ anno::description("Scene Depth")
1084
+ ]]
1085
+ {
1086
+ return 65500.0f;
1087
+ }
1088
+
1089
+ export float3 scene_color()
1090
+ [[
1091
+ anno::description("Scene Color")
1092
+ ]]
1093
+ {
1094
+ return float3(1.0f);
1095
+ }
1096
+
1097
+ export float4 vertex_color()
1098
+ [[
1099
+ anno::description("Vertex Color"),
1100
+ anno::noinline()
1101
+ ]]
1102
+ {
1103
+ return float4(1.0f);
1104
+ }
1105
+
1106
+ export float4 vertex_color_from_coordinate(int VertexColorCoordinateIndex)
1107
+ [[
1108
+ anno::description("Vertex Color for float2 PrimVar"),
1109
+ anno::noinline()
1110
+ ]]
1111
+ {
1112
+ // 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
1113
+ 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);
1114
+ }
1115
+
1116
+ export float3 camera_position()
1117
+ [[
1118
+ anno::description("Camera Position"),
1119
+ anno::noinline()
1120
+ ]]
1121
+ {
1122
+ return float3(1000.0f, 0, 0);
1123
+ }
1124
+
1125
+ export float3 rotate_about_axis(float4 NormalizedRotationAxisAndAngle, float3 PositionOnAxis, float3 Position)
1126
+ [[
1127
+ anno::description("Rotates Position about the given axis by the given angle")
1128
+ ]]
1129
+ {
1130
+ // Project Position onto the rotation axis and find the closest point on the axis to Position
1131
+ float3 NormalizedRotationAxis = float3(NormalizedRotationAxisAndAngle.x,NormalizedRotationAxisAndAngle.y,NormalizedRotationAxisAndAngle.z);
1132
+ float3 ClosestPointOnAxis = PositionOnAxis + NormalizedRotationAxis * math::dot(NormalizedRotationAxis, Position - PositionOnAxis);
1133
+ // Construct orthogonal axes in the plane of the rotation
1134
+ float3 UAxis = Position - ClosestPointOnAxis;
1135
+ float3 VAxis = math::cross(NormalizedRotationAxis, UAxis);
1136
+ float[2] SinCosAngle = math::sincos(NormalizedRotationAxisAndAngle.w);
1137
+ // Rotate using the orthogonal axes
1138
+ float3 R = UAxis * SinCosAngle[1] + VAxis * SinCosAngle[0];
1139
+ // Reconstruct the rotated world space position
1140
+ float3 RotatedPosition = ClosestPointOnAxis + R;
1141
+ // Convert from position to a position offset
1142
+ return RotatedPosition - Position;
1143
+ }
1144
+
1145
+ export float2 rotate_scale_offset_texcoords(float2 InTexCoords, float4 InRotationScale, float2 InOffset)
1146
+ [[
1147
+ anno::description("Returns a float2 texture coordinate after 2x2 transform and offset applied")
1148
+ ]]
1149
+ {
1150
+ return float2(math::dot(InTexCoords, float2(InRotationScale.x, InRotationScale.y)), math::dot(InTexCoords, float2(InRotationScale.z, InRotationScale.w))) + InOffset;
1151
+ }
1152
+
1153
+ export float3 reflection_custom_world_normal(float3 WorldNormal, bool bNormalizeInputNormal, uniform bool up_z = true)
1154
+ [[
1155
+ anno::description("Reflection vector about the specified world space normal")
1156
+ ]]
1157
+ {
1158
+ if (bNormalizeInputNormal)
1159
+ {
1160
+ WorldNormal = math::normalize(WorldNormal);
1161
+ }
1162
+
1163
+ return -camera_vector(up_z) + WorldNormal * math::dot(WorldNormal, camera_vector(up_z)) * 2.0;
1164
+ }
1165
+
1166
+ export float3 reflection_vector(uniform bool up_z = true)
1167
+ [[
1168
+ anno::description("Reflection Vector"),
1169
+ anno::noinline()
1170
+ ]]
1171
+ {
1172
+ float3 normal = convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
1173
+ return reflection_custom_world_normal(normal, false, up_z);
1174
+ }
1175
+
1176
+ export float dither_temporalAA(float AlphaThreshold = 0.5f, float Random = 1.0f [[anno::unused()]])
1177
+ [[
1178
+ anno::description("Dither TemporalAA"),
1179
+ anno::noinline()
1180
+ ]]
1181
+ {
1182
+ return AlphaThreshold;
1183
+ }
1184
+
1185
+ export float3 black_body( float Temp )
1186
+ [[
1187
+ anno::description("Black Body"),
1188
+ anno::noinline()
1189
+ ]]
1190
+ {
1191
+ float u = ( 0.860117757f + 1.54118254e-4f * Temp + 1.28641212e-7f * Temp*Temp ) / ( 1.0f + 8.42420235e-4f * Temp + 7.08145163e-7f * Temp*Temp );
1192
+ float v = ( 0.317398726f + 4.22806245e-5f * Temp + 4.20481691e-8f * Temp*Temp ) / ( 1.0f - 2.89741816e-5f * Temp + 1.61456053e-7f * Temp*Temp );
1193
+
1194
+ float x = 3*u / ( 2*u - 8*v + 4 );
1195
+ float y = 2*v / ( 2*u - 8*v + 4 );
1196
+ float z = 1 - x - y;
1197
+
1198
+ float Y = 1;
1199
+ float X = Y/y * x;
1200
+ float Z = Y/y * z;
1201
+
1202
+ float3x3 XYZtoRGB = float3x3(
1203
+ float3(3.2404542, -1.5371385, -0.4985314),
1204
+ float3(-0.9692660, 1.8760108, 0.0415560),
1205
+ float3(0.0556434, -0.2040259, 1.0572252)
1206
+ );
1207
+
1208
+ return XYZtoRGB * float3( X, Y, Z ) * math::pow( 0.0004 * Temp, 4 );
1209
+ }
1210
+
1211
+ export float per_instance_random(uniform texture_2d PerlinNoiseGradientTexture, int NumberInstances)
1212
+ [[
1213
+ anno::description("Per Instance Random"),
1214
+ anno::noinline()
1215
+ ]]
1216
+ {
1217
+ float weight = state::object_id() / float(NumberInstances);
1218
+ return NumberInstances == 0 ? 0.0 : tex::lookup_float4(PerlinNoiseGradientTexture, float2(weight, 1.0 - weight), tex::wrap_repeat, tex::wrap_repeat).x;
1219
+ }
1220
+
1221
+ //------------------ Hair from UE4 -----------------------
1222
+ float3 hair_absorption_to_color(float3 A)
1223
+ {
1224
+ const float B = 0.3f;
1225
+ float b2 = B * B;
1226
+ float b3 = B * b2;
1227
+ float b4 = b2 * b2;
1228
+ float b5 = B * b4;
1229
+ float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5);
1230
+ return math::exp(-math::sqrt(A) * D);
1231
+ }
1232
+
1233
+ float3 hair_color_to_absorption(float3 C)
1234
+ {
1235
+ const float B = 0.3f;
1236
+ float b2 = B * B;
1237
+ float b3 = B * b2;
1238
+ float b4 = b2 * b2;
1239
+ float b5 = B * b4;
1240
+ float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5);
1241
+ return math::pow(math::log(C) / D, 2.0f);
1242
+ }
1243
+
1244
+ export float3 get_hair_color_from_melanin(float InMelanin, float InRedness, float3 InDyeColor)
1245
+ [[
1246
+ anno::description("Hair Color")
1247
+ ]]
1248
+ {
1249
+ InMelanin = math::saturate(InMelanin);
1250
+ InRedness = math::saturate(InRedness);
1251
+ float Melanin = -math::log(math::max(1 - InMelanin, 0.0001f));
1252
+ float Eumelanin = Melanin * (1 - InRedness);
1253
+ float Pheomelanin = Melanin * InRedness;
1254
+
1255
+ float3 DyeAbsorption = hair_color_to_absorption(math::saturate(InDyeColor));
1256
+ float3 Absorption = Eumelanin * float3(0.506f, 0.841f, 1.653f) + Pheomelanin * float3(0.343f, 0.733f, 1.924f);
1257
+
1258
+ return hair_absorption_to_color(Absorption + DyeAbsorption);
1259
+ }
1260
+
1261
+ export float3 local_object_bounds_min()
1262
+ [[
1263
+ anno::description("Local Object Bounds Min"),
1264
+ anno::noinline()
1265
+ ]]
1266
+ {
1267
+ return float3(0.0);
1268
+ }
1269
+
1270
+ export float3 local_object_bounds_max()
1271
+ [[
1272
+ anno::description("Local Object Bounds Max"),
1273
+ anno::noinline()
1274
+ ]]
1275
+ {
1276
+ return float3(100.0);
1277
+ }
1278
+
1279
+ export float3 object_bounds()
1280
+ [[
1281
+ anno::description("Object Bounds"),
1282
+ anno::noinline()
1283
+ ]]
1284
+ {
1285
+ return float3(100.0);
1286
+ }
1287
+
1288
+ export float object_radius()
1289
+ [[
1290
+ anno::description("Object Radius"),
1291
+ anno::noinline()
1292
+ ]]
1293
+ {
1294
+ return 100.0f;
1295
+ }
1296
+
1297
+ export float3 object_world_position(uniform bool up_z = true)
1298
+ [[
1299
+ anno::description("Object World Position"),
1300
+ anno::noinline()
1301
+ ]]
1302
+ {
1303
+ 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;
1304
+ }
1305
+
1306
+ export float3 object_orientation()
1307
+ [[
1308
+ anno::description("Object Orientation"),
1309
+ anno::noinline()
1310
+ ]]
1311
+ {
1312
+ return float3(0);
1313
+ }
1314
+
1315
+ export float rcp(float x)
1316
+ [[
1317
+ anno::description("hlsl rcp"),
1318
+ anno::noinline()
1319
+ ]]
1320
+ {
1321
+ return 1.0f / x;
1322
+ }
1323
+
1324
+ export float2 rcp(float2 x)
1325
+ [[
1326
+ anno::description("hlsl rcp"),
1327
+ anno::noinline()
1328
+ ]]
1329
+ {
1330
+ return 1.0f / x;
1331
+ }
1332
+
1333
+ export float3 rcp(float3 x)
1334
+ [[
1335
+ anno::description("hlsl rcp"),
1336
+ anno::noinline()
1337
+ ]]
1338
+ {
1339
+ return 1.0f / x;
1340
+ }
1341
+
1342
+ export float4 rcp(float4 x)
1343
+ [[
1344
+ anno::description("hlsl rcp"),
1345
+ anno::noinline()
1346
+ ]]
1347
+ {
1348
+ return 1.0f / x;
1349
+ }
1350
+
1351
+ export int BitFieldExtractI32(int Data, int Size, int Offset)
1352
+ [[
1353
+ anno::description("BitFieldExtractI32 int"),
1354
+ anno::noinline()
1355
+ ]]
1356
+ {
1357
+ Size &= 3;
1358
+ Offset &= 3;
1359
+
1360
+ if (Size == 0)
1361
+ return 0;
1362
+ else if (Offset + Size < 32)
1363
+ return (Data << (32 - Size - Offset)) >> (32 - Size);
1364
+ else
1365
+ return Data >> Offset;
1366
+ }
1367
+
1368
+ export int BitFieldExtractI32(float Data, float Size, float Offset)
1369
+ [[
1370
+ anno::description("BitFieldExtractI32 float"),
1371
+ anno::noinline()
1372
+ ]]
1373
+ {
1374
+ return BitFieldExtractI32(int(Data), int(Size), int(Offset));
1375
+ }
1376
+
1377
+ export int BitFieldExtractU32(float Data, float Size, float Offset)
1378
+ [[
1379
+ anno::description("BitFieldExtractU32 float"),
1380
+ anno::noinline()
1381
+ ]]
1382
+ {
1383
+ return BitFieldExtractI32(Data, Size, Offset);
1384
+ }
1385
+
1386
+ export int BitFieldExtractU32(int Data, int Size, int Offset)
1387
+ [[
1388
+ anno::description("BitFieldExtractU32 int"),
1389
+ anno::noinline()
1390
+ ]]
1391
+ {
1392
+ return BitFieldExtractI32(Data, Size, Offset);
1393
+ }
1394
+
1395
+ export float3 EyeAdaptationInverseLookup(float3 LightValue, float Alpha)
1396
+ [[
1397
+ anno::description("EyeAdaptationInverseLookup"),
1398
+ anno::noinline()
1399
+ ]]
1400
+ {
1401
+ float Adaptation = 1.0f;
1402
+
1403
+ // When Alpha=0.0, we want to multiply by 1.0. when Alpha = 1.0, we want to multiply by 1/Adaptation.
1404
+ // So the lerped value is:
1405
+ // LerpLogScale = Lerp(log(1),log(1/Adaptaiton),T)
1406
+ // Which is simplified as:
1407
+ // LerpLogScale = Lerp(0,-log(Adaptation),T)
1408
+ // LerpLogScale = -T * logAdaptation;
1409
+
1410
+ float LerpLogScale = -Alpha * math::log(Adaptation);
1411
+ float Scale = math::exp(LerpLogScale);
1412
+ return LightValue * Scale;
1413
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/object_usds/grutopia_usd/Table/table/ae45ecafe08effd3f62b54a1d360d593/instance.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_instance" (
62
+ prepend payload = @./instance.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_sandwich/base/scene_sandwich/obj_board4.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_obj_board4" (
62
+ prepend payload = @./obj_board4.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/.collect.mapping.json ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0",
3
+ "file_records": [
4
+ {
5
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/base.usd",
6
+ "source_hash": "7a332908c9cd0bee9924ac73afb176cfd8af9632",
7
+ "target_url": "./base.usd",
8
+ "target_hash": "62b762c83e4958b56d2faf971680fe4e553e4bd7"
9
+ },
10
+ {
11
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/Downloads/brown_photostudio_02_4k.exr",
12
+ "source_hash": "b6beb1413814503087cf87594235ea6d8624621f",
13
+ "target_url": "./Downloads/brown_photostudio_02_4k.exr",
14
+ "target_hash": "21c42fc9c23392065b43580029be4e3e444b7a2e"
15
+ },
16
+ {
17
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/instance.usd",
18
+ "source_hash": "a72fdc3469b8d75e7f3dce65285087bc0611049b",
19
+ "target_url": "./object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/instance.usd",
20
+ "target_hash": "b11ff7c45085bd6570f5ea9b32014edebd908726"
21
+ },
22
+ {
23
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/2b70993763034bef8587d3730c7ca8ff.usd",
24
+ "source_hash": "cc2f3a6cb1940abcc512cf8003e27fbec5683a1b",
25
+ "target_url": "./object_usds/objaverse_usd/2b70993763034bef8587d3730c7ca8ff.usd",
26
+ "target_hash": "ffad339f1c4a34ee69ebc0f098638a638a63f998"
27
+ },
28
+ {
29
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/2cda50e73f69438598eabf8259e27cb7.usd",
30
+ "source_hash": "7942cc5c5799149211b9a5e9393a9677ffae20dc",
31
+ "target_url": "./object_usds/objaverse_usd/2cda50e73f69438598eabf8259e27cb7.usd",
32
+ "target_hash": "2ff82f70f9a74467240aba5da7979f9634140529"
33
+ },
34
+ {
35
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/30f8ba058e1f4e288f5a2ddcba924c3f.usd",
36
+ "source_hash": "11580d38824335c13f406f835c55b69ace9a8ac9",
37
+ "target_url": "./object_usds/objaverse_usd/30f8ba058e1f4e288f5a2ddcba924c3f.usd",
38
+ "target_hash": "1496254464868acdb827879c8ab63fcd07809f73"
39
+ },
40
+ {
41
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/cf2af4b2b8c6420da69ba8d8f73744bc.usd",
42
+ "source_hash": "d3cf379358c42897640671bf09bc11290f753d72",
43
+ "target_url": "./object_usds/objaverse_usd/cf2af4b2b8c6420da69ba8d8f73744bc.usd",
44
+ "target_hash": "ffb92a5e1f08bbd714898c994adb2f2d3e1139aa"
45
+ },
46
+ {
47
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/scene_waste/obj_badbin.usd",
48
+ "source_hash": "dd9a8f71ecdc3389c406d40dffd77721b70e67f3",
49
+ "target_url": "./scene_waste/obj_badbin.usd",
50
+ "target_hash": "4721c64d8fc2009928becf9a937ac1b1dbc2a693"
51
+ },
52
+ {
53
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/scene_waste/obj_goodbin.usd",
54
+ "source_hash": "4b55dd5fb96f9a14535bd3b86339ad66da9fd5b9",
55
+ "target_url": "./scene_waste/obj_goodbin.usd",
56
+ "target_hash": "8867e96ff7dfed5155af4f5011d358319f976947"
57
+ },
58
+ {
59
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/scene_waste/saved/assets/scene_usds/IROS_scenes_collected/scene_waste/repos/RoboTwin/assets/objects/usds/011_dustbin_base0_converted/textures/DefaultMaterial_BaseColor.png",
60
+ "source_hash": "9142f6b0574e735dd7472db86d9415d26b77382f",
61
+ "target_url": "./scene_waste/saved/assets/scene_usds/IROS_scenes_collected/scene_waste/repos/RoboTwin/assets/objects/usds/011_dustbin_base0_converted/textures/DefaultMaterial_BaseColor.png",
62
+ "target_hash": "56128b05813fda7cc0a1cbb250a0d5869cf56335"
63
+ },
64
+ {
65
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/scene_waste/saved/assets/scene_usds/IROS_scenes_collected/scene_waste/repos/RoboTwin/assets/objects/usds/011_dustbin_base0_converted/textures/DefaultMaterial_Metallic-DefaultMaterial_Roughness.png",
66
+ "source_hash": "251dcdf77555aeb1342c0dd7c254573c674af261",
67
+ "target_url": "./scene_waste/saved/assets/scene_usds/IROS_scenes_collected/scene_waste/repos/RoboTwin/assets/objects/usds/011_dustbin_base0_converted/textures/DefaultMaterial_Metallic-DefaultMaterial_Roughness.png",
68
+ "target_hash": "dc2b82e8aa83c09a8ddf54d297c47f3b8427b03a"
69
+ },
70
+ {
71
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/scene_waste/saved/assets/scene_usds/IROS_scenes_collected/scene_waste/repos/RoboTwin/assets/objects/usds/011_dustbin_base0_converted/textures/DefaultMaterial_Normal.png",
72
+ "source_hash": "d09eedfcc66c6350f987d3a1e17b2a0665941acf",
73
+ "target_url": "./scene_waste/saved/assets/scene_usds/IROS_scenes_collected/scene_waste/repos/RoboTwin/assets/objects/usds/011_dustbin_base0_converted/textures/DefaultMaterial_Normal.png",
74
+ "target_hash": "256a691588e5efe87cd0c395ee727e67e247a18a"
75
+ },
76
+ {
77
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/2b70993763034bef8587d3730c7ca8ff_texture0.png",
78
+ "source_hash": "f4ea8e62644037e3c8c863807d18f1bbd53bf626",
79
+ "target_url": "./object_usds/objaverse_usd/textures/2b70993763034bef8587d3730c7ca8ff_texture0.png",
80
+ "target_hash": "f6c6c86e52948f18b27c5b2e658b19db26c3e902"
81
+ },
82
+ {
83
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/2b70993763034bef8587d3730c7ca8ff_texture1.png",
84
+ "source_hash": "1b0fb3c4ebfa6377875fe8b880ef2f7cf2de856e",
85
+ "target_url": "./object_usds/objaverse_usd/textures/2b70993763034bef8587d3730c7ca8ff_texture1.png",
86
+ "target_hash": "eceaf131cb9face836bf406b347ecc883328f12b"
87
+ },
88
+ {
89
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/2b70993763034bef8587d3730c7ca8ff_texture2.png",
90
+ "source_hash": "1e9d35292cde1b943e2a7f9f777f7e8e9a8574a3",
91
+ "target_url": "./object_usds/objaverse_usd/textures/2b70993763034bef8587d3730c7ca8ff_texture2.png",
92
+ "target_hash": "31a21c508774e78acd4d8d09b730cd0f35042235"
93
+ },
94
+ {
95
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/2b70993763034bef8587d3730c7ca8ff_texture3.png",
96
+ "source_hash": "f6fef6f8517a2fe0ca6089321f01869f205cab36",
97
+ "target_url": "./object_usds/objaverse_usd/textures/2b70993763034bef8587d3730c7ca8ff_texture3.png",
98
+ "target_hash": "601fe3a99115074f5552ca6f7f245654e3ac0658"
99
+ },
100
+ {
101
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/60090c4ad849e10001fbaec3_color.png",
102
+ "source_hash": "a0d31d0b429d9bfe91c5a4449be945d84442b098",
103
+ "target_url": "./object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/60090c4ad849e10001fbaec3_color.png",
104
+ "target_hash": "75af4a24f59446d69bf28e846b644cba7ce86970"
105
+ },
106
+ {
107
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/60090c4ad849e10001fbaec3_metallic.png",
108
+ "source_hash": "854c76e7a509daa225f93de5b22ae7e4c0e0af64",
109
+ "target_url": "./object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/60090c4ad849e10001fbaec3_metallic.png",
110
+ "target_hash": "e9851b4a5bb7913b6b61029e5bc40691096bb248"
111
+ },
112
+ {
113
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/60f102a500e3a30001d518c5_color.png",
114
+ "source_hash": "3fc5f322590d5c8b6496f473baf3d0c4715b8d78",
115
+ "target_url": "./object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/60f102a500e3a30001d518c5_color.png",
116
+ "target_hash": "05ca929437cee4f5d96c3ba229125609d1824edb"
117
+ },
118
+ {
119
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/black.png",
120
+ "source_hash": "231bf4246d70f903fcb3eac63d53ebe011425bac",
121
+ "target_url": "./object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/black.png",
122
+ "target_hash": "748c791bd642fc3fd67af23c1d55c97a5da46f47"
123
+ },
124
+ {
125
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/normal.png",
126
+ "source_hash": "4b3df3caa24a0172e2aca13a2f3d73a8624d8f71",
127
+ "target_url": "./object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/normal.png",
128
+ "target_hash": "03549b0537dc966a5e0386f75f88784bbf3fb8a6"
129
+ },
130
+ {
131
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/white.png",
132
+ "source_hash": "190f2242a3184409ef609954e7a2a8e407fc2792",
133
+ "target_url": "./object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Textures/white.png",
134
+ "target_hash": "74ceb4127b6e5182c2a1422e4b43eef5caae69af"
135
+ },
136
+ {
137
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/30f8ba058e1f4e288f5a2ddcba924c3f_texture0.jpg",
138
+ "source_hash": "c48d63450b02d8587352e3062836105454aab124",
139
+ "target_url": "./object_usds/objaverse_usd/textures/30f8ba058e1f4e288f5a2ddcba924c3f_texture0.jpg",
140
+ "target_hash": "a4f040c528742c13f12e44b65587c8b761aafc0d"
141
+ },
142
+ {
143
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture0.jpg",
144
+ "source_hash": "b7a0405c1296ab924c01623cf02b8bd12612076e",
145
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture0.jpg",
146
+ "target_hash": "fba9dbc5f440891769ffd1f151f8282ae121181e"
147
+ },
148
+ {
149
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture1.jpg",
150
+ "source_hash": "fb2111621b3f9850a6958f676c15192a6fd0fef1",
151
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture1.jpg",
152
+ "target_hash": "76c86a63699385a574aae439d8c123ce927eeeb5"
153
+ },
154
+ {
155
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture10.png",
156
+ "source_hash": "e0c30ced981f61b6049eb93d71fb13ac6e8c0f49",
157
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture10.png",
158
+ "target_hash": "8b828d42a2e885e218759a638ebccc1ea2221c24"
159
+ },
160
+ {
161
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture11.png",
162
+ "source_hash": "02ac152c426689a3e4de9ba677a1c88d29ba3e28",
163
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture11.png",
164
+ "target_hash": "8cd88abb5d1274ad16f73cb39045092484cdf226"
165
+ },
166
+ {
167
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture12.jpg",
168
+ "source_hash": "f797c61ac0689558c679bd5ad6a7b0eb9f577369",
169
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture12.jpg",
170
+ "target_hash": "060b47f4ec8922f6bf6790d92ead817af92bc933"
171
+ },
172
+ {
173
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture13.jpg",
174
+ "source_hash": "4bedf4b64e03e9ff84b9a4a1c3913454b2b3a660",
175
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture13.jpg",
176
+ "target_hash": "7b380184e026a687377115d79d5ace9fa6f5abf7"
177
+ },
178
+ {
179
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture14.png",
180
+ "source_hash": "31123acf1546928b72d76d4bb9a8c3de745b1b91",
181
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture14.png",
182
+ "target_hash": "3c6c8661ecaf3b021480ae7b00da457dd3c9ec68"
183
+ },
184
+ {
185
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture15.jpg",
186
+ "source_hash": "f52dd0696a1dd267d7141ad586704b721308ab9b",
187
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture15.jpg",
188
+ "target_hash": "9281acf2e816a1a7fefd75fea61535cc6dd31fc6"
189
+ },
190
+ {
191
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture16.jpg",
192
+ "source_hash": "1485c1b492af2eb4380e290ee18973ae65483e11",
193
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture16.jpg",
194
+ "target_hash": "ff23589d659f4c9f856e44ac9d2fe81aa379c83e"
195
+ },
196
+ {
197
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture17.png",
198
+ "source_hash": "1bd6fc7d046166161e76cd4421854d0ff415f84d",
199
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture17.png",
200
+ "target_hash": "030a1b222793ae7685bbdcc7b945903554243df5"
201
+ },
202
+ {
203
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture18.png",
204
+ "source_hash": "40256d4eb6bc1ff96307a058fed182a4f13f1c1f",
205
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture18.png",
206
+ "target_hash": "8422394c5bc6b869722d52955fc1bc4a25f212f1"
207
+ },
208
+ {
209
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture2.png",
210
+ "source_hash": "a46e27a59f5c5308458552431fd4920b15d90fe3",
211
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture2.png",
212
+ "target_hash": "ec4bd8f0c8eccde4a087f271270d4c5c723bee0f"
213
+ },
214
+ {
215
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture3.jpg",
216
+ "source_hash": "dda26652b8fa561932c4411638d1fa6a7a4a5640",
217
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture3.jpg",
218
+ "target_hash": "7cf9130bfb5b08c3dc9f5617cd7ce497e470577f"
219
+ },
220
+ {
221
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture4.jpg",
222
+ "source_hash": "effb8f7a42aaf5409460019aa7f1ee37d63cbfba",
223
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture4.jpg",
224
+ "target_hash": "334e8356562679091b8ea9d414e6a870bb81f92b"
225
+ },
226
+ {
227
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture5.png",
228
+ "source_hash": "7855029a782ed6607158d14693c68d5354b964da",
229
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture5.png",
230
+ "target_hash": "8391c032fffb18891dbd8fab5767688a25b3baf9"
231
+ },
232
+ {
233
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture6.jpg",
234
+ "source_hash": "c1df213ba25e1c760e6702a69a9fc0c7c442a317",
235
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture6.jpg",
236
+ "target_hash": "f0389822aab350c19bab43fdd5df8a19a293133b"
237
+ },
238
+ {
239
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture7.png",
240
+ "source_hash": "e18595e1efdb691388619b0694ad502275e6b8f9",
241
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture7.png",
242
+ "target_hash": "49df6a29705d44f57108a879721fd48ee9c518e0"
243
+ },
244
+ {
245
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture8.jpg",
246
+ "source_hash": "8065c3fc96e47977751f8bf318fcf95130f34765",
247
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture8.jpg",
248
+ "target_hash": "c0eaa72383802a4cb430f202bd7a29d3a98291c4"
249
+ },
250
+ {
251
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture9.jpg",
252
+ "source_hash": "788d268a6010a5a028a5d3c6fe4cb5ba1ca8043a",
253
+ "target_url": "./object_usds/objaverse_usd/textures/cf2af4b2b8c6420da69ba8d8f73744bc_texture9.jpg",
254
+ "target_hash": "0fb261d468d380ef75cb4028b097d2e2ab54db3d"
255
+ },
256
+ {
257
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Num595f215bc6dce910dd2f0f2d.mdl",
258
+ "source_hash": "ef56b768a9d22f65b7becab33e54a5123e65ce25",
259
+ "target_url": "./object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Num595f215bc6dce910dd2f0f2d.mdl",
260
+ "target_hash": "849a901aa294b0038ef4d2c10f92624521340dcd"
261
+ },
262
+ {
263
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/OmniUe4Function.mdl",
264
+ "source_hash": "3422f8ac624e6429ea98461f3de3b06c401425bf",
265
+ "target_url": "./object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/OmniUe4Function.mdl",
266
+ "target_hash": "01dedfdad6e3fd0cc0f8279eb4ca2e981dd374d5"
267
+ },
268
+ {
269
+ "source_url": "/mnt/data/gaoning/GenManip-Sim/saved/assets/scene_usds/IROS_scenes_aloha_final/scene_waste/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/OmniUe4Base.mdl",
270
+ "source_hash": "002961ad702659c84ae1e35062ecc8a77b702b37",
271
+ "target_url": "./object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/OmniUe4Base.mdl",
272
+ "target_hash": "0ac8a615892446336f7b6a8cac6a50c9d9dd6e28"
273
+ }
274
+ ]
275
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/instance.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_instance" (
62
+ prepend payload = @./instance.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/Num595f215bc6dce910dd2f0f2d.mdl ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ mdl 1.6;
2
+
3
+ import ::math::*;
4
+ import ::state::*;
5
+ import ::tex::*;
6
+ import ::anno::*;
7
+ using OmniUe4Function import *;
8
+ using OmniUe4Base import *;
9
+
10
+ export annotation sampler_color();
11
+ export annotation sampler_normal();
12
+ export annotation sampler_grayscale();
13
+ export annotation sampler_alpha();
14
+ export annotation sampler_masks();
15
+ export annotation sampler_distancefield();
16
+ export annotation dither_masked_off();
17
+ export annotation world_space_normal();
18
+
19
+ export material Num595f215bc6dce910dd2f0f2d(
20
+ uniform texture_2d Normal_Tex = texture_2d("./Textures/normal.png",::tex::gamma_linear)
21
+ [[
22
+ anno::display_name("Normal_Tex"),
23
+ anno::ui_order(32),
24
+ anno::in_group("Normal"),
25
+ sampler_normal()
26
+ ]],
27
+ float4 Normal_UVA = float4(1.0,1.0,0.0,0.0)
28
+ [[
29
+ anno::display_name("Normal_UVA"),
30
+ anno::ui_order(32),
31
+ anno::in_group("Normal")
32
+ ]],
33
+ float EmissiveIntensity = 0.0
34
+ [[
35
+ anno::display_name("EmissiveIntensity"),
36
+ anno::ui_order(32),
37
+ anno::in_group("EmissiveColor")
38
+ ]],
39
+ float IsEmissiveTex = 0.0
40
+ [[
41
+ anno::display_name("IsEmissiveTex"),
42
+ anno::in_group("EmissiveColor")
43
+ ]],
44
+ float4 Emissive_Color = float4(1.0,1.0,1.0,1.0)
45
+ [[
46
+ anno::display_name("Emissive_Color"),
47
+ anno::ui_order(32),
48
+ anno::in_group("EmissiveColor")
49
+ ]],
50
+ uniform texture_2d Emissive_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
51
+ [[
52
+ anno::display_name("Emissive_Tex"),
53
+ anno::ui_order(32),
54
+ anno::in_group("EmissiveColor"),
55
+ sampler_color()
56
+ ]],
57
+ float4 Emissive_UVA = float4(1.0,1.0,0.0,0.0)
58
+ [[
59
+ anno::display_name("Emissive_UVA"),
60
+ anno::ui_order(32),
61
+ anno::in_group("EmissiveColor")
62
+ ]],
63
+ float IsBaseColorTex = 0.0
64
+ [[
65
+ anno::display_name("IsBaseColorTex"),
66
+ anno::in_group("BaseColor")
67
+ ]],
68
+ float4 BaseColor_Color = float4(1.0,1.0,1.0,1.0)
69
+ [[
70
+ anno::display_name("BaseColor_Color"),
71
+ anno::ui_order(32),
72
+ anno::in_group("BaseColor")
73
+ ]],
74
+ uniform texture_2d BaseColor_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
75
+ [[
76
+ anno::display_name("BaseColor_Tex"),
77
+ anno::ui_order(32),
78
+ anno::in_group("BaseColor"),
79
+ sampler_color()
80
+ ]],
81
+ float4 BaseColor_UVA = float4(1.0,1.0,0.0,0.0)
82
+ [[
83
+ anno::display_name("BaseColor_UVA"),
84
+ anno::ui_order(32),
85
+ anno::in_group("BaseColor")
86
+ ]],
87
+ float IsMetallicTex = 0.0
88
+ [[
89
+ anno::display_name("IsMetallicTex"),
90
+ anno::in_group("Metallic")
91
+ ]],
92
+ float4 Metallic_Color = float4(0.0,0.0,0.0,1.0)
93
+ [[
94
+ anno::display_name("Metallic_Color"),
95
+ anno::ui_order(32),
96
+ anno::in_group("Metallic")
97
+ ]],
98
+ uniform texture_2d Metallic_Tex = texture_2d("./Textures/black.png",::tex::gamma_srgb)
99
+ [[
100
+ anno::display_name("Metallic_Tex"),
101
+ anno::ui_order(32),
102
+ anno::in_group("Metallic"),
103
+ sampler_color()
104
+ ]],
105
+ float4 Metallic_UVA = float4(1.0,1.0,0.0,0.0)
106
+ [[
107
+ anno::display_name("Metallic_UVA"),
108
+ anno::ui_order(32),
109
+ anno::in_group("Metallic")
110
+ ]],
111
+ float IsSpecularTex = 0.0
112
+ [[
113
+ anno::display_name("IsSpecularTex"),
114
+ anno::in_group("Specular")
115
+ ]],
116
+ float4 Specular_Color = float4(1.0,1.0,1.0,1.0)
117
+ [[
118
+ anno::display_name("Specular_Color"),
119
+ anno::ui_order(32),
120
+ anno::in_group("Specular")
121
+ ]],
122
+ uniform texture_2d Specular_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
123
+ [[
124
+ anno::display_name("Specular_Tex"),
125
+ anno::ui_order(32),
126
+ anno::in_group("Specular"),
127
+ sampler_color()
128
+ ]],
129
+ float4 Specular_UVA = float4(1.0,1.0,0.0,0.0)
130
+ [[
131
+ anno::display_name("Specular_UVA"),
132
+ anno::ui_order(32),
133
+ anno::in_group("Specular")
134
+ ]],
135
+ float IsGlossTex = 0.0
136
+ [[
137
+ anno::display_name("IsGlossTex"),
138
+ anno::in_group("Roughness")
139
+ ]],
140
+ float4 Gloss_Color = float4(0.1,0.1,0.1,1.0)
141
+ [[
142
+ anno::display_name("Gloss_Color"),
143
+ anno::ui_order(32),
144
+ anno::in_group("Roughness")
145
+ ]],
146
+ uniform texture_2d Gloss_Tex = texture_2d("./Textures/white.png",::tex::gamma_srgb)
147
+ [[
148
+ anno::display_name("Gloss_Tex"),
149
+ anno::ui_order(32),
150
+ anno::in_group("Roughness"),
151
+ sampler_color()
152
+ ]],
153
+ float4 Gloss_UVA = float4(1.0,1.0,0.0,0.0)
154
+ [[
155
+ anno::display_name("Gloss_UVA"),
156
+ anno::ui_order(32),
157
+ anno::in_group("Roughness")
158
+ ]],
159
+ float PolygonOffset = 0.0
160
+ [[
161
+ anno::display_name("PolygonOffset"),
162
+ anno::ui_order(32),
163
+ anno::in_group("WorldPosition")
164
+ ]],
165
+ int MaxTexCoordIndex = 3
166
+ [[
167
+ anno::hidden()
168
+ ]])
169
+ =
170
+ let {
171
+ float3 Local82 = ::camera_position();
172
+ 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));
173
+ float Local84 = math::dot(Local83, Local83);
174
+ float Local85 = math::sqrt(Local84);
175
+ float3 Local86 = (Local83 / Local85);
176
+ float3 Local87 = (Local86 * PolygonOffset);
177
+
178
+ float3 WorldPositionOffset_mdl = Local87;
179
+ float2 CustomizedUV0_mdl = float2(state::texture_coordinate(math::min(0,MaxTexCoordIndex)).x,1.0-state::texture_coordinate(math::min(0,MaxTexCoordIndex)).y);
180
+
181
+ float2 Local0 = (float2(0.5,0.5) * -1.0);
182
+ float Local1 = (CustomizedUV0_mdl.x * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).x);
183
+ float Local2 = (CustomizedUV0_mdl.y * float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).y);
184
+ float2 Local3 = (Local0 + float2(Local1,Local2));
185
+ float Local4 = (3.141592 * -2.0);
186
+ float Local5 = (float3(Normal_UVA.x,Normal_UVA.y,Normal_UVA.z).z / Local4);
187
+ float Local6 = (Local5 * 6.283185);
188
+ float Local7 = math::cos(Local6);
189
+ float Local8 = math::sin(Local6);
190
+ float Local9 = (Local8 * -1.0);
191
+ float Local10 = math::dot(Local3, float2(Local7,Local9));
192
+ float Local11 = math::dot(Local3, float2(Local8,Local7));
193
+ float2 Local12 = (float2(0.5,0.5) + float2(Local10,Local11));
194
+ float4 Local13 = ::unpack_normal_map(tex::lookup_float4(Normal_Tex,float2(Local12.x,1.0-Local12.y),tex::wrap_repeat,tex::wrap_repeat));
195
+ float3 Local14 = ((math::abs(1.0 - 1.0) > 0.00001) ? (float3(0.0,0.0,0.0)) : float3(Local13.x,Local13.y,Local13.z));
196
+
197
+ float3 Normal_mdl = Local14;
198
+
199
+ float Local15 = (CustomizedUV0_mdl.x * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).x);
200
+ float Local16 = (CustomizedUV0_mdl.y * float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).y);
201
+ float2 Local17 = (Local0 + float2(Local15,Local16));
202
+ float Local18 = (float3(Emissive_UVA.x,Emissive_UVA.y,Emissive_UVA.z).z / Local4);
203
+ float Local19 = (Local18 * 6.283185);
204
+ float Local20 = math::cos(Local19);
205
+ float Local21 = math::sin(Local19);
206
+ float Local22 = (Local21 * -1.0);
207
+ float Local23 = math::dot(Local17, float2(Local20,Local22));
208
+ float Local24 = math::dot(Local17, float2(Local21,Local20));
209
+ float2 Local25 = (float2(0.5,0.5) + float2(Local23,Local24));
210
+ float4 Local26 = tex::lookup_float4(Emissive_Tex,float2(Local25.x,1.0-Local25.y),tex::wrap_repeat,tex::wrap_repeat);
211
+ 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));
212
+ float3 Local28 = (EmissiveIntensity * Local27);
213
+ float Local29 = (CustomizedUV0_mdl.x * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).x);
214
+ float Local30 = (CustomizedUV0_mdl.y * float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).y);
215
+ float2 Local31 = (Local0 + float2(Local29,Local30));
216
+ float Local32 = (float3(BaseColor_UVA.x,BaseColor_UVA.y,BaseColor_UVA.z).z / Local4);
217
+ float Local33 = (Local32 * 6.283185);
218
+ float Local34 = math::cos(Local33);
219
+ float Local35 = math::sin(Local33);
220
+ float Local36 = (Local35 * -1.0);
221
+ float Local37 = math::dot(Local31, float2(Local34,Local36));
222
+ float Local38 = math::dot(Local31, float2(Local35,Local34));
223
+ float2 Local39 = (float2(0.5,0.5) + float2(Local37,Local38));
224
+ float4 Local40 = tex::lookup_float4(BaseColor_Tex,float2(Local39.x,1.0-Local39.y),tex::wrap_repeat,tex::wrap_repeat);
225
+ 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));
226
+ float Local42 = (CustomizedUV0_mdl.x * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).x);
227
+ float Local43 = (CustomizedUV0_mdl.y * float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).y);
228
+ float2 Local44 = (Local0 + float2(Local42,Local43));
229
+ float Local45 = (float3(Metallic_UVA.x,Metallic_UVA.y,Metallic_UVA.z).z / Local4);
230
+ float Local46 = (Local45 * 6.283185);
231
+ float Local47 = math::cos(Local46);
232
+ float Local48 = math::sin(Local46);
233
+ float Local49 = (Local48 * -1.0);
234
+ float Local50 = math::dot(Local44, float2(Local47,Local49));
235
+ float Local51 = math::dot(Local44, float2(Local48,Local47));
236
+ float2 Local52 = (float2(0.5,0.5) + float2(Local50,Local51));
237
+ float4 Local53 = tex::lookup_float4(Metallic_Tex,float2(Local52.x,1.0-Local52.y),tex::wrap_repeat,tex::wrap_repeat);
238
+ 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));
239
+ float Local55 = (CustomizedUV0_mdl.x * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).x);
240
+ float Local56 = (CustomizedUV0_mdl.y * float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).y);
241
+ float2 Local57 = (Local0 + float2(Local55,Local56));
242
+ float Local58 = (float3(Specular_UVA.x,Specular_UVA.y,Specular_UVA.z).z / Local4);
243
+ float Local59 = (Local58 * 6.283185);
244
+ float Local60 = math::cos(Local59);
245
+ float Local61 = math::sin(Local59);
246
+ float Local62 = (Local61 * -1.0);
247
+ float Local63 = math::dot(Local57, float2(Local60,Local62));
248
+ float Local64 = math::dot(Local57, float2(Local61,Local60));
249
+ float2 Local65 = (float2(0.5,0.5) + float2(Local63,Local64));
250
+ float4 Local66 = tex::lookup_float4(Specular_Tex,float2(Local65.x,1.0-Local65.y),tex::wrap_repeat,tex::wrap_repeat);
251
+ 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));
252
+ float Local68 = (CustomizedUV0_mdl.x * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).x);
253
+ float Local69 = (CustomizedUV0_mdl.y * float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).y);
254
+ float2 Local70 = (Local0 + float2(Local68,Local69));
255
+ float Local71 = (float3(Gloss_UVA.x,Gloss_UVA.y,Gloss_UVA.z).z / Local4);
256
+ float Local72 = (Local71 * 6.283185);
257
+ float Local73 = math::cos(Local72);
258
+ float Local74 = math::sin(Local72);
259
+ float Local75 = (Local74 * -1.0);
260
+ float Local76 = math::dot(Local70, float2(Local73,Local75));
261
+ float Local77 = math::dot(Local70, float2(Local74,Local73));
262
+ float2 Local78 = (float2(0.5,0.5) + float2(Local76,Local77));
263
+ float4 Local79 = tex::lookup_float4(Gloss_Tex,float2(Local78.x,1.0-Local78.y),tex::wrap_repeat,tex::wrap_repeat);
264
+ 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));
265
+ float3 Local81 = (1.0 - Local80);
266
+
267
+ float3 EmissiveColor_mdl = Local28;
268
+ float OpacityMask_mdl = 1.0;
269
+ float3 BaseColor_mdl = Local41;
270
+ float Metallic_mdl = Local54.x;
271
+ float Specular_mdl = Local67.x;
272
+ float Roughness_mdl = Local81.x;
273
+
274
+ } in
275
+ ::OmniUe4Base(
276
+ base_color: BaseColor_mdl,
277
+ metallic: Metallic_mdl,
278
+ roughness: Roughness_mdl,
279
+ specular: Specular_mdl,
280
+ normal: Normal_mdl,
281
+ opacity: OpacityMask_mdl,
282
+ emissive_color: EmissiveColor_mdl,
283
+ displacement: WorldPositionOffset_mdl,
284
+ two_sided: false);
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/OmniUe4Base.mdl ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***************************************************************************************************
2
+ * Copyright 2020 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions
6
+ * are met:
7
+ * * Redistributions of source code must retain the above copyright
8
+ * notice, this list of conditions and the following disclaimer.
9
+ * * Redistributions in binary form must reproduce the above copyright
10
+ * notice, this list of conditions and the following disclaimer in the
11
+ * documentation and/or other materials provided with the distribution.
12
+ * * Neither the name of NVIDIA CORPORATION nor the names of its
13
+ * contributors may be used to endorse or promote products derived
14
+ * from this software without specific prior written permission.
15
+ *
16
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ **************************************************************************************************/
28
+
29
+ //* 1.0.0 - first version
30
+ //* 1.0.1 - merge unlit template
31
+ //* 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
32
+ //* 1.0.3 - UE4 normal mapping: Geometry normal shouldn't be changed
33
+ //* 1.0.4 - using absolute import paths when importing standard modules
34
+
35
+ mdl 1.3;
36
+
37
+ import ::df::*;
38
+ import ::state::*;
39
+ import ::math::*;
40
+ import ::tex::*;
41
+ import ::anno::*;
42
+
43
+ float emissive_multiplier()
44
+ [[
45
+ anno::description("the multiplier to convert UE4 emissive to raw data"),
46
+ anno::noinline()
47
+ ]]
48
+ {
49
+ return 20.0f * 128.0f;
50
+ }
51
+
52
+ float3 tangent_space_normal(
53
+ float3 normal = float3(0.0,0.0,1.0),
54
+ float3 tangent_u = state::texture_tangent_u(0),
55
+ float3 tangent_v = state::texture_tangent_v(0)
56
+ )
57
+ [[
58
+ anno::description("Interprets the vector in tangent space"),
59
+ anno::noinline()
60
+ ]]
61
+ {
62
+ return math::normalize(
63
+ tangent_u * normal.x - /* flip_tangent_v */
64
+ tangent_v * normal.y +
65
+ state::normal() * (normal.z));
66
+ }
67
+
68
+ float3 world_space_normal(
69
+ float3 normal = float3(0.0,0.0,1.0),
70
+ float3 tangent_u = state::texture_tangent_u(0),
71
+ float3 tangent_v = state::texture_tangent_v(0)
72
+ )
73
+ [[
74
+ anno::description("Interprets the vector in world space"),
75
+ anno::noinline()
76
+ ]]
77
+ {
78
+ return tangent_space_normal(
79
+ math::normalize(
80
+ normal.x * float3(tangent_u.x, tangent_v.x, state::normal().x) -
81
+ normal.y * float3(tangent_u.y, tangent_v.y, state::normal().y) +
82
+ normal.z * float3(tangent_u.z, tangent_v.z, state::normal().z)),
83
+ tangent_u,
84
+ tangent_v
85
+ );
86
+ }
87
+
88
+ export material OmniUe4Base(
89
+ float3 base_color = float3(0.0, 0.0, 0.0),
90
+ float metallic = 0.0,
91
+ float roughness = 0.5,
92
+ float specular = 0.5,
93
+ float3 normal = float3(0.0,0.0,1.0),
94
+ float clearcoat_weight = 0.0,
95
+ float clearcoat_roughness = 0.0,
96
+ float3 clearcoat_normal = float3(0.0,0.0,1.0),
97
+ uniform bool enable_opacity = true,
98
+ float opacity = 1.0,
99
+ float3 emissive_color = float3(0.0, 0.0, 0.0),
100
+ float3 displacement = float3(0.0),
101
+ uniform bool is_tangent_space_normal = true,
102
+ uniform bool two_sided = false,
103
+ uniform bool is_unlit = false
104
+ )
105
+ [[
106
+ anno::display_name("Omni UE4 Base"),
107
+ anno::description("Omni UE4 Base, supports UE4 default lit and clearcoat shading model"),
108
+ anno::version( 1, 0, 0),
109
+ anno::author("NVIDIA CORPORATION"),
110
+ anno::key_words(string[]("omni", "UE4", "omniverse", "lit", "clearcoat", "generic"))
111
+ ]]
112
+ = let {
113
+ color final_base_color = math::saturate(base_color);
114
+ float final_metallic = math::saturate(metallic);
115
+ float final_roughness = math::saturate(roughness);
116
+ float final_specular = math::saturate(specular);
117
+ color final_emissive_color = math::max(emissive_color, 0.0f) * emissive_multiplier(); /*factor for converting ue4 emissive to raw value*/
118
+ float final_clearcoat_weight = math::saturate(clearcoat_weight);
119
+ float final_clearcoat_roughness = math::saturate(clearcoat_roughness);
120
+ float3 final_normal = math::normalize(normal);
121
+ float3 final_clearcoat_normal = math::normalize(clearcoat_normal);
122
+
123
+ // - compute final roughness by squaring the "roughness" parameter
124
+ float alpha = final_roughness * final_roughness;
125
+ // reduce the reflectivity at grazing angles to avoid "dark edges" for high roughness due to the layering
126
+ float grazing_refl = math::max((1.0 - final_roughness), 0.0);
127
+
128
+ float3 the_normal = is_unlit ? state::normal() :
129
+ (is_tangent_space_normal ?
130
+ tangent_space_normal(
131
+ normal: final_normal,
132
+ tangent_u: state::texture_tangent_u(0),
133
+ tangent_v: state::texture_tangent_v(0)
134
+ ) : world_space_normal(
135
+ normal: final_normal,
136
+ tangent_u: state::texture_tangent_u(0),
137
+ tangent_v: state::texture_tangent_v(0)
138
+ ));
139
+
140
+ // for the dielectric component we layer the glossy component on top of the diffuse one,
141
+ // the glossy layer has no color tint
142
+
143
+ bsdf dielectric_component = df::custom_curve_layer(
144
+ weight: final_specular,
145
+ normal_reflectivity: 0.08,
146
+ grazing_reflectivity: grazing_refl,
147
+ layer: df::microfacet_ggx_smith_bsdf(roughness_u: alpha),
148
+ base: df::diffuse_reflection_bsdf(tint: final_base_color),
149
+ normal: the_normal);
150
+
151
+ // the metallic component doesn't have a diffuse component, it's only glossy
152
+ // base_color is applied to tint it
153
+ bsdf metallic_component = df::microfacet_ggx_smith_bsdf(tint: final_base_color, roughness_u: alpha);
154
+
155
+ // final BSDF is a linear blend between dielectric and metallic component
156
+ bsdf dielectric_metal_mix =
157
+ df::normalized_mix(
158
+ components:
159
+ df::bsdf_component[](
160
+ df::bsdf_component(
161
+ component: metallic_component,
162
+ weight: final_metallic),
163
+ df::bsdf_component(
164
+ component: dielectric_component,
165
+ weight: 1.0-final_metallic)
166
+ )
167
+ );
168
+
169
+ // clearcoat layer
170
+ float clearcoat_grazing_refl = math::max((1.0 - final_clearcoat_roughness), 0.0);
171
+ float clearcoat_alpha = final_clearcoat_roughness * final_clearcoat_roughness;
172
+
173
+ float3 the_clearcoat_normal = is_tangent_space_normal ? tangent_space_normal(
174
+ normal: final_clearcoat_normal,
175
+ tangent_u: state::texture_tangent_u(0),
176
+ tangent_v: state::texture_tangent_v(0)
177
+ ) : world_space_normal(
178
+ normal: final_clearcoat_normal,
179
+ tangent_u: state::texture_tangent_u(0),
180
+ tangent_v: state::texture_tangent_v(0)
181
+ );
182
+
183
+
184
+ bsdf clearcoat =
185
+ df::custom_curve_layer(
186
+ base: df::weighted_layer(
187
+ layer: dielectric_metal_mix,
188
+ weight: 1.0,
189
+ normal: final_clearcoat_weight == 0.0 ? state::normal() : the_normal
190
+ ),
191
+ layer: df::microfacet_ggx_smith_bsdf(
192
+ roughness_u: clearcoat_alpha,
193
+ tint: color(1.0)
194
+ ),
195
+ normal_reflectivity: 0.04,
196
+ grazing_reflectivity: clearcoat_grazing_refl,
197
+ normal: the_clearcoat_normal,
198
+ weight: final_clearcoat_weight
199
+ );
200
+ bsdf surface = is_unlit ? bsdf() : clearcoat;
201
+ }
202
+ in material(
203
+ thin_walled: two_sided, // Graphene?
204
+ surface: material_surface(
205
+ scattering: surface,
206
+ emission:
207
+ material_emission (
208
+ emission: df::diffuse_edf (),
209
+ intensity: final_emissive_color
210
+ )
211
+ ),
212
+ backface: material_surface(
213
+ emission:
214
+ material_emission (
215
+ emission: df::diffuse_edf (),
216
+ intensity: final_emissive_color
217
+ )
218
+ ),
219
+ geometry: material_geometry(
220
+ displacement: displacement,
221
+ normal: final_clearcoat_weight == 0.0 ? the_normal : state::normal(),
222
+ cutout_opacity: enable_opacity ? opacity : 1.0
223
+ )
224
+ );
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/Materials/OmniUe4Function.mdl ADDED
@@ -0,0 +1,1413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***************************************************************************************************
2
+ * Copyright 2020 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions
6
+ * are met:
7
+ * * Redistributions of source code must retain the above copyright
8
+ * notice, this list of conditions and the following disclaimer.
9
+ * * Redistributions in binary form must reproduce the above copyright
10
+ * notice, this list of conditions and the following disclaimer in the
11
+ * documentation and/or other materials provided with the distribution.
12
+ * * Neither the name of NVIDIA CORPORATION nor the names of its
13
+ * contributors may be used to endorse or promote products derived
14
+ * from this software without specific prior written permission.
15
+ *
16
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ **************************************************************************************************/
28
+
29
+ //* 1.0.1 - using absolute import paths when importing standard modules
30
+
31
+ mdl 1.6;
32
+
33
+ import ::df::*;
34
+ import ::state::*;
35
+ import ::math::*;
36
+ import ::tex::*;
37
+ import ::anno::*;
38
+
39
+
40
+ export float3 convert_to_left_hand(float3 vec3, uniform bool up_z = true, uniform bool is_position = true)
41
+ [[
42
+ anno::description("convert from RH to LH"),
43
+ anno::noinline()
44
+ ]]
45
+ {
46
+ float4x4 ZupConversion = float4x4(
47
+ 1.0f, 0.0f, 0.0f, 0.0f,
48
+ 0.0f, -1.0f, 0.0f, 0.0f,
49
+ 0.0f, 0.0f, 1.0f, 0.0f,
50
+ 0.0f, 0.0f, 0.0f, 1.0f
51
+ );
52
+
53
+ float4x4 YupConversion = float4x4(
54
+ 1.0f, 0.0f, 0.0f, 0.0f,
55
+ 0.0f, 0.0f, 1.0f, 0.0f,
56
+ 0.0f, 1.0f, 0.0f, 0.0f,
57
+ 0.0f, 0.0f, 0.0f, 1.0f
58
+ );
59
+
60
+ float4 vec4 = float4(vec3.x, vec3.y, vec3.z, is_position ? 1.0f : 0.0f);
61
+
62
+ vec4 = vec4 * (up_z ? ZupConversion : YupConversion);
63
+
64
+ return float3(vec4.x, vec4.y, vec4.z);
65
+ }
66
+
67
+ export float3 transform_vector_from_tangent_to_world(float3 vector,
68
+ uniform bool up_z = true,
69
+ float3 tangent_u = state::texture_tangent_u(0),
70
+ float3 tangent_v = state::texture_tangent_v(0))
71
+ [[
72
+ anno::description("Transform vector from tangent space to world space"),
73
+ anno::noinline()
74
+ ]]
75
+ {
76
+ /* flip_tangent_v */
77
+ return convert_to_left_hand(
78
+ tangent_u * vector.x - tangent_v * vector.y + state::normal() * vector.z,
79
+ up_z, false);
80
+ }
81
+
82
+ export float3 transform_vector_from_world_to_tangent(float3 vector,
83
+ uniform bool up_z = true,
84
+ float3 tangent_u = state::texture_tangent_u(0),
85
+ float3 tangent_v = state::texture_tangent_v(0))
86
+ [[
87
+ anno::description("Transform vector from world space to tangent space"),
88
+ anno::noinline()
89
+ ]]
90
+ {
91
+ float3 vecRH = convert_to_left_hand(vector, up_z, false);
92
+ /* flip_tangent_v */
93
+ return vecRH.x * float3(tangent_u.x, -tangent_v.x, state::normal().x) +
94
+ vecRH.y * float3(tangent_u.y, -tangent_v.y, state::normal().y) +
95
+ vecRH.z * float3(tangent_u.z, -tangent_v.z, state::normal().z);
96
+ }
97
+
98
+ export float4 unpack_normal_map(
99
+ float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0)
100
+ )
101
+ [[
102
+ anno::description("Unpack a normal stored in a normal map"),
103
+ anno::noinline()
104
+ ]]
105
+ {
106
+ float2 normal_xy = float2(texture_sample.x, texture_sample.y);
107
+
108
+ normal_xy = normal_xy * float2(2.0,2.0) - float2(1.0,1.0);
109
+ float normal_z = math::sqrt( math::saturate( 1.0 - math::dot( normal_xy, normal_xy ) ) );
110
+ return float4( normal_xy.x, normal_xy.y, normal_z, 1.0 );
111
+ }
112
+
113
+ // for get color value from normal.
114
+ export float4 pack_normal_map(
115
+ float4 texture_sample = float4(0.0, 0.0, 1.0, 1.0)
116
+ )
117
+ [[
118
+ anno::description("Pack to color from a normal")
119
+ ]]
120
+ {
121
+ float2 return_xy = float2(texture_sample.x, texture_sample.y);
122
+
123
+ return_xy = (return_xy + float2(1.0,1.0)) / float2(2.0,2.0);
124
+
125
+ return float4( return_xy.x, return_xy.y, 0.0, 1.0 );
126
+ }
127
+
128
+ export float4 greyscale_texture_lookup(
129
+ float4 texture_sample = float4(0.0, 0.0, 0.0, 1.0)
130
+ )
131
+ [[
132
+ anno::description("Sampling a greyscale texture"),
133
+ anno::noinline()
134
+ ]]
135
+ {
136
+ return float4(texture_sample.x, texture_sample.x, texture_sample.x, texture_sample.x);
137
+ }
138
+
139
+ export float3 pixel_normal_world_space(uniform bool up_z = true)
140
+ [[
141
+ anno::description("Pixel normal in world space"),
142
+ anno::noinline()
143
+ ]]
144
+ {
145
+ return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
146
+ }
147
+
148
+ export float3 vertex_normal_world_space(uniform bool up_z = true)
149
+ [[
150
+ anno::description("Vertex normal in world space"),
151
+ anno::noinline()
152
+ ]]
153
+ {
154
+ return convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
155
+ }
156
+
157
+ export float3 landscape_normal_world_space(uniform bool up_z = true)
158
+ [[
159
+ anno::description("Landscape normal in world space")
160
+ ]]
161
+ {
162
+ float3 normalFromNormalmap = math::floor((::vertex_normal_world_space(up_z) * 0.5 + 0.5) * 255.0) / 255.0 * 2.0 - 1.0;
163
+
164
+ float2 normalXY = float2(normalFromNormalmap.x, normalFromNormalmap.y);
165
+ return float3(normalXY.x, normalXY.y, math::sqrt(math::saturate(1.0 - math::dot(normalXY, normalXY))));
166
+ }
167
+
168
+ // Different implementation specific between mdl and hlsl for smoothstep
169
+ export float smoothstep(float a, float b, float l)
170
+ {
171
+ if (a < b)
172
+ {
173
+ return math::smoothstep(a, b, l);
174
+ }
175
+ else if (a > b)
176
+ {
177
+ return 1.0 - math::smoothstep(b, a, l);
178
+ }
179
+ else
180
+ {
181
+ return l <= a ? 0.0 : 1.0;
182
+ }
183
+ }
184
+
185
+ export float2 smoothstep(float2 a, float2 b, float2 l)
186
+ {
187
+ return float2(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y));
188
+ }
189
+
190
+ export float3 smoothstep(float3 a, float3 b, float3 l)
191
+ {
192
+ return float3(smoothstep(a.x, b.x, l.x), smoothstep(a.y, b.y, l.y), smoothstep(a.z, b.z, l.z));
193
+ }
194
+
195
+ export float4 smoothstep(float4 a, float4 b, float4 l)
196
+ {
197
+ 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));
198
+ }
199
+
200
+ export float2 smoothstep(float2 a, float2 b, float l)
201
+ {
202
+ return float2(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l));
203
+ }
204
+
205
+ export float3 smoothstep(float3 a, float3 b, float l)
206
+ {
207
+ return float3(smoothstep(a.x, b.x, l), smoothstep(a.y, b.y, l), smoothstep(a.z, b.z, l));
208
+ }
209
+
210
+ export float4 smoothstep(float4 a, float4 b, float l)
211
+ {
212
+ 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));
213
+ }
214
+
215
+ export float2 smoothstep(float a, float b, float2 l)
216
+ {
217
+ return float2(smoothstep(a, b, l.x), smoothstep(a, b, l.y));
218
+ }
219
+
220
+ export float3 smoothstep(float a, float b, float3 l)
221
+ {
222
+ return float3(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z));
223
+ }
224
+
225
+ export float4 smoothstep(float a, float b, float4 l)
226
+ {
227
+ return float4(smoothstep(a, b, l.x), smoothstep(a, b, l.y), smoothstep(a, b, l.z), smoothstep(a, b, l.w));
228
+ }
229
+
230
+ //------------------ Random from UE4 -----------------------
231
+ float length2(float3 v)
232
+ {
233
+ return math::dot(v, v);
234
+ }
235
+
236
+ float3 GetPerlinNoiseGradientTextureAt(uniform texture_2d PerlinNoiseGradientTexture, float3 v)
237
+ {
238
+ const float2 ZShear = float2(17.0f, 89.0f);
239
+
240
+ float2 OffsetA = v.z * ZShear;
241
+ float2 TexA = (float2(v.x, v.y) + OffsetA + 0.5f) / 128.0f;
242
+ float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA.x,1.0-TexA.y),tex::wrap_repeat,tex::wrap_repeat);
243
+ return float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z) * 2.0 - 1.0;
244
+ }
245
+
246
+ float3 SkewSimplex(float3 In)
247
+ {
248
+ return In + math::dot(In, float3(1.0 / 3.0f) );
249
+ }
250
+ float3 UnSkewSimplex(float3 In)
251
+ {
252
+ return In - math::dot(In, float3(1.0 / 6.0f) );
253
+ }
254
+
255
+ // 3D random number generator inspired by PCGs (permuted congruential generator)
256
+ // Using a **simple** Feistel cipher in place of the usual xor shift permutation step
257
+ // @param v = 3D integer coordinate
258
+ // @return three elements w/ 16 random bits each (0-0xffff).
259
+ // ~8 ALU operations for result.x (7 mad, 1 >>)
260
+ // ~10 ALU operations for result.xy (8 mad, 2 >>)
261
+ // ~12 ALU operations for result.xyz (9 mad, 3 >>)
262
+
263
+ //TODO: uint3
264
+ int3 Rand3DPCG16(int3 p)
265
+ {
266
+ // taking a signed int then reinterpreting as unsigned gives good behavior for negatives
267
+ //TODO: uint3
268
+ int3 v = int3(p);
269
+
270
+ // Linear congruential step. These LCG constants are from Numerical Recipies
271
+ // For additional #'s, PCG would do multiple LCG steps and scramble each on output
272
+ // So v here is the RNG state
273
+ v = v * 1664525 + 1013904223;
274
+
275
+ // PCG uses xorshift for the final shuffle, but it is expensive (and cheap
276
+ // versions of xorshift have visible artifacts). Instead, use simple MAD Feistel steps
277
+ //
278
+ // Feistel ciphers divide the state into separate parts (usually by bits)
279
+ // then apply a series of permutation steps one part at a time. The permutations
280
+ // use a reversible operation (usually ^) to part being updated with the result of
281
+ // a permutation function on the other parts and the key.
282
+ //
283
+ // In this case, I'm using v.x, v.y and v.z as the parts, using + instead of ^ for
284
+ // the combination function, and just multiplying the other two parts (no key) for
285
+ // the permutation function.
286
+ //
287
+ // That gives a simple mad per round.
288
+ v.x += v.y*v.z;
289
+ v.y += v.z*v.x;
290
+ v.z += v.x*v.y;
291
+ v.x += v.y*v.z;
292
+ v.y += v.z*v.x;
293
+ v.z += v.x*v.y;
294
+
295
+ // only top 16 bits are well shuffled
296
+ return v >> 16;
297
+ }
298
+
299
+ // Wraps noise for tiling texture creation
300
+ // @param v = unwrapped texture parameter
301
+ // @param bTiling = true to tile, false to not tile
302
+ // @param RepeatSize = number of units before repeating
303
+ // @return either original or wrapped coord
304
+ float3 NoiseTileWrap(float3 v, bool bTiling, float RepeatSize)
305
+ {
306
+ return bTiling ? (math::frac(v / RepeatSize) * RepeatSize) : v;
307
+ }
308
+
309
+ // Evaluate polynomial to get smooth transitions for Perlin noise
310
+ // only needed by Perlin functions in this file
311
+ // scalar(per component): 2 add, 5 mul
312
+ float4 PerlinRamp(float4 t)
313
+ {
314
+ return t * t * t * (t * (t * 6 - 15) + 10);
315
+ }
316
+
317
+ // Blum-Blum-Shub-inspired pseudo random number generator
318
+ // http://www.umbc.edu/~olano/papers/mNoise.pdf
319
+ // real BBS uses ((s*s) mod M) with bignums and M as the product of two huge Blum primes
320
+ // instead, we use a single prime M just small enough not to overflow
321
+ // note that the above paper used 61, which fits in a half, but is unusably bad
322
+ // @param Integer valued floating point seed
323
+ // @return random number in range [0,1)
324
+ // ~8 ALU operations (5 *, 3 frac)
325
+ float RandBBSfloat(float seed)
326
+ {
327
+ float BBS_PRIME24 = 4093.0;
328
+ float s = math::frac(seed / BBS_PRIME24);
329
+ s = math::frac(s * s * BBS_PRIME24);
330
+ s = math::frac(s * s * BBS_PRIME24);
331
+ return s;
332
+ }
333
+
334
+ // Modified noise gradient term
335
+ // @param seed - random seed for integer lattice position
336
+ // @param offset - [-1,1] offset of evaluation point from lattice point
337
+ // @return gradient direction (xyz) and contribution (w) from this lattice point
338
+ float4 MGradient(int seed, float3 offset)
339
+ {
340
+ //TODO uint
341
+ int rand = Rand3DPCG16(int3(seed,0,0)).x;
342
+ int3 MGradientMask = int3(0x8000, 0x4000, 0x2000);
343
+ float3 MGradientScale = float3(1.0 / 0x4000, 1.0 / 0x2000, 1.0 / 0x1000);
344
+ float3 direction = float3(int3(rand, rand, rand) & MGradientMask) * MGradientScale - 1;
345
+ return float4(direction.x, direction.y, direction.z, math::dot(direction, offset));
346
+ }
347
+
348
+ // compute Perlin and related noise corner seed values
349
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
350
+ // @param bTiling = true to return seed values for a repeating noise pattern
351
+ // @param RepeatSize = integer units before tiling in each dimension
352
+ // @param seed000-seed111 = hash function seeds for the eight corners
353
+ // @return fractional part of v
354
+ struct SeedValue
355
+ {
356
+ float3 fv = float3(0);
357
+ float seed000 = 0;
358
+ float seed001 = 0;
359
+ float seed010 = 0;
360
+ float seed011 = 0;
361
+ float seed100 = 0;
362
+ float seed101 = 0;
363
+ float seed110 = 0;
364
+ float seed111 = 0;
365
+ };
366
+
367
+ SeedValue NoiseSeeds(float3 v, bool bTiling, float RepeatSize)
368
+ {
369
+ SeedValue seeds;
370
+ seeds.fv = math::frac(v);
371
+ float3 iv = math::floor(v);
372
+
373
+ const float3 primes = float3(19, 47, 101);
374
+
375
+ if (bTiling)
376
+ { // can't algebraically combine with primes
377
+ seeds.seed000 = math::dot(primes, NoiseTileWrap(iv, true, RepeatSize));
378
+ seeds.seed100 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 0), true, RepeatSize));
379
+ seeds.seed010 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 0), true, RepeatSize));
380
+ seeds.seed110 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 0), true, RepeatSize));
381
+ seeds.seed001 = math::dot(primes, NoiseTileWrap(iv + float3(0, 0, 1), true, RepeatSize));
382
+ seeds.seed101 = math::dot(primes, NoiseTileWrap(iv + float3(1, 0, 1), true, RepeatSize));
383
+ seeds.seed011 = math::dot(primes, NoiseTileWrap(iv + float3(0, 1, 1), true, RepeatSize));
384
+ seeds.seed111 = math::dot(primes, NoiseTileWrap(iv + float3(1, 1, 1), true, RepeatSize));
385
+ }
386
+ else
387
+ { // get to combine offsets with multiplication by primes in this case
388
+ seeds.seed000 = math::dot(iv, primes);
389
+ seeds.seed100 = seeds.seed000 + primes.x;
390
+ seeds.seed010 = seeds.seed000 + primes.y;
391
+ seeds.seed110 = seeds.seed100 + primes.y;
392
+ seeds.seed001 = seeds.seed000 + primes.z;
393
+ seeds.seed101 = seeds.seed100 + primes.z;
394
+ seeds.seed011 = seeds.seed010 + primes.z;
395
+ seeds.seed111 = seeds.seed110 + primes.z;
396
+ }
397
+
398
+ return seeds;
399
+ }
400
+
401
+ struct SimplexWeights
402
+ {
403
+ float4 Result = float4(0);
404
+ float3 PosA = float3(0);
405
+ float3 PosB = float3(0);
406
+ float3 PosC = float3(0);
407
+ float3 PosD = float3(0);
408
+ };
409
+
410
+ // Computed weights and sample positions for simplex interpolation
411
+ // @return float4(a,b,c, d) Barycentric coordinate defined as Filtered = Tex(PosA) * a + Tex(PosB) * b + Tex(PosC) * c + Tex(PosD) * d
412
+ SimplexWeights ComputeSimplexWeights3D(float3 OrthogonalPos)
413
+ {
414
+ SimplexWeights weights;
415
+ float3 OrthogonalPosFloor = math::floor(OrthogonalPos);
416
+
417
+ weights.PosA = OrthogonalPosFloor;
418
+ weights.PosB = weights.PosA + float3(1, 1, 1);
419
+
420
+ OrthogonalPos -= OrthogonalPosFloor;
421
+
422
+ float Largest = math::max(OrthogonalPos.x, math::max(OrthogonalPos.y, OrthogonalPos.z));
423
+ float Smallest = math::min(OrthogonalPos.x, math::min(OrthogonalPos.y, OrthogonalPos.z));
424
+
425
+ weights.PosC = weights.PosA + float3(Largest == OrthogonalPos.x, Largest == OrthogonalPos.y, Largest == OrthogonalPos.z);
426
+ weights.PosD = weights.PosA + float3(Smallest != OrthogonalPos.x, Smallest != OrthogonalPos.y, Smallest != OrthogonalPos.z);
427
+
428
+ float RG = OrthogonalPos.x - OrthogonalPos.y;
429
+ float RB = OrthogonalPos.x - OrthogonalPos.z;
430
+ float GB = OrthogonalPos.y - OrthogonalPos.z;
431
+
432
+ weights.Result.z =
433
+ math::min(math::max(0, RG), math::max(0, RB)) // X
434
+ + math::min(math::max(0, -RG), math::max(0, GB)) // Y
435
+ + math::min(math::max(0, -RB), math::max(0, -GB)); // Z
436
+
437
+ weights.Result.w =
438
+ math::min(math::max(0, -RG), math::max(0, -RB)) // X
439
+ + math::min(math::max(0, RG), math::max(0, -GB)) // Y
440
+ + math::min(math::max(0, RB), math::max(0, GB)); // Z
441
+
442
+ weights.Result.y = Smallest;
443
+ weights.Result.x = 1.0f - weights.Result.y - weights.Result.z - weights.Result.w;
444
+
445
+ return weights;
446
+ }
447
+
448
+ // filtered 3D gradient simple noise (few texture lookups, high quality)
449
+ // @param v >0
450
+ // @return random number in the range -1 .. 1
451
+ float SimplexNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 EvalPos)
452
+ {
453
+ float3 OrthogonalPos = SkewSimplex(EvalPos);
454
+
455
+ SimplexWeights Weights = ComputeSimplexWeights3D(OrthogonalPos);
456
+
457
+ // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 32 bit)
458
+ float3 A = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosA);
459
+ float3 B = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosB);
460
+ float3 C = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosC);
461
+ float3 D = GetPerlinNoiseGradientTextureAt(PerlinNoiseGradientTexture, Weights.PosD);
462
+
463
+ Weights.PosA = UnSkewSimplex(Weights.PosA);
464
+ Weights.PosB = UnSkewSimplex(Weights.PosB);
465
+ Weights.PosC = UnSkewSimplex(Weights.PosC);
466
+ Weights.PosD = UnSkewSimplex(Weights.PosD);
467
+
468
+ float DistanceWeight;
469
+
470
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosA)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
471
+ float a = math::dot(A, EvalPos - Weights.PosA) * DistanceWeight;
472
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosB)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
473
+ float b = math::dot(B, EvalPos - Weights.PosB) * DistanceWeight;
474
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosC)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
475
+ float c = math::dot(C, EvalPos - Weights.PosC) * DistanceWeight;
476
+ DistanceWeight = math::saturate(0.6f - length2(EvalPos - Weights.PosD)); DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
477
+ float d = math::dot(D, EvalPos - Weights.PosD) * DistanceWeight;
478
+
479
+ return 32 * (a + b + c + d);
480
+ }
481
+
482
+ // filtered 3D noise, can be optimized
483
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
484
+ // @param bTiling = repeat noise pattern
485
+ // @param RepeatSize = integer units before tiling in each dimension
486
+ // @return random number in the range -1 .. 1
487
+ float GradientNoise3D_TEX(uniform texture_2d PerlinNoiseGradientTexture, float3 v, bool bTiling, float RepeatSize)
488
+ {
489
+ bTiling = true;
490
+ float3 fv = math::frac(v);
491
+ float3 iv0 = NoiseTileWrap(math::floor(v), bTiling, RepeatSize);
492
+ float3 iv1 = NoiseTileWrap(iv0 + 1, bTiling, RepeatSize);
493
+
494
+ const int2 ZShear = int2(17, 89);
495
+
496
+ float2 OffsetA = iv0.z * ZShear;
497
+ float2 OffsetB = OffsetA + ZShear; // non-tiling, use relative offset
498
+ if (bTiling) // tiling, have to compute from wrapped coordinates
499
+ {
500
+ OffsetB = iv1.z * ZShear;
501
+ }
502
+
503
+ // Texture size scale factor
504
+ float ts = 1 / 128.0f;
505
+
506
+ // texture coordinates for iv0.xy, as offset for both z slices
507
+ float2 TexA0 = (float2(iv0.x, iv0.y) + OffsetA + 0.5f) * ts;
508
+ float2 TexB0 = (float2(iv0.x, iv0.y) + OffsetB + 0.5f) * ts;
509
+
510
+ // texture coordinates for iv1.xy, as offset for both z slices
511
+ float2 TexA1 = TexA0 + ts; // for non-tiling, can compute relative to existing coordinates
512
+ float2 TexB1 = TexB0 + ts;
513
+ if (bTiling) // for tiling, need to compute from wrapped coordinates
514
+ {
515
+ TexA1 = (float2(iv1.x, iv1.y) + OffsetA + 0.5f) * ts;
516
+ TexB1 = (float2(iv1.x, iv1.y) + OffsetB + 0.5f) * ts;
517
+ }
518
+
519
+
520
+ // can be optimized to 1 or 2 texture lookups (4 or 8 channel encoded in 8, 16 or 32 bit)
521
+ float4 PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat);
522
+ float3 PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
523
+ float3 A = PerlinNoiseColor * 2 - 1;
524
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA0.y),tex::wrap_repeat,tex::wrap_repeat);
525
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
526
+ float3 B = PerlinNoiseColor * 2 - 1;
527
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA0.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat);
528
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
529
+ float3 C = PerlinNoiseColor * 2 - 1;
530
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexA1.x,1.0-TexA1.y),tex::wrap_repeat,tex::wrap_repeat);
531
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
532
+ float3 D = PerlinNoiseColor * 2 - 1;
533
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat);
534
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
535
+ float3 E = PerlinNoiseColor * 2 - 1;
536
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB0.y),tex::wrap_repeat,tex::wrap_repeat);
537
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
538
+ float3 F = PerlinNoiseColor * 2 - 1;
539
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB0.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat);
540
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
541
+ float3 G = PerlinNoiseColor * 2 - 1;
542
+ PerlinNoise = tex::lookup_float4(PerlinNoiseGradientTexture,float2(TexB1.x,1.0-TexB1.y),tex::wrap_repeat,tex::wrap_repeat);
543
+ PerlinNoiseColor = float3(PerlinNoise.x, PerlinNoise.y, PerlinNoise.z);
544
+ float3 H = PerlinNoiseColor * 2 - 1;
545
+
546
+ float a = math::dot(A, fv - float3(0, 0, 0));
547
+ float b = math::dot(B, fv - float3(1, 0, 0));
548
+ float c = math::dot(C, fv - float3(0, 1, 0));
549
+ float d = math::dot(D, fv - float3(1, 1, 0));
550
+ float e = math::dot(E, fv - float3(0, 0, 1));
551
+ float f = math::dot(F, fv - float3(1, 0, 1));
552
+ float g = math::dot(G, fv - float3(0, 1, 1));
553
+ float h = math::dot(H, fv - float3(1, 1, 1));
554
+
555
+ float4 Weights = PerlinRamp(math::frac(float4(fv.x, fv.y, fv.z, 0)));
556
+
557
+ float i = math::lerp(math::lerp(a, b, Weights.x), math::lerp(c, d, Weights.x), Weights.y);
558
+ float j = math::lerp(math::lerp(e, f, Weights.x), math::lerp(g, h, Weights.x), Weights.y);
559
+
560
+ return math::lerp(i, j, Weights.z);
561
+ }
562
+
563
+ // @return random number in the range -1 .. 1
564
+ // scalar: 6 frac, 31 mul/mad, 15 add,
565
+ float FastGradientPerlinNoise3D_TEX(uniform texture_3d PerlinNoise3DTexture, float3 xyz)
566
+ {
567
+ // needs to be the same value when creating the PerlinNoise3D texture
568
+ float Extent = 16;
569
+
570
+ // last texel replicated and needed for filtering
571
+ // scalar: 3 frac, 6 mul
572
+ xyz = math::frac(xyz / (Extent - 1)) * (Extent - 1);
573
+
574
+ // scalar: 3 frac
575
+ float3 uvw = math::frac(xyz);
576
+ // = floor(xyz);
577
+ // scalar: 3 add
578
+ float3 p0 = xyz - uvw;
579
+ // float3 f = math::pow(uvw, 2) * 3.0f - math::pow(uvw, 3) * 2.0f; // original perlin hermite (ok when used without bump mapping)
580
+ // scalar: 2*3 add 5*3 mul
581
+ float4 pr = PerlinRamp(float4(uvw.x, uvw.y, uvw.z, 0));
582
+ float3 f = float3(pr.x, pr.y, pr.z); // new, better with continues second derivative for bump mapping
583
+ // scalar: 3 add
584
+ float3 p = p0 + f;
585
+ // scalar: 3 mad
586
+ // TODO: need reverse???
587
+ float4 NoiseSample = tex::lookup_float4(PerlinNoise3DTexture, p / Extent + 0.5f / Extent); // +0.5f to get rid of bilinear offset
588
+
589
+ // reconstruct from 8bit (using mad with 2 constants and dot4 was same instruction count)
590
+ // scalar: 4 mad, 3 mul, 3 add
591
+ float3 n = float3(NoiseSample.x, NoiseSample.y, NoiseSample.z) * 255.0f / 127.0f - 1.0f;
592
+ float d = NoiseSample.w * 255.f - 127;
593
+ return math::dot(xyz, n) - d;
594
+ }
595
+
596
+ // Perlin-style "Modified Noise"
597
+ // http://www.umbc.edu/~olano/papers/index.html#mNoise
598
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
599
+ // @param bTiling = repeat noise pattern
600
+ // @param RepeatSize = integer units before tiling in each dimension
601
+ // @return random number in the range -1 .. 1
602
+ float GradientNoise3D_ALU(float3 v, bool bTiling, float RepeatSize)
603
+ {
604
+ SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize);
605
+
606
+ float rand000 = MGradient(int(seeds.seed000), seeds.fv - float3(0, 0, 0)).w;
607
+ float rand100 = MGradient(int(seeds.seed100), seeds.fv - float3(1, 0, 0)).w;
608
+ float rand010 = MGradient(int(seeds.seed010), seeds.fv - float3(0, 1, 0)).w;
609
+ float rand110 = MGradient(int(seeds.seed110), seeds.fv - float3(1, 1, 0)).w;
610
+ float rand001 = MGradient(int(seeds.seed001), seeds.fv - float3(0, 0, 1)).w;
611
+ float rand101 = MGradient(int(seeds.seed101), seeds.fv - float3(1, 0, 1)).w;
612
+ float rand011 = MGradient(int(seeds.seed011), seeds.fv - float3(0, 1, 1)).w;
613
+ float rand111 = MGradient(int(seeds.seed111), seeds.fv - float3(1, 1, 1)).w;
614
+
615
+ float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0));
616
+
617
+ float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y);
618
+ float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y);
619
+ return math::lerp(i, j, Weights.z);
620
+ }
621
+
622
+ // 3D value noise - used to be incorrectly called Perlin noise
623
+ // @param v = 3D noise argument, use float3(x,y,0) for 2D or float3(x,0,0) for 1D
624
+ // @param bTiling = repeat noise pattern
625
+ // @param RepeatSize = integer units before tiling in each dimension
626
+ // @return random number in the range -1 .. 1
627
+ float ValueNoise3D_ALU(float3 v, bool bTiling, float RepeatSize)
628
+ {
629
+ SeedValue seeds = NoiseSeeds(v, bTiling, RepeatSize);
630
+
631
+ float rand000 = RandBBSfloat(seeds.seed000) * 2 - 1;
632
+ float rand100 = RandBBSfloat(seeds.seed100) * 2 - 1;
633
+ float rand010 = RandBBSfloat(seeds.seed010) * 2 - 1;
634
+ float rand110 = RandBBSfloat(seeds.seed110) * 2 - 1;
635
+ float rand001 = RandBBSfloat(seeds.seed001) * 2 - 1;
636
+ float rand101 = RandBBSfloat(seeds.seed101) * 2 - 1;
637
+ float rand011 = RandBBSfloat(seeds.seed011) * 2 - 1;
638
+ float rand111 = RandBBSfloat(seeds.seed111) * 2 - 1;
639
+
640
+ float4 Weights = PerlinRamp(float4(seeds.fv.x, seeds.fv.y, seeds.fv.z, 0));
641
+
642
+ float i = math::lerp(math::lerp(rand000, rand100, Weights.x), math::lerp(rand010, rand110, Weights.x), Weights.y);
643
+ float j = math::lerp(math::lerp(rand001, rand101, Weights.x), math::lerp(rand011, rand111, Weights.x), Weights.y);
644
+ return math::lerp(i, j, Weights.z);
645
+ }
646
+
647
+ // 3D jitter offset within a voronoi noise cell
648
+ // @param pos - integer lattice corner
649
+ // @return random offsets vector
650
+ float3 VoronoiCornerSample(float3 pos, int Quality)
651
+ {
652
+ // random values in [-0.5, 0.5]
653
+ float3 noise = float3(Rand3DPCG16(int3(pos))) / 0xffff - 0.5;
654
+
655
+ // quality level 1 or 2: searches a 2x2x2 neighborhood with points distributed on a sphere
656
+ // scale factor to guarantee jittered points will be found within a 2x2x2 search
657
+ if (Quality <= 2)
658
+ {
659
+ return math::normalize(noise) * 0.2588;
660
+ }
661
+
662
+ // quality level 3: searches a 3x3x3 neighborhood with points distributed on a sphere
663
+ // scale factor to guarantee jittered points will be found within a 3x3x3 search
664
+ if (Quality == 3)
665
+ {
666
+ return math::normalize(noise) * 0.3090;
667
+ }
668
+
669
+ // quality level 4: jitter to anywhere in the cell, needs 4x4x4 search
670
+ return noise;
671
+ }
672
+
673
+ // compare previous best with a new candidate
674
+ // not producing point locations makes it easier for compiler to eliminate calculations when they're not needed
675
+ // @param minval = location and distance of best candidate seed point before the new one
676
+ // @param candidate = candidate seed point
677
+ // @param offset = 3D offset to new candidate seed point
678
+ // @param bDistanceOnly = if true, only set maxval.w with distance, otherwise maxval.w is distance and maxval.xyz is position
679
+ // @return position (if bDistanceOnly is false) and distance to closest seed point so far
680
+ float4 VoronoiCompare(float4 minval, float3 candidate, float3 offset, bool bDistanceOnly)
681
+ {
682
+ if (bDistanceOnly)
683
+ {
684
+ return float4(0, 0, 0, math::min(minval.w, math::dot(offset, offset)));
685
+ }
686
+ else
687
+ {
688
+ float newdist = math::dot(offset, offset);
689
+ return newdist > minval.w ? minval : float4(candidate.x, candidate.y, candidate.z, newdist);
690
+ }
691
+ }
692
+
693
+ // 220 instruction Worley noise
694
+ float4 VoronoiNoise3D_ALU(float3 v, int Quality, bool bTiling, float RepeatSize, bool bDistanceOnly)
695
+ {
696
+ float3 fv = math::frac(v), fv2 = math::frac(v + 0.5);
697
+ float3 iv = math::floor(v), iv2 = math::floor(v + 0.5);
698
+
699
+ // with initial minimum distance = infinity (or at least bigger than 4), first min is optimized away
700
+ float4 mindist = float4(0,0,0,100);
701
+ float3 p, offset;
702
+
703
+ // quality level 3: do a 3x3x3 search
704
+ if (Quality == 3)
705
+ {
706
+ int offset_x;
707
+ int offset_y;
708
+ int offset_z;
709
+ for (offset_x = -1; offset_x <= 1; ++offset_x)
710
+ {
711
+ for (offset_y = -1; offset_y <= 1; ++offset_y)
712
+ {
713
+ for (offset_z = -1; offset_z <= 1; ++offset_z)
714
+ {
715
+ offset = float3(offset_x, offset_y, offset_z);
716
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize), Quality);
717
+ mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly);
718
+ }
719
+ }
720
+ }
721
+ }
722
+
723
+ // everybody else searches a base 2x2x2 neighborhood
724
+ else
725
+ {
726
+ int offset_x;
727
+ int offset_y;
728
+ int offset_z;
729
+ for (offset_x = 0; offset_x <= 1; ++offset_x)
730
+ {
731
+ for (offset_y = 0; offset_y <= 1; ++offset_y)
732
+ {
733
+ for (offset_z = 0; offset_z <= 1; ++offset_z)
734
+ {
735
+ offset = float3(offset_x, offset_y, offset_z);
736
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality);
737
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
738
+
739
+ // quality level 2, do extra set of points, offset by half a cell
740
+ if (Quality == 2)
741
+ {
742
+ // 467 is just an offset to a different area in the random number field to avoid similar neighbor artifacts
743
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize) + 467, Quality);
744
+ mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly);
745
+ }
746
+ }
747
+ }
748
+ }
749
+ }
750
+
751
+ // quality level 4: add extra sets of four cells in each direction
752
+ if (Quality >= 4)
753
+ {
754
+ int offset_x;
755
+ int offset_y;
756
+ int offset_z;
757
+ for (offset_x = -1; offset_x <= 2; offset_x += 3)
758
+ {
759
+ for (offset_y = 0; offset_y <= 1; ++offset_y)
760
+ {
761
+ for (offset_z = 0; offset_z <= 1; ++offset_z)
762
+ {
763
+ offset = float3(offset_x, offset_y, offset_z);
764
+ // along x axis
765
+ p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality);
766
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
767
+
768
+ // along y axis
769
+ p = float3(offset.y, offset.z, offset.x) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.y, offset.z, offset.x), bTiling, RepeatSize), Quality);
770
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
771
+
772
+ // along z axis
773
+ p = float3(offset.z, offset.x, offset.y) + VoronoiCornerSample(NoiseTileWrap(iv + float3(offset.z, offset.x, offset.y), bTiling, RepeatSize), Quality);
774
+ mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
775
+ }
776
+ }
777
+ }
778
+ }
779
+
780
+ // transform squared distance to real distance
781
+ return float4(mindist.x, mindist.y, mindist.z, math::sqrt(mindist.w));
782
+ }
783
+
784
+ // Coordinates for corners of a Simplex tetrahedron
785
+ // Based on McEwan et al., Efficient computation of noise in GLSL, JGT 2011
786
+ // @param v = 3D noise argument
787
+ // @return 4 corner locations
788
+ float4x3 SimplexCorners(float3 v)
789
+ {
790
+ // find base corner by skewing to tetrahedral space and back
791
+ float3 tet = math::floor(v + v.x/3 + v.y/3 + v.z/3);
792
+ float3 base = tet - tet.x/6 - tet.y/6 - tet.z/6;
793
+ float3 f = v - base;
794
+
795
+ // Find offsets to other corners (McEwan did this in tetrahedral space,
796
+ // but since skew is along x=y=z axis, this works in Euclidean space too.)
797
+ 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);
798
+ float3 a1 = math::min(g, h) - 1.0 / 6.0, a2 = math::max(g, h) - 1.0 / 3.0;
799
+
800
+ // four corners
801
+ return float4x3(base, base + a1, base + a2, base + 0.5);
802
+ }
803
+
804
+ // Improved smoothing function for simplex noise
805
+ // @param f = fractional distance to four tetrahedral corners
806
+ // @return weight for each corner
807
+ float4 SimplexSmooth(float4x3 f)
808
+ {
809
+ const float scale = 1024. / 375.; // scale factor to make noise -1..1
810
+ 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]));
811
+ float4 s = math::saturate(2 * d);
812
+ return (1 * scale + s*(-3 * scale + s*(3 * scale - s*scale)));
813
+ }
814
+
815
+ // Derivative of simplex noise smoothing function
816
+ // @param f = fractional distanc eto four tetrahedral corners
817
+ // @return derivative of smoothing function for each corner by x, y and z
818
+ float3x4 SimplexDSmooth(float4x3 f)
819
+ {
820
+ const float scale = 1024. / 375.; // scale factor to make noise -1..1
821
+ 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]));
822
+ float4 s = math::saturate(2 * d);
823
+ s = -12 * scale + s*(24 * scale - s * 12 * scale);
824
+
825
+ return float3x4(
826
+ s * float4(f[0][0], f[1][0], f[2][0], f[3][0]),
827
+ s * float4(f[0][1], f[1][1], f[2][1], f[3][1]),
828
+ s * float4(f[0][2], f[1][2], f[2][2], f[3][2]));
829
+ }
830
+
831
+ // Simplex noise and its Jacobian derivative
832
+ // @param v = 3D noise argument
833
+ // @param bTiling = whether to repeat noise pattern
834
+ // @param RepeatSize = integer units before tiling in each dimension, must be a multiple of 3
835
+ // @return float3x3 Jacobian in J[*].xyz, vector noise in J[*].w
836
+ // J[0].w, J[1].w, J[2].w is a Perlin-style simplex noise with vector output, e.g. (Nx, Ny, Nz)
837
+ // J[i].x is X derivative of the i'th component of the noise so J[2].x is dNz/dx
838
+ // You can use this to compute the noise, gradient, curl, or divergence:
839
+ // float3x4 J = JacobianSimplex_ALU(...);
840
+ // float3 VNoise = float3(J[0].w, J[1].w, J[2].w); // 3D noise
841
+ // float3 Grad = J[0].xyz; // gradient of J[0].w
842
+ // float3 Curl = float3(J[1][2]-J[2][1], J[2][0]-J[0][2], J[0][1]-J[1][2]);
843
+ // float Div = J[0][0]+J[1][1]+J[2][2];
844
+ // All of these are confirmed to compile out all unneeded terms.
845
+ // So Grad of X doesn't compute Y or Z components, and VNoise doesn't do any of the derivative computation.
846
+ float3x4 JacobianSimplex_ALU(float3 v, bool bTiling, float RepeatSize)
847
+ {
848
+ int3 MGradientMask = int3(0x8000, 0x4000, 0x2000);
849
+ float3 MGradientScale = float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000);
850
+
851
+ // corners of tetrahedron
852
+ float4x3 T = SimplexCorners(v);
853
+ // TODO: uint3
854
+ int3 rand = int3(0);
855
+ float4x3 gvec0 = float4x3(1.0);
856
+ float4x3 gvec1 = float4x3(1.0);
857
+ float4x3 gvec2 = float4x3(1.0);
858
+ float4x3 fv = float4x3(1.0);
859
+ float3x4 grad = float3x4(1.0);
860
+
861
+ // processing of tetrahedral vertices, unrolled
862
+ // to compute gradient at each corner
863
+ fv[0] = v - T[0];
864
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[0] + 0.5, bTiling, RepeatSize))));
865
+ gvec0[0] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
866
+ gvec1[0] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
867
+ gvec2[0] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
868
+ grad[0][0] = math::dot(gvec0[0], fv[0]);
869
+ grad[1][0] = math::dot(gvec1[0], fv[0]);
870
+ grad[2][0] = math::dot(gvec2[0], fv[0]);
871
+
872
+ fv[1] = v - T[1];
873
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[1] + 0.5, bTiling, RepeatSize))));
874
+ gvec0[1] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
875
+ gvec1[1] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
876
+ gvec1[1] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
877
+ grad[0][1] = math::dot(gvec0[1], fv[1]);
878
+ grad[1][1] = math::dot(gvec1[1], fv[1]);
879
+ grad[2][1] = math::dot(gvec2[1], fv[1]);
880
+
881
+ fv[2] = v - T[2];
882
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[2] + 0.5, bTiling, RepeatSize))));
883
+ gvec0[2] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
884
+ gvec1[2] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
885
+ gvec2[2] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
886
+ grad[0][2] = math::dot(gvec0[2], fv[2]);
887
+ grad[1][2] = math::dot(gvec1[2], fv[2]);
888
+ grad[2][2] = math::dot(gvec2[2], fv[2]);
889
+
890
+ fv[3] = v - T[3];
891
+ rand = Rand3DPCG16(int3(math::floor(NoiseTileWrap(6 * T[3] + 0.5, bTiling, RepeatSize))));
892
+ gvec0[3] = float3(int3(rand.x,rand.x,rand.x) & MGradientMask) * MGradientScale - 1;
893
+ gvec1[3] = float3(int3(rand.y,rand.y,rand.y) & MGradientMask) * MGradientScale - 1;
894
+ gvec2[3] = float3(int3(rand.z,rand.z,rand.z) & MGradientMask) * MGradientScale - 1;
895
+ grad[0][3] = math::dot(gvec0[3], fv[3]);
896
+ grad[1][3] = math::dot(gvec1[3], fv[3]);
897
+ grad[2][3] = math::dot(gvec2[3], fv[3]);
898
+
899
+ // blend gradients
900
+ float4 sv = SimplexSmooth(fv);
901
+ float3x4 ds = SimplexDSmooth(fv);
902
+
903
+ float3x4 jacobian = float3x4(1.0);
904
+ float3 vec0 = gvec0*sv + grad[0]*ds; // NOTE: mdl is column major, convert from UE4 (row major)
905
+ jacobian[0] = float4(vec0.x, vec0.y, vec0.z, math::dot(sv, grad[0]));
906
+ float3 vec1 = gvec1*sv + grad[1]*ds;
907
+ jacobian[1] = float4(vec1.x, vec1.y, vec1.z, math::dot(sv, grad[1]));
908
+ float3 vec2 = gvec2*sv + grad[2]*ds;
909
+ jacobian[2] = float4(vec2.x, vec2.y, vec2.z, math::dot(sv, grad[2]));
910
+
911
+ return jacobian;
912
+ }
913
+
914
+ // 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
915
+ // floats for all called functions (NoiseTileWrap) and this prevents any float-to-int conversion errors from automatic type conversion.
916
+ float Noise3D_Multiplexer(uniform texture_2d PerlinNoiseGradientTexture, uniform texture_3d PerlinNoise3DTexture, int Function, float3 Position, int Quality, bool bTiling, float RepeatSize)
917
+ {
918
+ // verified, HLSL compiled out the switch if Function is a constant
919
+ switch(Function)
920
+ {
921
+ case 0:
922
+ return SimplexNoise3D_TEX(PerlinNoiseGradientTexture, Position);
923
+ case 1:
924
+ return GradientNoise3D_TEX(PerlinNoiseGradientTexture, Position, bTiling, RepeatSize);
925
+ case 2:
926
+ return FastGradientPerlinNoise3D_TEX(PerlinNoise3DTexture, Position);
927
+ case 3:
928
+ return GradientNoise3D_ALU(Position, bTiling, RepeatSize);
929
+ case 4:
930
+ return ValueNoise3D_ALU(Position, bTiling, RepeatSize);
931
+ case 5:
932
+ return VoronoiNoise3D_ALU(Position, Quality, bTiling, RepeatSize, true).w * 2.0 - 1.0;
933
+ }
934
+ return 0;
935
+ }
936
+ //----------------------------------------------------------
937
+
938
+ 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)
939
+ [[
940
+ anno::description("Noise"),
941
+ anno::noinline()
942
+ ]]
943
+ {
944
+ Position *= Scale;
945
+ FilterWidth *= Scale;
946
+
947
+ float Out = 0.0f;
948
+ float OutScale = 1.0f;
949
+ float InvLevelScale = 1.0f / LevelScale;
950
+
951
+ int iFunction(Function);
952
+ int iQuality(Quality);
953
+ int iLevels(Levels);
954
+ bool bTurbulence(Turbulence);
955
+ bool bTiling(Tiling);
956
+
957
+ for(int i = 0; i < iLevels; ++i)
958
+ {
959
+ // fade out noise level that are too high frequent (not done through dynamic branching as it usually requires gradient instructions)
960
+ OutScale *= math::saturate(1.0 - FilterWidth);
961
+
962
+ if(bTurbulence)
963
+ {
964
+ Out += math::abs(Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize)) * OutScale;
965
+ }
966
+ else
967
+ {
968
+ Out += Noise3D_Multiplexer(PerlinNoiseGradientTexture, PerlinNoise3DTexture, iFunction, Position, iQuality, bTiling, RepeatSize) * OutScale;
969
+ }
970
+
971
+ Position *= LevelScale;
972
+ RepeatSize *= LevelScale;
973
+ OutScale *= InvLevelScale;
974
+ FilterWidth *= LevelScale;
975
+ }
976
+
977
+ if(!bTurbulence)
978
+ {
979
+ // bring -1..1 to 0..1 range
980
+ Out = Out * 0.5f + 0.5f;
981
+ }
982
+
983
+ // Out is in 0..1 range
984
+ return math::lerp(OutputMin, OutputMax, Out);
985
+ }
986
+
987
+ // Material node for noise functions returning a vector value
988
+ // @param LevelScale usually 2 but higher values allow efficient use of few levels
989
+ // @return in user defined range (OutputMin..OutputMax)
990
+ export float4 vector4_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize)
991
+ [[
992
+ anno::description("Vector Noise"),
993
+ anno::noinline()
994
+ ]]
995
+ {
996
+ float4 result = float4(0,0,0,1);
997
+ float3 ret = float3(0);
998
+ int iQuality = int(Quality);
999
+ int iFunction = int(Function);
1000
+ bool bTiling = Tiling > 0.0;
1001
+
1002
+ float3x4 Jacobian = JacobianSimplex_ALU(Position, bTiling, TileSize); // compiled out if not used
1003
+
1004
+ // verified, HLSL compiled out the switch if Function is a constant
1005
+ switch (iFunction)
1006
+ {
1007
+ case 0: // Cellnoise
1008
+ ret = float3(Rand3DPCG16(int3(math::floor(NoiseTileWrap(Position, bTiling, TileSize))))) / 0xffff;
1009
+ result = float4(ret.x, ret.y, ret.z, 1);
1010
+ break;
1011
+ case 1: // Color noise
1012
+ ret = float3(Jacobian[0].w, Jacobian[1].w, Jacobian[2].w);
1013
+ result = float4(ret.x, ret.y, ret.z, 1);
1014
+ break;
1015
+ case 2: // Gradient
1016
+ result = Jacobian[0];
1017
+ break;
1018
+ case 3: // Curl
1019
+ ret = float3(Jacobian[2][1] - Jacobian[1][2], Jacobian[0][2] - Jacobian[2][0], Jacobian[1][0] - Jacobian[0][1]);
1020
+ result = float4(ret.x, ret.y, ret.z, 1);
1021
+ break;
1022
+ case 4: // Voronoi
1023
+ result = VoronoiNoise3D_ALU(Position, iQuality, bTiling, TileSize, false);
1024
+ break;
1025
+ }
1026
+ return result;
1027
+ }
1028
+
1029
+ export float3 vector3_noise(float3 Position, float Quality, float Function, float Tiling, float TileSize)
1030
+ [[
1031
+ anno::description("Vector Noise float3 version"),
1032
+ anno::noinline()
1033
+ ]]
1034
+ {
1035
+ float4 noise = vector4_noise(Position, Quality, Function, Tiling, TileSize);
1036
+ return float3(noise.x, noise.y, noise.z);
1037
+ }
1038
+
1039
+
1040
+ // workaround for ue4 fresnel (without supporting for camera vector) : replacing it with 0.0, means facing to the view
1041
+ export float fresnel(float exponent [[anno::unused()]], float base_reflect_fraction [[anno::unused()]], float3 normal [[anno::unused()]])
1042
+ [[
1043
+ anno::description("Fresnel"),
1044
+ anno::noinline()
1045
+ ]]
1046
+ {
1047
+ return 0.0;
1048
+ }
1049
+
1050
+ export float fresnel_function(float3 normal_vector [[anno::unused()]], float3 camera_vector [[anno::unused()]],
1051
+ bool invert_fresnel [[anno::unused()]], float power [[anno::unused()]],
1052
+ bool use_cheap_contrast [[anno::unused()]], float cheap_contrast_dark [[anno::unused()]], float cheap_contrast_bright [[anno::unused()]],
1053
+ bool clamp_fresnel_dot_product [[anno::unused()]])
1054
+ [[
1055
+ anno::description("Fresnel Function"),
1056
+ anno::noinline()
1057
+ ]]
1058
+ {
1059
+ return 0.0;
1060
+ }
1061
+
1062
+ export float3 camera_vector(uniform bool up_z = true)
1063
+ [[
1064
+ anno::description("Camera Vector"),
1065
+ anno::noinline()
1066
+ ]]
1067
+ {
1068
+ // assume camera postion is 0,0,0
1069
+ return math::normalize(float3(0) - convert_to_left_hand(state::transform_point(state::coordinate_internal,state::coordinate_world,state::position()), up_z));
1070
+ }
1071
+
1072
+ export float pixel_depth()
1073
+ [[
1074
+ anno::description("Pixel Depth"),
1075
+ anno::noinline()
1076
+ ]]
1077
+ {
1078
+ return 256.0f;
1079
+ }
1080
+
1081
+ export float scene_depth()
1082
+ [[
1083
+ anno::description("Scene Depth")
1084
+ ]]
1085
+ {
1086
+ return 65500.0f;
1087
+ }
1088
+
1089
+ export float3 scene_color()
1090
+ [[
1091
+ anno::description("Scene Color")
1092
+ ]]
1093
+ {
1094
+ return float3(1.0f);
1095
+ }
1096
+
1097
+ export float4 vertex_color()
1098
+ [[
1099
+ anno::description("Vertex Color"),
1100
+ anno::noinline()
1101
+ ]]
1102
+ {
1103
+ return float4(1.0f);
1104
+ }
1105
+
1106
+ export float4 vertex_color_from_coordinate(int VertexColorCoordinateIndex)
1107
+ [[
1108
+ anno::description("Vertex Color for float2 PrimVar"),
1109
+ anno::noinline()
1110
+ ]]
1111
+ {
1112
+ // 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
1113
+ 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);
1114
+ }
1115
+
1116
+ export float3 camera_position()
1117
+ [[
1118
+ anno::description("Camera Position"),
1119
+ anno::noinline()
1120
+ ]]
1121
+ {
1122
+ return float3(1000.0f, 0, 0);
1123
+ }
1124
+
1125
+ export float3 rotate_about_axis(float4 NormalizedRotationAxisAndAngle, float3 PositionOnAxis, float3 Position)
1126
+ [[
1127
+ anno::description("Rotates Position about the given axis by the given angle")
1128
+ ]]
1129
+ {
1130
+ // Project Position onto the rotation axis and find the closest point on the axis to Position
1131
+ float3 NormalizedRotationAxis = float3(NormalizedRotationAxisAndAngle.x,NormalizedRotationAxisAndAngle.y,NormalizedRotationAxisAndAngle.z);
1132
+ float3 ClosestPointOnAxis = PositionOnAxis + NormalizedRotationAxis * math::dot(NormalizedRotationAxis, Position - PositionOnAxis);
1133
+ // Construct orthogonal axes in the plane of the rotation
1134
+ float3 UAxis = Position - ClosestPointOnAxis;
1135
+ float3 VAxis = math::cross(NormalizedRotationAxis, UAxis);
1136
+ float[2] SinCosAngle = math::sincos(NormalizedRotationAxisAndAngle.w);
1137
+ // Rotate using the orthogonal axes
1138
+ float3 R = UAxis * SinCosAngle[1] + VAxis * SinCosAngle[0];
1139
+ // Reconstruct the rotated world space position
1140
+ float3 RotatedPosition = ClosestPointOnAxis + R;
1141
+ // Convert from position to a position offset
1142
+ return RotatedPosition - Position;
1143
+ }
1144
+
1145
+ export float2 rotate_scale_offset_texcoords(float2 InTexCoords, float4 InRotationScale, float2 InOffset)
1146
+ [[
1147
+ anno::description("Returns a float2 texture coordinate after 2x2 transform and offset applied")
1148
+ ]]
1149
+ {
1150
+ return float2(math::dot(InTexCoords, float2(InRotationScale.x, InRotationScale.y)), math::dot(InTexCoords, float2(InRotationScale.z, InRotationScale.w))) + InOffset;
1151
+ }
1152
+
1153
+ export float3 reflection_custom_world_normal(float3 WorldNormal, bool bNormalizeInputNormal, uniform bool up_z = true)
1154
+ [[
1155
+ anno::description("Reflection vector about the specified world space normal")
1156
+ ]]
1157
+ {
1158
+ if (bNormalizeInputNormal)
1159
+ {
1160
+ WorldNormal = math::normalize(WorldNormal);
1161
+ }
1162
+
1163
+ return -camera_vector(up_z) + WorldNormal * math::dot(WorldNormal, camera_vector(up_z)) * 2.0;
1164
+ }
1165
+
1166
+ export float3 reflection_vector(uniform bool up_z = true)
1167
+ [[
1168
+ anno::description("Reflection Vector"),
1169
+ anno::noinline()
1170
+ ]]
1171
+ {
1172
+ float3 normal = convert_to_left_hand(state::transform_normal(state::coordinate_internal,state::coordinate_world,state::normal()), up_z, false);
1173
+ return reflection_custom_world_normal(normal, false, up_z);
1174
+ }
1175
+
1176
+ export float dither_temporalAA(float AlphaThreshold = 0.5f, float Random = 1.0f [[anno::unused()]])
1177
+ [[
1178
+ anno::description("Dither TemporalAA"),
1179
+ anno::noinline()
1180
+ ]]
1181
+ {
1182
+ return AlphaThreshold;
1183
+ }
1184
+
1185
+ export float3 black_body( float Temp )
1186
+ [[
1187
+ anno::description("Black Body"),
1188
+ anno::noinline()
1189
+ ]]
1190
+ {
1191
+ float u = ( 0.860117757f + 1.54118254e-4f * Temp + 1.28641212e-7f * Temp*Temp ) / ( 1.0f + 8.42420235e-4f * Temp + 7.08145163e-7f * Temp*Temp );
1192
+ float v = ( 0.317398726f + 4.22806245e-5f * Temp + 4.20481691e-8f * Temp*Temp ) / ( 1.0f - 2.89741816e-5f * Temp + 1.61456053e-7f * Temp*Temp );
1193
+
1194
+ float x = 3*u / ( 2*u - 8*v + 4 );
1195
+ float y = 2*v / ( 2*u - 8*v + 4 );
1196
+ float z = 1 - x - y;
1197
+
1198
+ float Y = 1;
1199
+ float X = Y/y * x;
1200
+ float Z = Y/y * z;
1201
+
1202
+ float3x3 XYZtoRGB = float3x3(
1203
+ float3(3.2404542, -1.5371385, -0.4985314),
1204
+ float3(-0.9692660, 1.8760108, 0.0415560),
1205
+ float3(0.0556434, -0.2040259, 1.0572252)
1206
+ );
1207
+
1208
+ return XYZtoRGB * float3( X, Y, Z ) * math::pow( 0.0004 * Temp, 4 );
1209
+ }
1210
+
1211
+ export float per_instance_random(uniform texture_2d PerlinNoiseGradientTexture, int NumberInstances)
1212
+ [[
1213
+ anno::description("Per Instance Random"),
1214
+ anno::noinline()
1215
+ ]]
1216
+ {
1217
+ float weight = state::object_id() / float(NumberInstances);
1218
+ return NumberInstances == 0 ? 0.0 : tex::lookup_float4(PerlinNoiseGradientTexture, float2(weight, 1.0 - weight), tex::wrap_repeat, tex::wrap_repeat).x;
1219
+ }
1220
+
1221
+ //------------------ Hair from UE4 -----------------------
1222
+ float3 hair_absorption_to_color(float3 A)
1223
+ {
1224
+ const float B = 0.3f;
1225
+ float b2 = B * B;
1226
+ float b3 = B * b2;
1227
+ float b4 = b2 * b2;
1228
+ float b5 = B * b4;
1229
+ float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5);
1230
+ return math::exp(-math::sqrt(A) * D);
1231
+ }
1232
+
1233
+ float3 hair_color_to_absorption(float3 C)
1234
+ {
1235
+ const float B = 0.3f;
1236
+ float b2 = B * B;
1237
+ float b3 = B * b2;
1238
+ float b4 = b2 * b2;
1239
+ float b5 = B * b4;
1240
+ float D = (5.969f - 0.215f * B + 2.532f * b2 - 10.73f * b3 + 5.574f * b4 + 0.245f * b5);
1241
+ return math::pow(math::log(C) / D, 2.0f);
1242
+ }
1243
+
1244
+ export float3 get_hair_color_from_melanin(float InMelanin, float InRedness, float3 InDyeColor)
1245
+ [[
1246
+ anno::description("Hair Color")
1247
+ ]]
1248
+ {
1249
+ InMelanin = math::saturate(InMelanin);
1250
+ InRedness = math::saturate(InRedness);
1251
+ float Melanin = -math::log(math::max(1 - InMelanin, 0.0001f));
1252
+ float Eumelanin = Melanin * (1 - InRedness);
1253
+ float Pheomelanin = Melanin * InRedness;
1254
+
1255
+ float3 DyeAbsorption = hair_color_to_absorption(math::saturate(InDyeColor));
1256
+ float3 Absorption = Eumelanin * float3(0.506f, 0.841f, 1.653f) + Pheomelanin * float3(0.343f, 0.733f, 1.924f);
1257
+
1258
+ return hair_absorption_to_color(Absorption + DyeAbsorption);
1259
+ }
1260
+
1261
+ export float3 local_object_bounds_min()
1262
+ [[
1263
+ anno::description("Local Object Bounds Min"),
1264
+ anno::noinline()
1265
+ ]]
1266
+ {
1267
+ return float3(0.0);
1268
+ }
1269
+
1270
+ export float3 local_object_bounds_max()
1271
+ [[
1272
+ anno::description("Local Object Bounds Max"),
1273
+ anno::noinline()
1274
+ ]]
1275
+ {
1276
+ return float3(100.0);
1277
+ }
1278
+
1279
+ export float3 object_bounds()
1280
+ [[
1281
+ anno::description("Object Bounds"),
1282
+ anno::noinline()
1283
+ ]]
1284
+ {
1285
+ return float3(100.0);
1286
+ }
1287
+
1288
+ export float object_radius()
1289
+ [[
1290
+ anno::description("Object Radius"),
1291
+ anno::noinline()
1292
+ ]]
1293
+ {
1294
+ return 100.0f;
1295
+ }
1296
+
1297
+ export float3 object_world_position(uniform bool up_z = true)
1298
+ [[
1299
+ anno::description("Object World Position"),
1300
+ anno::noinline()
1301
+ ]]
1302
+ {
1303
+ 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;
1304
+ }
1305
+
1306
+ export float3 object_orientation()
1307
+ [[
1308
+ anno::description("Object Orientation"),
1309
+ anno::noinline()
1310
+ ]]
1311
+ {
1312
+ return float3(0);
1313
+ }
1314
+
1315
+ export float rcp(float x)
1316
+ [[
1317
+ anno::description("hlsl rcp"),
1318
+ anno::noinline()
1319
+ ]]
1320
+ {
1321
+ return 1.0f / x;
1322
+ }
1323
+
1324
+ export float2 rcp(float2 x)
1325
+ [[
1326
+ anno::description("hlsl rcp"),
1327
+ anno::noinline()
1328
+ ]]
1329
+ {
1330
+ return 1.0f / x;
1331
+ }
1332
+
1333
+ export float3 rcp(float3 x)
1334
+ [[
1335
+ anno::description("hlsl rcp"),
1336
+ anno::noinline()
1337
+ ]]
1338
+ {
1339
+ return 1.0f / x;
1340
+ }
1341
+
1342
+ export float4 rcp(float4 x)
1343
+ [[
1344
+ anno::description("hlsl rcp"),
1345
+ anno::noinline()
1346
+ ]]
1347
+ {
1348
+ return 1.0f / x;
1349
+ }
1350
+
1351
+ export int BitFieldExtractI32(int Data, int Size, int Offset)
1352
+ [[
1353
+ anno::description("BitFieldExtractI32 int"),
1354
+ anno::noinline()
1355
+ ]]
1356
+ {
1357
+ Size &= 3;
1358
+ Offset &= 3;
1359
+
1360
+ if (Size == 0)
1361
+ return 0;
1362
+ else if (Offset + Size < 32)
1363
+ return (Data << (32 - Size - Offset)) >> (32 - Size);
1364
+ else
1365
+ return Data >> Offset;
1366
+ }
1367
+
1368
+ export int BitFieldExtractI32(float Data, float Size, float Offset)
1369
+ [[
1370
+ anno::description("BitFieldExtractI32 float"),
1371
+ anno::noinline()
1372
+ ]]
1373
+ {
1374
+ return BitFieldExtractI32(int(Data), int(Size), int(Offset));
1375
+ }
1376
+
1377
+ export int BitFieldExtractU32(float Data, float Size, float Offset)
1378
+ [[
1379
+ anno::description("BitFieldExtractU32 float"),
1380
+ anno::noinline()
1381
+ ]]
1382
+ {
1383
+ return BitFieldExtractI32(Data, Size, Offset);
1384
+ }
1385
+
1386
+ export int BitFieldExtractU32(int Data, int Size, int Offset)
1387
+ [[
1388
+ anno::description("BitFieldExtractU32 int"),
1389
+ anno::noinline()
1390
+ ]]
1391
+ {
1392
+ return BitFieldExtractI32(Data, Size, Offset);
1393
+ }
1394
+
1395
+ export float3 EyeAdaptationInverseLookup(float3 LightValue, float Alpha)
1396
+ [[
1397
+ anno::description("EyeAdaptationInverseLookup"),
1398
+ anno::noinline()
1399
+ ]]
1400
+ {
1401
+ float Adaptation = 1.0f;
1402
+
1403
+ // When Alpha=0.0, we want to multiply by 1.0. when Alpha = 1.0, we want to multiply by 1/Adaptation.
1404
+ // So the lerped value is:
1405
+ // LerpLogScale = Lerp(log(1),log(1/Adaptaiton),T)
1406
+ // Which is simplified as:
1407
+ // LerpLogScale = Lerp(0,-log(Adaptation),T)
1408
+ // LerpLogScale = -T * logAdaptation;
1409
+
1410
+ float LerpLogScale = -Alpha * math::log(Adaptation);
1411
+ float Scale = math::exp(LerpLogScale);
1412
+ return LightValue * Scale;
1413
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/grutopia_usd/Table/table/5c8596964c102c0be7676263bb55cddb/instance.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_instance" (
62
+ prepend payload = @./instance.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/objaverse_usd/2b70993763034bef8587d3730c7ca8ff.usd ADDED
Binary file (92.2 kB). View file
 
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/objaverse_usd/2b70993763034bef8587d3730c7ca8ff.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_2b70993763034bef8587d3730c7ca8ff" (
62
+ prepend payload = @./2b70993763034bef8587d3730c7ca8ff.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/objaverse_usd/2cda50e73f69438598eabf8259e27cb7.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_2cda50e73f69438598eabf8259e27cb7" (
62
+ prepend payload = @./2cda50e73f69438598eabf8259e27cb7.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/objaverse_usd/30f8ba058e1f4e288f5a2ddcba924c3f.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_30f8ba058e1f4e288f5a2ddcba924c3f" (
62
+ prepend payload = @./30f8ba058e1f4e288f5a2ddcba924c3f.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/object_usds/objaverse_usd/cf2af4b2b8c6420da69ba8d8f73744bc.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_cf2af4b2b8c6420da69ba8d8f73744bc" (
62
+ prepend payload = @./cf2af4b2b8c6420da69ba8d8f73744bc.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/scene_waste/obj_badbin.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_obj_badbin" (
62
+ prepend payload = @./obj_badbin.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }
scenes/scene_usds/IROS_scenes_aloha_final/scene_waste/base/scene_waste/obj_goodbin.usda ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ customLayerData = {
4
+ dictionary omni_layer = {
5
+ dictionary locked = {
6
+ }
7
+ dictionary muteness = {
8
+ }
9
+ }
10
+ dictionary renderSettings = {
11
+ float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
12
+ float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
13
+ float3 "rtx:index:backgroundColor" = (0, 0, 0)
14
+ float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
15
+ float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
16
+ float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
17
+ float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
18
+ float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
19
+ float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
20
+ float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
21
+ float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
22
+ float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
23
+ float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
24
+ float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
25
+ float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
26
+ float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
27
+ float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
28
+ float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
29
+ float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
30
+ float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
31
+ float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
32
+ float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
33
+ float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
34
+ float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
35
+ float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
36
+ float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
37
+ float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
38
+ float3 "rtx:raytracing:indexdirect:svoBrickSize" = (32, 32, 32)
39
+ float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
40
+ float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
41
+ float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
42
+ double "rtx:translucency:worldEps" = 0.005
43
+ }
44
+ }
45
+ defaultPrim = "World"
46
+ endTimeCode = 1000000
47
+ metersPerUnit = 1.0
48
+ startTimeCode = 0
49
+ timeCodesPerSecond = 60
50
+ upAxis = "Z"
51
+ )
52
+
53
+ over "Render" (
54
+ hide_in_stage_window = true
55
+ )
56
+ {
57
+ }
58
+
59
+ def Xform "World"
60
+ {
61
+ def "_obj_goodbin" (
62
+ prepend payload = @./obj_goodbin.usd@
63
+ )
64
+ {
65
+ float3 xformOp:rotateXYZ = (0, 0, 0)
66
+ float3 xformOp:scale = (1, 1, 1)
67
+ double3 xformOp:translate = (0, 0, 0)
68
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
69
+ }
70
+ }
71
+
72
+ def Xform "Environment"
73
+ {
74
+ double3 xformOp:rotateXYZ = (0, 0, 0)
75
+ double3 xformOp:scale = (1, 1, 1)
76
+ double3 xformOp:translate = (0, 0, 0)
77
+ uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
78
+ }