Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!icdoc!ra2 From: ra2@doc.ic.ac.uk (Roger Attrill) Newsgroups: comp.graphics Subject: Re: Texture mapping onto 3-D objects Message-ID: <2674@gould.doc.ic.ac.uk> Date: 19 Dec 90 22:00:53 GMT References: <1737@winnie.fit.edu> Sender: news@doc.ic.ac.uk Organization: Dept. of Computing, Imperial College, London, UK. Lines: 47 In article <1737@winnie.fit.edu> rao@sun9.cs.fit.edu (Rao Ranjan /ADVISOR-Shoaff) writes: >Hi netters, > >Could anybody provide me some information about texture >mapping. I would like to know, if there is any >algorithms for mapping 2-D polygonal textures ( random ) on to 3-D objects >( for example 3-D solids which have curved surfaces) available. Is >there any software packages available in the market that do this ? >Currently I am working on my thesis in the field of computational >Visualization. > Yes. I've written a machine code version of RayShade V3.00. (Yes I'm crazy!). I've incorporated this feature (along with others) into the program, and it works a treat. There is a problem in that seeing as the 2D texture (a logo for instance) *is* 2D, then the person creating the scenefile has to do most of the positioning work, - scaling,rotating etc. I've initiated 2D textures to have unit size in +x and +z directions with bottom left of the picture at the origin. The normal points in the -y direction. The texture is then mapped *through* an object - not *around* an object. This means it is best suited to mapping to flat surfaced objects. However, nice effects are achieved when mapping a face onto a distorted sphere. If you get the source code to Craig Kolbs' RayShade, then this is an excellent example of how to map many different types of textures. It's not hard to add one more, and add a routine to compute the RGB values at a given point on your 2D image, in order to map it onto an objects' surface at the hitpoint. If anyone has a method of wrapping an image *around* an object, I'd be most interested. I'd imagine this would imply some intensive computation and would not be globally useful. Would different algorithms be needed for each primitive type. eg for cones *and* superquadrics!!! God forbid! What about mapping pictures of farms and cows onto fractal landscapes. Maybe even some people skiing down snowy mountaintops. Shadows might be hard though!! Time to abort! Merry Xmas Rog. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | Roger C. Attrill | I don't always think therefore I'm not necessarily. | | ra2@doc.ic.ac.uk | I couldn't have done better unless I did it myself. | | Imperial College | and other variations on a theme. | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-