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); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Accidental hi-res sprites  (Read 4474 times)

Xalendi

  • Commander
  • ***
  • Posts: 198
    • View Profile
Accidental hi-res sprites
« on: January 18, 2014, 09:14:31 AM »

I seem to have discovered a method of creating hi-res sprites.

First, create your sprite as normal, so for a frigate as an example, it should be about 110 pixels tall.
Use the ship editor, create the ship, get it working in game.
Boot up photoshop, or the image editor of your choice.
Look at the dimensions of your lo-res sprite - find the size in centimeters
create the hi-res version of your sprite
go to image size, set the dpi to 400, then enter the size in centimeters of your lo-res sprite. The image should end up slightly larger than before.
Save the image as a .png, overwriting the lo-res .png.

Bam! Hi-res sprite.

I've tested this in game, the sprite is exactly to scale to all other ships, both in campaign, battles, and variant editor.

I've just no idea why.

So...did I discover this? Or is this an incredibly obvious thing that everyone knew about?
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Accidental hi-res sprites
« Reply #1 on: January 18, 2014, 09:20:30 AM »

Changing the DPI shouldn't change total pixel size for PNG, unless you select a DPI that's not 1:1 with Web standard (75/72).  IOW, you are really re-sizing the sprite.

If you want to do editing on a sprite with airbrush, a protip:  if you resize a sprite at 2X / 4X size, it'll shrink back down with hardly any aliasing, if you don't go outside the border.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Xalendi

  • Commander
  • ***
  • Posts: 198
    • View Profile
Re: Accidental hi-res sprites
« Reply #2 on: January 18, 2014, 10:01:15 AM »

my point is, using the method outlined above, you get this:
Spoiler
[close]

as compared to this:
Spoiler
[close]

Despite the fact that going by the size of the sprites, the Cobalt in the first image should be around five times the size of that Lasher.

and I have no idea why
Logged

Xalendi

  • Commander
  • ***
  • Posts: 198
    • View Profile
Re: Accidental hi-res sprites
« Reply #3 on: January 18, 2014, 10:04:58 AM »

Just realised how my post might be misleading. Yes, the hi-res sprite has more pixels than the lo-res, (315x591 as compared to 53x100) but it remains the same size in game, instead of being massively oversized.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Accidental hi-res sprites
« Reply #4 on: January 18, 2014, 12:11:49 PM »

Ah, so the image remains the same scale, because the size variables in the .ship are the same?  Interesting that that's how it works.  It's really not a good practice, though; if the details are smaller than 1:1 then you're just wasting memory.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Wyvern

  • Admiral
  • *****
  • Posts: 3786
    • View Profile
Re: Accidental hi-res sprites
« Reply #5 on: January 18, 2014, 12:40:49 PM »

Well, you're only "wasting memory" if people always play the game zoomed out the maximum amount.  This would still be a useful trick for, say, a total conversion that adjusted ship scale downwards some.
Logged
Wyvern is 100% correct about the math.

dmaiski

  • Captain
  • ****
  • Posts: 422
  • resistance is futile
    • View Profile
Re: Accidental hi-res sprites
« Reply #6 on: January 21, 2014, 05:41:35 AM »

SS dose not eat up much memory with graphics, most of the graphics related lag comes from particle/glow simulations... using massive(MB++) sprites for frigates probably not a good idea but otherwhise
Logged
BISO
(WIP) lots of shiny new weapons ( :-[ i have more weapons then sprites :-[ )

i got a cat pad
its like a mouse pad but better!

Xalendi

  • Commander
  • ***
  • Posts: 198
    • View Profile
Re: Accidental hi-res sprites
« Reply #7 on: January 24, 2014, 06:59:26 AM »

Is it possible to get Mb sizes for .png images?
Logged