hyperPad hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

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

    Scheduled Pinned Locked Moved
    Help and Support
    4
    17
    533
    Loading More Posts
    • 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.
    • Jack8680J
      Jack8680 @Deeeds
      last edited by

      @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 Reply Quote 0
      • D
        Deeeds @Jack8680
        last edited by

        @Jack8680 What?

        Jack8680J 1 Reply Last reply Reply Quote 0
        • Jack8680J
          Jack8680 @Deeeds
          last edited by

          @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 Reply Quote 0
          • MurtazaM
            Murtaza Admin
            last edited by

            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 Reply Quote 0
            • D
              Deeeds @Murtaza
              last edited by

              @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 Reply Quote 0
              • MurtazaM
                Murtaza Admin
                last edited by

                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 Reply Quote 1
                • D
                  Deeeds @Murtaza
                  last edited by

                  @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 Reply Quote 0
                  • MurtazaM
                    Murtaza Admin
                    last edited by

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

                    1 Reply Last reply Reply Quote 0
                    • D
                      Deeeds @Murtaza
                      last edited by

                      @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 Reply Quote 0
                      • iTap DevelopmentI
                        iTap Development @Deeeds
                        last edited by

                        @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 Reply Quote 0
                        • D
                          Deeeds @iTap Development
                          last edited by

                          @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 Reply Quote 0
                          • MurtazaM
                            Murtaza Admin
                            last edited by Murtaza

                            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 Reply Quote 0
                            • First post
                              Last post