POV-Ray : Newsgroups : povray.general : 3D Glass-like block and problem with inner faces Server Time
17 Jun 2024 09:45:27 EDT (-0400)
  3D Glass-like block and problem with inner faces (Message 11 to 18 of 18)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: scott
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 11:21:37
Message: <5475fe11$1@news.povray.org>
> Here is a very simple example with just two cubes which share a common face:
>
> Link to the image:
> https://www.dropbox.com/s/rfkcvxlerko3qmw/Mesh2%28merged%29.png?dl=0
>
> I have used the "merge" function to merge the two cubes, but as you can see,
> the shared inner face still appears.
>
> I have defined two cubes as follow:

You must add an "inside_vector" to the mesh2 objects if you want to use 
them in CSG (eg merge). Try adding "inside_vector y" to each mesh2 and 
the inner face should be gone.


Post a reply to this message

From: Alain
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 14:50:57
Message: <54762f21@news.povray.org>

> Here is a very simple example with just two cubes which share a common face:
>
> Link to the image:
> https://www.dropbox.com/s/rfkcvxlerko3qmw/Mesh2%28merged%29.png?dl=0
>
> I have used the "merge" function to merge the two cubes, but as you can see,
> the shared inner face still appears.
>

In this case, I'd only use a SINGLE box and use the scale to give it the 
desired dimention. Something like scale <20, 35, 5>.

A merge remove the faces that are INSIDE objects that interpenetrate 
each other.

In your case, the objects just touch each others, creating a coincident 
faces situation that can lead to noise along it. This mean that the 
merge CAN NOT remove that face as they are not realy inside another 
object, even if they looks like they are.

Try this to show you how merge realy work:

union{
box{-1, 1 }
cylinder{-2*x, 2*x, 0.5}
pigment{rgbf<1, 0.5, 0.1, 0.7>
translate 1.5*y
}

merge{
box{-1, 1 }
cylinder{-2*x, 2*x, 0.5}
pigment{rgbf<0.1, 0.5, 1, 0.7>
translate -1.5*y
}

In the top, orange, object, you see the cylinder inside the box.
In the bottom, teal, object, you don't see the part of the cylinder that 
goes inside the box.



Alain


Post a reply to this message

From: Alain
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 14:53:32
Message: <54762fbc$1@news.povray.org>

>> Here is a very simple example with just two cubes which share a common
>> face:
>>
>> Link to the image:
>> https://www.dropbox.com/s/rfkcvxlerko3qmw/Mesh2%28merged%29.png?dl=0
>>
>> I have used the "merge" function to merge the two cubes, but as you
>> can see,
>> the shared inner face still appears.
>>
>> I have defined two cubes as follow:
>
> You must add an "inside_vector" to the mesh2 objects if you want to use
> them in CSG (eg merge). Try adding "inside_vector y" to each mesh2 and
> the inner face should be gone.
>

Not needed.

The inside_vector is required for difference and intersection to work 
properly with meshes, not for union/merge.
You can use a naked triangle or a polygon in any union/merge without any 
isue.


Post a reply to this message

From: Alain
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 15:01:59
Message: <547631b7$1@news.povray.org>

> Thanks for the answers, here is the link of my scene:
>
> https://www.dropbox.com/s/au2t9g5l7btmhqu/Block3D.png?dl=0
>
> As you can see, some faces are shared between two cubes.
> The whole block is defined by one "mesh2" object, in which I have defined
> several triangles to make a cube. The whole block is made of these cubes.
> The problem is, that I have a transparent block and I would like these inner
> faces do not appear. I have also tried to apply the "merge" function to my whole
> block but it didn't work.
>
> I'm looking forward to read you.
>
>
>

There is no way to make those interior faces disappear except by actualy 
removing them from the mesh.

A beter aproach would be to only define the actual faces, possibly using 
only 2 triangles per actual face, or use an "unit" box that you then 
scale to the desired dimention.

My prefered way would be to use the box primitive with the desired 
dimention.


Alain


Post a reply to this message

From: scott
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 27 Nov 2014 03:03:19
Message: <5476dac7@news.povray.org>
>> You must add an "inside_vector" to the mesh2 objects if you want to use
>> them in CSG (eg merge). Try adding "inside_vector y" to each mesh2 and
>> the inner face should be gone.
>>
>
> Not needed.

The output is different depending whether you use inside_vector or not, 
so either you definitely must use it for the correct result, or you 
definitely must *not* use it for a correct result... I've always used it 
by default for meshes as I wasn't aware using it could do any harm!


Post a reply to this message

From: Alain
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 27 Nov 2014 21:15:10
Message: <5477daae@news.povray.org>

>>> You must add an "inside_vector" to the mesh2 objects if you want to use
>>> them in CSG (eg merge). Try adding "inside_vector y" to each mesh2 and
>>> the inner face should be gone.
>>>
>>
>> Not needed.
>
> The output is different depending whether you use inside_vector or not,
> so either you definitely must use it for the correct result, or you
> definitely must *not* use it for a correct result... I've always used it
> by default for meshes as I wasn't aware using it could do any harm!
>

Adding an inside_vector when not needed can't cause any harm. It only 
add a way to decide if any point is inside a mesh or not.
The ability of detecting the insideness may, in some particuliar cases, 
cause a mesh to render differently when there are enclosed triangles.


Post a reply to this message

From: scott
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 28 Nov 2014 03:41:17
Message: <5478352d$1@news.povray.org>
> Adding an inside_vector when not needed can't cause any harm.

That's what I always assumed.

> It only
> add a way to decide if any point is inside a mesh or not.
> The ability of detecting the insideness may, in some particuliar cases,
> cause a mesh to render differently when there are enclosed triangles.

So in the case that the mesh renders differently, that means the mesh 
needs inside_vector to be rendered correctly? Try adding inside_vector 
to the OP's scene, it renders quite differently (the internal faces 
dissappear), so that is why I concluded that inside_vector was needed.


Post a reply to this message

From: clipka
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 29 Dec 2015 11:35:43
Message: <5682b65f$1@news.povray.org>
Am 26.11.2014 um 20:54 schrieb Alain:

Just stumbled across this old thread, and thought I'd clarify two things
about "merge" that might still deserve mention, if only for the records:


(1)

> The inside_vector is required for difference and intersection to work
> properly with meshes, not for union/merge.

"merge", too, requires inside_vector, because it uses insideness tests
to tell interior and exterior surfaces apart so that it can suppress the
interior ones.

The /only/ CSG operation that works properly without "inside_vector" is
"union".


(2)

"merge" is /not/ suited as a wrapper to eliminate surfaces inside one
existing object; it only suppresses surfaces of any of its children that
lie within any of the /other/ children.

For instance, "merge { union { ... } torus { 1.0, 2.0 } } " does not
eliminate the inner surfaces of the union, nor the spindle-shaped
surface region inside this self-intersecting torus (*); it only hides
the surface sections of the union that are inside the torus, and the
surface sections of the torus that are inside the union.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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