-
Notifications
You must be signed in to change notification settings - Fork 39
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
tr2/overlay: support 3d pickup animations #1827
Conversation
I'm not clearing the Z-Buffer as currently there's no API for this. As a consequence, there may be some clipping issues with certain geometries / positions, but I haven't been able to stumble upon this. |
Download the built assets for this pull request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
There is some clipping as you mention, such as the shotgun and the key cards in Offshore Rig.
The only major issue I've noticed is the prayer wheels (puzzle1) in Barkhang, they don't appear on screen at all. But looking into the data, it seems they have no animations/frames, so I suppose behaviour for that is pretty much undefined. I had no idea this was an issue in the game. We will be able to fix this with an injection eventually, but I wonder if there is a workaround for that pickup in the meantime?
4e6b80d
to
f10873a
Compare
@lahm86 Fixed by moving away from viewport manipulation, opting for a different rendering approach (basically, we're just moving the viewport center point now). Additionally, I've added z-buffer clearing. While the results are acceptable, there are some sizing issues left that we'll need to address with injections. For example, the prayer wheels remain too large, and the dragon seal seems disproportionately small, among others. On a related note, the bounding box for the 3D model of the prayer wheel appears to be broken (X and Y planes are reported to be 0). Since the bounding boxes are essential for rendering of 3D items, I've implemented a manual calculation for it. The function perhaps isn't ideally placed, but it's there if we need it later. Plus, it can help us establish the expected bounding box values to be injected once we get there. |
I just tried to test this on the latest push (f10873a) and my game crashes when the game tries to load any level. Savegame, new game, or console. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I tried to test every key item in every level. I didn't see any issues.
Checklist
Description
Resolves #1633. The dragon statuettes are kept as sprites for now.