|
|
Hi all. I took a quick look at the code fragments here and have wondered if
anyone has seen the same thing I have.
In the code, it appears that there is a bounding object for just about every
single difference object. On top of that, what does the bounding object
consist of? A simple box, sphere or something more complex? I guess it
would help to see the actual code. But the thought I have is it looks like
there is about as many bounding objects as there are primitives. If this is
the case, here goes:
In the case of bounding, more bounds is not a good thing. If your checking
a high number of bounding objects, the speed difference, between that and
just checking if you've hit the object itself, is lost. I had a similar
problem with a simple lamp (a small part of the scene is attached). It's
not a recursive object by any means, but it's simply a cone shape cut with
another cone offset and then about 210 long boxes to cut out ribs. The
texture is 95% transparent with an IOR about 1.25. The only light source in
the scene is in the lamp. Cutting the shapes into the lamp shade drove the
rendering time up from 4 hours to about 21 days!
What I found in my case was this (I THINK my analysis is right, if not say
so!! ;) CSG's are automatically bounded by POV by default. This meant that
whenever a ray hit the bounding box the ray would be checked against every
primitive inside the box. In my case that's 212 objects, plus an IOR. This
meant that I had to come up with a better bounding scheme.
Putting a bounding object around every box that cut a rib would not
eliminate the problem because it would just be checking 210 bounding boxes.
No speed gain there. The solution was to:
- Turn off POV's automatic bounding.
- NOT bound the entire shade in a box
there is a light in it and all rays will hit it anyway!
- Group a bunch of adjacent ribs together with a union and then
bound that union with a box.
In my lamp there are 210 ribs in 10 groups of 21. This way a ray will be
checked against a maximum of 10 bounding boxes and then a maximum of 23
primitives (not counting IOR of course!) The tracing time went from 21 to
5.5 days.
Dave
Ken <tyl### [at] pacbellnet> wrote in message
news:37B### [at] pacbellnet...
>
> Greetings Advanced Users !
>
> I have a scene rendering that has been going now for 24 hours. It has
> several levels of recursion and has deeply nested CSG operations. To
> decrease the rendering time I added manual bounding to the differencing
> objects. This gave me a decent increase of rendering time at 1 level of
> recursion when I was testing to see if manual bounding would help.
Post a reply to this message
Attachments:
Download 'Lamp.jpg' (14 KB)
Preview of image 'Lamp.jpg'
|
|