You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've installed the open3d library throug pip (version 0.17.0) and I'm struggling with the documentation. I'm using the python version in windows, and I can't find out how to change the lighting/meterial properties. I'm following the tutorials in the documentation wich in some version refers to a class in open3d.visualization.rendering.Material and other times refers to a class in open3d.geometries.TriangleMesh.Material (I'm using triangular meshes). But the only one I found in my installation was open3d.visualization.Material and open3d.visualization.rendering.MaterialRecord. Also I couldn't find out how to use those in something like open3d.visualization.draw([{"name":"heart", "geometry":mesh, "material":material}]), as it awais returns, when adding the "material" property:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
[c:\Users\ital_\scripts\figure_2_heartlab_article.ipynb](file:///C:/Users/ital_/scripts/figure_2_heartlab_article.ipynb) Cell 25 line 1
----> [1](vscode-notebook-cell:/c%3A/Users/ital_/scripts/figure_2_heartlab_article.ipynb#X36sZmlsZQ%3D%3D?line=0) o3d.visualization.draw([{"name":"heart", "geometry":mesh, "material":material}])
File [c:\Users\ital_\python_hartlab\lib\site-packages\open3d\visualization\draw.py:62](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:62), in draw(geometry, title, width, height, actions, lookat, eye, up, field_of_view, intrinsic_matrix, extrinsic_matrix, bg_color, bg_image, ibl, ibl_intensity, show_skybox, show_ui, raw_mode, point_size, line_width, animation_time_step, animation_duration, rpc_interface, on_init, on_animation_frame, on_animation_tick, non_blocking_and_return_uid)
[60](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:60) if isinstance(geometry, list):
[61](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:61) for g in geometry:
---> [62](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:62) add(g, n)
[63](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:63) n += 1
[64](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:64) elif geometry is not None:
File [c:\Users\ital_\python_hartlab\lib\site-packages\open3d\visualization\draw.py:55](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:55), in draw.<locals>.add(g, n)
[53](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:53) def add(g, n):
[54](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:54) if isinstance(g, dict):
---> [55](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:55) w.add_geometry(g)
[56](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:56) else:
[57](file:///C:/Users/ital_/python_hartlab/lib/site-packages/open3d/visualization/draw.py:57) w.add_geometry("Object " + str(n), g)
RuntimeError: Unable to cast Python instance to C++ type (compile in debug mode for details)
I don't know what to do, I just want to change the lighting to a less "reflective" one...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I've installed the open3d library throug pip (version 0.17.0) and I'm struggling with the documentation. I'm using the python version in windows, and I can't find out how to change the lighting/meterial properties. I'm following the tutorials in the documentation wich in some version refers to a class in
open3d.visualization.rendering.Material
and other times refers to a class inopen3d.geometries.TriangleMesh.Material
(I'm using triangular meshes). But the only one I found in my installation wasopen3d.visualization.Material
andopen3d.visualization.rendering.MaterialRecord
. Also I couldn't find out how to use those in something likeopen3d.visualization.draw([{"name":"heart", "geometry":mesh, "material":material}])
, as it awais returns, when adding the "material" property:I don't know what to do, I just want to change the lighting to a less "reflective" one...
Beta Was this translation helpful? Give feedback.
All reactions