Passer au contenu principal
Version: bleeding-edge 🩸

Matériaux par défaut

Default Materials and it's Parameters.

Template Materials

nanos world provides several built-in template materials which can be easily used and customized with Base Paintable methods.

info

You can create and access your own Materials Parameters if you have a Mesh which uses a Custom Material!

tip

For more information regarding Material Types and Blend Modes, please refer to Unreal Docs.

Parameters Supported by Default Materials

TypeParamètreDefault ValueDescription
CouleurTintColor.WHITEAffects Base Color input
TextureTextureWhite TextureImage which multiplies with Tint to generate the final color
TextureNormalUP Normal Map Vector(0.5, 0.5, 1)Image which affects how Light reflects on the object
​​​Color​EmissiveColor.BLACKAffects Emissive input, high values will cause bloom effect
Scalar​Metallic0Affects Metallic input - goes from 0 to 1
ScalarSpecular0.5Affects Specular input - goes from 0 to 1
ScalarRoughness0.65Affects Roughness input - goes from 0 to 1
ScalarOpacity0Affects Opacity and Opacity Mask inputs - goes from 0 to 1
Opacity multiplies with Texture Alpha Channel to generate the final opacity
tip

For more information regarding how each Parameter affects the final visual, please take a look at Unreal Physically Based Materials and Material Inputs docs page.

M_Default_Masked_Lit

Masked and Lit Material.

M_Default_Masked_Unlit

Masked and Unlit Material.

M_Default_Translucent_Lit

Translucent and Lit Material.

M_Default_Translucent_Lit_Depth

Translucent, Lit with Disable Depth Test enabled. Is the same as Translucent but will be always visible in the screen, even behind walls or other objects.

M_Default_Translucent_Lit_Decal

Translucent, Lit with Deferred Decal Material Domain, to be used in Decals.

Special Utils Materials

M_Noise

Opaque, Lit with a Noise node to produce a noise effect. Also provides Speed (Vector) and Scale (Scalar) parameters.

M_Wireframe

Translucent, Lit with Wireframe enabled, meaning it renders objects as Wireframe.

tip

Note: All those Materials in this page are already included in the base game in the Default nanos world Asset Pack, you can reference them like that: nanos-world::M_Default_Masked_Lit.

Materials Summary

DomainBlend ModeShading Model
M_Default_Masked_LitSurfaceMaskedDefault Lit
M_Default_Masked_UnlitSurfaceMaskedUnlit
M_Default_Translucent_LitSurfaceTranslucentDefault Lit
M_Default_Translucent_Lit_DepthSurfaceTranslucentDefault Lit
M_Default_Translucent_Lit_DecalDeferred DecalTranslucentDefault Lit
M_NoiseSurfaceOpaqueDefault Lit
M_WireframeSurfaceTranslucentDefault Lit
tip

Opaque are the most efficient ones but doesn't support Opacity or Opacity Mask.

Masked are the most common ones and supports Opacity Mask only. It means the Opacity parameter accepts only 0 or 1.

Translucent are the heavier ones to render, and cause a lot of overdraw (and performance issues) if used incorrectly. It supports Opacity but does not support Normal, Metallic, Specular and Roughness inputs by default for optimization reasons.

Supported Common Parameters in each Material

TintTextureNormalEmissiveMetallicSpecularRoughnessOpacity
M_Default_Masked_Littruetruetruetruetruetruetruetrue*
M_Default_Masked_Unlitfalsetruefalsetruefalsefalsefalsetrue*
M_Default_Translucent_Littruetruefalsetruefalsefalsefalsetrue
M_Default_Translucent_Lit_Depthtruetruefalsetruefalsefalsefalsetrue
M_Default_Translucent_Lit_Decaltruetruetruetruetruetruetruetrue
M_Noisefalsefalsefalsetruetruetruetruefalse
M_Wireframetruefalsefalsetruefalsefalsefalsefalse

*Masked Material's Opacity supports only Opacity Mask: 0 or 1

Matériaux physiques

Physical Materials are materials which define Physical properties of an object. With Paintable.SetPhysicalMaterial() you can change the default physical material of an Entity.

Besides the Physical Properties of an object (friction, restitution, density, etc), Physical Materials are used in nanos world for applying special effects and sounds when events happen. For example on Footsteps Effects, Bullets Impacts or Objects Hits.

nanos world provides a list of the built-in Physical Materials which you can use to override in-game the Physical properties of an Entity.

tip

You also can create your own Physical Materials and use them in-game! Just remember to configure in them the proper SurfaceType for a better integration!

FrictionRestitutionDensitySurface Type
PM_Concrete0.90.32.0SurfaceType.Concrete
PM_Flesh0.70.31.0SurfaceType.Flesh
PM_Glass0.20.22.0SurfaceType.Glass
PM_Grass0.70.31.0SurfaceType.Grass
PM_Gravel0.70.31.0SurfaceType.Gravel
PM_Ground0.70.31.0SurfaceType.Ground
PM_Metal0.60.11.0SurfaceType.MetalHeavy
PM_MetalLight0.60.21.0SurfaceType.MetalLight
PM_Mud0.70.31.0SurfaceType.Mud
PM_Plastic0.70.71.0SurfaceType.Plastic
PM_Rock0.90.31.0SurfaceType.Rock
PM_Rubber0.71.01.0SurfaceType.Rubber
PM_RubberBouncy0.050.91.0SurfaceType.Rubber
PM_Sand0.60.31.0SurfaceType.Sand
PM_Water0.70.31.0SurfaceType.Water
PM_Wood0.70.30.5SurfaceType.WoodLight
PM_WoodHeavy0.70.30.5SurfaceType.WoodHeavy