Grass.extm: Difference between revisions
Jump to navigation
Jump to search
imported>Leoetlino m (add category) |
imported>Zephenryus m (Updated image of main field grass height map) |
||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
<onlyinclude> | <onlyinclude> | ||
[[File: | [[File:5000000000.grass.extm.png|alt=Generated grass height map of Hyrule Main Field|thumb|Generated grass height map of Hyrule Main Field]] | ||
[[File:Rainbow-grass.jpg|alt=Full RGB color spectrum used for grass.|thumb|Full RGB color spectrum used for grass.]] | [[File:Rainbow-grass.jpg|alt=Full RGB color spectrum used for grass.|thumb|Full RGB color spectrum used for grass.]] | ||
[[File:Rainbow-grass-1.jpg|thumb]] | [[File:Rainbow-grass-1.jpg|thumb]] | ||
Line 10: | Line 10: | ||
=== grass.extm File Layout === | === 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. | 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 === | === Grass Map Data === | ||
Each entry in the grass data table is 4 bytes long. The rgb values are capable of producing all colors. | Each entry in the grass data table is 4 bytes long. The rgb values are capable of producing all colors. | ||
{| class="wikitable" | {| class="wikitable" | ||
!Offset (h) | !Offset (h) | ||
Line 43: | Line 40: | ||
|<code>b</code>, blue | |<code>b</code>, blue | ||
|} | |} | ||
<code>x</code> and <code>z</code><ref><code>z</code> is expected to be an integer quotient. The <code>floor</code> function can be used if integer division is not supported.</ref> can be calculated, while iterating through the data table: | <code>x</code> and <code>z</code><ref><code>z</code> is expected to be an integer quotient. The <code>floor</code> function can be used if integer division is not supported.</ref> can be calculated, while iterating through the data table: | ||
<syntaxhighlight lang="c" line="line"> | <syntaxhighlight lang="c" line="line"> | ||
for (int index = 0; index < 256 * 256; index++) { | for (int index = 0; index < 256 * 256; index++) { | ||
Line 54: | Line 49: | ||
=== Material Index === | === Material Index === | ||
{| class="wikitable" | {| class="wikitable" | ||
!id | !id | ||
Line 146: | Line 140: | ||
|Wood Chips | |Wood Chips | ||
|} | |} | ||
<references /> | <references /> | ||
[[Category:File formats]] | [[Category:File formats]] | ||
[[Category:File extensions]] | [[Category:File extensions]] | ||
[[Category:File extensions (STERA)]] | [[Category:File extensions (STERA)]] |
Latest revision as of 05:09, 26 October 2018
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 |
- ↑
z
is expected to be an integer quotient. Thefloor
function can be used if integer division is not supported.