Spotlights

Moderator: GZDoom Developers

User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Spotlights

Post by Nash »

I am making this feature suggestion thread to increase its visibility and a possibility for discussion and review (most of this stuff happened on Discord; hard to keep track).

dpJudas implemented spotlights a while back on this branch: https://github.com/dpjudas/dpDoom/tree/spotlights

Currently a pending issue is, some UDMF properties had to be added because there aren't enough args to customize the spotlight, and even if there were - the args are ints which is useless for the inner and outer angles of the spotlight (it requires floats for precision). This warrants some discussion with the UDMF bosses, basically to confirm if this is cool or no-go.

Here's a short video of it in action. Unfortunately, I was not able to make a test map due to lack of WYSIWYG support in GZDB (already notified ZZYZX but I think he's a little busy)... without being able to see what the spotlights look like in the editor, map creation is VERY annoying. :(

User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Spotlights

Post by Rachael »

https://github.com/coelckers/gzdoom/pull/404

When dpJudas originally made this, he made it before the UDMF properties for FriendlySeeBlocks were created. As such, this pull request resolves the conflicts that are created when merging both UDMF additions together.

Unfortunately, that means this pull request cannot be rebased as per normal practice, and must be put in as a complete merge commit, or squashed.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Spotlights

Post by Graf Zahl »

I don't really like the two new properties. This is not how UDMF should work. We still need to think about a bettwr way to allow classes to have custom content in UDMF.
User avatar
Gutawer
Posts: 469
Joined: Sat Apr 16, 2016 6:01 am
Preferred Pronouns: She/Her

Re: Spotlights

Post by Gutawer »

I'm in agreement there - I mainly added them as properties as a temporary thing while you were away so they could be reviewed, because I completely agree that it's not a particularly great way to do it. It would be nice if the args system could be extended to allow for more arguments with more types, but I'm not sure how ambitious that is, and there may be a better way anyway.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Spotlights

Post by Graf Zahl »

Regarding the new properties, the only better thing I can come up with is to put the entire RGB color into one arg. But that's only ok if the editors can use hex numbers there. So what's the state there?
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Spotlights

Post by Rachael »

It can be done. GZDBBF supports hex entries already, so it'll be a cinch to compress args1-3 into a single arg1str for just spotlights. That even allows it to use the colour picker directly, if I remember correctly.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Spotlights

Post by Major Cooke »

They can handle hex colors. And Rachael is correct, it has the color picker when selected.

https://puu.sh/z5Pem/ff723b414a.png

(ninjad)
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Spotlights

Post by Rachael »

That was something Randi put in to allow ACS_Execute specials to call a script by name in UDMF.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Spotlights

Post by Graf Zahl »

The color picker is for the thing's color property used by render style stencil. Nevertheless, I'd prefer to keep the editable data of the light in the args so that modifying them at run time is easier.

I think the best course of action is to use arg1 as RRGGBB then and arg1str as a textual representation for the color. Maybe even allow using arg1str for the existing lights as well so that the X11R6RGB lump can be used here, too.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Spotlights

Post by Gez »

SLADE 3 supports hex color properties, too.
https://i.imgur.com/ON2QEVH.png
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Spotlights

Post by Nash »

Noticed that part of this has been added into master, but how do you set the spot inner and outer angle from the editor? Args 4 and 5?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Spotlights

Post by Graf Zahl »

Args[0] is the full RGB color, Args[1] is the inner and Args[2] is the outer angle.

Alternatively you can set arg0str to a color name, this will also work for regular lights.
User avatar
AFADoomer
Posts: 1322
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: Spotlights

Post by AFADoomer »

Can someone post a demo map of these in action?

So far I have been able to define a spotlight in GLDEFS and link it to an actor, which works, except that it ignores the actor's facing angle.

I have had absolutely no luck in placing these in-editor... I place thing 9840, set arg 0 to an arbitrary hex RGB color converted to decimal, set arg1 and arg2 to another value (say, 10), load the level, and nothing's there. Likewise, trying to create an actor that inherits from Spotlight, and sets the inner/outer radius properties doesn't seem to work either...

I'm assuming user error at this point, but I don't know what I'm doing wrong.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Spotlights

Post by Major Cooke »

Does changing it to a raw hex value work? I.e. "FFFFFF"

Either that, or you need to give a target to it.
GiveOneMoreChance
Posts: 19
Joined: Thu Aug 10, 2017 8:09 pm

Re: Spotlights

Post by GiveOneMoreChance »

Not shure for full correctly code, but it works:
https://drive.google.com/open?id=1CPdYR ... K4KeweSTlW
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”