Path: utzoo!utgpu!watmath!clyde!att!rutgers!mit-eddie!husc6!purdue!bouma
From: bouma@cs.purdue.EDU (William J. Bouma)
Newsgroups: comp.graphics
Subject: Re: just a random idea
Summary: its been done
Keywords: MTV raytracer
Message-ID: <5615@medusa.cs.purdue.edu>
Date: 6 Dec 88 20:44:27 GMT
References: <7980@pasteur.Berkeley.EDU>
Organization: Department of Computer Science, Purdue University
Lines: 31

In article <7980@pasteur.Berkeley.EDU> seth@miro.Berkeley.EDU (Seth Teller) writes:
>I have this idea, see: you take an image (like any bunch of pixels, could even
>be a picture) and you kind of paste it on a surface, like wallpaper on a wall.
>This way you could make the dullest of polygons look interesting. Like you
>could take a Playmate, or a monkey, or something, and put it on a coffee-pot
>(well, maybe a coffee-pot is too hard, I'll think of something else).
>Waddaya say?
>

   I hacked the MTV tracer to do just this sort of thing a while back. Instead
of specifying the color of an object this way:

f SkyBlue 1 0 0 0 0

You can say:

f function SpherePaintImage /name/of/image/file 1 0 0 0 0

Where SpherePaintImage is a function of the ray intersection with the surface of
(in this case) a sphere. All it does is calculate from the intersection point
which pixel of the image file corresponds. It returns that as the color for that
point on the sphere (instead of SkyBlue). 

   The hack is simple, writing mapping functions is not. I would not want to
try writing one that would map onto the coffee-pot. One simple function that
gets some use just returns the normal to the surface as the color. Another
I use a lot puts grid patterns on polygons.

   Send playmate and monkey images to:
-- 
Bill   ||  ...!purdue!bouma