https://github.com/rheit/zdoom/pull/474
Pull request version of http://forum.zdoom.org/viewtopic.php?f=34&t=31497
Advanced Visibility Filtering
Moderator: GZDoom Developers
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Advanced Visibility Filtering
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.
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.
Re: Advanced Visibility Filtering
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.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);
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
Re: Advanced Visibility Filtering
I could see this being very useful if it were uh... "fixed up," if you will. Like for first-person legs and such.
- 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
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.
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.
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Advanced Visibility Filtering
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.
Fixed, committing now.
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Advanced Visibility Filtering
This can be closed, I've thought of a better way to handle this