Solved How can I change light flare color?

Discussion in 'Mod Support' started by _Diamond_Coal_, Feb 18, 2020.

  1. _Diamond_Coal_

    _Diamond_Coal_
    Expand Collapse

    Joined:
    Apr 5, 2019
    Messages:
    534
    I am making mod that makes rear turn signal repeaters on Bolide orange. I changed textures, but how can I change color of flare?
    BeamNGdrivex64_L6j3iUmkje.jpg BeamNGdrivex64_B6VIPN5BYf.jpg
    Also how can i separate it from official one?
     
    #1 _Diamond_Coal_, Feb 18, 2020
    Last edited: Feb 18, 2020
  2. Deleted member 160369

    Deleted member 160369
    Expand Collapse
    Guest

    Flare color is set in the "props" section of the part in object. Like, these are Miramar (amber) front blinkers:
    Code:
        "props":[
            ["func","mesh","idRef:","idX:","idY:","baseRotation","rotation","translation","min","max","offset","multiplier"],
            {
            "lightInnerAngle":0,
            "lightOuterAngle":140,
            "lightBrightness":0.1,
            "lightRange":20,
            "lightColor":{"r":255,"g":255,"b":0,"a":255},
            "lightAttenuation":{"x":0,"y":1,"z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
            "flareScale":0.1,
            },
    
    lightColor is the attribute you want to change, amber color (in RGBA) is 255,255,0,255.

    You also need to update both the ON and OFF textures constituting the glowMap for the blinker.
     
  3. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    In addition, the last value in the lightColor controls the intensity of the flare.
    ie. If you set it to zero, the flare is invisible. 127 and it's half the original opacity.

    The lightColor is mixed with the flare's texture color too (in case you are using custom flares that are not white)
     
    • Like Like x 1
  4. _Diamond_Coal_

    _Diamond_Coal_
    Expand Collapse

    Joined:
    Apr 5, 2019
    Messages:
    534
    Thank you very much! It works!:)
    BeamNGdrivex64_Kw5RRbnf6V.jpg
    And how can I make it into a mod? Maybe with different body or "Additional Modification" slot?
     
  5. Deleted member 160369

    Deleted member 160369
    Expand Collapse
    Guest

    Which part of the vehicle hosts blinkers?

    Assuming it's the body, a duplicate part might be your best bet.
     
  6. _Diamond_Coal_

    _Diamond_Coal_
    Expand Collapse

    Joined:
    Apr 5, 2019
    Messages:
    534
  7. _Diamond_Coal_

    _Diamond_Coal_
    Expand Collapse

    Joined:
    Apr 5, 2019
    Messages:
    534
    deleted
     
    #7 _Diamond_Coal_, Feb 19, 2020
    Last edited: Feb 19, 2020
  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