POV-Ray : Newsgroups : povray.binaries.images : Behavior of bounded_by : Re: Behavior of bounded_by Server Time
24 Apr 2024 12:24:22 EDT (-0400)
  Re: Behavior of bounded_by  
From: Alain Martel
Date: 19 Apr 2022 12:28:59
Message: <625ee34b$1@news.povray.org>
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'
> height_fields.)
> 

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 
individual components.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.