GND - Ground Field File

October 27th, 2005

Ground File, this file contains every polygon, textures and lightmaps of the ground.

* Field Size Type Description
0 Header 6 bytes Integer GRGN..
6 Size X 4 bytes Integer Size of field
10 Size Y 4 bytes Integer Size of field
14 Ratio 4 bytes Float Proportion Ratio usually 10.0
18 Texture Count 4 bytes Integer Number of textures used
22 Size of Texture 4 bytes Integer Size of Texture Path
{ Textures (Texture Path Size/2)
0 Path 40 bytes Char Path to file
40 ?? 40 bytes Char -
}
0 Nº of Lightmaps 4 bytes Integer -
4 Grid Size X 4 bytes Integer Size of lightmap grid X
8 Grid Size Y 4 bytes Integer Size of lightmap grid Y
12 Grid Size Cell 4 bytes Integer Number of cells by grid
{ Lightmaps (Header + Texture + Unknown + Tiles Offset )
0 Brightness 64 bytes char 8*8 Grid Bright Values
64 Color RGB 192 bytes char 8*8 Grid Color Values (RGB Triplets)
}
0 Nº of Tiles 4 bytes Integer -
{ Tiles (Header + Texture + Unknown Offset )
0 Texture Start 4 bytes Float Left Bottom
4 Texture Start 4 bytes Float Right Bottom
8 Texture Start 4 bytes Float Left Top
12 Texture Start 4 bytes Float Right Top
16 Texture End 4 bytes Float Left Bottom
20 Texture End 4 bytes Float Right Bottom
24 Texture End 4 bytes Float Left Top
28 Texture End 4 bytes Float Right Top
32 Texture 2 bytes Integer Nº of texture used
34 Lightmap 2 bytes Integer Nº of lightmap used
36 Tile Color 4 bytes char Tile Tint Color (RGBA)
}
{ Cubes (Header + Texture + Unknown + Tiles + Lightmaps Offset )
0 Cell 4 bytes Float Left Bottom
4 Cell 4 bytes Float Right Bottom
8 Cell 4 bytes Float Left Top
12 Cell 4 bytes Float Right Top
16 Tile Up 4 bytes Integer Number of Tile
20 Tile Side 4 bytes Integer Number of Tile
20 Tile Aside 4 bytes Integer Number of Tile
}


Info :
- - Designs a block type
{ } Designs a loop block

You can adjust scale of texture with Texture Start and Texture End

Nº of cubes are designed by Size X * Size Y

Credits
deufeufeu / ender (previous research)
Victor-san (Update)


4 Responses to “GND - Ground Field File”

  1. Paul on July 11, 2006 12:31 pm

    Hi,
    I think Texture Start and End in a Tile section corresponds to the 2D coordinates of the texture to be applied.

    for example, if the texture is 256×256,
    0.5 0.75 0.5 0.75 1.0 1.0 0.75 0.75 would be a square in the texture defined by :
    (128,255)-> (192,255)->(192,192)->(128,192)

    Am I right ?

  2. Ximo(Offline) on July 12, 2006 1:37 am

    Yes, texture coordinates are following standard texturing techniques, so 1.0 it’s end (max size) and 0 the start, you can also make mirroring by flipping this values.

  3. VictorSan on July 29, 2006 3:35 am

    Hello,

    36 ?? 4 bytes Integer ??

    -> I think that this field is really a 4 unsigned char field.

    If it´s taken as an integer, it´s usually a big number… i splited it into 4 unsigned chars. The result is 255 255 255 255, it repeats in every tile. I think it´s a RGBA value for that tile.

    The same strange value appears in the cubes, in the “tile” fields… i don´t know it it´s the same.

    Ximosoft give me credit or i kill you :D :D .

    Akuchimoya

  4. Estx on January 21, 2007 8:03 pm

    VictorSan, Ximosoft:

    The value is most likely ARGB. Alpha comes first in almost every programming language.

Trackback URI | Comments RSS

Leave a Reply

Name (required)

Email (required)

Website

Speak your mind

    About this blog
    Here i post all Ragnarök Online related Tools