/
MaterialVariant.yaml
214 lines (207 loc) · 7.47 KB
/
MaterialVariant.yaml
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
name: MaterialVariant
type: class
category:
memory_category: Instances
summary: |
Represent a variant of a Material.
description: |
Using MaterialVariant objects can expand the variety of materials in an
experience. MaterialVariant has properties that can define the appearance of a
material. Its name can be set in MaterialService to globally override a
built-in material, or set in the `Class.BasePart.MaterialVariant` property to
change certain Parts. MaterialVariant objects only work as descendants of
MaterialService.
code_samples:
inherits:
- Instance
tags: []
deprecation_message: ''
properties:
- name: MaterialVariant.BaseMaterial
summary: |
Category Material this variant belongs to.
description: |
Category Material this variant belongs to.
code_samples:
type: Material
tags: []
deprecation_message: ''
security:
read: None
write: PluginSecurity
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
- name: MaterialVariant.ColorMap
summary: |
Determines the color of the surface.
description: |
This property determines the color of the surface. This texture is
sometimes called the albedo texture. The alpha channel is not used.
code_samples:
type: Content
tags: []
deprecation_message: ''
security:
read: PluginSecurity
write: PluginSecurity
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
- name: MaterialVariant.CustomPhysicalProperties
summary: ''
description: ''
code_samples: []
type: PhysicalProperties
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Material
serialization:
can_load: true
can_save: true
- name: MaterialVariant.MaterialPattern
summary: |
Determines texture tiling method.
description: |
Determines texture tiling method.
code_samples: []
type: MaterialPattern
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
- name: MaterialVariant.MetalnessMap
summary: |
Determines which parts of the surface are metal and are non-metal.
description: |
This property determines which parts of the surface are metal and are
non-metal. A metalness map is a grayscale image where black pixels
correspond to non-metals and white pixels correspond to metals.
Metals only reflect light the same color as the metal, and they reflect
much more light than non-metals. Most materials in the real world can be
categorized either metals or non-metals. For this reason, most pixels in a
metalness map will be either pure black or pure white. Values in between
are typically used to simulate dirt or grunge on top of an underlying
metal area.
When `Class.Lighting.EnvironmentSpecularScale` is 0, metalness has no
effect. For the most realistic reflections, setting
EnvironmentSpecularScale and `Class.Lighting.EnvironmentDiffuseScale` to
1, and `Class.Lighting.Ambient` and `Class.Lighting.OutdoorAmbient` to
(0,0,0) is recommended.
code_samples:
type: Content
tags: []
deprecation_message: ''
security:
read: PluginSecurity
write: PluginSecurity
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
- name: MaterialVariant.NormalMap
summary: |
Modifies the lighting of the surface by adding bumps, dents, cracks, and
curves without adding more polygons.
description: |
This property modifies the lighting of the surface by adding bumps, dents,
cracks, and curves without adding more polygons.
Normal maps are RGB images that modify the surface's normal vector used
for lighting calculations. The R, G, and B channels of the NormalMap
correspond to the X, Y, and Z components of the local surface vector
respectively, and byte values of 0 and 255 for each channel correspond
linearly to normal vector components of -1 and 1.016 respectively. This
range is stretched slightly from -1 to 1 so that a byte value of 127 maps
to exactly 0. The normal vector's Z axis is always defined as the
direction of the underlying mesh's normal. A uniform (127,127,255) image
translates to a completely flat normal map where the normal is everywhere
perpendicular to the mesh surface. This format is called "tangent space"
normal maps. Roblox does not support world space or object space normal
maps.
Incorrectly flipped normal components can make bumps appear like indents.
If you import a normal map and notice the lighting looks off, you may need
to invert the G channel of the image. The X and Y axes of the tangent
space frame correspond to the X and Y directions in the image after it's
transformed by the mesh UVs. If you view your normal map in an image
editor as if it were displayed on a surface, normals pointing towards the
right side of the screen should appear more red, and normals pointing
towards the top side of your screen should appear more green.
The terms "DirectX format" and "OpenGL format" are sometimes used to
describe whether the G channel of the normal map is inverted or not.
Roblox expects the OpenGL format.
Roblox expects imported meshes to include tangents. Modeling software may
also refer to this as "tangent space" information. If you apply a normal
map and it does not seem to make any visual difference, you may need to
re-export your mesh along with its tangent information from modeling
software.
code_samples:
type: Content
tags: []
deprecation_message: ''
security:
read: PluginSecurity
write: PluginSecurity
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
- name: MaterialVariant.RoughnessMap
summary: |
Determines the apparent roughness across the surface.
description: |
This property determines the apparent roughness across the surface. A
roughness map is a grayscale image where black pixels correspond to a
maximally smooth surface, and white pixels correspond to a maximally rough
surface.
Roughness refers to how much variation the surface has on a very small
scale. Reflections on smooth surfaces are sharp and concentrated.
Reflections on rough surfaces are more blurry and dispersed.
code_samples:
type: Content
tags: []
deprecation_message: ''
security:
read: PluginSecurity
write: PluginSecurity
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
- name: MaterialVariant.StudsPerTile
summary: |
Determines the scale of textures.
description: |
Determines the scale of textures. Larger values for this property will
lead to the textures appearing larger, and repeating less frequently.
code_samples:
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
methods: []
events: []
callbacks: []