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

Error message from AnimationTree with root bone #76330

Open
trollusk opened this issue Apr 21, 2023 · 5 comments
Open

Error message from AnimationTree with root bone #76330

trollusk opened this issue Apr 21, 2023 · 5 comments

Comments

@trollusk
Copy link

Godot version

4.0.2

System information

Windows 11

Issue description

I'm randomly getting error messages, usually when saving the project but also at other times, that say the following:

Found invalid node path 'Armature/Skeleton3D:mixamorig10_Root' on node 'PlayerTest/Player/AnimationTree'

The node has the bone listed above as its root_motion_track. The AnimationTree is working fine, including root motion.

The message seems to come from the function SceneTreeDock::_update_node_path. It looks like it's trying to treat a bone path as a node?

Steps to reproduce

Create scene with Skeleton3D, AnimationPlayer and AnimationTree.
Set the AnimationTree's player to the AnimationPlayer.
Create a bone in the skeleton and set it as the AnimationTree root_motion_track.

The message usually seems to happen when saving files in the editor.

Minimal reproduction project

N/A

@Chaosus
Copy link
Member

Chaosus commented Jun 3, 2023

Attach the MRP, please.

@Coccusdge
Copy link

I encountered the same issue with both versions 4.1 and 4.2, where any operation on the node would result in an error once the root motion is set.

@AThousandShips
Copy link
Member

Please provide a minimal reproduction project:

  • A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the .godot folder in the archive (but keep project.godot).
  • Drag and drop a ZIP archive to upload it. Do not select another field until the project is done uploading.
  • Note for C# users: If your issue is not Mono-specific, please upload a minimal reproduction project written in GDScript or VisualScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a Mono setup available.

@Coccusdge
Copy link

Temp.zip

@TokisanGames
Copy link
Contributor

AnimationTree and AnimationPlayer now derive from AnimationMixer since this issue was created. In spite of multiple PR attempts at fixing it, the issue is still present in both AT & AP in Godot 4.2.2.

I have animated characters in a scene. If I reparent any unrelated object in the tree, say a rock, the animated characters report these errors, even though they have not been touched.

ERROR: Found invalid node path 'Armature/Skeleton3D:cc_base_boneroot' on node 'ForestWalk/dorian_mesh_v8_0/AnimationTree'
   at: (editor/scene_tree_dock.cpp:1691)
ERROR: Found invalid node path 'Armature/Skeleton3D:cc_base_boneroot' on node 'ForestWalk/npc_female/AnimationPlayer'
   at: (editor/scene_tree_dock.cpp:1691)

The animations and animationplayer/tree work fine. ForestWalk is a game level. dorian_mesh_v8_0.tscn and npc_female.tscn are character scenes. The AnimationPlayer root node, root_motion_track, and cc_base_body/skeleton are all connected properly, the scene inherits from a glb, imported from blender.

image

import file
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://c41dopfu31odl"
path="res://.godot/imported/npc_female.glb-7dc337dcf585e268675e4e5819571d5a.scn"

[deps]

source_file="res://assets/models/characters/npcs/npc_female.glb"
dest_files=["res://.godot/imported/npc_female.glb-7dc337dcf585e268675e4e5819571d5a.scn"]

[params]

nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={
"nodes": {
"PATH:Armature/Skeleton3D": {
"retarget/bone_map": Resource("res://assets/models/characters/_animations/cc4_bone_map_lower.tres"),
"retarget/bone_renamer/rename_bones": false,
"retarget/bone_renamer/unique_node/skeleton_name": "Skeleton3D"
}
}
}
gltf/naming_version=1
gltf/embedded_image_handling=1

I debugged editor/scene_tree_dock.cpp:1691 with my forest scene. Reparented an object and broke when one of the characters complained.

image

https://github.com/godotengine/godot/blob/4.2/editor/scene_tree_dock.cpp#L1691

target_node is null
p_root_node: AnimationPlayer
r_node_path: path = "Armature/Skeleton3D", subpath = "cc_base_boneroot"

I think the problem is that this character is imported with Armature and AnimationPlayer at the same level, but here AnimationPlayer is attempting to get_node_or_null("Armature/Skeleton3D"), when it should be "../Armature/Skeleton3D".

If I set AnimationPlayer root_motion_track to null, it removes the error. However this also breaks my root motion characters. Animations will play but will break player controllers that move based on RM.

cc: @KoBeWi


Related issues:
#83209
#83255

Related PRs:
#83263
#83934

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

5 participants