home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / code / graphics / rtnews / rtnv2n6 < prev    next >
Encoding:
Text File  |  1995-05-19  |  28.6 KB  |  615 lines

  1.  _ __                 ______                         _ __
  2. ' )  )                  /                           ' )  )
  3.  /--' __.  __  ,     --/ __  __.  _. o ____  _,      /  / _  , , , _
  4. /  \_(_/|_/ (_/_    (_/ / (_(_/|_(__<_/ / <_(_)_    /  (_</_(_(_/_/_)_
  5.              /                               /|
  6.             '                               |/
  7.  
  8.             "Light Makes Right"
  9.  
  10.             September 20, 1989
  11.                 Volume 2, Number 6
  12.  
  13. Compiled by Eric Haines, 3D/Eye Inc, 2359 Triphammer Rd, Ithaca, NY 14850
  14.     NOTE ADDRESS CHANGE: wrath.cs.cornell.edu!eye!erich
  15.     [distributed by Michael Cohen <m-cohen@cs.utah.edu>, but send
  16.     contributions and subscriptions requests to Eric Haines]
  17. All contents are US copyright (c) 1989 by the individual authors
  18. Archive location: anonymous FTP at cs.uoregon.edu (128.223.4.1), /pub/RTNews
  19.  
  20. Contents:
  21.     Introduction
  22.     New People and Address Changes
  23.     Q&A on Radiosity Using Ray Tracing, Mark VandeWettering & John Wallace
  24.     Dark Bulbs, by Eric Haines
  25.     MTV Ray Tracer Update and Bugfix, by Mark VandeWettering
  26.     DBW Ray Tracer Description
  27.     ======== USENET cullings follow ========
  28.     Wanted: Easy ray/torus intersection, by Jochen Schwarze
  29.     Polygon to Patch NFF Filter, by Didier Badouel
  30.     Texture Mapping Resources, by Eric Haines, Prem Subrahmanyam,
  31.     Ranjit Bhatnagar, and Jack Ritter
  32.  
  33. -------------------------------------------------------------------------------
  34.  
  35. Introduction
  36.  
  37.     There are a lot of new people, with some interesting fields of study.
  38. There's been a lot of talk about texture mapping and the DBW ray tracer on the
  39. net.  This discussion will probably continue into next issue, but I felt Jack
  40. Ritter's posting a good way to end it for now.  I've also been toying with
  41. texturing again, making my version of "Mount Mandrillbrot" (fractal mountain
  42. with everyone's favorite beasty textured onto it), which some clever person
  43. invented at the University of Waterloo (I think) some years ago (does anyone
  44. know who?).  There are also other useful snippets throughout.
  45.  
  46.     However, one major reason that I'm flushing the queue right now is
  47. that the node "hpfcrs" is disappearing off the face of the earth.  So, please
  48. note my only valid address is the "wrath" path at the top of the issue.
  49. Thanks!
  50.  
  51. -------------------------------------------------------------------------------
  52.  
  53. New People and Address Changes
  54.  
  55.  
  56. Panu Rekola, pre@cs.hut.fi
  57.  
  58. To update my personal information in your files:
  59.  
  60. Surface mail:    Panu Rekola
  61.         Mannerheimintie 69 A 7
  62.         SF-00250 Helsinki, Finland
  63. Phone:        +358-0-4513243 (work), +358-0-413082 (home)
  64. Email:        pre@cs.hut.fi
  65. Interests:    illumination models, texture mapping, parametric surfaces.
  66.  
  67. You may remove one of the names you may have in the contact list.  Dr. Markku
  68. Tamminen died in the U.S.  when he was returning home from SIGGRAPH.  How his
  69. project will go on, is still somewhat unclear.
  70.  
  71. --------
  72.  
  73. Andrew Pearce, pearce@alias
  74.  
  75. I wrote my MS thesis on Multiprocessor Ray Tracing, then moved to Alias where
  76. I sped up Mike Sweeney's ray caster.  I've just completed writing the Alias
  77. Ray Tracer using a recursive uniform subdivision method (see Dave Jevans paper
  78. in Graphics Interface '89, "Adaptive Voxel Subdivision for Ray Tracing") with
  79. additional bounding box and triangle intersection speed ups.
  80.  
  81. Right now, I'm fooling around with using the guts of the ray tracer to do
  82. particle/object collision detection with complex environments, and
  83. particle/particle interaction with the search space reduced by the spatial
  84. subdivision.  (No, I don't use the ray tracer to render the particles.)
  85.  
  86. In response to Susan Spach's question about mip mapping, we use mip maps for
  87. our textures, we get the sample size by using a "cone" size parameter which is
  88. based on the field of view, aspect ratio, distance to the surface and angle of
  89. incidence.  For secondary rays this size parameter is modified based on the
  90. tangents to the surface and the type of secondary ray it is (reflection or
  91. refraction).  This may be difficult to do if you are not ray tracing surfaces
  92. for which the tangent information is readily available (smooth shaded
  93. polygonal meshes?).
  94.  
  95. - Andrew Pearce
  96. - Alias Research Inc., Toronto, Ontario, Canada.
  97. - pearce%alias@csri.utoronto.ca   |   pearce@alias.UUCP
  98. - ...{allegra,ihnp4,watmath!utai}!utcsri!alias!pearce
  99.  
  100. --------
  101.  
  102. Brian Corrie, bcorrie@uvicctr.uvic.ca
  103.  
  104.     I am a graduate student at the University of Victoria, nearing the
  105. completion of my Masters degree.  The topic of my thesis is producing
  106. realistic computer generated images in a distributed network environment.
  107. This consists of two major research areas:  providing a distributed (in the
  108. parallel computing sense) system for ray tracing, as well as a workbench for
  109. scene description, and image manipulation.  The problems that need to be
  110. addressed by a system for parallel processing in a distributed loosely coupled
  111. system are quite different than those addressed by a tightly coupled parallel
  112. processor system.  Because of the (likely) very high cost of communication in
  113. a distributed processing environment, most parallel algorithms currently used
  114. are not feasible (due to the high overhead).  The gains of parallel ray
  115. tracing in a distributed environment are:  the obvious speedup by bringing
  116. more processing power to bear on the problem, the flexibility of distributed
  117. systems, and the availability of the resources that will become accessible as
  118. distributed systems become more prominent in the computer community.
  119.  
  120.     Whew, what a mouthful.  In a nutshell, I am interested in:  ray
  121. tracing in general, parallel algorithms, distributed systems for image
  122. synthesis (any one know of any good references), and this new fangled
  123. radiosity stuff.
  124.  
  125. --------
  126.  
  127. Joe Cychosz
  128.  
  129.     Purdue University CADLAB
  130.     Potter Engineering Center
  131.     W. Lafayette, IN  47906
  132.  
  133.     Phone: 317-494-5944
  134.     Email: cychosz@ecn.purdue.edu
  135.  
  136. My interests are in supercomputing and computer graphics.  Research work is
  137. Vectorized Ray Tracing.  Other interests are:  Ray tracing on MIMD tightly
  138. coupled shared memory machines, Algorithm vectorization, Mechanical design
  139. processes, Music synthesis, and Rendering in general.
  140.  
  141. --------
  142.  
  143. Jerry Quinn
  144. Department of Math and Computer Science
  145. Bradley Hall
  146. Dartmouth College
  147. Hanover, NH 03755
  148. sunapee.dartmouth.edu!quinn
  149.  
  150. My interests are currently ray tracing efficiency, parallelism,
  151. animation, radiosity, and whatever else happens to catch my eye at the
  152. given moment.
  153.  
  154. --------
  155.  
  156. Marty Barrett - octrees, parametric surfaces, parallelism.
  157.     mlb6@psuvm.bitnet
  158.  
  159. Here is some info about my interests in ray tracing:
  160.  
  161. I'm interested in efficient storage structures for ray tracing, including
  162. octree representations and hybrid regular subdivision/octree grids.  I've
  163. looked at ray tracing of parametric surfaces, in particular Bezier patches and
  164. box spline surfaces, via triangular tessellations.  Parallel implementations of
  165. ray tracing are also of interest to me.
  166.  
  167. --------
  168.  
  169.     Charles A. Clinton
  170.     Sierra Geophysics, Inc.
  171.     11255 Kirkland Way
  172.     Kirkland, WA 98033 USA
  173.     Email: ...!uw-beaver!sumax!ole!steven!cac
  174.     Voice: (206) 822-5200 
  175.     Telex: 5106016171
  176.     FAX:   (206) 827-3893
  177.  
  178. I am doing scientific visualization of 3D seismic data. To see the kind of
  179. work that I am doing, check out:
  180.  
  181.     'A Rendering Algorithm for Visualizing 3D Scaler Fields'
  182.     Paolo Sabella
  183.     Schlumberger-Doll Research
  184.     Computer Graphics, Vol. 22, Number 4 (SIGGRAPH '88 Conference Proc.)
  185.     pp 51-58
  186.  
  187. In addition, I try to keep up with ray-tracing and computer graphics in
  188. general. I occasionally try my hand at doing some artistic ray-tracing.
  189. (I would like to extend my thanks to Mark VandeWettering for distributing
  190. MTV. It has provided a wonderful platform for experimentation.)
  191.  
  192. --------
  193.  
  194. Jochen Schwarze
  195.  
  196.    I've been developing several smaller graphics packages, e.g.  a 3D
  197. visualization of turning parts etc.  Now I'm implementing the 2nd version of a
  198. ray tracing program that supports modular programming using a description
  199. language, C++ vector analysis and body class hierarchy, CSG trees, texture
  200. functions and mapping, a set of body primitives, including typeface rendering
  201. for logos, and a network ipc component to allow several cpu's to calculate a
  202. single image.
  203.  
  204.    My interests lie - of course :-) - in speedup techniques, and the
  205. simulation of natural phenomena, clouds, water, etc.  Just starting with this.
  206.  
  207. Jochen Schwarze                     Domain: schwarze@isaak.isa.de
  208. ISA GmbH, Stuttgart, West Germany   UUCP:   schwarze@isaak.uucp
  209.                                     Bang:   ...!uunet!unido!isaak!schwarze
  210.  
  211.                     S-Mail: ISA GmbH
  212.                         c/o Jochen Schwarze
  213.                         Azenberstr. 35
  214.                         7000 Stuttgart 1
  215.                         West Germany
  216.  
  217. -------------------------------------------------------------------------------
  218.  
  219. Q&A on Radiosity Using Ray Tracing, Mark VandeWettering & John Wallace
  220.  
  221.  
  222. From Mark VandeWettering:
  223.  
  224. I am currently working on rewriting my ray tracer to employ radiosity-like 
  225. effects.  Your paper (with Wallace and Elmquist) is very nice, and suggests
  226. a really straightforward implementation.  I just have a couple of questions 
  227. that you might be able to answer.
  228.  
  229. When you shoot energy from a source patch, it is collected at a specific
  230. patch vertex.  How does this energy get transferred to a given patch for 
  231. secondary shooting?  In particular, is the vertex shared between multiple
  232. patches, or is each vertex only in a single patch?  I can imagine the
  233. solution if each vertex is distinct, but have trouble with the case where
  234. vertices are shared.  Any quick insights?
  235.  
  236. The only other question I have is:  HOW DO YOU GET SUCH NICE MODELS TO RENDER?
  237. [We use ME30, HP's Romulus based solids modeler - EAH]
  238.  
  239. Is there a public domain modeling package that is available for suns or sgi's 
  240. that I can use to make more sophisticated models?  Something cheap even?
  241.  
  242. [The BRL modeler and ray tracer runs on a large number of machines, and they
  243. like having universities as users - see Vol.2 No.2 (archive 6).  According
  244. to Mike Muuss' write-up, some department in Princeton already has a copy.
  245.  
  246. The Simple Surface Modeler (SSM) works on SGI equipment.  It was developed at
  247. the Johnson Space Center and, since they are not supposed to make any money
  248. off it, is being sold cheap (?) by a commercial distributor.  COSMIC, at
  249. 404-542-3265, can send you some information on it.  It also runs on a Pixel
  250. Machine (which is what I saw it running on at SIGGRAPH 88), though I don't
  251. believe support for this machine will be shipped.  It's evidentally not
  252. shipping yet (red tape - the product is done), but should be "realsoonnow".
  253. More information when I get the abstract.  Does anyone else know any
  254. resources?]
  255.  
  256. --------
  257.  
  258. Reply from John Wallace:
  259.  
  260. Computing the patch energy in progressive radiosity using ray tracing:
  261.  
  262. Following a step of progressive radiosity, every mesh vertex in the scene will
  263. have a radiosity.  Energy is not actually collected at the mesh vertices.
  264. What is computed at each vertex is the energy per unit area (radiosity)
  265. leaving the surface at that location.  The patch radiosity is the average
  266. energy per unit area over the patch.  Finally, the patch energy is the patch
  267. radiosity times the patch area (energy per unit area times area).
  268.  
  269. The vertex radiosities can be considered a sampling of the energy per unit
  270. area at selected points across the patch.  To obtain the average energy per
  271. unit area over the patch, take the average of the vertex radiosities.  This
  272. assumes that the vertices represent uniform sub-areas of the patch.  This is
  273. not necessarily true, and when it is not a more accurate answer is obtained by
  274. taking an area weighted average of the vertex radiosity.  The weight given to
  275. a vertex is equal to the area of the patch that it represents.  In our work we
  276. used a uniform mesh and weighted all vertices equally.
  277.  
  278. It doesn't matter whether vertices are shared by neighboring patches, since
  279. we're talking about energy per unit area.  Picture four patches that happen to
  280. all share a particular vertex.  The energy per unit area leaving any of the
  281. patches at the vertex is not affected by the fact that other patches share
  282. that vertex.  If we were somehow collecting energy at the vertex, then it
  283. would have to be portioned out between the patches.
  284.  
  285. Once the patch radiosity is know, the patch energy is obtained by multiplying
  286. patch radiosity times patch area.
  287.  
  288. -------------------------------------------------------------------------------
  289.  
  290. Dark Bulbs, by Eric Haines
  291.  
  292.     An interesting idea mentioned to me by Andrew Glassner was the concept
  293. of "darkbulbs" in computer graphics.  This idea is a classic joke technology,
  294. in which the darkbulb sucks light out of an area.  For example, if you want
  295. to sleep during the daytime, you simply turn on your negative 100 watt dark
  296. bulb and your bedroom is flooded in darkness.  Andrew noted that this
  297. technology is entirely viable in computer graphics, and would even be useful
  298. in obtaining interesting results.
  299.  
  300.     I happened to mention the idea to Roy Hall, and he told me that this
  301. was an undocumented feature of the Wavefront package!  Last year Wavefront came
  302. out with an image of two pieces of pottery behind a candle, with wonderful
  303. texturing on the objects.  It turns out that the artist had wanted to
  304. tone down the brightness in some parts of the image, and so tried negative
  305. intensity light sources.  This turned out to work just fine, and the artist
  306. mentioned this to Roy, who, as an implementer of this part of the package,
  307. had never considered that anyone would try this and so never restricted the
  308. intensity values to be non-negative.
  309.  
  310. -------------------------------------------------------------------------------
  311.  
  312. MTV Ray Tracer Update and Bugfix, by Mark VandeWettering
  313.  
  314.  
  315. [this was extracted by me from personal mail, with parts appearing on
  316. comp.graphics - EAH]
  317.  
  318. As was recently pointed out to me by Mike Schoenborn, the cylinder code in the
  319. version of the MTV raytracer is broken somewhat severely.  Or at least it
  320. appeared to be so, what actually happens is that I forgot to normalize two
  321. vectors, which leads to interesting distortions and weird looking cylinders.
  322. Anyway, the bug is in cone.c, in the function MakeCone().  After the vectors
  323. cd -> cone_u and cd -> cone_v are created, they should be normalized.  A
  324. context diff follows at the end of this.  This makes the SPD "tree" look MUCH
  325. better.  (And all this time I thought it was Eric's fault :-)
  326.  
  327. This bugfix will be worked into the next release, and I should also update the
  328. version on cs.uoregon.edu SOMETIME REAL SOON NOW (read, don't hold your breath
  329. TOO anxiously).  Hope that this program continues to be of use...  :-)
  330.  
  331. Somebody has some texture mapping code that they are sending me, I will
  332. probably try to integrate it in before I make my next release.  I am also
  333. trying to get in spline surfaces, but am having difficulty to the point of
  334. frustration.Any recommendations on implementing them?
  335.  
  336.  
  337. *** ../tmp/cone.c    Fri Aug 25 20:25:52 1989
  338. --- cone.c    Fri Aug 25 21:31:04 1989
  339. ***************
  340. *** 240,247 ****
  341. --- 240,251 ----
  342.       /* find two axes which are at right angles to cone_w
  343.        */
  344.   
  345.       VecCross(cd -> cone_w, tmp, cd -> cone_u) ;
  346.       VecCross(cd -> cone_u, cd -> cone_w, cd -> cone_v) ;
  347. +     VecNormalize(cd -> cone_u) ;
  348. +     VecNormalize(cd -> cone_v) ;
  349.   
  350.       cd -> cone_min_d = VecDot(cd -> cone_w, cd -> cone_base) ;
  351.       cd -> cone_max_d = VecDot(cd -> cone_w, cd -> cone_apex) ;
  352.  
  353. -------------------------------------------------------------------------------
  354.  
  355. DBW Ray Tracer Description
  356.  
  357. [A ray tracer that has been mentioned in these pages (screens?) before is DBW.
  358. Not having an Amiga and not being able to deal with "zoo" files, I never got a
  359. copy.  Prem Subrahmanyam has now made it available via anonymous FTP from
  360. geomag.gly.fsu.edu in /pub/pics/DBW.src.  Output is four bits for each
  361. channel.
  362.  
  363. The original program was written by David B. Wecker, translating from a Vax
  364. 11/750 to the Amiga, with a conversion to Sun workstations by Ofer Licht
  365. (ofer@gandalf.berkeley.edu). - EAH]
  366.  
  367. Below is an excerpt from the documentation RAY.DOC:
  368.  
  369.  
  370. The RAY program knows how to create images composed of four primitive
  371. geometric objects:  spheres, parallelograms, triangles, and flat circular
  372. rings (disks with holes in them).  Some of the features of the program are:
  373.  
  374. Diffuse and specular reflections (with arbitrary levels of gloss or polish).
  375. Rudimentary modeling of object-to-object diffusely reflected light is also
  376. implemented, that among other things accurately simulates color bleed effects
  377. from adjacent contrasting colored objects.
  378.  
  379. Mirror reflections, including varying levels of mirror smoothness or
  380. perfection.
  381.  
  382. Refraction and translucency (which is akin to variable microscopic smoothness,
  383. like the surface of etched glass).
  384.  
  385. Two types of light sources:  purely directional (parallel rays from infinity)
  386. of constant intensity, and spherical sources (like light bulbs, which cast
  387. penumbral shadows as a function of radius and distance) where intensity is
  388. determined by the inverse square law.
  389.  
  390. Photographic depth-of-field.  That is, the virtual camera may be focused on a
  391. particular object in the scene, and the virtual camera's aperture can be
  392. manipulated to affect the sharpness of foreground and background objects.
  393.  
  394. Solid texturing.  Normally, a particular object (say a sphere) is considered
  395. to have constant properties (like color) over the entire surface of the
  396. object, often resulting in fake looking objects.  Solid texturing is a way to
  397. algorithmically change the surface properties of an object (thus the entire
  398. surface area is no longer of constant nature) to try and model some real world
  399. material.  Currently the program has built in rules for modelling wood,
  400. marble, bricks, snow covered scenes, water (with arbitrary wave sources), plus
  401. more abstract things like color blend functions.
  402.  
  403. Fractals.  The program implements what's known as recursive triangle
  404. subdivision, which creates all manners of natural looking surface shapes (like
  405. broken rock, mountains, etc.).  The character of the fractal surface (degree
  406. of detail, roughness, etc.)  is controlled by parameters fed to the program.
  407.  
  408. AI heuristics to complete computation of a scene within a user specified
  409. length of time.  [???]
  410.  
  411. ======== USENET cullings follow ===============================================
  412.  
  413. Wanted: Easy ray/torus intersection, by Jochen Schwarze
  414.  
  415.  
  416. What I want to do is to turn a path consisting of line and arc segments around
  417. an axis and then ray-trace the generated turning part.  The rotated line
  418. segments produce cylinders or cones that are easy to intersect with a ray,
  419. whereas the arcs produce tori.  To evaluate the intersection of the ray with a
  420. torus I'd have to numerically solve a polynomial equation of fourth degree.
  421.  
  422. Does anybody know a way that avoids solving a general fourth- degree equation?
  423. Perhaps something that respects torus geometry and allows to split the
  424. equation into two quadric ones?  Any other fast way to do it?
  425.  
  426. Thanks very much.
  427.  
  428. Jochen Schwarze                     Domain: schwarze@isaak.isa.de
  429. ISA GmbH, Stuttgart, West Germany   UUCP:   schwarze@isaak.uucp
  430.                                     Bang:   ...!uunet!unido!isaak!schwarze
  431.  
  432. -------------------------------------------------------------------------------
  433.  
  434. Polygon to Patch NFF Filter, by Didier Badouel
  435.  
  436.  
  437. This is a new filter program for NFF databases, it  converts polygons (p)
  438. into patches (pp) computing normal vector for vertices. 
  439.  
  440. ________________________________________________________________
  441.   Didier  BADOUEL                   badouel@irisa.fr
  442.   INRIA / IRISA                Phone : +33 99 36 20 00
  443.  Campus Universitaire de Beaulieu    Fax :   99 38 38 32
  444.  35042 RENNES CEDEX - FRANCE        Telex : UNIRISA 950 473F
  445. ________________________________________________________________
  446.  
  447. [Code removed.  Find it at cs.uoregon.edu or write him - EAH]
  448.  
  449. -------------------------------------------------------------------------------
  450.  
  451. Texture Mapping Resources, by Eric Haines, Prem Subrahmanyam,
  452.     Ranjit Bhatnagar, and Jack Ritter
  453.  
  454.  
  455. From: Eric Haines
  456.  
  457. Robert Minsk had a question about how to do inverse mapping on a quadrilateral.
  458. This was my response:
  459.  
  460. For the inverse bilinear mapping of XYZ to UV, see p. 59-64 of "An Introduction
  461. to Ray Tracing", edited by Andrew Glassner, Academic Press (hot off the press).
  462. Tell me if you find any bugs, since I need to send typoes to AP.  This same
  463. info is in the "Intro to RT" SIGGRAPH course notes from 1987 & 1988,
  464. with one important typo fixed (see old issues of the Ray Tracing News to
  465. find out the typo).
  466.  
  467. An excellent discussion of the most popular mappings (affine, bilinear, and
  468. projective), and for a discussion on why to avoid simple Gouraud interpolation,
  469. get a copy of Paul Heckbert's Master's Thesis (again, hot off the press),
  470. "Fundamentals of Texture Mapping and Image Warping".  It's got what you need
  471. and is also a good start on sampling/filtering problems.  Order it as
  472. Report No. UCB/CSD 89/516 (June 1989) from
  473.  
  474.         Computer Science Division
  475.         Dept of Electrical Engineering and Computer Sciences
  476.         University of California
  477.         Berkeley, California  94720
  478.  
  479. It was $5.50 when I ordered mine.  Oh, I should also note: it has source
  480. code in C for most of the algorithms described in the text.
  481.  
  482. --------
  483.  
  484. From: prem@geomag.fsu.edu (Prem Subrahmanyam)
  485. Newsgroups: comp.graphics
  486. Subject: Re: Texture mapping
  487. Organization: Florida State University Computing Center
  488.  
  489. I would strongly recommend obtaining copies of both DBW_Render and QRT, as
  490. both have very good texture mapping routines.  DBW uses absolute spatial
  491. coordinates to determine texture, while QRT uses a relative position per each
  492. object type mapping.  DBW has some really interesting features, like
  493. sinusoidal reflection to simulate waves, a turbulence-based marble/wood
  494. texture based on the wave sources defined for the scene.  It as well has a
  495. brick texture, checkerboard, and mottling (turbulent variance of the color
  496. intensity).  Writing a texture routine in DBW is quite simple, since you're
  497. provided with a host of tools (like a turbulence function, noise function,
  498. color blending, etc.).  I have recently created a random-color texture that
  499. uses the turbulence to redefine the base color based on the spatial point
  500. given, which it then blends into the object's base color using the color blend
  501. routines.  Next will be a turbulent-color marble texture that will modify the
  502. marble vein coloring according to the turbulent color.  Also in the works are
  503. random color checkerboarding (this will require a little more thought),
  504. variant brick height and mortar color (presently they are hard-wired), the
  505. list is almost endless.  I would think the ideal ray-tracer would be one that
  506. used QRT's user-definable texture patches which are then mapped onto the
  507. object, as well as DBW's turbulence/wave based routines.  The latter would
  508. have to be absolute coordinate based, while the former can use QRT's relative
  509. position functions.  In any case, getting copies of both of these would be the
  510. most convenient, as there's no reason to reinvent the wheel.
  511.  
  512. --------
  513.  
  514. From: ranjit@grad1.cis.upenn.edu (Ranjit Bhatnagar)
  515.     4211 Pine St., Phila PA 19104
  516. Newsgroups: comp.graphics
  517. Subject: Re: Texture mapping by spatial position
  518. Organization: University of Pennsylvania
  519.  
  520. The combination of 3-d spatial texture-mapping (where the map for a particular
  521. point is determined by its position in space rather than its position on the
  522. patch or polygon) with a nice 3-d turbulence function can give really neat
  523. results for marble, wood, and such.  Because the texture is 3-d, objects look
  524. like they are carved out of the texture function rather than veneered with it.
  525. It works well with non-turbulent texture functions too, like bricks, 3-d
  526. checkerboards, waves, and so on.  However, there's a disadvantage to this kind
  527. of texture function that I haven't seen discussed before:  as generally
  528. proposed, it's highly unsuited to _animation._ The problem is that you
  529. generally define one texture function throughout all of space.  If an object
  530. happens to move, its texture changes accordingly.  It's a neat effect - try it
  531. - but it's not what one usually wants to see.
  532.  
  533. The obvious solution to this is to define a separate 3-d texture for each
  534. object, and, further, _cause the texture to be rotated, translated, and scaled
  535. with the object._ DBW does not allow this, so if you want to do animations of
  536. any real complexity with DBW, you can't use the nice wood or marble textures.
  537.  
  538. This almost solves the problem.  However, it doesn't handle the case of an
  539. object whose shape changes.  Consider a sphere that metamorphoses into a cube,
  540. or a human figure which walks, bends, and so on.  There's no way to keep the
  541. 3-d texture function consistent in such a case.
  542.  
  543. Actually, the real world has a similar defect, so to speak.  If you carve a
  544. statue out of wood and then bend its limbs around, the grain of the wood will
  545. be distorted.  If you want to simulate the real world in this way and get
  546. animated objects whose textures stay consistent as they change shape, you have
  547. to use ordinary surface-mapped (2-d) textures.  But 3-d textures are so much
  548. nicer for wood, stone, and such!  There are a couple of ways to get the best
  549. of both worlds:  [I assume that an object's surface is defined as a constant
  550. set of patches, whether polygonal or smooth, and though the control points may
  551. be moved around, the topology of the patches that make up the object never
  552. changes, and patches are neither added to or deleted from the object during
  553. the animation.]
  554.  
  555.     1) define the base-shape of your object, and _sample its surface_ in
  556.        the 3-d texture.  You can then use these sample tables as ordinary
  557.        2-d texture maps for the animation.
  558.  
  559.     2) define the base-shape of your object, and for each metamorphosized
  560.        shape, keep pointers to the original shape.  Then, whenever a ray
  561.        strikes a point on the surface of the metamorphed shape, find the
  562.        corresponding point on the original shape and look up its
  563.        properties (i.e.  color, etc.)  in the 3-d texture map.  [Note:  I
  564.        use ray-tracing terminology but the same trick should be applicable
  565.        to other techniques.]
  566.  
  567. The first technique is perhaps simpler, and does not require you to modify
  568. your favorite renderer which supports 2-d surface texture maps.  You just
  569. write a preprocessor which generates 2-d maps from the 3-d texture and the
  570. base-shape of the object.  However, it is susceptible to really nasty aliasing
  571. and loss of information.  The second technique has to be built into the
  572. renderer, but is amenable to all the antialiasing techniques possible in an
  573. ordinary renderer with 3-d textures, such as DBW.  Since the notion of 'the
  574. same point' on a particular patch when the control points have moved is
  575. well-defined except in degenerate cases, the mapping shouldn't be a problem --
  576. though it does add an extra level of antialiasing to worry about.  [Why?
  577. Imagine that a patch which is very large in the original base-shape has become
  578. very small - sub-pixel size - in the current animated shape.  Then a single
  579. pixel-sized sample in the current shape could be mapped to a large part of the
  580. original - using, for instance, stochastic sampling or analytic techniques.]
  581.  
  582. If anyone actually implements these ideas, I'd like to hear from you (and get
  583. credit, heh heh, if I thought of it first).  I doubt that I will have the
  584. opportunity to try it.
  585.  
  586. --------
  587.  
  588. From: ritter@versatc.UUCP (Jack Ritter)
  589. Organization: Versatec, Santa Clara, Ca. 95051
  590.  
  591. [Commenting on Ranjit's posting]
  592.  
  593. It seems to me that you could solve this problem by transforming the
  594. center/orientation of the texture function along with the object that is being
  595. instantiated.  No need to store values, no tables, etc.  The texture function
  596. must of course be simple enough to be so transformable.
  597.  
  598. Example, wood grain simulated by concentric cylindrical shells around an axis
  599. (the core of the log):
  600.  
  601.     Imagine the log's center line as a half-line vector, (plus a position, if
  602. necessary), making it transformable.  Imagine each object type in its object
  603. space, BOLTED to the log by an invisible bracket.  As you translate and rotate
  604. the object, you also sling the log around.  But be careful, some of these logs
  605. are heavy, and might break your teapots.  I use only natural logs myself.
  606.  
  607.    Jack Ritter, S/W Eng. Versatec, 2710 Walsh Av, Santa Clara, CA 95051
  608.    Mail Stop 1-7.  (408)982-4332, or (408)988-2800 X 5743
  609.    UUCP:  {ames,apple,sun,pyramid}!versatc!ritter
  610.  
  611. -------------------------------------------------------------------------------
  612. END OF RTNEWS
  613.