Page 1 of 1
Question on lamp light rendering distance
Posted: Fri Jan 24, 2025 5:55 pm
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.
- 2025-01-24-18-26-35.png (6.86 MiB) Viewed 145 times
- Moving north just a little activates them.
- 2025-01-24-18-26-45.png (6.87 MiB) Viewed 145 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?
Re: Question on lamp light rendering distance
Posted: Fri Jan 24, 2025 6:35 pm
by Bilka
Re: Question on lamp light rendering distance
Posted: Fri Jan 24, 2025 7:18 pm
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,
}