http://imageshack.us/photo/my-images/221/walloftreesu.jpg/
A huge problem if you are making a world that covers an area beyond cell -32 or +32 in X or Y. Also a problem if you are making new tree LODs of Skyrim as some areas of the map is beyond this point as well.
The idea with this thread is to find a solution to this problem. Possibly with an end result in a program that can make tree LODs that work.
This is a very frustrating problem and yes I too feel that it could have been avoided with a better working CK, but we can either [censored] and moan about it, or do something to fix it. And frankly, complaining will get us nowhere. Try to minimize the ranting and instead be constructive so we together can solve the issue /smile.png' class='bbc_emoticon' alt=':smile:' />
What we need (in broad strokes)
* To find out what is in a BTT file and what functions the values have. (under way)
* How to get the position of trees from an esp/esm.
* Make a program that takes tree position information and writes BTT files.
I have found a nice spot in Skyrim to do some testing, cell 32, -10, from the tower of Mistwatch I have a nice view over the Eastmarch valley. From here you can see the 32,-8 and 32,-4 cell blocks nicely.
Me and Geggakloss have been working on this for a day now trying to see what we can find out.
The Creation kit makes two files for tree LOD, a .BTT for every 4x4 cell group and a LST file for the worldspace. From some http://www.gamesas.com/topic/1354877-new-worldspaces-object-lod-and-region-generation/page__st__30 it looks like the BTT file contains the coordinates for each tree, and the LST file defines what lod image should show for that tree.
Finding out what information is in a BTT file is a lot like solving a crossword puzzle in a language you don't know and it is all in little endian hex. Sounds like fun? Well it actually is /smile.png' class='bbc_emoticon' alt=':smile:' />
We did a lot of testing in new worldspaces, adding one tree at a time. So far this is what we got:
What is in a BTT?
The information in a BTT looks something like this:
(two Aspen01 trees and one Pine01 in the same cell)
02 00 00 00 00 00 00 00 01 00 00 00 00 20 09 46
00 e0 08 46 00 80 a7 c5 00 80 14 40 00 00 80 3f
70 0d 00 01 ac fb e6 2f 00 00 00 00 01 00 00 00
02 00 00 00 00 20 0a 46 00 c0 1e 46 00 80 a7 c5
00 40 7d 40 00 00 80 3f 6f 0d 00 01 ac fb e6 2f
00 00 00 00 00 80 1f 46 00 40 20 46 00 e0 a8 c5
00 40 75 40 00 00 80 3f 6e 0d 00 01 ac fb e6 2f
00 00 00 00
This is abit hard to read, so let me structure it up
Now this is what we think we know right now, remember this is guessing mostly.
02 00 00 00 (1)
00 00 00 00 (2)
01 00 00 00 (3)
00 20 09 46 00 e0 08 46 00 80 a7 c5 00 80 14 40 00 00 80 3f 70 0d 00 01 ac fb e6 2f 00 00 00 00 (4)
01 00 00 00 (2)
02 00 00 00 (3)
00 20 0a 46 00 c0 1e 46 00 80 a7 c5 00 40 7d 40 00 00 80 3f 6f 0d 00 01 ac fb e6 2f 00 00 00 00 (4)
00 80 1f 46 00 40 20 46 00 e0 a8 c5 00 40 75 40 00 00 80 3f 6e 0d 00 01 ac fb e6 2f 00 00 00 00 (4)
1) How many types of trees in total. (quite sure of this)
2) Treetype group for one cell, if trees are in different cells a new 00 00 00 00 is made for that cell. An existing group number can change when you add new trees. The numbers are not always in sequence, can be 01, 04, 05. Not really sure how this works, maybe related to the groups in the LST file or some indicator of what cell the group is in?
3) Number of trees of this type, in this case the first group is a Pine01, the secound group two Aspen01. (quite sure of this)
4) The values for each individual tree. (quite sure of this)
Updat (2012 July 12)
The tree information:
___X-cord__ ___Y-cord__ ___Z-cord__ _____U1____ ___Scale___ __FormID___ _____U2____ ____U3_____
00 20 09 46 00 e0 08 46 00 80 a7 c5 00 80 14 40 00 00 80 3f 70 0d 00 01 ac fb e6 2f 00 00 00 00
X, Y and Z - Coresponds to the coordinates in game units. This we know how it works, see http://www.gamesas.com/topic/1368378-tree-lod-btt-files-%e2%80%93-finding-a-solution-to-wall-of-trees-32-cell-problem/page__view__findpost__p__21007880.
Unknown01 – varies between each lod making run for the same trees with no changes made, some kind of time stamp perhaps. Each tree has one that is unique, but it can be set to only zero for all trees with no apparent effect.
Scale - The scale of the tree. This we know how it works (a post explaining the details will come soon).
Form ID - Form ID of the tree. The Form ID 01000d70 is written as 700d 0001. Done.
Unknown02 – "acfb" is constant between files made by two different CKs, second part varies between saves of the esp and between different files. The Original filles have a different structure, the first group has 0000 0000, the second group 0100 0000, the third group 0200 0000 and so on. Changing this in the CK made file to the group number works, no apparent effect in game. Can be set to only zero for all trees with no apparent effect.
Unknown03 – so far always 0000 0000, but this is not the case in original tamriel BTT files.
_____________________________________________
Differences between CK and original BTT files
BTT for 28,-4 Original
87 4a e6 47 1a 84 74 c6 e2 09 20 c6 f2 98 a1 40 14 ae 87 3f 83 08 0b 00 00 00 00 00 00 00 00 00
BTT for 28,-4 CK made
00 40 e6 47 00 80 74 c6 00 00 20 c6 00 a0 a0 40 00 a0 87 3f 83 08 0b 00 ac fb f5 2f 00 00 00 00
First values (which is last in litle endian) for X, Y and Z are always 00 in CK made BTT. Coordinates don't completely match even within the 32 cell border where LODs work, but they are only a small number off. Could be that the LODs appear a litle off from the tree.
What is it that goes wrong in the CKs BTT files of tamriel compared to files that work?
BTT for 32,-4 Original
8d 6c 02 48 b1 37 97 c5 14 42 16 c6 5b 2b a4 40 00 00 80 3f 9f c6 03 00 00 00 00 00 00 00 00 00
BTT for 32,-4 CK made
00 e0 ff 47 00 40 97 c5 00 40 16 c6 00 40 f9 3e 00 00 80 3f 9f c6 03 00 ac fb 44 33 00 00 00 00
The X coordinates all get set to 00 e0 ff 47. I can manually in the hexeditor change it to the X coordinates from the original BTT file, and voila, the tree LOD moves out into the cell beyond the 31/32 border.
http://imageshack.us/photo/my-images/856/movetrees.jpg/
What this tells us is what we already know, the CK made a mistake, but the engine can handle tree lods in cell 32 and beyond. It also says something about these unknowns that vary between the original and the CK made BTT file, they are not necessary for functional lods... at least not in this specific case.
We will continue to test more, but it will take time to finish this project as we have very little idea of what it is we are doing /smile.png' class='bbc_emoticon' alt=':smile:' />
I invite you all to participate, all skills are needed!