Corrective Blendshape at Maya

记录一下最近学到的corrective blendshape知识.

问题描述

First, a basic scene is built, pCylinder1 is rigged and skinned,
basic scene for test

Now, suppose we are not satisfied with the elbow shape, want it change it a little bit. 例如一个手臂的骨骼动画已经搞好了, 后面发现在形状上还想改进一下, 那怎么办呢?

If we select vertices and move them (adding vector delta to these vertics) on the skinned ...

more ...

mesh history

做demo都只是对mesh做一次修改, 但是好像在一个成熟的程序里面往往是很多次修改的叠加.

引言

以前对mesh的修改都是例如 mesh.setVertexPosition( vertexID, newPos ); mesh.setVertexTC( tcID, newTC ); 这样直接改[1], 从读书时候到现在都是这么simple and naive:-) 而对于maya的case就没有这样简单了,例如去看maya>devkit>splitUV example [2], 套用上面直接修改的方法, 要split一个uv的话,那直接用MFnMesh加几个新uv, MFnMesh::setUV(new uv id, uv value) 就ok了, 可是故事没有这么简单....

Construction History and Tweak

直接摘抄两段来看看:

All the operations that can be performed on a polygonal ...

more ...

Maya Programming Node

学maya时候有些新概念要记录一下,否则忘得快.

先在一个新场景里面拖一个多边形球polygon sphere出来,
transfrom and shape node 打开Outline窗口, 看到一个pShere1, 选择Display/Shapes, 又看到pShere1下面还有一个pSphereShape1. 而在hypergraph: connection 窗口看到一共四个东西, 其中两个就是上面的pSphere1 and pSphereShape1, 而且其中三个是有连接关系的。从左到右它们分别是:
+ polySphere1: 控制参数, 例如半径radius, axis/height上的布线密度等;
+ pSphereShape1: 这个就是实际的shape node, 形状.
+ initialShadingGroup: 用于画这个球的.
+ pSphere1: transform node, 决定了球在空间位置.

import maya.cmds; 

maya.cmds.polySphere()                  # 用script建一个球 
# Result: [u'pSphere2', u'polySphere2'] # 返回就是transform node, shape node. interesting part ...
more ...

How to debug maya custom plugin

涉及maya plugin开发的时候,怎么debug呢?

Attach to maya process ... 寄生

step 1. maya plugin manager (Window -> Settings/Preferences -> Plug-in Manager)中load your custom plugin. This plugin need to be built by the same compiler version of maya, 也许不需要. step 2. at your visual studio project of that custom plugin, Tools -> Attach to ...

more ...

Blendshape at maya

最近接触了一点maya blendshape programming, 稍微记录一下。

BlendShape deformer basis (基础)

先说明一个特点,当drag一个cube or sphere物体的时候,会生成两个nodes, 具体的细节请看maya scene graph,DAG。

To create a simple blendshape example,
Polygon mode, create a cube, we have ;
Select cube1, Shift+D, we have , move cube2 a little bit away from cube1.
Select cube1, Shift+D, we ...

more ...