-
ae 木偶图钉动画绑定脚本
2018-12-27 16:22:47ae 木偶图钉动画绑定脚本 -
AnimSchoolPickerPC MAYA动画绑定辅助插件
2019-01-29 12:10:52动画绑定辅助插件 AnimSchoolPickerPC,非常方便的一个插件,玩几次就会了 -
动画丨Unity最新程序化动画绑定(Animation Rigging)
2019-08-20 20:56:33基于Animation C# Job构建的程序化动画绑定系统。特点:高质量、高性能、可扩展 该资源包位于Unity Packages,记得勾选预览。 如果加载不出资源包看这篇文章。 二、基本组件介绍 在人物(带有状态机)物体上...本文源自官方直播,以文字形式记录绑定过程。
使用的Unity版本:2019.2.0f1
一、技术简介
基于Animation C# Job构建的程序化动画绑定系统。特点:高质量、高性能、可扩展
该资源包位于Unity Packages,记得勾选预览。
如果加载不出资源包看这篇文章。
二、基本组件介绍
在人物(带有状态机)物体上添加Rigbuilder、BoneRenderer。
Rigbuilder:与Animator位于同一物体上,利用Animator中的动画生成PlayableGraph并添加到现有的动画状态机上,支持同时添加多个Rigs。能够对所有的Playable动画进行混合,混合树也是利用PlayableGraph实现动画混合。
BoneRenderer:是一个工具,骨骼信息可视化,方便你绑定、编辑
Rigs:自己建立的物体rig,添加Rig组件,与骨骼的根节点位于同一层级。收集子节点的约束组件,并按照顺序(深度优先)生成AnimationJob的列表,交给Rigbuilder来进行执行。
三、预定义约束介绍
RigConstraints。
这里面包含了很多预定义约束。
四、Demo阶段
1、导入Unity商城里免费的Post apocalyptic survival character模型,调整shader
2、找到模型fbx文件,调整Humanoid,拖到场景。
3、骨骼初始设置:
a、人物模型Animator位置添加Rigbuilder、BoneRenderer,
b、在与骨骼同级别的位置新建rig物体,添加Rig组件,Rig控制下方物体运动。
c、将骨骼下方所有父节点(除了最末尾的物体),全选添加进BoneRenderer的Transform里面,渲染出骨骼。
4、添加脚步IK动画
1)程序配置:
a、在rig下新建ik物体,ik下新建两个空物体lfik、rgik,位置分别在模型脚踝的位置,给lfik、rgik分别添加两个骨头之间的约束:TwoBoneIKConstraint
接着来解决一个坑:无法添加TwoBoneIKConstraint脚本
Q1:这时,我们AddComponent,是搜不到TwoBoneIKConstraint的。
A1:我们要先导入约束案例,这里面有该脚本(视频怎么不讲-_-||)
20191121更新:
注意,下面展示的bug,是由于Unity版本不是2019.2.0f1导致的,Unity版本必须在2019.2.0f1及以上!
因此暂停更新,Unity原视频链接:https://www.bilibili.com/video/av61671904
想继续学习的同学可以根据视频继续往下学习。
且还有一个bug,在最下方说明。
Q2:我们导入约束案例了,仍无法添加该脚本。即使看他们的案例,物体上的该脚本仍是报错状态。
A2:打开该脚本时,我们发现提示该脚本是只读状态。将脚本属性只读取消不管用。正确办法:
将TwoBoneIKConstraint脚本从packages里另存到你的项目Assets里去,现在即可进行添加。
b、将骨骼及控制器配置到TwoBoneIKConstraint里面
视频上说点击骨骼,将骨骼对应的物体这样配置,Tip是Mid的子物体。但没有说为什么这样选。猜测是IK控制脚步移动,脚步涉及到大腿、小腿、
Target就是控制器了,自身。
2)、K动画
即制作动画。
a、先给Animator的物体创建Animation
b、把IK的属性添加进Animation
就是在创建的Animtion里,AddProperty,找到你创建的rig,把你创建的lfik、rgik两个控制器的Position和Rotation添加进去。
该地方Preview有预览动画功能,点击后可在不运行状态下,调整lfik、rgik属性即可实时预览动作变化。
Preview不运行预览仅在2019.2.0f1及以上支持,我测试了一下2019.1,发现不运行开启Perview,调整lfik、rgik属性并没有什么动作变化。运行后这两个属性还锁定不能改了。。
暂停更新,因为该版本Unity切换到安卓平台时,不能设置API Levels,不知道如何解决。
五、自定义渲染管线
六、LWRP中的Shader
-
Unity2D动画绑定
2019-11-30 21:19:57这次做了一个Unity的2D动画,记录一下,怕下次忘了怎么做。 首先是先决条件,推荐使用Unity2019.2或更高版本,安装 2D Animation 和 2D PSD Importer 包。 官方文档: ...这次做了一个Unity的2D动画,记录一下,怕下次忘了怎么做。
首先是先决条件,推荐使用Unity2019.2或更高版本,安装 2D Animation 和 2D PSD Importer 包。
官方文档:
https://docs.unity3d.com/Packages/com.unity.2d.animation@3.0/manual/index.html
https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@2.0/manual/index.html资源文件需要 PSB 格式,直接使用PS另存为PSB格式就可以了。
我是线在手机上随便画了一个,然后传到电脑上,用PS另存为PSB格式。
直接把PSB文件拖进Unity里就可以了。
打开骨骼编辑系统。
如果使用自动处理会简单一些,先创建骨骼,然后绑定,使用 Auto Geometry 绑定,并自动创建权重。这个时候会发现网格分好了,但是这些东西全都是连成一片的,动手臂身子也会跟着动。
这里身子部分是不需要动画的,所以直接把身体部分的网格删掉就可以了。
也可以先选定图层,然后再自动创建网格。
如果是手动处理的话,会麻烦一点,但是很多情况下更需要手动去处理。我这里只演示一部分。
转载于:http://www.googln.net/
-
[转载][转载]maya 履带动画绑定插件 api 源码分享。
2016-06-06 23:40:10原文地址:[转载]maya 履带动画绑定插件 api 源码分享。作者:TianCG_VFX_TD[转载] maya 履带动画绑定插件 api 源码分享 原地址:http://blog.sina.com.cn/s/blog_67e626560100mrzc.html 代码包下载地址:链接...[转载] maya 履带动画绑定插件 api 源码分享代码包下载地址:链接:http://pan.baidu.com/s/1OLCYE 密码:pj6k下面的maya api源码,需要大家自己在vs里编译。//首先是头文件代码:
//头文件名称:glideDeformer.h
#ifndef glideDeformer_h
#define glideDeformer_h#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#includeclass glideDeformer:public MPxDeformerNode
{
public:
glideDeformer(){};
virtual ~glideDeformer(){};static void * creator(){return new glideDeformer;};
static MStatus initializeAttr();virtual MStatus deform(MDataBlock &block, MItGeometry &iter, const MMatrix &mat, unsigned int multiIndex);
bool getClosestUVParam(MPoint & point,MFnNurbsSurface & surfaceFn,MObject surfaceData,double & paramU,double & paramV);
bool getPointFroamSurfacePoint(MPoint & point,MFnNurbsSurface & surfaceFn,MObject surfaceData,double & paramU,double & paramV,MPoint & outPoint);
bool getPointAfterDeformed(MPoint & pointInSurfaceMatrix,MFnNurbsSurface & surfaceFn,MObject surfaceData,double & paramU,double & paramV,MPoint & pointAffterDeformed);static MString nodeName;
static MTypeId nodeId;static MObject glide;
static MObject fixedBase;
static MObject aimDirection;
static MObject drivenSurface;
static MObject baseSurface;
};
#endif//CPP文件
#include "glideDeformer.h"
MString glideDeformer::nodeName=MString("glideDeformer");
MTypeId glideDeformer::nodeId=MTypeId(0x87031);MObject glideDeformer::glide;
MObject glideDeformer::fixedBase;
MObject glideDeformer::aimDirection;
MObject glideDeformer::drivenSurface;
MObject glideDeformer::baseSurface;using std::cout;
using std::endl;MStatus glideDeformer::initializeAttr()
{
MFnNumericAttribute numattr;
MFnTypedAttribute typedattr;
MFnEnumAttribute enumattr;glide=numattr.create("glide","gld",MFnNumericData::kFloat,0.0);
numattr.setKeyable(true);
numattr.setStorable(true);fixedBase=numattr.create("fixedBase","fxb",MFnNumericData::kBoolean,0);
numattr.setKeyable(true);
numattr.setStorable(true);aimDirection=enumattr.create("aimDirection","adr",0);
enumattr.addField("directionU",0);
enumattr.addField("directionV",1);
enumattr.setKeyable(true);
enumattr.setStorable(true);drivenSurface=typedattr.create("drivenSurface","dsf",MFnData::kNurbsSurface);
typedattr.setStorable(false);baseSurface=typedattr.create("baseSurface","bsf",MFnData::kNurbsSurface);
typedattr.setStorable(false);//addAttribtue
addAttribute(glide);
addAttribute(fixedBase);
addAttribute(drivenSurface);
addAttribute(baseSurface);
addAttribute(aimDirection);attributeAffects(glide,outputGeom);
attributeAffects(fixedBase,outputGeom);
attributeAffects(aimDirection,outputGeom);
attributeAffects(drivenSurface,outputGeom);
attributeAffects(baseSurface,outputGeom);return MS::kSuccess;
};
bool glideDeformer::getClosestUVParam(MPoint & point,MFnNurbsSurface & surfaceFn,MObject surfaceData,double & paramU,double & paramV)
{
surfaceFn.setObject(surfaceData);
MPoint tmpPoint=surfaceFn.closestPoint(point,0,0,false,0.001,MSpace::kWorld);
MStatus stat=surfaceFn.getParamAtPoint(tmpPoint,paramU,paramV,true,MSpace::kWorld,0.001);
return true;
};
bool glideDeformer::getPointFroamSurfacePoint(MPoint & point,MFnNurbsSurface & surfaceFn,MObject surfaceData,double & paramU,double & paramV,MPoint & outPoint)
{
surfaceFn.setObject(surfaceData);
MVector tangentU;
MVector tangentV;
MVector normal;
MPoint surfacePoint;
surfaceFn.getPointAtParam(paramU,paramV,surfacePoint,MSpace::kWorld);
normal=surfaceFn.normal(paramU,paramV,MSpace::kWorld);
surfaceFn.getTangents(paramU,paramV,tangentU,tangentV,MSpace::kWorld);tangentU.normalize();
tangentV.normalize();
normal.normalize();double matrix[4][4]={{tangentU.x,tangentU.y,tangentU.z,0.0},{normal.x,normal.y,normal.z,0.0},{tangentV.x,tangentV.y,tangentV.z,0.0},{surfacePoint.x,surfacePoint.y,surfacePoint.z,1.0}};
MMatrix surfacePointMatrix=MMatrix(matrix);
//cout<<"baseSurfacePointMatrix:"<<surfacePointMatrix<<endl;
outPoint=point*surfacePointMatrix.inverse();
//cout<<"pointInSurfaceMatrixPosition:"<<outPoint<<endl;
return true;
};
bool glideDeformer::getPointAfterDeformed(MPoint & pointInSurfaceMatrix,MFnNurbsSurface & surfaceFn,MObject surfaceData,double & paramU,double & paramV,MPoint & pointAffterDeformed)
{
surfaceFn.setObject(surfaceData);MVector tangentU;
MVector tangentV;
MVector normal;
MPoint surfacePoint;surfaceFn.getPointAtParam(paramU,paramV,surfacePoint,MSpace::kWorld);
normal=surfaceFn.normal(paramU,paramV,MSpace::kWorld);
surfaceFn.getTangents(paramU,paramV,tangentU,tangentV,MSpace::kWorld);tangentU.normalize();
tangentV.normalize();
normal.normalize();double matrix[4][4]={{tangentU.x,tangentU.y,tangentU.z,0.0},{normal.x,normal.y,normal.z,0.0},{tangentV.x,tangentV.y,tangentV.z,0.0},{surfacePoint.x,surfacePoint.y,surfacePoint.z,1.0}};
MMatrix surfacePointMatrix=MMatrix(matrix);
//cout<<"drivenSurfacePointMatrix:"<<surfacePointMatrix<<endl;pointAffterDeformed=pointInSurfaceMatrix*surfacePointMatrix;
//cout<<"pointAffterDeformedPosition:"<<pointAffterDeformed<<endl;return true;
};
MStatus glideDeformer::deform(MDataBlock &block, MItGeometry & iter, const MMatrix &mat, unsigned int multiIndex)
{
//cout<<"deform()方法调用..."<<endl;
MDataHandle envelopehandle=block.inputValue(envelope);
MDataHandle glidehandle=block.inputValue(glide);
MDataHandle fixedBasehandle=block.inputValue(fixedBase);
MDataHandle aimDirectionhandle=block.inputValue(aimDirection);
float envelopevalue=envelopehandle.asFloat();
float glidevalue=glidehandle.asFloat();
short aimDirectionvalue=aimDirectionhandle.asShort();
bool fixedBasevalue=fixedBasehandle.asBool();if (envelopevalue==0.0)
{
//cout<<"envelope值为0,跳过deform方法..."<<endl;
return MS::kSuccess;
};MDataHandle drivenSurfacehandle=block.inputValue(drivenSurface);
MDataHandle baseSurfacehandle=block.inputValue(baseSurface);
MFnNurbsSurfaceData surfaceDataFn;
MFnNurbsSurface surfaceFn;MObject drivenSurfaceData=drivenSurfacehandle.asNurbsSurface();
MObject baseSurfaceData=baseSurfacehandle.asNurbsSurface();MObject drivenSurfaceObj=surfaceDataFn.create();
MObject baseSurfaceObj=surfaceDataFn.create();surfaceFn.setObject(drivenSurfaceData);
surfaceFn.copy(drivenSurfaceObj);
int drivenSurfaceCvU=surfaceFn.numCVsInU();
int drivenSurfaceCvV=surfaceFn.numCVsInV();
surfaceFn.setObject(baseSurfaceData);
surfaceFn.copy(baseSurfaceObj);
int baseSurfaceCvU=surfaceFn.numCVsInU();
int baseSurfaceCvV=surfaceFn.numCVsInV();cout<<drivenSurfaceCvU<<" "<<drivenSurfaceCvV<<" "<<baseSurfaceCvU<<" "<<baseSurfaceCvV<<" "<<endl;
if (drivenSurfaceCvU==0||drivenSurfaceCvV==0||drivenSurfaceCvU==0||baseSurfaceCvU==0||baseSurfaceCvV==0)
{
//cout<<"drivenSurface或baseSurface不正确,变形不产生..."<<endl;
MGlobal::displayWarning("drivenSurface或baseSurface不正确,变形不产生...");
return MS::kSuccess;
};if (drivenSurfaceCvU!=baseSurfaceCvU||drivenSurfaceCvV!=baseSurfaceCvV)
{
//cout<<"drivenSurface与baseSurface不匹配,变形不产生..."<<endl;
MGlobal::displayWarning("drivenSurface与baseSurface不匹配,变形不产生...");
return MS::kSuccess;
};
MPoint pt;
MPoint ptAfterDeformed;
MPoint pointInSurfacePointMatrix;
double paramU;
double paramV;
double newParamU;
double newParamV;
int index;
float weight;
bool test;
if (fixedBasevalue==false)
{
//cout<<"履带模式..."<<endl;
for(iter.reset();!iter.isDone();iter.next())
{
index=iter.index();
//cout<<"index:"<<index<<endl;
weight=weightValue(block,multiIndex,index);
//cout<<"weight:"<<weight<<endl;
if (weight==0)
{
//cout<<"权重为0,此点变形不产生..."<<endl;
continue;
};
pt=iter.position(MSpace::kObject);
pt=pt*mat;
//cout<<"position:"<<pt<<endl;
-
【cocos2d-x】cocostudio::ColliderDetector 简单介绍 骨骼动画绑定碰撞区域进行碰撞检测
2014-04-17 12:50:20cocostudio::ColliderDetector 简单介绍 利用cocostdio为骨骼动画绑定碰撞区域进行碰撞检测//碰撞框 class ColliderBody : public cocos2d::Ref { public: ColliderBody(ContourData *contourData); ~ColliderBody(); inline ContourData *getContourData() { return _contourData; } #if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT void setColliderFilter(ColliderFilter *filter); ColliderFilter *getColliderFilter(); #endif #if ENABLE_PHYSICS_BOX2D_DETECT virtual void setB2Fixture(b2Fixture *fixture) { _fixture = fixture; } virtual b2Fixture *getB2Fixture() const { return _fixture; } #elif ENABLE_PHYSICS_CHIPMUNK_DETECT virtual void setShape(cpShape *shape) { _shape = shape; } virtual cpShape *getShape() const { return _shape; } #elif ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX virtual const std::vector<cocos2d::Point> &getCalculatedVertexList() const { return _calculatedVertexList; } #endif private: #if ENABLE_PHYSICS_BOX2D_DETECT b2Fixture *_fixture; ColliderFilter *_filter; #elif ENABLE_PHYSICS_CHIPMUNK_DETECT cpShape *_shape; ColliderFilter *_filter; #elif ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX std::vector<cocos2d::Point> _calculatedVertexList;//所有顶点 #endif ContourData *_contourData;//轮廓数据 friend class ColliderDetector; }; /* * @brief ContourSprite used to draw the contour of the display * @js NA * @lua NA */ class ColliderDetector : public cocos2d::Ref { public: static ColliderDetector *create(); static ColliderDetector *create(Bone *bone); public: /** * @js ctor */ ColliderDetector(); /** * @js NA * @lua NA */ ~ColliderDetector(void); virtual bool init(); virtual bool init(Bone *bone); void addContourData(ContourData *contourData);//手动添加 一个 轮廓顶点信息数据 void addContourDataList(cocos2d::Vector<ContourData*> &contourDataList);//手动添加 一组 轮廓顶点信息数据 void removeContourData(ContourData *contourData);//手动移除 一个 轮廓顶点信息数据 void removeAll();//手动添加 所有 轮廓顶点信息数据 void updateTransform(kmMat4 &t);//旋转更新 void setActive(bool active);//设置激活状态 bool getActive(); const cocos2d::Vector<ColliderBody*>& getColliderBodyList();//得到所有轮廓框信息 #if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT virtual void setColliderFilter(ColliderFilter *filter); virtual ColliderFilter *getColliderFilter(); #endif virtual void setBone(Bone *bone) { _bone = bone; } virtual Bone *getBone() const { return _bone; } #if ENABLE_PHYSICS_BOX2D_DETECT virtual void setBody(b2Body *body); virtual b2Body *getBody() const; #elif ENABLE_PHYSICS_CHIPMUNK_DETECT virtual void setBody(cpBody *body); virtual cpBody *getBody() const; #endif protected: cocos2d::Vector<ColliderBody*> _colliderBodyList;//碰撞body Bone *_bone;//骨骼 #if ENABLE_PHYSICS_BOX2D_DETECT b2Body *_body; ColliderFilter *_filter; #elif ENABLE_PHYSICS_CHIPMUNK_DETECT cpBody *_body; ColliderFilter *_filter; #endif protected: bool _active;//是否激活 }; } #endif /*__CCCOLLIDERDETECTOR_H__*/
class TestColliderDetector : public ArmatureTestLayer { public: ~TestColliderDetector(); virtual void onEnter() override; virtual std::string title() const override; virtual void update(float delta); virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; void onDraw(const kmMat4 &transform, bool transformUpdated); void onFrameEvent(cocostudio::Bone *bone, const std::string& evt, int originFrameIndex, int currentFrameIndex); void initWorld() {}; cocostudio::Armature *armature; cocostudio::Armature *armature2; CustomCommand _customCommand; //new render needed this for drawing primitives cocos2d::Sprite *bullet; };
void TestColliderDetector::update(float delta) { armature2->setVisible(true); // // CCNode中两个个方法方法: // getContentSize用来获得节点原始大小。返回CGSize类型 // getBoundingBox获得节点当前大小,即如果经过缩放那么就是缩放后的大小。返回CGRect类型。 // 有个问题最近才遇到,父精灵进行缩放处理,会对子精灵进行标记(boolean值),在实际绘制过程中会影响子精灵显示大小,但并不改变子精灵的getBoundingBox所获得的值,也就是只有直接setscale才会影响getBoundingBox数值。 // CCSprite中有个方法: // getTextureRect返回精灵纹理大小,返回CGRect类型,并且是原始纹理大小,无关缩放。在一般情况下和getContentSize作用一样,但如果用TP处理过,还回值是实际纹理大小,留白部分会去除。这个在碰撞检测过程中经常用到。 Rect rect = bullet->getBoundingBox(); // This code is just telling how to get the vertex. // For a more accurate collider detection, you need to implemente yourself. const Map<std::string, Bone*>& map = armature2->getBoneDic();//得到骨骼字典 for(const auto& element : map)//遍历字典 { Bone *bone = element.second; ColliderDetector *detector = bone->getColliderDetector(); if (!detector)//如否没有碰撞 跳过 继续遍历 continue; //得到碰撞框列表 const cocos2d::Vector<ColliderBody*>& bodyList = detector->getColliderBodyList(); for (const auto& object : bodyList) { //得到一个碰撞框 ColliderBody *body = static_cast<ColliderBody*>(object); //一个碰撞框包含的所有顶点 const std::vector<Point> &vertexList = body->getCalculatedVertexList(); float minx = 0, miny = 0, maxx = 0, maxy = 0; int length = (int)vertexList.size();//顶点个数 for (int i = 0; i<length; i++) { Point vertex = vertexList.at(i); if (i == 0) { minx = maxx = vertex.x;//起点和终点 是 第一个点 miny = maxy = vertex.y; } else//遍历所有点 得到4个最值 { minx = vertex.x < minx ? vertex.x : minx; miny = vertex.y < miny ? vertex.y : miny; maxx = vertex.x > maxx ? vertex.x : maxx; maxy = vertex.y > maxy ? vertex.y : maxy; } } Rect temp = Rect(minx, miny, maxx - minx, maxy - miny);//组成一个包含所有顶点的矩形 if (temp.intersectsRect(rect)) { //子弹矩形在碰撞区域内 碰撞框不可见 armature2->setVisible(false); } } } } void TestColliderDetector::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(TestColliderDetector::onDraw, this, transform, transformUpdated); renderer->addCommand(&_customCommand); } void TestColliderDetector::onDraw(const kmMat4 &transform, bool transformUpdated) { kmGLPushMatrix(); kmGLLoadMatrix(&transform); armature2->drawContour(); kmGLPopMatrix(); }
TestColliderDetector::~TestColliderDetector() { } void TestColliderDetector::onEnter() { ArmatureTestLayer::onEnter(); scheduleUpdate(); armature = Armature::create("Cowboy"); armature->getAnimation()->play("FireWithoutBullet"); armature->getAnimation()->setSpeedScale(0.2f); armature->setScaleX(-0.2f); armature->setScaleY(0.2f); armature->setPosition(Point(VisibleRect::left().x + 70, VisibleRect::left().y)); /* * Set armature's frame event callback function * To disconnect this event, just setFrameEventCallFunc(nullptr); */ armature->getAnimation()->setFrameEventCallFunc(CC_CALLBACK_0(TestColliderDetector::onFrameEvent, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); addChild(armature); armature2 = Armature::create("Cowboy"); armature2->getAnimation()->play("Walk"); armature2->setScaleX(-0.2f); armature2->setScaleY(0.2f); armature2->setPosition(Point(VisibleRect::right().x - 60, VisibleRect::left().y)); addChild(armature2); #if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT bullet = cocos2d::extension::PhysicsSprite::createWithSpriteFrameName("25.png"); #elif ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX bullet = Sprite::createWithSpriteFrameName("25.png"); #endif addChild(bullet); initWorld(); } std::string TestColliderDetector::title() const { return "Test Collider Detector"; } void TestColliderDetector::onFrameEvent(Bone *bone, const std::string& evt, int originFrameIndex, int currentFrameIndex) { CCLOG("(%s) emit a frame event (%s) at frame index (%d).", bone->getName().c_str(), evt.c_str(), currentFrameIndex); /* * originFrameIndex is the frame index editted in Action Editor * currentFrameIndex is the current index animation played to * frame event may be delay emit, so originFrameIndex may be different from currentFrameIndex. */ Point p = armature->getBone("Layer126")->getDisplayRenderNode()->convertToWorldSpaceAR(Point(0, 0)); bullet->setPosition(Point(p.x + 60, p.y)); bullet->stopAllActions(); bullet->runAction(CCMoveBy::create(1.5f, Point(350, 0))); }
-
vue组件key组件绑定_一个Vue插件,用于将动画绑定添加到Vue组件
2020-07-24 08:01:47vue组件key组件绑定 Vue-Anime (Vue-Anime) Simple Vue bindings for Anime.js. Anime.js的简单Vue绑定。 安装 (Install) $ npm install --save vue-animejs import VueAnime from 'vue-animejs'; Vue.use... -
34avalon - 指令ms-effect(动画绑定)
2019-04-16 13:40:17ms-effect拥有这三种绑定形式: <p ms-effect="[@configObj,{is:'fade'}">属性值为字面量,其中一个对象必须包括is属性,这用于指定特效名</p> <p ms-effect="{is:fade, stagger:300}">属性值为... -
6.Unity经验:Unity2019程序化动画绑定(Animation Rigging系统)
2020-05-12 11:36:51前言:Unity的Animation Rigging系统不但可以使用程序修改动画,还可以利用各种IK控制器在Unity里面录制动画,可谓是动画开发的一个巨大福音! 2019.1才发布的一个新功能,可以让开发这在动画骨架上设置由程序控制... -
unity中骨骼动画绑定后不光滑的问题
2016-04-22 09:44:28我们可以看到模型尾部的不光滑状态,这是因为skinned Mesh Renderer中Quality中选择的是自动,我们可以尝试选择1,2,4这几个选项来观察效果。 选择4后效果如下: -
菜鸟推荐!海量3D模型、轻松动画绑定。这个网站你要是不知道就亏了
2020-10-14 17:27:46内部模型绑定动画 内部模型指的是mixamo网站自己提供的模型,如果要使用网站自己提供的模型并进行动画绑定,这个非常简单, 1.在“Characters” 下选择你看中的模型,选中后会显示在右边的预览窗口中 2.在... -
COCOS2DX,cocostudio::ColliderDetector 简单介绍 骨骼动画绑定碰撞区域进行碰撞检测
2015-01-26 00:34:50/ #ifndef __CCCOLLIDERDETECTOR_H__#define __CCCOLLIDERDETECTOR_H__ #include "cocostudio/CCArmatureDefine.h"#include "cocostudio/CCDatas.h" #ifndef PT_RATIO#define PT_RATIO 32#endif ... -
c# 创建委托 消息订阅_【新教程上架】虚幻游戏制作;布料;自然场景;C#语言;动画绑定...
2020-12-22 04:29:09烘焙动画数据 讲解使用Maya把动画信息烘焙到关节、烘焙到模型缓存和ABC缓存的应用。 www.aboutcg.org/courseDetails/1002/introduce C#语言基础(下) 本教学通篇完全实时录制,中文讲解,通俗易懂,着重讲解了C#编程... -
maya 绑定动画 蜘蛛侠
2014-12-14 16:07:52maya 动画 模型 绑定 贴图 精细度很高 适合很多人使用 -
ue4绑定动画、重定向动画
2020-12-26 23:46:53使用别人的动画,使用自己的骨骼体和模型。 使用别人的动画,使用初学者包的。。。。 然后点击修改,修改路径 然后在人物蓝图中使用自己重定向的蓝图动作就行 走路姿势很怪咋办 ... -
代码动态绑定动画事件
2019-03-07 10:27:49unity的动画事件可以直接在片段上绑定,进行事件注册,但是,相对灵活性不高,这里采用代码绑定。 public class AniMatorMgr : MonoBehaviour { private Animator animator;//动画控制器 private Dictionary&... -
模型绑定及动画
2017-12-05 13:53:521.骨骼必须为IK、CAT、BIP三类,unity不认虚拟体动画,单个物体骨骼数量不超过60个。 2.动画帧率、帧数的控制,一般情况下为每秒10帧,一个动画尽量控制在1秒内完成。 3.角色蒙皮、动作调节规范... -
Android 动画——绑定成功后对号打勾动画
2020-03-25 16:25:39可以下载源码:https://download.csdn.net/download/cherry459/12270112 xml中使用该自定义控件: <com.besttop.bindcar.CircleTickView android:id="@+id/ct_success" android:layout_width="... -
swiftui动画之tab自定义切换动画_关于自定义绑定和Biped(CS骨骼)绑定区别
2020-11-21 03:26:46告诉你们区别到底在哪!大家好,之前在这小破站里面发了个...其实大家都知道,绑定是为动画服务的,好的绑定,至少能够让动画师用的不那么糟心,K动画的时候,心情都能够好一点,拿到一个很烂的绑定,要么是骨骼... -
Mecanim动画——MatchTarget绑定
2018-03-17 18:32:32今天在学习一个翻越的动画,学到了MatchTarget绑定,非常Cool的解决了翻墙时候的手的位置问题,所以来分享一下MatchTarget的简单用法至于前面的走路跑步控制的暂时就不贴上来了,直接到MatchTarget函数上。... -
ue4绑定受伤动画
2020-12-29 16:58:25死亡动画与受伤动画。 选择所选动画,然后重新定向动画资产 就是把动画导入骨骼中 -
angular移除事件绑定事件绑定_Jquery绑定事件及动画效果
2021-01-04 09:06:23绑定事件bind(type, data, fuc)one(type, data, fuc) //只执行一次常见事件类型名称含义blur失去焦点focus获得焦点load加载resize重置大小scroll滚动unload卸载click点击dblclick双击mousedown鼠标按下mouseup鼠标弹... -
3dmax角色动画设计骨骼绑定
2011-08-27 21:31:383dmax角色动画设计骨骼绑定,不错的资料 -
jQuery绑定事件及动画效果
2020-08-04 19:02:49jQuery绑定事件及动画效果 绑定事件 on(events,[selector],[data],fn):在选择元素上绑定一个或多个事件的事件处理函数。 bind(type,[data],fn):为每个匹配元素的特定事件绑定事件处理函数。 one(type,[data],fn):... -
通过数据绑定控制WPF动画启动,WPF动画开始
2018-03-23 08:34:00通过数据绑定控制WPF动画启动,WPF动画开始 原文:通过数据绑定控制WPF动画启动,WPF动画开始1.主要代码: <ControlTemplate.Triggers> <DataTrigger Binding="{Binding Open,... -
游戏模型绑定和动画神器:Akeytsu
2019-09-04 19:35:33Akeytsu是由日本Nukeygara公司出品的一款专注于游戏动画中绑定(Rigging)和动画(Animating)的专业软件,观看了油管上的视频,感觉这个软件就像专注于建模的Silo一样,自身定位非常准确,并且由于设计者本身就是资深的... -
cocos2d creator绑定龙骨动画
2019-03-30 14:14:59这里写自定义目录标题cocos2d creator绑定龙骨动画 cocos2d creator绑定龙骨动画 首先我们使用下面这个软件打开动作文件 不要用这种导出直接导出: 这样导出之后,多个动作会使用同一张纹理,导致在cocos2d ... -
Flash骨骼绑定做动画
2015-07-18 16:59:43绑定骨骼要先确定骨骼的主骨骼,即所有骨骼的出发点。 左边工具的第二个可以调整骨骼。 左边第一个就可以来掰动作了 然后动画就跟做动画补间一样,插入关键帧就右键,插入姿势。就可以做自己想要的动作。 -
controltemplate绑定自定义事件_Jquery绑定事件及动画效果
2020-12-26 07:02:29绑定事件bind(type,data,fuc)one(type,data,fuc) //只执行一次常见事件类型判断是否显示简化绑定事件Hover事件 hover(enter,leave)光标移入,触发第一个事件,光标移走,触发第二个事件toggle事件 阻止事件的... -
使用Mixamo绑定骨骼导入动画
2019-12-03 13:00:00原文转自:https://www.engineworld.cn/thread-640-1-1.html 1.准备FBX人物模型 2.上传Mixamo网站(没有... 3.根据提示将相关放置点 4.绑定后下载模型 5.该模型可以使用Mixamo中所有动画,根据项目所需进行下载 ...
-
bert_sentiment_analysis_finetuning-源码
-
改变visual studio配色方案
-
2021 年该学的 CSS 框架 Tailwind CSS 实战视频
-
Python 处理 JSON 必要时我选择 ujson 和 orjson
-
Golang零基础-->高级编程
-
文本分析项目-源码
-
阿里架构师,讲述基于微服务的软件架构模式
-
Galera 高可用 MySQL 集群(PXC v5.7+Hapro)
-
FyreString:FyreString是PHP的免费开源字符串实用程序库-源码
-
射影级双缝光子晶体光机腔设计
-
C笔记-源码
-
DHCP 动态主机配置服务(在Linux环境下,配置单网段或跨网段提)
-
2021-02-25
-
JAVA 面向对象
-
使用VS2019 开发Linux C++ 程序
-
i++ 和 ++i 到底怎么分析?
-
量子差分密码分析
-
yii怎么手动生成错误日志
-
ASHRAE 2012 IT Equipment Thermal Management and Controls_V1.0.pdf
-
STM32F373XXDataSheet.zip