Hazelnut wrote: ↑Sat Apr 24, 2021 2:47 pm
That would be me and Interkarma.
Is there a specific question?
Each tile is a byte that's used by the shader. 2 bits are used for rotation & flip leaving 6 bits, so theoretically 8 more tiles could be added however that could cause issues with the city outskirts which use those values. I think you had researched that Burt IIRC. Also FF is needed to represent 0 so the terrain and location tiles don't conflict.
At my mod, I hit a road block related to the tile set of the original daggerfall. Basically my question would be:
- Do you know if it is possible to append additional tiles for terrain transitions to the existing original tile sets of Daggerfall? and
- Is there a way of unpacking these tile set files of original DF, adding new tiles and repacking them or would placing additional textures in StreamingAssets/Textures be easier to implement?
General fact: I can only rotate tiles by 180° (the so-called "Flip"-Bit that only rotates) and by 90°(Rotate-Bit) but I cannot mirror them, which is required in about 50% of terrain transitions. Since they cannot be flipped horizontally or vertically, it currently looks like in the image below.
These are the tiles which I would need to mirror in Photoshop and add into the original tile set or append in another way. Flipping them by code might also solve the problem partially but then still there would be some terrain transitions missing, which were never included in the original DF, see below.
The tiles with red frame:
These tiles would need a mirrored version. Usually, they consist of 2x the same and 1x a second tile + 1x third tile, by example (dirt, dirt, water, stone). I would need a version with (dirt, dirt, stone, water) where they are simply flipped on one axis.
The tiles with green frame:
From these tiles I would need a version, where there is a third texture included.
by example we have (dirt, water, dirt, water) in the four corners. What I would need to add to the atlas is (dirt, water, dirt, stone) and (dirt, water, dirt, grass) etc.
I think all permutations possible would be:
Dirt: (dirt, water, dirt, stone) , (dirt, water, dirt, grass), (dirt, stone, dirt, grass)
Water: (water, dirt, water, grass), (water, dirt, water, stone), (water, stone, water, grass)
Stone: (stone, dirt, stone, grass), (stone, water, stone, grass), (stone, dirt, stone, water)
Grass: (grass, dirt, grass, water), (grass, dirt, grass, stone), (grass, water, grass, stone)
Then there is also a couple of versions with all 4 tile types joining that also is not in the standard tile set:
(water, dirt, stone, grass), (water, stone, dirt, grass), (water, grass, stone, dirt), (water, grass, dirt, stone)
I am not sure if that will be all possible permutations needed, but we could still extend on that, if it is basically possible to add more than X tiles per set.
I hope I could explain what I am planning to do and where I am failing.
Currently I hardcoded all possible terrain transitions, also the ones that were not possible before (water -> grass) or (water -> stone) and are only used in locations.