The ultimate purpose of my research is to extract usable data which can be translated into either the Construction Set and/or the Creation Kit for use in a mod for Oblivion and Skyrim.
Apologies in advance if the following contains a lot of extraneous information as I'm very much thinking-out-loud as I try and learn more about these formats.
Attached to this post is a sample .ehf from the Brightwood region, apparently a filler map, north of the main region. This is an educated guess based on the naming conventions of the folders.
I chose this one since it's fairly small (379,058 bytes) and may not contain any extraneous information contained in the maps that are actually traversable by the Hero or his/her adoring NPCs...
Hopefully this is the case.
So as I understand it, heightmap files are either a 3d mesh with vertices and faces, or a bitmap/raw file with pixels denoting height based on colour information.
This .ehf file also contains texture file information around halfway through so I wonder if this is not strictly a heightmap file but may still contain data that can be exported and used AS a heightmap?
Anyway, I've started to look through the data in Hex Workshop, using my so-far limited skillset to try and find patterns and possible clues.
The first promising area of data starts at 0x22DD7:
Code: Select all
7F 7F FF FF 7F 7F FF FF 7F 7F FF FF 00 00 00 00
42 F1 0A 18 43 5E DB E0 44 1E EF 2A 00 00 00 00
43 C0 00 00 42 4B 26 83 00 00 00 00 43 C0 00 00
42 4B 26 83 00 00 00 00 43 C0 00 00 42 4B 26 83
00 00 00 00 43 C0 00 00 42 4B 26 83 41 00 00 00
43 C4 00 00 42 6B 8C FD 41 80 00 00 43 C4 00 00
42 73 40 E7 41 00 00 00 43 C4 00 00 42 6B 8C FD
41 00 00 00 43 C8 00 00 42 81 5A 9B 00 00 00 00
43 17 9E C4 43 57 D7 64 44 20 35 F7 00 00 00 00
43 17 9E C4 43 57 D7 64 44 20 35 F7 00 00 00 00
7F 7F FF FF 7F 7F FF FF 7F 7F FF FF 00 00 00 00
Which appears to be, from my tinkering with the .mdl files, (more to come on that topic!) vertex coordinates, but I could be wrong... Like I said I'm fairly new to this.
This chunk of data comes to an end at 0002ACEB
So approximately 202 160-byte chunks, although the last few repetitions of this structure seem a little different.
A list of 14 texture file names appears at 0002E077 - It's reasonable to assume that most, if not all the data in this .ehf file pertains to texture coords, which is why I have interpreted the above data sample as vertex coordinates as I believe they can be represented in similar ways - again, I apologise for any muddled terminology I use.
There are large chunks of data that I cannot spot a pattern in so far but I am continuing to look.
So I'll post this thread and hopefully someone with more experience can point me in the right direction, for which I'd be very grateful! Next I will post an example of the .ghf file which more than likely contains the actual height map data.
Additional Info Regarding Fable 2 Landscape Files
I don't know how familiar people are with how Lionhead made Fable 2 but they used a proprietary game engine based heavily on the one used for Fable 1/TLC so the way it handles regions/maps but in very different ways. In Fable 1 the actual landscape data was stored in a singular .stb file which was referenced by .tng and .lev files for each region/map, heightmap data could be read from the data within the .lev files though (as seen in the Albion Explorer utility.) Fable 2 seems to have separate, multiple files for each region:
From the Fable2Mod forum:
AMA
Related to height field data. "ADMP".
AMM
Related to height field data. "ADMP".
AMR
Related to height field data. "ADMP".
EHF
Related to height field data. "HeightFieldGraphicsFile".
HDB
Related to height field data.
GENV
Contains environment map data. Link to thread
GHF
Related to height field data. First 4 bytes are 1F8B0808, but I don't think this is header info.
LMP
Might be related to height field data. Same header as the GHF files. The rest looks the same too.
AI_CONFIG
Related to path finding data. XML/plain text.
AIM
Related to path finding data. Kynogon Mesh.
FDL
Related to path finding data. Kynogon FindNearest Data.
PDL
Related to path finding data. Kynogon Spatial graph.
PPD
Related to path finding data.
MIST
Assuming it to determine where mist is.
WATER
Assuming it to determine where water is.
DAT
All named lightprobesdata.dat. Level lighting?
ENGINE_DATA
Not a clue except for the header. "EngineResourceList".
ENGINE_LEVEL
Stores links to other files such as heightmaps and flora models and has instancing data for flora. Link to thread.
HAVOK_SCENARIO
Level physics?
SAVE
XML/plain text. UIDs?
TEXTURE_ATLAS
Guessing that these determine what textures are used where on the maps.