1. Hey there Guest,

    The game servers have moved to semi-dedicated hardware and IPs have changed. Please see front page server widget for up-to-date game server information.

"Static" lighting on a dynamic model?

Discussion in 'Mapping Questions & Discussion' started by MisterYura, Jan 9, 2010.

  1. MisterYura

    MisterYura L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    Hello again,

    I'm still working on that CP map that has a train running through the middle. The map is mostly dark, but the train has a light_dynamic on the front of it, which beautifully lights up the map as the train goes through. The light also lights up the front of the train itself - however, while nice in appearance, just looking at the train causes a severe drop in framerate (200 to 40 fps on my computer, nevermind worse computers). I believe that this is because the dynamic light is recalculated for the train every time the train moves (which is all the time).
    I absolutely love the current effect and would like it to remain as similar as possible, but it costs way too much to use the way it is right now. Is there a way that I can create an almost "static" lighting for the train so that it is lit up the same way all the time, while having the dynamic light shine on just for the map itself?
     
  2. martijntje

    martijntje L8: Fancy Shmancy Member

    Messages:
    539
    Positive Ratings:
    168
    you could have multiple "normal lights" but give them a name, and you can turn them on and off. but you would need a lot of them to make it seems smooth and it will tremendously increase the compile time and filesize of the map
     
  3. MisterYura

    MisterYura L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    It's not quite a matter of needing static lights for the world as much as needing to get rid of the costly constant recalculation of the lighting on the moving train. I need the train model to appear to be lit the same way all the time (even without an actual light shining on it) and for a dynamic light to completely ignore the model.
     
  4. Nutomic

    Nutomic L11: Posh Member

    Messages:
    888
    Positive Ratings:
    177
    Lights with names are always rendered dinamically, that would be even worde performance-wise...

    What exact light entity are you using?
     
  5. MisterYura

    MisterYura L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    I'm using a light_dynamic class, parented to the tracktrain:
    pitch yaw roll: 1 0 0
    entity to point at: n/a
    light color: 255 255 255 200
    light brightness: 3
    inner angle: 0
    outer angle: 0
    pitch: 0
    max distance: 3000
    spotlight end radius: 10
    appearance: normal​