View Full Version : Rendering nearest data in application.

07-17-2009, 12:41 PM
Hi there,

I have a lot of data in example in VBO or sth like that and i want to display only nearest data to "user eye" - is there any solution ?

I mean if you play e.g. GTA you can see that new elements are rendered on demand.

Thx for rep's :)

PS. I've come up with solution to check position and if "if" is positive render element - but it's the simpliest and probably not efficient with a lot of data...

Ferdi Smit
07-17-2009, 01:17 PM
You should organize your geometry in a spatial subdivision structure, for example a kd-tree, bounding volume hierarchy, octree or regular grid. This problem is not as easy as it seems and has been the topic of much research over the years.

07-20-2009, 03:17 PM
As a matter of fact I'm using spatial subdivisions - cubes (builded from quads). But all vertices are in one table - vbo.

07-20-2009, 07:53 PM
What's GTA? Or more importantly, what exactly is the effect you're after?

Stuart McDonald
07-21-2009, 12:34 AM
GTA = Grand Theft Auto. A typical FPS (first person shooter) style game. I assume he wants efficient culling of his data to render only whats required.

07-21-2009, 02:58 AM
Exactly - thats it.

I've thought about preparing data on every sceene render, and data would be depending on camera position.

with a lot of data it will be super inefficient and slow :p

07-21-2009, 05:25 PM
Thanks for sharing this useful information. It's great.

taux pret auto (http://pret-auto.org) - taux pret auto differe selon la rise en compte ... calculent automatiquement le taux pour un prÍt automobile donne.