PDA

View Full Version : Technical Aspects



Shrykull_the1st
18th Dec 2008, 18:29
I'm very interested in game programming, however what I know is very little. So I'm trying to understand a few things.

Take a game like Ratchet and Clank or Jak and Daxter, the vision range you have in those games is immense, you can see a building that is "kilometers" away! Why is it that the same doesn't happen in LoK games sometimes?

And another thing is why some buildings/trees/objects appear and disappear when you change the camera angle??

blincoln
18th Dec 2008, 21:53
There isn't a short answer, but it depends on how the game is designed.

With any 3D game, you obviously have a cap on the number of polygons and textures and whatnot based on the hardware where the game is running. The developer can choose to distribute those polygons between close-up and distant objects to give a view like you describe, with the tradeoff being that the near objects aren't as detailed as they could be if the distant objects weren't shown at all.

The most straightforward way distant objects are done is by having a range of different "level of detail" versions for each model (or dynamically generating them from the original). So the objects that are very far away are greatly simplified, but because they are so small on screen you wouldn't be able to see the details anyway.

There are other methods, like forced-perspective, which is borrowed from film-making. Defiance uses this in several places (Avernus burning in the distance, etc.) Basically the "set" is arranged so that within the range of certain angles, the 2D appearance on your screen makes it look as though certain things are a lot farther away than they actually are. If you use the camera control codes to move close to the burning Avernus, you'll see that it's actually pretty close to Kain, but sized to trick your eye. In that case it's also the videogame equivalent of a matte painting, so the geometry is very simple.

Shrykull_the1st
18th Dec 2008, 22:14
Yeah that idea I sort of had. Thanks for the explanation!

However, what about the second question? Can you understand what I mean?

blincoln
18th Dec 2008, 23:00
There are a bunch of reasons that might happen. This is not all of the reasons :).

If you're very close to the object, you might end up with the camera inside of it. 3D game objects are usually only visible from the outside.

3D game engines have lots of optimization to prevent things from being drawn if they aren't within the field of view. If the game "thinks" you can't see something (even though you can), it could disappear for that reason.

It could also be related to the level-of-detail stuff I mentioned before. E.g. changing the camera angle slightly puts the objects outside of the range to be drawn.

Shrykull_the1st
18th Dec 2008, 23:35
Hmm thanks! I'm guess I'm starting to understand now...