Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)

So a long standing issue with the light model entities in the core, is that the main light source is hard bound to the origin of the model. This isnt great, because it means the origin of the light is then directly in the same plain as a wall or ceiling @ 0, 0, 0. which has an unpleasant effect visual effect on a lot of the stock textures.

If the engine code could be updated/edited so the main/default light for each light entity could be somewhere that isn't the at 0 0 0 of a model, I would have no issue taking on the task of checking and fixed every stock light..

In my humble opinion, this should 'not' significantly break any existing FM's, because all we will be doing is moving the origin of the light source to where light would be emitted from IRL, eg the housing, bulb or arc etc.

Edited by Bikerdude
  • Like 1

bhm_banner.jpg

Posted

This was also always an issue for me.

When I place lights, I like to control and fit the location of the light volume exactly into its environment (for example to keep lights from extending into adjacent areas or to create shadows). That means the center (or origin) of the light volume is at some random location in the room, and almost always the wrong place for the model (which is on the wall or ceiling in most cases).

But that's how all the light entities work and I have to use an inconvenient workaround. 

  • Like 1
Posted
15 hours ago, stgatilov said:

Could you give some example?
E.g. some problematic "light model entity"...

Any stock light entity will do, but here are some that demonstrate my point - 

- atdm:antique_wall_light_1_globe
- atdm:lamp_electric_fancy_lit
- atdm:lamp_wall_gaslight_02_lit
- atdm:lamp_hanging02 - this one is particularly bad due to the distance from the origin and the housing.

bhm_banner.jpg

Posted
entityDef atdm:lamp_hanging02
{
    "light_center"   "0 0 -68"
    "editor_setKeyValue light_center"    "0 0 -68"

I think the light_center spawnarg does exactly what you need: specifies the offset of light origin from the model origin.
 

Posted
56 minutes ago, stgatilov said:
entityDef atdm:lamp_hanging02
{
    "light_center"   "0 0 -68"
    "editor_setKeyValue light_center"    "0 0 -68"

I think the light_center spawnarg does exactly what you need: specifies the offset of light origin from the model origin.
 

That does not solve the issue I described, unfortunately (it's a slightly different problem).

There is another point (the "middle" of the light volume) that can't be changed. The model is always located at this point. I have to use a secondary light, to do what I want (as described in my ealier post). It's very inconvenient. 

  • Like 1
Posted

Okay.

I think the core issue comes from the idea of merging a model and light into one entity.
Is it really hard to make the separate?

UPDATE: There is something called localLightOrigin in the code.
I think it comes from "light_origin" spawnarg and is also affected by "setLightOrigin" script event.

Posted (edited)
17 hours ago, stgatilov said:

I think the core issue comes from the idea of merging a model and light into one entity.
Is it really hard to make the separate?

I don't know how these entities work in detail, in case your asking me. There seems to be some scripting involved. I have not looked closely at the implementation.

But the way I do it often, is basically two entities (light and model/behavior), that have to be linked somehow. I just shrink down the original light, and target my light to it (Maybe any other way would not be that much different). But it means there is an extra light entity, when only one is used.

Edited by Baal
Posted
On 8/26/2026 at 5:22 PM, stgatilov said:

UPDATE: There is something called localLightOrigin in the code.
I think it comes from "light_origin" spawnarg and is also affected by "setLightOrigin" script event.

Is it possible to manually specify a different origin eg "localLightOrigin" "0 0 0" etc?

bhm_banner.jpg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Terribly difficult juggling map designing with work, but I'm still alive and chipping away at something very special. I'm actually making a collaboration of sorts with a friend, I make the map itself and he acts as my "Chief Scope Creep Consultant" that checks in every so often to make sure this project isn't getting out of hand. It's a good system!
      · 0 replies
    • JackFarmer

      We don't need artificial intelligence; we need artistic intelligence. 
      Ralf Hütter, Kraftwerk
      · 5 replies
    • taaaki

      The post editor for the dark themes should be working again. Apologies for the inconvenience.
      · 1 reply
    • jaxa

      Talk GabeCube:
      https://forums.thedarkmod.com/index.php?/topic/18055-2016-cpugpu-news/page/39/#findComment-508710
      · 3 replies
    • The Black Arrow

      Things have been so bad these days for me...
      Just a year ago, I've been feeling dizzy, I thought it was nothing, today's stress, that type of thing, went to sleep...Still dizzy! 9 more days dizzy, went to doctor (I would have gone on the first day if NOT for the long appointment time)
      Said it may be Neck Dizziness...I did exercises for 6 months, no changes.
      Went to a Physical Therapist, went to another, no changes.
      I've asked my doctor for a full check this time.
      I hated yesteryear so much due to personal reasons, this year might be the same.
      To be brutally honest, I'd rather have cancer or/and chronic pain than suffer dizziness any second longer, especially when nothing helps.
      Hard to enjoy Thief when you're dizzy so I was hoping this year, Winter will be best for me.
      · 7 replies
×
×
  • Create New...