POV-Ray : Newsgroups : povray.advanced-users : image_map transparency vs. difference : image_map transparency vs. difference Server Time
28 Jul 2024 22:22:12 EDT (-0400)
  image_map transparency vs. difference  
From: Scott Gammans
Date: 13 Oct 2003 12:21:09
Message: <3f8ad0f5$1@news.povray.org>
I recently discovered image map alpha channel transparency and have a couple
of questions/observations:

(1) I did some comparison tests between differencing out ten holes in the
side of my model airplane to create windows vs. using a PNG image map where
the alpha channel holes in the map create the transparencies. I was
expecting the image map method to be slightly faster, but it was
consistently over 40% faster (and the gap only widened as I added more
windows). Can anyone who is familiar with the internal workings of POV-Ray
explain why this is so? Intuitively it would seem that using image map
transparency "stores" the differencing calculations statically so they're
only calculated once (when you create the image map in the first place, for
which I used POV-Ray, btw), and at runtime all of the differencing
calculations are unneeded; POV-Ray just wraps the image map around my
airplane fuselage cylinder and then creates a "hole" wherever a light ray
strikes a transparent pixel in the alpha channel of the image map... is that
a fair approximation of what's happening?

(2) Here's something I really don't understand: Obviously the trade-off of
using image maps vs. differencing is that you must use fairly large image
files to get acceptable results; otherwise, if the camera gets too close to
the model you start to see jagged edges around the window "holes". But when
I created a 4000x4000 version of my image map, the rendering time was almost
*exactly* the same as when I was using a 1000x1000 PNG file. The amount of
memory used jumped considerably, of course, but the average rendering time
between the 1000x1000 and 4000x4000 image maps was essentially unchanged. Is
that about right?

TIA...
Scott Gammans


Post a reply to this message

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