POV-Ray : Newsgroups : povray.newusers : Cutaway_textures : Re: Cutaway_textures Server Time
28 Jul 2024 16:24:16 EDT (-0400)
  Re: Cutaway_textures  
From: Chris B
Date: 11 Jul 2008 10:51:55
Message: <4877738b$1@news.povray.org>
"BoudewijnDocter" <nomail@nomail> wrote in message 
news:web.48775656beb19c4a69b634a70@news.povray.org...
> "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
>

Ah. Sorry yes I see what you mean.

If MyCuttingObject is defined as just a cylinder the finished object 
inherits red and blue cutaway surfaces from the object that you cut into, 
whereas if you use a CSG object as MyCuttingObject it inherits the surface 
texture of the cutting object.

I did run across a similar issue recently and, unless I'm missing something, 
I think it may well be a bug. I don't see anything in the help that outlaws 
using a 'difference' CSG object as the cutting object with cutaway_textures.

Regards,
Chris B.


Regards,
Chris B.


Post a reply to this message

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