Unlit

In some simple scenes, you might not want to calculate lighting. The engine provides UnlitMaterial, which uses the most streamlined shader code and only requires color or texture to render. Unlit material is suitable for rendering baked models. It only needs a basic texture or color to display the high-quality rendering results obtained from offline rendering. However, the downside is that it cannot display real-time light and shadow interactions because Unlit is determined by the texture and is not affected by any lighting.

Editor Usage

unlit

Parameter Introduction

ParameterApplication
baseColorBase color. Base color * Base color texture = Final color.
baseTextureBase texture. Used in conjunction with the base color, it is a multiplicative relationship.
tilingOffsetScaling and offset of texture coordinates. It is a Vector4 data that controls the scaling and offset of texture coordinates in the uv direction. Refer to example

If you need to use the material through a script, you can go to the material usage tutorial.

Export Unlit Material from Blender

As introduced in the baking tutorial, if we have already created the baked map and want a convenient material where the color is only influenced by the baked texture, without adding lights, debugging normals, or adjusting advanced properties like metallic roughness, then you can try Galacean's UnlitMaterial. glTF has a dedicated KHR_materials_unlit plugin, which Galacean will parse to generate Unlit material.

image.png

Test model: TREX.zip

Next, we will introduce how to export a glTF file with the unlit plugin using Blender software.

  1. Import the model
  1. Modify Shader

The default shader type is BSDF. We need to change the shader type in the surface material properties to Background.

  1. Add Baked Texture

Add the baked texture and connect Color and Shader together.

  1. Export glTF

If the preview is normal, export the glTF.

Drag the exported glTF file into the editor or glTF Viewer. If the material type is UnlitMaterial, it means that the KHR_materials_unlit extension has been exported, and Galacean has parsed it into an Unlit material.

Was this page helpful?