POV-Ray : Newsgroups : povray.newusers : Is it possible to layer a texture over a CSG ? : Re: Is it possible to layer a texture over a CSG ? Server Time
30 Jul 2024 16:28:05 EDT (-0400)
  Re: Is it possible to layer a texture over a CSG ?  
From: Mike Williams
Date: 4 Dec 2003 13:54:24
Message: <L$NRAOAEJ4z$Ew+D@econym.demon.co.uk>
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

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