Platform features

● cross-platform, support Android, IOS, Linux, maxOS, Windows ● provide C++, Java, JavaScript API ● support the underlying graphics library OpenGL 4.1+, OpenGL ES 3.0+, Metal, Vulkan 1.0, WebGL 2.0

Rendering features

Clustered Forward renderer supported microfacet BRDF supported HDR/ Linear lighting supported Anisotropic materials supported metallic, roughness, AO, Normal Mapping, texture Mapping ● Support fabric rendering ● (weak) support translucent texture ● Support IBL ● Support physical camera simulation (shutter, Support shadows support global fog simulation support Color grading support FXAA, MSAA support dynamic resolution

Material system

Material model

The Filament defines the following material models: ● Lit (standard) ● Cloth ● Unlit The first and most common type of material may be called standard model/material in other renderers. Cloth Is used to simulate Cloth. Unlit is not technically a material, but a material used to display debugging information on the screen.

Lit model

The Lit Model is a Filament based on the PBR model and has the following attributes:

● baseColor, the diffuse albedo of non-metallic surfaces, or the specular color of metallic surfaces

● Metallic means the metal property of the material.0 means dielectric and 1.0 means conductor



Metallic is 0 (left) to 1 (right).

● Roughness, means the material roughness, 1.0 represents smooth, 0 represents rough



Step 6. Roughness evaluation (left) through 1 (right) of the nonmetal.



Step 6. Roughness Evaluation of the metal from 0 (left) to 1 (right).

● Reflectance: Indicates the Fresnel reflection coefficient



Reflectance ranges from 0 (left) to 1 (right).

● Normal, indicates the local normal deviation of material surface

● ambientOcclusion represents the intensity of ambient light

● Emissive, indicating the luminous degree of material surface

Anisotropy and anisotropyDirection describe the degree of anisotropy

● clearCoat, clearCoatRoughness evaluation tool and clearChatNormal. Clear coat layer parameters

● bentNormal, used to improve the effect of indirect light

● postLightingColor, used to blend with lighting calculation results to describe special lighting effects

● IOR, representing the refractive index of the object



Ior ranges from 1 (left) to 1.5 (right).

● Transmission, which represents the transparency of an object



Transmission is from 0 (left) to 1 (right).

● Absorption refers to the absorption coefficient of different transmitted light rays



Absorption from (0.0, 0.02, 0.14) (left) to (0.0, 0.36, 2.3) (right).

● microThickness and thickness, material thickness parameters

Among them, baseColor, metallic, roughness, reflectance, normal, ambientOcclusion and emissive are all commonly used parameters in PBR materials, and their usage is basically the same.

Some objects are covered with a thin layer of translucent material, similar to the film on mobile phones. The clear coat parameters (clearCoat, clearCoatRoughness, and clearChatNormal) are used to describe the surface material of this layer, which is isotropic and nonmetallic by default. Where clearCoat should be treated as a Boolean variable describing the presence or absence of this surface material.



ClearCoat ranges from 0 (left) to 1 (right).



ClearCoatRoughness Evaluation tool from 0 (left) to 1 (right).

In addition, some surfaces are anisotropic, such as metal that is sanded in a single direction. The anisotropy parameter can be used to describe this material.



Anisotropy goes from 0 (left) to 1 (right).

Subsurface model

The TODO model is not documented and I haven’t used it, so I’ll skip it here. Take a look at the code later.

Cloth model

The Cloth model is used to describe a fabric similar to a textile. One of the characteristics of this type of fabric is that its surface is made of stacked fibers, which absorb and scatter incoming light.

The Cloth Model contains various parameters from the previous Lit model, removing metallic and Reflectance and adding two additional Cloth related parameters:

● sheenColor, describes the color of the highlight reflection



Blue fibers with (right) and without (left) sheenColor

● subsurfaceColor, describing the color of the subsurface scattering



White cloth (left) and white cloth with brown scale scatting (right)

Unlit model

As mentioned earlier, the Unlit Model is not considered a material model. It is used for rendering skyboxes, or objects outside the scene, such as graphics and text in the user interface, or for debugging. As shown in the figure below. The model has only three parameters:

Low baseColor

Low emissive

Low postLightingColor

Usage is consistent with Lit model.

Lighting system

The connected lighting can be divided into either direct lighting or indirect lighting. The former includes:

Directional lights



Point light is ultra-uniform in all directions, while spot light has an orientation. The light intensity outside the orientation gradually decreases to zero:





● Photometric Lights: Use profiles to describe the intensity of light emitted by the light source in all directions. You can restore the light source in the real world. The filaments are the general lighting descriptions, but the Filament uses the filaments as a texture and then pulls them out during rendering to judge the lighting. I understand that this light source is an extension of Spot Light. The following figure shows some different light source description files.



● Area lights: Only square and round Area lights are supported.

Indirect light includes:

Low Image – -based lighting

The lighting

For direct light, Filament describes a light source using the following parameters: ● Type: defines the Type of light source, including directional, point, spot, area, Direction, or normal Direction of the light source ● Color: describes the Color of the light emitted by the light source ● Falloff radius, the maximum radius that the light source can affect ● Inner Angle and Outer Angle, describe the Angle of the Inner and Outer cone of spot light ● Length and RADIUS, ● Photometric profile, Masked profile and Photometric Multiplier, describe the properties of Puctual lights

Imaging pipeline

Imaging pipeline is used to further process the color output from the chip shader to make it more realistic. It consists of the following steps:

Low white balance

● Color classification

● Tone mapping

● OETF (OPto-Electronic Transfer Function)

The flow chart is as follows:

Physically based camera

Physics-based cameras can set relevant camera parameters to adjust the imaging effect. The camera parameters used include aperture, shutter Speed, and ISO. The Filament has shortened it to exposure value (EV) because it is too cumbersome to have three numbers.

conclusion

In general, the Filament is a renderer in development, with a PBR shader, Android support, a color afterwork, and a semi-finished lighting system. It’s good for learning material in the field of rendering.