Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. Transform Graphic Objects in Units, not Scale %: HOW?

Transform Graphic Objects in Units, not Scale %: HOW?

Scheduled Pinned Locked Moved Help and Support
17 Posts 4 Posters 1.7k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Deeeds
    wrote on last edited by
    #1

    I'm about done with the "joys" of using the Scale facilities of the Transform Object. It's fun for a few moments, then utterly infuriating, especially when combined with the peculiarities of the "snapping" and the odd way that anchors don't work.

    How do I operate in literal units of the image/scene when editing/transforming imported graphics and their objects?

    // I'm whinging because I have used a LOT of different design software, most of which solved these problems in the late 1980's or early 1990's, at the latest.

    Jack de WildeJ 1 Reply Last reply
    0
    • D Deeeds

      I'm about done with the "joys" of using the Scale facilities of the Transform Object. It's fun for a few moments, then utterly infuriating, especially when combined with the peculiarities of the "snapping" and the odd way that anchors don't work.

      How do I operate in literal units of the image/scene when editing/transforming imported graphics and their objects?

      // I'm whinging because I have used a LOT of different design software, most of which solved these problems in the late 1980's or early 1990's, at the latest.

      Jack de WildeJ Offline
      Jack de WildeJ Offline
      Jack de Wilde
      wrote on last edited by
      #2

      @Deeeds by "units of the image/scene" I'm assuming you mean hyperPad metres. I'm not sure what problems you're having with anchors. The grid works fine for me for snapping to metres divided into powers of 2, but if you want to scale to something different like a third of a metre it gets a bit more complex.

      You can adjust the grid scale by tapping the globe at the top and changing the pixel to metre scale, but this doesn't accept decimal values. If you want to you can calculate the scales.

      A metre is 1/32 of the screen width and 1/24 of the screen height. On a 2048 by 1536 pixel image that takes up the screen, this means a metre is 64 pixels (it's actually 32 I think because hyperpad scales it down, so I'm going by size before importing). If you have an image of x pixels width, divide by 64 to get the width in metres. Then divide the target width in metres by that value and multiply by 100 to get the percentage scale you want.

      Example: you have a 100 pixel width image, but you want to have width of 2m.
      100/63=1.5625.
      2/1.5625=1.28.
      Scaling the image to 128% will bring the width to 2m.

      D 1 Reply Last reply
      0
      • Jack de WildeJ Jack de Wilde

        @Deeeds by "units of the image/scene" I'm assuming you mean hyperPad metres. I'm not sure what problems you're having with anchors. The grid works fine for me for snapping to metres divided into powers of 2, but if you want to scale to something different like a third of a metre it gets a bit more complex.

        You can adjust the grid scale by tapping the globe at the top and changing the pixel to metre scale, but this doesn't accept decimal values. If you want to you can calculate the scales.

        A metre is 1/32 of the screen width and 1/24 of the screen height. On a 2048 by 1536 pixel image that takes up the screen, this means a metre is 64 pixels (it's actually 32 I think because hyperpad scales it down, so I'm going by size before importing). If you have an image of x pixels width, divide by 64 to get the width in metres. Then divide the target width in metres by that value and multiply by 100 to get the percentage scale you want.

        Example: you have a 100 pixel width image, but you want to have width of 2m.
        100/63=1.5625.
        2/1.5625=1.28.
        Scaling the image to 128% will bring the width to 2m.

        D Offline
        D Offline
        Deeeds
        wrote on last edited by
        #3

        @Jack8680 How do you edit the object in Metres? I only see:

        Position
        in metres

        Scale
        in X and Y percentages

        Rotation
        Degrees

        Anchor Point
        in Percentages

        Order
        Z position in positive values

        Jack de WildeJ 1 Reply Last reply
        0
        • D Deeeds

          @Jack8680 How do you edit the object in Metres? I only see:

          Position
          in metres

          Scale
          in X and Y percentages

          Rotation
          Degrees

          Anchor Point
          in Percentages

          Order
          Z position in positive values

          Jack de WildeJ Offline
          Jack de WildeJ Offline
          Jack de Wilde
          wrote on last edited by
          #4

          @Deeeds that's what I'm saying, you can use the grid to scale the object to metres, or calculate the percentage scale needed based on the resolution of the image and the metres you want. Scale in metres could be a nice option though.

          D 1 Reply Last reply
          0
          • Jack de WildeJ Jack de Wilde

            @Deeeds that's what I'm saying, you can use the grid to scale the object to metres, or calculate the percentage scale needed based on the resolution of the image and the metres you want. Scale in metres could be a nice option though.

            D Offline
            D Offline
            Deeeds
            wrote on last edited by
            #5

            @Jack8680 Oh. I see. You've used the grid as a workaround for not having literal units based sizing. That's an interesting way to solve a problem. Colour me amazed!

            Jack de WildeJ 1 Reply Last reply
            0
            • D Deeeds

              @Jack8680 Oh. I see. You've used the grid as a workaround for not having literal units based sizing. That's an interesting way to solve a problem. Colour me amazed!

              Jack de WildeJ Offline
              Jack de WildeJ Offline
              Jack de Wilde
              wrote on last edited by
              #6

              @Deeeds wait that's actually am easier way to do it. Scale the object to 1m using the grid then multiply the scale by target size.

              D 1 Reply Last reply
              0
              • Jack de WildeJ Jack de Wilde

                @Deeeds wait that's actually am easier way to do it. Scale the object to 1m using the grid then multiply the scale by target size.

                D Offline
                D Offline
                Deeeds
                wrote on last edited by
                #7

                @Jack8680 What?

                Jack de WildeJ 1 Reply Last reply
                0
                • D Deeeds

                  @Jack8680 What?

                  Jack de WildeJ Offline
                  Jack de WildeJ Offline
                  Jack de Wilde
                  wrote on last edited by
                  #8

                  @Deeeds say you have an image and you want to get it to be one and a third metres wide. You would use the grid to scale the image down to 1 metre wide, then look at the percentage it's at and multiply that by 1.33. Going to sleep now, hope I'm not being too confusing.

                  1 Reply Last reply
                  0
                  • MurtazaM Offline
                    MurtazaM Offline
                    Murtaza
                    Admin
                    wrote on last edited by
                    #9

                    I'm not sure I understand the question exactly.
                    But in hyperPad 1 meter = 32px (actually 32 points).
                    By default the grid is at 32 px, and the snapping is based off this as well.

                    You can also change this ratio in the global properties. It's under PTM, where you can make 1 meter =100 px for example.

                    D 2 Replies Last reply
                    0
                    • MurtazaM Murtaza

                      I'm not sure I understand the question exactly.
                      But in hyperPad 1 meter = 32px (actually 32 points).
                      By default the grid is at 32 px, and the snapping is based off this as well.

                      You can also change this ratio in the global properties. It's under PTM, where you can make 1 meter =100 px for example.

                      D Offline
                      D Offline
                      Deeeds
                      wrote on last edited by
                      #10

                      @Murtaza In most every graphics editor on earth (I really can't think of an exception) editing an object's size is done in literal units, primarily. Percentage size changes are not nearly as universally useful, nor commonly used. Wherever they're offered, percentage scaling is the secondary option, not the primary option... which is literal units.

                      So, let's say, I dropped in a perfectly square Sprite, measuring 100px by 100px.

                      Whatever the scaling system of the engine/renderer is, that would be mapped at 100px to 100px of the engine... and might mean that it's (for example) 50pts by 50 pts, in the engine's units.

                      Now, if I want to change the Square Sprite's shape, I can edit the points, so I might make it:

                      100 pts by 50 pts, thereby doubling the length of one side.

                      This is how every editor on earth works because all layouts are done in the literal units of the canvas upon which the work is being done, not in percentages of size relative to individual and uniquely shaped incoming objects. In other words, the canvas is king, not the entities that go onto it.

                      I'm simply shocked to see scaling in percentages take priority over literal sizing by units to the extent that there are no entry points for unit editing of a shape's size/ratio. Very bizarre choice. Makes it obvious none of the developers have ever used Flash, Illustrator, Photoshop, CorelDraw, Freehand or anything else that works with images. Including Unity ;)

                      1 Reply Last reply
                      0
                      • MurtazaM Offline
                        MurtazaM Offline
                        Murtaza
                        Admin
                        wrote on last edited by
                        #11

                        Ahh I see.
                        You want to scale an image to a specific pixel size.

                        Yeah. The reason why we decided to go this route is simplicity. Most of our users never worked in graphics editor or that sort of software.

                        In their minds they just want something double the size. So for these type of users 200% is more intuitive than making a 64x64 pixel image be 128x128.

                        D 1 Reply Last reply
                        1
                        • MurtazaM Murtaza

                          Ahh I see.
                          You want to scale an image to a specific pixel size.

                          Yeah. The reason why we decided to go this route is simplicity. Most of our users never worked in graphics editor or that sort of software.

                          In their minds they just want something double the size. So for these type of users 200% is more intuitive than making a 64x64 pixel image be 128x128.

                          D Offline
                          D Offline
                          Deeeds
                          wrote on last edited by
                          #12

                          @Murtaza Is it a pain to add arbitrary unit editing of sprites right underneath (or above) the percentage scaling feature, and make it dynamically adjust if the user adjust percentages, and (conversely) make the percentages dynamically adjust if the user edits the literal units?

                          1 Reply Last reply
                          0
                          • MurtazaM Offline
                            MurtazaM Offline
                            Murtaza
                            Admin
                            wrote on last edited by
                            #13

                            I'm not sure. @Hamed, how difficult is it to add this?

                            1 Reply Last reply
                            0
                            • MurtazaM Murtaza

                              I'm not sure I understand the question exactly.
                              But in hyperPad 1 meter = 32px (actually 32 points).
                              By default the grid is at 32 px, and the snapping is based off this as well.

                              You can also change this ratio in the global properties. It's under PTM, where you can make 1 meter =100 px for example.

                              D Offline
                              D Offline
                              Deeeds
                              wrote on last edited by
                              #14

                              @Murtaza I've just messed around with something I need to do exactly.

                              For the record, and for everyone else from the graphics world... it is 32 POINTS per metre.

                              Not pixels.

                              Pixels are, by default, at double that in hyperPad, 64px per metre.

                              Although this can change, and will change, when targeting iPhone Plus phones against the stock size, and will also change on the iPhone X.

                              So far all iPads are using a 1:2 points to pixel ratio.

                              iTap DevelopmentI 1 Reply Last reply
                              0
                              • D Deeeds

                                @Murtaza I've just messed around with something I need to do exactly.

                                For the record, and for everyone else from the graphics world... it is 32 POINTS per metre.

                                Not pixels.

                                Pixels are, by default, at double that in hyperPad, 64px per metre.

                                Although this can change, and will change, when targeting iPhone Plus phones against the stock size, and will also change on the iPhone X.

                                So far all iPads are using a 1:2 points to pixel ratio.

                                iTap DevelopmentI Offline
                                iTap DevelopmentI Offline
                                iTap Development
                                wrote on last edited by
                                #15

                                @Deeeds I think retina devices have two pixels per point, non retina have one per point.
                                It’s not some ratio that will change on normal and plus sizes I don’t think.
                                @Murtaza i think you’ve explained this before? Is this correct?

                                D 1 Reply Last reply
                                0
                                • iTap DevelopmentI iTap Development

                                  @Deeeds I think retina devices have two pixels per point, non retina have one per point.
                                  It’s not some ratio that will change on normal and plus sizes I don’t think.
                                  @Murtaza i think you’ve explained this before? Is this correct?

                                  D Offline
                                  D Offline
                                  Deeeds
                                  wrote on last edited by
                                  #16

                                  @iTap-Development Plus sized iPhones are 3x, meaning that it's 3 pixels per point.

                                  Fortunately, iPhone X is also this. But truly this.

                                  iPhone Plus phones have a very odd scaling down to 1920 from 2208, also. Creating an ever so slight blur on everything.

                                  1 Reply Last reply
                                  0
                                  • MurtazaM Offline
                                    MurtazaM Offline
                                    Murtaza
                                    Admin
                                    wrote on last edited by Murtaza
                                    #17

                                    Yes.
                                    It's points not pixels (as I mentioned above).

                                    However, for phones and performance we actually go as far as @2x and not 3x for images. This is usually what most games with lots of moving graphics do. (it reduces memory usage).

                                    on importing, hyperPad assumes you're importing retina version (unless you turn the toggle off on the import popup) and will automatically create a halfsize nonretina version for you.

                                    Edit: Actually pretty sure you can use @3x when exporting and manually adding the images to your xcode project. @Hamed will need to confirm though.

                                    1 Reply Last reply
                                    0

                                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                    With your input, this post could be even better 💗

                                    Register Login
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • Users
                                    • Search