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 18:24:14 EDT (-0400)
  Re: Generating cross-section of a complicated model  
From: clipka
Date: 21 May 2009 14:35:00
Message: <web.4a159eb6c981982ae1d5d3040@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> OK, I'll try again: The colors of all the parts would (currently) be averaged
> colors, not the 'actual' colors of the parts. The whole point of the argument.

Well, in a sense, it *is* the 'actual' color of *all* the parts, isn't it?

> The idea of getting the *actual* colors of cutaway parts is a GOOD
> one, an OBVIOUS one. Should we all just sit back and accept that the present
> 'solution' is all we can get?

The problem with this strikingly obvious idea is that it ignores one strikingly
non-obvious problem:

Which one would be *the* part to take the color from?


"The innermost", you might say.

Now, if you have a solid motor block with spark plugs (forced in with a sledge
hammer, to save the work of drilling holes :P), partially sticking out of the
solid metal block both into the combustion chamber (you drilled a hole for
*that*, didn't you? :D) and outside (to fit the wires to)...

.... which hint do you have for POV-Ray that the spark plugs are meant to take
precedence over the motor block??

Even in the best of all worlds, POV-Ray could only see two objects partially
overlapping. It could judge from the relative size of the objects, or the order
in which the objects were created, but that's all. It does not have any
*reliable* way of finding out which object *you* intended to be the "inserted"
one.


With some partial code redesign, it might be possible to pick the texture of the
object that would have been the last one encountered along the ray if it wasn't
partially cut away. However, you'd be in for some surprise: The cut surface of
the spark plug would be textured *partly* as you'd expect, but *partly* like
the motor block! The wrongly-colored areas would be those which in an "uncut"
shot would show the spark plugs sticking out of the motor block.

I'm perfectly sure this is *not* exactly what you want.

Averaging all objects' texture may not be what you'd expect, but it has the
advantage of at least giving *some* consistent texturing, and not being
influenced by the actual shape of parts you can't even see because they're cut
away.


Professional CAD software avoids the whole issue by not allowing you to insert
those spark plugs with the sledge hammer in the first place, but be a good boy
and drill holes into the motor block first: No overlapping objects here, so no
problem to choose the proper texture.


Post a reply to this message

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