Useful for room shapes which cannot be handled by standard visibility
checks.
Normally this can be addressed with additional rooms and doorways, but
sometimes a room is required to be a complex shape (for example, to
accomodate animated static geometry).
These instances should be few and far between, so leaving this as an
opt-in feature that can be used during level authoring.
Standard culling is quite coarse, for performance reasons:
* Only uses axis-aligned bounding boxes
* One visible object in a BVH node will make all others in the same node visible
These properties allow the bounding boxes of rotated objects to clip through
the back of portals to be considered visible, causing improper rendering.
This commit introduces a new optional argument for `@static` level
objects: `precise_culling`. Static geometry marked for precise culling
will be culled based on its exact (i.e., rotated) bounding box, in the
same way dynamic/animated geometry is.
Precise culling is more expensive than standard culling so it is opt-in.
It is intended only for the few situations that can hit the edge cases
described above.
* started on chamber 15
* fizzler width can now be scaled via blender object's scale.x
* fix fizzler rendering radius (remember, fizzlers are per default 2x2, still their internal width height was 1x1?)
* chamber 15 first room functionally complete
* chamber 15: first room decor
* finished first room of chamber 15
* test chamber 15 second room WIP
* chamber15 hallway from room 2 to room 3 (WIP) and more progress on room 2
* test chamber 15: added observation room to room2, added voice lines add the beginning
* test chamber 15: finishing room 2
* enable "new game" menu entry for chamber 15 & boot into the intro menu again instead of straight into chamber 15
* Start on shamber 15 hazard hallway
Hallway is modeled with collision. No platforms.
* Decals and platform + light cutouts for chamber 15 hazard hallway
* Animate one moving platform in chamber 15 hazard hallway
This one animation is ~19 KB. Look at optimizing.
* Add material for water hazard wall
* Use water hazard wall material in chamber 15
* Start modelling final room of chamber 15
* Chamber 15 final room - side rooms
* Chamber 15 final room - pistons and exit
* Chamber 15 final room - observation room
* Chamber 15 final room - ball launcher and catcher
* Chamber 15 final room - ball trap and indicator lights
* Chamber 15 final room - ball trap doors
* Chamber 15 final room - collision
* Chamber 15 final room - animations and triggers
* Chamber 15 - escape hatch
* Chamber 15 - finish final room
* Chamber 15 - start on room 3
* Chamber 15 - main room 3 layout and collision
* Fix UV translation
Do not translate minimum coordinates, otherwise the translation will be
cancelled out.
* Chamber 15 - room 3 stair room
* Chamber 15 - room 3 dividers and ball launcher/catcher
* Chamber 15 - room 3 finishing touches
* Observation room decor
* Triggers
* Indicator lights
* Decals
* Chamber 15 - merge beginning and end
* Chamber 15 - fix room boundaries
---------
Co-authored-by: Deconimus <pascal.sielski@gmx.de>
Co-authored-by: Deconimus <Deconimus@users.noreply.github.com>
When determining room visibility, the camera's frustum was previously
used for all recursive doorway checks, meaning rooms were considered
visible even if they were occluded. With the right level and camera
angle, all rooms could be considered visible at once.
Now, for each recursive check, a new frustum is created from the previous
doorway's bounds.
This helps significantly in larger levels, but there is still room for
improvement. Each new frustum is not clipped to the previous, and so it
is still possible for unseen rooms to be included.
It's important to consider performance here. Some checks may be too
expensive for realtime. At a minimum, a worthwhile improvement is to
precompute at compile time which rooms are potentially visible from a
given room. At runtime, other rooms can be quickly skipped.
Removes multi-bone animation dependency on bone order for audio, and
allows the sound to play as long as one bone is still moving. The center
is also a more natural sound position.
This is needed for the chamber 14 stairs.
This allows collision brushing up against portals to close them, such as
the stairs in chamber 14, making it more difficult to get underneath.
Dynamic collision part of the same animation as the portal is excluded.