|
![](/i/fill.gif) |
Gail Shaw <gsh### [at] monotix co za> wrote...
>
> That would make my life SO much easier. Difficult to
> implement though (Think of the following:
> difference {
> union {
> sphere {
> <0,0.5,0>,1
> pigment {Red}
> }
> sphere {
> <0,-0.5,0>,1
> pigment {Blue}
> }
> }
> box {
> <0,-2,-2>,<2,2,2>
> }
> }
>
> What colour should the overlapped area of the spheres be?
> Red, Blue or Purple?
None of those. The overlapped area should be the color of the box. The
surface in question could either belong to the box or to the whole CSG, but
it couldn't belong to either (or both) of the spheres.
If the box has not texture and you don't specify one for the CSG, then you'd
get the default texture.
> The ability to layer a texture over a complex CSG when each
> part has its own texture (If this is possible without using two copies of
> the object, please
> let me know)
>
> union {
> object {A texture {A}}
> object {B texture {B}}
> texture {PartiallyTransparentTexture layered}
> }
>
> The last texture should be layered over the others, instead
> of just applying to objects without a texture.
>
This could be a very useful feature. I'd say that you should use a syntax
something like:
union {
object {A texture {A}}
object {B texture {B}}
add_layer {PartiallyTransparentTexture layered}
}
Note that the keyword used is 'add_layer' instead of 'texture'. I
personally don't like the way that layered textures are currently specified
(it has produced unexpected results for me on many occasions before I looked
at the source code). Therefore, this is just a quick brainstorm suggestion
(probably not something that I will endorse in the future).
-Nathan
Post a reply to this message
|
![](/i/fill.gif) |