Skip to main content

Material

All surfaces of 3D models are rendered using materials. Materials define the properties of that surface such as color, shininess, roughness, etc.

In OasisW, materials are an asset type that collects all these properties together. By default, it represents a Physical material. This exposes basic properties that can be used to create a variety of visual effects from smooth plastic to rough wood, or scratched metal.

The legacy Phong material type is also supported.

Importing Materials

Materials are automatically imported when you upload a 3D model (e.g., FBX) file to OasisW. Materials are created with the same properties that existed in the 3D modeling tool. When uploading with embedded media (FBX only), all related texture maps are automatically set up.

Creating New Materials

You can create new materials directly from the OasisW editor interface.

Create Material

This will create a new material asset and open the material inspector on the right side of the screen.

Selecting a Material

Model Inspector

To edit a material, you first need to select it. This will bring up the material inspector.

You can select materials from the Assets Panel. You can also select materials from the model inspector or model component.

Generally, clicking on a material preview icon will take you to the material inspector.

Assigning Materials

Model Component

You can modify which materials are assigned where in the model asset, or customize the materials of a specific entity that has a model component.

Model Inspector Empty Slot

Clicking Asset Materials selects the model asset. You can also select the model asset from the Assets Panel. The model inspector shows the model's meshes and the materials assigned to each. You can use the X button to remove materials and click on empty slots to assign new materials.

You can also drag and drop material assets from the Assets Panel to material slots.

Clicking Entity Materials will first ask you to select which mesh instance to customize materials for:

Select Mesh Instance

After selecting a mesh instance, a new material selector appears on the model component:

Selected Mesh Instance

You can then select different materials for this specific entity:

Different Material Selected

Editing a Material

Material Inspector

When a material is selected, you can edit its properties.

Material Maps

Material Map Slot

Most of material editing involves creating and assigning texture maps to the various slots described in detail on the pages above.

There are several options available for most texture map slots in materials.

Texture Asset

The first is a texture asset, which is created when you upload an image to OasisW. You can assign this to slots in the material.

Color or Tint Color

Some map slots can be a solid color instead of a texture map. Some slots also support tint colors when a texture is assigned. When enabled, the tint color is multiplied with the color of the texture map slot.

Channel

Some maps only need a single grayscale value like 0.0 -> 1.0. In this case, you can select which channel of the texture to use. RGB means all three channels are used. R, G or B means only the red, green or blue channel is used.

Texture Transformation

PropertyDescription
Apply to all MapsUncheck this option to apply offset and tiling values to individual maps.
OffsetThe U and V offset to apply to the first UV channel referenced by this material's maps.
TilingThe U and V scale to apply to the first UV channel referenced by this material's maps.
RotationThe U and V rotation to apply to the first UV channel referenced by this material's maps.

Ambient

The ambient properties determine how the material appears under ambient lighting.

PropertyDescription
AO TextureAn ambient occlusion map containing pre-baked ambient occlusion.
Vertex ColorUse mesh vertex colors for AO. When aoMap is set, it's multiplied with vertex colors.
ColorA tint color to multiply with the scene's global ambient color.
IntensityThe ambient occlusion intensity. Default value is 1.

Diffuse

The diffuse properties define how the material reflects diffuse lighting emitted from dynamic lighting sources in the scene.

PropertyDescription
TextureA diffuse map that specifies the diffuse material color per pixel. When no diffuse map is set, the diffuse color is used instead.
Vertex ColorMultiply diffuse with mesh vertex colors.
ColorThis is the material's diffuse color when no diffuse map is set. When a diffuse map is set and tint is enabled, this color modulates the material's diffuse map.

Specular

The specular properties define the color of specular highlights, i.e., shininess.

PropertyDescription
Use MetalnessSwitch between specular and metalness workflows.
Specular MapA specular map that specifies the specular color per pixel. When no specular map is set, the specular color is used instead.
Vertex ColorUse mesh vertex colors for specular. When specularMap or specularTint is set, it's multiplied with vertex colors.
ColorThis is the material's specular color when no specular map is set. When a specular map is set and tint is enabled, this color modulates the material's specular map.
Metalness Map[Only when using metalness] This map specifies the metalness value per pixel. A value of 1 is metal and 0 is non-metal.
Vertex ColorUse mesh vertex colors for metalness. When metalnessMap is set, it's multiplied with vertex colors.
MetalnessDefines how metallic the surface is, from 0 (dielectric) to 1 (metal).
Metalness Specular ColorWhen metalness is enabled, use the specular map to apply color tint to specular reflections at direct angles.
Gloss MapA gloss map that specifies the gloss value per pixel. The gloss map is modulated by the glossiness property.
GlossinessA value that determines the smoothness of the surface. For smaller gloss values, the surface is rougher and specular highlights are wider. For larger gloss values, the surface is smoother and shows more focused specular highlights (like a polished, shiny surface).
InvertInvert the gloss component (default is false). When this flag is enabled, the material treats the gloss member as roughness.

Emissive

The emissive properties control how the material emits light (as opposed to reflecting it).

PropertyDescription
TextureAn emissive map that specifies the emissive color per pixel. When no emissive map is set, the emissive color is used instead.
Vertex ColorUse mesh vertex colors for emissive. When emissiveMap or emissive is set, it's multiplied with vertex colors.
ColorThis is the material's emissive color when no emissive map is set. When an emissive map is set and tint is enabled, this color modulates the material's emissive map.
IntensityA multiplier of the emissive color that can achieve overbrightness effects for exceptionally bright emissive materials.

Opacity

Opacity sets the transparency level.

PropertyDescription
Blend TypeGets the blend mode of this material.
TextureAn opacity map that specifies the opacity per pixel. The opacity map is modulated by the 'Amount' property.
Vertex ColorUse mesh vertex colors for opacity. When opacityMap is set, it's multiplied with vertex colors.
Alpha To CoverageEnable or disable alpha to coverage (WebGL2 only).
Opacity DitherUsed to specify whether opacity is dithered, allowing transparency without alpha blending.
Opacity Shadow DitherUsed to specify whether shadow opacity is dithered, allowing shadow transparency without alpha blending.

Normal

Used to specify normal maps (these determine roughness - you should use normal maps, not height maps, in OasisW).

PropertyDescription
TextureA normal map that specifies the surface normal per pixel. The normal map is modulated by the 'Bumpiness' property.

Parallax

Parallax maps give the illusion of depth on surfaces, adding more realism to normal maps. Parallax options are only enabled when a normal map is set on the material.

PropertyDescription
Height MapA height map that specifies the intensity per pixel of the parallax effect. White is full height and black is zero height.

Clearcoat

Clearcoat simulates a thin transparent coating layer on top of the surface. It's used when creating realistic materials like car paint or plastic surfaces.

PropertyDescription
Clear Coat FactorDefines the intensity of the clearcoat layer from 0 to 1.

Sheen

Sheen simulates the soft reflection effect seen in fibrous materials like fabric or velvet. It represents the scattered reflections caused by the fine roughness of the surface.

PropertyDescription
Use SheenEnable the use of sheen specular effects.
InvertInvert the material sheen gloss to effectively treat it as roughness.

Refraction

Refraction simulates the phenomenon where light changes direction when passing through transparent materials. It represents the light refraction effects seen in transparent materials like glass, water, and crystals.

PropertyDescription
Dynamic RefractionsEnable the use of grab pass for refraction.
Refraction MapThe refraction map defines the amount of refraction per pixel.
Vertex ColorUse vertex colors for refraction intensity or as a multiplier with the refraction map.
RefractionThe factor that determines the portion of light that passes through the material.
Index Of RefractionDetermines the degree of distortion of light passing through the material. Expressed as 1.0 / refractive index.
DispersionThe intensity of angular separation of colors (chromatic aberration) passing through the volume. Default value is 0, meaning no dispersion.

Iridescence

Iridescence simulates the phenomenon where colors change according to angle. It represents the iridescent reflection effects seen in materials like soap bubbles, oil slicks, butterfly wings, and pearls.

PropertyDescription
Use IridescenceEnable the iridescence diffraction effect.

Environment

The environment properties determine how the material reflects the environment.

PropertyDescription
Sphere MapA sphere map texture asset that approximates environment reflection. When a sphere map is set, the cube map properties are hidden (as these properties are mutually exclusive).
Cube MapA cubemap texture asset that approximates environment reflection (higher accuracy than sphere map). When a cube map is set, the sphere map properties are hidden (as these properties are mutually exclusive).
ReflectivityThe factor that determines how much of the light is reflected by the material. This value has a default of 1 (full reflectivity).

Lightmap

Lightmaps contain pre-baked diffuse lighting. Using lightmaps is considered an optimization as it allows pre-calculating runtime dynamic lighting calculations.

PropertyDescription
TextureA lightmap texture containing pre-baked diffuse lighting. Lightmaps must be applied to materials on meshes with two UV sets. The lightmap uses the second UV set.
Vertex ColorUse baked vertex lighting. When lightMap is set, it's multiplied with vertex colors.

Other Render State

Other render state provides additional control over how meshes are rendered with the specified material.

PropertyDescription
Depth TestWhen checked, a per-pixel check is performed to see if the pixel passes the engine's depth test when a mesh with this material is rendered. By default, the test is that the pixel must have a z depth less than or equal to what's already in the depth buffer. That is, the mesh is only visible when nothing is in front of it. When unchecked, the mesh is rendered regardless of what's already in the depth buffer. Default is on.
Depth WriteWhen checked, depth information is written to the depth buffer when a mesh with this material is rendered. This allows subsequent meshes to successfully depth test against meshes rendered with this material. Default is on.
CullOptions are:
  • None: Both front and back faces are rendered.
  • Front Faces: Front faces are rendered and back faces are not.
  • Back Faces: Back faces are rendered and front faces are not. This is the default.
OasisW defines that counter-clockwise vertex winding specifies front face triangles. Back face culling is good for performance because back face pixels are often overwritten (for convex meshes), which can result in redundant pixel fills.
Use FogApply fog (as configured in scene settings).
Use LightingApply lighting.
Use SkyboxApply the scene skybox as a pre-filtered environment map.
Use TonemapApply tonemapping (as configured in Scene#rendering or CameraComponent.rendering). Default is true.