I'm creating mattress two tone paint dising. When i change the color it stays white. What am I doing wrong?
I edited a skin.materials.json and it worked: Code: { "mattress.skin.twotone" : { "name" : "mattress.skin.twotone", "class" : "Material", "persistentId" : "9dd6d571-1fb9-4d19-ba26-3b450f21e652", "Stages" : [ { "colorMap" : "vehicles/common/null.dds", "normalMap" : "vehicles/common/roofbar_loads/mattress_n.dds", "pixelSpecular" : true, "specularMap" : "vehicles/common/null.dds", "specularPower" : 128, "useAnisotropic" : true }, { "colorMap" : "vehicles/common/roofbar_loads/mattress_d.dds", "normalMap" : "vehicles/common/roofbar_loads/mattress_n.dds", "pixelSpecular" : true, "specularMap" : "vehicles/common/roofbar_loads/mattress_s.dds", "specularPower" : 32, "useAnisotropic" : true }, { "colorMap" : "mattress_cleanwhite.dds", "colorPaletteMap" : "mattress_twotone.dds", "instanceDiffuse" : true, "normalMap" : "vehicles/common/roofbar_loads/mattress_n.dds", "pixelSpecular" : true, "specularMap" : "vehicles/common/roofbar_loads/mattress_s.dds", "specularPower" : 10, "useAnisotropic" : true }, {} ], "mapTo" : "mattress.skin.twotone", "materialTag0" : "beamng", "materialTag1" : "object" } }
Two-tone skins .dds mustn't be white, I already made some two-tone skins and here's how to do it : - The colors in the .dds : Red for the first color slot, Green for the second, and blue for the third. - You must add _uv1 to your skin .dds' name. - The code : singleton Material("mattress.skin.twotone") { mapTo = "mattress.skin.twotone"; colorPaletteMap[2] = "vehicles/common/(your skin name)_uv1.dds"; diffuseMap[2] = "vehicles/common/roofbar_loads/mattress_c.dds"; specularMap[2] = "vehicles/mattress/roofbar_loads/mattress_s.dds"; normalMap[2] = "vehicles/common/roofbar_loads/mattress_n.dds"; diffuseMap[1] = "vehicles/common/roofbar_loads/mattress_d.dds"; specularMap[1] = "vehicles/common/roofbar_loads/mattress_s.dds"; normalMap[1] = "vehicles/common/roofbar_loads/mattress_n.dds"; diffuseMap[0] = "vehicles/common/null.dds"; specularMap[0] = "vehicles/common/null.dds"; normalMap[0] = "vehicles/common/roofbar_loads/mattress_n.dds"; specularPower[0] = "128"; pixelSpecular[0] = "1"; specularPower[1] = "32"; pixelSpecular[1] = "1"; specularPower[1] = "128"; pixelSpecular[1] = "1"; diffuseColor[0] = "1 1 1 1"; diffuseColor[2] = "1 1 1 1"; diffuseColor[1] = "1 1 1 1"; specular[0] = "0.2 0.2 0.2 1"; specular[1] = "0.2 0.2 0.2 1"; specular[2] = "0.2 0.2 0.2 1"; useAnisotropic[0] = "1"; useAnisotropic[1] = "1"; useAnisotropic[2] = "1"; castShadows = "1"; translucent = "1"; translucentBlendOp = "None"; alphaTest = "0"; alphaRef = "0"; dynamicCubemap = true; instanceDiffuse[2] = true; materialTag0 = "beamng"; materialTag1 = "vehicle"; }; You say it's solved but this code doesn't seem to work as two-tone for me, maybe you meant to do a 2-color skin and not a skin where you can change 2 different colors aka two-tone. To help you more, here's an example of a two-tone skin : https://www.beamng.com/resources/sunburst-blackline.14066/
UV1 isn't a required thing, it just means that the skin is on the 1st UV map rather than the 2nd which is made for skins specifically. The 1st UV is harder to work with but provides more possibilities of changing colors of things you normally can't change. It will work if you put "instanceDiffuse" as true, also color palette maps should have that on by default (at least I think so). And also don't use the cs format, it's hard to read, json is better.