POV-Ray : Newsgroups : povray.unofficial.patches : Tilemap patch for Megapov 1.2 : Re: Tilemap patch for Megapov 1.2 Server Time
27 Apr 2024 14:17:28 EDT (-0400)
  Re: Tilemap patch for Megapov 1.2  
From: Chris Jeppesen
Date: 12 Sep 2006 11:34:49
Message: <4506d399@news.povray.org>
Christoph Hormann wrote:
> Chris Jeppesen wrote:

> Concerning your specific addition i have a few questions:
> 
> 1) why is it restricted to image maps?

I'm not sure that it is, it is just that I have never tried it for
anything else. My particular application only needs image maps. It is
implemented as a new image type, so it might "just work" anywhere an
image is needed.

> 2) does it handle interpolation across the tile boundaries? (only makes
> sense with (1) of course, difficult with different resolution tiles)

Probably not. Again, I haven't tested it in this condition. At the
moment, I'm not even sure that it handles interpolation properly within
a tile.

This patch will work (without interpolation) for tiles of different
resolutions, but I am not sure what would happen with tiles of different
color types (grayscale, indexed, rgb). I suspect it would still work in
this case, but I haven't tried it.

> 3) why is it restricted to a regular rectangular pattern?

Are you suggesting triangles and hexagons? Or a rectangular map with a
different number of tiles in each row? I thought about the latter, and
that can be implemented using nested tilemaps. Since with this patch a
tilemap is just another image type, it can be used anywhere any image
type can be used, including as the definition for another tilemap. For
instance, the outer tilemap is 1 column by n rows, and each row is an
inner tilemap with q columns by one row, where q is different for each row.

I guess the answer to all three questions is "That's not how I use it",
and that's not a good answer in order to get this patch included.
However, it has been my experience that there are lots of creative
people out there who can squeeze stuff out of a feature that the
programmer never even considered. If this patch were included, some
artist somewhere would surprise me.

> 
> What would be really interesting is a dynamically cached image map (i.e.
> one that actually loads tiles on demand).  You would have to be careful
> when using the internal image reading functions for this though - they
> are not really intended to be used at render time.

Interesting. For my application, I have a script which determines which
tiles will be visible in a scene, and close enough to the camera to
matter, and pre-loads those. Since I know in advance that all tiles will
be used, it doesn't seem to make sense to have a dynamic loading system
like this.

> 
> Christoph
> 

In order to be reviewed, should I post the patch here? Where should I
put patches?

Chris


Post a reply to this message

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