POV-Ray : Newsgroups : povray.unofficial.patches : My personal wishlist : Re: My personal wishlist Server Time
2 Sep 2024 10:14:27 EDT (-0400)
  Re: My personal wishlist  
From: Nathan Kopp
Date: 25 Feb 2000 08:56:20
Message: <38b68a04@news.povray.org>
Gail Shaw <gsh### [at] monotixcoza> 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

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