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:38:17 EDT (-0400)
  Re: Generating cross-section of a complicated model  
From: Chris B
Date: 21 May 2009 02:43:50
Message: <4a14f826@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote in message 
news: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 ...
>> 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.
>
> Thinking about it logically, all the colors *should*
> be the originals, not averaged ones;

I would argue that the original colors *are* shown, except where two objects 
occupy the same physical space, which is something that doesn't typically 
occur in RL solids. So I guess POV-Ray is forced to do something a bit 
'unrealistic' to represent an unrealistic RL condition.  If you add a real 
spark plug into a cylinder block you'd normally have to cut a hole in the 
cylinder block first, unless your tool of choice is a sledgehammer (a most 
versatile tool).


> 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.

That does sound like a nice addition.


> 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.

If you cut holes for the parts-within-parts you may be ok, but I vaguely 
recall an earlier discussion on these newsgroups about other problems with 
using cutaway_textures on large composite objects, though I don't remember 
the detail.

One approach I've found successful is to adopt a cookie_cutter type of 
concept, where I define a cutting object at the top of the scene file. Then, 
as I build up the scene, for all objects that I add which could potentially 
be cut by the cutter I add a 'difference' operation using whatever texture I 
want for the cut surface. Subsequently you can easily alter the shape and 
position of the cutting object. This is the technique I incorporated into 
the Blockwall macros in the Object Collection for cutting window and door 
holes in the walls of a building. It gives the correct block texture and 
also significantly improves performance over cutting the holes afterwards 
because you end up with lots of small bounding boxes instead of one big one.

Another advantage of this technique is that you can be highly selective 
about the components you choose to cut. For example, you may wish to slice 
through the cylinder block of an engine, leaving the spark plugs and 
drive-chain intact. You can even use multiple cutting objects or independant 
texture definitions, for example coloring the cut surfaces of the engine red 
and the gear-box blue. Of course it's easy to incorporate this technique if 
you're just starting work on a scene, but may not be easy to apply 
retrospectively to an existing model.


Regards,
Chris B.


Post a reply to this message

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