Comments (12)
另外我自己编译时,VS 2019报错KleiAnimTest.cpp:166,那个ifstream应该写成局部变量而不是临时变量。
from kleianim.
from kleianim.
大佬慢慢来,我觉得还有好多问题。
- 不同朝向的重复动画名
idle_loop
在兔人的动画里一共有三个,用krane
转换为scml
文件可以得知有idle_loop_up
,idle_loop_side
,idle_loop_down
三个。
- 貌似由上述问题引起的,build.xml里重复的帧
<Symbol name="manrabbit_head"> <Frame framenum="0" duration="1" x="30" y="5" w="180" h="180" />
但是
<Symbol name="manrabbit_torso"> <Frame framenum="0" duration="1" x="30" y="5" w="180" h="180" /> <Frame framenum="0" duration="1" x="0.5" y="-79.4000015" w="269" h="331" />
看起来就是,第二个符号的帧重复了第一个符号;第三个则重复了第一个和第二个。
- Xml.cpp里std::sort检测到了相同framenum的帧
这个貌似就是会出现的情况,不知道有什么必要报错。为了防止死循环,应该在排序前手动检测一下。
- 编译得到的anim.bin与build.bin大小与原文件相差很大
比如build.bin原文件大小为50KB,反编译-编译一次后缩水为9.1KB。且反编译-编译回来的文件无法被krane
转换成有效的scml
文件,原因是图片不正确,出来的都是几百B的大小。合理怀疑丢失了什么图片信息。
- 功能建议:xml与scml互转
6.bug
Xml.cpp(序号有变)
250 uint32_t unique_frameidx = 1;
230 if (a.frame_number == b.frame_number) std::cout<<"----Build中 存在两个具有相同framenum的帧----\n";
44+
using KleiAnim::Common::Facing;
std::vector<std::string> FacingName = { "_up","_down", "_side","_left","_right","_upside","_downside","_upleft","_upright","_downleft","_downright","_45s","_90s" };
std::vector<int> FacingInt = { int(Facing::Up),int(Facing::Down),int( Facing::Left)|int(Facing::Right),int(Facing::Left),int(Facing::Right),int(Facing::UpRight) |int( Facing::UpLeft),int(Facing::DownRight )|int( Facing::DownLeft),int(Facing::UpLeft ),int(Facing::UpRight),
int(Facing::DownLeft),int(Facing::DownRight),int(Facing::All45),int(Facing::All90),int(Facing::All),int(Facing::Invalid)};
72+
for (int i = 0; i < FacingInt.size(); i++) {
if (FacingInt[i] == int(animation.facing)) {
xanim.append_attribute("facing").set_value(FacingInt[i]);
}
}
297+ frame.elements.clear();
309 name = xelem.attribute("layername").as_string();
323+ frame.elements.push_back(elem);
from kleianim.
编译应该行了
from kleianim.
好像还是不行,即使我把xml格式修好,反编译之后用krane仍然没法出图片。用原来的anim.bin+反编译-编译后的build.bin倒是可以出,但是图片顺序不对。。。
from kleianim.
发现一段官方对anim.bin和build,bin的说明
BUILDVERSION = 6
#BUILD format 6
# 'BILD'
# Version (int)
# total symbols;
# total frames;
# build name (int, string)
# num materials
# material texture name (int, string)
#for each symbol:
# symbol hash (int)
# num frames (int)
# frame num (int)
# frame duration (int)
# bbox x,y,w,h (floats)
# vb start index (int)
# num verts (int)
# num vertices (int)
# x,y,z,u,v,w (all floats)
#
# num hashed strings (int)
# hash (int)
# original string (int, string)
ANIMVERSION = 4
#ANIM format 4
# 'ANIM'
# Version (int)
# total num element refs (int)
# total num frames (int)
# total num events (int)
# Numanims (int)
# animname (int, string)
# validfacings (byte bit mask) (xxxx dlur)
# rootsymbolhash int
# frame rate (float)
# num frames (int)
# x, y, w, h : (all floats)
# num events(int)
# event hash
# num elements(int)
# symbol hash (int)
# symbol frame (int)
# folder hash (int)
# mat a, b, c, d, tx, ty, tz: (all floats)
#
# num hashed strings (int)
# hash (int)
# original string (int, string)
from kleianim.
编译得到的anim.bin与build.bin大小与原文件相差很大
比如build.bin原文件大小为50KB,反编译-编译一次后缩水为9.1KB。且反编译-编译回来的文件无法被krane转换成有效的scml文件,原因是图片不正确,出来的都是几百B的大小。合理怀疑丢失了什么图片信息。
- 当时解析build.bin的方法是错的,最近几个提交应该有所改善
- 一开始没有空管图片,只操作anim.bin和build.bin,到后面干脆连我自己都不用了。
from kleianim.
现在有改善吗
from kleianim.
现在有改善吗
这次我克隆到本地后生成解决方案直接一堆报错。。。
我最大的问题就是就是仅用animc与animd反编译-编译一次后,得到的文件与原文件不一样了。如果解析build.bin里的图片信息比较麻烦的话,能不能至少保证anim.bin和原来的一模一样。我和勿言的py脚本对比了一下觉得bin转xml应该是对的,那么问题或许出在xml转bin的时候。我现在用krane还是做不到生成一样的scml文件(至于图片可以提前用原文件导出,问题不大),里面mainline和timeline的帧都错了。现在唯一可用的方案就是原anim.bin+新build.bin+原图片,也就是说这套工具只能用于查看anim.bin、build.bin以及编辑build.bin。我希望它还能编辑anim.bin。
edit:至少自己拿个文件试一试能不能用嘛。。比如说找个威尔逊的atlas(anim/dynamic/wilson.dyn,其实是zip)、build(anim_dynamic.zip/wilson.zip)、anim(player_bow.zip之类的),然后用krane生成scml工程,用animd反编译后立即用animc编译回去,再用krane生成新的scml工程。比较一下两个scml文件会发现不同。
from kleianim.
明白了
from kleianim.
这次我克隆到本地后生成解决方案直接一堆报错。。。
是因为我调高了Windows SDK和VC版本,本地调低试试?
from kleianim.
这次我克隆到本地后生成解决方案直接一堆报错。。。
是因为我调高了Windows SDK和VC版本,本地调低试试?
版本高了我自然会调低。
我之前在本地也改了很多东西(虽然也没有修好过),现在还是不自行解决这些报错了(不然我似乎还得维护两个版本),等你发布一个版本吧。
from kleianim.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kleianim.