# Materials editing and shaders

## Materials editing and shaders

### Materials editing and shaders



Instead of using the Phong shader in your 3D modeling tool, you can use the Materials Settings panel to apply shaders and texture maps to objects.

## Accessing Materials Settings

### Access Materials Settings when uploading an object in edit mode

1. Click **Import > 3D Model** in the top toolbar. See [Uploading items in Sansar](/create/import/importing-items.md).
2. When the Import 3D Model panel appears, you will need to select a .fbx file first to upload. Under 3D model file, click **Browse** and choose a 3D model (.fbx or .obj) from your computer.
3.  Once a file is selected, click the **Materials Settings** button to access the **Materials Settings** panel.\


    | [Image: Import 3D model panel with fields for the model file, an optional collision mesh, and the item name] |
    | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | The upload panel once a .fbx file has been selected from your local drive.                                                                                                |

### Access Materials Settings for an object that is already in a scene

You can access Materials Settings on objects that have been placed in a scene. Note that you cannot currently take objects from a scene back into your inventory, so there is no way to save and reuse changes you make to an object in this way:

1. Find the object in the Scene Objects panel.
2. Right-click the object's name and choose **Materials...**

| **Note:** When changing materials settings for an object that is already in a scene, those changes are previewed on the object. The changes are reverted if you close the Materials Settings panel by clicking **Cancel.** |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

 

| [Image: Scene Objects panel with an object menu open and an arrow pointing to Materials] |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Accessing the Materials Settings panel for an object that is already in the scene.                                                                                                                                          |

#### Materials Settings panel overview

| [Image: Materials Settings panel with callouts for the list of materials, the shader selector, and the Browse buttons for texture maps] |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The Materials Settings panel.                                                                                                                                                                                                                                                                                                                      |

### Loaded materials

The **Loaded materials** list shows the materials applied to the model at the time of upload. If no materials are assigned, a single default material is applied to all parts of the model. Select each material to assign a shader and texture maps to each.

### Shader Setting

The **Use shader** dropdown lists all shaders that can be applied to the currently selected object part. Each shader is ideal for a different application, and comes with its own subset of possible texture maps.

For a full list of available shaders and some suggested uses, see [Shaders](/create/materials/shaders-information.md).

| [Image: Three example crates rendered with different shaders: standard, transparent, and emissive] |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Example usage of **Standard**, **Standard+Alpha Mask**, and **Standard+Emissive** shaders.                                                                  |

### Applying maps

| [Image: Materials Settings panel with a callout explaining that texture maps can be imported with the model or chosen with the Browse button] |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Choose one of the object's existing texture maps or click the **Browse** button to choose one from your computer.                                     |

For each kind of map supported by a shader, you may choose any of the object's existing textures from the dropdown, or choose **Custom Texture File**. If you choose a custom texture, click **Browse** to choose a suitable texture from your computer to use as the map.

### Tips

Here are a few tips to help you get the most out of Shaders and Materials

* The maximum texture resolution is 4096 x 4096 pixels. 
* When in doubt, use the simplest shader you can. If you don't need an alpha mask, don't use a shader with that feature. The **Standard** shader is the fastest, most efficient shader available.
* Sansar uses a custom physically based renderer (PBR) and doesn't use specular maps. However, Sansar does use roughness and metalness maps to define the specular highlights of an object.
* When applying maps on an object that is already in the scene, a preview of the result is shown on the object in the scene. If you choose to cancel your changes, the object reverts back to its previous maps.

Known changes

* As of July 18th, 2018, the Tint attribute, which affects the color of a surface, now affects emissive surfaces. Previously, Tint attribute only affected non-emissive surfaces. This means that emissive textures (e.g. a light bulb) can now be colored via “Tint”. However, these changes may affect existing content where the Tint value had been changed from the default value.