I’ve learned that video game ‘clipping’ is caused by high velocity, thin colliders, and too-slow physics updates. Why are terrain surfaces in most 3D video games paper-thin? Why isn’t terrain given extra fill/thickness inside and under it to prevent ‘falling through the map into the void’?

2.75K views

I could see why you might not want to fill under the terrain in a game that features things like underground caves, but thin terrain seems to be present in a huge majority of 3D games (even those without underground features) and is not engine-specific. Why is terrain almost always a fragile piece of origami that’s so easily punctured?

In: Technology

39 Answers

Anonymous 0 Comments

First of all I’d like to add a quick explanation as to *why* high velocity colliders clip through surfaces.

Consider this:

Bullet (usually a prime example): o
Wall: |

These are the colliders of these two objects. What you usually do is check if the circle overlaps the line (the surface). What might happen though is this:

Frame 23: o |
Frame 24: |o

In frame 24, we check for an intersection… but the bullet already went past the wall, so these simple (aka efficient) calculations couldn’t see that it went *through* it. So RIP collision.

There are of course solutions to this problem, a common one is to extend the collider: each frame, we make a big one that contains both the collider in frame 23 and the one in frame 24, like so:

Frame 23: o |
Frame 24: |o
Check: Ϲ═╪Ͻ < please pretend it’s a capsule

There we go, now we have an intersection, good job us. Of course this is overly simplified, but that’s the idea.

The real algorithm is slighly more complicated and this additional “complication” makes it fairly more expensive than our first strategy where we only check the single collider, so we can’t use it everywhere, we only use it for fast moving, small objects.

Since the player shouldn’t be either fast nor small enough to completely pass through the terrain in one frame, expecially since in most cases the player is taller than wider and… you know… you fall vertically of course… you avoid the more expensive strategy as it shouldn’t be necessary.

You are viewing 1 out of 39 answers, click here to view all answers.