odrick / free-tex-packer

Free texture packer
http://free-tex-packer.com/
MIT License
911 stars 168 forks source link

Proposal pivot tool and move components #17

Closed rtalon83 closed 3 years ago

rtalon83 commented 5 years ago

Hello @odrick

I was thinking in new features for your app:

  1. One section about set pivot in each image
  2. Group buttons: 'SplitSheet' 'Animations' 'Pivot' at the bottom, maybe?
  3. Enlarge SplitSheet

Are you developing something? Can I help you? In this moment (1-2 weeks) I have free time.

odrick commented 5 years ago

Great ideas! Right now I'm not planning new works on this project. You can implement these features.

rtalon83 commented 5 years ago

Perfect!

MistahMojo commented 5 years ago

Hey, are pivot points still being worked upon? This software is great and it's the only big thing yet to be added.

odrick commented 5 years ago

I plan to do this. But I do not know when.

rtalon83 commented 4 years ago

Hi!

I'm making the pivot function but I'm having trouble because I dont know how do it without change critical code. The only solution I see would be a simple panel (like a Animation panel) where the user only can select only one image. What do you think?

Another question. If I choose a huge image and following this last way, what happend it? we scale the image to fixed dimension.

odrick commented 4 years ago

This is a very complex task. We need:

I think that single window for one image not enough...

rtalon83 commented 4 years ago

I was doing a test using a simple ui where you can see all images (simple order) but I saw a problem when you have a lot of large images (chrome memory increased 2 GB). Maybe the problem is to use Canvas rendering instead of WebGl, I don't know perfectly. I think that the most important is making a correct UI.

eduke2k commented 4 years ago

Great to see that this feature is being worked on. Came here because that's the last thing I would need as well. Also, I think a single window/screen per selected sprite would be enough. The Unity editor, for example, can only edit one sprite at a time, was far as I remeber.

wtfiwinomgs commented 4 years ago

yea +1 from me as well need pivot point. is there any update since jan of this year on this feature?

wtfiwinomgs commented 4 years ago

also if I may add, for animation with lots of frames, have a way to import pivot points from a list of x, y via .txt or something.

JannikGM commented 3 years ago

Can someone explain, possibly with images, what this issue is about? I don't quite understand what workflow or part of the software would benefit from having a pivot point. Are we talking about custom rotations? Is this for manual placement?

123survesh commented 3 years ago

Hi @JannikGM , so a pivot point is going to define a point in an image based on which its going to be positioned on screen. 111947-pivott

The above image illustrates a simple use case. So now to position the stickman based on the default pivot point, we have to factor in the space between the pivot point and the stickman, when we are writing code to position it.

If we say position the stickman to position (100, 100) in a 2D plane, then the image will be positioned such that the pivot point is in (100, 100). But we would want our stickman's body to be on (100, 100) and using the default pivot will create an undesired offset. So to get out stickman's body on (100, 100), we may have to manually set the image's pivot in code (if supported), or change the position from (100, 100) to say (110, 120).

But if we had the ability to choose our own pivot point, say a point on the stickman, then we just have to worry about positioning the stickman and not the difference between the default pivot point and our desired pivot point. This usage also applies for rotation based on a pivot point as you have asked.

Pivots usually do not pose a problem for people using Game Engines like Unity or Godot, but for those using Gaming frameworks like Phaser, where everything is coded by hand (mostly), people bring in the pivot data using visual editors like texture packers.

odrick commented 3 years ago

At the moment I don't have much time to develop this project. Feature requests are postponed.