In barycentric coordinates - part 1 I showed a way to compute the barycentric coordinates for an interior point in a triangle, and described how the result could be used in a simple constraint example.
In part 2 I am going to show a python OpenMaya code example that could be used as the basis for some kind of data interpolation between meshes with differing topology.
Barycentric coordinates are useful when you want to transfer data between meshes that have different topology because they provide the basis for some simple interpolation. Take smooth skin binding for example. It is a commmon workflow, when painting weights, to start with a low resolution version of your mesh. When you are happy with the weighting you can use maya's copySkinWeights command to transfer those weights from the low resolution mesh to the detailed high resolution mesh, which may even be made up of several pieces. copySkinWeights interpolates the weights from the verts on the lo res mesh and copies the result to the hi res mesh. The smooth result you get with this workflow is usually something that would have been very difficult to achieve if you had tried to paint the weights directly on the hires mesh.
I've updated the downloads page and added my compile of the poseDeformer and poseReader for maya 2015 to the archives.
Since I don't get the time to update this blog much anymore, I thought I'd just drop in quickly to recommend a google groups mailing list that I have been contributing to for a while now. If you feel like some question/answer type discussions focused specifically on problem solving in maya this might be the place for you. There are a great bunch of knowledgeable people posting there already from time to time, but more will always be welcome. Just enter "maya he3d" in the google groups search.
Yesterday I wrote about my experiences with the OpenMaya modules for python in maya, and showed some code to get the closest vertex on a mesh from the position of a locator. Today I'm going to show the same code, rewritten to use the new Maya Python API 2.0, which, according to the intro in the manual, " is a new version of the Maya Python API which provides a more Pythonic workflow and improved performance." (more...)
Recently I was writing a python function where I needed to find the mesh vertex closest to a locator. I already knew how to get a list of vertices from my mesh, how to get their worldspace locations and how to iterate through them calculating the distance between each one and the locator to determine the closest. But the brute force approach would have been pretty slow on a dense mesh.
I'm not very familiar with the OpenMaya classes, but I was pretty sure one of them would have a method that would make this task much faster, so I began to google the problem.
Here is what I found... and what I had to do to get it to work. Advanced coders will probably find this trivial, but I'm guessing there are others like me that will find it interesting. (more...)
I added the 2014-x64 (windows) version of Michael Comet's poseDeformer to the downloads page.
I recently discovered a potential problem when using the poseDeformer in maya 2013 and 2014. The problem occurs due to changes brought about by the introduction of the node editor in maya. I've modified the poseDeformer code to work around the problem, but for any one who is interested, I'll describe it in more detail below.
A few people have asked me if there is a way to use my uv layout script, djPFXUVs, on a paint FX mesh that is animating. The answer is "yes". Keep reading if you are interested in knowing how...
While browsing the interwebs recently, I noticed that for $20, you can buy something called "universal uv randomization script" on creativecash. Seeing this made me realize I should give my scripts way cooler names from now on. So get in quick and grab a copy of djPFXUVs, while it's still free. Soon it will be simply called "XP€N$IV $H1T".
A while back I posted a script called djPFXUVs that could be used to quickly re-layout uv's for paintFX leafs to help with the task of building and assigning more interesting textures. Today I thought I'd share an updated version of that script, which as you can see here, even has a UI.