POV-Ray : Newsgroups : povray.newusers : bitmap to polygons? : Re: bitmap to polygons? Server Time
28 Sep 2024 07:37:05 EDT (-0400)
  Re: bitmap to polygons?  
From: Le Forgeron
Date: 7 Apr 2012 14:21:06
Message: <4f808592$1@news.povray.org>
Le 07/04/2012 19:53, blooflame nous fit lire :
> I think I understand a little of the image map thing used to provide textures
> for surfaces, and why a bitmap becomes a square polygon (0,0) to (1,1).  What I
> want is to bring a bitmap in as a "billboard" more or less, with its aspect
> ratio retained (and I guess, assuming square pixels in the original.  To be able
> to do that, it seems I would need to read the bitmap and have each area of color
> become a polygon filled with that color - I think.
> 

The reason for square (0,0 to 1,1) for mapping image is that povray
works in a continuous world and there is no notion of pixel.
And no, each pixel of a bitmap is not turned into a polygon.
How would you use polygon to project an image on a sphere or curvier
surface ? (just rhetorical question)

> 1) If I load the bitmapped image as an image map and stretch it to match its
> original aspect ratio (for example, if it was 320 x 240) will it look like it
> originally did and therefore I can ignore the problem?  (when I last tried this
> about 3 years ago, I knew the SDL statements to do this, but I've forgotten
> them).

Well, you might have issue with sampling when rendering, but basically,
yes, once stretched, and view at a big enough size, it will be like the
original.

SDL to change the ratio is "scale <x_stretch, y_stretch, z_stretch> "
It should be applied inside the texture or pigment, so as to not affect
the object.

> 
> 2) if not, then are there any utilities or graphics programs out there which
> will create POV-Ray polygons from bitmapped images?

From old koan: Mu.

> 
> 3) Am I even barking up the right tree?

Povray is not a mesh renderer: there is more in its world than flat
triangle & polygon.


Post a reply to this message

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