-
Hi all, First off, I’d like to extend a huge thank you to the developers for the incredible updates in Sionna v1.0.2! The improvements and enhancements are greatly appreciated. I recently upgraded to the latest version, but I’ve encountered an issue—scenes that I created and used in the previous version (Sionna v0.19.1) no longer work in the newer version (Sionna v1.0.2). I have tried to follow the new documentation, but this issue was not mentioned. Could you please provide guidance on how to resolve this? Are there any required modifications or compatibility steps that I need to follow? This is the error in (Sionna v1.0.2): RuntimeError Traceback (most recent call last)
Cell In[19], line 1
----> 1 scene = load_scene(main_path+'\\scene_v2_5.xml')
2 scene.frequency = 28e9
File path-to-venv\.venv\Lib\site-packages\sionna\rt\scene.py:1041, in load_scene(filename, merge_shapes, merge_shapes_exclude_regex)
1039 try:
1040 thread.set_file_resolver(fres)
-> 1041 mi_scene = mi.load_string(processed)
1042 finally:
1043 thread.set_file_resolver(fres_old)
RuntimeError: [xml.cpp:1082] Error while loading "<string>" (near line 12, col 10): could not instantiate bsdf plugin of type "itu-radio-material": Traceback (most recent call last):
[xml.cpp:1082] File "path-to-venv\.venv\Lib\site-packages\sionna\rt\radio_materials\itu_material.py", line 142, in <lambda>
[xml.cpp:1082] File "path-to-venv\.venv\Lib\site-packages\sionna\rt\radio_materials\itu_material.py", line 92, in __init__
[xml.cpp:1082] ValueError: Invalid ITU material type This is a sample of the exported scene <scene version="2.1.0">
<!-- Defaults, these can be set via the command line: -Darg=value -->
<!-- Camera and Rendering Parameters -->
<integrator type="path" id="elm__0" name="elm__0">
<integer name="max_depth" value="12"/>
</integrator>
<!-- Materials -->
<bsdf type="twosided" id="mat-itu_concrete" name="mat-itu_concrete">
<bsdf type="principled" name="bsdf">
<rgb value="0.800000 0.800000 0.800000" name="base_color"/>
<rgb value="1.000000 1.000000 1.000000" name="spec_tint"/>
<float name="spec_trans" value="0.000000"/>
<float name="metallic" value="0.000000"/>
<float name="anisotropic" value="0.000000"/>
<float name="roughness" value="0.250000"/>
<float name="sheen" value="0.000000"/>
<rgb value="1.000000 1.000000 1.000000" name="sheen_tint"/>
<float name="clearcoat" value="0.000000"/>
<float name="clearcoat_gloss" value="0.000900"/>
<float name="specular" value="0.500000"/>
</bsdf>
</bsdf>
<bsdf type="twosided" id="mat-itu_human" name="mat-itu_human">
<bsdf type="principled" name="bsdf">
<rgb value="0.733221 0.800047 0.005877" name="base_color"/>
<rgb value="1.000000 1.000000 1.000000" name="spec_tint"/>
<float name="spec_trans" value="0.000000"/>
<float name="metallic" value="0.000000"/>
<float name="anisotropic" value="0.000000"/>
<float name="roughness" value="0.250000"/>
<float name="sheen" value="0.000000"/>
<rgb value="1.000000 1.000000 1.000000" name="sheen_tint"/>
<float name="clearcoat" value="0.000000"/>
<float name="clearcoat_gloss" value="0.000900"/>
<float name="specular" value="0.500000"/>
</bsdf>
</bsdf>
<bsdf type="twosided" id="mat-itu_metal" name="mat-itu_metal">
<bsdf type="principled" name="bsdf">
<rgb value="0.076512 0.066013 0.059846" name="base_color"/>
<rgb value="1.000000 1.000000 1.000000" name="spec_tint"/>
<float name="spec_trans" value="0.000000"/>
<float name="metallic" value="0.652582"/>
<float name="anisotropic" value="0.000000"/>
<float name="roughness" value="0.611039"/>
<float name="sheen" value="0.000000"/>
<rgb value="1.000000 1.000000 1.000000" name="sheen_tint"/>
<float name="clearcoat" value="0.000000"/>
<float name="clearcoat_gloss" value="0.000900"/>
<float name="specular" value="0.500000"/>
</bsdf>
</bsdf>
<!-- Emitters -->
<emitter type="constant" id="World" name="World">
<rgb value="0.776519 0.776519 0.776519" name="radiance"/>
</emitter>
<!-- Shapes -->
<shape type="ply" id="mesh-Plane" name="mesh-Plane">
<string name="filename" value="meshes/Plane.ply"/>
<boolean name="face_normals" value="true"/>
<ref id="mat-itu_concrete" name="bsdf"/>
</shape>
<shape type="ply" id="mesh-human_001" name="mesh-human_001">
<string name="filename" value="meshes/human_001.ply"/>
<boolean name="face_normals" value="true"/>
<ref id="mat-itu_human" name="bsdf"/>
</shape>
<shape type="ply" id="mesh-human_001_001" name="mesh-human_001_001">
<string name="filename" value="meshes/human_001_001.ply"/>
<boolean name="face_normals" value="true"/>
<ref id="mat-itu_human" name="bsdf"/>
</shape>
<shape type="ply" id="mesh-Cylinder" name="mesh-Cylinder">
<string name="filename" value="meshes/Cylinder.ply"/>
<boolean name="face_normals" value="true"/>
<ref id="mat-itu_metal" name="bsdf"/>
</shape> Also, I was wondering if there is a chance to post a tutorial for the latest updates. Looking forward to your insights. Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 11 replies
-
Hello @Mohkared, Your scene uses a material name This is detected and results in the error that you encountered. |
Beta Was this translation helpful? Give feedback.
-
I have the same issue. Have you found the solution? |
Beta Was this translation helpful? Give feedback.
-
Hi @Mohkared. Sorry to ask this question under a closed thread. However, I'm wondering how one can export a scene from Sionna in the first place. I mean, suppose that I have all the data that I exported from blender (the .xml file and meshes directory). If I go on to add the various transmitters and receivers, how can I then export this enhanced scene from Sionna (in .xml or some other format)? |
Beta Was this translation helpful? Give feedback.
-
Hello @Mohkared, I am also sorry to ask under the closed thread, but how exactly did you resolve the issue with XML and undefined materials? I have a single mesh with a custom defined material in old Sionna exactly as you did, but |
Beta Was this translation helpful? Give feedback.
Hello @Mohkared,
I believe that you are simply seeing the effect of the
merge_shapes=True
option ofload_scene()
, where shapes with identical materials are merged into a single shape for increased efficiency: https://nvlabs.github.io/sionna/rt/api/scene.html#sionna.rt.load_sceneLet me know if I missed something.