-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathmaterial.proto
131 lines (102 loc) · 3.51 KB
/
material.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
* Copyright (C) 2017 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
syntax = "proto3";
package ignition.msgs;
option java_package = "com.ignition.msgs";
option java_outer_classname = "MaterialProtos";
/// \ingroup ignition.msgs
/// \interface Material
/// \brief Information about a material
import "ignition/msgs/color.proto";
import "ignition/msgs/header.proto";
message Material
{
enum ShaderType
{
VERTEX = 0;
PIXEL = 1;
NORMAL_MAP_OBJECT_SPACE = 2;
NORMAL_MAP_TANGENT_SPACE = 3;
}
message Script
{
repeated string uri = 1;
string name = 2;
}
/// \brief Physically Based Rendering (PBR) material properties.
message PBR
{
/// \brief Type of PBR workflow
enum WorkflowType
{
/// \brief No workflow
NONE = 0;
/// \brief Metallic/Roughness workflow
METAL = 1;
/// \brief Specular/Glossiness workflow
SPECULAR = 2;
}
/// \brief Type of PBR workflow
WorkflowType type = 1;
/// \brief Filename of the albedo map
string albedo_map = 2;
/// \brief Filename of the normal map
string normal_map = 3;
/// \brief Metalness value (metal workflow)
double metalness = 4;
/// \brief Filename of the metalness map (metal workflow)
string metalness_map = 5;
/// \brief Roughness value (metal workflow)
double roughness = 6;
/// \brief Filename of the roughness map (metal workflow)
string roughness_map = 7;
/// \brief Glossiness value (specular workflow)
double glossiness = 8;
/// \brief Filename of the glossiness map (specular workflow)
string glossiness_map = 9;
/// \brief Filename of the specular map (specular workflow)
string specular_map = 10;
/// \brief Filename of the environment map
string environment_map = 11;
/// \brief Filename of the ambient occlusion map
string ambient_occlusion_map = 12;
/// \brief Filename of the emissive map
string emissive_map = 13;
/// \brief Filename of the light map.
string light_map = 14;
/// \brief Texture coordinate set for the light map
uint32 light_map_texcoord_set = 15;
}
/// \brief Optional header data
Header header = 1;
Script script = 2;
ShaderType shader_type = 3;
string normal_map = 4;
Color ambient = 5;
Color diffuse = 6;
Color specular = 7;
Color emissive = 8;
bool lighting = 9;
/// \brief Physically Based Rendering (PBR) material properties
PBR pbr = 10;
/// \brief Render order. The higher value will be rendered on top of the
/// other coplanar polygons
double render_order = 11;
/// \brief If true, the mesh that this material is applied to will be
/// rendered as double sided
bool double_sided = 12;
}