POV-Ray : Newsgroups : povray.general : difference/ intersect, preserving original texture. Server Time
27 Nov 2024 12:47:38 EST (-0500)
  difference/ intersect, preserving original texture. (Message 1 to 9 of 9)  
From: gregjohn
Subject: difference/ intersect, preserving original texture.
Date: 20 Sep 2008 20:40:00
Message: <web.48d596b5affe8f0b34d207310@news.povray.org>
I have an interesting object{}. It itself is a union of multiple,
interestingly-shaped objects of different colors. I want to get a cross section
of it and see the colors of the different layers.

Every way I've tried, however, gives the cross-section the texture of the
cutting object.  Any way to see the colors in my multi-layer cake?


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: difference/ intersect, preserving original texture.
Date: 20 Sep 2008 23:23:42
Message: <48d5be3e@news.povray.org>
gregjohn wrote:
> I have an interesting object{}. It itself is a union of multiple,
> interestingly-shaped objects of different colors. I want to get a cross
> section of it and see the colors of the different layers.
> 
> Every way I've tried, however, gives the cross-section the texture of the
> cutting object.  Any way to see the colors in my multi-layer cake?

cutaway_textures?


Post a reply to this message

From: John VanSickle
Subject: Re: difference/ intersect, preserving original texture.
Date: 21 Sep 2008 01:39:45
Message: <48d5de21@news.povray.org>
gregjohn wrote:
> I have an interesting object{}. It itself is a union of multiple,
> interestingly-shaped objects of different colors. I want to get a cross section
> of it and see the colors of the different layers.
> 
> Every way I've tried, however, gives the cross-section the texture of the
> cutting object.  Any way to see the colors in my multi-layer cake?

Consider this simple intersection:

intersection {
   sphere { -x,2 texture { Rubber } }
   sphere {  x,2 texture { Chalk } }
}

One side is Rubber and the other is Chalk, as we expect.  The space 
between the surfaces has an interior assigned to it, but it has no 
texture associated.  In POV-Ray, the interior of an object does not have 
an associated texture that can be seen when an untextured object 
intersects into that interior.

If you want to see the different surfaces, then use a clipping object. 
It will make the object look hollow, but you'll see the surfaces.

Regards,
John


Post a reply to this message

From: Mike Williams
Subject: Re: difference/ intersect, preserving original texture.
Date: 21 Sep 2008 02:39:36
Message: <kG52WvAmwe1IFwXz@econym.demon.co.uk>
Wasn't it John VanSickle who wrote:
>gregjohn wrote:
>> I have an interesting object{}. It itself is a union of multiple,
>> interestingly-shaped objects of different colors. I want to get a 
>>cross section
>> of it and see the colors of the different layers.
>>  Every way I've tried, however, gives the cross-section the texture 
>>of the
>> cutting object.  Any way to see the colors in my multi-layer cake?
>
>Consider this simple intersection:
>
>intersection {
>  sphere { -x,2 texture { Rubber } }
>  sphere {  x,2 texture { Chalk } }
>}
>
>One side is Rubber and the other is Chalk, as we expect.  The space 
>between the surfaces has an interior assigned to it, but it has no 
>texture associated.  In POV-Ray, the interior of an object does not 
>have an associated texture that can be seen when an untextured object 
>intersects into that interior.

When you apply cutaway_textures to an object with overlapping parts, you 
get the average of the textures of those parts.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Jim Charter
Subject: Re: difference/ intersect, preserving original texture.
Date: 21 Sep 2008 09:55:22
Message: <48d6524a$1@news.povray.org>
gregjohn wrote:
> I have an interesting object{}. It itself is a union of multiple,
> interestingly-shaped objects of different colors. I want to get a cross section
> of it and see the colors of the different layers.
> 
> Every way I've tried, however, gives the cross-section the texture of the
> cutting object.  Any way to see the colors in my multi-layer cake?
> 
> 
don't you want the cutaway_textures keyword?


Post a reply to this message

From: gregjohn
Subject: Re: difference/ intersect, preserving original texture.
Date: 21 Sep 2008 14:15:00
Message: <web.48d68e3f9a86880734d207310@news.povray.org>
Jim Charter <jrc### [at] msncom> wrote:
> gregjohn wrote:
> > I have an interesting object{}. It itself is a union of multiple,
> > interestingly-shaped objects of different colors. I want to get a cross section
> > of it and see the colors of the different layers.
> >
> > Every way I've tried, however, gives the cross-section the texture of the
> > cutting object.  Any way to see the colors in my multi-layer cake?
> >
> >
> don't you want the cutaway_textures keyword?


It's interesting how this does exactly what I want to **one** layer of the cake,
but not all.   Maybe I shouldda "merged" the layers of the cake instead of
"union"ed them.


Post a reply to this message

From: Alain
Subject: Re: difference/ intersect, preserving original texture.
Date: 22 Sep 2008 12:13:25
Message: <48d7c425$1@news.povray.org>
gregjohn nous illumina en ce 2008-09-21 14:11 -->
> Jim Charter <jrc### [at] msncom> wrote:
>> gregjohn wrote:
>>> I have an interesting object{}. It itself is a union of multiple,
>>> interestingly-shaped objects of different colors. I want to get a cross section
>>> of it and see the colors of the different layers.
>>>
>>> Every way I've tried, however, gives the cross-section the texture of the
>>> cutting object.  Any way to see the colors in my multi-layer cake?
>>>
>>>
>> don't you want the cutaway_textures keyword?
> 
> 
> It's interesting how this does exactly what I want to **one** layer of the cake,
> but not all.   Maybe I shouldda "merged" the layers of the cake instead of
> "union"ed them.
> 
> 
Merge will only make your scene render slower.
You may have areas where to many different components overlap. You may need to 
take slices of your various individual components, by intersecting them with 
properly sized boxes, and unioning those slices.

-- 
Alain
-------------------------------------------------

Did you know that Al Capone's business card said he was a used furniture dealer.


Post a reply to this message

From: Blue Herring
Subject: Re: difference/ intersect, preserving original texture.
Date: 22 Sep 2008 13:34:13
Message: <48d7d715$1@news.povray.org>
Alain wrote:
> Merge will only make your scene render slower.
> You may have areas where to many different components overlap. You may 
> need to take slices of your various individual components, by 
> intersecting them with properly sized boxes, and unioning those slices.

Alternately/similarly you could texture the whole object using one or 
more object patterned textures, so each texture is where you want it to be.

-- 
// The Mildly Infamous Blue Herring
#version 3.61;#include"functions.inc"global_settings{assumed_gamma
2.2}isosurface{function{-f_strophoid(x/2-.45,y,z*3,1,1.2,1,1.5)-.05}
contained_by{box{<-2.1,-1,-1/3>,<1.4,1,1/3>}}max_gradient 12inverse
hollow pigment{rgbf 1}interior{media{samples 8 emission<3,80,150>/255
density{crackle metric 1color_map{[0rgb 6][.03rgb 0][1rgb 0]}scale<1,
2,1>warp{turbulence<.5,.75,.5>}scale 1/3}}}translate z*3}


Post a reply to this message

From: gregjohn
Subject: Re: difference/ intersect, preserving original texture.
Date: 22 Sep 2008 20:00:00
Message: <web.48d830949a86880734d207310@news.povray.org>
Thanks all for the cutaway_texture suggestion.

I later discovered that I had a dangling texture statement (declared it in a
statement but never applied it to anything) that made me think the whole
cutaway_texture wasn't working properly.  Thanks and sorry.


Post a reply to this message

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