POV-Ray : Newsgroups : povray.newusers : Generating cross-section of a complicated model : Re: Generating cross-section of a complicated model Server Time
28 Jul 2024 12:21:43 EDT (-0400)
  Re: Generating cross-section of a complicated model  
From: Kenneth
Date: 21 May 2009 00:55:00
Message: <web.4a14dde6c981982af50167bc0@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:

> I don't think there's a perfect answer to this. There is a
> 'cutaway_textures' keyword that works with 'difference' and 'intersection'
> CSG operations, but it's a long way from perfect and seems to be broken in
> the 3.7 Beta 32. On the other hand it does work largely as documented on
> POV-Ray 3.6, so it may help. Here's a very trivial test scene:

[snip]

> If you render this in 3.6 you'll notice that it works, but of course it
> can't know which of the two colors to use for the overlapping part, so it
> seems to average the two colors. Whether this is of any help to you will
> depend on which version of POV-Ray you're on and upon the specifics of your
> CSG operations. If you've been diligent enough to avoid overlapping parts of
> different colors then you may be ok.
>

I wasn't aware of this limitation until now.  Bummer. Just running a simple test
of randomly-placed (though overlapping) cubes, all with different colors, it
does indeed show some kind of 'averaging' of the many pigments on the cut-away
surfaces.

The docs do clearly explain this--but that explanation seems to me to be rather
ad hoc, describing a situation that may not have been what the code creator
originally had in mind. (Thinking about it logically, all the colors *should*
be the originals, not averaged ones; that would be a *true* implementation of
'cutaway_textures.')

I think this issue needs to be addressed in a future version of POV-Ray. As-is,
the cutaway_textures algorithm makes it rather impossible to create
accurately-colored cutaway objects--a problem which doesn't exist in many other
CGI programs. There are probably reasons why POV-Ray can't do it (yet); but that
needs changing! After all, one of POV's BIG strengths is in its texturing
ability.

I can think of another nice addition: As-is, the 'cutting' object can't have a
texture (otherwise it fully shows up on all the cutaway surfaces.) Instead, it
would be nice to have a method of variably 'blending' the cutting object's
pigment with all of the other objects' pigments. An example would be the
cutting object having a color of rgb 1, then blending that with all the
different objects' colors to get pastel shades on the cutaway surfaces.

I was hoping--at some point--to start working on a 'cutaway' automobile engine
in POV-Ray. LOTS of parts-within-parts.  But the current cutaway_texture
limitation is a big one.

Something interesting: I just did a further test, with the cutting object having
a transparent pigment--rgbt <1,1,1,1>--and the result is that you can see into
each cutaway object.  Nice and weird. But the *really* interesting thing is
that the many objects' colors are NOT averaged now, but are the originals!
Which leads me to believe that the current 'averaging' of colors may simply be
a fixable bug of some kind.

Ken W.


Post a reply to this message

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