Add SimReady package: XDU2300_Top 2026.10.14_01
Browse filesFiles changed (20)
- XDU2300_Top/.metadata/XDU2300_Top_benchmark.jsonAdded+312
- XDU2300_Top/.metadata/XDU2300_Top_validation.jsonAdded+62
- XDU2300_Top/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.jsonAdded+35
- XDU2300_Top/.metadata/com.nvidia.simready.conformance.Package@1.0.0.jsonAdded+35
- XDU2300_Top/.metadata/com.nvidia.simready.packaging.bom.jsonAdded+159
- XDU2300_Top/com.nvidia.simready.packaging.json+31-6
- XDU2300_Top/simready_usd/.thumbs/256x256/XDU2300_Top_main.usd.png
- XDU2300_Top/simready_usd/layers/.thumbs/256x256/XDU2300_Top_ConnectionPoints.usd.png → XDU2300_Top/simready_usd/.thumbs/256x256/XDU2300_Top_main.usd_light.pngRenamed
- XDU2300_Top/simready_usd/layers/.thumbs/256x256/XDU2300_Top_Properties.usda.png → XDU2300_Top/simready_usd/.thumbs/256x256/XDU2300_Top_main.usd_transparent.pngRenamed
- XDU2300_Top/simready_usd/XDU2300_Top_main.usd
- XDU2300_Top/simready_usd/layers/XDU2300_Top_ConnectionPoints.usd
- XDU2300_Top/simready_usd/layers/XDU2300_Top_Properties.usda+1-10
- XDU2300_Top/simready_usd/payloads/.thumbs/256x256/external.usd.pngDeleted
- XDU2300_Top/simready_usd/payloads/.thumbs/256x256/internal.usd.pngDeleted
- XDU2300_Top/simready_usd/payloads/external.usd+2-2
- XDU2300_Top/simready_usd/payloads/internal.usd+1-1
- XDU2300_Top/simready_usd/scripts/01_Occluder.pyDeleted-127
- XDU2300_Top/simready_usd/scripts/02_Internal_External.pyDeleted-1010
- XDU2300_Top/simready_usd/scripts/03_Material_Replacement.pyDeleted-876
- XDU2300_Top/simready_usd/textures/.thumbs/256x256/vertiv_logo.usd.pngDeleted
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312{
"schema_version": "1.0",
"asset": "XDU2300_Top",
"run_timestamp": "2026-10-13T16:49:12Z",
"passed": true,
"results": [
{
"test_name": "culling_xz",
"engine": "isaac_sim",
"engine_version": "6.2.0.0",
"status": "pass",
"passed": true,
"duration": 19.687,
"message": "",
"metrics": {
"_timing_capture_frame_total_s": {
"value": 3.281,
"unit": null
},
"_timing_capture_frame_count": {
"value": 16,
"unit": null
},
"_timing_capture_frame_avg_ms": {
"value": 205.06,
"unit": null
},
"_timing_encode_video_total_s": {
"value": 0.922,
"unit": null
},
"_timing_encode_video_count": {
"value": 2,
"unit": null
},
"_render_blank_retry_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_unrecovered": {
"value": 0,
"unit": null
},
"culling_xz_max_diff": {
"value": 7e-06,
"unit": null
},
"culling_xz_mean_diff": {
"value": 2e-06,
"unit": null
},
"culling_xz_worst_angle": {
"value": 315.0,
"unit": null
},
"culling_xz_passed": {
"value": 1,
"unit": null
}
},
"kit_logs": []
},
{
"test_name": "light_response",
"engine": "isaac_sim",
"engine_version": "6.2.0.0",
"status": "pass",
"passed": true,
"duration": 17.781,
"message": "",
"metrics": {
"_timing_capture_frame_total_s": {
"value": 5.998,
"unit": null
},
"_timing_capture_frame_count": {
"value": 30,
"unit": null
},
"_timing_capture_frame_avg_ms": {
"value": 199.93,
"unit": null
},
"_timing_encode_video_total_s": {
"value": 0.812,
"unit": null
},
"_timing_encode_video_count": {
"value": 1,
"unit": null
},
"_render_blank_retry_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_unrecovered": {
"value": 0,
"unit": null
},
"light_response_variation_ratio": {
"value": 0.586207,
"unit": null
},
"light_response_blank_ratio": {
"value": 0.0,
"unit": null
},
"light_response_blank_frames": {
"value": 0,
"unit": null
},
"light_response_total_frames": {
"value": 30,
"unit": null
},
"light_response_total_pairs": {
"value": 29,
"unit": null
},
"light_response_different_pairs": {
"value": 17,
"unit": null
},
"light_response_passed": {
"value": 1,
"unit": null
},
"light_response_max_pair_change": {
"value": 0.773718,
"unit": null
},
"light_response_min_pair_change": {
"value": 0.026409,
"unit": null
}
},
"kit_logs": []
},
{
"test_name": "normals_xz",
"engine": "isaac_sim",
"engine_version": "6.2.0.0",
"status": "pass",
"passed": true,
"duration": 10.609,
"message": "",
"metrics": {
"_timing_capture_frame_total_s": {
"value": 1.641,
"unit": null
},
"_timing_capture_frame_count": {
"value": 8,
"unit": null
},
"_timing_capture_frame_avg_ms": {
"value": 205.13,
"unit": null
},
"_timing_encode_video_total_s": {
"value": 0.281,
"unit": null
},
"_timing_encode_video_count": {
"value": 1,
"unit": null
},
"_render_blank_retry_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_unrecovered": {
"value": 0,
"unit": null
},
"normals_xz_avg_dark": {
"value": 0.014636,
"unit": null
},
"normals_xz_max_dark": {
"value": 0.077165,
"unit": null
},
"normals_xz_problem_frames": {
"value": 0,
"unit": null
},
"normals_xz_passed": {
"value": 1,
"unit": null
}
},
"kit_logs": []
},
{
"test_name": "pivot",
"engine": "isaac_sim",
"engine_version": "6.2.0.0",
"status": "pass",
"passed": true,
"duration": 20.344,
"message": "",
"metrics": {
"_timing_capture_frame_total_s": {
"value": 4.514,
"unit": null
},
"_timing_capture_frame_count": {
"value": 20,
"unit": null
},
"_timing_capture_frame_avg_ms": {
"value": 225.7,
"unit": null
},
"_timing_encode_video_total_s": {
"value": 0.797,
"unit": null
},
"_timing_encode_video_count": {
"value": 2,
"unit": null
},
"_render_blank_retry_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_unrecovered": {
"value": 0,
"unit": null
},
"pivot_score": {
"value": 0.9,
"unit": null
},
"pivot_pivot_height_pct": {
"value": 0.0,
"unit": null
},
"pivot_pivot_at_base": {
"value": 1,
"unit": null
},
"pivot_pivot_centered_xy": {
"value": 1,
"unit": null
},
"pivot_ground_penetration": {
"value": 1,
"unit": null
},
"pivot_orbital_motion": {
"value": 0,
"unit": null
},
"pivot_passed": {
"value": 1,
"unit": null
}
},
"kit_logs": []
},
{
"test_name": "presence",
"engine": "isaac_sim",
"engine_version": "6.2.0.0",
"status": "pass",
"passed": true,
"duration": 6.594,
"message": "",
"metrics": {
"_timing_capture_frame_total_s": {
"value": 0.39,
"unit": null
},
"_timing_capture_frame_count": {
"value": 2,
"unit": null
},
"_timing_capture_frame_avg_ms": {
"value": 195.0,
"unit": null
},
"_timing_encode_video_total_s": {
"value": 0.0,
"unit": null
},
"_timing_encode_video_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_count": {
"value": 0,
"unit": null
},
"_render_blank_retry_unrecovered": {
"value": 0,
"unit": null
},
"presence_diff_ratio": {
"value": 0.222867,
"unit": null
},
"presence_passed": {
"value": 1,
"unit": null
}
},
"kit_logs": []
}
]
}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162{
"simready_usd/XDU2300_Top_main.usd": {
"features_summary": {
"FET200_AIF": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "0.1.0"
},
"FET201_AIF": {
"blocking_failure": false,
"dependencies": "[{'FET200_AIF': {'version': '0.1.0'}}]",
"passed": true,
"version": "0.2.0"
},
"FET202_AIF": {
"blocking_failure": false,
"dependencies": "[{'FET201_AIF': {'version': '0.2.0'}}]",
"passed": true,
"version": "0.2.0"
},
"FET203_AIF": {
"blocking_failure": false,
"dependencies": "[{'FET201_AIF': {'version': '0.2.0'}}]",
"passed": true,
"version": "0.2.0"
},
"FET_000_STANDARD": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "0.2.0"
},
"FET_001_STANDARD": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "1.0.0"
},
"FET_031_STANDARD": {
"blocking_failure": false,
"dependencies": "[]",
"passed": true,
"version": "0.1.0"
},
"FET_033_STANDARD": {
"blocking_failure": false,
"dependencies": "[{'FET_031_STANDARD': {'version': '0.1.0'}}]",
"passed": true,
"version": "0.4.0"
}
},
"profile_id": "AIF-Entity",
"profile_version": "0.2.0",
"simready_validate_version": "2026.8.0",
"tier_versions": {
"sensors": "2026.8.0",
"tier_aif": "2026.8.0",
"tier_core": "2026.8.0"
}
}
}1234567891011121314151617181920212223242526272829303132333435{ "format_version": "1.0", "profile": "Package-Candidate", "profile_version": "1.0.0", "timestamp": "2026-10-14T06:45:34", "assets": [ { "asset": "simready_usd/XDU2300_Top_main.usd", "features": [ { "FET_031_STANDARD": { "version": "0.1.0", "passed": true, "failing_requirements": [], "dependencies": [] } }, { "FET_033_STANDARD": { "version": "0.1.0", "passed": true, "failing_requirements": [], "dependencies": [ { "FET_031_STANDARD": { "version": "0.1.0" } } ] } } ] } ]}1234567891011121314151617181920212223242526272829303132333435{ "format_version": "1.0", "profile": "Package", "profile_version": "1.0.0", "timestamp": "2026-10-14T06:45:34", "assets": [ { "asset": "com.nvidia.simready.packaging.json", "features": [ { "FET_030_STANDARD": { "version": "0.1.0", "passed": true, "failing_requirements": [], "dependencies": [] } }, { "FET_032_STANDARD": { "version": "0.1.0", "passed": true, "failing_requirements": [], "dependencies": [ { "FET_030_STANDARD": { "version": "0.1.0" } } ] } } ] } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159{ "format_version": "1.0", "items": [ { "relative_path": "simready_usd/.thumbs/256x256/XDU2300_Top_main.usd.png", "size": 558059, "hash": { "sha256-flat-1mb": "cb228201603d93447f35f250069e2866473dfddc2c3a2a7b8843357d0fa87628", "sha256": "50e31a0d55780c670bb25b90a9cb43ac73bdc08e61cd719e1675116291b3ac79" } }, { "relative_path": "simready_usd/.thumbs/256x256/XDU2300_Top_main.usd_light.png", "size": 461439, "hash": { "sha256-flat-1mb": "13941750b16f74a8eb20d4da3414c359d908d01dd9dcf60cc5fd1ecf87ca2371", "sha256": "4d22123d11c98017c8919dd478f4a6dd8cd69de6e5719fc92c641741bc0aef3b" } }, { "relative_path": "simready_usd/.thumbs/256x256/XDU2300_Top_main.usd_transparent.png", "size": 295730, "hash": { "sha256-flat-1mb": "97433281f9a3a03ce9bd23cffbfcb796e436c5c2c9716b5ca918c90d900a0b94", "sha256": "62e5f3f9017320da1d532e38e267468a15fcab160f51278dae793dbcfd5d1c60" } }, { "relative_path": "simready_usd/XDU2300_Top_main.usd", "size": 7948, "hash": { "sha256-flat-1mb": "fb35932b8e24cb0063698ea7e320f39182501af43bbedc7b60391058462d945d", "sha256": "f691342f66d12b5c51176f116fdde3f435a63bbcbf7ae40d2cf32e2359c05e74" } }, { "relative_path": "simready_usd/layers/XDU2300_Top_ConnectionPoints.usd", "size": 18530, "hash": { "sha256-flat-1mb": "2bacf02c89833c0e9d654275c49c4ebeff9d7b04a173769a21f4c935650711d2", "sha256": "802c440b90113a8ee88f88a8f92e00096ec0e506b44b283c83beadce02f18df2" } }, { "relative_path": "simready_usd/layers/XDU2300_Top_Properties.json", "size": 17997, "hash": { "sha256-flat-1mb": "134df1442238dfc8829a711b44c398d4cbf18f5b17576e1b7d41148226d87dae", "sha256": "1a4fddbf26fd6e520b1ba1a0ca043e6115d46b38b1f0f9582d19f2342bcdc046" } }, { "relative_path": "simready_usd/layers/XDU2300_Top_Properties.usda", "size": 34100, "hash": { "sha256-flat-1mb": "e8a229011cd9fc870edf549b58389b75737625217049751ff2b5f9916705a0e8", "sha256": "04b3b4d77138f7f50949e9c3b7122558faea8d1e713320eca3ffa111ed9f065e" } }, { "relative_path": "simready_usd/materials/OmniPBR/OmniPBR.mdl", "size": 16010, "hash": { "sha256-flat-1mb": "ecc9a58be7f4dd86920d4d9e3c7ff37b4306bc818da5074c2e184950e43a143f", "sha256": "6e6b3acbccd236e21a6c29964a431d2a53e77251cc6b8b1bc975eb1c62da1781" } }, { "relative_path": "simready_usd/materials/OmniPBR/OmniPBRBase.mdl", "size": 19369, "hash": { "sha256-flat-1mb": "001afd3ed8918a1fd8623689cf100e375bf3797f1398cb0a8a2727300e83016f", "sha256": "a8fd9fe174e91892e94d06da90ba453a124024c2ce2c033be9d82c9e2f76a3b7" } }, { "relative_path": "simready_usd/materials/OmniPBR/OmniPBR_ClearCoat.mdl", "size": 29789, "hash": { "sha256-flat-1mb": "04bcb74cc928617064a7d3978735156b0976d66d0716fc57dfa7877b8f3d9f33", "sha256": "d84c5ba482561c0eaea2e0c5b607358af549e36cd921773462f92dbc4f32cbc3" } }, { "relative_path": "simready_usd/materials/WhiteMode.mdl", "size": 998, "hash": { "sha256-flat-1mb": "c07b0292c81dd4217326e9f2c755ff2d7ff470422fa974e6e03d907a2b62cc2f", "sha256": "3bc76f53a19cada6acc1c4f9463264f0934f3dd45805cbe6af56c7b7df895b5d" } }, { "relative_path": "simready_usd/payloads/external.usd", "size": 18235199, "hash": { "sha256-flat-1mb": "b27fe3f85e54562545514477b62ed2e4606efb7513e6f9fa6f16031bda30f888", "sha256": "b7999a08fecba844883261076e0e0fe320a1067b7609f68cfe7d061056cfbab4", "sha256-first1m": "9feae0500085336bd1500924b26b5462863321f528f6f095138feb2b164e8ced" } }, { "relative_path": "simready_usd/payloads/internal.usd", "size": 11171578, "hash": { "sha256-flat-1mb": "535da0176927b9c07f674b4423187ee3ca84c0701233af0601f50315276439f2", "sha256": "18d917abd7ac362bbe270d322a23bbe94415f64a58efc09f24e7b380b580303c", "sha256-first1m": "21102afba6af2710dffecf16c634cf5b5c9d6d558538c6f70aa5c3532f676e39" } }, { "relative_path": "simready_usd/textures/image screen.png", "size": 156546, "hash": { "sha256-flat-1mb": "8526b4429f352dcd2e35f956972041b81a2646db7eac9c31b58ede527dc2ac54", "sha256": "225f5998ef1a0da43fbcbec55801fd8a42a2e88e0d558afea6ecee236cfef251" } }, { "relative_path": "simready_usd/textures/materials/OmniPBR/OmniPBR.mdl", "size": 16010, "hash": { "sha256-flat-1mb": "ecc9a58be7f4dd86920d4d9e3c7ff37b4306bc818da5074c2e184950e43a143f", "sha256": "6e6b3acbccd236e21a6c29964a431d2a53e77251cc6b8b1bc975eb1c62da1781" } }, { "relative_path": "simready_usd/textures/materials/OmniPBR/OmniPBRBase.mdl", "size": 19369, "hash": { "sha256-flat-1mb": "001afd3ed8918a1fd8623689cf100e375bf3797f1398cb0a8a2727300e83016f", "sha256": "a8fd9fe174e91892e94d06da90ba453a124024c2ce2c033be9d82c9e2f76a3b7" } }, { "relative_path": "simready_usd/textures/materials/OmniPBR/OmniPBR_ClearCoat.mdl", "size": 29789, "hash": { "sha256-flat-1mb": "04bcb74cc928617064a7d3978735156b0976d66d0716fc57dfa7877b8f3d9f33", "sha256": "d84c5ba482561c0eaea2e0c5b607358af549e36cd921773462f92dbc4f32cbc3" } }, { "relative_path": "simready_usd/textures/ver_logo_tm_hrz_rgb_rev.png", "size": 10575, "hash": { "sha256-flat-1mb": "8e9f4fed6ad9078bd072c34f5d0e6536dab1230150eae73f65ed78e50452684d", "sha256": "12470a0a485caf4e7d3db06e5a6ae594a8e428e0d16f0a23fba23edd40f31273" } }, { "relative_path": "simready_usd/textures/vertiv_logo.usd", "size": 33175, "hash": { "sha256-flat-1mb": "8c6ebfaed3cf0de43f49c27e9b0409b8982fa240174e8a4e3a933736f86e9559", "sha256": "458efd5efe194b02ef240fef4c72c6fb229cb7b4140f1c2f944c7440101c8ec2" } } ]}123456{"format_version": "1.0","package_id": "simready.hf.Vertiv.simready-assets.XDU2300_Top.2026.10.01_02","license": "cc-by-4.0","metadata": []}12345678910111213141516171819202122232425262728293031{"format_version": "1.0","package_id": "simready.hf.Vertiv.simready-assets.XDU2300_Top.2026.10.14_01","license": "cc-by-4.0","metadata": [{"name": "com.nvidia.simready.conformance.Package-Candidate@1.0.0.json","hash": {"sha256": "f38a6f6712932f551555879cee8cf1ddd8a2faf68a5410b061fd75f16dba6612"}},{"name": "com.nvidia.simready.packaging.bom.json","hash": {"sha256": "f557769612f33bdcb3654849ed399d3b36d86adbc3c378bf2aae9d862ff253f9"}},{"name": "com.nvidia.simready.root_usds.json","hash": {"sha256": "b05f4f0c53c183bce66398bf148f82b47980a9d29fa32e821d58c1b66cef4e7a"}}],"content_hash": {"sha256": "01b2e0b24bfe52ab15e9d4bce46b4f840c59385dec935212e66a4c40e3a42f14"},"package_hash": {"sha256": "9a9eef6d6820299b94d82dc6d919e9a5de2310840e04ec909d0c399c730c2bef"}}
164 unmodified lines165166167168169170171172173174175176177178179180164 unmodified lines}doc = "Scene Optimizer version [AIF-MANAGED]")custom float aif:core:simreadyVersion = 0.1 (customData = {dictionary omni = {dictionary kit = {bool locked = 1}}}doc = "SimReady version [AIF-MANAGED]")custom int aif:core:weight = 1569 (customData = {dictionary omni = {164 unmodified lines165166167168169170171164 unmodified lines}doc = "Scene Optimizer version [AIF-MANAGED]")custom string aif:core:simreadyVersion = "0.2.0"custom int aif:core:weight = 1569 (customData = {dictionary omni = {
123version https://git-lfs.github.com/spec/v1oid sha256:0aba5dc1233f23dfcf68ec9103b7342fa8697f8505a0f59df3baaeb641c160a0size 18221452123version https://git-lfs.github.com/spec/v1oid sha256:b7999a08fecba844883261076e0e0fe320a1067b7609f68cfe7d061056cfbab4size 18235199
123version https://git-lfs.github.com/spec/v1oid sha256:bd54fe4441fba3fe73964f5df8c82a1671fb66cb72e21eecb86f56ab767672f1size 11171578123version https://git-lfs.github.com/spec/v1oid sha256:18d917abd7ac362bbe270d322a23bbe94415f64a58efc09f24e7b380b580303csize 11171578
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127"""
Scene Optimizer Occluder Creation
=================================
Creates reference geometry to help Scene Optimizer's "findHiddenMeshes" processor
more easily identify internal components. The processor tests for hidden geometry
and uses this occluder as a reference to simplify internal component detection.
Workflow: Create Occluder -> findHiddenMeshes Testing -> Hide Internal Components
USD Concepts: Kit mesh commands, transform ops, scene hierarchy
"""
import omni.kit.commands
import omni.usd
from pxr import UsdGeom
def get_default_prim_path():
"""
Find appropriate parent prim for occluder geometry.
USD concepts: stage traversal, default prim, hierarchical paths
"""
stage = omni.usd.get_context().get_stage()
# USD: Get active stage context
if not stage:
print("Error: No stage available!")
return None
# USD: Get primary asset root from stage metadata
default_prim = stage.GetDefaultPrim()
if default_prim and default_prim.IsValid():
default_path = str(default_prim.GetPath())
print(f"Found default prim: {default_path}")
return default_path
else:
# USD: Fallback to first valid prim in scene hierarchy
for prim in stage.Traverse():
if prim.GetPath() != "/": # Skip pseudoroot
default_path = str(prim.GetPath())
print(f"No default prim found, using first prim: {default_path}")
return default_path
# If no prims exist, use root
print("No prims found, using root path")
return "/"
def create_cube_mesh():
"""
Create reference geometry to assist Scene Optimizer's "findHiddenMeshes" processor.
This geometry helps the processor identify internal components more efficiently.
USD concepts: Kit commands, mesh primitives, transform operations
"""
print("Creating 'Occluder' cube mesh using CreateMeshPrimCommand...")
# Get the default prim path
default_path = get_default_prim_path()
if default_path is None:
print("Could not determine default prim path")
return None
# USD: Build hierarchical path for occluder
if default_path == "/":
cube_path = "/Occluder"
else:
cube_path = f"{default_path}/Occluder"
try:
# Kit: High-level mesh creation (handles vertices, faces, normals, UVs)
result, path = omni.kit.commands.execute(
"CreateMeshPrimCommand",
prim_type="Cube",
prim_path=cube_path
)
if result:
print(f"Successfully created cube at: {path}")
# USD: Access newly created prim for transform setup
stage = omni.usd.get_context().get_stage()
cube_prim = stage.GetPrimAtPath(path)
if cube_prim.IsValid():
print("Setting transform properties...")
# USD: Apply Xformable schema for transform operations
xformable = UsdGeom.Xformable(cube_prim)
# USD: Position reference geometry to assist hidden mesh detection
translate_op = xformable.GetTranslateOp()
if not translate_op:
translate_op = xformable.AddTranslateOp()
translate_op.Set((0, -0.00106, 1.22138))
print(f"Set translation: (0, -0.00106, 1.22138)")
# USD: Identity rotation (axis-aligned cube)
rotate_op = xformable.GetRotateXYZOp()
if not rotate_op:
rotate_op = xformable.AddRotateXYZOp()
rotate_op.Set((0, 0, 0))
print(f"Set rotation: (0, 0, 0)")
# USD: Reference dimensions to help processor identify internal geometry
scale_op = xformable.GetScaleOp()
if not scale_op:
scale_op = xformable.AddScaleOp()
scale_op.Set((1.17346, 1.13044, 2.044)) # Helps processor distinguish internal components
print(f" Set scale: (1.17346, 1.13044, 2.044)")
print("Transform properties set successfully!")
else:
print("Warning: Could not access created prim to set transforms")
return path
else:
print("Failed to create cube with CreateMeshPrimCommand")
return None
except Exception as e:
print(f"Error with CreateMeshPrimCommand: {e}")
return None
create_cube_mesh()12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010"""
Extract Internal/External USD Files
Creates internal.usd and external.usd files by splitting geometry based on visibility states.
This module processes USD files to separate visible (external) and invisible (internal) meshes
into separate payload files, then creates a main file with payload references.
Process Overview:
1. Force show a list of prim paths
2. Analyze mesh visibility states (invisible=internal, visible=external)
3. Create internal.usd - keeps invisible meshes, deletes visible meshes
4. Create external.usd - keeps visible meshes, deletes invisible meshes
5. Restructure hierarchy by moving children and renaming default prim
6. Remove occluder meshes and empty leaf nodes
7. Set all remaining prims to visible state
8. Create new main file with payload references to both files
9. Deactivate internal payload prim in main file
This script is designed to work within the Scene Optimizer framework and expects
to be called without if __name__ == "__main__" guards.
"""
import omni.usd
from pxr import UsdGeom, Usd, Sdf, UsdShade, Kind, UsdGeom
import os
DEFAULT_PRIM_NAME = "XDU2300_Top"
def find_target_xform(stage):
"""
Find target Xform prim for asset processing.
USD concepts: default prim, scene hierarchy, Xform schema validation
"""
# Get the default prim
default_prim = stage.GetDefaultPrim()
if not default_prim or not default_prim.IsValid():
raise RuntimeError("Error: No default prim found in the stage")
# Find all xform children under the default prim
xform_children = []
for child in default_prim.GetChildren():
if child.IsValid() and child.IsA(UsdGeom.Xform):
xform_children.append(child)
# Validate we have exactly one xform
if len(xform_children) == 0:
raise RuntimeError(f"Error: No Xform prims found under default prim {default_prim.GetPath()}")
elif len(xform_children) > 1:
xform_paths = [xform.GetPath() for xform in xform_children]
raise RuntimeError(f"Error: Multiple Xform prims found under default prim {default_prim.GetPath()}: {xform_paths}")
return xform_children[0]
def find_meshes_with_visibility_state(stage):
"""
Analyze mesh visibility to determine internal vs. external components.
USD concepts: visibility attributes, UsdGeom.Imageable, computed visibility
Returns:
dict: {mesh_path: is_visible} (True=external, False=internal)
"""
# Find the target hierarchy automatically
try:
root_prim = find_target_xform(stage)
print(f"Searching for meshes under: {root_prim.GetPath()}")
except RuntimeError as e:
print(f"Failed to find target xform: {e}")
return {}
mesh_visibility = {}
def traverse_hierarchy(prim):
# Check if this is a mesh
if prim.IsA(UsdGeom.Mesh):
# Get visibility state using UsdGeom
imageable = UsdGeom.Imageable(prim)
if imageable:
# Get the computed visibility (takes inheritance into account)
visibility_attr = imageable.GetVisibilityAttr()
if visibility_attr and visibility_attr.IsValid():
visibility_value = visibility_attr.Get()
# Convert USD visibility token to boolean
# "invisible" = False (internal), "inherited"/"visible" = True (external)
is_visible = (visibility_value != "invisible")
mesh_visibility[str(prim.GetPath())] = is_visible
else:
# If no visibility attribute, assume inherited/visible (external)
mesh_visibility[str(prim.GetPath())] = True
# Traverse children
for child in prim.GetAllChildren():
traverse_hierarchy(child)
traverse_hierarchy(root_prim)
return mesh_visibility
def delete_meshes_by_visibility(stage, keep_visible=True):
"""
Split geometry by removing meshes based on visibility state.
USD concepts: prim removal, visibility-based filtering
Args:
keep_visible: True=create external file, False=create internal file
"""
# Find all meshes with their visibility state
mesh_visibility = find_meshes_with_visibility_state(stage)
if not mesh_visibility:
print("No meshes found!")
return
meshes_to_delete = []
if keep_visible:
# Keep visible meshes (external), delete invisible meshes (internal)
print("Keeping external meshes (visible), deleting internal meshes (invisible)")
meshes_to_delete = [path for path, is_visible in mesh_visibility.items() if not is_visible]
else:
# Keep invisible meshes (internal), delete visible meshes (external)
print("Keeping internal meshes (invisible), deleting external meshes (visible)")
meshes_to_delete = [path for path, is_visible in mesh_visibility.items() if is_visible]
print(f"Deleting {len(meshes_to_delete)} meshes...")
# Delete the meshes
for mesh_path in meshes_to_delete:
mesh_prim = stage.GetPrimAtPath(mesh_path)
if mesh_prim.IsValid():
print(f"Deleting mesh: {mesh_path}")
stage.RemovePrim(mesh_path)
else:
print(f"Warning: Mesh not found: {mesh_path}")
print(f"Mesh deletion complete!")
def prune_empty_leaf_nodes(stage, ignore_look_scopes=True):
"""
Remove empty leaf nodes, ignoring look scopes.
Args:
stage: USD Stage
ignore_look_scopes: If True, don't prune look scopes even if empty
"""
print("Pruning empty leaf nodes...")
def is_prim_empty(prim):
"""Check if a prim is empty and can be pruned."""
# Don't prune looks scopes if specified
if ignore_look_scopes and (prim.GetTypeName() == "Scope" and "looks" in prim.GetName().lower()):
return False
# Don't prune if it's a mesh
if prim.IsA(UsdGeom.Mesh):
return False
# Check if it has any children
children = prim.GetAllChildren()
if children:
# If all children are empty, this prim is effectively empty
return all(is_prim_empty(child) for child in children)
# If it's a leaf node, check if it has meaningful content
# Keep transform nodes even if empty
if prim.IsA(UsdGeom.Xform) or prim.IsA(UsdGeom.Xformable):
xformable = UsdGeom.Xformable(prim)
if xformable and xformable.GetOrderedXformOps():
return False # Has transforms, keep it
# Check for custom attributes
custom_attrs = [attr for attr in prim.GetAttributes()
if not attr.GetName().startswith('xformOp:') and
attr.GetName() not in ['visibility', 'purpose']]
if custom_attrs:
return False # Has custom attributes, keep it
return True # Truly empty
def prune_recursive(prim):
"""Recursively prune empty children."""
children_to_remove = []
for child in prim.GetAllChildren():
prune_recursive(child)
if is_prim_empty(child):
children_to_remove.append(child.GetPath())
for child_path in children_to_remove:
print(f" Pruning empty node: {child_path}")
stage.RemovePrim(child_path)
# Start pruning from root
for prim in stage.Traverse():
if prim.GetPath() != "/": # Skip root
prune_recursive(prim)
def copy_transform_values(stage, source_prim, target_prim):
"""
Copy all transform values from source prim to target prim.
This preserves rotation, translation, scale, and other transform operations.
Args:
stage: USD Stage
source_prim: Source prim with transforms to copy
target_prim: Target prim to receive transforms
"""
if not source_prim or not source_prim.IsValid():
print(" Warning: Source prim is invalid, cannot copy transforms")
return
if not target_prim or not target_prim.IsValid():
print(" Warning: Target prim is invalid, cannot copy transforms")
return
# Check if source prim is transformable (has Xformable schema)
if not source_prim.IsA(UsdGeom.Xformable):
print(f" Warning: Source prim {source_prim.GetPath()} is not Xformable, no transforms to copy")
return
# Make target prim transformable if it isn't already
if not target_prim.IsA(UsdGeom.Xformable):
UsdGeom.Xformable(target_prim)
print(f" Applied Xformable schema to target prim: {target_prim.GetPath()}")
source_xformable = UsdGeom.Xformable(source_prim)
target_xformable = UsdGeom.Xformable(target_prim)
# Get all transform operations from source
source_ops = source_xformable.GetOrderedXformOps()
if not source_ops:
print(" No transform operations found on source prim")
return
print(f" Copying {len(source_ops)} transform operations:")
# Get existing XformOps on target to avoid creating duplicates
existing_target_ops = target_xformable.GetOrderedXformOps()
# Copy each transform operation
for source_op in source_ops:
op_name = source_op.GetOpName()
op_type = source_op.GetOpType()
op_precision = source_op.GetPrecision()
# Get the transform value
transform_value = source_op.Get()
if transform_value is None:
print(f" Skipping {op_name} - no value set")
continue
print(f" {op_name} ({op_type}): {transform_value}")
# Look for existing matching XformOp on target (by type and precision)
target_op = None
for existing_op in existing_target_ops:
if (existing_op.GetOpType() == op_type and
existing_op.GetPrecision() == op_precision):
# Found matching existing op - use it instead of creating new one
target_op = existing_op
print(f" Using existing XformOp: {existing_op.GetOpName()}")
break
# If no matching existing op found, create a new one
if target_op is None:
try:
if op_type == UsdGeom.XformOp.TypeTranslate:
target_op = target_xformable.AddTranslateOp(op_precision)
elif op_type == UsdGeom.XformOp.TypeRotateXYZ:
target_op = target_xformable.AddRotateXYZOp(op_precision)
elif op_type == UsdGeom.XformOp.TypeRotateX:
target_op = target_xformable.AddRotateXOp(op_precision)
elif op_type == UsdGeom.XformOp.TypeRotateY:
target_op = target_xformable.AddRotateYOp(op_precision)
elif op_type == UsdGeom.XformOp.TypeRotateZ:
target_op = target_xformable.AddRotateZOp(op_precision)
elif op_type == UsdGeom.XformOp.TypeScale:
target_op = target_xformable.AddScaleOp(op_precision)
elif op_type == UsdGeom.XformOp.TypeTransform:
target_op = target_xformable.AddTransformOp(op_precision)
elif op_type == UsdGeom.XformOp.TypeOrient:
target_op = target_xformable.AddOrientOp(op_precision)
else:
print(f" Warning: Unsupported transform operation type: {op_type}")
continue
print(f" Created new XformOp: {target_op.GetOpName()}")
except Exception as e:
print(f" Error creating XformOp for {op_name}: {e}")
continue
# Set the transform value on the target op (existing or newly created)
try:
target_op.Set(transform_value)
print(f" Successfully set value on {target_op.GetOpName()}")
except Exception as e:
print(f" Error setting value on {target_op.GetOpName()}: {e}")
print(f" Transform inheritance complete for {target_prim.GetPath()}")
def restructure_hierarchy(stage, new_default_name="internal"):
"""
Restructure USD hierarchy for payload-based scene composition.
Uses dynamic discovery to find the target hierarchy and moves all children
to a new default prim with proper transform inheritance.
Args:
stage: USD Stage
new_default_name: New name for the default prim ("internal" or "external")
"""
print(f"Restructuring hierarchy - moving to '{new_default_name}'...")
try:
# Use dynamic discovery to find the target xform
target_xform = find_target_xform(stage)
old_root_path = target_xform.GetPath()
# Get the parent path (default prim)
parent_path = target_xform.GetParent().GetPath()
print(f"Target xform: {old_root_path}")
print(f"Parent path: {parent_path}")
except RuntimeError as e:
print(f"Failed to find target xform for restructuring: {e}")
return
old_root = stage.GetPrimAtPath(old_root_path)
parent_prim = stage.GetPrimAtPath(parent_path)
if not old_root.IsValid():
print(f"Warning: Old root prim not found: {old_root_path}")
return
if not parent_prim.IsValid():
print(f"Warning: Parent prim not found: {parent_path}")
return
# CRITICAL: Create new default prim FIRST and copy transforms BEFORE moving children
# This ensures children maintain their world transforms when moved
new_default_path = f"/{new_default_name}"
print(f" Step 1: Creating new default prim and copying transforms")
# Create new default prim
new_default_prim = stage.DefinePrim(new_default_path)
stage.SetDefaultPrim(new_default_prim)
# Set Kind to "subcomponent" - indicates this is part of a larger component
# USD CONCEPT: subcomponent = model-like part of a component, cannot stand alone
Usd.ModelAPI(new_default_prim).SetKind(Kind.Tokens.subcomponent)
print(f" Set Kind=subcomponent on {new_default_path}")
# Copy parent prim attributes and metadata to new default prim
for attr in parent_prim.GetAttributes():
if attr.IsValid():
target_attr = new_default_prim.CreateAttribute(attr.GetName(), attr.GetTypeName())
value = attr.Get()
if value is not None:
target_attr.Set(value)
# Copy transforms from target xform to new default prim BEFORE removing it
print(f" Copying transforms from target xform {old_root_path} to new default prim {new_default_path}")
copy_transform_values(stage, target_xform, new_default_prim)
# Copy metadata from parent to new default prim BEFORE removing parent
try:
all_metadata = parent_prim.GetAllMetadata()
for key, value in all_metadata.items():
if value is not None:
new_default_prim.SetMetadata(key, value)
except Exception as e:
print(f" Warning: Could not copy metadata: {e}")
# Store child paths and names before any prim modifications
children_to_move = [(str(child.GetPath()), child.GetName()) for child in old_root.GetAllChildren()]
print(f" Step 2: Moving {len(children_to_move)} children directly from {old_root_path} to {new_default_path}")
# Check specifically for Looks folder
looks_found = False
for child_path, child_name in children_to_move:
if child_name == "Looks":
looks_found = True
print(f" Found Looks folder to move: {child_path}")
break
if not looks_found:
# Check if Looks folder exists elsewhere in the hierarchy
looks_path_parent = f"{parent_path}/Looks"
looks_prim_parent = stage.GetPrimAtPath(looks_path_parent)
if looks_prim_parent.IsValid():
print(f" Looks folder found at parent level: {looks_path_parent}")
print(f" Adding to children_to_move for proper relocation")
children_to_move.append((looks_path_parent, "Looks"))
else:
print(f" Warning: No Looks folder found in expected locations")
# Move all children directly from target_xform to new default prim
# Since new default prim has same transforms as target_xform, children maintain world orientation
for child_path, child_name in children_to_move:
target_path = f"{new_default_path}/{child_name}"
# Verify the source prim still exists before moving
source_prim = stage.GetPrimAtPath(child_path)
if source_prim.IsValid():
if child_name == "Looks":
print(f" Moving Looks folder: {child_path} -> {target_path}")
else:
print(f" Moving: {child_path} -> {target_path}")
move_prim_with_children(stage, child_path, target_path)
else:
print(f" Warning: Source prim no longer exists: {child_path}")
# Step 3: Remove the old target xform prim
print(f" Step 3: Removing target xform: {old_root_path}")
stage.RemovePrim(old_root_path)
# Step 4: Remove the old parent prim entirely
print(f" Step 4: Removing parent prim: {parent_path}")
stage.RemovePrim(parent_path)
print(f" Completed hierarchy restructuring: {parent_path} -> {new_default_path}")
def move_prim_with_children(stage, source_path, target_path):
"""Move a prim and all its children to a new location."""
source_prim = stage.GetPrimAtPath(source_path)
if not source_prim.IsValid():
return
# Create target prim with same type
type_name = source_prim.GetTypeName()
if type_name:
target_prim = stage.DefinePrim(target_path, type_name)
else:
target_prim = stage.DefinePrim(target_path)
# Copy all attributes
for attr in source_prim.GetAttributes():
if attr.IsValid():
target_attr = target_prim.CreateAttribute(attr.GetName(), attr.GetTypeName())
value = attr.Get()
if value is not None:
target_attr.Set(value)
# Copy all relationships
for rel in source_prim.GetRelationships():
if rel.IsValid():
target_rel = target_prim.CreateRelationship(rel.GetName())
targets = rel.GetTargets()
if targets:
target_rel.SetTargets(targets)
# Copy metadata
try:
all_metadata = source_prim.GetAllMetadata()
for key, value in all_metadata.items():
if value is not None:
target_prim.SetMetadata(key, value)
except Exception as e:
print(f" Warning: Could not copy metadata for {source_path}: {e}")
# Recursively move children
for child in source_prim.GetAllChildren():
child_target = f"{target_path}/{child.GetName()}"
move_prim_with_children(stage, str(child.GetPath()), child_target)
def remove_occluder_mesh(stage):
"""
Remove occluder geometry used for Scene Optimizer processing.
USD concepts: prim removal by name, cleanup post-processing
"""
print("Removing 'Occluder' meshes...")
occluders_to_remove = []
for prim in stage.Traverse():
if (prim.GetName() == "Occluder" or prim.GetName() == "Occluder_2") and prim.IsA(UsdGeom.Mesh):
occluders_to_remove.append(str(prim.GetPath()))
for occluder_path in occluders_to_remove:
print(f" Removing Occluder: {occluder_path}")
stage.RemovePrim(occluder_path)
if not occluders_to_remove:
print(" No Occluder meshes found")
def set_all_prims_visible(stage):
"""
Reset all prims to visible state for payload files.
USD concepts: visibility attributes, UsdGeom.Imageable
"""
print("Setting all prims to visible...")
count = 0
for prim in stage.Traverse():
if prim.IsA(UsdGeom.Imageable):
imageable = UsdGeom.Imageable(prim)
visibility_attr = imageable.GetVisibilityAttr()
if visibility_attr and visibility_attr.IsValid():
current_value = visibility_attr.Get()
if current_value == "invisible":
visibility_attr.Set("inherited")
count += 1
print(f" Set {count} prims to visible")
def update_material_bindings(stage, new_default_name="internal"):
"""
Update material binding paths after hierarchy restructuring.
Uses dynamic discovery to automatically find old hierarchy paths.
Args:
stage: USD Stage
new_default_name: New default prim name ("internal" or "external")
"""
# Use dynamic discovery to find the actual original hierarchy paths
try:
# Find the current default prim and target xform to understand the original structure
default_prim = stage.GetDefaultPrim()
if not default_prim or not default_prim.IsValid():
print("Warning: No default prim found, cannot update material bindings")
return
# The original structure before restructuring would have been:
# /DefaultPrimName/TargetXformName/...
# After restructuring it becomes: /internal/ or /external/
default_prim_name = default_prim.GetName()
# Try to find if there are any material paths that need updating
# Look for common material path patterns
old_prefixes = [
f"/{default_prim_name}/",
"/World/", # Common default name
f"/{default_prim_name}/World/", # Nested structure
]
print(f"Updating material binding paths to /{new_default_name}")
print(f"Checking for old prefixes: {old_prefixes}")
except Exception as e:
print(f"Warning: Could not determine original paths, using fallback: {e}")
old_prefixes = ["/World/"]
new_prefix = f"/{new_default_name}/"
updated_count = 0
# Traverse all prims to find material bindings
for prim in stage.Traverse():
# Check for material bindings
if prim.HasAPI(UsdShade.MaterialBindingAPI):
material_binding_api = UsdShade.MaterialBindingAPI(prim)
# Get direct material binding
material_binding = material_binding_api.GetDirectBinding()
if material_binding.GetMaterial():
material_path = material_binding.GetMaterialPath()
if material_path:
material_path_str = str(material_path)
# Check each possible old prefix
binding_updated = False
for old_prefix in old_prefixes:
if material_path_str.startswith(old_prefix) and not binding_updated:
# Update the path to reference the new hierarchy
new_material_path_str = material_path_str.replace(old_prefix, new_prefix, 1)
# Verify the new material exists before rebinding
new_material_prim = stage.GetPrimAtPath(new_material_path_str)
if new_material_prim.IsValid():
try:
new_material = UsdShade.Material(new_material_prim)
material_binding_api.Bind(
new_material,
material_binding.GetBindingStrength(),
material_binding.GetMaterialPurpose()
)
print(f" Updated material binding: {material_path_str} -> {new_material_path_str}")
updated_count += 1
binding_updated = True
except Exception as e:
print(f" Error updating binding for {prim.GetPath()}: {e}")
else:
# Try without the first path component (sometimes the material path is nested differently)
path_parts = material_path_str.strip('/').split('/')
if len(path_parts) > 1:
alt_material_path = f"/{new_default_name}/" + '/'.join(path_parts[1:])
alt_material_prim = stage.GetPrimAtPath(alt_material_path)
if alt_material_prim.IsValid():
try:
new_material = UsdShade.Material(alt_material_prim)
material_binding_api.Bind(
new_material,
material_binding.GetBindingStrength(),
material_binding.GetMaterialPurpose()
)
print(f" Updated material binding (alt path): {material_path_str} -> {alt_material_path}")
updated_count += 1
binding_updated = True
except Exception as e:
print(f" Error updating alt binding for {prim.GetPath()}: {e}")
if not binding_updated:
print(f" Warning: Could not update material binding {material_path_str} - target not found")
# Also check collection-based bindings
for collection_binding in material_binding_api.GetCollectionBindings():
if collection_binding.GetMaterial():
material_path = collection_binding.GetMaterialPath()
if material_path:
material_path_str = str(material_path)
# Check each possible old prefix for collection bindings
collection_updated = False
for old_prefix in old_prefixes:
if material_path_str.startswith(old_prefix) and not collection_updated:
new_material_path_str = material_path_str.replace(old_prefix, new_prefix, 1)
# Verify the new material exists before rebinding
new_material_prim = stage.GetPrimAtPath(new_material_path_str)
if new_material_prim.IsValid():
try:
new_material = UsdShade.Material(new_material_prim)
# Rebind the collection material
material_binding_api.Bind(
collection_binding.GetCollection(),
new_material,
collection_binding.GetBindingStrength(),
collection_binding.GetMaterialPurpose()
)
print(f" Updated collection material binding: {material_path_str} -> {new_material_path_str}")
updated_count += 1
collection_updated = True
except Exception as e:
print(f" Error updating collection binding for {prim.GetPath()}: {e}")
else:
# Try alternative path structure
path_parts = material_path_str.strip('/').split('/')
if len(path_parts) > 1:
alt_material_path = f"/{new_default_name}/" + '/'.join(path_parts[1:])
alt_material_prim = stage.GetPrimAtPath(alt_material_path)
if alt_material_prim.IsValid():
try:
new_material = UsdShade.Material(alt_material_prim)
material_binding_api.Bind(
collection_binding.GetCollection(),
new_material,
collection_binding.GetBindingStrength(),
collection_binding.GetMaterialPurpose()
)
print(f" Updated collection material binding (alt): {material_path_str} -> {alt_material_path}")
updated_count += 1
collection_updated = True
except Exception as e:
print(f" Error updating alt collection binding for {prim.GetPath()}: {e}")
if not collection_updated:
print(f" Warning: Could not update collection material binding {material_path_str}")
# Also check for relationships that might reference materials
for rel in prim.GetRelationships():
if "material" in rel.GetName().lower():
targets = rel.GetTargets()
updated_targets = []
targets_updated = False
for target in targets:
target_str = str(target)
target_updated = False
# Check each possible old prefix for relationship targets
for old_prefix in old_prefixes:
if target_str.startswith(old_prefix) and not target_updated:
new_target_str = target_str.replace(old_prefix, new_prefix, 1)
# Verify the new target exists
if stage.GetPrimAtPath(new_target_str).IsValid():
updated_targets.append(Sdf.Path(new_target_str))
targets_updated = True
print(f" Updated relationship target: {target_str} -> {new_target_str}")
updated_count += 1
target_updated = True
else:
# Try alternative path structure
path_parts = target_str.strip('/').split('/')
if len(path_parts) > 1:
alt_target_str = f"/{new_default_name}/" + '/'.join(path_parts[1:])
if stage.GetPrimAtPath(alt_target_str).IsValid():
updated_targets.append(Sdf.Path(alt_target_str))
targets_updated = True
print(f" Updated relationship target (alt): {target_str} -> {alt_target_str}")
updated_count += 1
target_updated = True
if not target_updated:
updated_targets.append(target) # Keep original if no update worked
if targets_updated:
try:
rel.SetTargets(updated_targets)
except Exception as e:
print(f" Error updating relationship targets for {prim.GetPath()}: {e}")
print(f" Updated {updated_count} material binding paths")
def create_internal_external_files():
"""
Create internal.usd and external.usd files, then create a new main file with payloads.
Uses dynamic discovery to automatically find the target hierarchy.
"""
# Get current stage and its file path
usd_context = omni.usd.get_context()
stage = usd_context.get_stage()
if not stage:
print("Error: No stage is currently open!")
return
# Get the current stage file path
current_stage_url = usd_context.get_stage_url()
if not current_stage_url:
print("Error: Current stage has no file path! Please save the stage first.")
return
# Convert URL to local file path and get directory
def convert_url_to_path(url):
"""Convert various URL formats to local file path"""
if not url:
return ""
# Handle different URL schemes
if url.startswith("omniverse://"):
path = url[12:] # Remove "omniverse://"
elif url.startswith("file://"):
path = url[7:] # Remove "file://"
elif url.startswith("file:/"):
path = url[6:] # Remove "file:/"
elif url.startswith("file:"):
path = url[5:] # Remove "file:"
else:
path = url # Assume it's already a local path
# Remove leading slash on Windows
if path.startswith("/") and len(path) > 1:
path = path[1:]
return path
stage_path = convert_url_to_path(current_stage_url)
stage_dir = os.path.dirname(stage_path)
stage_name = os.path.splitext(os.path.basename(stage_path))[0]
stage_ext = os.path.splitext(os.path.basename(stage_path))[1]
# Define file paths - organize in payloads folder
payloads_dir = os.path.join(stage_dir, "payloads")
# Create payloads directory if it doesn't exist
if not os.path.exists(payloads_dir):
os.makedirs(payloads_dir)
print(f"Created payloads directory: {payloads_dir}")
internal_path = os.path.join(payloads_dir, "internal.usd")
external_path = os.path.join(payloads_dir, "external.usd")
print(f"Current stage: {stage_path}")
print(f"Payloads directory: {payloads_dir}")
print(f"Will create: {internal_path}")
print(f"Will create: {external_path}")
# Find all meshes with their visibility state first to show what we're working with
print("\nAnalyzing mesh visibility states...")
mesh_visibility = find_meshes_with_visibility_state(stage)
if not mesh_visibility:
print("No meshes found!")
return
internal_count = sum(1 for is_visible in mesh_visibility.values() if not is_visible)
external_count = sum(1 for is_visible in mesh_visibility.values() if is_visible)
print(f"Found {len(mesh_visibility)} meshes:")
print(f" - Internal (invisible): {internal_count} meshes")
print(f" - External (visible): {external_count} meshes")
# Step 1: Create internal.usd file from current stage
print(f"\n=== Step 1: Creating internal.usd ===")
print(f"Creating internal.usd from current stage...")
# Export current stage to internal.usd
stage.Export(internal_path)
# Open the internal file and process it
print("Opening internal.usd and processing...")
internal_stage = Usd.Stage.Open(internal_path)
if internal_stage:
# Step 1: Delete external (visible) meshes
delete_meshes_by_visibility(internal_stage, keep_visible=False)
# Step 2: Prune empty leaf nodes
prune_empty_leaf_nodes(internal_stage, ignore_look_scopes=True)
# Step 3: Restructure hierarchy
restructure_hierarchy(internal_stage, "internal")
# Step 4: Update material binding paths
update_material_bindings(internal_stage, "internal")
# Step 5: Remove Occluder mesh
remove_occluder_mesh(internal_stage)
# Step 6: Set all prims to visible
set_all_prims_visible(internal_stage)
internal_stage.Save()
print(f"Completed processing internal.usd with {internal_count} internal meshes")
else:
print(f"Error: Could not open {internal_path}")
return
# Step 2: Create external.usd file from current stage
print(f"\n=== Step 2: Creating external.usd ===")
print(f"Creating external.usd from current stage...")
# Export current stage to external.usd
stage.Export(external_path)
# Open the external file and process it
print("Opening external.usd and processing...")
external_stage = Usd.Stage.Open(external_path)
if external_stage:
# Step 1: Delete internal (invisible) meshes
delete_meshes_by_visibility(external_stage, keep_visible=True)
# Step 2: Prune empty leaf nodes
prune_empty_leaf_nodes(external_stage, ignore_look_scopes=True)
# Step 3: Restructure hierarchy
restructure_hierarchy(external_stage, "external")
# Step 4: Update material binding paths
update_material_bindings(external_stage, "external")
# Step 5: Remove Occluder mesh
remove_occluder_mesh(external_stage)
# Step 6: Set all prims to visible
set_all_prims_visible(external_stage)
external_stage.Save()
print(f"Completed processing external.usd with {external_count} external meshes")
else:
print(f"Error: Could not open {external_path}")
return
# Step 3: Create new main file with payloads
print(f"\n=== Step 3: Creating new main file with payloads ===")
# Create new main file path
main_file_path = os.path.join(stage_dir, f"{stage_name}_main{stage_ext}")
# Create a completely new stage for the main file
main_stage = Usd.Stage.CreateNew(main_file_path)
# Copy stage metadata from original
up_axis = UsdGeom.GetStageUpAxis(stage)
UsdGeom.SetStageUpAxis(main_stage, up_axis)
meters_per_unit = UsdGeom.GetStageMetersPerUnit(stage)
UsdGeom.SetStageMetersPerUnit(main_stage, meters_per_unit)
# Copy preset directory metadata from original stage to main stage
source_root_layer = stage.GetRootLayer()
source_custom_data = source_root_layer.customLayerData
if source_custom_data and "sceneOptimizerPresetDir" in source_custom_data:
preset_dir = source_custom_data["sceneOptimizerPresetDir"]
main_root_layer = main_stage.GetRootLayer()
main_custom_data = dict(main_root_layer.customLayerData) if main_root_layer.customLayerData else {}
main_custom_data["sceneOptimizerPresetDir"] = preset_dir
main_root_layer.customLayerData = main_custom_data
print(f"\n[OK] Copied preset directory metadata to main stage: {preset_dir}")
else:
print(f"\n[WARNING] No preset directory metadata found on source stage to copy")
# Create default prim as Xform
default_prim_path = f"/{DEFAULT_PRIM_NAME}"
default_prim = UsdGeom.Xform.Define(main_stage, default_prim_path).GetPrim()
main_stage.SetDefaultPrim(default_prim)
# Set Kind to "component" - indicates this is a complete, referenceable asset
# USD CONCEPT: Kind metadata helps tools understand asset hierarchy and purpose
Usd.ModelAPI(default_prim).SetKind(Kind.Tokens.component)
print(f" Created default prim (Xform) with Kind=component: {default_prim_path}")
# Create external payload prim (active)
external_prim_path = f"{default_prim_path}/external"
external_prim = main_stage.DefinePrim(external_prim_path)
# Add payload to external file (use forward slashes and ./ prefix for USD)
external_file_rel = os.path.relpath(external_path, os.path.dirname(main_file_path)).replace("\\", "/")
external_file_rel = f"./{external_file_rel}"
external_prim.GetPayloads().AddPayload(external_file_rel, "/external")
print(f" Added external payload: {external_file_rel}")
# Create internal payload prim (inactive)
internal_prim_path = f"{default_prim_path}/internal"
internal_prim = main_stage.DefinePrim(internal_prim_path)
# Add payload to internal file (use forward slashes and ./ prefix for USD)
internal_file_rel = os.path.relpath(internal_path, os.path.dirname(main_file_path)).replace("\\", "/")
internal_file_rel = f"./{internal_file_rel}"
internal_prim.GetPayloads().AddPayload(internal_file_rel, "/internal")
# Deactivate the internal payload prim
internal_prim.SetActive(False)
print(f" Added internal payload: {internal_file_rel} (deactivated)")
# Save the main stage
main_stage.Save()
print(f" Saved main stage: {main_file_path}")
# Close the current stage before opening the new one
# Clear pending edits to avoid save prompt
omni.usd.get_context().set_pending_edit(False)
omni.usd.get_context().close_stage()
# Open the new main stage in Kit
print(f"\n=== Opening converted file in Kit ===")
print(f" Type of main_file_path: {type(main_file_path)}")
print(f" Value of main_file_path: {main_file_path}")
omni.usd.get_context().open_stage(main_file_path)
print(f" Opened: {main_file_path}")
print(f"\n=== Process Complete! ===")
print(f"Created files:")
print(f" - {internal_path} (contains {internal_count} internal meshes)")
print(f" - {external_path} (contains {external_count} external meshes)")
print(f" - {main_file_path} (new main file with payloads)")
print(f"Original file unchanged: {stage_path}")
print(f"\nFile structure:")
print(f" {stage_name}{stage_ext} <- Original file")
print(f" {stage_name}_main{stage_ext} <- Main working file")
print(f" payloads/")
print(f" |-- internal.usd <- Internal meshes")
print(f" +-- external.usd <- External meshes")
def force_show_prims():
prim_paths_to_show = [
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_1/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_2/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_3/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_4/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_5/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_6/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_7/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_8/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_9/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_10/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_11/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/BRANDING_COOLCHIP_CDU_4/BRANDING_COOLCHIP_CDU_4_12/surface_0",
"/World/XDU2300_TOP/XDU2300A_ASM_20/XDU2300AG01001_AF0_ASM_19/tn__10154302_AF0_ASM_15_/tn__10077804_15_/surface_1"
]
usd_context = omni.usd.get_context()
stage = usd_context.get_stage()
for prim_path in prim_paths_to_show:
prim = stage.GetPrimAtPath(prim_path)
if prim.IsValid():
imageable = UsdGeom.Imageable(prim)
if imageable:
imageable.MakeVisible()
print(f"Force-showed prim: {prim_path}")
else:
print(f"Warning: Prim is not imageable: {prim_path}")
force_show_prims()
create_internal_external_files()
# # Example usage and test functions
# if __name__ == "__main__":
# print("This script will:")
# print("1. Create payloads/ directory for organization")
# print("2. Create payloads/internal.usd from current stage (invisible meshes)")
# print("3. Create payloads/external.usd from current stage (visible meshes)")
# print("4. Restructure hierarchy: /internal/Looks/Material1 (remove intermediate prim)")
# print("5. Update material binding paths after hierarchy changes")
# print("6. Create NEW main file with payloads (avoids UI prim invalidation)")
# print("7. Open the new main file in Kit")
# print("=" * 80)
# # Execute the asset splitting workflow
# force_show_prims()
# create_internal_external_files()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876"""
USD Dynamic Material Replacement
================================
Replaces CAD-imported materials with standardized target materials using template mapping
and fallback strategies.
USD Concepts: UsdShade.Material, UsdPreviewSurface shader, MaterialBindingAPI, Looks organization
Workflow: Analyze Materials -> Create Targets -> Replace Bindings -> Validate Results
"""
import omni.usd
from pxr import Usd, UsdShade, Sdf, UsdGeom, Gf
# Target material definitions using UsdPreviewSurface input names
# UsdPreviewSurface inputs: diffuseColor, roughness, metallic, specularColor, ior, opacity, emissiveColor
TARGET_MATERIALS = {
"vertiv_black": {
"diffuseColor": (0.015, 0.015, 0.015),
"roughness": 0.5,
"metallic": 0.0,
"ior": 1.5
},
"plastic": {
"diffuseColor": (0.00554, 0.00597, 0.008), # Dark gray
"roughness": 0.89,
"metallic": 0.0,
"ior": 1.5
},
"shiny_plastic": {
"diffuseColor": (0.00554, 0.00597, 0.008), # Dark gray
"roughness": 0.25,
"metallic": 0.0,
"ior": 1.5
},
"logo_white": {
"diffuseColor": (1.0, 1.0, 1.0), # White
"roughness": 0.85,
"metallic": 0.0,
"ior": 1.5
},
"glass": {
"diffuseColor": (0.95, 0.95, 0.95), # Nearly white (slight tint)
"roughness": 0.0, # Perfectly smooth (mirror-like)
"metallic": 0.0, # Non-metallic (dielectric)
"opacity": 0.1, # 90% transparent
"ior": 1.5, # Index of refraction for glass (1.5-1.52)
"specularColor": (1.0, 1.0, 1.0), # White highlights
"clearcoat": 1.0, # Optional: adds extra glossy layer
"clearcoatRoughness": 0.0 # Optional: smooth clearcoat
},
"steel": {
"diffuseColor": (0.8, 0.8, 0.8), # Light gray
"roughness": 0.21,
"metallic": 1.0,
"ior": 1.5
},
"screen": {
"diffuseColor": (0.01158, 0.01158, 0.01158), # Very light gray
"roughness": 0.05,
"metallic": 0.04,
"ior": 1.5
}
}
# Material replacement templates (relative to default prim)
MATERIAL_REPLACEMENT_TEMPLATES = {
# Materials that become vertiv_black (dark)
# Materials that become steel (medium gray)
# "Looks/ref_color266": "steel",
# "Looks/ref_color36": "steel",
# "Looks/tn__03_grau_75_": "steel",
# "Looks/tn__13_orange_": "steel",
# Materials that become screen (light)
# "Looks/ref_color556": "screen",
}
# Fallback material for any unspecified materials
FALLBACK_MATERIAL = "vertiv_black"
# Prim path overrides: Assign specific materials to specific prim paths
# If the path is an Xform, all meshes under it will receive the material
# Format: "prim_path": "target_material_name"
PRIM_PATH_MATERIAL_OVERRIDES = {
"/external/XDU2300A_ASM_18/AC00014_12/surface_0": "steel",
"/external/XDU2300A_ASM_18/XDU2300AG01001_AF0_ASM_17/tn__10154302_ASM_13_/tn__10077804_13_/surface_0": "plastic",
"/external/XDU2300A_ASM_18/XDU2300AG01001_AF0_ASM_17/tn__10154302_ASM_13_/tn__10077804_13_/surface_1/Geometry": "screen",
# Add specific prim path overrides here if needed
# Example: "/Root/SomeComponent": "steel",f
}
def get_dynamic_material_replacements():
"""
Build dynamic material replacement mapping using template patterns and fallbacks.
USD concepts: default prim navigation, UsdShade.Material discovery, path construction
"""
stage = omni.usd.get_context().get_stage()
if not stage:
print("Error: No active stage found")
return {}
# USD: Get default prim path for relative material addressing
default_prim = stage.GetDefaultPrim()
if default_prim and default_prim.IsValid():
default_prim_path = str(default_prim.GetPath())
else:
# USD fallback: extract from layer metadata
root_layer = stage.GetRootLayer()
default_prim_name = root_layer.defaultPrim or "World"
default_prim_path = f"/{default_prim_name}"
print(f"Building material replacements for: {default_prim_path}")
# USD: Build absolute material paths from relative templates
dynamic_replacements = {}
for template_path, target_material in MATERIAL_REPLACEMENT_TEMPLATES.items():
full_path = f"{default_prim_path}/{template_path}" # Convert to absolute path
dynamic_replacements[full_path] = target_material
# UsdShade: Discover all materials in Looks folder for fallback handling
looks_path = f"{default_prim_path}/Looks"
looks_prim = stage.GetPrimAtPath(looks_path)
fallback_count = 0
if looks_prim.IsValid():
for child in looks_prim.GetAllChildren():
if child.IsA(UsdShade.Material): # USD material schema filtering
material_path = str(child.GetPath())
if material_path not in dynamic_replacements:
dynamic_replacements[material_path] = FALLBACK_MATERIAL
fallback_count += 1
print(f" {len(MATERIAL_REPLACEMENT_TEMPLATES)} explicit + {fallback_count} fallback = {len(dynamic_replacements)} total replacements")
return dynamic_replacements
def create_or_find_material(material_name, material_props):
"""
Create or reuse target material with UsdPreviewSurface shader.
USD concepts: material creation, UsdShade.Shader, UsdPreviewSurface
"""
stage = omni.usd.get_context().get_stage()
# USD: Build material path following Looks organization convention
default_prim = stage.GetDefaultPrim()
if default_prim and default_prim.IsValid():
default_prim_path = str(default_prim.GetPath())
else:
root_layer = stage.GetRootLayer()
default_prim_name = root_layer.defaultPrim or "World"
default_prim_path = f"/{default_prim_name}"
material_path = f"{default_prim_path}/Looks/{material_name}" # Standard Looks folder
# USD: Check for existing material to avoid duplication
existing_material = stage.GetPrimAtPath(material_path)
if existing_material.IsValid():
print(f" Reusing existing material: {material_path}")
return material_path
# Create new UsdPreviewSurface material
print(f" Creating new UsdPreviewSurface material: {material_path}")
# USD: Ensure parent Looks scope exists
looks_path = f"{default_prim_path}/Looks"
looks_prim = stage.GetPrimAtPath(looks_path)
if not looks_prim.IsValid():
UsdGeom.Scope.Define(stage, looks_path)
# UsdShade: Create material prim
material = UsdShade.Material.Define(stage, material_path)
# UsdShade: Create UsdPreviewSurface shader
shader_path = f"{material_path}/Shader"
shader = UsdShade.Shader.Define(stage, shader_path)
shader.CreateIdAttr("UsdPreviewSurface")
# UsdShade: Connect shader output to material surface
shader_output = shader.CreateOutput("surface", Sdf.ValueTypeNames.Token)
material.CreateSurfaceOutput().ConnectToSource(shader_output)
# UsdShade: Set all shader properties from material_props
# UsdPreviewSurface standard inputs and their types
input_types = {
"diffuseColor": Sdf.ValueTypeNames.Color3f,
"emissiveColor": Sdf.ValueTypeNames.Color3f,
"specularColor": Sdf.ValueTypeNames.Color3f,
"roughness": Sdf.ValueTypeNames.Float,
"metallic": Sdf.ValueTypeNames.Float,
"ior": Sdf.ValueTypeNames.Float,
"opacity": Sdf.ValueTypeNames.Float,
"clearcoat": Sdf.ValueTypeNames.Float,
"clearcoatRoughness": Sdf.ValueTypeNames.Float,
"displacement": Sdf.ValueTypeNames.Float,
"occlusion": Sdf.ValueTypeNames.Float,
"useSpecularWorkflow": Sdf.ValueTypeNames.Int,
}
for prop_name, prop_value in material_props.items():
# Determine value type from known types or infer from value
if prop_name in input_types:
value_type = input_types[prop_name]
elif isinstance(prop_value, (int, float)):
value_type = Sdf.ValueTypeNames.Float
elif isinstance(prop_value, tuple) and len(prop_value) == 3:
value_type = Sdf.ValueTypeNames.Color3f
else:
continue # Skip unknown types
# Create and set the input
shader_input = shader.CreateInput(prop_name, value_type)
# Convert value to appropriate type
if value_type == Sdf.ValueTypeNames.Color3f:
shader_input.Set(Gf.Vec3f(*prop_value))
elif value_type == Sdf.ValueTypeNames.Float:
shader_input.Set(float(prop_value))
elif value_type == Sdf.ValueTypeNames.Int:
shader_input.Set(int(prop_value))
else:
shader_input.Set(prop_value)
return material_path
def replace_material_bindings(old_material_path, new_material_path):
"""
Replace material bindings across all geometry using MaterialBindingAPI.
USD concepts: material binding relationships, direct vs collection bindings
"""
stage = omni.usd.get_context().get_stage()
# Validate that the new material exists
new_material_prim = stage.GetPrimAtPath(new_material_path)
if not new_material_prim.IsValid() or not new_material_prim.IsA(UsdShade.Material):
print(f" ERROR: Target material does not exist: {new_material_path}")
return 0
# UsdShade: Find all prims with material bindings to old material
bindings_found = []
for prim in stage.Traverse():
if prim.HasAPI(UsdShade.MaterialBindingAPI): # Check for binding API
binding_api = UsdShade.MaterialBindingAPI(prim)
# UsdShade: Check direct material binding
direct_binding = binding_api.GetDirectBinding()
if direct_binding.GetMaterial() and str(direct_binding.GetMaterialPath()) == old_material_path:
bindings_found.append(prim)
# UsdShade: Check collection-based bindings
for collection_binding in binding_api.GetCollectionBindings():
if collection_binding.GetMaterial() and str(collection_binding.GetMaterialPath()) == old_material_path:
bindings_found.append(prim)
if not bindings_found:
print(f" No bindings found for: {old_material_path}")
return 0
print(f" Found {len(bindings_found)} bindings to replace")
# Omniverse: Update bindings with proper inheritance strength
updated_count = 0
for prim in bindings_found:
try:
omni.kit.commands.execute('BindMaterial',
prim_path=str(prim.GetPath()),
material_path=new_material_path,
strength='weakerThanDescendants' # Allow child overrides
)
updated_count += 1
except Exception as e:
print(f" Warning: Failed to rebind {prim.GetPath()}: {e}")
return updated_count
def clear_invalid_material_bindings():
"""
Clear material bindings that reference non-existent materials.
This pre-pass ensures that all material bindings point to valid materials
in the stage. Any binding to a material that doesn't exist will be cleared,
allowing those prims to be treated as unbound and receive the fallback material.
USD concepts: MaterialBindingAPI for checking/clearing bindings, UsdShade.Material validity
"""
print("\n=== Clearing Invalid Material Bindings ===")
stage = omni.usd.get_context().get_stage()
if not stage:
print("Error: No active stage found")
return 0
# Collect all valid material paths in the stage (including from payloads/references)
valid_materials = set()
for prim in stage.Traverse():
if prim.IsA(UsdShade.Material):
valid_materials.add(str(prim.GetPath()))
print(f"Found {len(valid_materials)} valid materials in stage")
if valid_materials:
print(f" Sample materials: {list(valid_materials)[:3]}")
# Check all geometry prims for invalid material bindings
# Use PrimRange with predicate to include both regular prims and prototypes (source prims for instances)
cleared_count = 0
invalid_materials_found = set()
processed_prims = set()
# Create a predicate that includes both active prims and prototypes (instance sources)
predicate = Usd.PrimIsActive & Usd.PrimIsDefined
# Traverse all prims including prototypes
for prim in Usd.PrimRange.Stage(stage, predicate):
# Check meshes and geom subsets
if not (prim.IsA(UsdGeom.Gprim) or prim.IsA(UsdGeom.Subset)):
continue
# Skip instances - we only want to process the actual source prims
if prim.IsInstance():
continue
# Skip if already processed
prim_path_str = str(prim.GetPath())
if prim_path_str in processed_prims:
continue
processed_prims.add(prim_path_str)
if prim.HasAPI(UsdShade.MaterialBindingAPI):
binding_api = UsdShade.MaterialBindingAPI(prim)
# Check direct bindings
direct_binding = binding_api.GetDirectBinding()
if direct_binding:
bound_material = direct_binding.GetMaterial()
if bound_material:
material_path = str(bound_material.GetPath())
# Check if the material actually exists
if material_path not in valid_materials:
invalid_materials_found.add(material_path)
print(f" Clearing invalid binding on {prim.GetPath()}")
print(f" References non-existent material: {material_path}")
# Clear the binding using Kit command
try:
omni.kit.commands.execute('BindMaterial',
prim_path=str(prim.GetPath()),
material_path=None, # Unbind
strength='weakerThanDescendants'
)
cleared_count += 1
except Exception as e:
print(f" Warning: Failed to clear binding: {e}")
# Check collection-based bindings
for collection_binding in binding_api.GetCollectionBindings():
bound_material = collection_binding.GetMaterial()
if bound_material:
material_path = str(bound_material.GetMaterialPath())
if material_path not in valid_materials:
invalid_materials_found.add(material_path)
print(f" Found invalid collection binding on {prim.GetPath()}")
print(f" References non-existent material: {material_path}")
print(f" Note: Collection bindings may need manual cleanup")
print(f"Cleared {cleared_count} invalid material bindings")
if invalid_materials_found:
print(f"Invalid material paths found ({len(invalid_materials_found)} unique):")
for invalid_path in list(invalid_materials_found)[:5]:
print(f" - {invalid_path}")
if len(invalid_materials_found) > 5:
print(f" ... and {len(invalid_materials_found) - 5} more")
return cleared_count
def assign_fallback_to_unbound_meshes():
"""
Assign fallback material to meshes that have no material binding.
USD concepts: UsdGeom.Mesh, MaterialBindingAPI existence check, binding creation
"""
print("\n=== Assigning Fallback Material to Unbound Meshes ===")
stage = omni.usd.get_context().get_stage()
if not stage:
print("Error: No active stage found")
return 0
# Find or create the fallback material
fallback_material_path = create_or_find_material(FALLBACK_MATERIAL, TARGET_MATERIALS[FALLBACK_MATERIAL])
# Validate that the fallback material exists
material_prim = stage.GetPrimAtPath(fallback_material_path)
if not material_prim.IsValid() or not material_prim.IsA(UsdShade.Material):
print(f"ERROR: Fallback material does not exist in stage: {fallback_material_path}")
print("Cannot assign fallback material to unbound meshes")
return 0
print(f"Using fallback material: {fallback_material_path}")
# Find all meshes without material bindings
unbound_meshes = []
for prim in stage.Traverse():
# Check if it's a mesh
if prim.IsA(UsdGeom.Mesh):
# Check if it has NO material binding
has_binding = False
if prim.HasAPI(UsdShade.MaterialBindingAPI):
binding_api = UsdShade.MaterialBindingAPI(prim)
direct_binding = binding_api.GetDirectBinding()
if direct_binding.GetMaterial():
has_binding = True
if not has_binding:
unbound_meshes.append(prim)
print(f"Found {len(unbound_meshes)} meshes without material assignments")
# Assign fallback material to unbound meshes
assigned_count = 0
for prim in unbound_meshes:
try:
omni.kit.commands.execute('BindMaterial',
prim_path=str(prim.GetPath()),
material_path=fallback_material_path,
strength='weakerThanDescendants'
)
assigned_count += 1
print(f" Assigned {FALLBACK_MATERIAL} to: {prim.GetPath()}")
except Exception as e:
print(f" Warning: Failed to bind {prim.GetPath()}: {e}")
print(f"Assigned {FALLBACK_MATERIAL} to {assigned_count} unbound meshes")
return assigned_count
def apply_prim_path_overrides():
"""
Apply material overrides to specific prim paths with flexible path matching.
Path Matching Modes:
1. Exact Match: If the full path exists in the stage, uses it directly
2. Partial Match: If exact path not found, searches for prims whose path ends with the specified path
Example: "/A/B/C" will match any prim ending with "/A/B/C" like "/Root/X/Y/A/B/C"
Prim Type Handling:
- If the prim is an Xform, assigns the material to all meshes in its hierarchy
- If the prim is a GeomSubset, clears the parent mesh binding to allow subset override
- If the prim is a Mesh, assigns directly
USD concepts: Usd.PrimRange for hierarchy traversal, UsdGeom.Mesh/Xform type checking,
UsdGeom.Subset for face-level material assignment, MaterialBindingAPI for binding materials
"""
if not PRIM_PATH_MATERIAL_OVERRIDES:
print("\n=== No Prim Path Overrides Configured ===")
return 0
print("\n=== Applying Prim Path Material Overrides ===")
stage = omni.usd.get_context().get_stage()
if not stage:
print("Error: No active stage found")
return 0
# First pass: Filter out paths that don't exist in the stage
print(f"Filtering {len(PRIM_PATH_MATERIAL_OVERRIDES)} configured overrides...")
valid_overrides = {}
skipped_overrides = []
for prim_path, target_material_name in PRIM_PATH_MATERIAL_OVERRIDES.items():
# Quick check: try exact path first
prim = stage.GetPrimAtPath(prim_path)
if prim.IsValid():
valid_overrides[prim_path] = target_material_name
else:
# Check if progressive suffix matching would find anything
path_segments = [seg for seg in prim_path.split('/') if seg]
found_match = False
for start_idx in range(min(3, len(path_segments))): # Only try first 3 levels for filtering
suffix_segments = path_segments[start_idx:]
suffix_path = '/' + '/'.join(suffix_segments)
# Quick check: see if ANY prim ends with this suffix
for stage_prim in stage.Traverse():
if str(stage_prim.GetPath()).endswith(suffix_path):
found_match = True
break
if found_match:
valid_overrides[prim_path] = target_material_name
break
if not found_match:
skipped_overrides.append(prim_path)
if skipped_overrides:
print(f"Skipping {len(skipped_overrides)} overrides with no matching prims in stage:")
for skipped_path in skipped_overrides[:5]: # Show first 5
print(f" - {skipped_path}")
if len(skipped_overrides) > 5:
print(f" ... and {len(skipped_overrides) - 5} more")
print(f"Processing {len(valid_overrides)} valid overrides")
if not valid_overrides:
print("No valid prim path overrides found in stage")
return 0
total_overrides = 0
cleared_mesh_bindings = set() # Track meshes we've cleared bindings from
def find_prims_by_partial_path(partial_path):
"""
Find all prims whose path matches a progressive suffix of the specified partial path.
Strategy:
1. Try exact suffix match: prim_path.endswith(partial_path)
2. If no match, try progressive suffixes starting from each "/" in the configured path
Example: If partial_path is "/Root/A/B/C", will try to match:
- "/Root/A/B/C" (exact)
- "/A/B/C" (skip first segment)
- "/B/C" (skip first two segments)
- "/C" (skip first three segments)
This handles cases where the stage has been deduplicated and top-level prims removed.
"""
matching_prims = []
# Split the path into segments
path_segments = [seg for seg in partial_path.split('/') if seg]
print(f" Trying to match path with {len(path_segments)} segments: {partial_path}")
# Try progressively shorter suffixes (from most specific to least specific)
for start_idx in range(len(path_segments)):
# Build the suffix path
suffix_segments = path_segments[start_idx:]
suffix_path = '/' + '/'.join(suffix_segments)
if start_idx > 0:
print(f" Trying suffix (skipping {start_idx} segment(s)): {suffix_path}")
# Check all prims for this suffix
for prim in stage.Traverse():
prim_path_str = str(prim.GetPath())
if prim_path_str.endswith(suffix_path):
# Avoid duplicates
if prim not in matching_prims:
matching_prims.append(prim)
print(f" MATCH: {prim_path_str}")
# If we found matches, stop trying shorter suffixes
if matching_prims:
print(f" Found {len(matching_prims)} match(es) with suffix: {suffix_path}")
break
if not matching_prims:
print(f" No matches found for any suffix of: {partial_path}")
print(f" DEBUG: First 5 prim paths in stage:")
for i, prim in enumerate(stage.Traverse()):
if i >= 5:
break
print(f" {prim.GetPath()}")
return matching_prims
for prim_path, target_material_name in valid_overrides.items():
print(f"\nProcessing override: {prim_path} -> {target_material_name}")
# USD: Validate target material exists in config
if target_material_name not in TARGET_MATERIALS:
print(f" Error: Unknown target material '{target_material_name}'")
continue
# USD: Try exact path match first
prim = stage.GetPrimAtPath(prim_path)
matching_prims = []
if prim.IsValid():
# Exact match found
matching_prims = [prim]
print(f" Found exact match: {prim_path}")
else:
# Try partial path matching
print(f" Exact path not found, searching for partial matches...")
matching_prims = find_prims_by_partial_path(prim_path)
if matching_prims:
print(f" Found {len(matching_prims)} partial match(es):")
for match in matching_prims:
print(f" - {match.GetPath()}")
else:
print(f" Warning: No prims found matching path: {prim_path}")
continue
# Process each matching prim
for prim in matching_prims:
# USD: Create or find the target material
material_path = create_or_find_material(target_material_name, TARGET_MATERIALS[target_material_name])
# Validate that the material actually exists in the stage
material_prim = stage.GetPrimAtPath(material_path)
if not material_prim.IsValid() or not material_prim.IsA(UsdShade.Material):
print(f" ERROR: Material does not exist in stage: {material_path}")
print(f" Skipping material assignment for: {prim.GetPath()}")
continue
print(f" Using material: {material_path}")
# USD: Check if prim is a GeomSubset (child of a Mesh for face-level materials)
if prim.IsA(UsdGeom.Subset):
print(f" Prim is a GeomSubset at {prim.GetPath()}, handling parent mesh binding...")
# USD: Get the parent mesh prim
parent_prim = prim.GetParent()
if parent_prim and parent_prim.IsA(UsdGeom.Mesh):
parent_path = str(parent_prim.GetPath())
# Clear parent mesh binding only once to allow GeomSubset bindings to take effect
# USD: strongerThanDescendants on parent would override GeomSubset bindings
if parent_path not in cleared_mesh_bindings:
try:
# Unbind material from parent mesh (set to None)
omni.kit.commands.execute('BindMaterial',
prim_path=parent_path,
material_path=None, # Clear the binding
strength='weakerThanDescendants'
)
cleared_mesh_bindings.add(parent_path)
print(f" Cleared material binding on parent mesh: {parent_path}")
except Exception as e:
print(f" Warning: Failed to clear parent mesh binding: {e}")
# Bind material to the GeomSubset
try:
omni.kit.commands.execute('BindMaterial',
prim_path=str(prim.GetPath()),
material_path=material_path,
strength='weakerThanDescendants' # Standard strength for subsets
)
total_overrides += 1
print(f" Assigned {target_material_name} to GeomSubset: {prim.GetPath()}")
except Exception as e:
print(f" Warning: Failed to bind material to GeomSubset {prim.GetPath()}: {e}")
continue
# Collect prims to assign material to
prims_to_assign = []
# USD: Check if prim is a mesh directly
if prim.IsA(UsdGeom.Mesh):
prims_to_assign.append(prim)
print(f" Prim is a Mesh, assigning directly")
# USD: Check if prim is an Xform (or any transformable) - traverse hierarchy for meshes
elif prim.IsA(UsdGeom.Xformable):
print(f" Prim is an Xform, finding all meshes in hierarchy...")
# USD: Use PrimRange to traverse all descendants
for descendant in Usd.PrimRange(prim):
if descendant.IsA(UsdGeom.Mesh):
prims_to_assign.append(descendant)
print(f" Found {len(prims_to_assign)} meshes under {prim.GetPath()}")
else:
print(f" Warning: Prim at {prim.GetPath()} is neither a Mesh, Xform, nor GeomSubset (type: {prim.GetTypeName()})")
continue
# USD: Apply material binding to each prim using MaterialBindingAPI
for target_prim in prims_to_assign:
try:
# Omniverse: Use BindMaterial command for proper undo support and binding
omni.kit.commands.execute('BindMaterial',
prim_path=str(target_prim.GetPath()),
material_path=material_path,
strength='strongerThanDescendants' # Override any inherited bindings
)
total_overrides += 1
print(f" Assigned {target_material_name} to: {target_prim.GetPath()}")
except Exception as e:
print(f" Warning: Failed to bind material to {target_prim.GetPath()}: {e}")
print(f"\nApplied {total_overrides} prim path material overrides")
if cleared_mesh_bindings:
print(f"Cleared bindings on {len(cleared_mesh_bindings)} parent meshes for GeomSubset overrides")
return total_overrides
def replace_materials():
"""
Execute complete material replacement workflow with template mapping and fallbacks.
USD concepts: material organization, batch processing, binding validation
"""
print("=== Material Replacement Process ===")
stage = omni.usd.get_context().get_stage()
if not stage:
print("Error: No active stage found")
return
# PRE-PASS: Clear any invalid material bindings (references to non-existent materials)
cleared_invalid = clear_invalid_material_bindings()
# USD: Pre-create all target materials if they don't exist
print("\n=== Ensuring Target Materials Exist ===")
for material_name, material_props in TARGET_MATERIALS.items():
material_path = create_or_find_material(material_name, material_props)
print(f" {material_name}: {material_path}")
# USD: Build material replacement mapping
material_replacements = get_dynamic_material_replacements()
if not material_replacements:
print("No material replacements to process")
# Still continue to process prim path overrides even if no replacements
else:
# Optimization: Group replacements by target material to minimize creation
target_groups = {}
for old_path, target_name in material_replacements.items():
if target_name not in target_groups:
target_groups[target_name] = []
target_groups[target_name].append(old_path)
print(f"\nProcessing {len(material_replacements)} replacements grouped into {len(target_groups)} targets")
total_replacements = 0
created_materials = {}
# Process each target material group
for target_name, old_material_paths in target_groups.items():
print(f"\n=== Target Material: {target_name} ===")
# Validate target material exists in config
if target_name not in TARGET_MATERIALS:
print(f" Error: Unknown target material '{target_name}'")
continue
# USD: Get material path (already created above)
default_prim = stage.GetDefaultPrim()
if default_prim and default_prim.IsValid():
default_prim_path = str(default_prim.GetPath())
else:
root_layer = stage.GetRootLayer()
default_prim_name = root_layer.defaultPrim or "World"
default_prim_path = f"/{default_prim_name}"
new_material_path = f"{default_prim_path}/Looks/{target_name}"
# Replace all materials that map to this target
group_replacements = 0
for old_material_path in old_material_paths:
# USD: Validate old material exists before replacement
old_material_prim = stage.GetPrimAtPath(old_material_path)
if not old_material_prim.IsValid():
print(f" Skipping missing material: {old_material_path}")
continue
# Replace bindings
updated_count = replace_material_bindings(old_material_path, new_material_path)
group_replacements += updated_count
total_replacements += updated_count
print(f" {target_name}: {group_replacements} bindings updated")
print(f"\n=== Complete ===")
print(f"Updated {total_replacements} total bindings")
# Assign fallback material to meshes with no material binding
unbound_assigned = assign_fallback_to_unbound_meshes()
# Apply specific prim path overrides (runs last to take priority)
overrides_applied = apply_prim_path_overrides()
# Clean up unused materials
removed_count = remove_unused_materials()
print(f"\n=== Final Summary ===")
print(f"Invalid material bindings cleared: {cleared_invalid}")
print(f"Total material bindings replaced: {total_replacements if material_replacements else 0}")
print(f"Total unbound meshes assigned fallback: {unbound_assigned}")
print(f"Total prim path overrides applied: {overrides_applied}")
print(f"Total unused materials removed: {removed_count}")
def remove_unused_materials():
"""
Remove materials that don't contribute to any rendered geometry.
Uses ComputeBoundMaterial() to resolve actual winning materials after
considering binding strength, hierarchy, and material purpose.
USD concepts: ComputeBoundMaterial resolution, binding strength, material purpose
"""
print("\n=== Removing Non-Contributing Materials ===")
stage = omni.usd.get_context().get_stage()
if not stage:
print("Error: No active stage found")
return 0
# Step 1: Collect all materials in the stage
all_materials = set()
for prim in stage.Traverse():
if prim.IsA(UsdShade.Material):
all_materials.add(str(prim.GetPath()))
print(f"Found {len(all_materials)} total materials in stage")
if not all_materials:
return 0
# Step 2: Collect all geometry prims (meshes, subsets, etc.)
geometry_prims = []
for prim in stage.Traverse():
# Include meshes and geom subsets (face-level material assignments)
if prim.IsA(UsdGeom.Gprim) or prim.IsA(UsdGeom.Subset):
geometry_prims.append(prim)
print(f"Found {len(geometry_prims)} geometry prims to check")
if not geometry_prims:
print("No geometry found - removing all materials")
contributing_materials = set()
else:
# Step 3: Use ComputeBoundMaterial to find materials that ACTUALLY contribute
# This resolves binding strength, hierarchy, and returns the winning material
contributing_materials = set()
for prim in geometry_prims:
binding_api = UsdShade.MaterialBindingAPI(prim)
# ComputeBoundMaterial returns the resolved/winning material
# considering all binding strengths and hierarchy
bound_material, binding_rel = binding_api.ComputeBoundMaterial()
if bound_material:
contributing_materials.add(str(bound_material.GetPath()))
print(f"Found {len(contributing_materials)} materials that actually contribute to rendering")
# Step 4: Find non-contributing materials
non_contributing = all_materials - contributing_materials
if not non_contributing:
print("All materials contribute - nothing to remove")
return 0
print(f"Found {len(non_contributing)} non-contributing materials to remove:")
# Step 5: Delete non-contributing materials
removed_count = 0
for material_path in sorted(non_contributing): # Sort for consistent output
prim = stage.GetPrimAtPath(material_path)
if prim.IsValid():
try:
material_name = prim.GetName()
omni.kit.commands.execute('DeletePrims', paths=[material_path])
removed_count += 1
print(f" Removed: {material_name}")
except Exception as e:
print(f" Warning: Failed to remove {material_path}: {e}")
print(f"Removed {removed_count} non-contributing materials")
return removed_count
replace_materials()
# # Material standardization workflow: Replace CAD materials with production-ready PBR materials
# if __name__ == "__main__":
# print("=== Dynamic Material Replacement ===")
# replace_materials()XDU2300_Top/.metadata/XDU2300_Top_benchmark.jsonAdded+312
XDU2300_Top/.metadata/XDU2300_Top_validation.jsonAdded+62
XDU2300_Top/.metadata/com.nvidia.simready.conformance.Package-Candidate@1.0.0.jsonAdded+35
XDU2300_Top/.metadata/com.nvidia.simready.conformance.Package@1.0.0.jsonAdded+35
XDU2300_Top/.metadata/com.nvidia.simready.packaging.bom.jsonAdded+159
XDU2300_Top/com.nvidia.simready.packaging.json+31-6
XDU2300_Top/simready_usd/.thumbs/256x256/XDU2300_Top_main.usd.png
Large File Pointer Details
- SHA256: f7503e416a7fd362486b3c18956342b46475f4cb38f5fd84b4710f1c18656bee
- Pointer size: 130 Bytes
- Size of remote file: 15.5 kB
Large File Pointer Details
- SHA256: 50e31a0d55780c670bb25b90a9cb43ac73bdc08e61cd719e1675116291b3ac79
- Pointer size: 131 Bytes
- Size of remote file: 558 kB
XDU2300_Top/simready_usd/layers/.thumbs/256x256/XDU2300_Top_ConnectionPoints.usd.png → XDU2300_Top/simready_usd/.thumbs/256x256/XDU2300_Top_main.usd_light.pngRenamed
Large File Pointer Details
- SHA256: f7503e416a7fd362486b3c18956342b46475f4cb38f5fd84b4710f1c18656bee
- Pointer size: 130 Bytes
- Size of remote file: 15.5 kB
Large File Pointer Details
- SHA256: 4d22123d11c98017c8919dd478f4a6dd8cd69de6e5719fc92c641741bc0aef3b
- Pointer size: 131 Bytes
- Size of remote file: 461 kB
XDU2300_Top/simready_usd/layers/.thumbs/256x256/XDU2300_Top_Properties.usda.png → XDU2300_Top/simready_usd/.thumbs/256x256/XDU2300_Top_main.usd_transparent.pngRenamed
Large File Pointer Details
- SHA256: f7503e416a7fd362486b3c18956342b46475f4cb38f5fd84b4710f1c18656bee
- Pointer size: 130 Bytes
- Size of remote file: 15.5 kB
Large File Pointer Details
- SHA256: 62e5f3f9017320da1d532e38e267468a15fcab160f51278dae793dbcfd5d1c60
- Pointer size: 131 Bytes
- Size of remote file: 296 kB
XDU2300_Top/simready_usd/XDU2300_Top_main.usd
XDU2300_Top/simready_usd/layers/XDU2300_Top_ConnectionPoints.usd
XDU2300_Top/simready_usd/layers/XDU2300_Top_Properties.usda+1-10
XDU2300_Top/simready_usd/payloads/.thumbs/256x256/external.usd.pngDeleted
Large File Pointer Details
- SHA256: f7503e416a7fd362486b3c18956342b46475f4cb38f5fd84b4710f1c18656bee
- Pointer size: 130 Bytes
- Size of remote file: 15.5 kB
XDU2300_Top/simready_usd/payloads/.thumbs/256x256/internal.usd.pngDeleted
Large File Pointer Details
- SHA256: f7503e416a7fd362486b3c18956342b46475f4cb38f5fd84b4710f1c18656bee
- Pointer size: 130 Bytes
- Size of remote file: 15.5 kB
XDU2300_Top/simready_usd/payloads/external.usd+2-2
XDU2300_Top/simready_usd/payloads/internal.usd+1-1
XDU2300_Top/simready_usd/scripts/01_Occluder.pyDeleted-127
XDU2300_Top/simready_usd/scripts/02_Internal_External.pyDeleted-1010
XDU2300_Top/simready_usd/scripts/03_Material_Replacement.pyDeleted-876
XDU2300_Top/simready_usd/textures/.thumbs/256x256/vertiv_logo.usd.pngDeleted
Large File Pointer Details
- SHA256: f7503e416a7fd362486b3c18956342b46475f4cb38f5fd84b4710f1c18656bee
- Pointer size: 130 Bytes
- Size of remote file: 15.5 kB