Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with new Polygon2D UV Editor features #24853

Open
YeldhamDev opened this issue Jan 9, 2019 · 15 comments
Open

Issues with new Polygon2D UV Editor features #24853

YeldhamDev opened this issue Jan 9, 2019 · 15 comments

Comments

@YeldhamDev
Copy link
Member

YeldhamDev commented Jan 9, 2019

Godot version:
e46f28e

Issue description:
@reduz

  • The new internal vertex feature seems unintuitive, at least to me.
  • When a internal vertex is present, the polygon editor in the 2D editor will treat the polygon as having no points.
  • You can't undo internal vertex creation, or custom polygon removal via UndoRedo. Fixed by Fix UndoRedo operations for the new features in the Polygon2D UV Editor #24899.
  • The lines of the actual polygon are hidden when any custom polygon is present. Fixed by 7f69da4.
  • Polygon creation with either internal vertexes or custom polygons present is buggy. Partially fixed by 96445cd.
@ghost
Copy link

ghost commented Jan 9, 2019

It's not clear to me either yet how to use it, or if it is actually working. I had similar issues and in addition to it I opened this crash report: #24862

@reduz
Copy link
Member

reduz commented Jan 15, 2019

Would it be more useful to you if the original polygon lines are still drawn even if you use custom polygons? Other than that I am not sure what else to make from this feedback. The idea of using internal vertices and custom polygons is to have more flexibility in how the polygon will deform when you attach bones to it.

Regarding the bugs, I fixed the one you reported, feel free to report anything you feel is not working as it should.

@YeldhamDev
Copy link
Member Author

@reduz, I got a better grasp of it after fiddling around with it for a while. I think the main problems now are just:

  • No visualization of the original polygon once custom ones are used.
  • Polygons having no points back at the canvas editor when internal vertexes are present.
  • Error spam when recreating a polygon in the UV editor when custom polygons are present.
  • Buggy custom polygons when removing internal vertexes connect to them.

@reduz
Copy link
Member

reduz commented Jan 16, 2019

  • No visualization of the original polygon once custom ones are used.

This can be changed I guess if you find it useful. It would only be as reference, though. Is this alright?

  • Polygons having no points back at the canvas editor when internal vertexes are present.

This is intended, if you are using internal vertices and polygons, editing the original polygon will no longer be possible as the polygon editor is no longer fit for this. This is because the poly editor is shared for a lot of nodes.

  • Error spam when recreating a polygon in the UV editor when custom polygons are present.

I think i fixed this, but let me check again.

  • Buggy custom polygons when removing internal vertexes connect to them.

Let me give a check to this also. Thanks a lot for the feedback!

@YeldhamDev
Copy link
Member Author

This can be changed I guess if you find it useful. It would only be as reference, though. Is this alright?

Certainly.

This is intended[...]

Then the point point editing buttons in the canvas editor should be hidden in this state.

I think i fixed this, but let me check again.

Remember, is specifically in the UV editor, recreating it in the canvas editor works fine.

Let me give a check to this also. Thanks a lot for the feedback!

You're welcome!

@NathanLovato
Copy link
Contributor

Confirming that:

When a internal vertex is present, the polygon editor in the 2D editor will treat the polygon as having no points.

Adding internal vertices to any polygon 2d before or after binding it to a skeleton will make it so the deform will not work. Removing the internal vertices restores deformation.

@reduz
Copy link
Member

reduz commented Feb 13, 2019

Adding internal vertices to any polygon 2d before or after binding it to a skeleton will make it so the deform will not work. Removing the internal vertices restores deformation.

You have to sync the bones again for deformation to keep working. There is nothing I can do about this, as this feature was introduced in a way where compatibility is kept, which is pretty messy.

For 4.0 I plan to rewrite it entirely and break compatibility. For now, I will add a warning that bones need re-sync.

@reduz
Copy link
Member

reduz commented Feb 13, 2019

When a internal vertex is present, the polygon editor in the 2D editor will treat the polygon as having no points.

Yes, you can no longer edit it when using internal vertices. This will only be changed in 4.0 when I can rewrite the whole thing.

@YeldhamDev
Copy link
Member Author

YeldhamDev commented Feb 13, 2019

@reduz But you can edit in this state, which results in strange behaviours. It should not allow editing when having internal vertices outside of the UV editor at all then.

@reduz
Copy link
Member

reduz commented Feb 13, 2019

Ok, I think everything remaining can go for 4.0

@Ranoller
Copy link
Contributor

It´s important to remember that final objetive of polygon internal vertex is animate, so all the points, bones, etc... should be accesible in the main canvas to add the proper animation keys to the array points in the inspector (And could be great to have the hability of add independent keys to the array points).

Other good enhacement would be the killing of the polygon editor and merge the controls with the canvas in the same place that are now the buttons for draw the polygon, so you don´t need to leave the canvas at any moment. It´s an idea, it can be difficult to dessign in the UX side, but it will be more user friendly to centralize entire 2D in the canvas, and more easy to maintain that trying to sincronize the edition in canvas - edition in editor. I think that this was the main idea when that polygon draw controls were added to the canvas.

The idea of using internal vertices and custom polygons is to have more flexibility in how the polygon will deform when you attach bones to it.

Bones are not always neccessary, and should not be mandatory, bones and weights are only one form of animation in 2D mesh animation apps, mainly for humanoid characters... But deep animation can involve animate directly points, or group of points, to change directly the mesh (Ej: close an eye of the character, turn the character's chest or character´s face, make the chest "breath", etc...). With bones you can animate body skelleton, flags, fire, trees, etc... but for other things is necessary animate the mesh (or directly animate traditionally, no other way). It´s common in that apps-runtimes to have separated concepts for "mesh" and "image" (in godot would be polygon2D and sprite), and meshes can be weighted, directly point to point animated, and a mix of that (of unpredictable results :) ). All of this fits very well with the SceneTree concept of godot, if you see spine or dragonbones hierarchy tree, you can see a perfect representation of the godot Scene dock, it´s the same concept. An spine animation is a packed scene with an animatorPlayer in, relative positions, scales, and rotations are iherited by the childs, etc .... but godot is more modular, so you can have simultaneous animationPlayers running, etc... it could be better, the concept it´s the same but with more freedom.

YeldhamDev added a commit to YeldhamDev/godot that referenced this issue Feb 16, 2019
@jmoon1506
Copy link

The editor could use a reflect tool as well. Here I slightly modified the scale widget:
jmoon1506@4dc2ca8

Would love to do a pull request. Here it is in action:
scale_reflect

@KoBeWi
Copy link
Member

KoBeWi commented Jul 3, 2020

@YeldhamDev What is the status of this issue? If the bug part is fixed in 3.2.2, this could be probably closed and any major enhancements should be turned into proper proposals.

@YeldhamDev
Copy link
Member Author

@KoBeWi The second point is still present.

@hsandt
Copy link
Contributor

hsandt commented Jul 21, 2023

#24899 seems to have fixed create/remove point operations, but translation in UV or Points tab are still undoable. This makes it easy to lose one's config and I need to locally git stage often to be safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants