From: Ari H. <ahe...@an...> - 2001-07-22 19:59:15
|
On Sun, Jul 22, 2001 at 03:16:14PM -0400, David Scherer wrote: > [Ari said] > > > > i haven't thought seriously about the kind of interfaces that > > > > would be nice for texturing the existing primitives, and i > > [I said] > > > I can see a few basic approaches > > ... but after some reflection I'm uncomfortable because I don't have a > good picture of how texturing will be used in practice. The initial > design of VPython benefitted enormously from concrete examples drawn > from Bruce and Ruth's course. Do we have any such concrete use cases > here? - procedurally texturing primitives, espcially convex and faces - "toy" or "easy as possible" texture applications, with the goal of getting reasonably nice visual results with minimum effort. - importing mappings from modeling tools - one-off or rare uses of texture for one or two primitives in a program. > > I can definitely see people wanting to import models complete with > textures. That can best be done by adding texture coordinates to faces. > Mapping is up to the modeling software (and file format). this is a 10 minute hack to faceset.cpp (which i just read). > > I can also see that people might like to be able to make a "wood" sphere > instead of a "brown" sphere. Frankly, it's hard to see how what we've > discussed so far is going to make this acceptably easy. We could use > the functionality to create a library of standard materials, but there > are some big problems. We need a different wood texture for each > standard primitive (or each mapping mode). The user has to choose > between them. Someone has to do the art. 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). > > 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. ... So with that we've got - Spherical -- just a way to get some kind of material on everything, quickly and easily - 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. - 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 don't think it's the place of Visual to start providing texture libraries; if people want to use a real modeler they can. The focus should be on stuff that's useful for visualization, and I see primarily "throw a quick material on it" and procedural applications there. How does POVRay specify textures for primitives? ... 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. Ari |