Thursday, August 11, 2005

Clean up stage.

After having added particle effects for any broken joint, and thus any destructive event, I have distributed the link to the latest demo around Internet to get some feedback. Maybe people are just nice, but the comments were generally positive. What is more important is that I have received a number of suggestions about the direction of the effects and features that I should push in. Many thanks to those folks.

One of those ideas have led to think of a way to overcome GPU bus bottleneck. Here is what it was: GPUs have been developed and optimized to handle large chunks of mesh, however, it does hot handle well, large number of meshes. 10000 triangle in one mesh is MUCH better than 10000 meshes with one triangle. Here's a link that describe this in more depth.

Why is this important to URumble? Because the physical simulation is bound to have many independent objects, thus meshes. So, this is has to be dealt with somehow. Luckily, the framework allowed an easy implementation of the idea. Tanks in the recent demo are represented as a complex object consisting out of a dozen independent objects. Here is what happens now: once a tank goes to sleep (all its bodies stop moving around) its meshes are build into static mesh, and this new mesh replaces old separated meshes. The only downside is extra memory usage, and slow downs when builds large meshes.

Overall, the approach brought a huge performance boost, sometimes it doubles the frame rate! At the moment I am considering bringing this method to a large scale, when the entire parts of the scene will be built into static meshes. This will require some special division of the environment, possibly via use of octrees.

Other than that, a lot of time has been spent into cleaning up the framework and its interfaces, which led to creation of a few minor tools. More are scheduled to come as they approach a certain level of usability.

No comments: