Skip to content

Spacetime Constraints for Deformable Objects in Houdini

Notifications You must be signed in to change notification settings

wayne-wu/wiggly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wiggly: Animating Deformable Objects Using Spacetime Constraints

University of Pennsylvania, CIS 660: Advanced Topics in Computer Graphics

Wayne Wu and Aditya Abhyankar

Teaser

Installation

To use the tools without building, simply copy the dso, config, otls, help folders to your HOUDINI_USER_PREF_DIR.

Build Instruction

Dependencies

  1. Download the dependencies listed above.
  2. Modify src/CMakeLists.txt to point to YOUR Houdini and dlib paths.
  3. Generate VS solution using cmake/cmake-gui

Overview

This project implements the paper: Animating deformable objects using sparse spacetime constraints by Schulz et al. in Houdini. As part of the authoring tool, we have designed an intuitive workflow that allows users to easily create the sparse keyframes and generate animation with our custom solver.

Implementation

The core algorithm (i.e. main solver) of the paper is implemented in C++ using HDK. The node is implemented as a SOP node based on the NodeVerb design.

We use the Eigen3 library for most of the linear algebra operations, most importantly for using the Generalized Eigen Solver and SVD operations. We use dlib for its optimization algorithm, as it was the only third-party library we found to work with Windows and fit our needs. While the paper uses Gauss Newton method, we use the BFGS algorithm with approximated derivatives. Finally, we are using a brute-force trapezoidal rule to evaluate the integral of the energy term, instead of using explicit integral formulas.

For efficiency, we've implemented multi-threading for many functions using HDK's UT_ThreadedAlgorithm. Specifically, we've parallelized the evaluation of wiggly splines for each mode (i.e. reduced dimension), as the evaluation is largely independent. This provided at least a 3X performance gain.

Workflow

Our workflow works on tetrahedral solids. You should follow Houdini's FEM workflow to set up your mesh. Specifically, use the Remesh SOP and Tet Conform/Embed SOP to generate the tetrahedrons.

We introduce three new SOP nodes to support the Wiggly workflow:

Wiggly Constraint SOP

This is used to define a single spacetime constraint with position and/or velocity data. You can either transform points directly using the node parameters, or you can use a Transform SOP that then goes into the Wiggly Constraint SOP. What's important is for the vertices to be at the position of the constraint.

Wiggly Spline SOP

This is used to define a motion that contains a sparse set of spacetime constraints (a.k.a Wiggly Constraints). It is simply a configuration node that groups the constraints together as part of one Wiggly Spline (i.e. one motion). You should also specify the pin constraints here if you'd like to fix any part of the mesh.

Wiggly Solver SOP

This is used to run the optimization process and generate the animation. It will take in the Wiggly Splines, which contain the Wiggly Constraints. Each Wiggly Spline will be solved iteratively and the splines will be made continuous as one smooth motion.

We're also using the Guide Geometry to allow users to easily see the final animation and the specified constraints together. Here's what it would look like in the viewport:

blockstretch_viewport.mp4

Results

Results are rendered using Karma XPU.

blockstiffness_render.mp4
xwalking2_render.mp4
xstretching_render.mp4
pig_render.mp4
blockstretch_render1.mp4

Future Work

  • Implement rotation strain warping
  • Use explicit integral when evaluating the energy function
  • Compare other optimization techniques
  • Create viewport handle for Wiggly Constraint SOP
  • Performance optimization
  • Remove third-party dependencies

Special Thanks To

  • Cameron White - SideFX
  • Prof. Klaus Hildebrandt - TU Delft

About

Spacetime Constraints for Deformable Objects in Houdini

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published