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

Make compound clouds and 3D objects' lighting depend on the light level #5771

Merged
merged 10 commits into from
Jan 13, 2025

Conversation

dligr
Copy link
Member

@dligr dligr commented Dec 22, 2024

Brief Description of What This PR Does

Makes the lighting of 3D objects (cells, clouds, etc.) and compound clouds depend on the current light level (if the patch has day-night cycle).

Related Issues

Closes #3920

Progress Checklist

Note: before starting this checklist the PR should be marked as non-draft.

  • PR author has checked that this PR works as intended and doesn't
    break existing features:
    https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
    (this is important as to not waste the time of Thrive team
    members reviewing this PR)
  • Initial code review passed (this and further items should not be checked by the PR author)
  • Functionality is confirmed working by another person (see above checklist link)
  • Final code review is passed and code conforms to the
    styleguide.

Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.

I.e. the current light level set by the day-night cycle
@dligr dligr added the review label Dec 22, 2024
@dligr dligr added this to the Release 0.8.1 milestone Dec 22, 2024
@dligr dligr requested review from a team December 22, 2024 14:41
@revolutionary-bot
Copy link

We are currently in feature freeze until the next release.
If your PR is not just a simple fix, then it may take until the release to get reviewed and merged.

@revolutionary-bot
Copy link

The lead programmer for Thrive is currently on vacation until 2025-01-07. Until then other programmers will try to make pull request reviews, but please be patient if your PR is not getting reviewed.

PRs may be merged after multiple programmers have approved the changes (especially making sure to ensure style guide conformance and gameplay testing are good). If there are no active experienced programmers who can perform merges, PRs may need to wait until the lead programmer is back to be merged.

Copy link
Contributor

@Patryk26g Patryk26g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was testing it in a cave patch with 0% light and lighting was still changing with the day -night cycle

dligr added 5 commits January 4, 2025 23:42
The patch's ambient light amount already updates with the day-night cycle and doesn't need to multiply by DayLightFraction as such
@dligr
Copy link
Member Author

dligr commented Jan 4, 2025

This should be fixed now (apparently the patch manager used raw light level, which changes regardless of patch)

@Patryk26g
Copy link
Contributor

Patryk26g commented Jan 5, 2025

Okay now lighting in patches with 0% lux is independent from the day-night cycle but the lighting looks the same as if there was light but the chunks and cells should be dark just as they are in other patches when there is night.

Additionally, the night lighting feels too dark overall and playing 0% lux patches with these settings wouldn't be a great experience :/

Also the compound clouds seem to be uneffected and I think that the lightning level should also be changed in editor when we go to "membrane" tab and change day time to night

@dligr
Copy link
Member Author

dligr commented Jan 11, 2025

The issue with day light fraction multiplying should be fixed now. The biome variable was actually a biome template, so its ambient light value should be static, but anyway I changed the UpdateAllPatchLightLevels function to accept a patch as an argument to conform it to the way MicrobeStage gets its light value.

@Patryk26g

Additionally, the night lighting feels too dark overall and playing 0% lux patches with these settings wouldn't be a great experience

I changed the world lighting to have a minimum value of 20%, so the night should be a bit brighter now.

Also the compound clouds seem to be uneffected

The compound clouds should be affected, though it's not very visible in some patches. The effect should be very visible in the estuary patch.

Okay now lighting in patches with 0% lux is independent from the day-night cycle but the lighting looks the same as if there was light but the chunks and cells should be dark just as they are in other patches when there is night.

I think that lighting in 0% lx patches should be left as is, because adding light to those patches was an artistic choice, so it probably shouldn't be changed.

and I think that the lightning level should also be changed in editor when we go to "membrane" tab and change day time to night

I'm not sure if this should be done, since it might worsen the editor's clarity

@hhyyrylainen
Copy link
Member

I think that lighting in 0% lx patches should be left as is, because adding light to those patches was an artistic choice, so it probably shouldn't be changed.

👍

I'm not sure if this should be done, since it might worsen the editor's clarity

I don't really have an opinion on this. I'd need to see how it looks, but the idea with the editor is that the cell is easily visible (which is why it has more light by default than the stage).

Copy link
Member

@hhyyrylainen hhyyrylainen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks straightforward to me now and I tested in game and all seemed to work fine.

@hhyyrylainen hhyyrylainen merged commit 010763e into master Jan 13, 2025
4 checks passed
@hhyyrylainen hhyyrylainen deleted the day_night_cycle_light branch January 13, 2025 08:17
@hhyyrylainen
Copy link
Member

Thanks for adding this long-open feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Day/night cycle should affect cell brightness (and probably also chunk)
4 participants