carla/Docs/tuto_A_material_customizati...

161 lines
8.6 KiB
Markdown
Raw Normal View History

2020-04-29 01:19:06 +08:00
# 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.
* [__Car materials__](#car-materials)
2020-05-05 03:56:09 +08:00
* [__Customize car materials__](#customize-car-materials)
2020-04-29 01:19:06 +08:00
* [Exterior properties](#exterior-properties)
Corkyw10/maps documentation (#4233) * Restructured maps docs layout and fixed affected URLs * Updated RoadRunner map generation doc. Includes link for Leaderboard license * Updated package ingestion doc so it is located in the main navigation bar. All relative links have been fixed. * Moved customization information to separate tutorial. Added next steps * Moved manual preparation of json package to separate tutorial. * Added how to add traffic light and signs documentation. Updated nav with approriate page name. Cropped photo to show an updated view of UE editor * Redraft of the weather and landscape tutorial * Updated tutorial for using the road painter. Typo fix in other tutorials for map customization * Added tutorial to add levels to maps * Added images for maps tutorials * Minor syntax changes to manual package prep * Full drafts of map documentation * Added images and corrected names for building shaders * [NO_BUILD] First draft of Large Maps docs (#4396) * Drafting large map docs * Changed name of spawn_npc script * Syntax changes * Corrected hybrid mode dormant behavior, added code for setting ego vehicle, removed expensive note about map calls * Added section for roadrunner large maps * Added images to roadrunner docs and rearranged nav bar and titles. * Added corrections to import of large maps and standard map nomenclature Co-authored-by: bernat <bernatx@gmail.com> * Made corrections to spawn points and additional fbx folder information * Fixed mentions of normal maps to standard maps Co-authored-by: bernat <bernatx@gmail.com>
2021-07-30 17:20:23 +08:00
* [__Building materials__](#building-materials)
2020-04-29 01:19:06 +08:00
* [__Customize a building material__](#customize-a-building-material)
!!! 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.
2020-05-05 19:53:22 +08:00
![materials_master](img/material_customization/Materials_Master.jpg)
2020-04-29 01:19:06 +08:00
<div style="text-align: right"><i>Master materials applied to cars.</i></div>
* __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_LicensePlate_Master__ — Material applied to the license plate.
* __M_VehicleLights_Master__ — Material applied to the car lights as an emissive texure.
* __M_VehicleLights_Sirens_Master__ — Material applied to the sirens, if applicable.
2020-04-29 01:19:06 +08:00
---
## 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*.
2020-05-05 19:53:22 +08:00
![materials_instances](img/material_customization/Materials_Instances.jpg)
2020-04-29 01:19:06 +08:00
<div style="text-align: right"><i>Instanced materials for the police car blueprint.</i></div>
Generic documentation for materials and how to work with them can be found in the [UE Docs](https://docs.unrealengine.com/en-US/Engine/Rendering/Materials/index.html). 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.
![materials_Tint](img/material_customization/Materials_Tint.jpg)
<div style="text-align: right"><i>Red car with pink tint. On the left, tint is disabled, on the right, enabled.</i></div>
2020-04-30 22:39:14 +08:00
* __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.
2020-04-29 01:19:06 +08:00
* `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.
2020-05-05 19:53:22 +08:00
![materials_Dust](img/material_customization/Materials_Dust.jpg)
2020-04-29 01:19:06 +08:00
<div style="text-align: right"><i>Dust property in a car's material.</i></div>
2020-04-30 22:39:14 +08:00
* __Flakes__ — Sparkling flakes to the metallic paint of the car.
2020-04-29 01:19:06 +08:00
* `On/Off` — Enables or disables the feature.
* `Scale` — Size of the flakes.
* `Brightness` — Intensity of the sparkle.
* `Color` — Base color of the particles.
2020-05-05 19:53:22 +08:00
![materials_Flakes](img/material_customization/Materials_Flakes.jpg)
2020-04-29 01:19:06 +08:00
<div style="text-align: right"><i>Flakes property in a car's material.</i></div>
* __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.
2020-05-05 19:53:22 +08:00
![materials_Gain](img/material_customization/Materials_Gain.jpg)
2020-04-29 01:19:06 +08:00
<div style="text-align: right"><i>Gain property in a car's material.</i></div>
* __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.
2020-05-05 19:53:22 +08:00
![materials_mude](img/material_customization/Materials_Mud.jpg)
2020-04-29 01:19:06 +08:00
<div style="text-align: right"><i>Mud property in a car's material.</i></div>
* __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.
2020-05-05 19:53:22 +08:00
![materials_noise](img/material_customization/Materials_Noise_High.jpg)
2020-04-29 01:19:06 +08:00
<div style="text-align: right"><i>Noise property in a car's material.</i></div>
* __Surface__ — Gloss and transparent coating applied to the vehicle's paint. This last step in [automotive paint](https://en.wikipedia.org/wiki/Automotive_paint).
* `ClearCoat` — Opacity of the coating.
* `ClearCoat_Brightness` — Glossiness of the resulting material.
* `ClearCoat_Metallic` — Reflection of the resulting material.
2020-05-05 19:53:22 +08:00
![materials_Surface](img/material_customization/Materials_Surface.jpg)
2020-04-29 01:19:06 +08:00
<div style="text-align: right"><i>Visualization of the Surface coating applied to a material.</i></div>
---
## 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.
Corkyw10/maps documentation (#4233) * Restructured maps docs layout and fixed affected URLs * Updated RoadRunner map generation doc. Includes link for Leaderboard license * Updated package ingestion doc so it is located in the main navigation bar. All relative links have been fixed. * Moved customization information to separate tutorial. Added next steps * Moved manual preparation of json package to separate tutorial. * Added how to add traffic light and signs documentation. Updated nav with approriate page name. Cropped photo to show an updated view of UE editor * Redraft of the weather and landscape tutorial * Updated tutorial for using the road painter. Typo fix in other tutorials for map customization * Added tutorial to add levels to maps * Added images for maps tutorials * Minor syntax changes to manual package prep * Full drafts of map documentation * Added images and corrected names for building shaders * [NO_BUILD] First draft of Large Maps docs (#4396) * Drafting large map docs * Changed name of spawn_npc script * Syntax changes * Corrected hybrid mode dormant behavior, added code for setting ego vehicle, removed expensive note about map calls * Added section for roadrunner large maps * Added images to roadrunner docs and rearranged nav bar and titles. * Added corrections to import of large maps and standard map nomenclature Co-authored-by: bernat <bernatx@gmail.com> * Made corrections to spawn points and additional fbx folder information * Fixed mentions of normal maps to standard maps Co-authored-by: bernat <bernatx@gmail.com>
2021-07-30 17:20:23 +08:00
![building_diffuse_alpha](img/building_diffuse_alpha.png)
2020-04-29 01:19:06 +08:00
* __ORME__ — Maps different properties of the material using specific channels.
* `Ambient occlusion` — Contained in the `R` channel.
* `Roughness` — Contained in the `G` channel.
* `Metallic map` — Contained in the `B` channel.
2020-04-30 22:39:14 +08:00
* `Emissive mask` — Contained in the `Alpha` channel. This mask allows to change the emissive color and intensity of the portions in white.
2020-04-29 01:19:06 +08:00
* __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.
2020-04-30 22:39:14 +08:00
* `RGB` — Color information for the emissive elements in the texture.
2020-04-29 01:19:06 +08:00
Corkyw10/maps documentation (#4233) * Restructured maps docs layout and fixed affected URLs * Updated RoadRunner map generation doc. Includes link for Leaderboard license * Updated package ingestion doc so it is located in the main navigation bar. All relative links have been fixed. * Moved customization information to separate tutorial. Added next steps * Moved manual preparation of json package to separate tutorial. * Added how to add traffic light and signs documentation. Updated nav with approriate page name. Cropped photo to show an updated view of UE editor * Redraft of the weather and landscape tutorial * Updated tutorial for using the road painter. Typo fix in other tutorials for map customization * Added tutorial to add levels to maps * Added images for maps tutorials * Minor syntax changes to manual package prep * Full drafts of map documentation * Added images and corrected names for building shaders * [NO_BUILD] First draft of Large Maps docs (#4396) * Drafting large map docs * Changed name of spawn_npc script * Syntax changes * Corrected hybrid mode dormant behavior, added code for setting ego vehicle, removed expensive note about map calls * Added section for roadrunner large maps * Added images to roadrunner docs and rearranged nav bar and titles. * Added corrections to import of large maps and standard map nomenclature Co-authored-by: bernat <bernatx@gmail.com> * Made corrections to spawn points and additional fbx folder information * Fixed mentions of normal maps to standard maps Co-authored-by: bernat <bernatx@gmail.com>
2021-07-30 17:20:23 +08:00
![emissive](img/EmissiveIntensity.gif)
2020-04-29 01:19:06 +08:00
---
## 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.
Corkyw10/maps documentation (#4233) * Restructured maps docs layout and fixed affected URLs * Updated RoadRunner map generation doc. Includes link for Leaderboard license * Updated package ingestion doc so it is located in the main navigation bar. All relative links have been fixed. * Moved customization information to separate tutorial. Added next steps * Moved manual preparation of json package to separate tutorial. * Added how to add traffic light and signs documentation. Updated nav with approriate page name. Cropped photo to show an updated view of UE editor * Redraft of the weather and landscape tutorial * Updated tutorial for using the road painter. Typo fix in other tutorials for map customization * Added tutorial to add levels to maps * Added images for maps tutorials * Minor syntax changes to manual package prep * Full drafts of map documentation * Added images and corrected names for building shaders * [NO_BUILD] First draft of Large Maps docs (#4396) * Drafting large map docs * Changed name of spawn_npc script * Syntax changes * Corrected hybrid mode dormant behavior, added code for setting ego vehicle, removed expensive note about map calls * Added section for roadrunner large maps * Added images to roadrunner docs and rearranged nav bar and titles. * Added corrections to import of large maps and standard map nomenclature Co-authored-by: bernat <bernatx@gmail.com> * Made corrections to spawn points and additional fbx folder information * Fixed mentions of normal maps to standard maps Co-authored-by: bernat <bernatx@gmail.com>
2021-07-30 17:20:23 +08:00
![building_material](img/building_material.png)
* __Glass shader__`M_GlassMaster`.
2020-04-30 22:39:14 +08:00
* `Opacity` — Enable color changes on the white area on the __Diffuse__ `Alpha` texture.
* `Color` — Tint to be applied based on the white area on the __Diffuse__ `Alpha` texture.
2020-04-29 01:19:06 +08:00
Corkyw10/maps documentation (#4233) * Restructured maps docs layout and fixed affected URLs * Updated RoadRunner map generation doc. Includes link for Leaderboard license * Updated package ingestion doc so it is located in the main navigation bar. All relative links have been fixed. * Moved customization information to separate tutorial. Added next steps * Moved manual preparation of json package to separate tutorial. * Added how to add traffic light and signs documentation. Updated nav with approriate page name. Cropped photo to show an updated view of UE editor * Redraft of the weather and landscape tutorial * Updated tutorial for using the road painter. Typo fix in other tutorials for map customization * Added tutorial to add levels to maps * Added images for maps tutorials * Minor syntax changes to manual package prep * Full drafts of map documentation * Added images and corrected names for building shaders * [NO_BUILD] First draft of Large Maps docs (#4396) * Drafting large map docs * Changed name of spawn_npc script * Syntax changes * Corrected hybrid mode dormant behavior, added code for setting ego vehicle, removed expensive note about map calls * Added section for roadrunner large maps * Added images to roadrunner docs and rearranged nav bar and titles. * Added corrections to import of large maps and standard map nomenclature Co-authored-by: bernat <bernatx@gmail.com> * Made corrections to spawn points and additional fbx folder information * Fixed mentions of normal maps to standard maps Co-authored-by: bernat <bernatx@gmail.com>
2021-07-30 17:20:23 +08:00
* __Building shader__`M_MaterialMaster`
2020-04-29 01:19:06 +08:00
* `Change Color` — Enable color changes on the white area on the __Diffuse__ `Alpha` texture.
* `Color` — Tint to be applied based on the white area on the __Diffuse__ `Alpha` texture.
* `Emissive Texture` — Enable the usage of an __Emissive__ texture.
* `EmissiveColor` — Tint to be applied based on the white area on the __ORME__ `Emissive mask` texture.
* `Emissive attenuance` — Factor that divides the intensity stated in __BP_Lights__ to obtain proper emissive values.
2020-04-29 01:19:06 +08:00
* `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.
<div class="build-buttons">
<p>
<a href="https://github.com/carla-simulator/carla/discussions/" target="_blank" class="btn btn-neutral" title="Go to the CARLA forum">
2020-04-29 01:19:06 +08:00
CARLA forum</a>
</p>
</div>