I know this sounds silly, but is there any way to have glow maps on the number plates? (I have started work on my next project, and wondered if this was possible) Thanks in advance!
Hey @bhorton, sorry for the late reply. Of course it is possible but it's needs some effort to achieve this effect. The problem is that it's not just a texture, it's generated in html. Lets start with the simplest thing, you need to modify the material.cs file. Path: \Steam\steamapps\common\BeamNG.drive\content\vehicles\common.zip\vehicles\common\licenseplates\default\materials.cs You need to add at least two new layers. For this endeavor you need to split the diffuseMap into background and font and add a glowMap layer. Code: singleton Material(licenseplate) { mapTo = "licenseplate"; diffuseMap[0] = "@licenseplate-default"; diffuseMap[1] = "@licenseplate-default-font"; glowMap[1] = "@licenseplate-default-glow"; normalMap[0] = "@licenseplate-default-normal"; specularMap[0] = "@licenseplate-default-specular"; }; Futhermore you have to add these new links to the main.lua. Path: \Steam\steamapps\common\BeamNG.drive\lua\ge\main.lua In line 409 and following you have to create new UITexture objects for the font and the glowmap. Last but not least you have to modify the generator which is located in the licenseplate-default.html. Path: \Steam\steamapps\common\BeamNG.drive\content\vehicles\common.zip\vehicles\common\licenseplates\default\licenseplate-default.html. In line 111&112 you'll find a function fillRect() which will fill the texture and doesn't allow transparency which you need for the glow map, so this is counterproductive. Hopefully this was a bit helpful and pointed you in the right direction. Cheers!
Hey, in the end it should almost like this: Code: veh:createUITexture("@licenseplate-default", design.data.generator, 1024, 512, UI_TEXTURE_USAGE_MANUAL, 1) veh:queueJSUITexture("@licenseplate-default", 'init("diffuse","' .. txt .. '", '.. encodeJson(design) .. ');') veh:createUITexture("@licenseplate-default-normal", design.data.generator, 1024, 512, UI_TEXTURE_USAGE_MANUAL, 1) veh:queueJSUITexture("@licenseplate-default-normal", 'init("bump","' .. txt .. '", '.. encodeJson(design) .. ');') veh:createUITexture("@licenseplate-default-specular", design.data.generator, 1024, 512, UI_TEXTURE_USAGE_MANUAL, 1) veh:queueJSUITexture("@licenseplate-default-specular", 'init("specular","' .. txt .. '", '.. encodeJson(design) .. ');') Of course adjusted to your conditions. You can find these lines in line 374f in Steam\steamapps\common\BeamNG.drive\lua\ge\main.lua