EDITING MATERIALS

Material
A Material consists of two kinds of layers:
– lighting layers,
– effects layers.

Lighting layers
Lighting layers define what a material looks like in response to light. Lighting layers are: the diffuse layer, the normal map or the bump map layer, the specular layer and the optional emission layer. Each layer has a predefined role. Material lighting is drawn first, after that effects layers are drawn.

Effects Layers
Effect layers are not affected by lights. They are drawn after lighting effects in the order of their appearance in material. They make it possible to apply different textures to an object one after another. You can use them e.g. to create glass by adding a glass texture to the glass’s background.

How to edit material
1. In
Flow Architect Studio 3D choose a material (not a texture) in the Materials panel on the right side of the program and then choose the Edit material option in the same panel.
2. Or you can click with the right mouse button on a project or a library in the panel on the left side and then choose the
Manage resources in project or Manage Resources in library options. Then select the Materials tab in the Library Explorer in the panel on the left side, right click on the material you want to edit and choose the Edit option from the context menu.
3. In order to edit the material of a model with the model’s preview in
Flow in the panel on the left side of the program, right click on a project or a library and choose the Manage resources in project or Manage Resources in library option. Then choose the Models tab in the Library Explorer in the panel on the left side, then double click a model to open it. Then choose the Materials tab in the panel on the left side of the program and then choose the model’s mesh that uses the material that you want to edit. Choose the Edit material option on the Materials tab. This option is enabled only when a model’s mesh uses a material and not the default material or a texture.

How to add a material to a project or a library
This problem is described in a special section.

How to create a layer
In order to to add lighting layers to a material, check the
Enable lighting option on the Material tab in the Material editor.
In order to add an emission lighting layer to a material, check the
Enable emission layer option in the Material editor.
In order to add an effects layer, right click on
Effect Layers in the Material editor and choose the Add layer option from the context menu.
In order to change the order of effects layers, right click on any effect layer in the
Material editor and choose the Up or Down option from the context menu .
In order to delete an effects layer, right click on the effects layer in the
Material editor and choose the Delete option.

Hot to set a layer’s texture
Double click on a layer to select it. Than double click on a texture in the
Materials tab panel on the left side of the program to choose the texture. In the case of a bump lighting layer if a texture has the _nsuffix (ec.: car_n.jpg), the texture is interpreted as a normal map, otherwise as a bump map.
If the chosen texture has the _cm1 suffix, it is interpreted as a cube map and other cube map parts are loaded with the following suffixes:
_cm2, _cm3, _cm4, _cm5and _cm6. For example, sky_cm1.jpg, sky_cm2.jpg, sky_cm3.jpg, sky_cm4.jpg, sky_cm5.jpg, sky_cm6.jpg.

Material tab options

The Enable mirror option allows you to enable a real mirror on a surface. You can set the reflection intensity within the 0 to 1 range. This option works only when a material is used on a Block type object. Mirror preview does not work in the Library Explorer or Flow. To see the effects, you need to test visualization.

The Enable fog option allows you to create volumetric fog. This option works only when a material is used on a Block type object. P-bursh defines the area of fog. The same fog material should be used on all sides of a Block. You can set fog color and the distance after which the fog becomes opaque (density).

The Enable haze option enables a halo (haze) on object edges. This option works only when a material is used on a Block type object.

The Enable collision detection option, if unchecked, will allow you to walk through objects using this material in visualization.

The Sky type material option causes objects with this material to act like the sky. This option works only when a material is used on a Block type object. Objects with this material are always drawn behind other objects (the real distance does not matter). If an ordinary texture is used on a material with this option enabled, its texture coordinates will be generated as it if it was spread on an imaginary sphere with a center always in the position of the camera. If a cube map texture is used, then its texture coordinates will be generated so that the camera is always in the center of a cube map.

The Draw both sides option enables drawing material from both sided of a surface (no back face culling).

The Stained glass effect option allows light to go trough a material and be modulated. This option works only when a material is used on a Block type object. In order for this option to work, a material must be transparent. The first effect layer is used to modulate light. This option is available only for materials without lighting layers. When using this option, disable shadow casting in the material (see the Enable shadow cast option).

The Enable shadow cast option causes objects using this material to cast shadows.

The Enable shadow receive option causes objects using this material to show shadows that are reaching it.

Selected layer tab options

The Blend option enables the color blending function. The function looks like this:
The resulting color is
Tc * F1 op Dc * F2
Where:
Tc – is the texture color
F1 – is the first function parameter
Dc – is the screen color
F2 – is the second function parameter
op – is a operation than can be addition, substratum or reverse subtraction (changes operands places)

For example, in order to add a texture color to a screen, use the following function: F1 = ONE and F2 = ONE (or use the additive button).

The Alpha func option enables the alpha function than can reject parts of a texture based on the texture alpha channel value and the alpha function that is used. You can choose the alpha function and the reference value used by the alpha function.

The Add to texture option allows you to add (or subtract if negative values are used) a color to a texture. The color values are given within the -1 to 1 range.

The Modulate texture option allows you to multiply a texture by a specified color value. This enables you to filter it w
ith a color, make it darker or brighter.

The Convert texture to gray scale option averages all three color elements per texture to create a gray scale texture. The alpha channel is unchanged. This option comes in handy when you want to use a color map such as a specular map.

The Generate environment texture coordinates option causes the dynamic texture coordinate generation for a surface base at the angle the camera is looking at the surface. This option is useful when you want to emulate environment reflections using texture maps.

The Scroll texture option allows you to specify values which will be used to modify texture coordinates in a time unit. Checking this option and specifying the values that are different than zero results in the texture moving over a surface. You can specify values separately for the x and y axes.

The Multiply texture coordinatesoptions allows you to modify texture coordinates so texture is repeated more densely or less densely on a surface.

How to create material