-
Notifications
You must be signed in to change notification settings - Fork 293
Material Workflows
xeokit-sdk supports several types of materials, from physically-based materials for realistic rendering of things like building interior previews, to non-realistic Phong and Lambertian materials for higher memory and rendering performance when rendering things like high-detail mechanical, engineering and plumbing models.
Click the image below for a live demo of xeokit's physically-based metallic materials.
Physically based rendering, or PBR, is a shading model in computer graphics that seeks to render graphics in a way that more accurately models the flow of light in the real world. PBR uses real world values for material attributes, to provide results that are more accurate and consistent under all lighting conditions.
For an introduction to PBR concepts, check out the Allegorithmic PBR Guide.
xeokit supports both the metallic-roughness and specular-glossiness PBR workflows, within the same scenes. Metallic-roughness is best for rendering conductors, while specular-glossiness is best for rendering dielectric materials, such as glass and plastic. In practice, however, metallic-roughness is usually expressive enough for all purposes.
At the lowest level within the SDK, xeokit's 3D engine supports these workflows with its MetallicMaterial and SpecularcMaterial components.
At a higher level, xeokit loads glTF 2.0 models containing these workflows via its GLTFLoaderPlugin.
Physically-based materials are overkill for models that focus on describing structure (eg. MEP), and are inefficient for models that contain huge numbers of unique objects.
For a lower memory footprint for models that need to show shiny smoothly-shaded surfaces or textures, xeokit supports the non-realistic Blinn/Phong rendering model.
At the lowest level within the SDK, xeokit's 3D engine supports Blinn/Phong with its PhongMaterial component, while at a higher level most of its model loading plugins support Blinn/Phong either by default, or as specified by the model data.
Click the image below for a live demo of a CAD model with Blinn/Phong materials.
Use xeokit's Lambertian materials when you require low memory footprint and high rendering efficiency for high-detail models.
While the PBR and Blin/Phong material types specify a collection of attributes for each material, a Lambertian material has only an RGBA color. These use less memory, and a very simple shader within xeogl's core 3D engine.
At the lowest level within the SDK, xeokit's 3D engine supports Lambertian materials with its LambertMaterial component, while at the higher level most of its model loading plugins are able to override the materials specified by model data with Lambert materials.
Click the image below for a live demo of a BIM model with Lambertian materials.