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 10:15:25 EDT (-0400)
  Re: Polyhedra -- intersections of planes or unions of faces?  
From: clipka
Date: 17 May 2010 06:05:29
Message: <4bf114e9@news.povray.org>
Am 16.05.2010 22:45, schrieb Garrett Baird:
> 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.)

Using one single mesh for the polyhedron and specifying the texture on a 
per-triangle basis is probably the most efficient, regarding both memory 
consumption and speed.

Note that you need to #declare the textures to be used beforehand.

If your polyhedra all have the same shape and textures, it will also 
save a lot of memory to compute & #declare the polyhedron mesh only 
once, and place copies of it, but you may know this already.

On the other hand, if your polyhedra all have the same shape but 
different textures, the 6-meshes approach may be the most memory 
efficient, as it allows you to #declare only 6 meshes, and place copies 
of it with different textures - you can't do that with per-triangle 
textures.


Post a reply to this message

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