Page 1 of 1

1.3.17 Models/Sprites and dynamic lights

Posted: Sun Dec 06, 2009 12:58
by Enjay
If a model is attached to a shootable actor and you hit it with a projectile with a dynamic light attached, the actor gets darker briefly:

Image

Image

Not too obvious in that pic but I have seen it much more obvious in a real game.

Try the attached file. Load the zip, make sure lights.pk3 is loaded, summon "test01" give yourself a plasma rifle and shoot the moisture evaporator.

Re: 1.3.17 Models and dynamic lights

Posted: Sun Dec 06, 2009 16:37
by Enjay
My apologies. It would seem that models are irrelevant to this. It can happen with sprites too. These screenshots are from NeoDoom Gold Edition where the freeze weapon seems particularly prone to causing it.

NeoDoom
http://forum.zdoom.org/viewtopic.php?f=19&t=24322

Image

Image

Re: 1.3.17 Models and dynamic lights

Posted: Sun Dec 06, 2009 17:52
by Enjay
The only options that make a difference are:

Lights affect Sprites: turning this off removes the effect (as I would expect).

Fog mode: Both radial and standard show the effect. Switching fog off removes the effect.

Re: 1.3.17 Models and dynamic lights

Posted: Sun Dec 06, 2009 18:10
by Enjay
As with my other bug, it seems to be ini dependant. The attached causes it for me but a different ini didn't.
ini.zip
(4.02 KiB) Downloaded 40 times
Also a good and easy place to see the effect I find is in NeoDoom map11 because it's a nice open area. Warp to the map, kill all the bad guys ("kill monsters") then give yourself the weapons. The freezer is in slot 8. Fire it near the enemy corpses and you should see the effect.

I am testing with -noautoload BTW.

Re: 1.3.17 Models and dynamic lights

Posted: Mon Dec 07, 2009 21:11
by Enjay
Don't know if it's relevant but the effect seems to be most obvious with pale blue / near white dynamic lights. In my own mod, I have a freeze weapon with very similar coloured lights to Daniel's one and it also darkens sprites significantly. However, the effect is much less with other lights and, in most cases (particularly with red/yellow coloured lights) I'm not sure that it happens at all.

Anyway, in case you haven't seen the effect in action on your machine, here's a short video of it in NeoDoom.

http://www.zen64060.zen.co.uk/blacksprites.wmv (about 2MB).

Re: 1.3.17 Models/Sprites and dynamic lights

Posted: Mon Dec 07, 2009 23:35
by Enjay
Just trying to give more information in case it's useful. Tell me when to stop. ;)

I've found another mod that seems to cause it fairly readily. It looks like the recently fixed brightmaps bug, but this mod doesn't contain any brightmaps.

The mod is Beautiful Doom ver 4.7

http://ashigaru-rostov.narod.ru/mods/Bdoom47.zip

See the screenies:

Image

Image

I think this is the dynamic light definition

Code: Select all

// Zombies
flickerlight2 ZOMBIEATK
{
    color 1.0 0.8 0.2
    size 48
    secondarySize 56
    interval 1
    offset 0 40 0
}

object ZombieMan1
{
    frame POSSF { light ZOMBIEATK }
}
I thought that it was worth posting about because, interestingly, this is the first time I've seen the effect on a sprite with its own light. Also, for some reason, it doesn't seem to happen everywhere. If the zombies fire when they are on the triangular stairs at the start they don't show the effect but in other locations, zombies do go dark when they fire.

Image

Sorry, I couldn't capture a picture with both a normal firing zombie in the foreground and a dark one in the background but it does happen.

This was all still done with -noautoload

Re: 1.3.17 Models/Sprites and dynamic lights

Posted: Tue Dec 08, 2009 1:46
by Nash
What happened to works for me (tm)? ;)

Re: 1.3.17 Models/Sprites and dynamic lights

Posted: Tue Dec 08, 2009 16:57
by Enjay
Nash wrote:What happened to works for me (tm)? ;)
Enjay wrote:It looks like the recently fixed brightmaps bug, but this mod doesn't contain any brightmaps.
:P

'cept I thought it was already fixed.

;)

Re: 1.3.17 Models/Sprites and dynamic lights

Posted: Tue Dec 08, 2009 17:55
by Graf Zahl
Fixed. Amazing how much work you invested here and in the end it was a simple overflow. At one point a light level of 256 was calculated, then stored in a byte and truncated to 0.

Re: 1.3.17 Models/Sprites and dynamic lights

Posted: Tue Dec 08, 2009 19:19
by Enjay
Glad you got it fixed. I had feared that it was one of those annoying bugs that I could happily reproduce but which might be difficult to see on other systems - hence me giving as much info as I could.

[edit] Heh, and having now checked the revision, it really was the tiniest of fixes wasn't it. :lol: [/edit]

Re: 1.3.17 Models/Sprites and dynamic lights

Posted: Tue Dec 08, 2009 21:52
by Nash
I would've put in the same amount of effort as Enjay did if I wasn't so busy with work; this bug IS rather ugly and does severely hurt a WAD's visuals. :)