Object Culling

[ENGLISH]

As I've mentioned before, most of the features are already implemented. But there are some things that need to be done yet. One of those was about culling scene objects.Specially graphic and physic objects, to avoid complex calculations. In the graphic module, that would mean to avoid updating objects that are not seen on the screen.

But, I've got no experience at all on that stuff (and not much time left either) so I prefer to avoid complex programming. The easiest thing would be to let the user make "rooms" of objects manually, so that objects outside would be culled. But that wouldn't work in long term.

The best thing would be to use an octree, but there are many things I don't know about those, like what to do if an object moves outside the scene, would I have to update the entire tree?. Another solution could be to have static and dynamic objects, but this just would move problems to another place (mostly the physics module).

I'll be thinking about the hole thing today and I hope I'll find what to do, more or less.

[ESPAÑOL]

Como ya he mencionado, la funcionalidad más importante está ya implementada. Sin embargo quedan pequeños aspectos por pulir. Uno de ellos era sobre cómo abordar el filtrado de elementos de la escena. Especialmente en la parte gráfica y la física, resulta importante poder descartar objetos que no son necesarios para evitar cálculos. En el módulo gráfico, esto implicaría descargar los objetos que no se ven.

Sin embargo, mi inexperiencia en el cambio (y la falta de tiempo también) hacen que no quiera complicarme mucho con este aspecto. La solución más sencilla sería no incluir nada de esto, pero después de tanto tiempo queriendo programar una solución, creo que ya va siendo hora de ponerme con ello.

Lo más sencillo sería hace agrupaciones manuales, haciendo que el usuario defina "habitaciones" y que lo que quede fuera de esa habitación sea descartado. Sin embargo es muy engorroso y tampoco es que me evite complicaciones.

Lo ideal sería utilizar un octree, pero hay muchos interrogantes que no se cómo manejar. Por ejemplo, si un objeto se sale de la escena, haciendo el octree más grande ¿qué tendría que recalcular?. Supongo que tendré que darle vueltas a esto o, quizá, definir objetos dinámicos y estáticos, y meter en el octree solo a los estáticos. Pero esto me crearía problemas en otros sitios, y no sería más que trasladar el problema a otro sitio.

Le estaré dando vueltas a este tema todo el día, a ver si me viene la inspiración.

Posted byMiguel Herrero at 5:30 PM  

0 comments:

Post a Comment