Distant 3D object rendering [games]

后端 未结 8 712
既然无缘
既然无缘 2021-01-31 12:45

What is the basic premise behind technology such as is found in Oblivion (and other games, I\'m sure; haven\'t played enough to know), wherein objects from afar are vaguely show

相关标签:
8条回答
  • 2021-01-31 13:00

    A few techniques, including the ones you've mentioned:

    • Level of detail. Outlined above.
    • Mipmapping. For textures.
    • Field of view. Restrict how many things your camera can 'see' by picking an appropriate zoom level. See also view frustrum culling.
    • Far-clipping plane. Occlusion of far-off places: most games use fog, mountains, or some other excuse to have a hard cut-off on how far away you can see. This can be implemented using octrees, or some other such technique. This may be based on whole objects, or polygons, or whatever, and is usually set to occur right behind those aforementioned mountains.
    • Arenas/levels/areas/whatever -- again most games artificially restrict you to playing in one arena at a time; the benefit is obvious (you get to ignore objects in all other arenas)
    • Pre-rendering -- this is what you're suggesting above. For static scenes that are far off, render the scene in a 'typical' view and make it a texture on the background, or use it for the skybox / reflection map / etc.

    The idea is to throw away as much detail as is possible before users start to notice.

    There are a number of pre-existing toolkits that will do these things automatically, but they tend to cost money. If you're looking at a serious app, I would recommend at least researching the solutions they include.

    0 讨论(0)
  • 2021-01-31 13:00

    For 3d models, the technique is called level of detail. Essentially, multiple versions models are kept available the the right one use based on context. It is not always just for distance, it can also be used to maintiain framerate in other situations.

    Be careful though, you should have mipmapping enabled or you'll get sparkling on the larger textures on the lower res models, and be careful of animation. Switching the model beneath an animating skeleton is tricky so one technique is to maintain the same skeleton even when LOD-ing the model.

    There are dynamic LOD systems for both terrain and for object models, but these can be CPU heavy.

    0 讨论(0)
  • 2021-01-31 13:00

    Low-detail versions of models work especially well for vehicles and objects It's really tricky with terrain. I've worked on battlezone-type games and PC flight simulators. A little fog helps cover up the "pops" between details.

    At the lower details, texture-mapping is often replaced with a few single-color polygons.


    "Another more obvious technique is to store really rough 3D models, but then how does the 3D rendering system specifically choose to render the rough model of the building and not the rough models of other less significant (and probably not-viewable-from-that-distance) objects? How would you store something like that along with your heightmap?"

    You can grid your terrain and keep a list of which objects are visible in each grid cell.

    0 讨论(0)
  • 2021-01-31 13:14

    One way to handle terrain is to have multi-resolution tiles. Much like how Virtual Earth and Google Maps do it, they divide the world into tiles in a recursive fashion. So, there are 4 tiles at level 0, 16 at level 1, etc... Then, using some LoD algorithm to determine the zoom/scale, you would load the appropriate terrain tiles for the given area.

    0 讨论(0)
  • 2021-01-31 13:17

    One technique is LOD (level of detail). The farther an object is from the camera, the less triangles are drawn. Here's a link: http://www.stefan-krause.com/

    0 讨论(0)
  • 2021-01-31 13:19

    You can render to textures for distant objects however you have to re-render the texture every time the perspective changes beyond some threshold. It works great for distant objects where the perspective won't change that often like your example of the mountains in the distance however if the the view source is moving too fast or you are too close then you will get a fish eye effect kind of like the early days of sky rendering in quake. This kind of system lends it's self to worlds like eve online which contain vast distances.

    This of course is but another trick in your arsenal and you will still need LOD to some extent.

    0 讨论(0)
提交回复
热议问题