Material settings分析
open3d设置面板
HDR map中使用的图所在的路径:
D:\learn\open3d\src\Open3D\cpp\open3d\visualization\gui
Type的取值 (具体可以看对应.mat中的着色器的实现)
Lit对应文件:pbr渲染一些常用参数,与后面Material中对传入的类型一一对应
D:\learn\open3d\src\Open3D\cpp\open3d\visualization\gui\Materials\defaultLit.mat
parameters : [
{ type : float3, name : baseColor },
{ type : float, name : baseMetallic },
{ type : float, name : baseRoughness },
{ type : float, name : reflectance },
{ type : float, name : clearCoat },
{ type : float, name : clearCoatRoughness },
{ type : float, name : anisotropy },
{ type : float, name : pointSize },
{ type : sampler2d, name : albedo },
{ type : sampler2d, name : ao_rough_metalMap },
{ type : sampler2d, name : normalMap },
{ type : sampler2d, name : reflectanceMap },
// NOTE: Disable clear coat textures to avoid Filament warning about exceeding
// 16 sampler limit. There is currently no supported standard format that
// supports these textures so they don't get used any way. Once the shader has
// been updated to combine roughness/metallic/reflectance/ao these textures
// will be reenabled.
//
// { type : sampler2d, name : clearCoatMap },
// { type : sampler2d, name : clearCoatRoughnessMap },
{ type : sampler2d, name : anisotropyMap }
]
Unlit对应文件:unlit为只显示本身设置的颜色,不显示阴影效果等,三维的显示没有三维的效果
D:\learn\open3d\src\Open3D\cpp\open3d\visualization\gui\Materials\defaultUnlit.mat
Normal map对应文件:normal类型为显示发现
D:\learn\open3d\src\Open3D\cpp\open3d\visualization\gui\Materials\normals.mat
Depth对应文件:depth为显示深度
D:\learn\open3d\src\Open3D\cpp\open3d\visualization\gui\Materials\depth.mat
Material的取值
所在位置:
D:\learn\open3d\src\Open3D\cpp\open3d\visualization\visualizer\GuiSettingsModel.cpp
对应的值为:baseColor(vec3),baseMetallic,baseRoughness,reflectance,clearCoat,clearCoatRoughness,anisotropy
const std::map<std::string, const GuiSettingsModel::LitMaterial>
GuiSettingsModel::prefab_materials_ = {
{DEFAULT_MATERIAL_NAME, {}},
{"Metal (rougher)",
{{1.0f, 1.0f, 1.0f}, 1.0f, 0.5f, 0.5f, 0.0f, 0.0f, 0.0f}},
{"Metal (smoother)",
{{1.0f, 1.0f, 1.0f}, 1.0f, 0.2f, 0.5f, 0.0f, 0.0f, 0.0f}},
{"Plastic",
{{1.0f, 1.0f, 1.0f}, 0.0f, 0.5f, 0.5f, 0.5f, 0.8f, 0.0f}},
{"Glazed ceramic",
{{1.0f, 1.0f, 1.0f}, 0.0f, 0.5f, 0.5f, 1.0f, 0.2f, 0.0f}},
{"Clay",
{{0.7725f, 0.7725f, 0.7725f},
0.0f,
1.0f,
0.35f,
0.0f,
0.0f,
0.0f}},
};
有个python的example示例设置路径:
D:\learn\open3d\src\Open3D\examples\python\gui\vis-gui.py