Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!cs.dal.ca!ug.cs.dal.ca!lalonde From: lalonde@ug.cs.dal.ca (Paul Lalonde) Newsgroups: comp.graphics Subject: Re: Texture mapping by spatial position Keywords: 3-d texture mapping Message-ID: <1989Sep12.134907.1435@ug.cs.dal.ca> Date: 12 Sep 89 13:49:07 GMT References: <9119@pyr.gatech.EDU> <170@vsserv.scri.fsu.edu> <14266@netnews.upenn.edu> Reply-To: lalonde@ug.cs.dal.ca.UUCP (Paul Lalonde) Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada Lines: 37 In article <14266@netnews.upenn.edu> ranjit@grad1.cis.upenn.edu.UUCP (Ranjit Bhatnagar) writes: > [Talk about 3-d texture maps deleted for brevity] >I haven't seen discussed before: as generally proposed, it's highly >unsuited to _animation._ The problem is that you generally define one >texture function throughout all of space. If an object happens to move, >its texture changes accordingly. It's a neat effect - try it - but it's >not what one usually wants to see. >The obvious solution to this is to define a separate 3-d texture for >each object, and, further, _cause the texture to be rotated, translated, >and scaled with the object._ DBW does not allow this, so if you want >to do animations of any real complexity with DBW, you can't use the nice >wood or marble textures. I get around this be keeping not only the general texture stored with the object, but also an (x,y,z) triple pointing to where the texture is to be evaluated. I also keep some orientation information with the object. The texturing routine then only has to translate the scene coordinate of the point being textured into texture coordinates. It comes down to keeping the textures in object coordinates. This allows you to carve more than one object out of the same chunk of marble, which can be quite pleasing. It also requires very little extra manipulation of the texture. For shape changes you just keep track of your deformation function and apply it to the point whose texture you are evaluating. -Paul (Ps. My raytracer implementing this (and other goodies) should be available as soon as I finish up my spline surfaces...Real Soon Now) Paul A. Lalonde UUCP: ...{uunet|watmath}!dalcs!dalcsug!lalonde Phone: (902)423-4748 BITNET: 05LALOND@AC.DAL.CA "The only true law is that which leads to freedom" - Richard Bach, _Jonathan Livingston Seagull_