Question on lamp light rendering distance

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
maeriden
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Dec 16, 2024 5:08 pm
Contact:

Question on lamp light rendering distance

Post by maeriden »

So I have a modded 32x32 substation that also has a builtin lamp. The light radius is set to span the entire length of the connection distance.
When the light source is at a certain distance from the camera border, the light doesn't get rendered.

Lights to the north not being rendered.
Lights to the north not being rendered.
2025-01-24-18-26-35.png (6.86 MiB) Viewed 141 times

Moving north just a little activates them.
Moving north just a little activates them.
2025-01-24-18-26-45.png (6.87 MiB) Viewed 141 times

Is there a way to fix this? When running around the lights get in and out of the rendering distance causing a fast light-dark switch all the time that's really distracting.
Maybe some config parameter to select the distance?
Or maybe it's moddable?
Bilka
Factorio Staff
Factorio Staff
Posts: 3314
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Question on lamp light rendering distance

Post by Bilka »

I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
maeriden
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Dec 16, 2024 5:08 pm
Contact:

Re: Question on lamp light rendering distance

Post by maeriden »

Thanks Bilka, exactly what I was looking for (I tried searching for "light" and "rendering" but nothing came up).

In my case cranking `light_renderer_search_distance_limit` to 128 resulted in a noticable improvement, but I also had to change `entity_renderer_search_box_limits` and now it's almost unnoticable. I could also dial down `light_renderer_search_distance_limit` to 48.

Mod code in case anyone is intereseted in the future.

Code: Select all

-- data.lua

-- Increase the distance up to which lights get rendered.
-- Required for mods like inbuilt-lighting when the light radius relative to power pole coverage is high.
-- Default: 22 (__core__/prototypes/utility-constants.lua:394)
data.raw["utility-constants"]["default"].light_renderer_search_distance_limit = 48

-- Also improves light distance rendering.
-- Default: 6, 3, 3, 4 (__core__/prototypes/utility-constants.lua:394)
data.raw["utility-constants"]["default"].entity_renderer_search_box_limits = {
    left   = 15,
    top    = 15,
    right  = 15,
    bottom = 15,
}
Post Reply

Return to “Gameplay Help”