Talk:PVS

From Valve Developer Community
Revision as of 00:26, 16 February 2011 by MossyBucket (talk | contribs) (Directed links.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How about Perceptible Visleaf Set as it seems to be used for the 'perceptual field' of an NPC ? Also, I get the feeling that PVS includes 'audible' stimuli as well as 'visible' stimuli ? --Beeswax

It's logical that an NPC would only check visibility for entities within its PVS, but that doesn't mean the acronym changes. :-p No need to add another variation. What I will do is update the article to reflect the fact that entities can have PVS too. --TomEdwards 10:50, 27 Feb 2008 (PST)
So you don't want to hear about Panoramic Visleaf Set to differentiate PVS from LOS cones, Potential Visual Stimuli for PC-NPC equal rights, or even just the more intuitive Probably Visleaf Stuff ? ;-) --Beeswax
So if I've got this right, PVS is used in 3 contexts:
1. In the GUI Rendering-process PVS is used as a 'spatial' filter applied before Z-buffering. (Does this mean a PVS can 'see' - or better 'hear' - around corners ?)
PVS isn't used for the interface, unless I'm very much mistaken. --TomEdwards
I've probably not stated it very well, but [1]. (There seems to be an obvious correlation between Z-buffering (ray-tracing) and LOS) --Beeswax
Photoshop paintings and web pages have z-buffers too. Doesn't make either 3D. :-) --TomEdwards 13:35, 28 Feb 2008 (PST)
Erm, yes it does ;-) --Beeswax 08:06, 5 Apr 2008 (PDT)
2. In Optimization (level design) PVS refers to a particular group or set of visleafs which can be seen from a given visleaf. ie the PVS includes the 'occupied' visleaf, plus any other visleafs that can be seen by an LOS from the occupied visleaf. (See Ralph van Hoorn's excellent explanation of visleafs)
I tweaked your second point a little instead of repeating it here. --TomEdwards -- Agreed :) --Beeswax 13:13, 28 Feb 2008 (PST)
3. In NPC AI the NPC's PVS (Potentially Visible Set) is the spatial area (measured in visleafs) that is potentially visible to the NPC from his current location (ie the visleaf he is in). If another entity (usually a Player or NPC) enters this area the NPC will test for LOS (Line of Sight). If the LOS test finds the intruder the NPC reacts accordingly. NPCs may also "Think outside PVS" by using the NPC memory feature(?). In contrast to the NPC's LOS (Line of Sight), PVS is not restricted by props and func_detail brushes, or the direction in which the NPC happens to be looking.
4. In NPC AI, the NPC's PAS (Potentially Audible Set) is the spatial area (measured in visleafs) in which sound sources are potentially audible to the NPC. Unlike Vision, Hearing is not limited to a directional Viewcone.
Note:stop press! updated following discovery of PAS in BSP compile log! --Beeswax 08:06, 5 Apr 2008 (PDT)
As for point three, an NPC is indeed aware of all entities inside its PVS but will only respond to ones it can sense normally. "Thinking outside the PVS" means that it tests all entities in the map (or possibly a given radius), not that it can "see around corners". :-) I don't know how smell (or sound) works at all, but I suspect it seeps from leaf to leaf or just ignores them entirely. --TomEdwards 23:57, 27 Feb 2008 (PST)
I'm fairly confident now that I grasp what a PVS is - the group of visible visleafs for a given map location. However I still have so many questions about PVS and NPC AI that I'm going to start a discussion over at Talk:NPC_Sensing - which seems a more appropriate place. I hope anyone reading this will drop in - there will be cake ;-).

fgd references to PVS

  • BaseNPC "sleepstate" choices
  • 0 : "None"
  • 1 : "Waiting for threat"
  • 2 : "Waiting for PVS"
  • 3 : "Waiting for input, ignore PVS"
  • 4 : "Auto PVS"
  • 5 : "Auto PVS after PVS"
  • BaseNPC spawnflag : 1024: "Think outside PVS" : 0
  • func_detail : "Detail brushes do NOT contribute to visibility in the PVS."
  • func_reflective_glass : "have 1 reflective glass in your view frustum ( + pvs ) at a time."
  • ai_script_conditions : ActorInPVS(choices) : "Actor in Player's PVS ... Checks that the actor is in the player's PVS"
  • item_dynamic_resupply : "A dynamic item. When the player enters the PVS of this entity, it will determine the item most needed by the player, spawn one of those items, and remove itself."


Compare NPC's PVS and LOS

It may be helpful if the Glossary definitions explicitly draw attention to the difference between PVS and LOS?

  • eg LOS is a directional "Cone of Awareness" like a spotlight, and is effectively 'raytraced'.
  • eg PVS is an omni-directional "Zone of Awareness" like a candle flame, and is based on visleafs. --Beeswax 13:13, 28 Feb 2008 (PST)