Modding Help Sprite scaling.

Discussion in 'Starbound Modding' started by Astraina, Nov 9, 2014.

  1. Astraina

    Astraina Void-Bound Voyager

    Howdy, i have been in and out of starbound for awhile now and haven't really had a reason to be on the forums up until now, i have gotten the itch to do some experimenting on little personal mods to kinda teach myself on how modding works for the game. I have seen a lot of race mods here some good, others.. well not so much.. though i am sure its been answered plenty of times, Sprite Scaling.. as in i can open up Photoshop or what ever kind of program that i can draw in.. and i decide i want a to make a race that uses a dimension of 132 by 242 as its first stance pose, obviously this would cause alot of problems.. such as armor not fitting the sprites in which case you would need to make armor restricted for that race only.. but the size of it though would cause clipping in the world and just be silly looking.. like giants.


    Anyway!

    is there some way to get the game to scale the sprite down without it losing its original details? i am so used to doing things with Doom since it has a code line so i can pretty much have a highly detailed sprite and use that line of code that tells the game to scale it down to a certain point, does starbound have anything like this? or am i stuck at using a certain sprite resolution?
     
    DJYawe likes this.
  2. Riuny

    Riuny Big Damn Hero

    I might be wrong but as far as I know, you cannont down-scale anykind of image file without losing details. Most of image file is pixel-based. So higher the resolution is the more details you can make. Down-scaling means reducing resolution, that means you will lose some of the pixels in that process. Larger scale difference will cause larger loss of pixels which will make horrible blur of image.

    Conclusion : Sadly, there is absolutely no way you can do what you want to do. I know it is a disappointing answer but I suggest you to work, based on the resolution of game's original image file
     
  3. The | Suit

    The | Suit Agent S. Forum Moderator

  4. Riuny

    Riuny Big Damn Hero

    Huh:confused:, I didn't know you could do that. But wouldn't it make your mod heavier?(I mean in computer memory-wise)
     
  5. The | Suit

    The | Suit Agent S. Forum Moderator

    Honestly I have no idea.
    Though I guess it shouldn't since it is still just a sprite with a single collision box

    At most I figure it would just make starbound uglier because of the massive contrast in art styles.
     
    Last edited: Nov 9, 2014
  6. Riuny

    Riuny Big Damn Hero

    In concept of characters, I agree with you. However, what I'm thinking, is that it might be useful for effects and particles. I'm not sure but it MIGHT be.
     
  7. AstralGhost

    AstralGhost Pangalactic Porcupine

    Short answer: Nope. None.

    Longer answer: No, and it is literally impossible to scale something down and meanwhile maintain the same detail. Scaling down an image basically means removing details.

    Longest answer:
    There seems to be some confusion here and I think this entire process needs clarification.
    Starbound is actually scaling UP their pixel art to a certain size, based on your chosen resolution and the window size. If it didn't do this then the game window would be incredibly tiny on modern monitors.
    This means that for each pixel drawn in the various artwork PNG files they are up-scaled to whatever resolution the game is running on. In fact, you can occasionally see some artifacts caused by this process in terms of misshapen "pixels", they don't make sure they are scaling 1:1.

    Because they upscaling without a 1:1 conversion, it becomes possible to do something like the TouhouBound mod, wherein a more detailed image is placed into the game than the rest of the art, which is done at a much lower level. The reason this can be done is because the game uses various 'Frames' files (with a .frames extension) which tell the game how big each frame is and how many frames are in the image. Using quick math the game basically chunks the image up and places it straight into the game without worrying about the pixel-size.

    HOWEVER - the problem here is that the races contain no .frames files for their bodies. So you can't do this with the races because you can't tell the game how big the frames are for each image in each of the body files, so it always uses the default.
    You can do it with lots of other things, though.

    P.S. As you can see from the TouhouBound image, this also makes the game's graphics look really weird when you mix resolutions like that.
     
  8. AstralGhost

    AstralGhost Pangalactic Porcupine

    I'm surprised no one corrected me.

    I just looked in the assets again and noticed something... There are frames files for the race bodies, they are just in the root 'humanoid' directory and not inside each race's directories. And the head files are structured differently than other frames files, without the frame-size stuff. Though it may be possible to add the size information and it may just work automatically like the rest.

    Meaning I think this mod MIGHT be possible (I didn't try it, so I'm not sure)... However, even if you can edit the frame-size for heads, you'd have to replace EVERY single race's bodies with higher resolution versions and your mod would also be incompatible with all race mods unless they had a higher-res compatibility version uploaded to make it compatible with this mod.

    This includes every races' bodies, heads, arms, and hair. (And you'd probably want to then do armor, too.) It would be a MAJOR graphics overhaul.

    If there were a race you didn't replace you'd end up with really glitchy graphics and basically missing/distorted characters.

    Edit: The hair seems to lack the size information, too. And both are listed within "FrameList" while all the files with size info are under "FrameGrid". So I still think this mod is probably not quite possible. It's probably worth a try, though.
     
    Last edited: Nov 11, 2014
  9. The | Suit

    The | Suit Agent S. Forum Moderator

    To be fair - I thought you knew cause you were making that dung beatle mod.
     
  10. AstralGhost

    AstralGhost Pangalactic Porcupine

    Ha! Ironically that's the reason I DIDN'T know.
    I had no need to edit them and figured if they weren't in my mod folder then the files weren't in there at all. I didn't think to check other folders until today when I was looking around at some updated assets. :)
     
  11. Timecop!1986

    Timecop!1986 Aquatic Astronaut

    So, judging from this thread, how do I make the sprites (individual) bigger?
    For example, when I'm in paint.net (my ONLY Starbound sprite editor that's free), and I want a larger Avian .malebody sprite. How do I do that?
     

Share This Page