|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi All,
I want to do CSG with a mesh2 object, but I'm not sure if POVRay supports what I
need to do: the mesh2 object that I have is closed, but also contains internal
triangles (almost every triangle is transparent, so the internal triangles are
visible). I want to be able to do CSG with the *boundary* of the mesh2, and
ignore the internal triangles as far as CSG is concerned. Is this possible?
From the documentation, it seems like it wouldn't do what I want, because it
seems that based on whether the number of triangles intersected is odd or even
POV will consider the point as inside/outside. But what I want is for POV to
only intersect the triangles on the mesh2's *boundary* when doing this test, and
ignore the internal triangles. So any point inside the boundary triangles should
be regarded as "inside" regardless of how many triangles intersect a particular
ray.
What I want to achieve is this: I have several mesh2 objects, all of which have
a well-defined boundary but also contain internal triangles. I want to be able
to, for example, subtract mesh B from mesh A, so that all the triangles in mesh
A (including the internal triangles) are clipped by the *boundary* of mesh B
(ignoring B's internal triangles). How can I achieve this?
Thanks in advance!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 18.01.2011 19:37, schrieb quickfur:
> Hi All,
>
> I want to do CSG with a mesh2 object, but I'm not sure if POVRay supports what I
> need to do: the mesh2 object that I have is closed, but also contains internal
> triangles (almost every triangle is transparent, so the internal triangles are
> visible). I want to be able to do CSG with the *boundary* of the mesh2, and
> ignore the internal triangles as far as CSG is concerned. Is this possible?
No.
You'll have to separate the internal and external triangles into
different mesh2 objects.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 18.01.2011 19:37, schrieb quickfur:
> > Hi All,
> >
> > I want to do CSG with a mesh2 object, but I'm not sure if POVRay supports what I
> > need to do: the mesh2 object that I have is closed, but also contains internal
> > triangles (almost every triangle is transparent, so the internal triangles are
> > visible). I want to be able to do CSG with the *boundary* of the mesh2, and
> > ignore the internal triangles as far as CSG is concerned. Is this possible?
>
> No.
>
> You'll have to separate the internal and external triangles into
> different mesh2 objects.
OK, but how would I do CSG with the mesh containing internal triangles? I want
the internal triangles to be clipped as well.
One workaround I thought of is to have a mesh containing only boundary triangles
and use that in a clipped_by modifier for the mesh being subtracted from. But
this doesn't support full CSG. But I suppose I can figure out ways to work
around this.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"quickfur" <qui### [at] quickfurathcx> wrote:
[...]
> One workaround I thought of is to have a mesh containing only boundary triangles
> and use that in a clipped_by modifier for the mesh being subtracted from. But
> this doesn't support full CSG. But I suppose I can figure out ways to work
> around this.
Actually, this doesn't work. :-( I keep getting "Illegal texture or patch in
clip, bound or object pattern" when I specify clipped_by { mesh2 { ... }}.
Any suggestions as to how I might achieve clipping by a mesh2 object? Or is this
simply impossible?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 01/18/2011 06:23 PM, quickfur wrote:
> "quickfur" <qui### [at] quickfurathcx> wrote:
>
> Actually, this doesn't work. :-( I keep getting "Illegal texture or patch in
> clip, bound or object pattern" when I specify clipped_by { mesh2 { ... }}.
http://wiki.povray.org/content/Documentation:Reference_Section_4.5#Clipped_By
the 2nd paragraph is your clue!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Hi All,
>
> I want to do CSG with a mesh2 object, but I'm not sure if POVRay supports what I
> need to do: the mesh2 object that I have is closed, but also contains internal
> triangles (almost every triangle is transparent, so the internal triangles are
> visible). I want to be able to do CSG with the *boundary* of the mesh2, and
> ignore the internal triangles as far as CSG is concerned. Is this possible?
>
> From the documentation, it seems like it wouldn't do what I want, because it
> seems that based on whether the number of triangles intersected is odd or even
> POV will consider the point as inside/outside. But what I want is for POV to
> only intersect the triangles on the mesh2's *boundary* when doing this test, and
> ignore the internal triangles. So any point inside the boundary triangles should
> be regarded as "inside" regardless of how many triangles intersect a particular
> ray.
>
> What I want to achieve is this: I have several mesh2 objects, all of which have
> a well-defined boundary but also contain internal triangles. I want to be able
> to, for example, subtract mesh B from mesh A, so that all the triangles in mesh
> A (including the internal triangles) are clipped by the *boundary* of mesh B
> (ignoring B's internal triangles). How can I achieve this?
>
> Thanks in advance!
>
>
Make a mesh with the outside triangles and one with the inside
triangles. Don't forget to give an inside vector to the outside mesh.
Unless the inside mesh is supposed to also be solid, don't give it an
inside vector.
Bind them in a single union.
Have the second mesh made as the first outside one. DON'T union it with
it's inside triangles.
Perform your difference or intersection.
If you want to use clipped_by, the clipping object MUST be texture-less.
So, you need to define your meshes that are subject to be used as
clipping objects without any material/texture/pigment, and only apply
the texture if needed.
A clipping mesh may be unioned with a non-solid iner mesh, as long as
they are both texture-less.
Texture-less also mean that you can't have any per triangle/vertice
texture. NO texture ANYWHERE in the mesh definition.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain <aze### [at] qwertyorg> wrote:
[...]
> If you want to use clipped_by, the clipping object MUST be texture-less.
> So, you need to define your meshes that are subject to be used as
> clipping objects without any material/texture/pigment, and only apply
> the texture if needed.
>
> A clipping mesh may be unioned with a non-solid iner mesh, as long as
> they are both texture-less.
>
> Texture-less also mean that you can't have any per triangle/vertice
> texture. NO texture ANYWHERE in the mesh definition.
[...]
It's not working. I tried clipped_by with a textureless mesh2 object, but POVRay
is still rejecting it. Here's an example that causes a rejection:
sphere {
<0,0,0>, .5
clipped_by {
mesh2 {
vertex_vectors {
6,
<1,0,0>, <0,1,0>, <0,0,1>,
<-1,0,0>, <0,-1,0>, <0,0,-1>
}
face_indices {
8,
<0,1,2>
<0,2,3>
<0,3,4>
<0,4,1>
<5,1,2>
<5,2,3>
<5,3,4>
<5,4,1>
}
inside_vector x
}
}
pigment { rgb<1,1,0> }
finish { ambient 0.3 diffuse 0.5, specular 0.8 }
}
As you can see, there is no texture anywhere in the mesh2, yet POVRay still
complains:
Parse Error: Illegal texture or patch in clip, bound or object pattern.
Is this a version-dependent thing? Or did I misunderstand the mesh2 syntax? I'm
really confused now.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|