🌇Cleaning the vehicle from rust and dust
In order to clean a vehicle part we need to add its mesh file to our project, then assign this new file to the component in the APP file.
Next, identify the material being used by this component by looking into the APP file at the meshAppearance
field of the component. Then in the mesh file find the relevant chunk.
Here are the vehicle parts to clean for the Mahir Supron:
tire_01_fl_a
tire_01_fr_a
tire_01_bl_a
tire_01_br_a
wheel_01_fl_a
and*_custom
wheel_01_fr_a
and*_custom
wheel_01_bl_a
and*_custom
wheel_01_br_a
and*_custom
bumper_f_01
bumper_b_01
engine
junk_fuelcell_01
body_01
and*_custom
door_fl_a
and*_custom
door_fr_a
and*_custom
door_bl_a
and*_custom
door_br_a
and*_custom
mirror_fl_01
and*_custom
mirror_fr
and*_custom
By chance the tires mesh file already contains a clean
appearance for the Mahir Supron so simply use it in the APP components meshAppearance
field.
For the other ones we need to edit their material setup.
Fix the mlsetup
Add the mlsetup being used by the material to your project and add a suffix to it so we know what it is all about: _clean
. Using its original name and appending a suffix tells us that this file is meant to be accurate to the original except that we remove the rust and dust from it.
Assign this new mlsetup file to the material definition. Then open the mlsetup file into MLSB. Load the 3D model of the corresponding mesh and identify dirt / rust / dust layers. Turn their opacity to 0 and export the file to JSON. Then import it back into WolvenKit.
Mlsetup files are shared between multiple components so once you have edited the mlsetup you will just have to assign it to the other components that use the same mlsetup.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FmRVksTuGBSHGN3mAkGue%252Fclean_vehicle.png%3Falt%3Dmedia%26token%3D2ed62638-156c-473b-87d5-c01c68cd75c4&width=768&dpr=4&quality=100&sign=92c1a30d&sv=1)
Wait ! I can see yellow on the doors plastic parts ! Also the aluminium on wheels is messy !
Fix the mlmask
How to fix mask issues
We know that the Mahir Supron is using layer 0 as the paint layer which covers the entire vehicle. This implies that if additional layers are not precisely drew then the underlying layers will be visible. Depending on how the game developers have created layers it may be more or less accurate.
From what I have seen on multiple vehicles they seem to have used brush painting to create masks which I find it to be a messy way to create layers except for rust and dust which are messy by design.
Instead we must use Blender to select the mesh parts that shall be impacted by a layer and then export the UV layout associated with this selection.
Finally create a mlmask layer using this UV layout. The result will be perfect to the pixel. It also depends on the layer resolution because if the layer image is too small (like 256x256 on some vehicles) then it will lack precision. I prefer to use 1024x1024 layers which is the case for most vehicles anyway.
Fixing the plastic layer mask
Open one of your doors mesh file and look in the poor_06
material. Add the mlmask file to your project and add the _clean
suffix to it.
Export the mlmask, the 6 doors mesh files and the body mesh file using the Tools > Export Tool
. Plastic parts are defined in the original component for each component, so you don't need to export _custom
components files.
Import all the mesh files into Blender, hide unused chunks and select all the chunks that include plastic parts (one per component). Then go into Edit mode
using the Tab
key and select all the areas affected by plastic. You can move the different mesh objects to make things easier.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FaxLnP5DavAGcqmdNxfmD%252Fimage.png%3Falt%3Dmedia%26token%3De137a2ee-3238-47fa-b52e-f7fb55777474&width=768&dpr=4&quality=100&sign=62d7cddd&sv=1)
Then use the UV Editing
view in the menu bar to display the UV layout that corresponds to your selection. Use this menu to export the layout to a PNG image UV > Export UV Layout
.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FgZ2fHo4y4mGkIurl5TNm%252Fimage.png%3Falt%3Dmedia%26token%3D7b2d9842-1859-4bff-ad20-3db0150a9202&width=768&dpr=4&quality=100&sign=75d787a5&sv=1)
Then be sure to set a size of 1024x1024 and to set a Fill Opacity
of 1.00. Also name your PNG file layer11.png
so we know which layer is associated with this layout.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FVllbRsECSeiq4haZzxhZ%252Fimage.png%3Falt%3Dmedia%26token%3D2b09757c-36a1-4ff4-8315-9bfa2ed969bc&width=768&dpr=4&quality=100&sign=e761b55d&sv=1)
Now into a image editor like Adobe Photoshop open the mask layer 11 from your mlmask PNG files set. Then import the UV layout you have just created into that project and create a layer style on it to fill it with white.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FY79DUlHzpSjm1ltQGujH%252Fimage.png%3Falt%3Dmedia%26token%3Dd73ba539-f483-4c38-953b-2a957b585a63&width=768&dpr=4&quality=100&sign=b3cec972&sv=1)
Then merge layers and save the PNG file in-place. Import the mlmask layers set back into WolvenKit using the Tools > Import Tool
. Finally affect this new mlmask file to impacted components into their poor_06
material at localMaterialBuffer > materials > poor_06 > MultilayerMask
.
body_01
door_fl_a
door_fr_a
door_bl_a
door_br_a
Fixing the aluminium layer mask for wheels
As you can see the aluminium parts of wheels have some black artifacts. This is due to a messy layer mask. So you just need to repeat the same operation as above for the _insert
mesh file of the wheels.
You need to fix the layer 7 of the mlmask. Then assign the new mlmask to the coated
and poor_01
materials of the _inserts
mesh file.
We only need to update these 2 materials for wheels because these are the only materials that are using the original mlmask of the game.
You must update the AppearanceVisualController
list when you create a new component or if you modify its name, mesh appearance or mesh file path.
Refer to this paragraph to do so.
Now test your mod and see that all plastic parts and wheels aluminium parts are clean !
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252F6FzMokmjWmd253iqmU3P%252Fphotomode_25052024_145020%2520copie.png%3Falt%3Dmedia%26token%3D0df67bdf-60c6-4cbc-9c7e-7cca40afb478&width=768&dpr=4&quality=100&sign=69e0ea2c&sv=1)
Awesome ! Now I want to create a secondary color !
Last updated