POV-Ray : Newsgroups : povray.general : Solid meshes in CSG : Re: Solid meshes in CSG Server Time
30 Jul 2024 22:27:58 EDT (-0400)
  Re: Solid meshes in CSG  
From: SharkD
Date: 12 Dec 2008 18:40:01
Message: <web.4942f5fd7b08f33bd678456b0@news.povray.org>
"clipka" <nomail@nomail> wrote:
> "SharkD" <nomail@nomail> wrote:
> > > CSG only works (properly) with solids. As your mesh isn't closed, it's not a
> > > solid, and therefore *cannot* give any sensible results (unless you want to
> > > exploit exactly what PoV-ray happens to make of it).
> >
> > If it's not a solid, then Constructive *Solid* Geometry should not work with it
> > at all.
>
> 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".

> The problem here is that PoV-ray would have to actually test whether a mesh is
> solid or not, which could become a quite intensive thing with large meshes.
> There would also be numercial precision issues; simply put, some meshes may
> turn out to be "almost-but-not-quite solid" not because they have real
> significant "holes", but just minor impurities because of the way they were
> generated, which wouldn't interfere with CSG in practice; so it would be hard
> to draw a clear line between "solid" and "non-solid".
>
> So for the sake of parsing speed, software complexity and robustness, it's
> easier to leave it up to the user to ensure that his mesh is "solid enough" to
> be used in CSG.
>
> > You yourself even said earlier that, "There's nothing really strange about solid
> > meshes which do not form a closed surface, as long as the inside_vector is
> > defined properly." Have you changed your mind since then or something?
>
> No, that was someone else who stated that...
>
> > Further, you said that a non-closed solid mesh should behave just like a plane
> > or heightfield. This is *not* happening in this case, therefore--if one should
> > consider your earlier statements to be true--it must be considered a bug.
>
> .... and this as well. *My* only mistake might have been to not vehemently
> protest against these statements back then.

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.

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.

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.

-Mike


Post a reply to this message

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