maya自动重定向测试

目录

maya导入bvh

maya python脚本测试

maya python脚本调用

maya重定向


Pose-to-Motion: Cross-Domain Motion Retargeting with Pose Prior

maya导入bvh

GitHub - jhoolmans/mayaImporterBVH: Importer script for BVH

maya python脚本测试

首先打开MAYA,然后点击软件上方,菜单栏上的窗口->常规编辑器->脚本编辑器。

在弹出的脚本编辑器的下方,选择python选项卡,然后把下面的案例代码复制粘贴进去。

测试脚本:

import maya.OpenMaya as om
import maya.cmds as cmds
import random, time

def arPolyNoise(geoObject, maxDisplacement):
    """Apply noise to the supplied geometry object using the supplied max displacement."""
    # get the dag path for the shapeNode using an API selection list
    selection = om.MSelectionList()
    dagPath = om.MDagPath()
    try:
        selection.add(geoObject)
        selection.getDagPath(0, dagPath)
    except: raise
    # apply noise to the shape's points
    try:        
        # initialize a geometry iterator
        geoIter = om.MItGeometry(dagPath)
        # get the positions of all the vertices in world space
        pArray = om.MPointArray()
        geoIter.allPositions(pArray)
        # displace each of the vertices
        for i in xrange(pArray.length()):
            displacement = om.MVector.one * random.random() * maxDisplacement
            pArray[i].x += displacement.x
            pArray[i].y += displacement.y
            pArray[i].z += displacement.z
        # update the surface of the geometry with the changes
        geoIter.setAllPositions(pArray)
        meshFn = om.MFnMesh(dagPath)
        meshFn.updateSurface()
    except: raise

# start the timer and add the noise
timeStart = time.clock()
# create a sphere and add noise
sphere = cmds.polySphere(radius=1, subdivisionsX=200, subdivisionsY=200)
arPolyNoise(sphere[0], 0.02)
# stop the timer
timeStop = time.clock()
print('Execution time: %s seconds.'%(timeStop-timeStart))

maya python脚本调用

使用Python在外部运行Maya-standalone库_maya.standalone-CSDN博客

maya重定向

https://github.com/joaen/animation-retargeting-tool/blob/main/animation_retargeting_tool/animation_retargeting_tool.py

maya导入bvh需要用插件,效果还没测

两个bvh必须 是T-Pose

是把source的动作拷贝给target

target只要t-pose就行。

关节映射。

相关推荐

  1. maya自动定向测试

    2024-03-15 20:06:01       49 阅读
  2. maya 定向 pycharm运行

    2024-03-15 20:06:01       42 阅读
  3. Servlet定向转发及自动加载

    2024-03-15 20:06:01       46 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-15 20:06:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-15 20:06:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-15 20:06:01       82 阅读
  4. Python语言-面向对象

    2024-03-15 20:06:01       91 阅读

热门阅读

  1. 什么是虚假唤醒?为什么会产生虚假唤醒?

    2024-03-15 20:06:01       44 阅读
  2. python 之yaml库使用总结

    2024-03-15 20:06:01       40 阅读
  3. 详细说说JVM的class文件(一)

    2024-03-15 20:06:01       38 阅读
  4. JVM-4

    JVM-4

    2024-03-15 20:06:01      40 阅读
  5. 【测试知识】业务面试问答突击版1

    2024-03-15 20:06:01       35 阅读
  6. nginx应用

    2024-03-15 20:06:01       45 阅读
  7. C++中的C标准库、注释和条件编译

    2024-03-15 20:06:01       44 阅读
  8. Jenkins入门指南:自动化构建与部署的艺术

    2024-03-15 20:06:01       34 阅读