13 namespace visualization {
17 material_name_ =
"defaultUnlit";
45 return "Invalid Material\n";
47 std::ostringstream os;
48 os <<
"Material " << material_name_ <<
'\n';
49 for (
const auto &kv : scalar_properties_) {
50 os <<
'\t' << kv.first <<
": " << kv.second <<
'\n';
52 for (
const auto &kv : vector_properties_) {
53 os <<
'\t' << kv.first <<
": " << kv.second.transpose() <<
'\n';
55 for (
const auto &kv : texture_maps_) {
56 os <<
'\t' << kv.first <<
": " << kv.second.ToString() <<
'\n';
109 std::make_shared<geometry::Image>(
GetAlbedoMap().ToLegacy());
113 std::make_shared<geometry::Image>(
GetNormalMap().ToLegacy());
117 std::make_shared<geometry::Image>(
GetAOMap().ToLegacy());
std::shared_ptr< core::Tensor > image
The Image class stores image with customizable rows, cols, channels, dtype and device.
Eigen::Vector4f GetAbsorptionColor() const
const std::string & GetMaterialName() const
Get the name of the material.
bool HasThickness() const
void SetThickness(float value)
const t::geometry::Image & GetMetallicMap() const
void SetRoughnessMap(const t::geometry::Image &image)
bool HasNormalMap() const
std::string ToString() const
String reprentation for printing.
void SetClearcoatRoughnessMap(const t::geometry::Image &image)
Eigen::Vector4f GetBaseColor() const
bool HasRoughnessMap() const
float GetThickness() const
void SetDefaultProperties()
const t::geometry::Image & GetAnisotropyMap() const
bool HasMetallicMap() const
void SetReflectanceMap(const t::geometry::Image &image)
void SetBaseReflectance(float value)
void SetLineWidth(float value)
void ToMaterialRecord(MaterialRecord &record) const
Fills a legacy MaterialRecord constructed from this Material.
float GetBaseClearcoatRoughness() const
bool HasAlbedoMap() const
bool HasLineWidth() const
void SetAbsorptionDistance(float value)
void SetClearcoatMap(const t::geometry::Image &image)
const t::geometry::Image & GetRoughnessMap() const
bool HasBaseRoughness() const
bool HasEmissiveColor() const
bool HasAnisotropyMap() const
bool HasAnisotropy() const
Eigen::Vector4f GetEmissiveColor() const
bool HasBaseReflectance() const
bool HasClearcoatMap() const
float GetAnisotropy() const
float GetBaseClearcoat() const
float GetLineWidth() const
void SetAnisotropyMap(const t::geometry::Image &image)
void SetAORoughnessMetalMap(const t::geometry::Image &image)
void SetAOMap(const t::geometry::Image &image)
static Material FromMaterialRecord(const MaterialRecord &mat)
Convert from MaterialRecord.
void SetAbsorptionColor(const Eigen::Vector4f &value)
bool HasClearcoatRoughnessMap() const
const t::geometry::Image & GetNormalMap() const
void SetBaseRoughness(float value)
bool HasBaseColor() const
bool HasReflectanceMap() const
bool HasBaseClearcoatRoughness() const
float GetBaseRoughness() const
void SetPointSize(float value)
void SetTransmission(float value)
float GetAbsorptionDistance() const
bool HasBaseClearcoat() const
void SetTextureMap(const std::string &key, const t::geometry::Image &image)
float GetBaseMetallic() const
void SetBaseColor(const Eigen::Vector4f &value)
bool HasBaseMetallic() const
bool HasAORoughnessMetalMap() const
void SetEmissiveColor(const Eigen::Vector4f &value)
float GetBaseReflectance() const
void SetAlbedoMap(const t::geometry::Image &image)
void SetAnisotropy(float value)
void SetMetallicMap(const t::geometry::Image &image)
bool HasAbsorptionDistance() const
void SetBaseClearcoat(float value)
bool HasTransmission() const
void SetBaseClearcoatRoughness(float value)
bool HasPointSize() const
void SetBaseMetallic(float value)
float GetPointSize() const
bool HasAbsorptionColor() const
const t::geometry::Image & GetClearcoatMap() const
const t::geometry::Image & GetAOMap() const
float GetTransmission() const
const t::geometry::Image & GetAORoughnessMetalMap() const
const t::geometry::Image & GetAlbedoMap() const
const t::geometry::Image & GetClearcoatRoughnessMap() const
void SetNormalMap(const t::geometry::Image &image)
const t::geometry::Image & GetReflectanceMap() const
Generic file read and write utility for python interface.
std::shared_ptr< geometry::Image > normal_img
std::shared_ptr< geometry::Image > clearcoat_roughness_img
Eigen::Vector3f absorption_color
std::shared_ptr< geometry::Image > clearcoat_img
std::shared_ptr< geometry::Image > albedo_img
std::shared_ptr< geometry::Image > ao_rough_metal_img
std::shared_ptr< geometry::Image > ao_img
float base_clearcoat_roughness
std::shared_ptr< geometry::Image > metallic_img
Eigen::Vector4f emissive_color
std::shared_ptr< geometry::Image > roughness_img
float absorption_distance
std::shared_ptr< geometry::Image > anisotropy_img
std::shared_ptr< geometry::Image > reflectance_img
Eigen::Vector4f base_color