10 #include <vtkSmartPointer.h>
14 #include <unordered_map>
21 class vtkPolyDataMapper;
125 const PBRMaterial& material,
127 vtkRenderer* renderer =
nullptr);
142 enum class TextureQuality {
152 enum class FilterMode {
162 TextureQuality quality = TextureQuality::HIGH;
163 FilterMode filter_mode = FilterMode::MIPMAP;
164 bool enable_mipmaps =
true;
165 bool enable_texture_cache =
true;
166 bool enable_compression =
false;
167 int max_texture_size = 4096;
168 bool interpolate_scalars =
true;
169 bool use_phong_shading =
true;
175 struct MaterialInfo {
177 std::string texture_file;
178 float ambient[3] = {1.0f, 1.0f, 1.0f};
179 float diffuse[3] = {1.0f, 1.0f, 1.0f};
180 float specular[3] = {0.0f, 0.0f, 0.0f};
181 float shininess = 0.0f;
182 float opacity = 1.0f;
191 RenderingMode DetectRenderingMode(
const PBRMaterial& material)
const;
206 const PBRMaterial& material,
208 vtkRenderer* renderer,
222 const PBRMaterial& material,
233 const PBRMaterial& material,
242 void SetProperties(vtkProperty* property,
243 const PBRMaterial& material,
257 std::unique_ptr<Impl> impl_;
261 std::unordered_map<std::string, vtkSmartPointer<vtkTexture>> texture_cache_;
264 std::unordered_map<std::string, size_t> texture_memory_usage_;
Multi-texture renderer - Efficient and robust multi-texture mesh rendering support.
bool ApplyPBRMaterial(vtkSmartPointer< vtkActor > actor, const PBRMaterial &material, vtkSmartPointer< vtkPolyData > polydata, vtkRenderer *renderer=nullptr)
Apply PBR material to actor (Filament style)
~VtkMultiTextureRenderer()
VtkMultiTextureRenderer()
RenderingMode
Rendering mode enumeration.
colmap::RenderOptions RenderOptions
Generic PBR material structure (supports multi-texture)
bool hasAnyTexture() const
std::string clearcoatTexture
std::string anisotropyTexture
std::string clearcoatRoughnessTexture
std::string emissiveTexture
std::string roughnessTexture
std::string normalTexture
std::string metallicTexture
bool hasPBRTextures() const
std::string baseColorTexture