From: David S. <dsc...@vy...> - 2001-07-22 21:00:12
|
> can we get decent looking results by choosing one standard > mapping? i mean, of course not, but if you just want to > import square textures you found as web page backgrounds to > spiff up your VPython programs, is "use spherical mapping for > everything" acceptable to people? (I say that because it's a > mapping that will look broken no matter what you do, so you > might as well not waste time trying to edit your textures at all). Heh. That's a really good way of describing spherical mapping :) I think if you want a default projective texturing mode it should be planar. It's the only one that's reasonably easy to understand, and you can do tiling. But I warn you, any approach will be more complicated than it seems. How *exactly* does it rotate, translate, and scale with the object? > > I can also see some visualization applications for textures - maybe > > someone wants to draw contours on a height field, or heat > levels in a > > sliding friction simulation. > > Right. So for that, tcoords and textures should just be > arrays accessible like the other atributes of faces. Or planar texturing would be fine. > - Per-vertex textures for procedural texturing. Is this > applicable to > spheres or hexahedrons or whatever, or only to faces and possibly > convex? Of course this per-vertx texturing lets you > import models too. Spheres, definitely not. Hexahedrons yes, they are array primitives with separate control for each vertex. OTOH I was thinking that hexahedron might be wrapped into faces with some interface tweaking. > - You probably also want a nice-looking mapping for each > primitive, with > a "template" texture provided to paint on, so if you want to do a > special goodlooking texture for one or a few primtives > you can, by hand. I think anyone who can produce a "good looking" texture also can produce 3D models. Is there really a demand for this? I'm still waiting for someone who will *use* this to speak up. > How does POVRay specify textures for primitives? Chiefly procedurally. In a raytracer color is most conveniently a function of position, so they give you some basic 3D noise functions and build up a material library from there. Think Bryce without a UI. I'm sure it also has bitmapped textures. Just by knowing it's a raytracer I would guess that it uses the projective approach. > There's something else we haven't discussed: we presumably > want a Texture object, which can both import 2d data fed in > in code, and load some standard image files. There's an > rgbimg module for reading .rgb files, and an imageop module > that can do a few pathetic image operations. There's a library PIL that loads a lot of image file formats, and can easily convert to/from Numeric. This is a really dumb thing to write ourselves. Dave |