meshMath — first pass


Been struggling on this one. The problem at hand is one of trying to get transformed blendshape targets baked down from one mesh to another. This path happened to be a dead end but hope it is useful for other purposes.

There are times when it is useful to see the difference in two meshes, or add/subtract the difference between two. In general, mesh math (as we’ll call it).

There are a few new calls:

  • cgm.core.lib.geo_Utils
    • meshMath_values — this call does the math portion of mesh math
    • meshMath
  • modes
    • add : (target + source) * multiplier
    • subtract : (target – source) * multiplier
    • multiply : (target * source) * multiplier
    • average: ((target + source) /2 ) * multiplier
    • difference: delta
    • addDiff: target + (delta * multiplier)
    • subtractDiff: target + (delta * multiplier)
    • blend: pretty much blendshape result if you added as a target using multiplier as weight
    • copyTo: resets to target to the source
  • multiplier — Multiplier value to throw in the mix with the other math
  • space — object,world
  • resultMode
    • new: apply new duplicate of target
    • modify: modify the existing target
    • values: just get the values

I’ll be adding this to a gui with other controls down the road.

Be Sociable, Share!

Comments are closed.


 
Creative Commons License

Categories