|
|
"BoudewijnDocter" <nomail@nomail> wrote:
> "Chris B" <nom### [at] nomailcom> wrote:
> > "BoudewijnDocter" <nomail@nomail> wrote in message
> > news:web.48772d6758ea35f669b634a70@news.povray.org...
> > > Hi,
> > >
> > > I'm having trouble using the cutaway_textures feature when trying to cut
> > > something with a complex csg. The following simplified code illustrates my
> > > problem:
> > >
> > > #include "colors.inc"
> > >
> > > camera {location <3,4,-4> look_at 0 }
> > > light_source {<10,20,-5>, rgb 3}
> > >
> > > #declare MyObject = union {
> > > box {<-1,-1,-1>,<1,0,1> pigment {Red} }
> > > box {<-1,0,-1>,<1,1,1> pigment {Blue}}
> > > }
> > >
> > > #declare MyCuttingObject = difference {
> > > cylinder {<0,-2,0>,<0,2,0>,1}
> > > box {<0,-3,-1>,<1,3,0>}
> >
> > *** Add pigment {Yellow} here ***
> >
> > > }
> > >
> > > difference {
> > > object {MyObject}
> > > object {MyCuttingObject *** or here ***}
> > > cutaway_textures
> > > }
> > >
> > > I've got two colored boxes on top of each other, which I want to cut with
> > > an
> > > object that is a construction of two objects. Obviously I would like to
> > > see the
> > > colors inside the cut, hence the cutaway_textures, but this doesn't seem
> > > to
> > > work. Is there anyone who has the golden tip?
> > >
> > > Thanks!
> > >
> > > Boud
> > >
> >
> > Your cutting object doesn't currently have a texture defined for it, so it
> > comes out black. If you add a pigment it should work.
> >
> > Regards,
> > Chris B.
>
> Thanks for your quick reply, but it doesn't seem to solve the problem.
> Now the inside becomes Yellow, so the cutaway_textures does not seem to do
> anything. Is this a bug? What version should I use? I'm currently running
> V3.6.1 for Windows
Some additional comments on this subject:
The problem seems to be the difference statement in MyCuttingObject. If I change
this into a union, the scene renders without problems. Looking at the
documentation concerning cutaway_textures (sect. 3.5.10) it gives the following
syntax:
difference | intersection {
OBJECT_1_WITH_TEXTURES
OBJECT_2_WITH_NO_TEXTURE
cutaway_textures
}
This suggests that the second object should not have any texture. My suspicion
now is that the difference function in MyCuttingObject results in a csg with
(partially?) default textures (like what would happen if you leave the
cutaway_textures statement out). If this suspicion is right, then removing all
texture information should do the trick, but how?
Does anyone know a method of removing all texture information from a csg?
Thanks!
Boud
Post a reply to this message
|
|