Realistic car headlights beam shape

Discussion in 'Land' started by fabio, May 9, 2017.

  1. fabio

    fabio
    Expand Collapse

    Joined:
    Feb 17, 2016
    Messages:
    75
    Hello guys. I have one question. Does anybody know, which file I should update/change, to get realistic headlight beam shape? I want shape like on first picture bellow for xenon/LED headlighs, and like on second, for older cars. Is it possible?

     
    • Like Like x 3
  2. Miura

    Miura
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    311
    You can do that by using a light pattern texture in "cookieName" for the low beam spotlights.

    Here's an example texture I've used, and the result:

    LightPattern.jpg screenshot_00302.jpg
     
    • Like Like x 4
  3. fabio

    fabio
    Expand Collapse

    Joined:
    Feb 17, 2016
    Messages:
    75
    This is so awesome, thank you. I own you a beer. ;) I'll contact you if I'll have some problems. :)
     
  4. fabio

    fabio
    Expand Collapse

    Joined:
    Feb 17, 2016
    Messages:
    75
    Well, now I'm trying, and here it is first question: Do I just add photo to for example: vehicles -->etkss file? and then change the name in jbeam file? Or how is it works?

    Thanks for the answer :)
     
  5. Miura

    Miura
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    311
    It should work if you have the texture in the vehicle's folder, then change "cookieName":"vehicles/yourvehicle/texturename.jpg". You'll probably have to play with the rotation of the spotlight, since it doesn't matter with the default cookie.
     
  6. fabio

    fabio
    Expand Collapse

    Joined:
    Feb 17, 2016
    Messages:
    75
    Is it just me, or it doesn't want to work? Please send me PM with your setup, and I will try to copy it. :)
     
  7. Miura

    Miura
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    311
    Copying these settings wouldn't help much, since they depend on the car. I used the texture in tga format instead of jpg, but it shouldn't make a difference.

    Code:
       "props":   [
           ["func"        , "mesh"                , "idRef:", "idX:", "idY:", "baseRotation", "rotation", "translation", "min", "max", "offset", "multiplier"]
            {
                "lightInnerAngle":70
                "lightOuterAngle":80
                "lightRange":120
                "lightBrightness":0.7
                "lightColor":{"r":255, "g":240, "b":220, "a":255}
                "lightAttenuation":{"x":0, "y":0, "z":1}
                "lightCastShadows":true
                "flareName":"vehicleHeadLightFlare",
                "flareScale":0.1
                "cookieName":"vehicles/Auriga232/Auriga232LightPatternL2.tga"
                "texSize":512
                "shadowSoftness":0.5
            }
            ["lowhighbeam", "SPOTLIGHT", "hll2","hll4","hll1", {"x":304,"y": -3,"z":  0}, {"x":0,"y":0,"z":0}, {"x":0,"y":0,"z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.2,"y":0.3,"z":0}},],
            ["lowhighbeam", "SPOTLIGHT", "hlr2","hlr4","hlr1", {"x":304,"y": -9,"z":180}, {"x":0,"y":0,"z":0}, {"x":0,"y":0,"z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.2,"y":0.3,"z":0}},],
     
  8. fabio

    fabio
    Expand Collapse

    Joined:
    Feb 17, 2016
    Messages:
    75
    Thanx for that. Now I've done it, just can't fin out which value is for rotation. I need just this one information :) thanx
     
    #8 fabio, May 11, 2017
    Last edited: May 11, 2017
  9. Miura

    Miura
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    311
    The first x/y/z values are for rotation. How they should be set up can change between cars, so it's best to just try something and see what happens.
     
  10. CaptanW

    CaptanW
    Expand Collapse

    Joined:
    Aug 18, 2014
    Messages:
    1,095
    just download @expired 's projector lights mod.
     
  11. Ryan G

    Ryan G
    Expand Collapse

    Joined:
    Jul 4, 2017
    Messages:
    1
    where can you find the "cookieName"? i know that (art/special/BNG_light_cookie_headlight.png) that's the name, but where is the folder, and then, can i make another "cooke" and then write the directory there?

    -really really need your help, thanks XD
     
  12. fabio

    fabio
    Expand Collapse

    Joined:
    Feb 17, 2016
    Messages:
    75
    You can fin it it vehicle data, for example etk s series: open winrar - folder vehicles/etkss, then in there is notepad folder named etkss_headlights.jbeam. then just use search tool and type ''cookie'' in it and it should find. Be carefull, there is separately cookie for left and right headlight. Hope this helps :)
     
  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