POV-Ray : Newsgroups : povray.newusers : Polyhedra -- intersections of planes or unions of faces? : Re: Polyhedra -- intersections of planes or unions of faces? Server Time
5 Jul 2024 11:02:02 EDT (-0400)
  Re: Polyhedra -- intersections of planes or unions of faces?  
From: Garrett Baird
Date: 16 May 2010 16:50:00
Message: <web.4bf0596ac1a647be52b4b7440@news.povray.org>
Thanks to the two of you for the helpful advice.  I have a follow-up question on
the use of these image maps:  I have a total of 6 images that I'm going to use
for these image maps, which are photographs of this  object (the real object
that I'm attempting to render) from the front, back, top, bottom, and sides.
What I would like to do is:  for each face of each polyhedron, color that face
with the image map whose orientation is most compatible with that face.  For
instance, if my object is facing in the -z direction, if I have a face that is
most closely aligned with the xy plane, then I'd want to use either the front
picture or the back picture for the image map.  My question is:  is it efficient
enough to specify these image maps one-by-one for each triangle in the mesh, or
should I have a total of 6 meshes, each consisting of the set of all triangles
sharing a particular orientation (i.e. "all the triangles that are colored with
the front image, all the triangles that are colored with the top image", etc.)

Thanks!  GB

clipka <ano### [at] anonymousorg> wrote:
> Am 16.05.2010 09:17, schrieb Garrett Baird:
>
> > I've spent a bit of time googling but I've not been able to answer a rather
> > basic question:  I've got a scene that consists of around 300 polyhedra, each of
> > which is described by about 20 linear inequalities of the form ax + by + cz<=
> > d.  The faces of these polyhedra have different image maps that are being
> > applied to them.  Is it faster if I represent these polyhedra as a union of
> > faces, rather than an intersection of half planes?  Currently my scene is
> > rendering very slowly and I'd like to know if it's bad coding on my part or just
> > the way things work.
>
> Specifying a bounding box (using bounded_by) might help a lot, as
> POV-Ray will probably be unable to auto-generate bounding boxes for the
> polyhedra.
>
> But, as Warp already noted, using a mesh would be the most efficient.
> (You might want to use a mesh instead of a mesh2 though; not that it
> makes any difference in speed - both use the same internal
> representation - but usually a mesh is easier to generate from SDL.)


Post a reply to this message

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