Been trying to figure this out for a while but I can't seem to find what I'm missing to make them work. The material setup and mesh is exactly the same for any of the official vehicles, here I've moved the "lighted" panel a little bit forward just for show purposes: Each polygon has it's unique material assigned for each function. The code on the main jbeam is this: Code: //gauge lights "signal_L":{"simpleFunction":"signal_L", "off":"invis", "on":"lude_decals_gauges"}, "signal_R":{"simpleFunction":"signal_R", "off":"invis", "on":"lude_decals_gauges"}, "checkengine":{"simpleFunction":"checkengine", "off":"invis", "on":"lude_decals_gauges"}, "hazard":{"simpleFunction":"hazard", "off":"invis", "on":"lude_decals_gauges"}, "battery":{"simpleFunction":"battery", "off":"invis", "on":"lude_decals_gauges"}, "highbeam":{"simpleFunction":"highbeam", "off":"invis", "on":"lude_decals_gauges"}, "parkingbrake":{"simpleFunction":"parkingbrake", "off":"invis", "on":"lude_decals_gauges"}, "lowfuel":{"simpleFunction":"lowfuel", "off":"invis", "on":"lude_decals_gauges"}, "lowpressure":{"simpleFunction":"lowpressure", "off":"invis", "on":"lude_decals_gauges"}, And the material.cs file has the "lude_decals_gauges" mat defined there: Code: singleton Material(lude_decals_gauges){ mapTo = "lude_decals_gauges"; diffuseMap[1] = "vehicles/preludesn/lude_decals_gauges.dds"; diffuseMap[0] = "vehicles/preludesn/lude_decals_gauges.dds"; specularPower[0] = "16"; pixelspecular[0] = "1"; emissive[1] = "1"; glow[0] = "0"; useAnisotropic[0] = "1"; useAnisotropic[1] = "1"; materialTag0 = "beamng"; materialTag1 = "vehicle"; diffuseColor[0] = "0.75 0.75 0.75 1"; diffuseColor[1] = "1.5 1.5 1.5 0.8"; }; Is there something else I'm missing or what am I doing wrong here? Any help will be greatly appreciated
// indicates it as a comment. gauge lights is not a JBeam keyword and would cause an error. It is a comment to the JBeam author that this section of the glowmaps is for gauge lights. A comment lasts for 1 line only. Time and time again you need to be reminded. If you don't know, don't advise, more often than not your advice does the complete opposite and will only serve to further confuse.
Here it only applies to that line alone. They're used as references or comments on the jbeams so you know wich part is what.
Hmm..I can't see the mistake in the code...what happens in game? Did you paint the material right?(white alpha to the parts that should glow) Edit: Also, did you put "glowMap":{ before your code? and of course close it after?
Make sure that a material called "invis" is specified, I don't know if that is the problem, but anyway. Also, yeah, what's happening in-game? Check out the console to see if there is any special error message.
This. Please stop trying to help with jbeam related posts when you really don't know how to jbeam. I can't really jbeam, so I don't help out here, but at least I know that // indicates a comment and "gauge lights" doesn't mean anything when you're jbeaming gauge lights.
Sure, it starts with the "glowMap":{ and closes with }, no errors in the jbeam or console. Here's the .dds (diffuse and alpha) Nothing shows up in game No errors in the console either. It's like it's invisible all the time but doesn't "triggers" when using any of the functions.
try commenting out non existing sources (lowpresure, etc), until you have parkingbrake, lowbeam, etc.
Tried that, but after checking that everything was OK for the hundredth time or so, turns out I'm just an idiot, that's all Forgot to attach that bit of geometry to the rest of the dash so the lights were actually working, but didn't show up... Anyway, thanks for the help! Now that I got that working there's another issue I'm dealing with, but this time the geometry and function is fine, and it's the instrument cluster light: This is the code for the material: Code: singleton Material(lude_gauges_on) { mapTo = "lude_gauges"; diffuseMap[1] = "vehicles/preludesn/gauges_g.dds"; diffuseMap[0] = "vehicles/preludesn/gauges_d.dds"; specularPower[0] = "128"; pixelspecular[0] = "1"; specularPower[1] = "128"; pixelspecular[1] = "1"; useAnisotropic[0] = "1"; useAnisotropic[1] = "1"; castshadows = "0"; translucent = "1"; alphaTest = "1"; alphaRef = "0"; materialTag0 = "beamng"; materialTag1 = "vehicle"; materialTag2 = "decal"; }; So what's the key to actually make the material use the opacity from the alpha channel? in this case is just a simple gradient from black to white on the gauges_d.dds The gauges_g.dds alpha channel seems to control the amount of glow, not the transparency. I've tried using the same settings from the windows material but no luck.
That worked. Still not quite what I've expected but it's getting there. DDS compression is killing the gradient I believe: This is the code: Code: singleton Material(lude_gauges_glass){ mapTo = "gauges_glass"; diffuseMap[0] = "vehicles/preludesn/gauges_g.dds"; diffuseMap[1] = "vehicles/preludesn/gauges_ga.dds"; translucent = "1"; translucentBlendOp = "Sub"; specularPower[0] = "16"; pixelSpecular[0] = "1"; glow[1] = "1"; emissive[1] = "1"; materialTag0 = "beamng"; materialTag1 = "vehicle"; };
Having another problem. Can't make the console lights (and buttons) turn on with the headlights. For some reason it just won't work and I've tried and checked everything I could. This is the jbeam line that refers to them: Code: "instruments_d":{"simpleFunction":{"lowhighbeam":0.2}, "off":"instruments_d", "on":"instruments_on"}, That means that the "instruments_d" material should change to "instruments_on" when the headlights are ON. The code is basically a copy paste from the hatch jbeam, only changed texture names: Code: singleton Material(instruments_d) { mapTo = "instruments_d"; diffuseMap[1] = "vehicles/preludesn/instrument_g.dds"; specularMap[1] = "vehicles/preludesn/instrument_s.dds"; normalMap[1] = "vehicles/preludesn/instrument_n.dds"; diffuseMap[0] = "vehicles/preludesn/instrument_d.dds"; specularMap[0] = "vehicles/preludesn/instrument_s.dds"; normalMap[0] = "vehicles/preludesn/instrument_n.dds"; specularPower[0] = "16"; pixelSpecular[0] = "1"; glow[1] = "0"; emissive[1] = "1"; useAnisotropic[0] = "1"; useAnisotropic[1] = "1"; materialTag0 = "beamng"; materialTag1 = "vehicle"; diffuseColor[0] = "0.75 0.75 0.75 1"; diffuseColor[1] = "1.5 1.5 1.5 0.2"; }; singleton Material(instruments_on) { mapTo = "instruments_on"; diffuseMap[1] = "vehicles/preludesn/instrument_g.dds"; specularMap[1] = "vehicles/preludesn/instrument_s.dds"; normalMap[1] = "vehicles/preludesn/instrument_n.dds"; diffuseMap[0] = "vehicles/preludesn/instrument_d.dds"; specularMap[0] = "vehicles/preludesn/instrument_s.dds"; normalMap[0] = "vehicles/preludesn/instrument_n.dds"; specularPower[0] = "16"; pixelSpecular[0] = "1"; glow[1] = "1"; emissive[1] = "1"; useAnisotropic[0] = "1"; useAnisotropic[1] = "1"; materialTag0 = "beamng"; materialTag1 = "vehicle"; diffuseColor[0] = "0.75 0.75 0.75 1"; diffuseColor[1] = "0.5 1.7 1.3 0.2"; }; The assigned material to the 3D mesh is called "instruments_d", thing is, it just won't turn on when I press the N key. Got the same line for the "gauges glass" and that works perfect: Code: "gauges_glass":{"simpleFunction":{"lowhighbeam":0.2}, "off":"invis", "on":"gauges_glass"}, I fail to see where the problem is?
Yes, always keep an eye there (I guess that's a bug?) so right now there aren't any files. Happened more than once before. Btw, the glow material works fine, this is what happens when I change the "mapto" so it's on all the time: