godotengine / tps-demo

Godot Third Person Shooter with high quality assets and lighting
Other
955 stars 166 forks source link

Port TPS demo to 4.0 #158

Closed clayjohn closed 1 year ago

clayjohn commented 1 year ago

I have started porting the demo to 4.0.

At this point most things work. But there is still some cleanup to do, notable:

  1. Menu buttons are kind of glitchy
  2. not all settings make sense anymore. I need to clean up the settings and add new settings for 4.0-specific features (SDFGI, volumetric fog, etc.) ~3. Background loading of the main scene~ ~4. Export blend files to GLTF. Right now we are reliant on the blender path being assigned to properly import the red robot model~

Overall, things are looking pretty good. Screenshot (329) Screenshot (330)

Calinou commented 1 year ago

Great work!

At this point most things work. But there is still some cleanup to do, notable:

  • Menu buttons are kind of glitchy

We should rework the menu to use actual Button nodes (not TextureButtons), and also use ConfigFile for persistence instead of JSON. I can work on this part after this PR is merged.

Calinou commented 1 year ago

I'm getting this error when running the project on 4.0.beta 44c0bfc94:

image

I've tried closing and reopening the editor to no avail.

Full list of errors when running the project directly from the terminal:

WARNING: res://menu/menu.tscn:5 - ext_resource, invalid UID: uid://kfhres7102lc - using text path instead: res://player/model/player.glb
     at: load (scene/resources/resource_format_text.cpp:448)
ERROR: Cannot open file 'res://.godot/imported/red_robot.blend-32b7b74b7e8a2de08425acd55a8f0bbe.scn'.
   at: load (core/io/resource_format_binary.cpp:1180)
ERROR: Failed loading resource: res://.godot/imported/red_robot.blend-32b7b74b7e8a2de08425acd55a8f0bbe.scn. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:221)
ERROR: Failed loading resource: res://enemies/red_robot/model/red_robot.blend. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:221)
ERROR: res://enemies/red_robot/red_robot.tscn:4 - Parse Error: [ext_resource] referenced nonexistent resource at: res://enemies/red_robot/model/red_robot.blend
   at: load (scene/resources/resource_format_text.cpp:490)
ERROR: Failed loading resource: res://enemies/red_robot/red_robot.tscn. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:221)
ERROR: res://menu/menu.tscn:22 - Parse Error: [ext_resource] referenced nonexistent resource at: res://enemies/red_robot/red_robot.tscn
   at: load (scene/resources/resource_format_text.cpp:490)
ERROR: Failed loading resource: res://menu/menu.tscn. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:221)
ERROR: Condition "nc == 0" is true. Returning: nullptr
   at: instantiate (scene/resources/packed_scene.cpp:88)
ERROR: Condition "!new_scene" is true. Returning: ERR_CANT_CREATE
   at: change_scene_to_packed (scene/main/scene_tree.cpp:1137)

It looks like Blender import support is required now? I don't have it configured locally.

clayjohn commented 1 year ago

It looks like Blender import support is required now? I don't have it configured locally.

Yes. That is point 4 on my TODO list in the original post

Calinou commented 1 year ago

The demo works locally, but I get a "spiral of death" performance issue where FPS is initially OK, but quickly plummets below 10 after a few seconds (even when standing still). This is with the default settings on i9-13900K + RTX 4090. CPU utilization sits around 2% while GPU utilization oscillates between 5% and 30%.

godot windows editor x86_64_4OM55p7P7j webp

There's some error spam about AnimationTree and AnimationNodeTransition, maybe this is related?

Some more comments:


Off-topic I tried to take a screenshot of the TPS demo running, but ShareX only took the first rendered frame due to this project using exclusive fullscreen on Windows. The result looks funny 🙂 ![tps-demo-menu webp](https://user-images.githubusercontent.com/180032/216707235-cc788088-422a-4f7e-8ec5-10cb48ce7c16.png)
clayjohn commented 1 year ago

Okay, marking this as ready for review.

I replaced the .dae model for the red robot with a GLTF which works better and is 25% of the file size. I also re-implemented the loading bar and background loading.

The settings menu is still broken, but if Calinou is going to rework the settings menu anyway there isn't much use in fixing it now.

@Calinou Can you take a look at the visual profiler to see where the performance loss is coming from? When I run locally on my windows machine I get stable 60FPS and on my laptop I get stable 8-10 FPS

Calinou commented 1 year ago

@Calinou Can you take a look at the visual profiler to see where the performance loss is coming from? When I run locally on my windows machine I get stable 60FPS and on my laptop I get stable 8-10 FPS

I get 200 FPS in level.tscn in the editor itself (350+ after disabling MSAA), so the performance issue is definitely related to game logic running on the CPU. Notice how Physics Time is taking 134 ms per frame:

image

I can't get anything to show up in the visual profiler, other than the graphs themselves. The GPU bars are way above 16.67 ms, but I'm pretty sure this is because the GPU is waiting on the CPU to do its job.

The amount of time it takes for performance to plummet is also variable: sometimes, it happens in less than 1 second, sometimes, it requires 4-5 seconds (rarely more).

clayjohn commented 1 year ago

@Calinou And you are getting an error spammed that whole time? What is the error?

Testing on my laptop I am totally GPU bottlenecked by SSAO, GI, and MSAA

Screenshot from 2023-02-03 13-26-26

CPU usage consistently stays under 16 ms

Calinou commented 1 year ago

@Calinou And you are getting an error spammed that whole time? What is the error?

Yes, here's an example:

ERROR: Index p_input = 0 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 1 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 2 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 3 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input_index = 0 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 1 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 2 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 3 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Condition "!playback.current.from" is true.
   at: AnimationPlayer::seek (scene\animation\animation_player.cpp:1767)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: Assignment of arrays of incompatible types.
   at: (core\variant\array.cpp:240)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: Assignment of arrays of incompatible types.
   at: (core\variant\array.cpp:240)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: Assignment of arrays of incompatible types.
   at: (core\variant\array.cpp:240)
Project FPS: 120 (8.33 mspf)
ERROR: Assignment of arrays of incompatible types.
   at: (core\variant\array.cpp:240)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
Project FPS: 120 (8.33 mspf)
ERROR: Index p_input = 0 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 1 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 2 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 3 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input_index = 0 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 1 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 2 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 3 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input = 0 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 1 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 2 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 3 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input_index = 0 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 1 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 2 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 3 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
Project FPS: 91 (10.98 mspf)
Project FPS: 85 (11.76 mspf)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'jump_down'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'jump_down'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'jump_down'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'jump_down'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'jump_down'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'jump_down'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'jump_down'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'jump_down'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'jump_down'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'jump_down'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'walk'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: Index p_input = 0 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 1 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 2 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input = 3 is out of bounds (inputs.size() = 0).
   at: AnimationNode::set_input_name (scene\animation\animation_tree.cpp:332)
ERROR: Index p_input_index = 0 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 1 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 2 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Index p_input_index = 3 is out of bounds (nodes[p_input_node].connections.size() = 0).
   at: AnimationNodeBlendTree::connect_node (scene\animation\animation_blend_tree.cpp:1064)
ERROR: Condition "!playback.current.from" is true.
   at: AnimationPlayer::seek (scene\animation\animation_player.cpp:1767)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: Assignment of arrays of incompatible types.
   at: (core\variant\array.cpp:240)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)
ERROR: Assignment of arrays of incompatible types.
   at: (core\variant\array.cpp:240)
ERROR: No such input: 'idle'
   at: AnimationNodeTransition::process (scene\animation\animation_blend_tree.cpp:793)

If I comment out all references to animation_tree[ in the codebase (note the trailing [), performance becomes closer to expected[^1] and the GPU is fully utilized:

godot windows editor x86_64_HaMfv5oe61 webp

[^1]: I've also disabled MSAA using a script and enabled TAA instead, as the options menu will always set MSAA to 8x currently.

clayjohn commented 1 year ago

@Calinou what version of the engine are you using?

Calinou commented 1 year ago

@Calinou what version of the engine are you using?

I was using a build compiled from https://github.com/godotengine/godot/pull/70315 (running with Vulkan), which likely explains the issue. It was last rebased on January 25th.

It works on the latest master branch 🙂 Apologies for wasting time.

Yet more comments:

I can fix those in future PRs; I'm just putting this here for future reference.

I get many warnings when opening the project in the editor and running the project:

WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules\gltf\register_types.cpp:70)
WARNING: Ignoring unsupported header information in HDR: GAMMA=1.
     at: ImageLoaderHDR::load_image (modules\hdr\image_loader_hdr.cpp:50)
WARNING: Ignoring unsupported header information in HDR: PRIMARIES=0 0 0 0 0 0 0 0.
     at: ImageLoaderHDR::load_image (modules\hdr\image_loader_hdr.cpp:50)
WARNING: Mesh uses old surface format, which is deprecated (and loads slower). Consider re-importing or re-saving the scene. Path: "res://enemies/red_robot/laser/circle.mesh"
     at: (scene\resources\mesh.cpp:1150)
WARNING: This material (containing shader with path: 'res://enemies/red_robot/parts/sparks_effect/SparkShader.gdshader') uses an old deprecated parameter names. Consider re-saving this resource (or scene which contains it) in order for it to continue working in future versions.  
     at: ShaderMaterial::_set (scene\resources\material.cpp:184)
WARNING: This material (containing shader with path: 'res://enemies/red_robot/parts/sparks_effect/SparkShader.gdshader') uses an old deprecated parameter names. Consider re-saving this resource (or scene which contains it) in order for it to continue working in future versions.  
     at: ShaderMaterial::_set (scene\resources\material.cpp:184)

The Blender warning can be silenced by disabling Blender support in the Project Settings.

jcostello commented 1 year ago

I can't belive how much it improves from 3.x. It really looks really cool. I also made some artistic improvements to the voxel energy and emission (locally). Once the port is done I can create a PR for those changes

jcostello commented 1 year ago

One thing I found is that if you want to use occlusion culing, the level glitches out haha

Calinou commented 1 year ago

Let's go ahead and merge this :slightly_smiling_face:

Future plans:

  1. Fix the settings menu and merge various improvements to the 4.0-dev branch (https://github.com/godotengine/tps-demo/pull/156 needs to be redone on 4.0-dev, for instance).
  2. Once the demo is production-ready, create a 3.x branch with master's current contents and rename 4.0-dev to master.

One thing I found is that if you want to use occlusion culing, the level glitches out haha

It might be worth testing if this occurs with manually placed quad/box occluders, rather than baked occluders (which may be very complex for this scene). Not all geometry from this scene needs to be an occluder as well (such as the exterior walls or background geometry).

aaronfranke commented 1 year ago
  1. Once the demo is production-ready, create a 3.x branch with master's current contents and rename 4.0-dev to master.

Agreed except for the timing. I want to do this when 4.0-stable is released (or shortly after), not before that if the demo is ready. I would prefer if the latest master of the demos worked with the latest stable Godot version.