Hatred
Not enough ratings
[Hatred] Mod Guide #3 | How to make walls and roofs disappear
By DC_vipeout
This guide explains how to setup visibility for different floors. Using our system you may set up much, much higher buildings than we have!
   
Award
Favorite
Favorited
Unfavorite
Introduction
Hi again, this time I'm explaining how to work with our floor visibility system. Igoreso (the author of Blackout mod) had an issue where one of his regular walls was blocking far too much vision, especially since he has removed the overlay on characters and that his level is very dark. Our system is flexible enough to allow hiding even a single actor regardless of it's position. Therefore, let's proceed.

As always, links to nearby guides:

<< Previous Guide | Next Guide >>
Volume activation rules
In order to do something well, you need to understand how it works. I know you can just memorize history without realizing the connections and pass the exam, but that's not how it works with game development. Things get complex real fast.

The system detects where the player is and where the cursor position mapped into the 3D world is. Then, taking those 2 variables into account it checks whether there is any 'Hatred Hide Volume' that is either below or above those positions in world space. Possible scenarios:
  1. The position has at least one volume above it: All the actors that this volume is responsible for will be hidden and all the volumes above this volume will be activated as well (meaning they will hide their actors as well).
  2. The position has any volume below or is inside: The volumes will not be activated and if they have been activated, they will be deactivated, meaning actors will not be hidden.
Long story short - floors above are hidden, floors below and the one you are on are shown. Definition of a volume being above the position:
  1. It is directly above the position
  2. The volume's shape touches or is above a volume that is directly above the position
The second case helps when floors aren't shaped exactly the same, as well as makes it easier to use - you don't have to perfectly per-pixel-shape every single hiding volume.
Which actors the volume is responsible for
How does a volume know what actors to hide? Upon level load it does a check and stores references to every actor that has it's pivot point inside the volume. That is the base that each volume has. Where is the pivot point? Click the actor and see where the move/rotate/scale widget is (often also called transform widget).

Pivot point is where the white sphere is and those 3 axes meet. Next, there are several arrays inside the volume's Details Pane that you can use to tweak it's behavior.
  • Actors Always to Hide - regardless of what happens, these actors are to be hidden forever (except for cinematic executions cameras). Pivot point ignored, added here means volume is reponsible.
  • Actors Always to Show - regardless of what happens, these actors are to be shown forever (for example floors, so you never walk in the air). Pivot point ignored, added here means volume is reponsible.
  • Overlapping Volumes - on top of the logic that defines such volumes described in the previous section, you may add more of them here
  • Inside Meshes - this is the array that is filled upon level start, but if there is an actor that does not have a pivot inside the volume and you want it to work with this volume then simply add it here. We used it for custom meshes that were perfectly prepared for the map, because they had their pivot point in 0,0,0. Also, sometimes a lamp or something was a little bit higher and for some other reason we did not want to make the volume bigger. Pivot point ignored, added here means volume is reponsible.
  • Phys Meshes - do not use please. We will make it unavailable next patch.
  • Always Hidden Meshes - do not use please. We will make it unavailable next patch.

What do we do with ceilings? We never hide them. Ceilings are a 1-sided plane with material on the side that you do not see when viewed from above. We never add them in those volumes, but should they coincidentally be inside one of those - don't worry, the volumes unhide everything when the ceilings are visible - during cinematic executions.

Note: If you want to add actors to those arrays, those actors MUST BE on the same sub-level as the volume. This is a rule for every kind of actor-to-actor references. To move actors betweem levels you have to select a proper sublevel (you click an actor and press 'M' to move to selected actor's sublevel) and then click the actor you wish to move to your current sublevel (displayed in the lower right corner of the viewport) by clicking on it and pressing CTRL+M. Save, because if you fail to do so and it crashes you will have duplicated actors which is something nasty to figure out.