Spine U3D整合流程问题
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整合流程问题的更多相关文章
- ssm框架搭建和整合流程
Spring + SpringMVC + Mybatis整合流程 1 需求 1.1 客户列表查询 1.2 根据客户姓名模糊查询 2 整合思路 第一步:整合dao层 ...
- FreeMarker与SSH项目整合流程
FreeMarker与SSH项目整合流程 学习了SSH之后,一般为了减少数据库的压力,会使用FreeMarker来生成静态HTML页面.下面简单说一下FreeMarker与SSH项目的整合全过程~ 前 ...
- Dubbo与SpringBoot整合流程(从实例入手,附代码下载)
场景 Dubbo环境搭建-管理控制台dubbo-admin实现服务监控: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/10362 ...
- Spring+Struts2+Hibernate框架整合流程
一:基本步骤 新建Maven项目,导入相关依赖(推荐) 在WEB-INF的web.xml中进行配置 ————–Hibernate配置 —————- 创建entity包,创建数据库相关实体类 根据实体类 ...
- Spring+SpringMVC+Mybatis框架整合流程
一:基本步骤 新建Maven项目,导入相关依赖.(推荐) ————–Mybatis配置 —————- 新建entity包,并根据数据库(表)新建相关实体类. 新建dao包,并根据业务创建必要的mapp ...
- SSM三大框架详细整合流程
1.基本概念 1.1.Spring Spring是一个开源框架,Spring是于2003 年兴起的一个轻量级的Java 开发框架,由Rod Johnson 在其著作Expert One-On-One ...
- JAVA SSM整合流程以及注意点
1.搭建整合环境 整合说明:SSM整合可以使用多种方式,咱们会选择XML + 注解的方式 先搭建整合的环境 先把Spring的配置搭建完成 再使用Spring整合SpringMVC框架 最后使用Spr ...
- 01-vue和api整合流程、CORS
1.后端代码 1.项目结构 2.项目代码 主url from django.contrib import admin from django.urls import path, include url ...
- S2SH三大框架整合(配置及思想)
花了一下午,终于将struts2.18+hibernate3.5.6+spring2.5.5进行整合,完成功能:在Oracle数据库的TCourse表中插入一条数据. Ⅰ,整合流程:web启动———— ...
随机推荐
- codevs 线段树练习ⅠⅡⅢ
1080 线段树练习 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题解 题目描述 Description 一行N个方格,开始每个格子里都有 ...
- python ajax post 数据
简单的html <div> <input type="submit" id="tes" value="tes"> & ...
- CentOS7下,安装网卡驱动,命令行手动连接WIFI指导
买了一个无线网卡,型号为TL-WN823N,谁知道在CentOS下没有驱动 于是开始了无线上网的漫漫征途 经历了无数个坑啊,解决了一个又一个的问题啊 到最后ping通的时候成就感简直爆棚 文章结构简介 ...
- Django remedy a security issue refer dos attack
Today the Django team is issuing multiple releases -- Django 1.4.8, Django 1.5.4, and Django 1.6 bet ...
- Dart基础
dartpad在线调试 :https://dartpad.dartlang.org 运行需要用墙 vscode执行dart 安装 安装dart插件 下载安装dart 配置环境变量 vscode新建 ...
- [CTSC2018]混合果汁(二分答案+主席树)
考场上写了60分的二分答案,又写了15分的主席树,然后就弃了.. 合起来就A了啊!主席树忘了开20倍空间最后还炸掉了. 最水的签到题被我扔了,主要还是不会用线段树求前缀和. 做法应该是比较显然的,首先 ...
- 【后缀数组】【二分答案】poj3261
注意:对整型数组求sa时,s[n]请置成-1. 请离散化. 可重叠的 k 次最长重复子串(pku3261)给定一个字符串,求至少出现 k 次的最长重复子串,这 k 个子串可以重叠.算法分析:先二分答案 ...
- 命令行下的C++程序转换成VC的MFC程序需要注意的问题
在将命令行下的C++程序转换成MFC窗口程序时一般会提示下面这种错误: fatal error C1010: unexpected end of file while looking for prec ...
- ThinkPHP模板中JS等带花括号处会被解析错误的解决办法
如下图,当本人在ThinkPHP框架的模板中写jQuery代码的时候,写了一些注释,并且注重是斜线和换括号{是连着一起的,这层语法上来时是没问题的,但是在ThinkPHP 的模板引擎解析下,会被解析掉 ...
- zk介绍
1. 配置管理 Zookeeper提供了这样的一种服务:一种集中管理配置的方法,我们在这个集中的地方修改了配置,所有对这个配置感兴趣的都可以获得变更.这样就省去手动拷贝配置了,还保证了可靠和一致性. ...