Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
SceneExport.hpp
1#pragma once
2
3#include "CompositeObj.hpp"
4#include "system/System.hpp"
5#include "Common.hpp"
6
11namespace SceneExport {
12
15struct Material {
16 std::string colorName;
17 std::string normalName;
18 std::string roughMetAoName;
19 std::string depthName;
20 bool hasAlpha = false;
21};
22
28int saveColor(const std::string & outputPath, const glm::vec3 & color);
29
36Material saveMaterial(const std::string & baseName, const CompositeObj::Material & material, const std::string & outputDirPath);
37
44int saveDescription(const std::vector<CompositeObj::Object> & objects, const std::unordered_map<std::string, Material> & materials, const std::string & outputPath);
45
46}
Helpers to export a Rendu scene.
Definition: SceneExport.cpp:4
int saveColor(const std::string &outputPath, const glm::vec3 &color)
Definition: SceneExport.cpp:8
Material saveMaterial(const std::string &baseName, const CompositeObj::Material &material, const std::string &outputDirPath)
Definition: SceneExport.cpp:18
int saveDescription(const std::vector< CompositeObj::Object > &objects, const std::unordered_map< std::string, Material > &materials, const std::string &outputPath)
Definition: SceneExport.cpp:195
OBJ material descriptor.
Definition: CompositeObj.hpp:16
Contain exported texture infos for a given material.
Definition: SceneExport.hpp:15
std::string normalName
Normal map name.
Definition: SceneExport.hpp:17
std::string depthName
Optional depth map.
Definition: SceneExport.hpp:19
std::string roughMetAoName
Roughness-metalness-ambient occlusion texture name.
Definition: SceneExport.hpp:18
std::string colorName
Color texture name.
Definition: SceneExport.hpp:16
bool hasAlpha
Alpha mask.
Definition: SceneExport.hpp:20