Giter Club home page Giter Club logo

Comments (8)

ammaraskar avatar ammaraskar commented on September 17, 2024 2

Getting close now, I added a little animation viewer to the SimsAnimationTest scene. A lot of stuff plays properly but the head look-at IK and spine position still need work.

AnimationsDemo.webm

from opents2.

ammaraskar avatar ammaraskar commented on September 17, 2024

Animations for sims work too, but without the IK they look a little whacky. Notice how straight the arms are here:

Drowning.webm

from opents2.

ammaraskar avatar ammaraskar commented on September 17, 2024

As of becb981 we now have good foot IK. The boxes are supposed to be the goal-IK positions from the animation

DrowningWithIK.webm

and

StairWalkUpWithFullik.webm

The arm IK still needs work, it seems to be a little more complicated. They appear to use a 1 float channel, this is the IkWeight portion of the IKTarget that controls how much weight the IK has.

from opents2.

ammaraskar avatar ammaraskar commented on September 17, 2024
Punching.webm

Arm IK seems to be working now! Turns out l_handcontrol0 and r_handcontrol0 were parented to the root_trans of the skeleton in the scenegraph despite being animated in absolute positions...

We still have to handle IkWeight to handle arms properly in some animations.

from opents2.

LazyDuchess avatar LazyDuchess commented on September 17, 2024

even with the wonky rotations this is still insanely impressive. can definitely see some of that wonkiness in the arms and legs there but overall it's really coming together

from opents2.

ammaraskar avatar ammaraskar commented on September 17, 2024

The next issue seems to be related to the headingOffset parameter. Some animations like a2o-exerciseMachine-benchPress-start_anim have really weird looking data.

For reference this is the original animation in game:

InGameBenchPressWithAnimationDebug.webm

This is what it looks like in unity if we just use the raw data:

RawUnityBenchPress.webm

image


The way to make it look kinda normal is to set the root_rot's z rotation values zero and add 89.95 to the x rotation values. The heading offset for the clip is -1.570 radians, which is -89.95 degrees.

UnityBenchPressKindaWorking.webm

image

from opents2.

ammaraskar avatar ammaraskar commented on September 17, 2024

Welp that was a stupid bug. Turns out the order of rotations when converting from euler rotations in sims2 is different from unity. Now a lot more animations play properly with 380b83a

UnityBenchPressWorking.webm

from opents2.

ammaraskar avatar ammaraskar commented on September 17, 2024

Just documenting this here but LazyDuchess pointed out that face blends seem to also be working, they're just hard to see without any texture:

uqYtnPj.mp4

Next up is head look-at IK and then all this code should be moved to an animation controller so different animations can be blended but this is basically done.

from opents2.

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.