Le 2022-04-18 à 22:40, Kenneth a écrit :
> Alain Martel <kua### [at] videotronca> wrote:
>> You are incorrectly using bounded_by as an alternative for an intersection.
>> ANY ray that hit the bounded_by shape will cause the bounded_by object
>> to be evaluated, even if that part is actually outside the bounded_by
>> object. Even if that part is in front of the bounded_by shape.
> I use the 'intersection' method too-- usually with a box object. A generally
> trusty method starts with getting the min_extent/max_extent of the final object,
> then using those vector positions for the two box corners. (Before doing this, I
> center the object on the origin, more or less-- then I can multiply the
> found min_extent/max_extent vectors by, for example, 1.1, which expands the box
> object slightly-- just to be safe.)
> I guess an alternate method would be to do this to each individual part(?) of a
> CSG object like yours; but in practice, I have never needed to do that.
> I rarely if ever use bounded_by shapes anymore, for the reasons that Alain and
> William P mentioned. I never know if or when they will be automatically removed,
> defeating their purpose.
> POV-ray's automatic bounding of objects seems to do well enough in most cases,
> so I only use this box intersection trick when it seems absolutely necessary. Or
> to 'close up' a triangle-mesh object that is not a totally closed mesh due to
> mistakes in the mesh-making. (The same trick can be used to 'solidify'
The bounded_by attribute was introduced when the automatic bounding was
not yet implemented or in it's very early stage and unreliable.
Another side effect of using bounded_by is that any union bounded that
way is treated as a merge, but, without removing the internal surfaces.
Do this test :
Have a scene containing 10000 objects in an union. Render it and take a
look at the objects count. It's 10000.
Now, render that scene again, BUT, add a bounded_by shape that enclose
the union and look at the objects count. The count is now 1.
The render will also be longer as the union is no longer split into it's
Post a reply to this message