grass.extm

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search

Generated grass height map of Hyrule Main Field
Generated grass height map of Hyrule Main Field
Full RGB color spectrum used for grass.
Full RGB color spectrum used for grass.
Rainbow-grass-1.jpg

grass.extm files describe the height and color of the main field grass and add-on content field.


grass.extm File Specification

grass.extm File Layout

Each file contains a 64×64 grid. For each vertex there is 4 bytes of data that describe the height of the grass and color.

Grass Map Data

Each entry in the grass data table is 4 bytes long. The rgb values are capable of producing all colors.

Offset (h) Size Data Type Description
0x00 1 Unsigned Byte Blade height
0x01 1 Unsigned Byte r, red
0x02 1 Unsigned Byte g, green
0x03 1 Unsigned Byte b, blue

x and z[1] can be calculated, while iterating through the data table:

for (int index = 0; index < 256 * 256; index++) {
    uint x = index % 256;
    uint z = index / 256;
}

Material Index

id file name group attribute attribute_sub flag name (en) group (en)
0 Blade_Green A None 0 Grass
1 Blade_Yellow B None 0 Grass
0 WoodChip_00 木くず00 木くず None None 0 Wood Chips 00 Wood Chips
1 WoodChip_01 木くず01 木くず None None 0 Wood Chips 01 Wood Chips
2 WoodChip_02 木くず02 木くず None None 0 Wood Chips 02 Wood Chips
3 WoodChip_03 木くず03 木くず None None 0 Wood Chips 03 Wood Chips
4 WoodChip_04 木くず04葦 木くず None None 0 Wood Chips 04 Reeds Wood Chips
5 WoodChip_05 木くず04葦 木くず None None 0 Wood Chips 05 Leaves Wood Chips
  1. z is expected to be an integer quotient. The floor function can be used if integer division is not supported.