Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
trs:miscellany [2017/11/17 12:20]
stohrendorf
trs:miscellany [2019/08/09 07:58] (current)
stohrendorf
Line 15: Line 15:
   * ''​%%0xFF180038%%''​ — Tomb Raider 3, Gold, Gold Title level   * ''​%%0xFF180038%%''​ — Tomb Raider 3, Gold, Gold Title level
   * ''​%%0xFF080038%%''​ — Tomb Raider 3 (Title level on Normal)   * ''​%%0xFF080038%%''​ — Tomb Raider 3 (Title level on Normal)
-  * ''​%%0xFF180034%%''​ — Tomb Raider 3 (''​VICT.TR2''​ that only contains palette and textiles)+  * ''​%%0xFF180034%%''​ — Tomb Raider 3 (''​VICT.TR2''​ that only contains palette and atlases)
   * ''​%%0x00345254%%''​ (''​TR4 ''​) — Tomb Raider 4 and Tomb Raider 5   * ''​%%0x00345254%%''​ (''​TR4 ''​) — Tomb Raider 4 and Tomb Raider 5
   * ''​%%0x63345254%%''​ (''​TR4c''​) — Tomb Raider 4 (demo versions)   * ''​%%0x63345254%%''​ (''​TR4c''​) — Tomb Raider 4 (demo versions)
Line 39: Line 39:
 ===== Object Textures ===== ===== Object Textures =====
  
-Object ​texture (or //texture details// in TRLE terms) keeps detailed information about each texture independently used in game. While it’s not texture image itself (these are kept inside //​texture ​tiles//), it’s rather a reference to particular texture ​tile zone kept with all other necessary information to display this texture.+An object ​texture (or //texture details// in TRLE terms) keeps detailed information about each texture independently used in the game. While it’s not texture image itself (these are kept inside //​texture ​atlases//), it’s rather a reference to particular texture ​in an atlas atlas, ​kept with all other necessary information to display this texture.
  
 ==== Object Texture Vertex Structure ==== ==== Object Texture Vertex Structure ====
  
-This sub-structure used by object textures specifies a vertex location in textile ​coordinates. The Xpixel and Ypixel are the actual coordinates of the vertex’s pixel. The Xcoordinate and Ycoordinate values depend on where the other vertices are in the object texture. And if the object texture is used to specify a triangle, then the fourth vertex’s values will all be zero.+This sub-structure used by object textures specifies a vertex location in texture ​coordinates. The Xpixel and Ypixel are the actual coordinates of the vertex’s pixel. The Xcoordinate and Ycoordinate values depend on where the other vertices are in the object texture. And if the object texture is used to specify a triangle, then the fourth vertex’s values will all be zero.
  
 {{anchor:​tr_object_texture_vert}} {{anchor:​tr_object_texture_vert}}
Line 65: Line 65:
 { {
     uint16_t ​              ​Attribute;​     uint16_t ​              ​Attribute;​
-    uint16_t ​              TileAndFlag;+    uint16_t ​              AtlasAndFlag;
     tr_object_texture_vert Vertices[4];​ // The four corners of the texture     tr_object_texture_vert Vertices[4];​ // The four corners of the texture
 }; };
 </​code>​ </​code>​
-''​%%TileAndFlag%%''​ is a combined field:+''​%%AtlasAndFlag%%''​ is a combined field:
  
-  * //Bits 0..14// specify //​texture ​tile// to use. +  * //Bits 0..14// specify ​the //​texture ​atlas// to use. 
-  * //Bit 15//: if set, it indicates that texture is used on a triangle face.+  * //Bit 15//: if set, it indicates that the texture is used on a triangle face.
  
 ''​%%Attribute%%''​ specifies transparency mode (i.e. //blending mode//) used for face with this texture applied. There are several ones available: ''​%%Attribute%%''​ specifies transparency mode (i.e. //blending mode//) used for face with this texture applied. There are several ones available:
Line 99: Line 99:
 |//Bump mapping turned off//                                    |//Bump mapping turned on//                                       | |//Bump mapping turned off//                                    |//Bump mapping turned on//                                       |
  
-Assignation ​of bump maps happened inside level editor, where each texture piece could be marked as either //level 1// or //level 2// degree ​of bump map effect. When level was converted, all texture pieces with bumpmaps were placed into separate texture ​tiles after all other texture ​tilesfollowing ​by the same amount of texture ​tiles with auto-generated bump maps arranged in the same manner as original texture ​tilesNumber ​of bumped texture tiles was kept in separate variable as well (see [[trs:​file_formats#​level_format_tr4|TR4 Level Format]] section).+Assignment ​of bump maps happened inside level editor, where each texture piece could be marked as either //level 1// or //level 2// of the bump map effect. When the level was converted, all texture pieces with bumpmaps were placed into separate texture ​atlases ​after all other texture ​atlasesfollowed ​by the same amount of texture ​atlases ​with auto-generated bump maps arranged in the same manner as the original texture ​atlasesThe number ​of bump map atlases ​was kept in separate variable as well (see [[trs:​file_formats#​level_format_tr4|TR4 Level Format]] section).
  
-So, when engine rendered a face with texture marked as //bumped//, it rendered original texture ​at first, then it jumped to the texture ​tile //plus number of bumped ​texture ​tiles//, and rendered one more texture pass on this face using texture from resulting texture ​tile and the same UV coordinates.+So, when the engine rendered a face with texture marked as //bump-mapped//, it rendered ​the original texture first, then it jumped to the texture ​atlas //​plus ​the number of bump-mapped ​texture ​atlases//, and rendered one more texture pass on this face using the texture from the resulting texture ​atlas and the same UV coordinates.
  
 {{anchor:​tr4_object_texture}} {{anchor:​tr4_object_texture}}
Line 108: Line 108:
 { {
     uint16_t ​              ​Attribute;​     uint16_t ​              ​Attribute;​
-    uint16_t ​              TileAndFlag;+    uint16_t ​              AtlasAndFlag;
     uint16_t ​              ​NewFlags;​     uint16_t ​              ​NewFlags;​
  
trs/miscellany.txt · Last modified: 2019/08/09 07:58 (external edit)
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0