You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ios/materials.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,6 +228,14 @@ The result is shown below. On the left is the normal texture as it appears when
228
228
229
229
**Note:** you can combine a normal map with an ordinary texture to control both the color and lighting of a surface.
230
230
231
+
To vary the intensity of the surface perturbation, you can apply a multiplier to the texture. The following code increases the apparent depth of the stones by 2x (you can also reduce the intensity by using a fractional value):
232
+
233
+
```swift
234
+
cube {
235
+
normals "cobblestones.png"*2
236
+
}
237
+
```
238
+
231
239
## Opacity
232
240
233
241
Opacity is a measure of how transparent an object is. You can vary the opacity for an object or group using the alpha property of the `color` (as described [above](#color)), but sometimes you may want to vary the opacity of a whole tree of differently-colored objects, and for that you can use the `opacity` command:
Using a metallicity texture allows you to create composite surfaces that are only partly metallic, or which have patches of rust, dirt or paint that reduce the shininess. Since metallicity is a scalar rather than color property, the texture should be in grayscale. If a full-color image is supplied, only the red channel will be used.
319
327
328
+
As with the [normal map](#normals) above, you can apply a multiplier to the metallicity texture to vary its overall intensity:
329
+
330
+
```swift
331
+
metallicity "weathered-metal.png"*0.5// half as metallic
332
+
```
333
+
320
334
## Roughness
321
335
322
336
The `roughness` property counteracts the shininess applied by the [metallicity](#metallicity) property by simulating surface scratches or texture. This doesn't completely negate the effect of metallicity, but it can be used to create surfaces that are recognizably both metallic and also non-smooth, like an old scratched-up piece of iron:
Copy file name to clipboardExpand all lines: docs/mac/materials.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,6 +228,14 @@ The result is shown below. On the left is the normal texture as it appears when
228
228
229
229
**Note:** you can combine a normal map with an ordinary texture to control both the color and lighting of a surface.
230
230
231
+
To vary the intensity of the surface perturbation, you can apply a multiplier to the texture. The following code increases the apparent depth of the stones by 2x (you can also reduce the intensity by using a fractional value):
232
+
233
+
```swift
234
+
cube {
235
+
normals "cobblestones.png"*2
236
+
}
237
+
```
238
+
231
239
## Opacity
232
240
233
241
Opacity is a measure of how transparent an object is. You can vary the opacity for an object or group using the alpha property of the `color` (as described [above](#color)), but sometimes you may want to vary the opacity of a whole tree of differently-colored objects, and for that you can use the `opacity` command:
Using a metallicity texture allows you to create composite surfaces that are only partly metallic, or which have patches of rust, dirt or paint that reduce the shininess. Since metallicity is a scalar rather than color property, the texture should be in grayscale. If a full-color image is supplied, only the red channel will be used.
319
327
328
+
As with the [normal map](#normals) above, you can apply a multiplier to the metallicity texture to vary its overall intensity:
329
+
330
+
```swift
331
+
metallicity "weathered-metal.png"*0.5// half as metallic
332
+
```
333
+
320
334
## Roughness
321
335
322
336
The `roughness` property counteracts the shininess applied by the [metallicity](#metallicity) property by simulating surface scratches or texture. This doesn't completely negate the effect of metallicity, but it can be used to create surfaces that are recognizably both metallic and also non-smooth, like an old scratched-up piece of iron:
Copy file name to clipboardExpand all lines: docs/src/materials.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,6 +228,14 @@ The result is shown below. On the left is the normal texture as it appears when
228
228
229
229
**Note:** you can combine a normal map with an ordinary texture to control both the color and lighting of a surface.
230
230
231
+
To vary the intensity of the surface perturbation, you can apply a multiplier to the texture. The following code increases the apparent depth of the stones by 2x (you can also reduce the intensity by using a fractional value):
232
+
233
+
```swift
234
+
cube {
235
+
normals "cobblestones.png"*2
236
+
}
237
+
```
238
+
231
239
## Opacity
232
240
233
241
Opacity is a measure of how transparent an object is. You can vary the opacity for an object or group using the alpha property of the `color` (as described [above](#color)), but sometimes you may want to vary the opacity of a whole tree of differently-colored objects, and for that you can use the `opacity` command:
Using a metallicity texture allows you to create composite surfaces that are only partly metallic, or which have patches of rust, dirt or paint that reduce the shininess. Since metallicity is a scalar rather than color property, the texture should be in grayscale. If a full-color image is supplied, only the red channel will be used.
319
327
328
+
As with the [normal map](#normals) above, you can apply a multiplier to the metallicity texture to vary its overall intensity:
329
+
330
+
```swift
331
+
metallicity "weathered-metal.png"*0.5// half as metallic
332
+
```
333
+
320
334
## Roughness
321
335
322
336
The `roughness` property counteracts the shininess applied by the [metallicity](#metallicity) property by simulating surface scratches or texture. This doesn't completely negate the effect of metallicity, but it can be used to create surfaces that are recognizably both metallic and also non-smooth, like an old scratched-up piece of iron:
0 commit comments