Difference between revisions of "Material Data"
(Add tip about a tutorial on an external site.) |
|||
(20 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Materials]] | |||
{{RightToc}} | {{RightToc}} | ||
This page describes how the various parameters and texture data used to define a material in Second Life are interpreted for rendering. It is intended to help content creators and external tool developers to better understand how to create images to achieve good visual results. | |||
There are as many as two colors and three images associated with a face. | |||
For a more detailed explanation of the fundamentals of materials, see Pedro Toledo's [http://www.manufato.com/?p=902 Brief Considerations About Materials] | |||
{{KBnote|'''Setting any of the materials properties on an object causes its Land Impact to be calculated using the current algorithm.''' | |||
The additional textures used for Normal and Specular maps add to the Download Weight of the object. | |||
If the object was previously using the legacy accounting (prim count), setting a material property on it may increase costs significantly due to other properties (such as complex shapes) that are more accurately accounted for in the current system. | |||
For details, see [http://community.secondlife.com/t5/English-Knowledge-Base/Calculating-land-impact/ta-p/974163 Calculating land impact] and [[Physics Optimization]]. | |||
}} | |||
==Colors== | ==Colors== | ||
;Color | ;Color | ||
:a solid color for the surface; | :a solid color for the surface; Tints the color of the diffuse map. | ||
;Specular Color | ;Specular Color | ||
Line 16: | Line 25: | ||
==Textures== | ==Textures== | ||
<br> | |||
{{KBtip|For Blender users, you may find the tutorial [https://aiaicapta.in/how-to-channel-pack-materials-for-secondlife/ here] useful for information on how to 'bake' material maps correctly in Second Life.}} | |||
===Texture=== | ===Texture=== | ||
Line 34: | Line 45: | ||
===Normal Map=== | ===Normal Map=== | ||
An image whose color data encodes changes to the "normal" for each pixel on the surface. The normal is the direction that the pixel "faces" for the purpose of determining how it is illuminated by and reflects light sources (imagine that each pixel is turned on tiny pivots). Keep in mind these are OpenGL style normal maps, where bright green is up and bright red is right. | An image whose color data encodes changes to the "normal" for each pixel on the surface. The normal is the direction that the pixel "faces" for the purpose of determining how it is illuminated by and reflects light sources (imagine that each pixel is turned on tiny pivots). The alpha channel of the Normal Map may contain a specular exponent value that is mutilplied by the "Glossiness" parameter. A higher alpha value will result in specular highlights that are brighter and tighter. Keep in mind these are OpenGL style normal maps, where bright green is up and bright red is right. (or to put in Industry terms, the normal maps are X+, Y+, Z+ normal maps) | ||
For details on what a normal map is and for a sample normal map see http://en.wikipedia.org/wiki/Normal_mapping. See also the [[#Texture Channel Encoding|Texture Channel Encoding]] table below. | |||
;Positioning:The Normal Map has its own set of the same [[#Positioning & Scaling Properties|Positioning & Scaling Properties]] properties as the [[#Texture|Texture]]. | ;Positioning:The Normal Map has its own set of the same [[#Positioning & Scaling Properties|Positioning & Scaling Properties]] properties as the [[#Texture|Texture]]. | ||
Line 42: | Line 55: | ||
This encodes the color of the light reflected by each pixel on the surface. See the [[#Texture Channel Encoding|Texture Channel Encoding]] table below. | This encodes the color of the light reflected by each pixel on the surface. See the [[#Texture Channel Encoding|Texture Channel Encoding]] table below. | ||
The Alpha channel value of the Specular Map encodes the | The Alpha channel value of the Specular Map encodes the environment intensity. A lower value in the alpha channel will diminish the impact of the environment map reflections on the surface of the object. | ||
;Positioning:The Specular Map has its own set of the same [[#Positioning & Scaling Properties|Positioning & Scaling Properties]] properties as the [[#Texture|Texture]]. | ;Positioning:The Specular Map has its own set of the same [[#Positioning & Scaling Properties|Positioning & Scaling Properties]] properties as the [[#Texture|Texture]]. | ||
Line 68: | Line 81: | ||
|Normal Y Axis | |Normal Y Axis | ||
|Normal Z Axis | |Normal Z Axis | ||
|Specular | |Specular exponent | ||
|+ | |+ | ||
!Specular Map | !Specular Map | ||
Line 74: | Line 87: | ||
|Green | |Green | ||
|Blue | |Blue | ||
|Environment | |Environment intensity | ||
|} | |} | ||
Line 84: | Line 97: | ||
:;Transparency (blended):The value is a degree of transparency (255 = opaque, 0 = fully transparent) | :;Transparency (blended):The value is a degree of transparency (255 = opaque, 0 = fully transparent) | ||
:;Alpha Mask (cutoff):The value (0...255) is compared to the Alpha Cutoff parameter (below); if the pixel is greater than the cutoff, it is fully opaque; if not, it is fully transparent. | :;Alpha Mask (cutoff):The value (0...255) is compared to the Alpha Cutoff parameter (below); if the pixel is greater than the cutoff, it is fully opaque; if not, it is fully transparent. | ||
:;Emissive:The value is used to encode how brightly the pixel | :;Emissive:The value is used to encode how brightly the pixel appears in the absence of light (ambiance): 0 = no additional ambiance (default); 255 = full brightness | ||
:''Note that using any alpha mode other than Transparency may cause problems when rendered with viewers that do not yet support materials because they will be rendered as blended transparency. We expect that support for materials will be adopted quickly in most viewers, so this is acceptable.'' | |||
;Alpha Cutoff | ;Alpha Cutoff | ||
:Used only when Alpha Mode is Alpha | :Used only when Alpha Mode is Alpha Mask (see description of that mode above) | ||
;Specular Light Color | ;Specular Light Color | ||
Line 93: | Line 107: | ||
;Environment Intensity | ;Environment Intensity | ||
:Modulates the intensity of the environment on the surface as a whole. | :Modulates the intensity of the environment on the surface as a whole. | ||
;Glossiness | ;Glossiness | ||
:This controls the “glossiness”, or the roughness, of the reflected light on a surface. The lower this value is, the “rougher” the light reflectance is, while the higher the value the “sharper” the light reflectance is. When the normal map’s alpha channel is present, the specular exponent map contained in it is modulated by this parameter. | :This controls the “glossiness”, or the roughness, of the reflected light on a surface. The lower this value is, the “rougher” the light reflectance is, while the higher the value the “sharper” the light reflectance is. When the normal map’s alpha channel is present, the specular exponent map contained in it is modulated by this parameter. |
Latest revision as of 10:18, 28 June 2022
This page describes how the various parameters and texture data used to define a material in Second Life are interpreted for rendering. It is intended to help content creators and external tool developers to better understand how to create images to achieve good visual results.
There are as many as two colors and three images associated with a face. For a more detailed explanation of the fundamentals of materials, see Pedro Toledo's Brief Considerations About Materials
Note: Setting any of the materials properties on an object causes its Land Impact to be calculated using the current algorithm.
The additional textures used for Normal and Specular maps add to the Download Weight of the object. If the object was previously using the legacy accounting (prim count), setting a material property on it may increase costs significantly due to other properties (such as complex shapes) that are more accurately accounted for in the current system. For details, see Calculating land impact and Physics Optimization. |
Colors
- Color
- a solid color for the surface; Tints the color of the diffuse map.
- Specular Color
- this is a color that ‘tints’ any reflections from the face; see also Specular Map
Textures
Tip: For Blender users, you may find the tutorial here useful for information on how to 'bake' material maps correctly in Second Life. |
Texture
Also called the Diffuse Map, this is an image that is displayed on the surface. The way the texture is applied to the face is controlled by
Positioning & Scaling Properties
Note that each image (diffuse/texture, normal map, specular map) has its own values for these parameters.
- Mapping
- Default or Planar
- Horizontal Repeats
- number of repeats of the image over the surface (used only in default mapping)
- Vertical Repeats
- number of repeats of the image over the surface (used only in default mapping)
- Rotation
- clockwise degrees the image is rotated
- Repeats Per Meter
- number of repeats of the image per in-world meter of the surface (used only in planar mapping)
- Horizontal Offset
- distance in meters the image is shifted right on the surface
- Vertical Offset
- distance in meters the image is shifted up on the surface
Normal Map
An image whose color data encodes changes to the "normal" for each pixel on the surface. The normal is the direction that the pixel "faces" for the purpose of determining how it is illuminated by and reflects light sources (imagine that each pixel is turned on tiny pivots). The alpha channel of the Normal Map may contain a specular exponent value that is mutilplied by the "Glossiness" parameter. A higher alpha value will result in specular highlights that are brighter and tighter. Keep in mind these are OpenGL style normal maps, where bright green is up and bright red is right. (or to put in Industry terms, the normal maps are X+, Y+, Z+ normal maps)
For details on what a normal map is and for a sample normal map see http://en.wikipedia.org/wiki/Normal_mapping. See also the Texture Channel Encoding table below.
- Positioning
- The Normal Map has its own set of the same Positioning & Scaling Properties properties as the Texture.
Specular Map
This encodes the color of the light reflected by each pixel on the surface. See the Texture Channel Encoding table below.
The Alpha channel value of the Specular Map encodes the environment intensity. A lower value in the alpha channel will diminish the impact of the environment map reflections on the surface of the object.
- Positioning
- The Specular Map has its own set of the same Positioning & Scaling Properties properties as the Texture.
Texture Channel Encoding
Parameter | Red | Green | Blue | Alpha |
---|---|---|---|---|
Diffuse Map | Red | Green | Blue | selectable
see Alpha Mode |
Normal Map | Normal X Axis | Normal Y Axis | Normal Z Axis | Specular exponent |
Specular Map | Red | Green | Blue | Environment intensity |
Additional Parameters
- Alpha Mode
- This controls the interpretation of the Alpha channel data in the Diffuse Map. It can have one of four values:
- None
- Alpha channel data is not used
- Transparency (blended)
- The value is a degree of transparency (255 = opaque, 0 = fully transparent)
- Alpha Mask (cutoff)
- The value (0...255) is compared to the Alpha Cutoff parameter (below); if the pixel is greater than the cutoff, it is fully opaque; if not, it is fully transparent.
- Emissive
- The value is used to encode how brightly the pixel appears in the absence of light (ambiance): 0 = no additional ambiance (default); 255 = full brightness
- Note that using any alpha mode other than Transparency may cause problems when rendered with viewers that do not yet support materials because they will be rendered as blended transparency. We expect that support for materials will be adopted quickly in most viewers, so this is acceptable.
- Alpha Cutoff
- Used only when Alpha Mode is Alpha Mask (see description of that mode above)
- Specular Light Color
- Tints the light reflected from the object; this value is combined with any value from the color for the pixel as specified in the Specular Map, if any.
- Environment Intensity
- Modulates the intensity of the environment on the surface as a whole.
- Glossiness
- This controls the “glossiness”, or the roughness, of the reflected light on a surface. The lower this value is, the “rougher” the light reflectance is, while the higher the value the “sharper” the light reflectance is. When the normal map’s alpha channel is present, the specular exponent map contained in it is modulated by this parameter.