Modding Help making a high resolution object in smaller size

Discussion in 'Starbound Modding' started by amirmiked12, Mar 24, 2017.

  1. amirmiked12

    amirmiked12 Parsec Taste Tester

    is there anyway to make more high resolution objects in smaller size to be used in starbound?
     
  2. TheElderScroller

    TheElderScroller Pangalactic Porcupine

    Yes. It would require lua scripting.
    You can scale the objects images without changing the resolution.
    The function for that is
    Code:
    animator.scaleTransformationGroup
    I think.
    Look at the standingturret object.
     
  3. amirmiked12

    amirmiked12 Parsec Taste Tester

    can u give me a tutorial like convert this to fit in game like normal bookcase(i mean its size not the function)?
    clock.png
     
  4. lazarus78

    lazarus78 The Waste of Time

    It looks like it is upscaled already. Why not just remake it in the proper scale?
     
  5. MetaFace

    MetaFace Guest

    He wants to keep the detail while making smaller on screen, that way it doesn't look "dry" because of the lack of detail.
     
  6. lazarus78

    lazarus78 The Waste of Time

    It is an upscaled pixel sprite. It already lost detail. It has aliasing all over it. It would do more justice and be more practical to redo it in its proper pixel size. Otherwise it is wasteful to just downscale and upscaled sprite.

    Edit: And because I was bored...

    [​IMG]
     
    Last edited: Mar 24, 2017
    Cyel likes this.
  7. amirmiked12

    amirmiked12 Parsec Taste Tester

    tnx for fixing it but now i just can figure how to resize high res png fie to fit in game??
    can anyone give me the exact code for it?
     
  8. lazarus78

    lazarus78 The Waste of Time

    You would be losing quality by doing that for anything more than 50% reduction in scale.

    As for how to do it... it requires a bit of understanding in object file manipulation. How comfortable are you with editing json?
     
  9. amirmiked12

    amirmiked12 Parsec Taste Tester

    thats hard cause i have never expereinced hard coding and stuff like,
    cause mostly i do 3d modeling .
     
  10. Taitou

    Taitou Yeah, You!

    I know this thread is a bit dead, but item scaling is actually something I'm struggling with right now. I'm looking to have two weapons of mine render in-game at about 67% of their original size. I've been working purely in json thus far for said weapons, and any method to scale them down without diving into LUA would be appreciated. If need be, I can share my .activeitem files.
     
  11. amirmiked12

    amirmiked12 Parsec Taste Tester

    Code:
    "/interface/cockpit/initiatejumpover.png?scalenearest=0.5"
    "/interface/cockpit/initiatejumpover.png?scalebicubic=0.5"
    That's an example of using it, not code to do so.

    Lets say in your JSON you had
    Code:
    "image" : "something.png",
    You'd use processing directives like this
    Code:
    "image" : "something.png?scalenearest=0.5",
    for example. Generally this would be in your animation files, but objects without animations would just add them into the PNG files specified.

    And yes you can do this in LUA if you want. Look at
    /items/active/weapons/melee/energyweaponmelee.lua
    /items/active/weapons/melee/broadsword/energybroadsword.animation

    With that, you can tagswap, and therefore change directives on the fly. Not sure you'd want to change the size dynamically, but other things you might.
     
  12. Taitou

    Taitou Yeah, You!

    Except the JSON solution outright compresses the sprite without keeping any details. I'm trying to avoid doing that.
     
  13. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    that ik of, this is impossible without LUA
     
  14. Taitou

    Taitou Yeah, You!

    Good to know. I'll look into making a solution via LUA, then. Thank you.
     
  15. budyougey

    budyougey Space Spelunker

    sorry for bumping this thread, but I am having a similar problem. Also, the issue was never truly resolved. please respond to this bump, someone that knows anything about something like this.
     
  16. lazarus78

    lazarus78 The Waste of Time

    It has been answered.

    Make your sprite the proper resolution, scale it via json, or scale it via Lua. Examples have been given of all of these.
     
  17. budyougey

    budyougey Space Spelunker

    anyway via Lua hasn't been explained, and the JSON format just makes changes the resolution. I want to change the size, not the resolution. if you know what I mean.
     
  18. lazarus78

    lazarus78 The Waste of Time

    Examples of the Lua method have been given.

    And yes, I know what you are after. You want to scale down an image to use as a sprite, but no matter what method you use, you WILL lose quality of the image. This is literally unavoidable
     
    projectmayhem likes this.
  19. budyougey

    budyougey Space Spelunker

  20. lazarus78

    lazarus78 The Waste of Time

    Notice how they have to have the regular game zoomed in so much in order to see the detail of the weapons? At 2x zoom level, each regular sprite pixel is 2x2 screen pixels. So at 1x zoom level, each sprite pixel is one screen pixel. If you have a higher resolution sprite at that zoom level scaled down, you literally cant have anything visually less than a physical pixel, so they WILL be distorted.

    Example of distortion: https://community.playstarbound.com/attachments/367540_20160721160512_1-png.157737/
     

Share This Page