POV-Ray : Newsgroups : povray.general : Re: how to hide interface between merged objects? Server Time
6 Nov 2024 18:26:56 EST (-0500)
  Re: how to hide interface between merged objects? (Message 1 to 2 of 2)  
From: tomlee
Subject: Re: how to hide interface between merged objects?
Date: 13 Apr 2004 03:10:01
Message: <web.407b912b2870cb19e6bd449a0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> tomlee <tom### [at] msgucsfedu> wrote:
> > I want to render only the exterior surface after merging two
> > semi-transparent objects.  Although the original sruface of each object
> > inside the CSG is not traced, pov-ray traces a new surface that intersects
> > the two objects.  Is there a way to hide this interface?
>
>   It may help understanding what you mean if you post a short example
> scene showing the effect you are talking about.
>
> --
> #macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
> N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
> N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -

Hi,

I don't know how to post picture files, so I just attach a example of the
povray script that generates this problem.  The scene shows the plane that
intercepts the two merging spheres.  I want to hide this plane and only
trace the extrior surface.  Is there a way to accomplish this?

///////////////////////////////
camera {direction<0.0,0.0,  -1>
 location <0.0 , 0.0 , 15.0>
 right 1.3333333660*x up y
 }
#default { finish{phong    0.500 ambient    0.120 diffuse    1.080
phong_size 15.000000}}
light_source{<4000.0001,4000.0001,9978.2371>  rgb<1.0,1.0,1.0> }
plane{z , -10.4444
 pigment{color rgb<0.0000,0.0000,0.0000>}
 finish{phong 0 specular 0 diffuse 0 ambient 1.0}}

merge{
sphere{<0,1,0>, 2.0 }
sphere{<0,3,0>, 2.0 }
pigment{color rgb<1,1,0> transmit 0.8}
}
/////////////////////////////////

Thanks.

Tom


Post a reply to this message

From: Chris B
Subject: Re: how to hide interface between merged objects?
Date: 13 Apr 2004 06:25:52
Message: <407bc030$1@news.povray.org>
"tomlee" <tom### [at] msgucsfedu> wrote in message
news:web.407b912b2870cb19e6bd449a0@news.povray.org...
> Warp <war### [at] tagpovrayorg> wrote:
> > tomlee <tom### [at] msgucsfedu> wrote:
> > > I want to render only the exterior surface after merging two
> > > semi-transparent objects.  Although the original sruface of each
object
> > > inside the CSG is not traced, pov-ray traces a new surface that
intersects
> > > the two objects.  Is there a way to hide this interface?
> >
> >   It may help understanding what you mean if you post a short example
> > scene showing the effect you are talking about.
> >
> > --
> > #macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb
M()}}
> > N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
> > N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  -
Warp -
>
> Hi,
>
> I don't know how to post picture files, so I just attach a example of the
> povray script that generates this problem.  The scene shows the plane that
> intercepts the two merging spheres.  I want to hide this plane and only
> trace the extrior surface.  Is there a way to accomplish this?
>
> ///////////////////////////////
> camera {direction<0.0,0.0,  -1>
>  location <0.0 , 0.0 , 15.0>
>  right 1.3333333660*x up y
>  }
> #default { finish{phong    0.500 ambient    0.120 diffuse    1.080
> phong_size 15.000000}}
> light_source{<4000.0001,4000.0001,9978.2371>  rgb<1.0,1.0,1.0> }
> plane{z , -10.4444
>  pigment{color rgb<0.0000,0.0000,0.0000>}
>  finish{phong 0 specular 0 diffuse 0 ambient 1.0}}
>
> merge{
> sphere{<0,1,0>, 2.0 }
> sphere{<0,3,0>, 2.0 }
> pigment{color rgb<1,1,0> transmit 0.8}
> }
> /////////////////////////////////
>
> Thanks.
>
> Tom
>
>

Hi Tom,

I don't think your scene does show a plane where you think it does.
If you add a little sphere in the middle of where you think the 'plane' is,
ie:
       sphere{<0,2,0>, 0.5 pigment{color rgb<1,0,0>}}
You'll see that it's colour doesn't change where the 'plane' would slice
through it if it were there.

If you add a clipped_by to your merge
      clipped_by {box {<-5,1.9,-5><5,2.1,5>}}
You can then see clean through the intersection and there is no plane there.

Finally, if you move the light source down so that the difference in
colouration between the inside of the top sphere and the inside of the
bottom sphere is not so pronounced your 'plane' at the point of intersection
also disappears.

Convinced?


Post a reply to this message

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