Giter Site home page Giter Site logo

francoisdallaire / maya-transfer-blend-shape Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robertjoosten/maya-transfer-blend-shape

0.0 0.0 0.0 2.05 MB

Transfer your blend shapes between meshes with the same topology.

Home Page: https://robertjoosten.github.io/maya-transfer-blend-shape/

License: MIT License

Python 99.42% AMPL 0.58%

maya-transfer-blend-shape's Introduction

maya-transfer-blend-shape

Retarget your blend shapes between meshes with the same topology.

Installation

  • Extract the content of the .rar file anywhere on disk.
  • Drag the transfer-blend-shape.mel file in Maya to permanently install the script.

Usage

A button on the MiscTools shelf will be created that will allow easy access to the ui, this way the user doesn't need to worry about any of the code. If user wishes to not use the shelf button the following commands can be used. The transfer will only work if at least one vertex has no delta, these fixed vertices are used to transfer the solution to the correct position in object space, the threshold can be increased to make sure vertices are linked.

A virtual mesh can be used to add additional triangles to the solve, it is important that all vertices of the virtual mesh can be mapped to vertices on the source mesh, this can be done by snapping them.

The number of iterations determine the amount of times the laplacian smoothing matrix is applied to the deformed vertices. This smoothing matrix is calculated using weights determined by area difference on a per-vertex basis.

Colour sets can be created to visualize the deformed vertices and the laplacian smoothing weights.

Command line:

import transfer_blend_shape
transfer = transfer_blend_shape.Transfer(source_mesh, target_mesh, virtual_mesh=None, iterations=3, threshold=0.001)
transfer.execute_from_mesh(mesh, name)
transfer.execute_from_blend_shape()

Display UI:

import transfer_blend_shape.gui
transfer_blend_shape.gui.show()

Note

This tool requires numpy and scipy to be installed to your environment. Using linux or Maya 2022+ on windows this can be done via a simple pip install. For older windows versions a custom version will have to be compiled against the correct VS version.

Example images are generated using the MetaHuman exports for the source/target base and source jaw open shape. Target jaw open is generated using the tool.

maya-transfer-blend-shape's People

Contributors

robertjoosten avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.