UMA Wiki

Unity Multipurpose Avatar

User Tools

Site Tools


knowledgebase:uma_material

UMA Material

The UMA Material asset is used by Slots and Overlays. This asset is a wrapper for Unity Materials so that the UMA system can properly group identical materials to be atlassed and merged. An UMA Material can be created for any type of material.

There are several prebuilt UMA Materials for most commonly used materials and shaders, located in UMA/Content/UMA_Core/HumanShared/Materials/.

For example, in the “standard” folder;

“UMA_Diffuse_Normal_Metallic” - Unity Standard Shader that accepts albedo, normal, and metallic/roughness texture.

“UMA_Diffuse_Normal_Metallic_Occlusion” - Unity Standard Shader that accepts albedo, normal, metallic/roughness/ and ambient occlusion texture.

Parameters

Material: Add in a Unity Material here. The Unity material will have the desired shader to be used set on it.

Channel Size: The number of channels(texture inputs) required by this material. Currently, overlays using this UMA Material are required to set all channels to work.

Channel Type:

Diffuse Texture: Use this for the diffuse or albedo texture.

Texture: This is for data textures e.g. metallic/roughness, specular, ambient occlusion, etc…

Normal Map: This is specifically for normal map textures.

Material color: The color is pulled from the first fragment and applied to the atlas material property.

Tinted Texture: The color is pulled from each fragment and applied to the base overlay, tinting the fragment in the atlas.

Texture Format: The RenderTexture format. See https://docs.unity3d.com/ScriptReference/RenderTextureFormat.html

Material Property Name: The name of the shader property this input corresponds to. See Shader Properties below. There is also an easy property selector button to the right of the input field.

Source Texture Name: For use with procedural textures. Currently deprecated, but will be back with Allegorithmic's plugin.

Cloth Properties: Reference to a cloth properties asset for use with the cloth component and UMA.

Require Separate Renderer: Checking this will force all the slots using this material to be generated on their own skinned mesh renderer.

Creating a new UMA Material

Creating a new UMA Material asset can be accessed by the right click menu and selecting “Create→UMA→Core→Material”.

uma_material_menu02.jpg

standard_material01.jpg

1) An UMA Material requires a Unity Material set to it's “Material” input.

2) On the Unity Material, the shader can be set like usual to determine the shader used by the UMA Material and the UMA system.

  • Each different UMA Material creates a new Unity material on the final UMA avatar, so keeping these to a minimum helps performance.
  • Changing property values on the material will affect all textures using the same material on the final UMA Avatar. For example, turning down the smoothness on the UMA_Mat_Diffuse_Normal_Metallic (Unity material) will turn down the smoothness for all textures using that same material on the final UMA Avatar and that may not be the desired result.

3) Set the channels size to the desired number of texture inputs for the material selected.

4) Fill out each channel element to specify the desired texture input. This is important when using the Standard Shader so that it selects the correct variant.

  • Refer to the above Parameters section for details on each parameter.
  • See the Shader Properties section for how to determine a shader's property names.

Shader Properties

Shader properties are the inputs to a shader. They are used on Unity Materials and UMA Materials.

To find a list of all the exact names of the properties on a shader, the shader files itself needs to be selected in the inspector.

An easy way to select the shader is to select the material that uses the shader in the inspector. Then right mouse click on the material header. A dropdown will appear with the option to “Select Shader”.

shader01.jpg

select_shader01.jpg

Mass Material Update

A quick mass update tool for updating the UMA material on overlays and slots can be found in the global library. Once the overlays or slot section is expanded, the “Utilities” tool can be found at the bottom.

globalupdate01.jpg

knowledgebase/uma_material.txt · Last modified: 2018/05/03 01:38 by kenamis