![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
OK.. I found it... I needed to use "cutaway_textures"... Unfortunately I am
still getting exactly the same behaviour! The intersection is still taking
the default texture! Is there a bug in v3.6?
Rarius
"Rarius" <rar### [at] rarius co uk> wrote in message
news:433ee895@news.povray.org...
>I am building a cutaway image of a machine, but I am having a problem with
>the textures. If I texture an object then intersect that object, the
>texture of the object is overwritten on those surfaces where the object is
>cut...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Rarius wrote:
> I am building a cutaway image of a machine, but I am having a problem with
> the textures. If I texture an object then intersect that object, the
> texture of the object is overwritten on those surfaces where the object is
> cut... For example:
>
> difference
> {
> cylinder
> {
> <-10, 0, 0>
> <10, 0, 0>
> 1
> pigment{colour Red}
> }
> plane{y, 0}
> }
>
> I get half a red cylinder, but the part where the plane cuts the sphere is
> the default texture...
>
> I thought there was something like a "preserve_textures" modifier, but I
> can't find anything like that in the help. Can anyone suggest what the
> modifier might be?
>
> BTW doing the cutaway to each element of the machine before texturing is
> not an option. It is just too complex and I rotate/translate a lot of
> parts after texturing!
>
> Rarius
>
difference
{
cylinder
{
<-10, 0, 0>
<10, 0, 0>
1
}
plane{y, 0}
pigment{colour Red}
}
This way the plane has the same texture as the cylinder.
--
Ger
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thanks for the suggestion Ger, but as I said I can't do that.. The machine
is too complex, with too many textures...
Rarius
"Ger" <No.### [at] Thank You> wrote in message news:433eebdb@news.povray.org...
> Rarius wrote:
>
>> I am building a cutaway image of a machine, but I am having a problem
>> with
>> the textures. If I texture an object then intersect that object, the
>> texture of the object is overwritten on those surfaces where the object
>> is
>> cut... For example:
>>
>> difference
>> {
>> cylinder
>> {
>> <-10, 0, 0>
>> <10, 0, 0>
>> 1
>> pigment{colour Red}
>> }
>> plane{y, 0}
>> }
>>
>> I get half a red cylinder, but the part where the plane cuts the sphere
>> is
>> the default texture...
>>
>> I thought there was something like a "preserve_textures" modifier, but I
>> can't find anything like that in the help. Can anyone suggest what the
>> modifier might be?
>>
>> BTW doing the cutaway to each element of the machine before texturing is
>> not an option. It is just too complex and I rotate/translate a lot of
>> parts after texturing!
>>
>> Rarius
>
>>
> difference
> {
> cylinder
> {
> <-10, 0, 0>
> <10, 0, 0>
> 1
> }
> plane{y, 0}
> pigment{colour Red}
> }
>
> This way the plane has the same texture as the cylinder.
> --
> Ger
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Rarius wrote:
> Thanks for the suggestion Ger, but as I said I can't do that.. The machine
> is too complex, with too many textures...
>
> Rarius
>
> "Ger" <No.### [at] Thank You> wrote in message news:433eebdb@news.povray.org...
>
>>Rarius wrote:
>>
>>
>>>I am building a cutaway image of a machine, but I am having a problem
>>>with
>>>the textures. If I texture an object then intersect that object, the
>>>texture of the object is overwritten on those surfaces where the object
>>>is
>>>cut... For example:
>>>
>>>difference
>>>{
>>> cylinder
>>> {
>>> <-10, 0, 0>
>>> <10, 0, 0>
>>> 1
>>> pigment{colour Red}
>>> }
>>> plane{y, 0}
>>>}
>>>
>>>I get half a red cylinder, but the part where the plane cuts the sphere
>>>is
>>>the default texture...
>>>
>>>I thought there was something like a "preserve_textures" modifier, but I
>>>can't find anything like that in the help. Can anyone suggest what the
>>>modifier might be?
>>>
>>>BTW doing the cutaway to each element of the machine before texturing is
>>>not an option. It is just too complex and I rotate/translate a lot of
>>>parts after texturing!
>>>
>>>Rarius
>>
>>difference
>>{
>> cylinder
>> {
>> <-10, 0, 0>
>> <10, 0, 0>
>> 1
>> }
>> plane{y, 0}
>> pigment{colour Red}
>>}
>>
>>This way the plane has the same texture as the cylinder.
>>--
>>Ger
>
>
>
Something like this:
difference
{
cylinder
{
<-10, 0, 0>
<10, 0, 0>
1
pigment{colour Red}
}
plane{y, 0
pigment { color Green }
}
}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
You aren't understanding what I need to do... Here is a better example...
difference
{
union
{
cylinder{-x, y, 1 pigment{Red}}
cylinder{x, -y, 1 pigment{Yellow}}
}
plane{-y, 0}
cutaway_textures
}
This works fine, but I have actually found out that my problem is that
instead of a simple plane, I was trying to cut the object with an
intersection as follows:
difference
{
union
{
cylinder{-x, y, 1 pigment{Red}}
cylinder{x, -y, 1 pigment{Yellow}}
}
intersection
{
plane{-y, 0}
plane{-y, 0 rotate<60, 0, 0>}
}
cutaway_textures
}
Rarius
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wasn't it Rarius who wrote:
>This works fine, but I have actually found out that my problem is that
>instead of a simple plane, I was trying to cut the object with an
>intersection as follows:
>
>difference
>{
> union
> {
> cylinder{-x, y, 1 pigment{Red}}
> cylinder{x, -y, 1 pigment{Yellow}}
> }
> intersection
> {
> plane{-y, 0}
> plane{-y, 0 rotate<60, 0, 0>}
> }
> cutaway_textures
>}
It looks like cutaway_textures doesn't work if the cutting object itself
is compound. Is this a bug?
If your cutting object is an intersection, you can work round it like
this:
#declare Thing = union
{
cylinder{-x, y, 1 pigment{Red}}
cylinder{x, -y, 1 pigment{Yellow}}
}
union {
difference {
object {Thing}
plane{-y, 0}
cutaway_textures
}
difference {
object {Thing}
plane{-y, 0 rotate<60, 0, 0>}
cutaway_textures
}
}
Or if the cutting object is a union or merge, rather than an
intersection, do this:
#declare Thing = union
{
cylinder{-x, y, 1 pigment{Red}}
cylinder{x, -y, 1 pigment{Yellow}}
}
union {
difference {
object {Thing}
plane{-y, 0}
plane{-y, 0 rotate<60, 0, 0>}
cutaway_textures
}
}
If the cutting object is a difference, use the same method as for
intersection but add "inverse" to the second object.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> union {
> difference {
> object {Thing}
> plane{-y, 0}
> cutaway_textures
> }
> difference {
> object {Thing}
> plane{-y, 0 rotate<60, 0, 0>}
> cutaway_textures
> }
> }
I don't think that would have the desired effect in some cases. Here's what
I would do:
#declare cutpart = intersection
{
plane{-y, 0}
plane{-y, 0 rotate<60, 0, 0>}
}
union
{
difference {
cylinder{-x, y, 1}
object {cutpart}
pigment{Red}
}
difference {
cylinder{x, -y, 1}
object {cutpart}
pigment{Yellow}
}
}
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
As I said in my original post... My main object is too complex, with too
many textures to difference each part seperately.
As Mike said, it appears that cutout_textures acts very strangely if the
second part of the difference or intersection is a compound object...
sometimes it works sometimes it doesn't!
Rarius
> I don't think that would have the desired effect in some cases. Here's
> what
> I would do:
>
> #declare cutpart = intersection
> {
> plane{-y, 0}
> plane{-y, 0 rotate<60, 0, 0>}
> }
>
> union
> {
> difference {
> cylinder{-x, y, 1}
> object {cutpart}
> pigment{Red}
> }
> difference {
> cylinder{x, -y, 1}
> object {cutpart}
> pigment{Yellow}
> }
> }
>
> - Slime
> [ http://www.slimeland.com/ ]
>
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wasn't it Rarius who wrote:
>As I said in my original post... My main object is too complex, with too
>many textures to difference each part seperately.
>
>As Mike said, it appears that cutout_textures acts very strangely if the
>second part of the difference or intersection is a compound object...
>sometimes it works sometimes it doesn't!
So, does my method work with your complex main object?
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Mike Williams" <nos### [at] econym demon co uk> wrote:
> So, does my method work with your complex main object?
Not really... What I wanted to do was take out a 120deg slice out of my
object... I couldnt see how to do that with youir method... I finally
managed it with a scaled box...
I have done a few more tests and found that:
difference
{
object{Thing}
plane{y, 0}
plane{z, 0}
cutaway_textures
}
does work,
difference
{
object{Thing}
union
{
plane{y, 0}
plane{z, 0}
}
cutaway_textures
}
does work, but
difference
{
object{Thing}
intersection
{
plane{y, 0}
plane{z, 0}
}
cutaway_textures
}
does NOT work, neither does
difference
{
object{Thing}
difference
{
plane{y, 0}
plane{z, 0}
}
cutaway_textures
}
Regards
Rarius
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |