|
From: Dair G. <da...@re...> - 2004-02-17 22:49:41
|
Roger Holmes wrote: >> Take a TriMesh in the shape of a cube (for example). I wish to put a >> different texture on each square face, and have full independent >> control over the u,v coords for that texture on that face. =2E.. >They do not have to be the same vertex, they just have the same >3D co-ordinates, that way you can have different normals and UVs >on the vertices. =46or the case of a cube, you can use a box geometry and just assign a different texture to each face (see the createGeomTexturedBox function in Geom Test.c: the uv parameterisation for a box maps the texture to the whole face). =46or the general case of a TriMesh, as Roger says you will need "duplicate" vertices. The Mesh geometry has the notion of "corners" which allow you to create a vertex that has different attributes depend ing on the face which refernces it - but ultimately this has to be turned into duplicate vertices when submitting to an API like OpenGL or D3D. -dair ___________________________________________________ mailto:dair+refnum.com http://www.refnum.com/ |