Archive

Posts Tagged ‘mesh’

Kd-tree Cache

September 16th, 2009 Romain 1 comment

I’ve just added a caching mechanism for the kd-tree.

It makes a huge difference in start-up time for complex meshes: Kd-tree construction for a 10 million triangle mesh takes quite some time (Ok, my construction routine may not be the fastest…) but once cached, rendering can start nearly instantaneously.

I’ve also noticed that kd-trees my renderer generate lend themselves to compression fairly well. E.g., the tree generated for the Stanford repository’s Asian Dragon weights around 124 MB, but a standard zip slims it down to 53 MB.

Hence, I’ll certainly add compression support to the cache.

That brings up the question: What does a high compression ratio say about a tree’s quality?

Binary PLY File Support

June 22nd, 2009 Romain No comments

I’ve just added support for binary files to my PLY file reader. With this enhancement on board I could render the heavier models from the Stanford 3D Scanning Repository.

Thai statue (10 million triangles)

Thai statue (10 million triangles)

I ran out of luck with the Lucy model, though, as the core engine would run out of memory (I have 3GB installed and compile as a 32-bit app) while constructing the kd-tree…. 28 million triangles is heavy, and my code for kd-tree construction is probably not the most memory efficient out there.