How to model track lights for Custom Shaders Patch?

Discussion in 'Tracks' started by Gunnar333, Mar 14, 2019 at 6:51 PM.

  1. Gunnar333

    Gunnar333 Active Member

    Joined:
    Aug 5, 2017
    Messages:
    57
    Likes Received:
    113
    Location:
    Germany
    Hi there, long time no see.
    I'm back to track modelling for AC and can't figure out how to add a working track light to my track.
    What I did:
    adding goodwood_hillclimb.iniand goodwood_hillclimb__lights.kn5 (with a single textured cube mesh) to extension\config\tracks

    in goodwood_hillclimb.ini I have:
    Code:
    [LIGHT_0]
    ACTIVE = 1
    COLOR = 10,8,6,2
    POSITION = 0,0,-1
    DIRECTION = 0,0,0
    CONDITION = HAZARDS
    DESCRIPTION = first test light
    FADE_AT = 500
    FADE_SMOOTH = 50
    RANGE = 25
    SPECULAR_MULT = 1
    SPOT_SHARPNESS = 0.1
    VISIBILITY_LEVEL = 1
    so only one light source just for testing

    I also installed the BLM Lights APP, which says Total Lights: 1, Visible: 0
    also installed it in developer mode and fiddle around a bit, but no success
    I can't manage to see this light.

    I also found and read these resources:

    https://discordapp.com/channels/453595061788344330/537345783473766411/546448205710098459

    https://github.com/ac-custom-shaders-patch/acc-extension-config/blob/master/_doc_config_tracks.ini

    Do anyone know a little how to add track lights for dummies?
     
    Pixelchaser likes this.
  2. luchian

    luchian Administrator Staff Member

    Joined:
    Jun 3, 2014
    Messages:
    2,207
    Likes Received:
    870
    Hmm, you shouldn't need to copy the kn5 in there.
    You only need the ini(s). Maybe try to copy one of the working inis from another track and adapt it to your track ? e.g. if you wish lights in specific locations, they'd need to be associated to the "light" mesh. And that you can do in the ini.

    Sorry I can't be more help, it's not very clear in my head either..
     
  3. Gunnar333

    Gunnar333 Active Member

    Joined:
    Aug 5, 2017
    Messages:
    57
    Likes Received:
    113
    Location:
    Germany
    Thanks.
    Will try this tomorrow. Adopting from another track seems the right way.
     
    Pixelchaser and Prototype like this.
  4. Prototype

    Prototype Active Member

    Joined:
    Dec 24, 2018
    Messages:
    112
    Likes Received:
    142
    Please share your findings, very interested in how to do this!
     
  5. Gunnar333

    Gunnar333 Active Member

    Joined:
    Aug 5, 2017
    Messages:
    57
    Likes Received:
    113
    Location:
    Germany
    First success. :D:D:D
    Screenshot_ks_lamborghini_huracan_performante_goodwood_hillclimb_14-3-119-23-40-34.jpg
     
    Prototype, Pixelchaser and luchian like this.
  6. Pixelchaser

    Pixelchaser Well-Known Member

    Joined:
    Jan 4, 2015
    Messages:
    1,485
    Likes Received:
    1,012
    excellent! its disco time :lol: ...so what is your step to success ?
     
  7. Gunnar333

    Gunnar333 Active Member

    Joined:
    Aug 5, 2017
    Messages:
    57
    Likes Received:
    113
    Location:
    Germany
    I really don't know why it didn't work before.

    Now I took monza.ini extension\config\tracks and copied the some content from it to my goodwood_hillclimb.ini
    changed MESHES to one of my mesh objects. and it worked.

    Here is a simple code for start:

    Code:
    [LIGHTING]
    LIT_MULT = 1
    CAR_LIGHTS_LIT_MULT = 1
    
    [ABOUT]
    AUTHOR = your name here
    VERSION = 0.1
    DATE_RELEASE = 15/03/2019
    LIGHTS_COUNT = 113/116/130
    
    [LIGHT_SERIES_0]
    CLUSTER_THRESHOLD = 0.2
    DESCRIPTION = Starthouse Lights
    ACTIVE = 1
    MESHES = StarthousLight01
    OFFSET = NORMAL
    COLOR = 255, 244, 229, 0.05
    SPOT = 100
    SPOT_SHARPNESS = 0.1
    RANGE = 3
    still don't know how important "LIGHTS_COUNT = 113/116/130" is.... well and many other things I have to learn about track lights.
     
    Prototype likes this.
  8. Prototype

    Prototype Active Member

    Joined:
    Dec 24, 2018
    Messages:
    112
    Likes Received:
    142
  9. Gunnar333

    Gunnar333 Active Member

    Joined:
    Aug 5, 2017
    Messages:
    57
    Likes Received:
    113
    Location:
    Germany
    Just a simple plane facing down with some default texture and set to renderable=0
     
    Prototype likes this.
  10. Prototype

    Prototype Active Member

    Joined:
    Dec 24, 2018
    Messages:
    112
    Likes Received:
    142
    ok gotcha! Thanks!
     
  11. luchian

    luchian Administrator Staff Member

    Joined:
    Jun 3, 2014
    Messages:
    2,207
    Likes Received:
    870
    That's not important, because the mesh itself does not generate the light. In my Parking track, my meshes look like neon tubes (use the self luminance shader settings to make it look like it's lit up), but the actual "light" is created SOLELY by the ini.
     
    Prototype likes this.
  12. Gunnar333

    Gunnar333 Active Member

    Joined:
    Aug 5, 2017
    Messages:
    57
    Likes Received:
    113
    Location:
    Germany
    You're right. The mesh is only for positioning.
    I think the pivot point of the mesh is THE exact light position when OFFSET=0,0,0
     
    Prototype likes this.
  13. Pixelchaser

    Pixelchaser Well-Known Member

    Joined:
    Jan 4, 2015
    Messages:
    1,485
    Likes Received:
    1,012
    so its an emitter object effectively ?

    ok so the actual object lets call it the "bulb" object. this process is just a normal object with no extra intervention from ac custom shaders ? or is there some stuff for the "bulb" object. the actual light, not the object that creates the light bouncing....

    can we see your work on lights too here @luchian ?
     
    Last edited: Mar 15, 2019 at 7:18 PM
  14. barf

    barf Member

    Joined:
    Aug 6, 2018
    Messages:
    63
    Likes Received:
    81
    I got lights working by using the MATERIAL_ADJUSTMENT_X settings in the .ini file, nothing special about the object otherwise, typical shader parameters. From what I understand the other methods like the LIGHT_X and LIGHT_SERIES_X turn a mesh, rather than a material into an emitter.

    Code:
    [LIGHTING]
    SPECULAR_MULT = 0.2
    CAR_LIGHTS_LIT_MULT = 1
    LIT_MULT = 1
    
    [INCLUDE]
    INCLUDE=common/conditions.ini
    
    [MATERIAL_ADJUSTMENT_0]
    ACTIVE=1
    DESCRIPTION=Light at top of Sugarloaf
    MATERIALS=SugarLoafLight
    KEY_0=ksEmissive
    VALUE_0=255,0,0,2
    VALUE_0_OFF=0, 0, 0
    CONDITION=BLINK1
    RANGE=25000
    
    [CONDITION_0]
    NAME=BLINK1
    INPUT=ONE
    FLASHING_FREQUENCY=2
    FLASHING_SMOOTHNESS=0.4
    FLASHING_SKIP_OFF_STATE=0
    FLASHING_NOISE_AMPLITUDE=0
    FLASHING_MIN_VALUE=0.0
    FLASHING_SYNCED=1
    [​IMG]
     
    Prototype, Gunnar333 and luchian like this.
  15. luchian

    luchian Administrator Staff Member

    Joined:
    Jun 3, 2014
    Messages:
    2,207
    Likes Received:
    870
    You can, and you did. :lol:
     
    Prototype likes this.
  16. Pixelchaser

    Pixelchaser Well-Known Member

    Joined:
    Jan 4, 2015
    Messages:
    1,485
    Likes Received:
    1,012
    :lol: yeah I ment if you work on them. find new things etc.


    ive been doing lights since way before the shaders patch and the object used shouldn't be to scale if you want it to work nice. the size correlates to the flickering, bigger lights = better working lights. is anyone experiencing the same ?

    these are the last I did without the custom shaders... is everyone doing the same thing modelling wise for the lights themselves or am I missing a process ?
    [​IMG]
     
    Last edited: Mar 17, 2019 at 2:22 PM
    barf and Gunnar333 like this.
  17. Johnr777

    Johnr777 Active Member

    Joined:
    Jul 26, 2017
    Messages:
    217
    Likes Received:
    126
    It’s a completely different process, you don’t model the “glow object”.

    You just call out a MATERIAL_ADJUSTMENT_X in the ini for either the mesh or material you want to make glow at night. There are no extras, nothing to scale.

    Now if you want that mesh to brighten the surrounding area, then you need another ini entry like LIGHT_SERIES_X and call out either that same mesh itself or a simple “render=false” object to emit light for that area. The various parameters in that entry control sharpness, distance, etc.

    ALSO: for glowing objects/materials, you should add

    KEY_1 = ksAlphaRef
    VALUE_1 = -193
    VALUE_1_OFF = 0

    @barf , try that in your tower light, will glow better at night
     
    Last edited: Mar 17, 2019 at 9:34 PM
    barf and Pixelchaser like this.
  18. Pixelchaser

    Pixelchaser Well-Known Member

    Joined:
    Jan 4, 2015
    Messages:
    1,485
    Likes Received:
    1,012
    cool John ! so its a fully external .ini setup that's a 2 part process. object glow (or not) and separate surrounding light effect (or not) ?

    :lol:. do you have lovely lights too john ? show me your shiny stuff !
     
  19. barf

    barf Member

    Joined:
    Aug 6, 2018
    Messages:
    63
    Likes Received:
    81
    Thanks @Johnr77, I tried that and it worked but the light was white (the light on the tower in my example is a red flashing one)!
     
  20. Johnr777

    Johnr777 Active Member

    Joined:
    Jul 26, 2017
    Messages:
    217
    Likes Received:
    126
    Oh sorry, add that key in addition to the KEY_0

    KEY_0=ksEmissive
    VALUE_0=255,0,0,2
    VALUE_0_OFF=0, 0, 0
    KEY_1 = ksAlphaRef
    VALUE_1 = -193
    VALUE_1_OFF = 0
     
    Pixelchaser and Gunnar333 like this.
  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