Working track lamps

Discussion in 'Tracks' started by Oskar, Oct 31, 2019.

  1. Oskar

    Oskar New Member

    Joined:
    Oct 31, 2019
    Messages:
    6
    Likes Received:
    2
    Hi,
    So I was working on this map for the last few weeks and it's mostly finished but I was wondering if I could make the lights work at night sessions as we use real time on our server. I am aware that there was a thread regarding the same issue but it really did not work for me. If someone could explain to me how to make this work I would be more than happy and I mean step by step. I know how to setup collisions and export it properly to AC but that's it really, I don't have much experience with ksEditor.

    Things I've done:
    - Setting up not renderable planes near the tops of the lamp poles
    - Changing their names in ksEditor to OBJ50 - so they are all the same and don't interfere with other objects
    - In .ini file I put this line under [about] line
    [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 = OBJ50
    OFFSET = NORMAL
    COLOR = 255, 244, 229, 0.05
    SPOT = 100
    SPOT_SHARPNESS = 0.1
    RANGE = 3

    -I've tried with the original names and Object name - it's one position higher in ksEditor and it's not editable
    As you see I don't really know what I'm doing so just please help.

    [​IMG]
    [​IMG]
     
    Last edited: Nov 1, 2019
  2. Johnr777

    Johnr777 Moderator

    Joined:
    Jul 26, 2017
    Messages:
    384
    Likes Received:
    300
    I dont thing changing their names in kseditor will work, has to be done in the software used to make the track.
     
    Oskar likes this.
  3. Oskar

    Oskar New Member

    Joined:
    Oct 31, 2019
    Messages:
    6
    Likes Received:
    2
    So I need to create the lamp object in the 3d software I'm using, create a material with specific name I will use in the ini file as a material and use this material on the object that will be working as the bulb? Will the exported .fbx file contain the materials I used in the editor? I'm normally baking all the textures before exporting to make them easy to edit and fps friendly
    edit:
    I'm at work so can't test it now but it's probably solved

    also found a code with the same problem (credits to Gunnar333) :

    [MATERIAL_ADJUSTMENT_1]
    ACTIVE = 1
    DESCRIPTION = lamppost
    MATERIALS=bulb
    KEY_0 = ksEmissive
    VALUE_0 = 255,230,200,0.3
    VALUE_0_OFF = 0, 0, 0
    KEY_1 = ksAlphaRef
    VALUE_1 = -193
    VALUE_1_OFF = 0, 0, 0
    CONDITION = NIGHT_SMOOTH
    RANGE = 45

    [​IMG]
     
    Last edited: Oct 31, 2019
  4. Johnr777

    Johnr777 Moderator

    Joined:
    Jul 26, 2017
    Messages:
    384
    Likes Received:
    300
    Its super simple, you could create something as basic as a box, assign a tiny "null" material, and export... name doesnt matter, as long as you define it in the config file. Light will be cast from that box :)
     
    Oskar likes this.
  5. Oskar

    Oskar New Member

    Joined:
    Oct 31, 2019
    Messages:
    6
    Likes Received:
    2
    The plane I used is super simple but to define it in the config file (do you mean the .ini that's in the track folder?) It needs to be the same like, bulb - material/texture and bulb declared in the .ini (?) file. I know the name doesn't make a difference in this case but I like to keep things clean and easy to explain so someone can explain it to me without asking why I named this light emitter ''pusssydestroyer69_420'' :p
     
  6. Johnr777

    Johnr777 Moderator

    Joined:
    Jul 26, 2017
    Messages:
    384
    Likes Received:
    300
    There’s 2 parts to this. The code you posted above, the material adjustment... it is exclusively for making the texture brighter, but it can’t cast an actual light on surfaces.

    For that, you need a light series tag like the one you posted originally.

    I’m pretty sure the reason your light didn’t work it’s because you thought kseditor had renamed the mesh to “obj50” when in fact, it didn’t.
     
    Oskar likes this.
  7. Oskar

    Oskar New Member

    Joined:
    Oct 31, 2019
    Messages:
    6
    Likes Received:
    2
    So I changed name of the object in Cinema4D, Race track builder, ksEditor and literally nothing. I have no idea if I'm even doing it right putting the code into models.ini
     
  8. Johnr777

    Johnr777 Moderator

    Joined:
    Jul 26, 2017
    Messages:
    384
    Likes Received:
    300
    Wait... models.ini????

    No, you need to create a shaders patch ini

    Look in assettocorsa\extension\config\tracks for examples
     
    Oskar likes this.
  9. Oskar

    Oskar New Member

    Joined:
    Oct 31, 2019
    Messages:
    6
    Likes Received:
    2
    Thank you! I had no idea there are files related to maps :banghead: my first finished map in Assetto Corsa ready for release!

    [​IMG]
     
    Nericksenna and MGMetroDave like this.
  10. Johnr777

    Johnr777 Moderator

    Joined:
    Jul 26, 2017
    Messages:
    384
    Likes Received:
    300
    No problem! Congrats
     
  11. MGMetroDave

    MGMetroDave Member

    Joined:
    Apr 7, 2019
    Messages:
    92
    Likes Received:
    98
    Looks really nice @Oskar ! What's the track? Is it a home made design? Good work on the lights.
     
  12. Oskar

    Oskar New Member

    Joined:
    Oct 31, 2019
    Messages:
    6
    Likes Received:
    2
    Autodrom Pomorze in Poland :)
    Thank you sir, glad you like it
     
  13. MGMetroDave

    MGMetroDave Member

    Joined:
    Apr 7, 2019
    Messages:
    92
    Likes Received:
    98
    Very nice! Look forward to seeing it when it's finished!
     
    Oskar likes 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