From: Ari H. <ahe...@an...> - 2001-07-25 21:13:36
|
Playing with Scherer's Mesh class based on the faces object, I realized that drawing heightfield meshes might be a pretty common application. Right now faces is extremely poorly optimized for this (using the Mesh class anyhow): vertices are not correctly shared between polygons, and setting up the mesh from the data is extremely slow (since it turns the Mesh into polygons one vertex at a time in Python, for a 30x30 Mesh that's 900 polys and 3600 vertices in the inner loop. This was by far the most expensive part of a heightfield demo I wrote; by comparison calculating fractals heightfield data is very cheap. A mesh object would be pretty easy to write that took a rectangular x 3 matrix (i.e. a rectangular matrix of vectors). This would be faster to render as well as faster to construct. Any thoughts/requests? Ari |