POV-Ray : Newsgroups : povray.binaries.images : 3rd macro, does photomosaics : Re: 3rd macro, does photomosaics Server Time
12 Aug 2024 21:19:49 EDT (-0400)
  Re: 3rd macro, does photomosaics  
From: Doug Eichenberg
Date: 30 Jun 2003 17:55:51
Message: <3f00b1e7$1@news.povray.org>
That's almost exactly how it works.  You create a directory of images, then
run a macro to produce a color table.  The color table contains a list of
the average color for each image in the directory.  The list gets loaded
into an array for faster access and then the main image is subdivided into
squares.  Each squares color is then matched to the closest average in the
list and that image is mapped onto a cube.

The macros allow you to specify the subdivision levels, so you can break the
image into as many pieces as you want... the higher you go, the more
"realistic" it will be.  The only time consuming part is creating the
initial image database... I only used 143 images for the one I posted, and I
read that most photomosaics use over 1000 images.  Parsing the average
colors for 1000+ images would take a while, depending on how accurate you
want to be (but you only have to do that once, after that the text file is
used instead).

I'm going to put a zip file up on my site with doc's and examples, but in
the meantime I will post the code here if you wanna mess around with it.

--
Douglas C. Eichenberg
dou### [at] nlsnet
http://www.getinfo.net/douge


Post a reply to this message

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