Dynamic Spotlight Lighting First submission from a new contributor
#31
Posted 08 April 2026 - 02:55 AM
#32
Posted 08 April 2026 - 03:06 AM
https://ibb.co/6MzNfkX
https://ibb.co/nNfvyx3N
https://ibb.co/GfwDL80Q
https://ibb.co/mVXrx1Wt
There are some performance testing. My conclusion is that 8-12 lights do not affect performance at all, but displaying lights with full range on whole scene can reduce performance even about 90%. At the moment with this approach placing lights on huge stations where "tons" of lights must be activated on all platforms is hard to swallow ;)
And at the end the movie. Everything looks nice, but performance loss is not acceptable for everyday gaming.
https://files.catbox.moe/wb6odl.mp4
#33
Posted 08 April 2026 - 05:47 AM
See the spec here: https://github.com/K...ctual/README.md
If you model car traffic, add the lamps as emissive material, so they will be visible from distance, but will not eat up resources with trying to display active light cones.
EDIT, just for reference, here is a light with the range parameter added:
{
"asset": { "version": "2.0" },
"extensionsUsed": [ "KHR_lights_punctual" ],
"scenes": [ { "nodes": [0] } ],
"nodes": [ { "translation": [0, 5, 0], "rotation": [-0.7071, 0, 0, 0.7071], "extensions": { "KHR_lights_punctual": { "light": 0 } } } ],
"extensions": { "KHR_lights_punctual": { "lights": [ { "type": "spot", "range": 500.0, "color": [1.0, 0.9, 0.8], "intensity": 50.0, "spot": { "outerConeAngle": 1.5 } } ] } }
}
#34
Posted 08 April 2026 - 06:56 AM
#35
Posted 08 April 2026 - 07:37 AM
stormerdsr, on 08 April 2026 - 03:06 AM, said:
And at the end the movie. Everything looks nice, but performance loss is not acceptable for everyday gaming.
I am watching this play out with interest.
29-30 frames per second is not very good. I would think that you would try to stay closer to 60 frames per second. Can you post your openrails log file to see what hardware you are using?
Also this might be of interest in having more lights for other trains, AI, etc
Thanks,
Steve
#36
Posted 08 April 2026 - 08:12 AM
Eldorado.Railroad, on 08 April 2026 - 07:37 AM, said:
29-30 frames per second is not very good. I would think that you would try to stay closer to 60 frames per second. Can you post your openrails log file to see what hardware you are using?
Also this might be of interest in having more lights for other trains, AI, etc
Thanks,
Steve
I'm using core i5-12500 + rtx 3060 12GB VRAM on desktop computer, so this is a mid-range hardware.
Additionaly if you look on my screenshots you will notice, that at this location I have ~300FPS when lights are not used. When I enable lights for cars with 500 meters range, performance drops from ~300FPS to ~30FPS (about 90%). The problem will be when I start to use lights on high detailed stations where are thousands shapes per square and FPS like 80-90FPS. After adding full-range lights for these stations and take away 90% of performance from 80FPS, there will remain only about 10FPS :) In the nearest future I'm planning to test lights on large hight detailed stations to ensure if I'm right or not. Also I will appreciate feedback from other users about the performance when lot of lights is used on small areas like platforms.
#37
Posted 08 April 2026 - 11:58 AM
#38
Posted 08 April 2026 - 12:59 PM
gpz, on 05 April 2026 - 06:04 AM, said:
I've been editing world files for 20 years. Noonbs should not do it but anyone who has placed an object and can find it in the .w file will be competent.
#39
Posted 09 April 2026 - 03:05 AM
Platform light test. All lights were attached in blender.
EDIT:
Unfortunately shadows of nearest objects do not react to this light source
#40
Posted 09 April 2026 - 06:06 AM
stormerdsr, on 09 April 2026 - 03:05 AM, said:
Platform light test. All lights were attached in blender.
EDIT:
Unfortunately shadows of nearest objects do not react to this light source
So... How did you managed to have more than 4 lights at the same time? Could you please elaborate?
#41
Posted 09 April 2026 - 08:39 AM
#42
#43
Posted 09 April 2026 - 09:39 AM
Guille592, on 09 April 2026 - 06:06 AM, said:
I have 9 individual lights lined up here...
gpz provided the answer
gpz, on 08 April 2026 - 02:55 AM, said:
StaticFlags ( 00080000 )
Jan
#44
Posted 09 April 2026 - 10:19 AM
#45
Posted 09 April 2026 - 10:46 AM
stormerdsr, on 08 April 2026 - 08:12 AM, said:
In other thread I told that without deferred rendering, there will be significant performance hit when a lot of the lights are in the scene.
But having 30-60 lights shouldn't have that big impact on cards like 3060.

Log In
Register Now!
Help







