Giter Site home page Giter Site logo

Correctives? about simplex HOT 9 CLOSED

illmillrig avatar illmillrig commented on August 23, 2024
Correctives?

from simplex.

Comments (9)

tbttfox avatar tbttfox commented on August 23, 2024

Correctives have (so far) been handled by scripts not associated with simplex. To the solver, a corrective is just another shape. It's just a shape that happens to interact with other deformations.
It is, however, something I've meant to add to the extra tools, but I've never gotten around to it. Mostly because we have scripts to do it, the scripts we have are XSI specific, and I personally haven't put much work into consolidating the toolset for XSI.

from simplex.

tbttfox avatar tbttfox commented on August 23, 2024

That said, there's a really neat way of building correctives over top of a smooth skin (so long as it's only smooth skin).
First, pose the character, and store the points.
Then you add a deformation of 1 unit in X to each point before the skin, store the result, and undo.
Then add a deformation of 1 unit in Y, store that, undo, Z, store that, undo.
You end up with Pose, 1X*Pose, 1Y*Pose, 1Z*Pose. Subtract the Pose from the 3 with unit deforms and you get 3 sets of vectors. Along with the original pose, you can use them to directly construct a matrix per point. Then just invert those matrices out from under each of your shape's points to give you the corrective deltas.

from simplex.

illmillrig avatar illmillrig commented on August 23, 2024

lol, I had to read it a few times, but I get it. That's really, really cool. Cheers!

from simplex.

illmillrig avatar illmillrig commented on August 23, 2024

okay, quick question about this. the vectors that are being created from subtracting the pose from the 3 vectors; 1XPose, 1YPose, 1Z*Pose, are those being normalized? is that what you mean by "with unit deforms"? or does the resulting matrix at each point need unnormalized vectors for the first 3 rows?

from simplex.

tbttfox avatar tbttfox commented on August 23, 2024

Oh, I only said "unit vectors" because the xform added before the skin was 1 unit.
The vectors you get at the end need to stay unnormalized for everything to work properly.

from simplex.

illmillrig avatar illmillrig commented on August 23, 2024

ah gotcha. okay one more thing :)

the shape points that you're then multiplying by those inverted matrices. are those points in worldspace? or are they vectors created from subtracting the skinned points from the shape points?

from simplex.

tbttfox avatar tbttfox commented on August 23, 2024

The idea is you come up with a matrix per deformed point, and then get your shape's point in the space of that matrix. So you're going from the shape's worldspace to the point's local space. Then, you could technically multiply those local space vectors by any per-point matrix to transfer that shape to other shapes. But we're going for that shape in rest-space, and those matrices are just the position offset of each vertex, so you can simplify things and just add the vector to the undeformed point position.

tl;dr You input worldspace points, and get back offset vectors.

from simplex.

illmillrig avatar illmillrig commented on August 23, 2024

ahhhh, okay. that makes sense now. Many Thanks!

from simplex.

illmillrig avatar illmillrig commented on August 23, 2024

rough first draft, but seems to work well enough
https://gist.github.com/illmillrig/e104bb7a48d7c583ed0be1efa30af995

from simplex.

Related Issues (20)

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.