Material Asset: Difference between revisions
(Initial content) |
(Added content) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
Materials are assets that describe how a mesh should be drawn. It contains the visible characteristics of the mesh, including | Materials are assets that describe how a mesh should be drawn. It contains the visible characteristics of the mesh, including its texture, color, normal, ambient and other maps, texture tiling and offset and emission properties. | ||
Custom Material assets can be viewed in the [[Asset Browser]] in the ''Custom > Materials'' folder. | |||
== Shaders == | == Shaders == | ||
Line 19: | Line 21: | ||
===Standard Shader=== | ===Standard Shader=== | ||
The default shader | The default shader. This shader should be used for most objects in the scene. | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 25: | Line 27: | ||
|- | |- | ||
| '''Rendering Mode''' || How the object should be rendered. | | '''Rendering Mode''' || How the object should be rendered. | ||
|- | |||
| style="padding-left: 2em;" | ''Opaque'' || Used for completely solid objects with no transparency. | |||
|- | |||
| style="padding-left: 2em;" | ''Cutout'' || Used for objects with transparency that is either completely opaque or completely see-through. Doesn't support semi-transparency. | |||
|- | |||
| style="padding-left: 2em;" | ''Fade'' || Used for transparent objects that should be able to be made completely transparent. The rendering of the object isn't as realistic as the ''Transparent'' mode. | |||
|- | |||
| style="padding-left: 2em;" | ''Transparent'' || Used for transparent objects such as glass. The object cannot be completely transparent with this mode, as reflections and lighting are still visible. | |||
|- | |||
| '''Alpha Cutoff'''<br>(''Cutout'' Rendering Mode only) || The alpha required for part of a texture to be completely transparent. | |||
|- | |- | ||
| '''Albedo''' || Albedo texture. This is the primary, colored texture displayed on objects using this material. | | '''Albedo''' || Albedo texture. This is the primary, colored texture displayed on objects using this material. | ||
Line 38: | Line 50: | ||
| '''Normal Map''' || A [https://en.wikipedia.org/wiki/Normal_mapping Normal map] to create perceived elevation on the material. | | '''Normal Map''' || A [https://en.wikipedia.org/wiki/Normal_mapping Normal map] to create perceived elevation on the material. | ||
|- | |- | ||
| '''Height Map''' || A [https://docs.unity3d.com/2023.1/Documentation/Manual/StandardShaderMaterialParameterHeightMap.html | | '''Height Map''' || A [https://docs.unity3d.com/2023.1/Documentation/Manual/StandardShaderMaterialParameterHeightMap.html Height map] describing the elevation of the material. Should be a black-and-white texture, with values closer to white being higher. | ||
|- | |- | ||
| '''Occlusion''' || An [https://docs.unity3d.com/2023.1/Documentation/Manual/StandardShaderMaterialParameterOcclusionMap.html | | '''Occlusion''' || An [https://docs.unity3d.com/2023.1/Documentation/Manual/StandardShaderMaterialParameterOcclusionMap.html Occlusion map] texture to simulate ambient occlusion on the material. | ||
|- | |- | ||
| '''Emission''' (Checkbox) || Should this material glow. | | '''Emission''' (Checkbox) || Should this material glow. | ||
|- | |- | ||
| '''Emission Color''' || The color of the glow. If using an emission map, | | '''Emission Color''' || The color of the glow. If using an emission map, its colors will be tinted with this color. | ||
|- | |- | ||
| '''Emission''' (Texture2D) || [https://docs.unity3d.com/2023.1/Documentation/Manual/StandardShaderMaterialParameterEmission.html Emission map] describing the colors of the glow on this material. | | '''Emission''' (Texture2D) || [https://docs.unity3d.com/2023.1/Documentation/Manual/StandardShaderMaterialParameterEmission.html Emission map] describing the colors of the glow on this material. | ||
Line 50: | Line 62: | ||
| '''Texture Tiling''' || How many times the texture should be tiled across the material on both the X and Y axis. | | '''Texture Tiling''' || How many times the texture should be tiled across the material on both the X and Y axis. | ||
|- | |- | ||
| '''Texture Offset''' || A pair of floats from 0 to 1 describing how much the texture should be offset across the material on both X and Y axis. | | '''Texture Offset''' || A pair of floats from 0 to 1 describing how much the texture should be offset across the material on both the X and Y axis. | ||
|- | |- | ||
|} | |} | ||
Line 62: | Line 74: | ||
| '''Texture Tiling''' || How many times the ''Albedo'' texture should be tiled across the material on both the X and Y axis. | | '''Texture Tiling''' || How many times the ''Albedo'' texture should be tiled across the material on both the X and Y axis. | ||
|- | |- | ||
| '''Texture Offset''' || A pair of floats from 0 to 1 describing how much the texture should be offset across the material on both X and Y axis. | | '''Texture Offset''' || A pair of floats from 0 to 1 describing how much the texture should be offset across the material on both the X and Y axis. | ||
|- | |- | ||
| '''Albedo''' || Albedo texture. This is the primary, colored texture displayed on objects using this material. | | '''Albedo''' || Albedo texture. This is the primary, colored texture displayed on objects using this material. | ||
Line 81: | Line 93: | ||
===Particle Shader=== | ===Particle Shader=== | ||
Materials created using this shader can be used by particle systems and line renderers. Works well for glowing, semi transparent particles. | Materials created using this shader can be used by particle systems and line renderers. Works well for glowing, semi-transparent particles. | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 92: | Line 104: | ||
| '''Texture Tiling''' || How many times the texture should be tiled across the particle on both the X and Y axis. | | '''Texture Tiling''' || How many times the texture should be tiled across the particle on both the X and Y axis. | ||
|- | |- | ||
| '''Texture Offset''' || A pair of floats from 0 to 1 describing how much the texture should be offset across the particle on both X and Y axis. | | '''Texture Offset''' || A pair of floats from 0 to 1 describing how much the texture should be offset across the particle on both the X and Y axis. | ||
|- | |- | ||
| '''Soft Particles Factor''' || | | '''Soft Particles Factor''' || Fade the edge of particles that come close to other objects to avoid hard lines where the particle intersects with the object. | ||
|- | |- | ||
| '''Intensity''' || How intensely these particles glow. | | '''Intensity''' || How intensely these particles glow. | ||
Line 112: | Line 124: | ||
| '''Texture Tiling''' || How many times the texture should be tiled across the particle on both the X and Y axis. | | '''Texture Tiling''' || How many times the texture should be tiled across the particle on both the X and Y axis. | ||
|- | |- | ||
| '''Texture Offset''' || A pair of floats from 0 to 1 describing how much the texture should be offset across the particle on both X and Y axis. | | '''Texture Offset''' || A pair of floats from 0 to 1 describing how much the texture should be offset across the particle on both the X and Y axis. | ||
|- | |- | ||
| '''Soft Particles Factor''' || | | '''Soft Particles Factor''' || Fade the edge of particles that come close to other objects to avoid hard lines where the particle intersects with the object. | ||
|- | |- | ||
|} | |} | ||
[[Category:Assets]] |
Latest revision as of 02:26, 16 December 2022
Materials are assets that describe how a mesh should be drawn. It contains the visible characteristics of the mesh, including its texture, color, normal, ambient and other maps, texture tiling and offset and emission properties.
Custom Material assets can be viewed in the Asset Browser in the Custom > Materials folder.
Shaders
A shader describes what attributes a material has and how it should be rendered. There are four shaders provided with the mod editor. Each can produce a different type of material and is suitable for a different task.
Shader | Usage |
---|---|
Standard Shader | The default shader that should be used for most objects in the scene. |
Custom Board Space Shader | Used to make materials for custom board spaces. |
Particle Shader | Used to make custom particle materials for the Particle System Component. Can also be used by the Line Renderer Component. |
Particle Alpha Blend | Used to make semi-transparent particles for the Particle System Component. Can also be used by the Line Renderer Component. Uses different alpha blending that the Particle Shader |
Standard Shader
The default shader. This shader should be used for most objects in the scene.
Property | Description |
---|---|
Rendering Mode | How the object should be rendered. |
Opaque | Used for completely solid objects with no transparency. |
Cutout | Used for objects with transparency that is either completely opaque or completely see-through. Doesn't support semi-transparency. |
Fade | Used for transparent objects that should be able to be made completely transparent. The rendering of the object isn't as realistic as the Transparent mode. |
Transparent | Used for transparent objects such as glass. The object cannot be completely transparent with this mode, as reflections and lighting are still visible. |
Alpha Cutoff (Cutout Rendering Mode only) |
The alpha required for part of a texture to be completely transparent. |
Albedo | Albedo texture. This is the primary, colored texture displayed on objects using this material. |
Color | A color tint to apply to the material. |
Metallic (Texture2D) | A texture describing where the texture should be shiny, and where it should be matte. Only the red and alpha channels of this texture are used. Red is used for metallic and alpha is used for smoothness. Red pixel values of 1 are completely reflective while values of 0 are completely matte. Alpha values of 1 are smooth while 0 is rough. |
Metallic (Float Slider) | How metallic/shiny this material is when not using the Metallic texture map. Higher values make the material more reflective. |
Smoothness | How smooth (high values) or bumpy (low values) this material is when not using the Metallic texture map. Affects the way light reflects from the material. |
Normal Map | A Normal map to create perceived elevation on the material. |
Height Map | A Height map describing the elevation of the material. Should be a black-and-white texture, with values closer to white being higher. |
Occlusion | An Occlusion map texture to simulate ambient occlusion on the material. |
Emission (Checkbox) | Should this material glow. |
Emission Color | The color of the glow. If using an emission map, its colors will be tinted with this color. |
Emission (Texture2D) | Emission map describing the colors of the glow on this material. |
Texture Tiling | How many times the texture should be tiled across the material on both the X and Y axis. |
Texture Offset | A pair of floats from 0 to 1 describing how much the texture should be offset across the material on both the X and Y axis. |
Custom Board Space Shader
Materials created using this shader should only be applied to the custom board mod mesh.
Property | Description |
---|---|
Texture Tiling | How many times the Albedo texture should be tiled across the material on both the X and Y axis. |
Texture Offset | A pair of floats from 0 to 1 describing how much the texture should be offset across the material on both the X and Y axis. |
Albedo | Albedo texture. This is the primary, colored texture displayed on objects using this material. |
Edge Color | The color of the edge of the board space. |
Inside Color | The background color of the inside area of the board space. Visible behind the Albedo texture (if it has transparency). |
Icon Color | A color tint to apply to the Albedo texture. |
Metallic | How metallic/shiny this material is. Higher values make the material more reflective. |
Smoothness | How smooth (high values) or bumpy (low values) this material is. Affects the way light reflects from the material. |
Icon Scale | A multiplier to scale the icon texture. |
Particle Shader
Materials created using this shader can be used by particle systems and line renderers. Works well for glowing, semi-transparent particles.
Property | Description |
---|---|
Tint Color | A color tint to apply to the Particle Texture. |
Particle Texture | Texture used by the particle. |
Texture Tiling | How many times the texture should be tiled across the particle on both the X and Y axis. |
Texture Offset | A pair of floats from 0 to 1 describing how much the texture should be offset across the particle on both the X and Y axis. |
Soft Particles Factor | Fade the edge of particles that come close to other objects to avoid hard lines where the particle intersects with the object. |
Intensity | How intensely these particles glow. |
Particle Alpha Shader
Materials created using this shader can be used by particle systems and line renderers. This is the shader you should use if your particles do not need to glow or be transparent.
Property | Description |
---|---|
Tint Color | A color tint to apply to the Particle Texture. |
Particle Texture | Texture used by the particle. |
Texture Tiling | How many times the texture should be tiled across the particle on both the X and Y axis. |
Texture Offset | A pair of floats from 0 to 1 describing how much the texture should be offset across the particle on both the X and Y axis. |
Soft Particles Factor | Fade the edge of particles that come close to other objects to avoid hard lines where the particle intersects with the object. |