>> Thanks to all the people who answered my previous message. But I have
>> to be more specific: I'm looking for a model to render without any
>> trick. I want all the triangles described individually in memory,
>> without sharing of indentical objetcs. My goal is to test a parallel
>> renderer that is developed in my lab. So, I need to know how many
>> triangle is a really big model? Is our renderer able to raytrace a
>> model that isn't raytracable with other renderers? Additionally, if
>> one of you could give me such a big model, it will be really helpful
>> (under NDA if necessary).
> It really is mostly about memory. If your model fits in the CPU's cache,
> it is small. If it fits in main memory, you might think it could be called
> big. If it is many times the size of main memory, then it should rightly be
> called "big".
> If a triangle is specified by three three-tuples of single precision.
> floating point, each triangle is 36 bytes. That means you get about
> 28 million of them to the gigabyte. Most vertices of course will be
> shared in dense triangle meshes, so you'll probably get a few more per
> gigabyte, but in any realistic renderer you'll have color and texture
> coordinate overheads per vertex as well, so perhaps it isn't a bad
> ballpark.
I spent a fair amount of time some years ago trying to optimize a
ray-tracer for minimal memory use. Using all the tricks I was able to come
up with, I was able to get it down to a total of 40 bytes per triangle.
This includes *all* overhead, including that triangle's share of ray
acceleration data structure size, etc--in other words:
total memory use of ray-tracer / total number of triangles ~= 40.
The key things to do to make this happen included sharing
vertices/normals/texture coordinates, as Mark noted above, and using
Michael Deering's technique for encoding normal vectors in a small number
of bits. Obviously surface shaders and transformations weren't stored
per-triangle, but per collection-of-triangles that had the same
shader/transformation. Finally, rather than using 3 ints to store vertex
indices, I used chars, shorts, or ints, depending on how many vertices
there were in a collection of triangles.
The resulting ray-tracer rendered a scene with 46 million triangles in
about 300MB of memory, and one with 9.6 million triangles in 50MB, without
using any instancing/shared geometry. Obviously not all of those
primitives were ever in memory at once--they key was to develop some
techniques so that the renderer didn't need to have the whole scene in
memory at once. See the following for all of the details...
<http://graphics.stanford.edu/papers/coherentrt/>
-matt
--
=======================================================================
In a cruel and evil world, being cynical can allow you to get some
entertainment out of it. --Daniel Waters