Dynamic Spotlight Lighting First submission from a new contributor
#91
Posted 29 April 2026 - 07:51 AM
"extensions":{
"KHR_materials_emissive_strength":{
"emissiveStrength":100
}
Please watch the video after those changes:
https://fileditchfil...29_15-43-49.mp4
and please compare to previous video.
As for me everything looks very similar even if the light power is now a hundred times greater.
EDIT:
When you use strenght more than 1 in blender then
"extensions": { "KHR_materials_emissive_strength": { "emissiveStrength": 100.0 }
is automatically added by blender during export, but seems that this strenght does not have impact on glowing effect in OR.
#92
Posted 29 April 2026 - 11:32 AM
#93
Posted 12 May 2026 - 08:14 AM
Thank you,
#94
Posted 29 May 2026 - 08:09 PM
this would preserve all needed tabs and highlight code samples, You are posting.
You can look back to this Your post: how it looks on the page, then - You can enter Editing (by the button at the post's bottom), to see, how the syntax is done.
#95
Posted 02 July 2026 - 02:15 AM
gpz, on 29 April 2026 - 11:32 AM, said:
I've been trying to get this working for quite some time now, but despite many tests and experiments, I haven't been able to find a solution.
I'm experimenting with the new KHR_lights_punctual support in the latest OpenRails unstable build and I've run into a problem that I can't explain.
I created a simple street light model in Blender 4.4 and exported it as glTF. The model contains:
- A single mesh (street light pole)
- One Spot Light (KHR_lights_punctual)
- Standard PNG texture (no PBR textures)
- Emissive material for the lamp
- Light and mesh exported in the same glTF file
What works
- The object loads correctly in OpenRails.
- The Spot Light is active.
- The light illuminates terrain and nearby objects.
- The emissive material works correctly.
What does not work
- The Spot Light does not illuminate the mesh that belongs to the same glTF model. For example, the ground below the lamp is illuminated correctly, but the lamp housing and the pole itself remain unaffected by the light emitted from that lamp.
- The emissive material is visible during daytime as well. I was expecting the emissive effect to appear only at night, but it remains active throughout the day. I'm not sure if this is the expected behavior or if there's a recommended way to control emissive visibility based on the day/night cycle.
For example, the lamp illuminates the ground, but the lamp housing and the pole remain unaffected by their own light.
What I have already tested
- Different light intensities.
- Different Spot Light cone angles.
- Moving the light slightly away from the mesh.
- Different light positions.
- Emissive enabled/disabled.
- Simplified the model to a single material.
- Verified normals are exported correctly.
- Exported directly from Blender without any intermediate conversion.
- Tried different glTF structures and parenting (mesh/light under a common parent).
In Blender, the exact same light correctly illuminates the pole, so the light placement itself appears to be correct.
My question
Is this the expected behavior of the current KHR_lights_punctual implementation?
Can a punctual light illuminate the mesh contained in the same glTF asset, or is there any additional requirement that I may be missing (material settings, export options, node hierarchy, etc.)?
If anyone has a working example where a KHR_lights_punctual light illuminates its own mesh, I would appreciate any guidance or example.
Any guidance or suggestions would be greatly appreciated. Your advice would be very helpful in understanding what I might be doing wrong. Thank you in advance for your time and assistance!
#96
Posted Yesterday, 11:46 PM
Thanks,
Eric
#97
Posted Today, 05:31 AM
Wow - this is a GAME CHANGER.
The old single light source was one reason I never ran at night. Meeting an AI without a light source - shattered the illusion.
The loco and streetlamps are all GLB. My streetlamp's mesh is catching the light.
Well done - gentlemen.
https://i.postimg.cc/ZYyyTh7X/2026-10-05-19-42-09-Greenshot.png
Regards,
Scott
#98
Posted Today, 06:27 AM
#99
Posted Today, 06:34 AM
#100
Posted Today, 06:37 AM
My example Blender source and working GLB model.
DOWNLOAD:
SCOstreetlamp.zip (117.45K)
Number of downloads: 15
Regards,
Scott
#101
Posted Today, 08:04 AM
scottb613, on 06 October 2026 - 06:37 AM, said:
My example Blender source and working GLB model.
DOWNLOAD:
Regards,
Scott
hi
Where should I put this file in my route? And how? As a shape? In the shapes folder?
#102
Posted Today, 09:13 AM
ermel17, on 06 October 2026 - 08:04 AM, said:
Where should I put this file in my route? And how? As a shape? In the shapes folder?
Hi...
It's just a model - the textures are embedded in the model - so yes - copy to shapes and make a ref entry so you can place it.
Hi Folks,
FYI: What we really need is more light switch controls on locomotives - to control these new light sources.
Regards,
Scott
#103
Posted Today, 10:33 AM
James Ross, on 07 April 2026 - 12:46 PM, said:
- Do nothing and only provide lights via glTF models
- Add support for lights in SD files (rendered by same code as glTF models)
Option 2 would provide a way to enhance existing content with real lights, a bit easier than creating and placing new light-only glTF objects, but it isn't clear if it is worth the trouble.
SD file is actually the proper place to put lights, not S file. Usually a game engine uses those small files/data sets to load them all at once to collect information about scene object bounds / view spheres / lights. A light may be seen from a very far distance, where object and it's large S / GLB file should not be loaded yet. MSTS uses this for view spheres, modern engine would benefit for lights, but rendering far lights require deferred renderer.
#104
Posted Today, 10:43 AM
Quote
Ok, what is your point? AI generally doesn't create bad code these days. Does this feature work and not create more problems than it solves? What does it matter how the code was developed if it actually works?
#105
Posted Today, 10:50 AM
pwillard, on 06 October 2026 - 10:43 AM, said:
There is difference between AI assisted code and Bot activity. Imagine that code is indeed great, but issues surfaced. A human you can contact, a bot is usually unreachable. You can of course ask an agent for review/fix yourself, but that cost real money. Anyway, this is unrelated topic.

Log In
Register Now!
Help








