BlenderPeople Development

Tracking the development of the BlenderPeople script suite.

Thursday, April 15, 2004

Work is continuing -

While I was refining the code for directional awareness, I removed the scriptlinks to the FollowTerrain script for simplicity's sake. Upon putting them back in, things slowed to a crawl. FollowTerrain slows things down, much more than I realized, with only a moderately complex Ground mesh, by a factor of 20 or so. If you want a better Ground mesh, which would be essential for good final renders and smooth hilltops, etc., you're going to have to bump up subsurf or subdivide the thing. FollowTerrain slows proportionally to the number of faces in the mesh.

FollowTerrain checked every face in sequence to see if the object was above it, then calculated the proper elevation when it found it. The main script of this whole thing calls FollowTerrain twice per Actor per calculated frame. A Ground Mesh with 3000 verts (not that many) with 800 actors had things running at about 1 actor every quarter second. Way tooooooo sloooooow for me.

Today I learned about quadtree and octree searches. So now, the script builds a quadtree of the ground mesh upon initialization and stores it in (you guessed it) a mySQL table. This lets you do lightening fast queries based upon your quadrant criteria. That same 3000 vert mesh now only has to four rounds of very simple math, followed by a simple query and the examination of 8 or 9 faces. Much much faster than searching all 3000 faces. I'm getting deformed trees as of now, but it's moving significantly faster. I'll probably spend the rest of the week working on this code, as it's new to me, and recursive stuff has always made me feel a little wobbly.

posted by Roland  # 3:44 PM

Archives

02/01/2004 - 02/29/2004   04/01/2004 - 04/30/2004   05/01/2004 - 05/31/2004   06/01/2004 - 06/30/2004   07/01/2004 - 07/31/2004   08/01/2004 - 08/31/2004   09/01/2004 - 09/30/2004   11/01/2004 - 11/30/2004   12/01/2004 - 12/31/2004   01/01/2005 - 01/31/2005   02/01/2005 - 02/28/2005   06/01/2005 - 06/30/2005   09/01/2005 - 09/30/2005   10/01/2005 - 10/31/2005   11/01/2005 - 11/30/2005   12/01/2005 - 12/31/2005   01/01/2006 - 01/31/2006   03/01/2006 - 03/31/2006   04/01/2006 - 04/30/2006   05/01/2006 - 05/31/2006   06/01/2006 - 06/30/2006   07/01/2006 - 07/31/2006   08/01/2006 - 08/31/2006   09/01/2006 - 09/30/2006   10/01/2006 - 10/31/2006   11/01/2006 - 11/30/2006  

This page is powered by Blogger. Isn't yours?