The Ultimate Guide Of How To Make A Colorable Vehicle Skin 2022 Edition

Discussion in 'Mods and Skins' started by MatteCrystal, Aug 25, 2021.

  1. MatteCrystal

    MatteCrystal
    Expand Collapse

    Joined:
    Nov 5, 2015
    Messages:
    5
    Created 8-24-2021 (close enough to 2022 and unlike to change in that timeframe)


    Step 1: Navigate to Beamng Data folder
    Open file Explorer and navigate to C:\Users\YOURUSERNAME\AppData\Local\BeamNG.drive and enter the folder named "latest" upload_2021-8-24_22-28-54.png This will bring you to the data folder for the latest version of Beamng.

    Step 2: Create Folder Structure For Custom Skin
    Enter the vehicles folder upload_2021-8-24_22-29-12.png Then enter the folder of the vehicle you wish to create a skin for.

    Note: not all folders match the cars in game name. The Bolide, for example, is referred to as super. If your unsure what folder corresponds to what car you can do a google search to find out.

    For this guide I will create a skin for the Bolide. So to start I need to enter the "super" folder. upload_2021-8-24_22-29-35.png Once inside the "super" folder you'll need to create a new folder. Give this folder the same name as what you wish your new skin to be named. I'm going to create a skin named CustomBolide so I will create a folder named "CustomBolide" upload_2021-8-24_22-30-10.png

    Note: The folder name cannot have spaces. Use underscores instead.

    Enter the folder you just created and create two new text files. CustomBolide.jbeam and materials.json

    Note: You'll need to turn on show file name extensions in windows explorer and then manually change the file extensions of your newly created files to match the files shown above.

    How to change file extension
    • In file explorer click view then check filename extensions. This will allow windows explorer to show file extensions on all files. upload_2021-8-24_22-30-34.png
    • Now you can manually enter a new extension name when renaming a file.
    Step 3: Getting Original/Reference Vehicle Files
    In a new windows explorer window navigate to you beamng install directory upload_2021-8-24_22-31-2.png upload_2021-8-24_22-31-20.png
    Once inside click content upload_2021-8-24_22-31-33.png
    Then Vehicles
    upload_2021-8-24_22-31-46.png You should see a big list zip files of the different vehicles. Find the zip file that matches the car you are editing. In our case super.zip copy this folder and paste it to desktop. Then unzip the desktop file and open it up.

    Inside the unzipped folder you should find a CARNAME_skin_UVs.png or super_skin_UVs.png in our case. copy this file and paste it to the custom skin folder we made in step 2. upload_2021-8-24_22-32-20.png

    Your custom skin folder should look like this upload_2021-8-24_22-32-49.png

    This is all we need, however, It's worth mentioning that within the unzipped folder there is another file called "skin.materials.json" This file contains all the info for different skins that are already in the base game for the selected car. In order to create our custom skin we will be making a file very similar to this. In fact If we wanted we could add the code for our skin directly into this file and it would work. However, Doing that would result in our skin being erased each update so we wont do that. But It's a good reference for the code we will create for our "materials.json" file which we'll start to create in step 5 If you have any issues creating your "materials.json" file refer to this "skin.materials.json" file to see how it's set up for vanilla skins. Due to differences in skins it's possible my template file won't work for all cars. If this happens use a skin contained in "skin.materials.json" as a guide.

    Step 4: Setup .jbeam File
    Back in your custom vehicle folder. CustomBolide in our example. select and open the "CustomBolide.jbeam" file we created in step 2 in your text editor of choice. (I highly recommend using visual studio code)

    Copy and paste the following code into the file.

    {
    "super_skin_YourCustomSkinFolderName": {
    "information":{
    "authors":"Your_Real_Name_Or_Username",
    "name":"In_Game_Skin_Name",
    "value":200,
    }
    "slotType" : "paint_design",
    "globalSkin" : "YourCustomSkinFolderName",
    },
    }

    Make the following replacements
    1. Replace everywhere in the code where it says YourCustomSkinFolderName with the name of the custom skin folder we created in step 2, CustomBolide in our case.
    2. Replace Your_Real_Name_Or_Username with your real name or username. You can use spaces.
    3. Replace In_Game_Skin_Name with what you want the skin to be named in game. This can contain spaces. So in our example it would be Custom Bolide
    Save changes and your done.

    DO NOT change anything else in this file. the names and syntax of everything else is very specific. Any further changes will cause problems.

    Step 5: Setup .json File
    Now open up the "materials.json" file in your favorite text editor and copy in the following code

    {

    "carName.skin.YourCustomSkinFolderName" : {

    "name" : "carName.skin.YourCustomSkinFolderName",

    "mapTo" : "carName.skin.YourCustomSkinFolderName",

    "class" : "Material",

    "persistentId" : "",

    "Stages": [

    {

    "ambientOcclusionMap": "/vehicles/carName/carName_main_ao.data.png",

    "baseColorMap": "/vehicles/carName/carName_main_b.color.png",

    "metallicFactor": 1,

    "metallicMap": "/vehicles/carName/carName_main_m.data.png",

    "normalMap": "/vehicles/carName/carName_main_n.normal.png",

    "roughnessMap": "/vehicles/carName/carName_main_r.data.png",

    "useAnisotropic": true

    },

    {

    "ambientOcclusionMap": "/vehicles/carName/carName_main_ao.data.png",

    "baseColorMap": "vehicles/carName/YourCustomSkinFolderName/carName_skin_YourCustomSkinFolderName.data.png",

    "clearCoatFactor": 1,

    "clearCoatMap": "/vehicles/carName/carName_main_cc.data.png",

    "clearCoatRoughnessFactor": 1,

    "colorPaletteMap": "vehicles/carName/YourCustomSkinFolderName/carName_skin_YourCustomSkinFolderName_uv1.color.png",

    "colorPaletteMapUseUV": 1,

    "instanceDiffuse": true,

    "metallicFactor": 1,

    "normalMap": "/vehicles/carName/carName_main_n.normal.png",

    "opacityMap": "/vehicles/carName/carName_main_c.data.png",

    "useAnisotropic": true

    },

    {},

    {}

    ],

    "activeLayers": 2,

    "dynamicCubemap": true,

    "materialTag0": "beamng",

    "materialTag1": "vehicle",

    "order_simset": 0,

    "version": 1.5

    }

    }
    Make the following replacements
    1. Replace everywhere in the code where it says YourCustomSkinFolderName with the name of the custom skin folder we created in step 2, CustomBolide in our case.
    2. Replace everywhere in the code where it says carName with the name of the car we are creating a skin for. super in this case
    Note 1: These changes are caps sensitive.

    Note 2: Any other changes will break the code and cause the skin to not load

    Tip: I highly recommend using search and replace to make these changes

    Step 6: Setup UV Map
    Open you're paint/photo editing program of choice. It must be able to create layers, change blend modes (EX: multiply, linear dodge, etc.) and save to .png

    I'll be using photoshop

    In your paint program open the CARNAME_skin_UVs.png or super_skin_UVs.png in our example case.

    it should look something like this upload_2021-8-24_22-33-29.png

    This is what's called a UV map. It might look scary or confusing but it not as bad as it seems. All it is is taking the 3d texture of the car and putting it on a flat 2d surface. It's similar to making an origami model out of paper, unfolding it, and laying it down flat on a table.

    This map will act as a guide for where we need to draw in order to place colors on our car. Ensure it is above all other layers in your paint program.

    Change the UV map's Blend mode to Screen. This will allow it to be seen as an overlay above the layers we'll be making next so we know where to paint.
    upload_2021-8-24_22-33-48.png

    Note: You can choose other blend modes besides screen, Choose whatever looks best to you. It may change depending on the color of the layers below.

    Step 7 Creating The Data Map
    Create a new layer under the UV map and color it 100% white. That means an RGB color of (255,255,255) or Hex color of (#FFFFFF). Name this layer Data Map.

    Now hide the uv map so that only your pure white data map layer can be seen. Now save the data map layer to a .png with the following filename. carName_skin_YourCustomSkinFolderName.data.png which would be super_skin_CustomBolide.data.png in our example.

    This image we just saved will be referred to as the Data Map from now on.

    Now unhide the uv map and hide the data map layer (we will come back to the data map later) upload_2021-8-24_22-34-12.png

    Step 8 Creating The Color Map
    Now create three more layers and name them Red, Blue, Green

    Each color Red, Blue, Green corresponds to a different customizable paint layer in the game which can be changed to any color. upload_2021-8-24_22-34-57.png

    Red = Paint 1

    Green = Paint 2

    Blue = Paint 3

    Each of these layers should only be drawn in with the purest version of their corresponding color

    Red = RGB(255,0,0) or Hex(#FF0000)

    Green = RGB(0,255,0) or Hex(#00FF00)

    Blue = RGB(0,0,255) or Hex(#0000FF)

    To start fill your red layer completely with Red. This will act as our base color. Ensure this layer is on the bottom. All other layers will be put on top of this.

    Next use the Green and Blue layers to create your design.

    Note: Remember you are simply painting in the areas cutout in the uv map If you can't see the outline of where to paint ensure the uv map is set to visible, has a blend mode of screen and is your topmost layer.

    When you are done hide the uv map so it doesn't appear on our final car and save the image to .png with the file name carName_skin_YourCustomSkinFolderName_uv1.color.png which would be super_skin_CustomBolide_uv1.color.png in our example.

    Note: You must follow this exact format when naming otherwise the game won't recognize the skin.

    I'll refer to this image as the Color Map From now on.

    A finished color map might look something like this. upload_2021-8-24_22-35-17.png

    Which in game would look like this, with each section being fully colorable. upload_2021-8-24_22-35-28.png

    Note 1: You don't have to stick to three color layers, you can have more, Just make sure you only use 100% red, green, and blue colors.

    Note 2: You can also make gradients. so If I made a simple gradient that went from 100% red to 100% green then in game it would make a gradient from 100% Paint 1 to 100% paint 2

    Note 3: Most if not all uv maps are symmetrical so if you want a symmetrical design then just paint one half and then mirror it to the other side.

    Note 4: You can open beamng, load your skin and then make changes to the color map live. Each time you save the color map and click back into Beam the new version will load.

    Note 5: Purposely saving with the uv map visible may be helpful to visualize in the game where each section of the uv map actually maps too.

    Finished
    That's it, you should be able to select your skin from the paint design drop down in game when driving the corresponding car upload_2021-8-24_22-35-41.png

    If you wish to know how to add further shading and textures read on.

    Advanced Shading And Textures
    Disclaimer: I'm pretty sure the following info is correct but I haven't actually tested it firsthand.

    Unhide the data map layer we made earlier. This layer should be positioned above all the color layers so all you should see in your paint editor is white.

    This layer determines what percentage of color will come through from the color map. Pure white means 100% of the color will come through and Pure black means 0% of the color will come through.

    So, if we change the color of this layer to be perfectly between pure white and pure black, then In the game all the colors we apply to our car would be at 50% brightness. If we made this layer black then our colors would be applied with 0% brightness AKA black.

    So if you just want a skin with three colorable areas and no shading then leave this file as pure white. But if you want to added various tones to your car then you can color in parts of this file various shades of grey. Below's an example image of what this looks like for the vanilla rally sunburst.

    upload_2021-8-24_22-35-57.png

    Below is an example of what the sunburst rally looks like in the game. I've colored it to match the red, green, blue of its color map.

    upload_2021-8-24_22-36-9.png

    If you look closely you'll notice there are more than three colors on the car. we have the basics red, green, and blue, as well as various shades of red, green, and blue accomplished via the data map. However, if you look close you'll notice there is also white on various parts of the car as well as two flags with different colors near the rear door.

    upload_2021-8-24_22-36-21.png

    This is accomplished by making a few modifications to both the data map and the color map.

    Starting with the data map. If you look closely you'll see the little colored flags are included in the data map with their full color.

    upload_2021-8-24_22-36-30.png

    So if you ever want to add an existing image to your car that is made up of various colors you'll add it here on the data map. However, in order to see images applied to the data map you need to make a change to the color map.

    upload_2021-8-24_22-36-43.png

    Above is the color map for the sunburst rally skin. If you look closely you'll notice various areas of the color map are fully transparent. Any areas in the color map that are fully transparent will display no color which allows the content in the data map to show through instead.

    Simply put, any area on the color map that is transparent will show the exact color of whatever you have in the data map in its place. This is how the little flags were able to be included as well as how the text for various parts of the car stay white. It's because those are the colors in the data map and those corresponding locations in the color map are transparent.

    Ok so now that you fully understand the data map you can create various shades and add various textures to your car.
     

    Attached Files:

    • upload_2021-8-24_22-34-26.png
    • Like Like x 6
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice