|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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] rariuscouk> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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] ThankYou> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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] ThankYou> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|