OpenTESArena
OpenTESArena copied to clipboard
Some raised platforms have different texture scaling than original game
While testing the latest transition code, I found a spot in one of the temple interiors that looks different in original Arena and OpenTESArena. There is a short wall here at the edge of the map. Here is how it looks in OpenTESArena.
And here is how it looks in original Arena.
The texture is cut off in OpenTESArena, and it's scaled to the wall in original Arena. Also the blue ceiling ends and there is a black void in OpenTESArena, while the ceiling continues to stretch on in original Arena.
Location in the temple:
You can find one of these temple types at "Brotherhood of Faith" in the Imperial City. It's near the southwest corner.
The difference in look for those two textures is because the texture coordinates for raised platforms aren't properly being used yet (box3a
, box3b
, and box4
in ExeData.h). Those values should be used in the level construction code in LevelData.cpp.
I'm on the fence about replicating the out-of-bounds map behavior because it appears that Arena uses some data that's not defined in the .MIF file, perhaps a byproduct of the game having a chunk-based system for level presentation (64x64, etc.). I don't know how to define the out-of-bounds part because it's not obvious what it should be (some default value?). The level code and software renderer would need some redesigning to compensate for the levels not being a static set of voxels.
Ceiling can be infinite in Arena, as it is just a texture drawn in the top of the screen.
Yeah, the ceilings are easy like Carmina16 said. I'm assuming everything in MAP1
is just air, too? Not sure about default values for the floor.
So like I said above, it's going to involve some redesigning of the level data to get the "infinite" behavior of interiors in the original game. I still don't like it conceptually (why would an interior have infinite floor/ceiling?), but if the original game does something as obvious as this then OpenTESArena should do it too. Moving over to a chunk-based system will take some time but I think it's doable. Probably won't get to it soon because of higher priority things, like those for 0.8.0.
Almost got the rendering to work in PR #200. Currently dealing with some ray casting math errors but the floor and ceiling of adjacent chunks should be working soon. I'm testing with TEMPLE8.MIF. Any idea what texture IDs they should be? I tried voxel IDs of 2 for floor and 14 for ceiling (only relevant to my engine I guess, since 0 is air) but some interiors don't seem to have that many textures, so it doesn't work. Hoping that they are specified in the .MIF header or something.
This image is after sidestepping through that half wall with collision turned off while facing north. The bending is due to the ray casting error I mentioned. Still working out some other chunk-related math issues too.
Oh right, the ceiling ID is just whatever *CEILING is in the .INF file.
Okay the ceiling rendering is working like it should now.
Here is what it looks like from outside the level:
Texture coordinates is a separate issue I'm not looking at right now. Trying to get all the chunk system stuff done. (Also, the entities are temporarily disabled, that's why the brazier isn't there)
The chunk system part of this issue is done (#200), so renaming this issue to be just about texture coordinates.
Still seeing this texture scaling issue on my rendering branch.
I have some ideas to test about the texture placement.
Okay. This issue is related: https://github.com/afritz1/OpenTESArena/issues/101