Add Lights objects to .animated sections#1328
Conversation
|
@leezer3 what do you think? |
|
Basically this is what in this country we'd call the chicken and egg paradox. (I'm never sure how well these translate)- You need working examples of something (or at least a specification) in order to design sensibly the systems needed to actually make it work; this is in part why I've been working on MSTS content, as this gives a set of features with an already dssigned specification. If you don't have this, what you tend to end up with is a massive teetering tower where each new feature gets bodged on to the last. |
|
Thanks for the insight leezer3, i understand my PR could be a tech debt if i just submit it as working feature without a concrete base. i also don't want any of my PR to be a burden, like "here is a new feature, goodbye" and left it in the dust. So, is openbve will follow MSTS specs as basis? like open rails? A note: If anyone wants to improve or extend any of my PR, either still open or draft PR. The license should use simplified BSD-2 license. |
- Added early exit if no active lights. - Made spotlight attenuation calculations branchless. - Precalculated division constants. - Added frustum culling for active scene lights. - Added per-object closest 16 lights binding when total lights > 16. - Cached bound dynamic lights list and view matrix to skip redundant GL.ProgramUniform calls. - Removed unused CastShadow property and shadow = 1 parsing.
|
For reference, this is a MSTS / OpenRails light: I'm not sure on this, but it feels as if there are too many parameters exposed :) Honestly, I don't exactly know exactly where the roadmap is going, and I suppose that is some of the problem. I'm intending to re-write the CSV / B3D parser soon into something more akin to the block parsers, both to make it read cleaner and to get it to a known good licence state. |
Add 2 type of light source, spot and point.
I follow how blender light object settings, so it may more physically correct
can be tested in .animated file with:
Can use standard animation functions and parameters (Optional)
Parameter Details:
Light Animation:
A [Light] block generates an independent animated object containing the light. It supports all standard animation script properties (functions, directions, and damping) defined directly inside the [Light] block.
preview:
Screen.Recording.2026-06-05.165220.mp4
Screen.Recording.2026-06-05.1902002.mp4
Although it works... this still very work in progress, like the settings light limit does not have label yet... and i put it under the max sounds section.
i feel like we must set a roadmap priority, i mean if we keep adding feature but the stuff under the hood not built for it, it feels not efficient.
like with this light object feature, although it works... the renderer not build for this kind of feature and from what i can understand the renderer still a basic forward render, if we need modern feature, we must change the renderer to maybe clustered forward?
or other priority like using newer opentk or moving to other bindings like silk net ?