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

tr1/output: use item shade to light 3D pickups #2045

Closed

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Dec 15, 2024

Part of #2017.

Checklist

  • I have read the coding conventions
  • I have added a changelog entry about what my pull request accomplishes, or it is an internal change

Description

This uses the shade value on items to light 3D pickup objects, so they appear similarly lit to the sprite equivalent.

If this looks ok in TR1, we can apply similar to TR2 at a later date.

This uses the shade value on items to light 3D pickup objects, so they
appear similarly lit to the sprite equivalent.

Part of LostArtefacts#2017.
@lahm86 lahm86 added Enhancement Improvement of an existing feature TR1 labels Dec 15, 2024
@lahm86 lahm86 self-assigned this Dec 15, 2024
@lahm86 lahm86 requested review from a team as code owners December 15, 2024 10:05
@lahm86 lahm86 requested review from rr-, walkawayy and aredfan and removed request for a team December 15, 2024 10:05
Copy link

@rr-
Copy link
Collaborator

rr- commented Dec 15, 2024

Thank you for taking it on, but I'm afraid this approach is still prone to not addressing the underlying issue. There are still many cases where the pickups blend in with the environment too much:

20241215_135309_rrm
20241215_135828_ebp
20241215_140007_omt

Plus it makes most of the pickups appear very flat:

20241215_135404_kra

I tried using the average of the 3D lighting + flat sprite-based lighting, but it looked less than great and didn't help with the pickups that blended with the textures.

I think a potential solution to this would be to keep the lighting, but add a small exclamation mark ⚠️ or a similar 2D icon above the pickups if they're anywhere near the center of the screen, within reasonable distance and within the line of sight.

20241215_140939_rpf
20241215_140936_yun
20241215_140928_jwl

then the problem can be reduced to finding an icon that feels compatible with the OG.
I can imagine the builders who will want to be extra petty and have their pickups blend in with the textures purposefully, will complain about this, but they can always forcefully disable the pickup aids.

@lahm86
Copy link
Collaborator Author

lahm86 commented Dec 15, 2024

No problem, I agree it does make things quite flat but I suppose that's the nature of static lighting (which works fine for sprites really, but not so much 3D).
Happy to go with the icon approach. Should we just close this PR and tackle it afresh?

@Richard-L
Copy link
Collaborator

Fwiw I hate the ! because it's so TRR.

Any other dynamic lighting solutions?

@rr-
Copy link
Collaborator

rr- commented Dec 15, 2024

Fwiw I hate the ! because it's so TRR.

Any other dynamic lighting solutions?

I suppose we could go to the trouble of shading each item separately… but man, that's a lot of trouble.
The pickup icon aids look like a good separate feature regardless whether we personally adore them or no – it feels like a good QoL option. Plus I think that given a decent sprite, they could feel natural and like a part of the OG.

I'd keep this PR open until we have settled on an alternative as the way I see it we're still brainstorming the final solution.

@Richard-L
Copy link
Collaborator

@lahm86 sorry if I'm doing something wrong, but using the build from here #2045 (comment) I get the same outcome.
image

@walkawayy
Copy link
Collaborator

walkawayy commented Dec 15, 2024

I've seen games do different things.

RE4: Remake light beam:

image

Horizon Forbidden West is similar but with icons on top of the lightbeam:

image

I always liked Tomb Raider Legend's shimmer light effect that runs across the item every few seconds:

image

AOD does something similar with a small green light flash (and a small hand in the bottom right shows when near an interactable when close):

image

Tomb Raider Underworld hovers the interact button's icon over items when close:

image

@lahm86
Copy link
Collaborator Author

lahm86 commented Dec 15, 2024

@lahm86 sorry if I'm doing something wrong, but using the build from here #2045 (comment) I get the same outcome. image

This is only relevant for TR1 currently, so that's to be expected.

@lahm86
Copy link
Collaborator Author

lahm86 commented Dec 15, 2024

I don't think we can improve on the "flat shade" by going through every item and tweaking the values. The data already has differing values that have been selected appropriately IMO for the sprites e.g. the medi below in Vilcabmamba retains a dark shade and the gold idol below is also lit appropriately.

image

I don't feel that tweaking these values would be of benefit: the lighting would still be flat on the 3D pickups. Unless there is a way perhaps to change the output logic e.g. item shade + room light. But then builders possibly have less control over it.

@Richard-L
Copy link
Collaborator

Richard-L commented Dec 15, 2024

fwiw this problem is immediately evident the moment OG started using 3d pickups, so I'd say it's very okay to spend longer time on this.
image

Imo nothing should be added, the rendering of the items in-game would ideally be the solution itself. OpenLara, albeit not a fair comparison, still already improves it thanks to better item lighting:
image

@rr-
Copy link
Collaborator

rr- commented Dec 15, 2024

fwiw this problem is immediately evident the moment OG started using 3d pickups, so I'd say it's very okay to spend longer time on this. image

Imo nothing should be added, the rendering of the items in-game would ideally be the solution itself. OpenLara, albeit not a fair comparison, still already improves it thanks to better item lighting: image

The large medpack is barely visible, though.

@Richard-L
Copy link
Collaborator

Richard-L commented Dec 15, 2024

Agreed, but there is an improvement imo, and I just wanted to share it as an example.

EDIT: Maybe is this something that with an enabled #1646 can be remedied?

@lahm86
Copy link
Collaborator Author

lahm86 commented Dec 18, 2024

@Richard-L What do you think about the following approach? Keep an eye on the pickups as Lara gets close to them.

https://youtu.be/NtnJu2ofMB0

@Richard-L
Copy link
Collaborator

So kind of you to ask for my opinion and even make a quick clip ❤️

I think this is super clever. It uses the ricochet sprites, right? It's subtle and nice, and I think suitable for this case.

Please forgive that I would probably still choose to deactivate it, just because I find TR more immersive without any hints that tell you "I'm a game you can pick this up", if that makes sense.

Perhaps at some point in the later future, something with just mesh reflection and luminance might be done.

@lahm86
Copy link
Collaborator Author

lahm86 commented Dec 18, 2024

So kind of you to ask for my opinion and even make a quick clip ❤️

I think this is super clever. It uses the ricochet sprites, right? It's subtle and nice, and I think suitable for this case.

Please forgive that I would probably still choose to deactivate it, just because I find TR more immersive without any hints that tell you "I'm a game you can pick this up", if that makes sense.

Perhaps at some point in the later future, something with just mesh reflection and luminance might be done.

It uses the twinkle effect from when Lara is turning to gold, or turning lead to gold. It's just slightly larger in size as the original wasn't very clear. We thought it was quite in-keeping overall with the game. Glad you think it's a suitable approach too.

And it will be optional 😌

Thanks for taking a look, and the feedback 👍

@lahm86
Copy link
Collaborator Author

lahm86 commented Dec 21, 2024

Closing this as #2077 has provided an alternative approach. The issue itself can remain open for any further investigation in terms of lighting.

@lahm86 lahm86 closed this Dec 21, 2024
@lahm86 lahm86 deleted the issue-2017-3d-pickup-shading branch December 21, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement of an existing feature TR1
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants