Simple Frustum Culling

[ENGLISH]

These days, while fighting a toothache, I've been thinking in the way of manage world objects. A short term objective will be add simple Frustum Culling. So I'll check if an object is seen, one by one. If I've got enough spare time I will like to add an octree, and I've been thinking how to do it.

Basically, I would have a standard list to store dynamic objects and the octree to store the static ones. But I don't like having TWO types of objects. If an object moves, it will go to the list, and if an object of the list doesn't move for a while, it will be sent to the octree.

I guess that, most of the time, objects tend to be static or dynamic. And dynamic objects will move again in very little time. It's like applying the principle of temporal locality to this problem. In theory, it sounds good, so it's time to start thinking on the implementation.

[ESPAÑOL]

Estos días, alternando con un dolor de muelas, he estado pensando en la manera de gestionar los objetos en el mundo. Lo que me voy a plantear a corto plazo va a ser hacer simplemente Frustum Culling. Es decir, comprobar objeto a objeto si se ven o no. Si me da tiempo, me gustaría incluir un octree, y ya me he decidido cómo organizarlo.

Básicamente, tendría una lista normal y corriente para los objetos dinámicos y el octree para los objetos estáticos. Sin embargo, no me gusta tener en la jerarquía esta distinción, por lo que solo habría un tipo de objeto. Si un objeto se mueve, pasaría a la lista de objetos dinámicos. Y si un objeto de esa lista lleva cierto tiempo sin moverse, volvería al octree.

Supongo que, en la mayoría de los casos, los objetos tiendan a ser estáticos o dinámicos. Y posiblemente los objetos que se muevan, se moverán otra vez dentro de poco. Básicamente es el principio de localidad aplicado a este problema. La teoría no pinta mal, así que ahora toca empezar a pensar en la implementación.

Posted byMiguel Herrero at 2:47 PM  

0 comments:

Post a Comment