Two dynamic lighting issues

Discuss all aspects related to modding Zandronum here.
Post Reply
RobbyPants
 
Posts: 37
Joined: Wed Mar 13, 2013 12:53 am

Two dynamic lighting issues

#1

Post by RobbyPants » Thu Dec 17, 2015 3:24 pm

I'm working on a mod that will use the Open GL dynamic lights, and I'm having two issues.

The first, and biggest is that they full-out stopped working, all of a sudden. I was experimenting with adding dynamic lights to some actors I'd created. As a refresher, I dusted off an old mod where I'd done this in the past. I fired it up, and it worked fine, so I copy-pasted the code in the GLDEF lump into the new wad file. It wasn't working. I mucked around for an hour or so before I realized that my old (already working) mod wasn't working with lights either. They weren't displaying for any actors. To further troubleshoot, I fired up the wad in Skulltag and ZDoom, and they didn't work, either (although I'm not surprised in ZDoom). I went back to Zandronum, went into the OpenGL settings and turned off dynamic lights. I closed it, reopened it, and turned it back on. Still nothing.

So, is it possible I somehow borked something in my graphics drivers or somewhere else? Where else could I check to get these working again?


Edit: I should probably add this detail, too. During that hour of mucking around between when the lights worked and when I observed them not working on that (previously working) police car actor, I had an odd issue with Zandronum. I loaded it and I could hear all the sound. I could hear myself traversing through the menu, but the screen was completely black. I managed to quit through the menu, and then started it up again, and it worked. I don't know if this is in any way related, but I might as well pass it on.

The second issue (if I ever the the lights working again!) is wondering if it's possible to attach a dynamic light to a player based on the sprites rendered. Basically, I want to make it so that if they have the flash light object and a one-handed weapon equipped, they'll get a light. If they have a two-handed weapon equipped, they won't have the light.

Typically, it seems that in GLDEF, the way you do this is to declare the actor and set the type of light and properties. Then you attach it to various frames. I pulled this off in the past with a police car that had alternating blue and red lights with the appropriate sprites. What frames would you use when using the player? Is it the various weapon frames that the player sees, or is this going to be tied to frames that would be seen by everyone else? I'm hoping it's the first one, because that'd be a lot easier for me to control.
Last edited by RobbyPants on Thu Dec 17, 2015 4:03 pm, edited 1 time in total.

User avatar
Sean
IRC Operator
Posts: 983
Joined: Thu Jan 16, 2014 9:09 pm
Location: United Kingdom
Clan: Zandronum
Clan Tag: [Za]
Contact:

RE: Two dynamic lighting issues

#2

Post by Sean » Thu Dec 17, 2015 3:38 pm

I think this happens if there are too many dynamic lights than your computer can handle.

Key word: think. Used to have this on an older computer, but it went away when I got a better one.
<capodecima> i dont say any more word without my loyer jenova

RobbyPants
 
Posts: 37
Joined: Wed Mar 13, 2013 12:53 am

RE: Two dynamic lighting issues

#3

Post by RobbyPants » Thu Dec 17, 2015 4:03 pm

Sean wrote: I think this happens if there are too many dynamic lights than your computer can handle.

Key word: think. Used to have this on an older computer, but it went away when I got a better one.
I could see that being the case in certain circumstances, but it wouldn't be in this case. I replicated everything the same as when it previously worked. I went to a dark map and simply summoned the item in the console.

Note: I should probably add this to the OP. During that hour of mucking around between when the lights worked and when I observed them not working on that (previously working) police car actor, I had an odd issue with Zandronum. I loaded it and I could hear all the sound. I could hear myself traversing through the menu, but the screen was completely black. I managed to quit through the menu, and then started it up again, and it worked. I don't know if this is in any way related, but I might as well pass it on.

RobbyPants
 
Posts: 37
Joined: Wed Mar 13, 2013 12:53 am

RE: Two dynamic lighting issues

#4

Post by RobbyPants » Fri Dec 18, 2015 2:47 am

I realized I had a pretty old version of Zandronum. I installed the latest version. I'm assuming it installed over top of the previous version (I installed in the same location) because my key configurations were the same. The issue is still persisting.

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Two dynamic lighting issues

#5

Post by Ænima » Fri Dec 18, 2015 3:39 am

To answer your second question:

GLDEFS definitions are attached to the player sprites themselves, not the weapon sprites because those technically don't exist in the level.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

RobbyPants
 
Posts: 37
Joined: Wed Mar 13, 2013 12:53 am

RE: Two dynamic lighting issues

#6

Post by RobbyPants » Fri Dec 18, 2015 1:34 pm

Ænima wrote: To answer your second question:

GLDEFS definitions are attached to the player sprites themselves, not the weapon sprites because those technically don't exist in the level.
Thanks. I'd wondered about that. Is there any way to change if the light displays based on what the player has equipped?

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Two dynamic lighting issues

#7

Post by Ænima » Fri Dec 18, 2015 2:26 pm

Weapon.PreferredSkin
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

RobbyPants
 
Posts: 37
Joined: Wed Mar 13, 2013 12:53 am

RE: Two dynamic lighting issues

#8

Post by RobbyPants » Tue Jan 26, 2016 8:53 pm

I figured it out. For whatever reason, I wasn't able to get it working via the menu. I ended up opening the WAD file by right-clicking and using Open With Zandronum. This gave me the hardware or software option, and I picked hardware, which fixed it.

As for the second issue (if anyone wants to do what I did), I simply used the following:

pointlight FlashLight
{
color 1.0 1.0 1.0
size 128
offset 0 16 0
}

object DoomPlayer2
{
frame PLAY { light FlashLight }
}

Post Reply