8.7 KiB
Material customization
The CARLA team prepares every asset to run under certain default settings. However, users that work in a build from source can modify these to best suit their needs.
!!! Important This tutorial only applies to users that work with a build from source, and have access to the Unreal Editor.
Car materials
In CARLA, there is a set of master materials that are used as templates for the different parts of the vehicle. An instance of these is created for each vehicle model, and then changed to the desired result. The master materials can be found in Content/Carla/Static/GenericMaterials/Vehicles
, and these are the following.
- M_CarExterior_Master — Material applied to the body of the car.
- M_CarInterior_Master — Material applied to the inside of the car.
- M_CarLightsGlass_Master — Material applied to the glass covering car lights.
- M_CarWindows_Master — Material applied to the windows.
- M_CarLicensePlate_Master — Material applied to the license plate.
- M_CarVehicleLights_Master — Material applied to the car lights as an emissive texure.
- M_CarVehicleLigthsSirens_Master — Material applied to the sirens, if applicable.
Customize car materials
Create instances of the master materials and store them in the corresponding folder for the new model. Here is an example of the instances created for the police car available in the blueprint library, vehicle.dodge_charger.police.
Generic documentation for materials and how to work with them can be found in the UE Docs. All the materials can be modified to a great extent, but only the exterior one has properties worth mentioning. Others have certain properties that can be changed, such as opacity and color in glass materials, but it is not recommended to do so, except for specific purposes.
Exterior properties
The exterior material is applied to the body of the car, and it is the one that can be customized the most.
- Base color — Base color of the bodywork.
- Tint shade — Tint color which visibility varies depending on the angle of visualization.
- Dust — A texture of dirt applied to the car. Dust is meant to pile on top of the geometry, and it is barely noticeable in the bottom parts. If the geometry is rotated, the dust will appear on the parts of the vehicle that are on top.
Amount
— Opacity of the texture.Color
— Base color of the dust texture.Tiling
— Size and repetition of the dust texture pattern.Thickness
— Density of the dust.Roughness
— Decrease of the car's metallic reflections due to dust.
- Flakes — Sparkling flakes to the metallic paint of the car.
On/Off
— Enables or disables the feature.Scale
— Size of the flakes.Brightness
— Intensity of the sparkle.Color
— Base color of the particles.
- Gain — Noise to the base paint of the car.
- On/Off — Enables or disables the feature.
- Scale — Size of the gain.
- Color — Base color of the gain.
- Mud — A texture of mud applied to the car. Mud appears from the bottom to top of the car.
Height
— Portion of the car where mud appears.Mud_Color
— Base color of the mud texture.Mud_Tiling
— Size and repetition of the mud texture pattern.Mud_Thickness
— Density of the mud.
- Noise — Noise applied to the normal of the material. Creates an orange peel effect.
On/Off
— Enables or disables the feature.Scale
— Size of the bumps created by the alteration of the normal map.
- Surface — Gloss and transparent coating applied to the vehicle's paint. This last step in automotive paint.
ClearCoat
— Opacity of the coating.ClearCoat_Brightness
— Glossiness of the resulting material.ClearCoat_Metallic
— Reflection of the resulting material.
Building materials
The materials applied to buildings are made of four basic textures that are combined to determine the basic properties of the material.
- Diffuse — Contains the basic painting of the material.
RGB
— Channels with the base colors.Alpha
— This channel defines a mask that allows to modify the color of the portions in white. This is useful to create some variations from the same material.
-
ORME — Maps different properties of the material using specific channels.
Ambient occlusion
— Contained in theR
channel.Roughness
— Contained in theG
channel.Metallic map
— Contained in theB
channel.Emissive mask
— Contained in theAlpha
channel. This mask allows to change the emissive color and intensity of the portions in white.
-
Normal — Contains the normal map of the material.
RGB
— The normal map information.
-
Emissive — If applicable, this texture is used to set the emissive base colors of the texture.
RGB
— Color information for the emissive elements in the texture.
Customize a building material
Similarly to car materials, a building material can be greatly changed if desired, but it is only recommended if the user has some expertise with Unreal Engine. However, there is some customization available for the two main shaders that buildings use.
-
Glass shader —
M_GlassMaster
.Opacity
— Enable color changes on the white area on the DiffuseAlpha
texture.Color
— Tint to be applied based on the white area on the DiffuseAlpha
texture.
-
Building shader —
M_MaterialMaster
Change Color
— Enable color changes on the white area on the DiffuseAlpha
texture.Color
— Tint to be applied based on the white area on the DiffuseAlpha
texture.Emissive Texture
— Enable the usage of an Emissive texture.EmissiveColor
— Tint to be applied based on the white area on the ORMEEmissive mask
texture.Emissive atenuance
— Factor that divides the intensity stated in BP_Lights to obtain proper emissive values.RoughnessCorrection
— Changes the intensity of the roughness map.MetallicCorrection
— Changes the intensity of the metallic map.NormalFlatness
— Changes the intensity of the normal map.
That is a wrap on the most remarkable ways users can customize the materials of vehicles and buildings.
Any doubts that may arise are more than welcomed in the forum.