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 when you upload them to Sansar. 

To access Materials Settings while in edit mode:

  1. Click Upload. See Uploading items in Sansar.
  2. When the upload panel appears, you will need to select a .fbx file first to upload. Under Supported file types, click Browse and choose a 3D model (.fbx) from your computer.
  3. Once a .fbx file is selected, the Materials Settings button appears on the upload panel.
    Upload_a_file.png
    The upload panel once a .fbx file has been selected from your local drive. 
  4. Click the Materials Settings button to access the Materials Settings panel.
Materials_settings_with_callouts.png

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.

Use shader

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:

Examples_shaders.png
Example usage of StandardStandard+Alpha Mask, and Standard+Emissive shaders.
  • Standard- Good for most objects that don't require transparency or glowing effects; this option provides better performance than Standard + Alpha Mask or Standard + Emissive.
  • Standard + Alpha Mask - Very similar to Standard, but allows the use of a black or white alpha mask in order to provide transparency.
  • Standard + Emissive - Similar to Standard + Alpha Mask, but allows you to add an emissive map to provide a glow effect.
  • Standard + Detail - The same as Standard, but allows you to define additional, more detailed maps that gradually fades in as the camera approaches. This can be used for high-frequency surface details, such as the bumpy surface of an orange.
  • Standard Detail + Alpha Mask - As with Standard + Detail, allows you to define additional detailed maps that become visible as the camera approaches. Allows you to use a black and white alpha mask for transparency.
  • Standard + Detail + Emissive - As with Standard + Detail, allows you to define additional detailed maps that become visible as the camera approaches. Allows you to define emissive maps to provide a glow effect.
  • Four layer Non-Specular - Allows you to define up to four albedo maps and four normal maps to be blended together using a blend map. This allows you to create a layered effect useful for creating things like terrain or aging, damaged walls. The colors for the blend map are as follows:
    • Black: Layer 1
    • Red: Layer 2
    • Green: Layer 3
    • Blue: Layer 4
  • Standard Three Layer + Detail - Similar to Four layer Non-Specular, but also allows Roughness, Metalness, and detail maps, and only three of each instead of four.
  • Transmissive + Emissive - Allows you to create objects that include both alpha channel transparency and an emissive map. Objects seen through the transparent surface of this object appear tinted with the transparent surface's color, as though seen through stained glass.
  • Standard + Emissive + Stereographic - Show 3D images by using a side-by-side 3D texture. The 3D texture is only properly visible in VR mode, and the orientation of the left and right images can be adjusted using the Rotation Factor property. The Rotation Factor setting is multiplied by 90 degrees as follows:
    • - "Wall-eyed" orientation, where the left image is meant for the left eye and the right image is meant for the right eye.
    • 1 - Orientation where the top image is meant for the left eye and the right image is meant for the right eye.
    • 2 - "Cross-eyed" orientation, where the left image is meant for the left eye and the right image is meant for the left eye.
    • 3 - Orientation where the bottom image is meant for the left eye and the top image is meant for the right eye.
  • Standard + Emissive + UV Animation - Allows for one of two types of UV animation: Flipbook, which steps through a set of defined frames in a texture (such as a sprite sheet), and Scrolling, which smoothly scrolls the texture across the surface of the object. The relevant settings are as follows:
    • Flipbook - Step Rate: Defines the number of frames per second to animate. Television and movies most often animate at 24 frames per second. If you set this value to zero, the texture will not animate and will show only the first frame.
    • Flipbook - UV Frames: When equally divided into rectangular frames, define the number of frames your texture contains from left to right (X) and top to bottom (Y). For example, a 10-frame animation that has two rows of five frames would have an X value of 5.0 and a Y value of 2.0.
    • UV Scroll - Rate: For scrolling animation only; define the speed at which you would like the texture to scroll over the surface of the object in the X and Y directions.
  • Standard + Alpha Mask + UV Animation - The same as Standard + Emissive + UV Animation, but replaced the emissive map with the ability to use an alpha mask, allowing for transparent, animated images.
  • Media Surface - Allows this object to function as a media surface. You may also choose to set other maps for this shader, but be aware that they can visually interfere with media playback.
  • Media Surface + Stereographic - Create a media surface that shows 3D media by defining a media URL that shows side-by-side 3D. The 3D texture is only properly visible in VR mode, and the orientation of the left and right images can be adjusted using the Rotation Factor property. The Rotation Factor setting is multiplied by 90 degrees as follows:
    • - "Wall-eyed" orientation, where the left image is meant for the left eye and the right image is meant for the right eye.
    • 1 - Orientation where the top image is meant for the left eye and the right image is meant for the right eye.
    • 2 - "Cross-eyed" orientation, where the left image is meant for the left eye and the right image is meant for the left eye.
    • 3 - Orientation where the bottom image is meant for the left eye and the top image is meant for the right eye.

Applying maps

Applying_maps.png
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 materials and shaders:

  • 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.
  • Materials are currently defined at the time the model is uploaded. In future updates, you will be able to edit material settings after the asset has been uploaded. For now, if you want to make a change you will need to re-upload your model.
Was this article helpful?
22 out of 27 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.