POV-Ray : Newsgroups : povray.general : Solid meshes in CSG : Re: Solid meshes in CSG Server Time
30 Jul 2024 22:19:20 EDT (-0400)
  Re: Solid meshes in CSG  
From: clipka
Date: 12 Dec 2008 20:00:01
Message: <web.494308ee7b08f33b7c822d860@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> > So you're saying that it should give an error instead of rendering at all?
>
> Is there a good reason not to? The results are afterall "insensible".

As already mentioned, the "good reason not to" is the high "cost" (regarding
both processing time and user- and 3rd-party-tool-friendliness) of a test for
"solidness" of a mesh.

> The whole point of the inside_vector is that it doesn't *matter* whether the
> mesh is closed or not. As long as the ray only intersects one surface, then
> anything starting from this surface and extending in the direction of the
> inside_vector is considered *inside*, and therefore should behave properly in
> CSG.

No, this is what you may *think* is the point.

Or, well, yes, in a way that *is* the point. But it's not designed with "totally
non-solid" meshes in mind, but rather "almost solid" meshes, that may have
slight flaws that don't really impact how well they are suited to CSG.

So what the inside_vector is designed to work around is not gaping holes, but
tiny "fissures" due to numeric precision issues.


> POV already subtracts the proper volumes in CSG operations; the *only* problem
> is that the walls are missing. You can check and see whether closed meshes
> behave better by rendering a box instead.

There is a misconception here:

POV does *not*, from a technical point of view, just "subtract volumes".
Instead, when doing CSG it rather renders intersections (or differences) of
*surfaces* with volumes.

Your mesh has the proper volume, but lacks some of the corresponding surface, so
it doesn't work properly with this approach.

The essence is that every surface to show up in the final CSG object must
already be there in the component objects.


> Lastly, the deficiencies you're pointing out in open meshes apply equally to the
> plane. It doesn't make sense at first that a plane takes up a large volume in
> CSG because it's perfectly flat. Yet it does.

There is a difference here:

First of all, the plane is *infinite*, i.e. (a) it *does* divide the space into
two distinct volumes, and (b) every additional surface that you would ever
expect from CSG involving a plane is contributed by the other component
objects, not the plane.

Second, POV's plane is *defined* to actually not be a plane, but "everything
'below' the plane", for CSG purposes. (If this wasn't explicitly defined this
way, the plane would actually not work in CSG either, as it then would lack the
"volume".)

That's why it works, while your mesh - unfortunately - doesn't.


Post a reply to this message

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