|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
It seems that you can layer a (partly transparent) texture over a single
item, but not a union. Is there some way to do this ?
eg.
#declare my_object1=
sphere{0, 1 texture {T_Wood7}}
#declare my_object2=
union
{
sphere{<0.5,0,0>, 1 texture {T_Wood7 rotate<0,90,0>}}
sphere{<-0.5,0,0>, 1 texture {T_Wood7}}
}
object
{
// my_object1 // this works
my_object2 // this doesn't
texture {pigment{bozo scale 0.25 color_map {[0.5 rgbf 1][0.5 rgb 1]}}}
}
Thanks,
Bernard
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3FCF742D.7B253C61@arkady.demon.co.uk>,
Bernard Hatt <bmh### [at] arkadydemoncouk> wrote:
> It seems that you can layer a (partly transparent) texture over a single
> item, but not a union. Is there some way to do this ?
Don't texture the CSG.
When you apply a texture to a CSG like this, the texture is only applied
to shapes in the CSG that don't have a texture. This is usually a good
thing, allowing you to efficiently texture the CSG, but it is a bit
annoying sometimes...
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Bernard Hatt who wrote:
>
>It seems that you can layer a (partly transparent) texture over a single
>item, but not a union. Is there some way to do this ?
>
Note that this works:-
#declare my_object2=
union
{
sphere{<0.5,0,0>, 1 }
sphere{<-0.5,0,0>, 1}
texture {T_Wood7}
}
object
{
my_object2
texture {pigment{bozo scale 0.25 color_map {[0.5 rgbf 1][0.5 rgb 1]}}}
}
What happens in your code is that the second texture doesn't get applied to
each of the spheres, it gets applied to the whole union, so it's like saying
union
{
sphere{<0.5,0,0>, 1 texture {T_Wood7 rotate<0,90,0>}}
sphere{<-0.5,0,0>, 1 texture {T_Wood7}}
texture {pigment{bozo scale 0.25 color_map {[0.5 rgbf 1][0.5 rgb 1]}}}
}
in which the inner textures overwrite the outer one, rather than layering with
it. In my above example, both textures are applied at the same level so they
do layer together.
I'd guess that it's not going to be possible to do what it looks like you want
to do. If you want different inner layers on the components of your union, I
think you're going to have to write the shared outer layer onto each
individual component.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Williams wrote:
>
> Wasn't it Bernard Hatt who wrote:
> >
> >It seems that you can layer a (partly transparent) texture over a single
> >item, but not a union. Is there some way to do this ?
> >
> [...]
> I'd guess that it's not going to be possible to do what it looks like you want
> to do. If you want different inner layers on the components of your union, I
> think you're going to have to write the shared outer layer onto each
> individual component.
>
> --
> Mike Williams
> Gentleman of Leisure
Thanks for the replies,
The problem is that I have an object constructed from a number of wooden
elements which are rotated/translated into position. If I apply the bozo
layer onto each element then the pattern doesn't match where the edges
of the elements meet...
As a workaround, I'll scale the bozo pattern smaller, to make it less obvious
where the joins are.
Regards,
Bernard
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Bernard Hatt who wrote:
>Mike Williams wrote:
>>
>> Wasn't it Bernard Hatt who wrote:
>> >
>> >It seems that you can layer a (partly transparent) texture over a single
>> >item, but not a union. Is there some way to do this ?
>> >
>> [...]
>> I'd guess that it's not going to be possible to do what it looks like you want
>> to do. If you want different inner layers on the components of your union, I
>> think you're going to have to write the shared outer layer onto each
>> individual component.
>>
>> --
>> Mike Williams
>> Gentleman of Leisure
>
>Thanks for the replies,
>
>The problem is that I have an object constructed from a number of wooden
>elements which are rotated/translated into position. If I apply the bozo
>layer onto each element then the pattern doesn't match where the edges
>of the elements meet...
That's not a problem. You can put one texture layer before the
rotation/translation and one texture layer after it. For example:
#declare WOOD = texture {
T_Wood7 rotate x*90
}
#declare BOZO = texture {
pigment{bozo
scale 0.25
color_map {[0.5 rgbf 1][0.5 rgb 1]}}
}
union {
box{0,<0.5,1,0.5> texture {WOOD}
texture {BOZO}
}
box{0,<0.5,1,0.5> texture {WOOD}
rotate -z*90
texture {BOZO}
}
box{0,<0.5,1,0.5> texture {WOOD}
translate <1,-0.5,0>
texture {BOZO}
}
box{0,<0.5,1,0.5> texture {WOOD}
rotate -z*90
translate <0.5,1,0>
texture {BOZO}
}
}
The WOOD grain is discontinuous, because it rotates and translates with
each component, but the BOZO layer is continuous because it is applied
after the transformations.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Williams wrote:
>
> Wasn't it Bernard Hatt who wrote:
> >
> >Thanks for the replies,
> >
> >The problem is that I have an object constructed from a number of wooden
> >elements which are rotated/translated into position. If I apply the bozo
> >layer onto each element then the pattern doesn't match where the edges
> >of the elements meet...
>
> That's not a problem. You can put one texture layer before the
> rotation/translation and one texture layer after it. For example:
> [ ... ]
> The WOOD grain is discontinuous, because it rotates and translates with
> each component, but the BOZO layer is continuous because it is applied
> after the transformations.
>
> --
> Mike Williams
> Gentleman of Leisure
Aha! , yes it's obvious now :-)
Thanks,
Bernard
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|