POV-Ray : Newsgroups : povray.advanced-users : Mesh transparancy : Re: Mesh transparancy Server Time
29 Jul 2024 08:12:12 EDT (-0400)
  Re: Mesh transparancy  
From: Shay
Date: 18 Sep 2002 11:57:22
Message: <3d88a262@news.povray.org>
shahrokh <shg### [at] hotmailcom> wrote in message
news:web.3d8803c3dd85c78cfe5a7c470@news.povray.org...

I'm assuming that you cannot use box primitives because your Irreg_Cubes are
not necessarily square. This will make accomplishing what you want a little
more difficult than just using a merge of cubes, but provided that the sides
of your Irreg_Cubes are flat (as they appear to be) and that the faces meet
along all edges when touching another face (as they appear to do), this
won't be too difficult. Actually, as long as the second condition is true
then this is possible, but the results will most likely look like crap if
your sides are not flat.

The easiest way to code a solution would be to represent the object twice.
The first representation would be an array of groups of four vertices
representing the four corners of each side of each Irreg_Cube. The second
and final representation will be formed by #undef_ing all groups of 4
vertices for which a matching group (although not in the same order) of
vertices exists, triangulating all of the remaining sides, and placing these
triangles into a mesh object.

Don't bother with mesh2 for this macro. Converting to mesh2 would involve
combining duplicate vertices, and doing so would be wasted effort since no
vertex normals will need to be found for this "edgy" object.

 -Shay


Post a reply to this message

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