• RuntimesGodot
  • godot3.53编辑spine_example,例如helloworld.tscn或helloworld.dn,都CPU占用高达20%。

请求解决方案。

Related Discussions
...

高CPU占用问题可能是由于Spine动画在Godot中每帧都在更新。你可以尝试以下几种方法来优化性能:

  1. 调整更新模式
    SpineSprite节点有三种更新模式:ProcessPhysicsManual。默认情况下,SpineSprite会在每帧更新。你可以将更新模式改为PhysicsManual,以减少CPU占用。

       var spine_sprite = $SpineSprite
       spine_sprite.update_mode = SpineSprite.UpdateMode.PHYSICS

    或者,如果你选择Manual模式,你需要在代码中手动更新SpineSprite:

       var spine_sprite = $SpineSprite
       spine_sprite.update_mode = SpineSprite.UpdateMode.MANUAL
    
       func _process(delta):
           spine_sprite.update_skeleton()
  2. 减少动画复杂度
    如果你的Spine动画非常复杂,尝试简化动画,减少骨骼数量和关键帧数量。

  3. 优化资源管理
    确保你的Spine资源(如纹理和骨骼数据)已经被优化。你可以在Spine中重新导出这些资源,并选择适当的压缩和优化选项。

  4. 检查Godot版本
    确保你使用的是最新的Godot和spine-godot runtime版本。旧版本可能存在性能问题,更新到最新版本可能会有所改善。

  5. 调试和分析
    使用Godot的性能分析工具来确定具体的性能瓶颈。你可以在Godot编辑器中打开“调试”菜单,选择“性能分析器”来查看CPU占用情况。

希望这些方法能帮助你解决高CPU占用的问题。

以上方法没效。因为问题是在编辑时候。不是在运行的时候。

    Misaki 谢谢!但是,故障依旧。设置过:低处理器模式睡眠(微秒) 的值增加到 33000或50000,3D透视左视图、半分辨率。

    5 días más tarde

    We need more information than that. E.g. your hardware specs, your operating system and version, whether you are using up-to-date GPU drivers and so forth.

    笔记本电脑pcWin7或者RDP到它的远程桌面上,GODOT3.53编辑或运行spine-example-helloWorld的CPU占用,最大化时约50%,减小窗口能降低,最小化约0%。OpenGL32.dll来自MESA3D FOR WINDOWS -- http://mesa.fdossena.com

    笔记本电脑pcWin7的硬件信息
    操作系统Windows 7 64Bit 6.1.7601.23403
    主机序号MP19Z5G2 SKU#: LENOWO MT_20JJ_BU_Think_FM Th
    主板型号LENOWO 20TTSOMQ00
    主板BIOSwer: ROHET57W (1.37 ) Date: 2020-10-20
    电池信息AC电源已连接 电量: 95 %
    处 理 器Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz核心: 2 线程:4主频: 2712MHz
    高速缓存: L1=128KB L2=512KB L3=3G利用率: 7.3 %
    物理内存
    总内存:32GB 插槽数:2 最大支持: 32GB
    已使用: 12.44GB,可使用: 19.56GB
    使用率: 38.9 %
    A-Data DDR4/2133 32GB
    图形显卡分辨率: 1440 x 900 60Hz
    1: Intel(R) HD Graphics 620 1GB
    磁盘信息
    1: Romex RADISK <HDD>
    RamDisk MBR 4GB [ X:2nte WDC PC SNT30 SDB <HDD>NVHEMR 238.47GB [ D: ]
    38MsftWirtual Disk <HDD>虚拟 R 100GB [ C: ]
    网络连接
    Intel(R) Ethernet (4) I219-LM1
    Intel(R) Dual Band Wireless-AC 8265
    图片3张

    Mesa3D is a software OpenGL driver, meaning the rendering is performed on your CPU, not your Intel(R) HD Graphics 620 GPU. Please install the proper Intel drivers.

    谢谢,说得对。不过,我没能找到更好的显卡驱动。而且,只用godot本身的节点类型,没有spineBoy时,CPU占用为0%哦。

      uor99 不过,我没能找到更好的显卡驱动。

      Please note that saying that you can't find a better graphics driver is like buying a motorbike and saying pushing it along the road is the best you can do, instead of starting the engine.

      Please search the Lenovo website for your notebook model and graphics driver, I'm sure you will then find something better.