This is G o o g l e's cache of http://www.flashsandy.org/forum/lofiversion/index.php/t376.html as retrieved on 20 Jul 2007 19:32:05 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:UAtRA9Pmdb4J:www.flashsandy.org/forum/lofiversion/index.php/t376.html+site:www.flashsandy.org+index.php&hl=en&ct=clnk&cd=101


Google is neither affiliated with the authors of this page nor responsible for its content.
These terms only appear in links pointing to this page: index php

Petit
After having fiddled a bit with a new primitive, I have a question.

What are indeed the UV coordinates?

Let's say you create a primitive like Plane3D.
By default you want to an applied texture to scale to fit the whole surface.
The UV coordinates for each Face determines what part of the texture it should carry.
The quality setting for the plane determines how many parts a texture is divided in.

So if q = 5, you get 5*5 = 25 different rectangular slices of the texture, and if the mode is 'tri' every slice is used on two triangular faces.

Now the question. When the Plane3D is created, the UV coordinates are calculated as 1/q along each side.
In other words they are always between 0 and 1.
When they are used on a texture, the corresponding pixel positions must be calculated for each Face.

So what are the UV coordinates - the values between 0 and 1 or the corresponding pixel positions on the bitmap?

Sorry for the lengthy introduction, but hopefully it's clear what I mean cool.gif
kiroukou
Hi,

UV coordinates are the positions of each vertex of the model onto the texture bitmap. Each vertex has its own position on the bitmap, and this value is a 2D one. on X and Y axis. After why it is between 0 and 1? Because it is relative to the width and height on the texture bitmap.

Hope this help smile.gif
Petit
QUOTE(kiroukou @ Mar 12 2007, 02:07 PM) *

Hope this help smile.gif

Yes that helps a lot.
The true UV coordinates are the 2D values on the bitmap, that corresponds to a Face.
The values calculated in the generate() method of a primitive ( 0 - 1 ) are the relative values for the UV coordinates.

Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2007 Invision Power Services, Inc.