SOLVED Material Lighting

Discussion in 'Tracks' started by lilbroomstick, Jun 19, 2020.

  1. lilbroomstick

    lilbroomstick New Member

    Joined:
    Jun 19, 2020
    Messages:
    5
    Likes Received:
    1
    Hi, I am currently building my first track (yes I have followed the guide), and it is an indoor kart circuit. I was wondering how to make lights because when I added the roof it got very dark, obviously, so I would like to know how to set up a config ini and a kn5. I know that I will need to create a light series(?) and a material adjustment in the ini file, but I do not know how to set it up or how to set up the kn5. https://imgur.com/a/rhLtDhu Here is the material that I am using, and I will have ~112 lights on the ceiling and possibly more near the pits. Any help is appreciated. material.PNG lights.PNG
     
  2. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    make the lights a mesh on its own, this should make it:
    Code:
    [INCLUDE]
    INCLUDE=common/conditions.ini    ; contains NIGHT_SMOOTH condition
    
    [MATERIAL_ADJUSTMENT_0]
    ACTIVE=1
    DESCRIPTION=lits glow
    MESHES=your_ceilinglight_mesh   ; change this!
    KEY_0=ksEmissive
    VALUE_0=255, 209, 178, 0.5
    VALUE_0_OFF=ORIGINAL
    KEY_1=ksAlphaRef
    VALUE_1=-193   ; secret parameter makes it more "glowy"
    VALUE_1_OFF=ORIGINAL
    CONDITION=NIGHT_SMOOTH
    
    [LIGHT_SERIES_29]
    ACTIVE=1
    DESCRIPTION=lits glow
    MESHES=your_ceilinglight_mesh   ; change this!
    ; - instead you could also use MATERIALS=your_ceiling_light_material
    OFFSET=0,0,0
    DIRECTION=0,-1,0  ; down
    RANGE=25       ; play with this
    RANGE_GRADIENT_OFFSET=0.2
    SPOT=100
    SPOT_SHARPNESS=0.5
    FADE_SMOOTH=30
    FADE_AT=500
    CLUSTER_THRESHOLD=25   ; play with this, its how many lights-sources are genereated
    DIFFUSE_CONCENTRATION=0.15  ; play with this
    COLOR=255, 255, 255, 0.05  ; r,g,b,brightness - play with it!
    CONDITION=NIGHT_SMOOTH
    
     
    Last edited: Jun 24, 2020
    lilbroomstick and luchian like this.
  3. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    a picture to illustrate
    [​IMG]
     
    luchian likes this.
  4. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    where to put this? whether in
    variant 1:
    "content\tracks\yourtrack\extension\ext_config.ini"
    or variant 2:
    "extension\config\tracks\loaded\yourtrack.ini"

    note: with variant 2 you would be able to put the config on github and update it easy without having to update the whole track
     
  5. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    and again with more comments, its from ks_nordschleife, bmw-bridge spots on s/f line:
    upload_2020-6-20_13-16-56.png
     
    luchian likes this.
  6. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
  7. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    oh you might want to replace
    CONDITION=NIGHT_SMOOTH
    with
    CONDITION=ALWAYS_ON
     
  8. lilbroomstick

    lilbroomstick New Member

    Joined:
    Jun 19, 2020
    Messages:
    5
    Likes Received:
    1
    Thank you so much! The place looks a lot brighter in game, but I still haven't got the emissive key to work. Do I have to label each light something like "1lamp_**"? Right now I haven't named them, so each is just cube.240 or cube.***. How should I set this up in the .ini file and in blender itself? Thanks again.
     
  9. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    no need to have special names, just use
    MESHES=cube?
    patch can handle ? as placeholder
     
  10. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    [MATERIAL_ADJUSTMENT_0]
    ACTIVE=1
    DESCRIPTION=lits glow
    MESHES=cube?
    KEY_0=ksEmissive
    VALUE_0=255, 255, 255, 0.25 ; r,g,b,brightness
    KEY_1=ksAlphaRef
    VALUE_1=-193 ; secret parameter makes it more "glowy"
    CONDITION=ALWAYS_ON
     
    lilbroomstick likes this.
  11. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    beware, there was a typo in my original pos, idk if that make anything different

    Code:
    [MATERIAL_ADJUSTMENT_0]ACTIVE=1
    ACTIVE=1
     
  12. lilbroomstick

    lilbroomstick New Member

    Joined:
    Jun 19, 2020
    Messages:
    5
    Likes Received:
    1
    Thank you so much! I noticed in the material adjustment, I could just change 'meshes' to materials, and say my material name, so I did. At first it was really bright, so I toned it down a little. It isn't perfect, but here is is.
     

    Attached Files:

    fughettaboutit likes this.
  13. LanD

    LanD Member

    Joined:
    Jan 14, 2024
    Messages:
    43
    Likes Received:
    1
    could you explain to me how to proceed to add lamps like you I already have the model then named the material light and the object in question light too but nothing emits there is the code that I see in your discussion thread Is there an additional configuration to do to activate the lights? Is there a tutorial on this or can you tell me how to proceed please
     
  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