[Added] Spotlights

Moderator: GZDoom Developers

Spotlights

Postby Nash » Tue Jan 09, 2018 9:57 pm

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
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Spotlights

Postby Rachael » Fri Jan 12, 2018 5:27 pm

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
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Spotlights

Postby Graf Zahl » Fri Jan 12, 2018 6:36 pm

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
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Spotlights

Postby Gutawer » Fri Jan 12, 2018 7:16 pm

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
Gutawer
User Accounts Assistant
 
Joined: 16 Apr 2016
Discord: Gutawer#3431

Re: Spotlights

Postby Graf Zahl » Sat Jan 20, 2018 1:10 pm

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
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Spotlights

Postby Rachael » Sat Jan 20, 2018 1:12 pm

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
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Spotlights

Postby Major Cooke » Sat Jan 20, 2018 1:15 pm

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
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Spotlights

Postby Rachael » Sat Jan 20, 2018 1:17 pm

That was something Randi put in to allow ACS_Execute specials to call a script by name in UDMF.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Spotlights

Postby Graf Zahl » Sat Jan 20, 2018 1:50 pm

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.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Spotlights

Postby Gez » Sat Jan 20, 2018 2:56 pm

SLADE 3 supports hex color properties, too.
https://i.imgur.com/ON2QEVH.png
Gez
 
 
 
Joined: 06 Jul 2007

Re: Spotlights

Postby Nash » Sun Jan 21, 2018 5:00 pm

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
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Spotlights

Postby Graf Zahl » Sun Jan 21, 2018 5:02 pm

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
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Spotlights

Postby AFADoomer » Tue Jan 23, 2018 9:38 pm

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
AFADoomer
 
Joined: 15 Jul 2003

Re: Spotlights

Postby Major Cooke » Tue Jan 23, 2018 10:39 pm

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

Either that, or you need to give a target to it.
User avatar
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Spotlights

Postby GiveOneMoreChance » Wed Jan 24, 2018 8:00 am

Not shure for full correctly code, but it works:
https://drive.google.com/open?id=1CPdYR ... K4KeweSTlW
GiveOneMoreChance
 
Joined: 10 Aug 2017

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: Google [Bot] and 2 guests