Material Asset

From Pummel Party Mod Documentation
Revision as of 00:40, 31 October 2022 by RBDev (talk | contribs) (Initial content)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Materials are assets that describe how a mesh should be drawn. It contains the visible characteristics of the mesh, including it's texture, color, normal, ambient and other maps, texture tiling and offset and emission properties.

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 that should be used for most objects in the scene.

Property Description
Rendering Mode How the object should be rendered.
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, it's 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 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 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 X and Y axis.
Soft Particles Factor
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 X and Y axis.
Soft Particles Factor