## Re: [Algorithms] Generating uv coordinates which follow a shape

 Re: [Algorithms] Generating uv coordinates which follow a shape From: Emanuele Salvucci - 2004-04-30 11:07:40 ```Interesting! ...but looks like there're missing images on the last two pages of your paper... would it be possible to see the results? Thanks! Best, Emanuele. ----- Original Message ----- From: "Gaël LEQUEUX" To: Sent: Friday, April 30, 2004 11:16 AM Subject: RE: [Algorithms] Generating uv coordinates which follow a shape Hi, A few years ago I wrote a MAX plugin that did exactly what your are trying to do :) (mapping a flag for example). Yes, border UV was the easy part, for the other points, I first assigned UV with a simple projection and then I used Discrete Smooth Interpolation (iterative relaxation) to equalize texel density. Here is where you'll find what you need : http://www.loria.fr/~levy/Papers/1998/s1998_textures.pdf Gaël -----Message d'origine----- De : gdalgorithms-list-admin@... [mailto:gdalgorithms-list-admin@...] De la part de Joris Mans Envoyé : vendredi 30 avril 2004 01:54 À : gdalgorithms-list@... Objet : [Algorithms] Generating uv coordinates which follow a shape Hi I ve been fiddling with this for some days, but don't seem to come up with a "general" solution. The problem is the following: Assume a planar mesh. I want to define uvs over that mesh in the following way. I have 4 corner vertices on the mesh which will contain mapping coords 0,0 1,0 1,1 0,1. The uvs on the border of the mesh are calculated by iterating over the border and using the piecewise distance of each line segment to define the interpolated values: Mapping[ k ] = Mapping[ corner_index ] + ( Mapping[ next_corner_index ] - Mapping[ corner_index ] ) * ( distance(corner_index,k) / distance(corner_index,next_corner_index) Whereby distance just sums up all the edge lengths from one vertex upto another, following the border of the mesh. Now this was the easy part, the hard part is assigning the uvs to the non-border vertices. And this is where I am getting stuck. The problem is that the internal uvs should follow as good as possible, to minimize distortion issues. I ve been trying by using a mass-spring system on the mapping coordinates, and fixing the border verts so they cant move, but getting a good configuration to start the simulation is already a problem, coz you need to choose start positions for the internal vertices, spring rest lengths and so on. I tried several "project internal vertices on borders and interpolate" approaches, but for all of those its quite easy to find a case where it breaks down. Here you see an example of what I want to achieve: http://users.pandora.be/ir_fuel/face_mapping_problem.jpg Oh, and I tried asking the artist to use Nurbs, which would give me a nice parametrization to define the mapping, but that doesn't seem to be the solution he is looking for ;) ;) Joris ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id66&op=ick _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 ```