Codex |
07-06-2011 04:01 AM |
Quote:
Originally Posted by ZaltysZ
(Post 305804)
Collidable trees are not such complex problem. You don't need to check every tree. You only need to check nearby trees. This usually is accomplished by using octree data structure, which divides space into smaller cells, whose in turn are divided further. This way, when you search "nearby" trees, you begin your "walk" from largest cell (part of map) where aircraft is, then choose smaller one inside the previous one and so on, until you get the set of smallest ones, whose can contain part of your plane. This way even if you have million of trees, you will check only 0-10 of them. It is not something unusual and is widely used.
Problems arise when you have lots of objects to check their collisions with trees. However, if only planes were checked, that object count would not be so big. In DCS, the problem is not collision detection itself, it is possible, but people want more: fire and detection cover provided by trees. That and AI pathfinding is problematic.
|
The method your describing is Portal Collision Detection and only works when a collision is actually taking place, it increases the detection resolution of two objects and is only effecive in relatively low poly count environments (by low I mean a First Person Shooter type environment). The problem we're faced with still remains, the game engine still needs to track every tree in the game world. If your plane hits tree[532354, x, y, z] for example it can then use the Portal Method to do the calcualtions for all the bits flying everywhere.
The only immediate solution I can see is to group all the tress into one large bounding box, similar to how IL2 1946 works now. In fact I think it would be ok to have the 1946 style as its worked well for us for so many years.
|