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

Add an easier way to generate geometry with weights in Polygon2D #3791

Open
vassembly opened this issue Jan 13, 2022 · 9 comments
Open

Add an easier way to generate geometry with weights in Polygon2D #3791

vassembly opened this issue Jan 13, 2022 · 9 comments

Comments

@vassembly
Copy link

vassembly commented Jan 13, 2022

Describe the project you are working on

A game with 2D character rigs and heavy character customization system

Describe the problem or limitation you are having in your project

Manual geometry, weight and uv drawing is very time-consuming and not intuitive.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add a way to automatically generate meshes with subdivision, polygon count, and weights based on bones positions.
Or a quicker way to draw polygons, because it's kinda hard to manually draw over 200 polygons for each model and make them bend correctly.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

It would be very nice to have a button or a docked panel in the Polygon2D UV editor to automatically generate a mesh with different properties like subdivision, alpha tolerance, polygon count, etc. Like in Unity Engine.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It is possible to write a tool script, but i don't think it will take a few lines of code. It would be way more easy to generate meshes for people who never did that.

Is there a reason why this should be core and not an add-on in the asset library?

I think mesh generation should be supported in the engine itself, i'm still looking back at unity's skinning editor that can easily generate polygons and UVs, and it's actually does a pretty good job.

@dweremeichik
Copy link

dweremeichik commented Jan 13, 2022

I agree that these tools need some TLC in editor.

I was researching this issue tonight (how I came across this proposal) and found something that may be helpful to you:
https://youtu.be/liV5wLA_R1k

Edit: I've created a plugin to automate triangulation based on the above link, it is currently pending approval in the asset library.

@vassembly
Copy link
Author

Oh wow, thank you so much for showing that, you saved my time. Would love to see this in godot officially.

@dweremeichik
Copy link

dweremeichik commented Jan 13, 2022

Related: #1309

Related bug on converting sprite to polygon2D: godotengine/godot#46698

Also related bug report mentioning complete rewrite for 4.0: godotengine/godot#24853
Although the latest pre alpha 8f6cba3 does not reflect this at all (no apparent editor changes).

@Calinou
Copy link
Member

Calinou commented Jan 13, 2022

Although the latest pre alpha 8f6cba3 does not reflect this at all (no apparent editor changes).

This was likely postponed and won't be done for 4.0 due to lack of time.

@dweremeichik
Copy link

I've created a plugin that will automatically create your meshes for you without having to add any tool scripts to your Polygon2D nodes. It is not in the Asset Library yet, so here is the repository: https://github.com/dweremeichik/godot_autopoly_plugin

@ChildLearningClub
Copy link

ChildLearningClub commented Feb 14, 2023

Can something like Adobe Animate’s flexi bones and asset warp be achieved building on top of the built in Skeleton2D/Bones2D system and the work done by @Vic Ben and the plug-in @dweremeichik created?

@Zireael07
Copy link

Please edit the link to make it clear where it leads to (it seems to be a link to a video representing some sort of a rigging asset?)

@Tor-Kai
Copy link

Tor-Kai commented Jul 3, 2023

I know I'm late to the party, but I wrote a add-on, for Blender, that lets you build 2D meshes and armatures in Blender and export them to Godot as Polygon2D nodes and Skeleton2D nodes specifically to address this issue.
It'll export UVs, textures, and bone weights for linked armatures as well. You can download it for free from my Gumroad.
Gumroad link: Godot 2D Bridge

@Calinou Calinou changed the title An easier way to generate geometry with weights in Polygon2D Add an easier way to generate geometry with weights in Polygon2D Jul 3, 2023
@mr11stein
Copy link

I'm currently working on a plugin that finds the outline of an object with a specified margin and creates the uv/polygon from it. I still have to add the inner point generation (which is trivial). It's pretty comprehensive and could easily incorporated in the existing UV-Editor so you could select the part of the texture that should be triangulated (extending the UV-Editor isn't possible afaik).

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