Hi Alan, Thanks for the feedback. I hadn't thought of doing it like that but I may take a look at it. Rich 2009/8/7 Alan Wolfe <alan.wolfe@xxxxxxxxx>: > hey rich > > you probably wish someone spoke up earlier but ive seen artists using > modeling programs where it works kinda similarly. > > basically they have a view of the texture and the polygons of the model lay > over that 2d view of the texture, the artists drag the shapes around and it > controls how it gets textured > > it sounds kinda similar to your technique > > On Thu, Aug 6, 2009 at 3:46 PM, Richard Sabbarton > <richard.sabbarton@xxxxxxxxx> wrote: >> >> Hi All, >> >> I thought I would share the solution came up with on working out the >> texture coordinates. >> >> What I am doing is cycling through the vertices and calculating the >> distance between them to get a total width/height for the mesh. I >> guess this is the virtual equivalent of stretching the mesh out flat >> on a table... I then cycle through the vertices again adjusting the >> texture coordinates according to the dimensions of the flattened mesh >> and the distance between the vertices. In the tank example from my >> previous mail the texture appeared stretched along the top surface and >> then condenced at the front and rear where there is a higher density >> of vertices (for the curved shape.) After running the >> TextureCoordinate recalculation the texture is smoothed out so that it >> wraps evenly around the body of the tank without the previous >> distortion. >> >> Regards >> >> Richard >> >> 2009/7/23 Richard Sabbarton <richard.sabbarton@xxxxxxxxx>: >> > Hi Esam, >> > >> > The application is a model creator. I am putting it together to >> > create simple 3D models for use in games. I have attached an example >> > model of a tank that I have created using my app and a copy of the >> > output file it generates. I have also attached a screenshot of the >> > app (still using hand drawn GUI atm...) This should give you an idea >> > of what the program is doing. The reason for doing it is that I am >> > not really a designer. I don't have 3DSMax and if I did I wouldn't >> > know how to use it. If you look at the attached model you can see >> > there is quite a number of vertices. I am already able to switch on >> > textures in the application but by the time I have manipulated the >> > vertices into position the texture coordinates are normally pretty >> > useless. If there is a mechanism for automatically calculating a >> > "best fit" then this is what I think I need to do. Maybe with some >> > manual fine tuning once this is done. It would be interesting to know >> > how applications like 3DSMax handle this sort of thing. >> > >> > I appreciate your feedback. >> > >> > Rich >> > >> > 2009/7/22 Esam Bustaty <e.bustaty@xxxxxxxxxx>: >> >> Can you give us more idea about what does the application do?? >> >> If you use 3DSMax there is many ways to assign texture coordinates >> >> (auto or >> >> manual), I think I can help making most of them, but I just need to >> >> understand what you need to help you with... >> >> >> >> ________________________________ >> >> From: Richard Sabbarton <richard.sabbarton@xxxxxxxxx> >> >> To: gameprogrammer@xxxxxxxxxxxxx >> >> Sent: Thursday, 23 July, 2009 12:42:21 AM >> >> Subject: [gameprogrammer] Texture Coordinates >> >> >> >> Hi Guys, >> >> >> >> I am looking for some advice on how best to determine texture >> >> coordinates for vertices. I have been developing a 3D model utility >> >> that can be used to create models for use in games and I am looking >> >> for the best way of setting up texture coordinates. The model format >> >> is a simple array of vertices that are arranged into stacks of >> >> TRIANGLE_STRIPS. Each vertex has an assigned set of Texture >> >> Coordinates. I can create a new mesh, say a 4 vertex quad with >> >> texture coordinates assigned correctly. I can then subdivide the mesh >> >> into 9 vertices and again into 25 vertices. I don't have a problem >> >> preserving the texture coordinates during subdivision but when I start >> >> maniplulating the vertex coordinates it will stretch and skew the >> >> texture. I have no issues with why this is occuring, I am just >> >> looking for advice on how best to manage texture coordinates. >> >> >> >> At the moment, the application allows you to select vertices and >> >> adjust the texture coordinates manually but I am sure there must be a >> >> better way of doing it that that... >> >> >> >> Any thoughts? >> >> >> >> Richard >> >> >> >> >> >> P.S. If anyone is interesting in assisting with some testing of this >> >> app then let me know. I am thinking of making it freely available >> >> when completed if there is some interest. >> >> >> >> --------------------- >> >> To unsubscribe go to http://gameprogrammer.com/mailinglist.html >> >> >> >> >> >> >> >> >> > >> >> --------------------- >> To unsubscribe go to http://gameprogrammer.com/mailinglist.html >> >> > > --------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html