Jump to content
The Dark Mod Forums

Lamp Glass


Springheel

Recommended Posts

For each of these lights, I'm seeing the bright white flash a moment before the light comes on. Tels should probably look at these.

 

Unfortunately I can't get TDM to load the D3 assets anymore, and thus half of the game is broken for me (light textures all missing)... and I have no idea how I should "look" at these lights. What could the flasgh cause? Is it a script change? Code change?

 

I also noticed that the shadows are being turned on much too late after these lights go out, so the increased delay we made the other day for torches needs to go back to what it was if the light is electric. I'll see if I can determine the difference in the script, and make the change.

 

It probably needs a per-entity spawnarg, instead of a global define that is the same for all lights. I can make that change, but the indidiual values need to be set by someone who can actually see what the light+shadow do.

 

Edit: I see the fix from grayman was to distinguish between electric and torch lights.That sounds fine. What about gas lights? Currently these are handles like electric lights IIANM.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

  • Replies 147
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Also a note : the 'sound' keyword on lights seems to be completely broken - I'm not sure if it's worked since the gpl release however. I'll try to check out a really old copy of TDM later for experimenting. It also seems to be related to some strange rendering - as the lights are in a strange state where the engine makes bad culling choices about them. In short, kinda broken at the moment. That said, the 'broken' lighting is really fun to play with, might be worth making a similar keyword for helping to place things like directional lights.

 

If you're getting a pure white flash, it might be something dividing by zero or a null.

 

Heh, I see this too, but I though it is related to me adding locally some light textures or light materials (and I did not check these in, or so I thought).

 

Maybe it is just one single material shader borked?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Some examples of lights doing this for me are: atdm:lamp_electric_square_1_lit atdm:lamp_electric_outdoor_down_lit atdm:lamp_electric_shaded_lit

 

All these have these in common

 

* they are actual lights, with a model (e.g. basically a light which has a model, unlike normal lights, which do not have a model, but are instead attached to an model)

* they have a light textrue with a _snd

 

Looking at the materials, it seems lights/lightgratelight_snd was missing. I re-added it, this should fix the broken white lights. Does it also fix the white flash?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

It also seems to be related to some strange rendering - as the lights are in a strange state where the engine makes bad culling choices about them. In short, kinda broken at the moment.

 

I think this nicely illustrates why we need to stop adding any more new changes to 1.08.

Link to comment
Share on other sites

I think this nicely illustrates why we need to stop adding any more new changes to 1.08.

 

Then you need to declare a freeze.

 

(I think we should stop adding unnec. changes. However, we are not yet in freeze. Until then, I'd like to add new things. The time to test and fix bugs only comes after freeze).

 

Edit: Also I think _snd lights aren't broken, it was just one missing material shader declaration. We only use about 4 different one for all our lights with snd, so it had a kinda big impact. Which is good, because then we could find and fix it quickly.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Then you need to declare a freeze.

 

The freeze is a few weeks away. But given the sheer number of things we're going to have to test, it might be wise not add any more unnecessary, mod-wide changes in the weeks leading up to it. The reason the freeze was set for the end of the month was because there are are still several, rather important, issues to work out before then: http://forums.thedarkmod.com/topic/13718-108-release-planning/page__view__findpost__p__284277

Link to comment
Share on other sites

I see the fix from grayman was to distinguish between electric and torch lights.That sounds fine. What about gas lights? Currently these are handles like electric lights IIANM.

 

Yes, gas lights are treated like electrics. I assume this is because there's no flame.

Link to comment
Share on other sites

I just updated darkmod and the source.

 

Rebuilt the engine and Windows DLL.

 

The white flash is still there.

 

Damn.

 

The carried torches are now hosed. The flame is now just a spew of black squares.

 

Was this ok before the update or did you notice it just now?

 

Edit: Nevermind, this should be fixed now. My mistake, sorry.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

The torches are still hosed.

 

The problem was introduced in rev 12822, with Spring's animation sound changes. 12821 is okay.

 

I didn't notice it when I was working last night on the shadow change because my darkmod rev at the time was < 12822.

 

I noticed it for the first time this morning after I updated to the latest.

Link to comment
Share on other sites

So it wasn't my spawnarg reordering - couldn't see how it could have been, but I have been wrong before :)

 

Anyway, I'll have a look. We need to bring Springheel to not check in that many changes at once :)

 

Edit: The particle torchflame_moveable is missing. Probably forgot to check in a file. Springheel?

 

te@te:~/.doom3/darkmod_org$ ack torchflame particles/
particles/tdm_fire.prt
1896:particle torchflame_new01 {
1994:particle torchflame_new01_small {

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

  • 2 weeks later...

This one works perfectly...the light goes out immediately when you put out the flames.

 

entityDef atdm:chandelier_3_candles

{

"inherit" "atdm:static_light_lit_base"

"model" "models/darkmod/lights/extinguishable/chandelier1.lwo"

"editor_usage" "Hanging chandelier with 3 candles and 3 independend flames"

"editor_displayFolder" "Lights/Model Lights, Static/Hanging"

 

"noshadows_lit" "1" // turn off shadow when lit

"noshadows" "0" // unlit, so has shadows

 

// attach the 3 independed lights

"def_attach" "light_candleflame_chandelier"

"pos_attach" "flame1" // At the attach point called "flame1"...

"attach_pos_name_1" "flame1" // ... which is defined here.

// tels: todo does not work that way yet

"name_attach" "flame1" // Give it a name to pass along spawnargs

"attach_pos_origin_1" "-12.5 8 -3" // Offset the flame

 

"def_attach1" "light_candleflame_chandelier"

"pos_attach1" "flame2" // At the attach point called "flame2"...

"attach_pos_name_2" "flame2" // ... which is defined here.

"attach_pos_origin_2" "12.5 8 -3" // Offset the flame

 

"def_attach2" "light_candleflame_chandelier"

"pos_attach2" "flame3" // At the attach point called "flame3"...

"attach_pos_name_3" "flame3" // ... which is defined here.

"attach_pos_origin_3" "0 -13.5 -3" // Offset the flame

}

 

 

This one has light that stays lit for a good four or five seconds after the flames are extinguished. Is there any obvious difference I'm missing?

 

 

 

entityDef atdm:standing_chandelier_3_candles

{

"inherit" "atdm:static_light_lit_base"

"model" "models/darkmod/lights/extinguishable/standing_candelabra02.lwo"

"editor_usage" "standing chandelier with 3 unlit candles and 3 independend flames. Can be relit."

"editor_displayFolder" "Lights/Model Lights, Static/Candles"

 

// attach the 3 independed lights

 

"def_attach" "light_candleflame_chandelier"

"pos_attach" "flame1" // At the attach point called "flame1"...

"attach_pos_name_1" "flame1" // ... which is defined here.

"attach_pos_origin_1" "-11 7 50" // Offset the flame

 

"def_attach1" "light_candleflame_chandelier"

"pos_attach1" "flame2" // At the attach point called "flame2"...

"attach_pos_name_2" "flame2" // ... which is defined here.

"attach_pos_origin_2" "11 7 50" // Offset the flame

 

"def_attach2" "light_candleflame_chandelier"

"pos_attach2" "flame3" // At the attach point called "flame3"...

"attach_pos_name_3" "flame3" // ... which is defined here.

"attach_pos_origin_3" "0 -11 50" // Offset the flame

 

"noshadows_lit" "1" // turn off shadow when lit

"noshadows" "0" // unlit, so has shadows

}

Link to comment
Share on other sites

I set up a test map with these lights.

 

Debugging the script that controls the light holders, they each do the same thing when doused.

 

I noticed, however, that repeatedly restarting the map and dousing the lights while standing in different spots and in different orders resulted in

 

- the hanging lamp working correctly & the standing lamp failing (what you reported)

- the standing lamp working correctly & the hanging lamp failing

- both lamps working correctly

- both lamps failing

 

So it seems like it's random when it works and when it doesn't. When it fails, it's as if a fourth light is involved that isn't extinguished until 6 seconds after the first 3.

 

I checked and only 3 lights are spawned for each chandelier. Nothing else is spawned at all after they get doused, so the extra light must be there from the start, except I can't see it being spawned.

 

Tomorrow I'll try forcing the flames to not cast light and see if the mystery light continues to cast light.

Link to comment
Share on other sites

It might be a threading issue. Do both work if you extinguish them with a delay between (say 10 seconds) and both fail if you distinguish them very shortly after each other(or very shortly after map start?)?

 

I am not sure if it is possible to check for the thread in the script actually getting started, tho.

 

I just removed the light bulb model, just in case lights with models behave differently than lights without models (unlikely, tho).

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

When the problem occurs, one of the 3 lights remains on until the light is hidden 6 seconds after the smoke starts.

 

I suspect the light is going off, then back on again because of something the light holder is doing.

Link to comment
Share on other sites

I've found that two of the candle lights are bound to the third as the third's children.

 

Does anyone know why? Edit: Answer is in the next post.

 

One of the things the solution to #2546 did was to have a doused light douse its children.

 

So when the master light goes out, it douses its children, and also tells its own master (the light holder) to douse the master's children.

 

Since all the flames are children of the holder, a couple of the lights are told to go out twice. But the method used is toggling, so a light is toggled off by one master, then toggled on by the other.

 

I'll continue with this once I get an answer to my question about binding the lights to each other. I'm guessing that isn't necessary when all are bound to the same holder.

Link to comment
Share on other sites

I found a comment from ishtvan that says the routine used by an entity to douse its children shouldn't be used when that entity is a child itself. The routine can not only find its children, but it can also (wrongly) find its brothers and sisters.

 

That's why the code thinks two of the light entities are bound to the third, which answers my question above.

 

So, in our case, the solution to the problem might be to not douse children when the entity itself is a child.

 

I'm off to try that.

 

(This is why it's good to leave comments in the code and scripts!!!!! Something id did about 0.0000001% of the time.)

Link to comment
Share on other sites

Okay, that worked.

 

I doused the standing and hanging chandeliers 10x and never had a light stay on.

 

I'll file an issue for this and commit the code in a little while.

 

@Spring, there's a thread referenced in #2546 in which you talk about testing those changes on something you were working on. If it's at all possible, you might want to retest that situation and make sure it still works after I've checked in the code.

Link to comment
Share on other sites

Well, since that worked out so well, here's another puzzler. What is the difference between these two lamp entities? The first emits the white flash when switched on and off, and the second does not. I can't see a single significant difference between them. :wacko:

 

entityDef atdm:streetlamp_square_01_lit

{

"inherit" "atdm:static_electric_light_lit_base"

"model" "models/darkmod/lights/non-extinguishable/streetlamps/streetlamp_01.ase"

"editor_setKeyValue model" "models/darkmod/lights/non-extinguishable/streetlamps/streetlamp_01.ase"

"editor_displayFolder" "Lights/Model Lights, Static/Switchable/Streetlamps/Electric"

"skin" "lights/streetlamp01_colorme"

"skin_lit" "lights/streetlamp01_colorme"

"skin_unlit" "lights/streetlamp01_unlit"

"editor_usage" "A lit standing street lamp with a square top. Can be switched on and off."

"light_center" "0 0 93"

"editor_setKeyValue light_center" "0 0 93"

"_color" "0.46 0.46 0.66"

"noshadows" "0"

"noshadows_lit" "1"

}

 

 

entityDef atdm:streetlamp_spot_lit

{

"inherit" "atdm:static_electric_light_lit_base"

"model" "models/darkmod/lights/non-extinguishable/streetlamps/streetlampspot.ase"

"editor_setKeyValue model" "models/darkmod/lights/non-extinguishable/streetlamps/streetlampspot.ase"

"editor_displayFolder" "Lights/Model Lights, Static/Switchable/Streetlamps/Electric"

"skin" "lights/streetlampspot_colorme"

"skin_lit" "lights/streetlampspot_colorme"

"skin_unlit" "lights/streetlampspot_unlit"

"editor_usage" "A lit standing street lamp with a shade on top, creating a square light spot. Can be switched on and off."

"light_center" "-16 0 100"

"editor_setKeyValue light_center" "-16 0 100"

"texture" "lights/biground1"

"_color" "0.46 0.46 0.66"

 

"noshadows" "0"

"noshadows_lit" "1"

}

Link to comment
Share on other sites

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

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...