Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Rendering issue with some vanilla weapons.  (Read 415 times)

Nes

  • Lieutenant
  • **
  • Posts: 61
    • View Profile
Rendering issue with some vanilla weapons.
« on: December 31, 2022, 12:14:08 AM »

A mischievous, even devious little bug that almost nobody seems to be completely immune against, vanilla included ;D

That being a misaligned center of the sprite by a half or a quarter px, causing the image ingame to appear blurry to a various degree.

Couple of screenshots:
Left being the current weapons as they appear ingame.
Right are fixed by adjusting their canvas size. (this gets even more annoying for hardpoints, with their center being shifted down by a quarter)




Culprits!
may not be a complete list

arbalest (hardpoint)
guardian pd (hardpoint)
high velocity driver (turret, hardpoint) cant believe i've never noticed this one, heh
railgun (hardpoint)
reality disruptor (hardpoint)
rift lance (hardpoint)
rift torpedo (hardpoint)
shock repeater (hardpoint)


Cheers, and happy holidays!
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: Rendering issue with some vanilla weapons.
« Reply #1 on: December 31, 2022, 11:57:47 AM »

Thank you for the report, and happy holidays to you, too!

Hmm. I think this depends on the exact placement of the weapon slots (and zoom level, too). For example, if you zoom in on the Rift Lance in the Aurora, it looks fine - and I think it looks fine when it's mounted on the Wolf at a lower zoom level, just due to how the Wolf's weapon slots line up with pixel boundaries. The sprites themselves are fine, I believe, but weapon slots can have non-whole coordinates, so this sort of thing will just happen sometimes.
Logged

Nes

  • Lieutenant
  • **
  • Posts: 61
    • View Profile
Re: Rendering issue with some vanilla weapons.
« Reply #2 on: January 04, 2023, 03:54:12 PM »

Ah, this calls for a clarification, making sure we are on the same page!
Indeed, it only noticeably affects image at 100%, native zoom level, which is how ships tend to be displayed in the refit screen, for example.
And the non-whole weapon coordinate will cause the same issue too, also true!

Right so, a wolf with a rift lance at 100% zoom (from a clean, fresh ss install just to be completely sure nothing funny is going on :) )
Two rift lances infact, a turret which renders fine, and the hardpoint which does, well, not.

Weapon slot coords on a wolf are nice and whole, no issue there.
Now, for the weapon itself the center coordinate appears to be decided by sprite's canvas size, so let's take a look!
Rift lance turret dimensions are 42x42, and the center for turrets... is in the center, nice and even, all is well.
The hardpoint is 21x34, with the center for hardpoints shifted by a quarter vertically, thats no good on both dimensions!

Cropping the hardpoint's sprite canvas to, lets say 22x36 without resizing or stretching the gun itself (and same adjustment for the glow sprite!)

Does the trick!
Attached is an utility mod with the above edit applied for several weapons, while enabled it will override vanilla sprites, for easy comparison.

Wow that was needlesly werbose, haha ::)

[attachment deleted by admin]
Logged

David

  • Global Moderator
  • Admiral
  • *****
  • Posts: 913
    • View Profile
Re: Rendering issue with some vanilla weapons.
« Reply #3 on: January 05, 2023, 05:51:21 AM »

All fixed up, thank you for the clarification!
Logged