LBA2:Island texture uvs: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
| [unchecked revision] | [checked revision] | 
Content deleted Content added
 Created page with "{{Infobox format | extension = LUV | lba2 = true | colour = FF99FF }}  The file contains UV texture coordinates for the ground triangles.  == Specification ==  Each entry in t..."  | 
				No edit summary  | 
				||
| (6 intermediate revisions by 4 users not shown) | |||
| Line 5: | Line 5: | ||
}}  | 
  }}  | 
||
The file contains UV texture coordinates for the ground triangles.  | 
  The file contains UV texture coordinates for the ground triangles of an island section.  | 
||
Texture coordinates usually have a representation from 0.0f->1.0f.  | 
|||
Therefore, to convert UV coordinates to the range 0.0f-1.0f, it is necessary to divide the UV by 65535.0f.  | 
|||
(''U16'')U/65535.0f = 0.0f-1.0f and (''U16'')V/65535.0f = 0.0f-1.0f  | 
|||
:  | 
|||
== Specification ==  | 
  == Specification ==  | 
||
| Line 17: | Line 24: | ||
=== UV entry ===  | 
  === UV entry ===  | 
||
* Offset 1:  '''  | 
  * Offset 1:  '''UNSIGNED SHORT''' (''u16''): U (Vertex 1)  | 
||
* Offset   | 
  * Offset 2:  '''UNSIGNED SHORT''' (''u16''): V (Vertex 1)  | 
||
* Offset   | 
  * Offset 3:  '''UNSIGNED SHORT''' (''u16''): U (Vertex 2)  | 
||
* Offset   | 
  * Offset 4:  '''UNSIGNED SHORT''' (''u16''): V (Vertex 2)  | 
||
* Offset   | 
  * Offset 5:  '''UNSIGNED SHORT''' (''u16''): U (Vertex 3)  | 
||
* Offset   | 
  * Offset 6: '''UNSIGNED SHORT''' (''u16''): V (Vertex 3)  | 
||
Latest revision as of 08:15, 30 June 2022
| Island texture uvs | ||
|---|---|---|
| Extension | 
 LUV  | 
|
| Occurence | 
 LBA2  | 
|
| Colour | 
 | 
|
| Programs supporting this format | ||
| 
 (none)  | 
||
| References | ||
The file contains UV texture coordinates for the ground triangles of an island section.
Texture coordinates usually have a representation from 0.0f->1.0f.
Therefore, to convert UV coordinates to the range 0.0f-1.0f, it is necessary to divide the UV by 65535.0f.
(U16)U/65535.0f = 0.0f-1.0f and (U16)V/65535.0f = 0.0f-1.0f
Specification[edit]
Each entry in the file consists of 12 bytes containing 3 texture coordinates.
1 entry = 1 ground triangle
The number of entries varies between island sections, depending on how many ground triangles are textured.
UV entry[edit]
- Offset 1: UNSIGNED SHORT (u16): U (Vertex 1)
 - Offset 2: UNSIGNED SHORT (u16): V (Vertex 1)
 - Offset 3: UNSIGNED SHORT (u16): U (Vertex 2)
 - Offset 4: UNSIGNED SHORT (u16): V (Vertex 2)
 - Offset 5: UNSIGNED SHORT (u16): U (Vertex 3)
 - Offset 6: UNSIGNED SHORT (u16): V (Vertex 3)
 
Information provided by: Lupin