Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); In-development patch notes for Starsector 0.98a (2/8/25)

Author Topic: Planetary rings are rendered off-center  (Read 526 times)

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Planetary rings are rendered off-center
« on: March 12, 2024, 08:33:51 AM »

Just a minor visual glitch. In system map view, planetary rings are rendered off-center. It's mostly visible with min zoom and smaller planets.

I noticed it only after removing grid lines from the map with Mnemonic Utils mod. Without the mod the rings are still off-center, but it's harder to spot.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25148
    • View Profile
Re: Planetary rings are rendered off-center
« Reply #1 on: March 12, 2024, 11:38:12 AM »

Thank you, will take a closer look at some point! Not actually seeing this happening in any of the planet/ring combinations I've looked at so far.
Logged

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: Planetary rings are rendered off-center
« Reply #2 on: March 13, 2024, 07:07:07 AM »

I made a pristine vanilla savegame to make sure the issue isn't caused by mods. There are at least two offending rings I found: in Ishkur and Delta Dyriad systems. Screenshots attached. The save can be downloaded here.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25148
    • View Profile
Re: Planetary rings are rendered off-center
« Reply #3 on: March 13, 2024, 08:46:10 AM »

Thank you! Hmm, looking at Delta Dyriad, it looks pretty close to centered and I suspect it's within the error tolerance of "rendering a fuzzy circular sprite, it's not going to be exact".
Logged

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: Planetary rings are rendered off-center
« Reply #4 on: March 13, 2024, 09:48:02 AM »

It appears there's no need to search in the fringes. I attach screenshots of Mayasura and Eos Exodus systems from the same save.

I would hazard a guess there's a off-by-one error triggered in some cases.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25148
    • View Profile
Re: Planetary rings are rendered off-center
« Reply #5 on: March 13, 2024, 09:53:17 AM »

Looking at Eos Exodus, it appears to change depending on zoom level. I suspect that it's just due to rounding to integer coordinates somewhere.
Logged

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: Planetary rings are rendered off-center
« Reply #6 on: March 13, 2024, 09:58:36 AM »

I see, if the rounding is done by discarding the fractional part, instead of to the nearest integer, the result could look like that.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25148
    • View Profile
Re: Planetary rings are rendered off-center
« Reply #7 on: March 13, 2024, 10:08:44 AM »

Hmm. Just a real quick test of removing the rounding/truncating seems like it actually doesn't change things. And there *is* explicit casting to an int in the code (i.e. discarding the fractional part), which is not strictly necessary, so I suspect it's actually there for a reason (i.e. something I don't currently remember looked bad w/o it). I'll... keep an eye on this.
Logged