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

Ability to automatically create a polygon in the Polygon2D UV editor #1309

Open
nesja opened this issue Aug 4, 2020 · 2 comments
Open

Ability to automatically create a polygon in the Polygon2D UV editor #1309

nesja opened this issue Aug 4, 2020 · 2 comments

Comments

@nesja
Copy link

nesja commented Aug 4, 2020

Describe the project you are working on:
I am working on a project based on many objects with 2D mesh deformations using Polygon2D

Describe the problem or limitation you are having in your project:
It takes a long time to create a polygon manually by selecting each vertex point, if the shape has a significant number of points.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
The smallest improvement I can suggest is the automatic creation of a polygon based on previously added vertex points. Mesh density can be maximized, and can be manually optimized in desired areas. An ideal improvement would be a fully automatic creation of polygons with their vertexes based on the alpha channel of the image with mesh density settings. This will allow to create objects much faster than it is now.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
The simplest implementation of the interface is just a button in the polygon editor that generates a polygon.
Also, the polygon generation algorithm does not have to be super fast, since the process takes place only in the editor and in any case will be faster than manual generation. So anything that connects the nearest points into triangles will do.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
Is there a reason why this should be core and not an add-on in the asset library?:
It looks like this enhancement will significantly affect the user experience and will allow to unleash the potential of the functionality that already exists in Godot, will give the opportunity to abandon external animation editors, such as Spine, DragonBones, which allow to create complex meshes, but have issues using with Godot. So I think it's worth adding this feature to the editor.

@esper369
Copy link

I have similar problem.
In 3D I can convert 3D Mesh from blender to 3D Collision Shape.
But I work in 2D. And I want convert 2D mesh from blender to 2D CollisionShape. But Godo can't do it,(((

@nesja
Copy link
Author

nesja commented Aug 11, 2020

As a trick, I think it is possible to copy the data (ignoring z-axis) of the mesh vertices into Polygon2d. MeshDataTool might be helpful in your case. It is also possible as an add-on that create a Polygon2D data based on texture data.

Actually I think 2D mesh deformation is a very powerful and simple creative tool. Especially if it is integrated into the engine, where you can combine animation with events or use fully generated animation. And generating a Polygon2D (in uv editor) within Godot as a core functionality will provide a smooth workflow and greatly improve user experience for 2D mesh deformation. So it will make Godot more userfriendly2D in general.

@Calinou Calinou changed the title Ability to automatically create a polygon in the Polygon2d UV editor Ability to automatically create a polygon in the Polygon2D UV editor Dec 26, 2020
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

3 participants