|
![](/i/fill.gif) |
Christoph Hormann <chr### [at] gmx de> wrote:
> Daniel Neilson wrote:
> I waited for about half a minute - 48 seconds were required in fact.
>
> So we have:
>
> standard POV: 6s parse + 59s trace
> your kd-tree: 48s parse + 60s trace
>
> Since scenes containing a lot of small objects placed on the surface of
> a large object are very common (any landscape with plants, houses, rocks
> etc.) i think this is a major problem. In a large size render the parse
> time difference will of course not be so important but it would not be
> possible to really replace the existing technique with your system with
> such a difference.
>
> Also note that in this scene the memory use difference is 186Mb with the
> kd-tree vs. 27Mb with standard POV!
Indeed, I'd noticed the memory requirements last night as well. It hits
that peak during kd-tree building. The resident size of the program goes
way down to normal range post-build. There are arrays allocated on the
stack at each level of the recursion during build. It really adds up.
Note that I only suspect that it's the tonne of small objects intersecting
the ground that's causing the slowdown. I don't actually know that that is
the cause -- I've not spent a lot of time investigating it. More of an
educated guess, really.
I actually don't think there's such a thing as a universally better
acceleration structure. That's why I'd never advocate flat out replacing
one structure with another. Rather, I'm a big fan of supplying options to
the user. Especially when supplying those options does not interfere with
the rest of the system -- as is the case with supplying additional
acceleration structures. If a user's running on a machine with a large
amount of memory, then they can try the kd-tree. Same logic as allowing the
user to turn off the vista and light buffers -- there are scenes where it's
just a horrible idea to turn them on.
That said, if anyone knows of a better way to build a kd-tree that's at
least as fast and uses less memory, I'd be all for hearing about it.
-Daniel Neilson
Post a reply to this message
|
![](/i/fill.gif) |