UVR materials are defined using the same assets as usual in Unreal Engine : the material asset created in the Content Browser tab and assigned on the Materials component of geometries.
Predict Matter supports materials that Unreal Engine does not, such as spectral AxF materials for instance. See the Spectrums and the Polarization sections for more explanations on the spectral and polarized aspect of the light and the materials.
The Unreal Engine material edition view (when double clicking on a material) contains a UVR Material tab that can be toggled using the button in the header tab.
The representation used for a material (Fitting or AxF for instance) can be found in this tab.
Materials that were imported inside Unreal Engine from an AxF file will automatically use the AxF representation (see Measured materials section bellow). You can choose to toggle back to a Fitting representation to use the Unreal Engine material fitting (see Diffuse materials section bellow) instead.
In this tab, you can also add a new representation to a material : for instance you can add an AxF representation on a material that was created directly inside Unreal Engine. You can also remove a representation to break the link between the Unreal Engine material and the source file.
Materials in Unreal Engine are defined using blueprints. Each material blueprint is based on a Result Node that defines the Base Color, the Metallic, the Specular, the Emissive Color, the Normal, ...
Without additional settings, Unreal Engine materials will be fitted to a diffuse material in Predict Engine using this Result Node.
If the Base Color feature is textured, the texture will be used in Predict Engine as well.
The textures are not supported yet for the Emissive Color feature. They will be supported in a future plugin.
In the Alpha plugin, the only two material features that are fitted are the Base Color and the Emissive Color. Other features will soon be taken into account in future plugins.
The transparency is not taken into account in the fitting. The material will be fitted to an opaque diffuse material in Predict Engine.
Measured materials are defined by the way they reflect light depending on the direction of observation, and the direction and wavelength of the light arriving on the material. This behaviour can be characterized by a function called BRDF (Bidirectional Reflectance Distribution Function). The BRDF can be measured and it can be simulated in Predict Engine.
NB : most measured materials are opaque, they only reflect the light. Depending on their definition, measures stored in a .axf file can also transmit light and be transparent.
Examples of measured materials
Example use case of measured materials
Predict Engine can simulate materials stored in X-Rite material format AxF (Appearance eXchange Format). These materials are representations of measured complex materials such as textured surfaces or car paints for instance. They are stored in one single *.axf file.
AxF files are also partially supported by Unreal Engine. You can import them in your project by drag and droping them in the Content Browser tab. When a material has been imported inside Unreal Engine, the path of the source AxF file is still referenced on the material (see figure on the right). If the source file still exists on the machine, Predict Engine will use it as the representation for this material, reading the entire .AxF content to use the full, spectral data contained inside. See the source file management section bellow for more details.
Predict Engine currently supports the following AxF features (either in RGB or in Spectral depending on the Path Tracer type) :
SVBRDF (with simple clearcoat),
Carpaint (with simple clearcoat),
Volumetric (with simple clearcoat) but without absorption & scattering inside the volume (coming in future plugin).
Height maps are not currently supported.
The Emissive Color defined on materials using an AxF representation is ignored, the material will not be emissive in Predict Engine. The only data that will be used by Predict Engine is the one contained inside the .AxF file.
Spectral emissive materials in their current form are just an alpha feature. The definition of emissive materials will be updated and properly implemented in future plugins.
Instead of the Emissive Color defined on the Result Node of an Unreal Engine material, it is possible to use a Spectrum for the emissive part of the material in Predict Engine. To do so, you can add a new representation to the material in the UVR Material tab of the material edition window. The spectral emission representation should be defined with a .XML material containing the spectrum of the light.
A material using the XML representation will be defined as follow :
The diffuse properties of the material will be fitted from the Unreal Engine material (see the Diffuse material section above for more details),
The emissive properties of the Unreal Material will be ignored, the spectrum defined inside the XML material will be used instead. An addition setting for the Intensity is available in the UVR Material tab to adjust the light intensity. Textured spectral emissions are not supported yet.
The xml file should be formatted as follow:
<material type="Spectral">
<entry k="1.306" n="1.422" wavelength="206.64" />
<!-- ... -->
<entry k="15.5" n="1.205" wavelength="2479.7" />
</material>
Each entry contains the sampled quantities at the specified wavelength in nanometer.
The "wavelength" is a reserved and mandatory keyword. For the corresponding quantities, there exist common keywords such as "n", "k", "value", "x", "y", "z", "r", "g", "b" but custom ones are accepted too.
If there are several quantities defined in a single .xml file (k and n in the example above), only the first one will be used in Predict Engine for Unreal Engine.
Unreal Engine requires materials to be defined in their own .uasset format. In order to access the original measured data, Predict Engine needs to keep the original source file Unreal Engine used for the import of the material (or for a representation that was added afterwards).
To avoid losing source files when they are moved on the machine, deleted, or when the project is shared with someone else, we keep a copy of the material source files inside the project folder (NameOfTheProject/Saved/Materials).
The copy is made when the material is imported inside Unreal Engine, when the representation is added, or the first time it is loaded by Predict Engine if it was created before the Predict Engine plugin was installed. If the original source file is deleted or modified, the copied version will still be used in Predict Engine. You can update the copied version of a source file in the UVR Material tab (see bellow).
The UVR Material tab also contains informations on the source file used for the selected representation :
The original source file path,
The state of the file :
Up to date : the source file still exists, the source file and its local copy are up to date,
Needs Update : the source file still exists but it is different from its local copy, the local copy will be used by Predict Engine. Use the refresh button to update the local copy,
Broken link : the source file is missing, the local copy still exists and will be used by Predict Engine.
The UVR Material Manager window can be opened via the menu "UVR/Material Manager", via the Matter icon in the header toolbar, or via the UVR Material Manager button in the material edition window toolbar.
It contains an overview of all the materials in the project, with their Predict Engine representation and the state of their source file. It provides a quick access to the choice of the selected representation, options to add or remove a representation, and locate the source file on the disk. You can also apply changes in batch to a selection of materials.
If you create or delete materials in the project, the updates will not appear automatically in the material manager. You can refresh the list of visible materials with the Refresh button on top.
The header also contains comboboxes to display a selection of materials depending on their type or their state.
The Material Manager is usefull to get an overview of the project materials, but it is heavy to list all the materials in the project when there are a lot of them. In most cases, the UVR Material tab in the material edition window should be enough.