Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are these UV mapping coordinates represented in 0-1 and pixels? Shouldn't they use only the 0-1 system?

Well, I've got many UV coordinates of a 3D model clearly in the range 0-1 and many coords in seemingly pixel values in the range 100-300.

How do I know which one to interpret the coordinates as? Is there a standard or system for this?

I notice that each 3d meshes in the exported file may use either system. Is this normal procedure, and if so, how do I interpret the UV texture mapping coordinates to display them correctly in my 3d engine?

Examples of coordinates in the 0-1 system:

vt 1.04017 2.60853

vt -0.984585 -0.0106576

Examples of coordinates measuring by the pixel:

vt -208.397 776.637

vt -208.397 32.6369
like image 613
Robin Rodricks Avatar asked Dec 20 '25 17:12

Robin Rodricks


1 Answers

What is the file format of your 3D model? Also note that it's perfectly valid to have UV mapping coordinates ranging outside 0-1, e.g. for wrap or repeat texturing modes (refer to OpenGL or Direct3D texturing mode).

like image 155
Stringer Avatar answered Dec 24 '25 10:12

Stringer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!