Comments (5)
I think it can be valuable to compute model-space TRS transforms rather than matrices sometime. The use case I was thinking about was dual quaternion skinning, as dual quaternions would be easier/faster to build from TRS transforms. ozz LocalToModelJob makes a good use of SoA quaternion to matrix conversion though, which I think is quite optimal.
Also I have a doubt about the fact that TRS cannot store all transformations, unlike matrices. I wondering if a mirrored or non-uniform scale in local space could create model space transformation incompatible with TRS. What do you think?
You probably know that already but I think local-space is required for blending. For example in model-space you could not animate the upper and lower body with different animations, because transformation on the lower body need to be propagated to the upper body (during local to model-space update). Right?
Also optimisation wise: bones move a lot less in local-space (fingers can remain fix while hand is moving), leading to far better key frame reduction.
I think local-space can be more precise when compressed. Again, in local-space bone translations are usually fixed, thus unaffected by compression.
For your "physic" use case, I don't really know. Using local-space data you could convert rotation to torque, and power physic with that. From physic to animation, you can still compute local transforms back.
Interpolating previous and next frames should work if keyframes are very close, which should be the case with fixed time steps. I would try to avoid sampling animation during your game logic update though, letting animation sampling/blending for rendering (non fixed time steps). If you need to animate things (like events, motion...), you could use tracks (float 1 to 4, quaternion). They can be sampled independently from the animation indeed (that's the design I opted for), and store in local or model-space at will (it's user data anyway).
I'm not sure it helps, don't hesitate to give more details about a specific example.
from ozz-animation.
In the case of the non-uniform scale, you're right. We'll end up with weird animation that differs from the source animation. - As an aside, stretchy rigs generally rely on being able to scale a bone without scaling children. Say for example a squash/stretch spine where you don't want the arms, legs, neck and head to also scale. I wonder if that's a feature we want to look at in the future? Like a bitmask for how a joint inherits from it's parent or something?
In our use case, we use a verlet simulation with constraints to determine the start/end point of each joint in model space. We use the positions and the source animation twist to compute reasonable rotations. In the case where we want this to feed back into the animation blending job, it's probably better to simply convert this back into a local pose. As you said, we can't meaningfully blend in model space anyway.
If you need to animate things (like events, motion...), you could use tracks (float 1 to 4, quaternion). They can be sampled independently from the animation indeed (that's the design I opted for), and store in local or model-space at will (it's user data anyway).
This is actually a good insight into how you intended the system to work. Aside from events and extracted motion, other important game play data being baked out as a separate "slim" animation wasn't something I had considered. I just figured I would sample the whole animation and carry on.
I'll just close this issue now, thanks :)
from ozz-animation.
I'll keep the LocalToModelJobTRS and single bone scaling feature in mind.
You talk about "slim" animations. Just to be sure, you saw ozz tracks already, right? They're small animation indeed ;). I think TriggeringJob brings a bit more than sampling animations though.
from ozz-animation.
I did know about the user tracks. However, I only considered them from the perspective of animating camera params or lighting data. It never occurred to me to generate additional gameplay specific tracks.
The take away from this is that I'll probably extend our engine's animation system to include a separate set of gameplay tracks that can be paired with the normal animation. That also makes it easy to generate low footprint server-side packages for running dedicated servers by just stripping the skeletal part.
from ozz-animation.
Actually, one other note on the inheritance masking. On Sleeping Dogs, we used this heavily to cheaply "retarget" mostly proportionate characters by simply allowing joints to only inherit rotations.
from ozz-animation.
Related Issues (20)
- examples on how to integrate with OpenGL? HOT 2
- What CLI options did you exactly use to create the media/bin/*.ozz animations from FBX files? HOT 4
- Animation Playback HOT 25
- gltf2ozz issue HOT 2
- Trouble getting Skinning to work. HOT 3
- Make a new master release HOT 3
- glTF and FBX skeleton difference HOT 1
- The 'install' -target for make tries to change permissions on existing directories HOT 4
- The 'install' -target places some files in the installation root directory HOT 2
- Feedback/Suggestion: the exclusion of mesh data in ozz tooling makes the library less confortable to use
- Decoupling SamplingJob from file format HOT 2
- Skinning job doesn't preserve tangent handedness HOT 1
- Log adds a dependency on the standard C++ library for runtime HOT 2
- Failed to build on MSYS2 MINGW64 HOT 7
- gltf2ozz is not filtering out non joint nodes HOT 1
- How to define pole vector for two bone IK? HOT 4
- Discover projects using ozz-animation HOT 7
- AnimationOptimizer too eager to early out ? HOT 1
- Can't build samples after adding fbxsdk folder to the FindFbx.make
- 3 bones with first 2 bones not animated producing discrepancy between playback sample and Khronos GLTF reference HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ozz-animation.