HI. I have a model of vehicle with textures. Im importing model in game, but i have problems with texturing.. I dont understand how it works. For example, glass. What i need to write in materials.cs? Guide on wiki (http://wiki.beamng.com/Vehicle_Materials) is dark for me.. When im use color for material (rgba) its WHITE (roof of the car). But my RGBA code is yellow. Wat? Its dont work correctly.. Can you help me? Thanks!
Colours are 0 to 1. 0 = 0 127 = 0.5 255 = 1 Here's a tool I made a few days ago. It may not be perfect, but it could help: http://mumboking.byethost24.com/Stuff/BeamNG/colourConvert.html
I can tell you that for the color, T3D uses decimal for some reason. Just divide it by 255, and round it to 6 decimal places. for your yellow: Code: diffuseColor[0] = "1 0.815686 0.349020 1";
I haven't made translucent objects before, but I'd assume glass requires the material to have "translucent = 1;".
Not sure if this is perfect, (probably terrible ) but try this: Code: singleton Material(material) { mapTo = "material"; reflectivityMap[0] = "vehicles/common/null.dds"; diffuseMap[0] = "vehicles/common/null.dds"; specularMap[0] = "vehicles/common/null.dds"; diffuseMap[1] = "vehicles/common/null.dds"; specularMap[1] = "vehicles/common/null.dds"; specularPower[0] = "128"; pixelSpecular[0] = "1"; specularPower[1] = "128"; pixelSpecular[1] = "1"; diffuseColor[0] = "1 1 1 1"; diffuseColor[1] = "1 1 1 0.75"; useAnisotropic[0] = "1"; useAnisotropic[1] = "1"; castShadows = "0"; translucent = "1"; alphaTest = "1"; alphaRef = "0"; dynamicCubemap = true; //cubemap = "BNG_Sky_02_cubemap"; materialTag0 = "beamng"; materialTag1 = "vehicle"; }; How it looks in-game: