SkyReal Documentation

  1. Accueil
  2. Docs
  3. SkyReal Documentation
  4. Advanced preparation using Unreal
  5. Edit parts
  6. Edit materials

Edit materials

SkyReal has a material system quite different from Unreal. To make it works perfectly, it’s important to understand basics.

The mask system

During SkyReal runtime, a part has a material based on :

  • Its original material coming from the CAD
  • Its higher available mask

There are three kind of mask located in the “Skr/Materials” section:

  1. The Origin mask: this mask represents the default material of the part (material loaded when command “Reset part apparence” is called)
  2. The Override network mask: this mask represents the current material of the part that every player of the simulation will see (this mask is used by highlight, set color and set transparency color)
  3. The Override local mask: this mask represent the current material of the part that only current player can see (this mask is used by certain command for part edition, navigation …)

When a mask is activated, SkyReal will automatically select the higher mask and applied it to the default materials.

Mask composition

A mask is composed of various properties:

  • Should Highlight: Define whether the material should be highlighted or not.
  • Should Override Color: Define whether to display the original material color or the override color.
  • Override Color: The override color to use (only if previous property is true)
  • Opacity Type : Define whether to display Opaque, Additive or Translucent material (warning never used Translucent unless you know how to use it)
  • Override alpha : The override alpha to use (only if previous property is not opaque)

Default materials

The default materials are designed to be the materials used by default by a Part. This field is in the detail tab in the “Skr/Materials” section.

If the array is empty, the default mesh material will be used as replacements. Else, there should be as much element in the array as there are materials in the actor (every component cumulated).

Material commands

To help you fill this array, you can use one of the commands available in the “Skr” section:

  • Set Current Material As Default: This will get the current material of the actor and automatically set it inside the default material array
  • Update Current Material From Mesh: This will set the current materials based on the default mesh materials. This command will not modify the “Default Material” array.
  • Update Current Material from Default And Mask: This will set the current materials based on the “Default Material” array and the higher mask. This operation can be used to simulate what’s will happened when SkyReal starts.

Custom material compatible with SkyReal

Some times, the default basic SkyReal material is not enough for the use inside SkyReal. To support every SkyReal features, after creating a custom material, add the MF_Skr_MaterialFilter as a mask of the material and set the InterpolationFactor as 0 to ignore the inputs, and 1 to ignore the inner operations.

Example of a custom material
Cet article vous a-t-il été utile ? Oui Non

Comment pouvons-nous aider ?