Bigger omni lights shut off smaller ones for ever?!

kleinerhauck

New Member
Reaction score
3
I converted this .mdl to .mdx with Magos Model Editor and used it in my map alot for street laterns.
Code:
Version {
    FormatVersion 800,
}
Model "" {
    NumLights 1,
    BlendTime 150,
}
Sequences 1 {
    Anim "Stand" {
        Interval { 0, 3333 },
    }
}
Light "Omni01" {
    Omnidirectional,
    static AttenuationStart 1,
    static AttenuationEnd 2,
    static Intensity 500,
    static Color { 0.1, 0.1, 0.1 },
    static AmbIntensity 1100,
    static AmbColor { 0.1, 0.1, 0.1 },
}
PivotPoints 1 {
    { -2.59302, 0.194191, 17.3677 },
}
Then I create another doodad, giving it the exact same model as above but with Intensity 100 and AmbIntensity 200. (And also the same settings in the object editor)
Problem: As soon as some specific street laterns get into the camera view the light from the second doodad disappears (for ever!).
(Renaming the Light to "Omni02" in the .mdl file didn't help)
Now if I use a new model with the same intensity the light will never disappear and work just like it should, even if i change for example the Attenuation.
So the lights with the higher intensity shut out the 'smaller' lights for ever.
Even using units and recreating them every 0.05sec won't work.
This also happens in the world editor, and also for standard models like the glowing torch.
How can I fix this?

I put this line in the Map Init trigger:
Code:
call SetDayNightModels("","")
All street latern lights work properly.
 

kleinerhauck

New Member
Reaction score
3
It seems I found a solution, after creating and comparing dozens of lights :)

This is what I found out:
1. Changing the Attenuation has no visible effect at all.
2. Creating lights with different Intensities/AmbIntensities leads to bugs. (Lights won't be displayed, udgly edges...)
3. The intensity of a light can also be changed by modifying the color!
As long as the relative values stay the same (e.g. instead of 1 0.1 0.3 -> 0.1 0.01 0.03), the color ingame stays the same. Reducing the values (factor 5-10) leads to less intensity only! (Which is what we need)
4. You can change the Intensity (but not the AmbIntensity!!!, and the AmbIntensity limits the Intensity!) by attaching the light to a Bone and using the Scaling Value of the Object Editor.

This is how to attach a light to a bone.
You can use this light as basis for all your lights.
Remember only to change the color not the intensity!
Code:
Version {
    FormatVersion 800,
}
Model "BaseLight" {
    NumBones 1,
    NumLights 1,
    BlendTime 150,
}
Sequences 1 {
    Anim "Stand" {
        Interval { 0, 3333 },
    }
}
Bone "DummyBone" {
    ObjectId 0,
}
Light "Omni01" {
    ObjectId 1,
    Parent 0,
    Omnidirectional,
    static AttenuationStart 1,
    static AttenuationEnd 2,
    static Intensity 500,
    static Color { 0.1, 0.1, 0.1 },
    static AmbIntensity 1100,
    static AmbColor { 0.1, 0.1, 0.1 },
}
PivotPoints 1 {
    { -2.59302, 0.194191, 17.3677 },
}

Have fun with it!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top