enigmagame

07-04-2008, 04:53 AM

Hi!

I must create a texture map, from an original image, in this manner:

Each triangle is mapped to a right angle triangle and these are packed together in arbitrary positions with a few pixels of padding between the triangles.

So, for example, this is the original image (there are two triangles):

http://img157.imageshack.us/img157/3522/tex1ou7.th.jpg (http://img157.imageshack.us/my.php?image=tex1ou7.jpg)

I must map each triangle to a right triangle of "opportune dimensions", with my professor we have found a way to find this dimension.

1)First I find the projected area in pixel of the original triangle.

2)Second I create a right triangle that approximates the area of the original triangle, this right triangle must have an area of 2^n pixels.

In our example: the projected area of each triangle in the original image is 37890 pixels, so I must use a right triangle that have an area of 2^16 pixels.

I make this mapping, and this is the result texture:

http://img157.imageshack.us/img157/3091/texture16uj8.th.jpg (http://img157.imageshack.us/my.php?image=texture16uj8.jpg)

Now, with this image I texture my model, and this is the result:

http://img76.imageshack.us/img76/1615/risultato16hx8.th.jpg (http://img76.imageshack.us/my.php?image=risultato16hx8.jpg)

The main problem is the blur. But this problem is soluble or not?

Thanks, for any questions I'm here!

I must create a texture map, from an original image, in this manner:

Each triangle is mapped to a right angle triangle and these are packed together in arbitrary positions with a few pixels of padding between the triangles.

So, for example, this is the original image (there are two triangles):

http://img157.imageshack.us/img157/3522/tex1ou7.th.jpg (http://img157.imageshack.us/my.php?image=tex1ou7.jpg)

I must map each triangle to a right triangle of "opportune dimensions", with my professor we have found a way to find this dimension.

1)First I find the projected area in pixel of the original triangle.

2)Second I create a right triangle that approximates the area of the original triangle, this right triangle must have an area of 2^n pixels.

In our example: the projected area of each triangle in the original image is 37890 pixels, so I must use a right triangle that have an area of 2^16 pixels.

I make this mapping, and this is the result texture:

http://img157.imageshack.us/img157/3091/texture16uj8.th.jpg (http://img157.imageshack.us/my.php?image=texture16uj8.jpg)

Now, with this image I texture my model, and this is the result:

http://img76.imageshack.us/img76/1615/risultato16hx8.th.jpg (http://img76.imageshack.us/my.php?image=risultato16hx8.jpg)

The main problem is the blur. But this problem is soluble or not?

Thanks, for any questions I'm here!