Advanced Visibility Filtering

Moderator: GZDoom Developers

Post Reply
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Advanced Visibility Filtering

Post by The Zombie Killer »

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Advanced Visibility Filtering

Post by Graf Zahl »

The most important issue: It's missing savegame compatibility handling.

Aside from that: I absolutely don't like how this IsVisibleTo... feature works in general as it necessitates some very expensive checks in the rendering loop.
I already had to disable it for dynamic lights in GZDoom where it wreaked havoc with the CPU instruction cache.

Since this value is tested so often it might make sense to precalculate it when any of the settings for rules change, and store it in a member variable in AActor. That way the expensive check in the renderer can be replaced with comparing a single variable.
User avatar
Nash
 
 
Posts: 17484
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Advanced Visibility Filtering

Post by Nash »

FDARI wrote:
For those who want to filter one actor so that only master sees it, and one so that only master does not see it, who also happen already to have this particular actor as an activator at some point in an acs script:

Code: Select all

SetActorProperty(0, APROP_VisibleFilter, AAPTR_MASTER);

Code: Select all

SetActorProperty(0, APROP_VisibleFilter, AAPTR_MASTER);
SetActorProperty(0, APROP_FilterHides, true);
The FilterHides stuff doesn't work. Using FDARI's own example quoted above, the first code snippet works, but the second one does not (it just acts the same as if the first code, not in reverse, as one would expect). Does not work both when done using ACS as demonstrated in his post, or when using +FILTERHIDES on the actor.

Example files:

Filter Test A: medikit will ONLY be visible to ME but not other players (works)
https://www.dropbox.com/s/ls6xh6kc4rtqa ... A.pk3?dl=0

Filter Test B: medikit is supposed to be visible to everyone EXCEPT me (does not work)
https://www.dropbox.com/s/mrxycnt590xez ... B.pk3?dl=0
User avatar
Jaxxoon R
Posts: 772
Joined: Sun May 04, 2014 7:22 pm

Re: Advanced Visibility Filtering

Post by Jaxxoon R »

I could see this being very useful if it were uh... "fixed up," if you will. Like for first-person legs and such.
User avatar
Major Cooke
Posts: 8205
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: Advanced Visibility Filtering

Post by Major Cooke »

I can only think of first person legs being done with ACS HudMessage truthfully, unless you're talking models.

If you mean by models, there's one unfortunate side effect. When turning, they tend to jitter horribly. Not to mention there's no interpolating a player's headbob, though I imagine that's more for modders wanting to make doom 3 bfg flash warps that stick to the gun as an external actor.

Sprites are also somewhat complicated to deal with for first person limbs. Mainly because part of the time, depending on positioning, looking straight down can cause the legs to disappear. Quite tricky stuff to work with.
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Re: Advanced Visibility Filtering

Post by The Zombie Killer »

That was a really weird bug. FDARI's code for checking FILTERHIDES was the wrong way around. It checked the player it was meant to hide from, rather than the actor that hides.
Fixed, committing now.
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Re: Advanced Visibility Filtering

Post by The Zombie Killer »

This can be closed, I've thought of a better way to handle this
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”