Spine U3D整合流程问题

What:

公司2d项目开发,动画外包的spine。本来在spine里面一切正常,但是导入u3d运行库的时候动画切换的时候原来的动画是好的,一旦切换了就乱帧了。

如下结果:

Why:


看了一上午资料,发现了来自官网的解释,恍然大悟:

If no key is set at all for a value, the animation won't change that value. In Spine the skeleton is always reset to the setup pose before an animation is applied. This means if no key is set then skeleton will have the value from the setup pose.

At runtime, the programmer decides if the skeleton will be reset to the setup pose before applying an animation. If not, it means that if no key is set then the skeleton will keep whatever value was set last.

For an example where this can be beneficial, an animation is used make a sword attachment visible for the weapon slot. The sword attachment will remain visible even when subsequent animations are played.

For an example where this can be undesirable, an animation rotates the root bone and leaves it at 45 degrees. The next animation plays and doesn't key the root bone, so the root bone is still rotated 45 degrees. Even if the first animation ended with the root bone rotation at zero, the same situation could occur if the first animation ended prematurely because another animation was played.

One solution to this is to key every value at frame 0 for every animation. This is tedious for the animator. It is also inefficient at runtime because every value will get set every time the animation is applied (usually 60 times per second). Each value that is keyed has a small cost which is usually negligible (attachment keys slightly more than others). When all values are keyed the costs add up and may be an issue if there are many skeletons being animated on-screen at once.

It is most efficient to have the programmer reset the skeleton's bones to the setup pose before applying an animation. For attachments, the programmer could reset some or all of the slots to the setup pose when an animation changes.

看了一下 ComparePorject/has_error/spine 工程,果然是这个原因

这根骨骼在冲锋动画初始的时候k了flip 然后在别的动画的时候没有重新K这个flip

How:

SkeletonAnimation.cs:

public String AnimationName {
get {
TrackEntry entry = state.GetCurrent(0);
return entry == null ? null : entry.Animation.Name;
}
set {
if (_animationName == value)
return;
_animationName = value; this.Reset(); if (value == null || value.Length == 0)
state.ClearTrack(0);
else
state.SetAnimation(0, value, loop);
}
}

关于我的spine的学习笔记我都统一在git 公共云上记录

oschina : https://git.oschina.net/daao/SpineLearnNote.git

github : https://github.com/daaoling/SpineLearnNote.git

Spine U3D整合流程问题的更多相关文章

  1. ssm框架搭建和整合流程

    Spring + SpringMVC + Mybatis整合流程 1      需求 1.1     客户列表查询 1.2     根据客户姓名模糊查询 2      整合思路 第一步:整合dao层 ...

  2. FreeMarker与SSH项目整合流程

    FreeMarker与SSH项目整合流程 学习了SSH之后,一般为了减少数据库的压力,会使用FreeMarker来生成静态HTML页面.下面简单说一下FreeMarker与SSH项目的整合全过程~ 前 ...

  3. Dubbo与SpringBoot整合流程(从实例入手,附代码下载)

    场景 Dubbo环境搭建-管理控制台dubbo-admin实现服务监控: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/10362 ...

  4. Spring+Struts2+Hibernate框架整合流程

    一:基本步骤 新建Maven项目,导入相关依赖(推荐) 在WEB-INF的web.xml中进行配置 ————–Hibernate配置 —————- 创建entity包,创建数据库相关实体类 根据实体类 ...

  5. Spring+SpringMVC+Mybatis框架整合流程

    一:基本步骤 新建Maven项目,导入相关依赖.(推荐) ————–Mybatis配置 —————- 新建entity包,并根据数据库(表)新建相关实体类. 新建dao包,并根据业务创建必要的mapp ...

  6. SSM三大框架详细整合流程

    1.基本概念 1.1.Spring Spring是一个开源框架,Spring是于2003 年兴起的一个轻量级的Java 开发框架,由Rod Johnson 在其著作Expert One-On-One  ...

  7. JAVA SSM整合流程以及注意点

    1.搭建整合环境 整合说明:SSM整合可以使用多种方式,咱们会选择XML + 注解的方式 先搭建整合的环境 先把Spring的配置搭建完成 再使用Spring整合SpringMVC框架 最后使用Spr ...

  8. 01-vue和api整合流程、CORS

    1.后端代码 1.项目结构 2.项目代码 主url from django.contrib import admin from django.urls import path, include url ...

  9. S2SH三大框架整合(配置及思想)

    花了一下午,终于将struts2.18+hibernate3.5.6+spring2.5.5进行整合,完成功能:在Oracle数据库的TCourse表中插入一条数据. Ⅰ,整合流程:web启动———— ...

随机推荐

  1. Java 的初始化顺序

    初始化顺序: 1.将对象内存空间初始化为二进制0(所有的数据成员被设为默认值) 2.如果该类有基类则初始化其基类(调用默认基类构造器,也可在子类构造器中指定调用基类的某个构造器) 3. 静态成员和静态 ...

  2. 扩展 RequestHandlerBase

    RequestHandlerBase 实现接口SolrRequestHandler SearchHandler: 它的所有逻辑来自 搜索组件SearchComponents.  handler配置中, ...

  3. Java基础:GC机制

    上一节,简单的介绍了java当中的内存模型,那么经常和内存模型一起提到的JAVA垃圾回收机制当然也需要在这里一并的总结一下. 所谓是垃圾回收机制,用通俗的话来说,就是将那些没有被任何变量引用的实例对象 ...

  4. Codeforces #430 Div2 C

    #430 Div2 C 题意 给出一棵带点权的树,每一个节点的答案为从当前节点到根节点路径上所有节点权值的最大公因子(在求最大共因子的时候可以选择把这条路径上的任意一点的权值置为0).对于每一个节点单 ...

  5. centos7下mail邮件的查看删除、禁止部分应用发邮件

    查看与删除 mail命令进入 & p                  #显示当前邮件& 2                  #显示标号为2的文件 & d 1-100     ...

  6. CentOS 7.1 中文正式版下载 - 最流行的免费开源企业级 Linux 服务器操作系统

    如果说 Ubuntu 是现今最受桌面用户欢迎的 Linux 操作系统,那么 CentOS 就是最受公司.企业.IDC 喜爱的 Linux 发行版了.得益于极为出色的稳定性,全球范围内无数著名网站均选用 ...

  7. 关于两数的最大公约数gcd

    深根半夜里研究C++的语法,在弄到关于函数的定义 这一部分时突然想写个试试,就拿比较熟悉的gcd来好了. 活这么久gcd一直是用辗转相除法(或者说欧几里得算法)得出的,根据<算法导论>第三 ...

  8. 面试问题Distilled

    1. 你在项目里都用过哪些Spring的组件 2. Spring AOP的实现原理 3. Hibernate的乐观锁和悲观锁 4. Hibernate的缓存机制 5. 对SOA的了解和认识 6. 谈谈 ...

  9. java中Frame Jpanel等中间显示

    几种是窗口中间显示的方法: 1.Frame int windowWidth = frame.getWidth(); //获得窗口宽 int windowHeight = frame.getHeight ...

  10. 【记忆化搜索】bzoj1055 [HAOI2008]玩具取名

    f(l,r,c)表示sl...sr能否被合成字符c. #include<cstdio> #include<cstring> using namespace std; int m ...