Grass.extm: Difference between revisions
m
Updated image of main field grass height map
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)]] |