Open3D
Open3D copied to clipboard
What are all the shader options in Open3D?
When creating a mat = open3d.visualization.rendering.Material(), we usually assign a shader. So far I only saw and used "defaultLit"/"defaultUnlit"/"unlitLine", and I noticed that I can't find any documentation on the material shader options.
Can you please provide a full list of shader options here (and maybe a short explanation on what it does/how to use) or add it to the documentation? Thanks
I'm not qualified to speak to functionality in the C++ language yet, but I've tracked down some possible shader options in order to create a list that others might find helpful. Hopefully, someone more knowledgeable in the art of rendering can build a full definition for each in iteration on this post.
"defaultLit" "defaultUnlit" "defaultLitSSR" defaultLitTransparency "unlitLine" "normals" "depth"
Give them a shot! I've used some of them successfully with .stl exports of STEP file models.
Source: Open3D/open3d/visualization/visualizer/O3DVisualizer.cpp
Edit: After looking into the site-packages portion of the Open3D python distribution, I see that these formats are all collected in the ".filamat" filetype. I've added my best guess at these parameters, based on those files. I have not differentiated these between mesh and point cloud applications.
"unlitSolidColor" "unlitPolygonOffset" "unlitLine" "unlitGradient" "unlitBackground" "normals" "infiniteGroundPlane" "pointcloud" "defaultUnlitTransparency" "defaultLitSSR" "defaultUnlit" "defaultLit" "colorMap"
Source: C:\Users\localUserName\AppData\Local\Programs\Python\Python3x\Lib\site-packages\open3d\resources
Test prior to using in your application. There are a few other .filamat filenames, but they appear to have different formatting.
The .filamat files are compiled from .mat files in cpp/open3d/visualization/gui/Materials, which define what they do.
Only some of them are actually available, which are listed in defaults_mapping::shader_mappings. Others will fall back to kColorOnlyMesh as shown in FilamentScene::AssignMaterialToFilamentGeometry, which is actually kDefaultUnlit.