What causes clipping in video games?

140 views

And more importantly will consoles ever become powerful enough that it won’t occur anymore? For me it’s the biggest breaker of immersion.

In: 2

4 Answers

Anonymous 0 Comments

When body A is not in contact with body B, it’s very easy to compute the behaviours of body A and B.

Contact between them, however, is incredibly hard to calculate.

This is why the biggest give-away of CGI, apart from lighting, is the detail of the physics of *contact* between two bodies. Softness, hardness, complex friction. These are the things that are simply really hard to calculate because things are *complicated*. Human beings are made of a great deal of different materials connected together in complex ways.

Will consoles ever become powerful enough that it won’t occur anymore? That depends mainly on the productivity of chip foundries. The answer is probably “yes, but only after a fairly hefty revolution in which we rebalance wealth distribution significantly”. The average gamer doesn’t have the resources to afford enough computing power at the moment. That will eventually change.

Anonymous 0 Comments

Clipping occurs whenever the game engine would put two different models inside of each other. The reason this happens is because the logic controlling what models go where is usually very complex, and it’s not generally feasible to prevent it from happening. More powerful consoles able to calculate more precise physics might reduce some clipping, but it’s more of a general design issue. For instance, if a game lets you mix and match different armor sets, artists would have to be very careful to design armor so that no two pieces overlap with each other in any possible animation. They could make it so that pieces that would clip couldn’t be worn at the same time, or so that animations change to prevent pieces from clipping, but both of those might be bad for gameplay (in addition to being very difficult from a computational point of view), and most players and developers prefer good but ugly games to bad but good-looking ones [citation needed].

Anonymous 0 Comments

Video games will do exactly what the coder told it to do, not what the coder meant.

If they didn’t remember to specifically tell the game that a character’s coat shouldn’t go through the back of their chair, then it’s going to do that. If you didn’t tell it that the hat is supposed to go over the hair and not through it, you end up with overlapping hat-hair.

When it occurs with, say, a mod, it’s often just because the modder added in something the game wasn’t designed to account for. Like the mod for Skyrim that adds capes: the game wasn’t designed with cloaks and capes in mind, so there’s nothing in the code that says that your feet shouldn’t go through the cloak model.

Physics simulations are difficult and don’t happen by default, they have to tell the game how to handle it. The game doesn’t know a piece of cloth apart from a plank of wood so it can’t tell you how it should behave if you haven’t told it.

And even then, detailed simulations slow the game down a lot. So you make simplifications. You tell it to treat the human player model as if it’s a cuboid, and most of the time that’s good enough. But it’s not going to be an exact fit: if it’s slightly bigger than the player model, then the player will bump into things that they shouldn’t. If it’s slightly smaller, they’ll clip through things they shouldn’t.

But it still makes sense. If you know the situation where it becomes relevant only happens for 1% of gameplay time, and only 1% of players will notice it anyway, but it saves you many days of work… that’s a pretty easy sacrifice to make.

Anonymous 0 Comments

Most collision detection in games is done with hitboxes. These are invisible boxes that form an outline of any object for which collision may be possible – walls, trees, player character etc. The game runs a clock and every “tick” it checks the state of moving objects to see if they clip into another object, and respond accordingly (eg. stop movement, reposition the object, rebound etc). This physics clock usually runs a bit faster than the game’s frame rate.

The reason hitboxes are used instead of the actual geometry of the model/sprite is because calculating collision and physics in general is processor intensive, so it needs to be simplified as much as possible. But because the hitbox does not follow the exact outline of the object, you end up with some extremities clipping through solid objects, or having collisions with empty space. That simplification can also includes not doing collision detection at all on things like hair, grass, loose fabric, held objects/weapons, certain frames of an animation, long decorative parts of a costume, etc.

But the thing is hitboxes work well 99.99% of the time so there isn’t much incentive to move away from it, even if 20-30 years from now we had processors capable of doing physics calculations fast enough on the geometry. And if we did there would be some cases where it still wouldn’t work, like if you exploit a bug that makes you go so fast you can pass through a solid object faster than the physics tick rate can detect it and stop you.