GithubHelp home page GithubHelp logo

blurstudio / simplex Goto Github PK

View Code? Open in Web Editor NEW
118.0 23.0 41.0 31.7 MB

The Simplex Blendshape UI from Blur Studio

License: GNU Lesser General Public License v3.0

Python 27.26% CMake 0.32% Batchfile 0.02% C 63.41% C++ 8.99%

simplex's Introduction

SIMPLEX UI


Example Simplex UI


For Artitsts

Simplex aims to provide an intuitive, cross-package UI that allows for building, editing, and controlling complex shapes, combos, and transitions for use in high-end blendshape facial rigs, or even PSD systems.

This tool was built with the full Facial Action Coding System (FACS) in mind. As such, it easily handles hundreds of shapes with arbitrary combo depth. Spline interpolation for in-between shapes, positive-negative shapes, in-between combo shapes, and combo transitions are supported. Arbitrary value combinations are also fully supported (eg. ComboX activates when SliderA is at 0.25 and SliderB is at 0.33).

For TD's

Simplex aims to be fully scriptable so that it can easily be inserted into any pipeline. The UI and API are fully Python, all content creation commands are abstracted (for multi-package use), and all systems are built as human readable JSON strings.

There is a suite of tools included that allow for manipulating .smpx files. Most of which can be run completely outside of a DCC. This includes vertex reordering, un-subdividing, splitting, and even shape-inversion. These .smpx files are nothing more than specially structured alembic caches

As long as your package supports Plugins, Python, and Qt (or PySide), you can use Simplex.

Simplex is NOT

  • Simplex is not a modeling toolkit
    • Modeling is done using whatever tools you choose on your current package
  • Simplex is not a deformer
    • It only informs a native blendshape deformer what values the current shapes should have
    • In the future, I do have ideas for building an interface to an advanced deformer for dynamically previewing arbitrary splits, but the final output will always have the ability to bake down to a basic blendshape.

Basic Usage

Follow this youtube link to a basic walkthrough of Simplex usage. This video highlights a slightly older version of Simplex, but the interaction remains basically the same. https://www.youtube.com/watch?v=LQwzsxU8z_Q

Easy Installation

  1. Download this file to your computer. Make sure it's saved as a python file.
  2. Drag/drop the python file into a freshly opened instance of Maya (make sure all other mayas are closed). A command prompt window may open for a couple seconds. This is normal.
  3. If you have multiple Maya versions installed, repeat step 2 for those versions as well. This just ensures that numpy is installed for those versions.
  4. Create a python shelf button with this script.
from simplexui import runSimplexUI
runSimplexUI()

Updating

  1. Download this file to your computer. Make sure it's saved as a python file.
  2. Drag/drop the python file into a freshly opened instance of Maya (make sure all other mayas are closed). A command prompt window may open for a couple seconds. This is normal.
  3. If you have multiple Maya versions installed, you do NOT have to repeat step 2 for all of them.

Manual Installation

  1. Download the simplex-v*.*.*.zip file from the latest release
  2. Create a modules folder in your maya user directory. For example, on Windows, that would mean creating C:\Users\<your-username>\Documents\maya\modules
  3. Copy the simplex.mod file and the simplex folder into that directory.
  4. Install numpy for mayapy using pip. For example, on Windows, once you're in the right place the command will be mayapy -m pip install numpy. You will need admin privelages for this.
  5. Run these two Python commands in Maya to start the tool. (This is probably what you should put into a shelf button)
from simplexui import runSimplexUI
runSimplexUI()

Uninstalling

  1. Delete the simplex.mod file and the simplex folder from the modules folder in your maya user directory. For example, on Windows, that would mean deleting C:\Users\<your-username>\Documents\maya\modules\simplex.mod and C:\Users\<your-username>\Documents\maya\modules\simplex

Compiling

Hopefully you don't need to do this, but if you have to, just take a look at .github/workflows/main.yml and you should be able to piece together how to get a compile working using CMake. You aren't required to download the devkit or set its path for CMake if you've got maya installed on your machine. Also note, I use features from CMake 3.16+ so I can target python 2 and 3 separately.

simplex's People

Contributors

barishcb avatar boredstiff avatar tbttfox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simplex's Issues

[Request]: how to build for centos 7?

Description

I am using maya2022 in centos7.
Currently, with version 3.0.9, I get glibc error and it won't load the plug-in. I'm not familiar with it, but this seems to be related to the version of the operating system. Could you please tell me the build process for using centos7?

I tried to modify the main.yml file, but it didn't work out.

Solution

No response

Additional Context

No response

Add new solver shape type: Traversal

This is a big one.
There are shapes that turn on whenever one slider turns on. These are the main sliders.
There are shapes that turn on whenever multiple sliders turn on. These are combos.

Those two things give us access to all the shape extremes... but then we add progressions.
We can have a cheap shape turn on halfway to turning on a slider.
We can have a cheap shape turn on halfway to turning on a combo.
We can't currently have a cheap shape turn on halfway between two combos. This is a Traversal.

We can do it the expensive way using a free floating shape, and that's fine up to a point. However, that will only ever give us linear interpolation.
This would be an advanced option, and probably wouldn't be used too often. However, it would be nice for PSD like setups, and high quality eye shapes.

This probably requires a new tree for the ui, so this should wait until the trees are abstracted.

Reordering Combo Names

Add the ability to reorder combo names by a priority list.
I foresee a right-click menu that allows you to reorder the names for a selection. Then all contributing shapes show up in a drag/drop list and the artist can reorder them by priority

Apply percentages of an updated progression

Say we have a progression with multiple, evenly spaced shapes. If we update the last shape in the progression, we need a way to update the other shapes as percentages of the delta of our change

Update UI slide values

Sometimes the slide values are changed from outside the Simplex UI
Figure out some way to update the UI with the true values.
We can't really connect to all value updates because that would be slow, so maybe just update on mouseover or something?

Average multiple face rigs

Figure out some way to build a face rig as some average of multiple other face rigs. Or even a painted blend of multiple face rigs.

This would give us the ability to quickly get first-pass faces out by mixing/matching parts of faces we already have done.

Tweak Mix tool

A-la BCS, add a 'tweak mix' tool.

This should be relatively simple to set up: Get all shapes that contribute to a combo (including all previous combos), extract them separately, and build a simple blendshape node out of them. Then reconnect this output shape as a live (or non-live) combo connection.

This will allow an artist to tweak the contributions to a combo to get a better mixed result, because sometimes it's easier to add/remove influence from previous shapes than to sculpt from scratch.

Multiple children

Importing an smpx file onto a head that has multiple shape nodes fails. Right now, I have follicle nodes as children, next to shape node parented to a transform. It errors out :(

Cleanup: Separate the ui into independent parts

That simplexdialog.py file is huge. I should split it up into multiple files so it's easier to manage. For instance, the trees (and their models) could easily be split out. The settings panel could be it's own widget as well.

Don't allow invalid names

It's possible to input invalid names into the slider tree. I broke a setup by renaming a slider to "(("

[Bug]: extract combo not connected to the blendshape node when one of the sliders is not at 1

Summary

Hi, sorry if this is a bug of mine. The problem I'm having is that when I have three sliders, for example, jawOpen = 0.5, smileLeft = 1, and smileRight = 1, I can create a combo and the new blendshape is created and linked in yellow in the blendshape node. However, if I extract the mesh to sculpt it, the blendshape is no longer linked. This problem only occurs when one of the slider values is not at 1

Expected Behavior

.

Steps to Reproduce Behavior

.

Solution

No response

Environment

maya 2022

Additional Context

.

Include UV's in the .smpx output

UV's should be included in the output for both visualization and technical reasons.
Having UV's is very useful, especially if you have a single head topology or a single unified UV layout.

Deformed Dump tool (extract external)

Write a tool/button that will extract shapes from some external object (rather than the base head). That way we can apply complex arbitrary deformations/transformations to a head for extraction.

Switch over to Qt.py

Qt.py is a much better way of handling the differences between PyQt4, PySide and PySide2. Switch over to using this library

Isolate Mode

Add an isolation mode for sliders that would show only the selected sliders, and the combos made from only those sliders.

split by map

Hey, we were looking at implementing this but wanted to check if you had already started it. If not, do you have any suggestions or tips for how best to go about it?

thanks

Correctives?

a quick grep of the word 'Corrective' and the resulting methods leads me to believe that Simplex no longer handles corrective shapes?

Preserve Combos

It would be very nice to be able to preserve a combo. Meaning it would stay constant when shapes or lower order combos change.

[Bug]: slider not work at mouse middle click -

Summary

I'm moving the slider with the middle click of the mouse

plus works as expected but minus doesn't

Expected Behavior

I thought the slider's value would go down

Steps to Reproduce Behavior

Create any slider, click the mouse middle, and move

Solution

No response

Environment

window 11
maya 2024.2
maya 2022.5

Additional Context

slider_bug.mp4

It looks like it's working fine on YouTube video. But I don't.
Is this my only problem?

Trees collapse on undo

Undos cause the trees to collapse unexpectedly.
Make the tree-expansion more consistent

Interpolation type doesn't stick

Changing the 'Weight Interpolation' from Spline to Linear in the settings dropdown doesn't actually change the system in any way. If you click off, then click back on the slider you just changed, it will be the way it started.

Renaming Combo shape

Changes made to names of Combos and Combo shapes do not get passed through to the simplex node and the shape names themselves don't change, it only changes the name in the interface. This is likely because the renameCombo function doesn't call an appropriate DCC command to actually change things.

Missing 'numpy' module

I'm getting this error when running the latest release:

Error: ModuleNotFoundError: file \uvTransfer.py line 20: No module named 'numpy'

Respect filters when extracting

When extracting lots of things, it's easy to select a groupItem then extract. However, when extracting, it will extract every child of that group, rather than only the visible items.
So make the extraction process only deal with what's visible in the filtered trees.

Connecting combos breaks things

Live-extracting a combo, then hitting the connect button causes an error. This bug was probably introduced when I changed things over to the multi-shape setup.

[Bug]:

Summary

Receiving different array size when running Tools > Import Obj Folder

#   File "MeshCrawler\commands\mayaCommands.py", line 182, in setAllVerts
#     out[:, :3] = newVerts
# ValueError: could not broadcast input array from shape (24049,2,3) into shape (24049,3)

Expected Behavior

Expected same size array from:
simplex.DCC.getNumpyShape()
&
simplex.DCC.extractShape()

Steps to Reproduce Behavior

From the Simplex UI run Tools > Import Obj Folder

Solution

I have no concrete solution. My apologies.
I am currently skipping the reorder steps as a work around.

Environment

SimplexUI: 3.0
OS: Windows 10
Python: 3.7.7
Numpy: 1.21.6

Additional Context

N/A

multi split combo permutations

Hey, So ran into an interesting splitting issue today, and wanted to get your thoughts on it. It's a little difficult to describe so here it goes....

there are two shapes and a combo:

  shape1_X_Y
  shape2_X_Y

  shape1_X_Y_shape2_X_Y

after we split we get 8 sliders, and 4 combos

  shape1_L_U
  shape1_L_D
  shape1_R_U
  shape1_R_D
  shape2_L_U
  shape2_L_D
  shape2_R_U
  shape2_R_D

  shape1_L_U_shape2_L_U
  shape1_L_D_shape2_L_D
  shape1_R_U_shape2_R_U
  shape1_R_D_shape2_R_D

Let's just look a the Left side for now

  shape1_L_U
  shape1_L_D
  shape2_L_U
  shape2_L_D

  shape1_L_U_shape2_L_U
  shape1_L_D_shape2_L_D

the combos we got after splitting are not ALL the possible permutations. these are the possible combos...

  shape1_L_U_shape2_L_U
  shape1_L_D_shape2_L_D
  shape1_L_U_shape2_L_D
  shape1_L_D_shape2_L_U

there are two permutations we did not get where the L_U is combo'd with the L_D, and these are the combos that we want in this particular case.

  shape1_L_U_shape2_L_D
  shape1_L_D_shape2_L_U

one shape is being split at the lips vertically, and the other at the nose bridge vertically, we need the top of the former, and lower of the latter to be the resulting combo

:D

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.