Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some raised platforms have different texture scaling than original game #129

Open
Allofich opened this issue Jul 9, 2018 · 11 comments
Open
Labels
Milestone

Comments

@Allofich
Copy link
Collaborator

Allofich commented Jul 9, 2018

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.

opentesarena

And here is how it looks in original Arena.

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:
arena2

You can find one of these temple types at "Brotherhood of Faith" in the Imperial City. It's near the southwest corner.
a_009

@afritz1
Copy link
Owner

afritz1 commented Jul 9, 2018

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.

@Carmina16
Copy link
Collaborator

Ceiling can be infinite in Arena, as it is just a texture drawn in the top of the screen.

@afritz1
Copy link
Owner

afritz1 commented Jul 21, 2018

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.

@afritz1 afritz1 added this to the 0.11.0 milestone Sep 12, 2019
@afritz1 afritz1 modified the milestones: 0.11.0, 0.12.0 May 19, 2020
@afritz1 afritz1 modified the milestones: 0.12.0, 0.13.0 Oct 17, 2020
@afritz1
Copy link
Owner

afritz1 commented Mar 2, 2021

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.

@afritz1
Copy link
Owner

afritz1 commented Mar 2, 2021

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.
screenshot000

@afritz1
Copy link
Owner

afritz1 commented Mar 2, 2021

Oh right, the ceiling ID is just whatever *CEILING is in the .INF file.

@afritz1
Copy link
Owner

afritz1 commented Mar 3, 2021

Okay the ceiling rendering is working like it should now.
screenshot000
Here is what it looks like from outside the level:
screenshot001
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)

@afritz1
Copy link
Owner

afritz1 commented Mar 27, 2021

The chunk system part of this issue is done (#200), so renaming this issue to be just about texture coordinates.

@afritz1 afritz1 changed the title Different texture scaling, ceiling at edge of temple interior Some raised platforms have different texture scaling than original game Mar 27, 2021
@afritz1 afritz1 removed this from the 0.13.0 milestone Mar 27, 2021
@afritz1
Copy link
Owner

afritz1 commented Dec 11, 2022

Still seeing this texture scaling issue on my rendering branch.

@Carmina16
Copy link
Collaborator

I have some ideas to test about the texture placement.

@afritz1
Copy link
Owner

afritz1 commented Dec 11, 2022

Okay. This issue is related: #101

@afritz1 afritz1 added this to the 0.15.0 milestone Aug 28, 2023
@afritz1 afritz1 modified the milestones: 0.15.0, 0.16.0 Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants