In Arena it appears to use *BOXCAP 8 in START.INF which is WALLF.SET for the texture on the bottom of walls.

Not sure how to replicate this as my loading code only knows about one texture ID for all faces of the wall (ignore the different water shading, that is intentional in this engine). This problem also extends to the roof of buildings, it's hard to know what it should be because Arena locks the camera below the top of the Y=1 block.
|
const int textureIndex = mostSigByte - 1; |
void writeVoxelInfoForMAP1(ArenaTypes::VoxelID map1Voxel, uint8_t mostSigNibble, MapType mapType, const INFFile &inf,
const ExeData &exeData, ArenaTypes::VoxelType *outVoxelType, ArenaMeshUtils::ShapeInitCache *outShapeInitCache,
TextureAsset *outTextureAsset0, TextureAsset *outTextureAsset1, TextureAsset *outTextureAsset2, bool *outIsCollider,
VoxelFacing2D *outFacing)
{
DebugAssert(map1Voxel != 0);
DebugAssert(mostSigNibble != 0x8);
if ((map1Voxel & 0x8000) == 0)
{
const uint8_t mostSigByte = ArenaLevelUtils::getVoxelMostSigByte(map1Voxel);
const uint8_t leastSigByte = ArenaLevelUtils::getVoxelLeastSigByte(map1Voxel);
const bool voxelIsSolid = mostSigByte == leastSigByte;
if (voxelIsSolid)
{
// Regular solid wall.
*outVoxelType = ArenaTypes::VoxelType::Wall;
outShapeInitCache->initDefaultBoxValues();
ArenaMeshUtils::WriteWallRendererGeometryBuffers(outShapeInitCache->verticesView, outShapeInitCache->normalsView, outShapeInitCache->texCoordsView);
ArenaMeshUtils::WriteWallRendererIndexBuffers(outShapeInitCache->opaqueIndices0View, outShapeInitCache->opaqueIndices1View, outShapeInitCache->opaqueIndices2View);
const int textureIndex = mostSigByte - 1;
const int clampedTextureID = ArenaVoxelUtils::clampVoxelTextureID(textureIndex);
std::string voxelTextureFilename = ArenaVoxelUtils::getVoxelTextureFilename(clampedTextureID, inf);
const std::optional<int> voxelTextureSetIndex = ArenaVoxelUtils::getVoxelTextureSetIndex(clampedTextureID, inf);
*outTextureAsset0 = TextureAsset(std::move(voxelTextureFilename), voxelTextureSetIndex);
*outTextureAsset1 = *outTextureAsset0;
*outTextureAsset2 = *outTextureAsset0;
In Arena it appears to use *BOXCAP 8 in START.INF which is WALLF.SET for the texture on the bottom of walls.
Not sure how to replicate this as my loading code only knows about one texture ID for all faces of the wall (ignore the different water shading, that is intentional in this engine). This problem also extends to the roof of buildings, it's hard to know what it should be because Arena locks the camera below the top of the Y=1 block.
OpenTESArena/OpenTESArena/src/World/MapGeneration.cpp
Line 487 in b320aa8