open3d材质设置参数分析

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

努力减肥的小胖子5

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值