What happens when an explosion goes off in Rainbow Six Siege? What factors go into calculating explosion damage? How does it all work?
Explosions play a major role in the gameplay of Rainbow Six Siege. They don’t just go boom – they open defenses, create pathways, provide intel and utility, and sometimes they help you get the W. In this Dev Blog we’ll be diving a bit into how explosions work, and how we want them to evolve.
Destruction in Rainbow Six Siege is unique, and explosions never happen the same way twice.
The damage and destruction that happens once an explosion goes off is calculated in a matter of milliseconds. Players will receive visual and audio cues, and take damage if they are caught in the blast. To make all this possible, our explosion engine must go through several steps.
Each type of explosion is defined by multiple data points, and this determines the shape of the explosion and the radius of its effects. Explosion shapes vary depending on the type of explosive – a frag grenade is radial while a claymore is oblong.
When an explosion occurs, the game takes the explosion shape and sends a query to our physics engine. Then, using the origin of detonation and the explosion shape, the query returns with a list of entities (operators and objects) present in the blast radius. This list is our list of potential entities to be affected by the explosion.
With the list of potential entities from within the blast AOE, our physics engine executes raycasts. These raycasts are exploratory lines that travel outward from the epicenter towards any entities and their query points within in the blast radius.
Each entity has many individual query points that are used to determine whether or not damage is taken. Instead of targeting the bones in the model skeleton or setting an arbitrary single target point for an Operator, these query points let us better decide if an Operator should be vulnerable to blast damage while still optimizing performance and minimizing latency.
The raycasts target these query points based on specific parameters and create data points to later calculate damage output. For example, raycasts will target the closest points on an Operator’s physics capsule to the explosion origin as well as 4 points on their bounding volume (the shape that encompasses the Operator’s visuals), while raycasts will target query points of a wall using a different set of rules.
Before the damage is calculated, one more variable comes into play. Environment objects change elements of the blast shape and potentially save you from damage.
Once the raycasts have completed their journey towards entities affected by the blast, the returned data determines the outcome of the explosion. In Siege, there are objects that can block explosion damage. All objects contain metadata that define what it is, and how it interacts with other elements in the game. Certain objects contain metadata that block explosion damage, such as metal barricades, castle walls, deployable shields, etc.
If the raycast path collides with an object that has the metadata to block explosive damage before reaching the query points on an Operator in the blast radius, you are safe. If the raycast hits nothing, or objects without metadata to block the damage, you take damage. This also applies to gadgets with an AOE explosive effect, such as Thatcher’s EMP.
Finally, with all these data points, explosion damage is calculated and executed.
When calculating damage output, there is a drop-off in damage the further away you are from the epicenter of the blast. Different explosions have different damage curves, with the greatest damage output usually at the origin. Using the results of the raycasts, final damage output is determined by interpolating the damage curve with respect to your distance from the explosion.
Explosions in Siege are executed by our destruction engine, Realblast. It is a procedurally generated destruction system that is core to upholding the unique and dynamic gameplay elements that you know and love in Siege. You can watch a GDC panel by Julien L’Heureux on Realblast here.
Explosions commonly have two effects – destruction and damage. Damage deals damage to players and destruction is what causes any environmental destruction. Each can have varying ranges and shapes depending on the explosion.
Currently in Siege, after the initial raycast exploration and queries are returned, we determine the range of the damage and destruction effects. If the raycast runs into a blocker, the damage range is limited to the realblast radius.
However, the current solution for explosive effects and ranges is not ideal as in some cases it can make the outcome of the explosion unrealistic. For example, under the current explosion system, a C4 out in the open is far more lethal than when used inside a building due the walls which can cap the damage radius.
With Y5S1 we will be making some subtle but important improvements to explosions that will make explosion damage more realistic and transparent. We will be introducing a Shrapnel concept into explosions in Rainbow Six Siege. This means destructible objects will no longer limit the range of explosion damage, thereby addressing the problem of destruction vs damage range described above.
Shrapnel will allow explosion damage to be more realistic as damage that is applied to the player will be reduced based on the number of destructible objects the raycasts hit along the way. Explosions will also be more transparent as shrapnel holes will provide much more visual feedback on the direction from which the explosion damage originated.
The art of destruction in Rainbow Six Siege is a one-of-kind experience that promotes realistic results and reactions. The addition of Shrapnel damage will be an improvement towards more realistic explosion effects and damage, as well as making feedback from explosions much more visual and transparent.
To learn more about Explosions and Shrapnel, check out the Logic Bomb Podcast’s exclusive first look and discussion on the changes:
Kompletter Artikel: DEV BLOG: EXPLOSIONS & SHRAPNEL IN Y5S1