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

Show skeleton bones in the Advanced Import Settings preview #6801

Closed
jeronimo-schreyer opened this issue May 3, 2023 · 6 comments · Fixed by godotengine/godot#96094
Closed

Comments

@jeronimo-schreyer
Copy link

Describe the project you are working on

A 3D game where meshes and animations come in different files

Describe the problem or limitation you are having in your project

I need to preview animations with skeleton bones since meshes come in different files. In this case, the 3D preview window shows an empty scene

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

copy functionality as it is in the Skeleton3DGizmoPlugin to show bones according to 3D Gizmo Editor Settings values

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

This is a WIP

Screenshot from 2023-05-01 21-51-16

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

Cant be done using a plugin

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

This improves the 3D importing experience overall

@Calinou
Copy link
Member

Calinou commented May 3, 2023

On your screenshots, it's interesting how bones appear as thin lines. I thought they appeared as pyramid-like structures with a tip.

@jeronimo-schreyer
Copy link
Author

That is because I changed the 3D Gizmo Editor Settings. You can also change how they look if you change
editors/3d_gizmos/gizmo_settings/bone_shape (its the option at the end of the list)

@jeronimo-schreyer
Copy link
Author

Done
added support for editor settings

godot_importer_bones-2023-05-07_20.26.23.mp4

@TokageItLab
Copy link
Member

TokageItLab commented May 8, 2023

We have discussed about this and review godotengine/godot#76818 with @lyuma, the main problem is that there is a lot of duplication of code from the SkeletonGizmo.

To begin with, PostImportScene can't display Node3DGizmo. This leads to another usability issue where you select a tree item on the left tree and don't know what it indicates.

It may be necessary to start by making it possible to partially reuse/share Node3DEditor's Gizmo in PostImportScene. (We experienced a similar case in the past when we implemented SkeletonEditor, and implemented SubGizmo as an actual example)

@jeronimo-schreyer
Copy link
Author

I see. I dunno how well we can componentize SkeletonGizmo::redraw function for this and even though we did, these two implementations are not exactly the same (even though they use similar mesh creation and shader code)

@jeronimo-schreyer
Copy link
Author

PR godotengine/godot#76818 has now a static function in Skeleton3DGizmoPlugin that generates the mesh and that is consumed both by itself (as a gizmo) and by the AIS dialog

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