Skip to content

Documentation

WatIsDeze edited this page Apr 23, 2024 · 7 revisions

This page is not an actual list of all features. Instead it is a list of documented newly added features.

Collision Model Materials

The Collision Model Materials are separated from the Refresh Materials and target the physical contact influences between entities and the specific material. By default the suggested BSP compiling toolchain, ericw-tools development branch, allows for each texture to have its own .json_wal companion in order to compliment non '.wal' textures with. (For ericw-tools it allows us to store content/surface flags with that normally would reside in the .wal).

Q2RTXPerimental builds and expands on these files by adding support for the the following additional keys:

  • physical_friction expected to be a float value specifying the friction to apply during physical callback related code.
  • physical_material_kind expected to be a string value specifying the material kind name by which it is grouped by.

EAX Reverb Effects

A newly added resource type that applies to OpenAL audio mode only. It allows for describing EAX Reverb Effect properties which can be set for use by the client game's code. By default, the local entity client_env_sound should be used hand-in-hand with these files. See the Local Entities section for more information about that. As for preset eax .json files, please see the baseq2rtx/eax folder. The only two effects that are not loaded from file, but are hard-coded instead, are the default and the underwater EAX Reverb Effect types.

Local Entities

The Local Entities from now on refered to as lents are specific to the client's local game process only. Their current usage serves for local needs such as client_env_model for decorating purposes, and client_env_sound for EAX reverb effect areas. As such they do not fill up space in a network packet, and are generally not related and/or controlled by any server game code either.

client_env_model

Currently KISS, but in general if you are using this project, you are likely capable of expanding it to your needs in a matter of minutes. It comes with the following key/value fields:

  • model : A string path to the model that will be set for display.
  • frame : The numerical frame of the model to display.
  • skin : A numerical index to the model's skin to display.

client_env_sound

To be used by placing in specific regions, assigning the boundary`s radius and ``reverb_effect_id``. The client game logic will automatically determine which ``client_env_sound`` entity it is closest within range of and will LERP from the current specified Reverb EAX Effect into the newly found, nearest distance based Reverb EAX Effect instead. It comes with the following key/value fields:

  • radius : A floating point number describing the radius of when to start clip tracing to the client entity with for testing validity.
  • reverb_effect_id A numerical index pointing into the client game's precache.cl_eax_effects array.

Refresh Materials

Graphical Material Content Pipeline

Each PBR based material in Q2RTXPerimental has its roots in the baseq2rtxp/materials/*.mat file(s). These are currently parsed during boot time. They contain entries which are matched to the BSP's surfaces' texture name and override it with the material's own properties. This allows for neatly configuring how the renderer should treat the surace as.

The albedo/diffuse texture can be set by the texture_base key pointing to the full path starting from the game`s root directory. The ``Alpha Channel`` of this texture defines the material's ``roughness``. The ``normals/metalic`` texture can be set by the ``texture_normals`` key pointing to the normals file in similar fashion as the ``albedo/diffuse`` texture. The ``emissive`` properties of a material can be defined by either applying an emissive texture using the ``texture_emissive`` key, or automatically generated one by use of the ``synth_emissive`` key.

Although slightly outdated, there is a more thorough explanation about the PBR content pipeline in general found in the Steam Community, here.

New Material 'KIND' Types

The following extra material kind(s) are now possible:

  • UNLIT: self explanatory

New Additional Render Flags

  • RF_NOSHADOW: can be applied to Regular Model entities as well as to Brush Model entities.
  • RF_OLD_FRAME_LERP: force model to lerp from oldframe in entity state; otherwise it uses last frame client received.
  • RF_STAIR_STEP: used to handle stair steps for monsters on the client side in order to LERP them.