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

Blend the radius searched for stars based on desired density. #5116

Merged
merged 2 commits into from
Jan 13, 2021

Conversation

fluffyfreak
Copy link
Contributor

Limit the radius searched for stars and mix it from the minimum to the desired radius depending on the star density.

Fixes #4990

…e desired radius depending on the star density
@fluffyfreak
Copy link
Contributor Author

Also @Web-eWorks I keep being really impressed by how good the Ctrl+i debug/performance display is!

@impaktor
Copy link
Member

impaktor commented Jan 9, 2021

If one sets to 0 background stars, will one still get the "real" stars then?

@fluffyfreak
Copy link
Contributor Author

fluffyfreak commented Jan 10, 2021

The minimum was set to 50,000 stars, so it'll work like this:

  • Minimum real stars min radius = 8 light years
  • Target maximum radius for stars is set in ini file to ~220 light years
  • "0" stars is actualy equal to a multiplier of 0.01 (this hasn't changed).
  • So you'll get all real stars within a lerp of 8.0 to 220 by 0.01 amount = 10.12 light years.
  • After that it'll add in fake stars until it reaches the target number of background stars which will be = 54,500 due to also lerping by 0.01 between 50,000 and 500,000

I suppose that the min/max range could now be changed to 0.0 instead of 0.01

… now that I'm lerping between min and max values
@fluffyfreak
Copy link
Contributor Author

@impaktor and now I've changed the lerp/mix range to 0.0 to 1.0 👍

Copy link
Member

@Web-eWorks Web-eWorks left a comment

Choose a reason for hiding this comment

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

Looks nice and clean as always! Haven't had a chance to test it, but it's minimal enough I don't think there will be any bugs to find.

@Web-eWorks Web-eWorks merged commit d1ea10b into pioneerspacesim:master Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skybox star density behaves oddly
3 participants