Jump to content

animation controller


photo

Recommended Posts

Hello,

we have a question about the future of the Unigine with regard to designing animation controller and providing visual system to tune it. At the moment, we generate our animation controller using third party state machine software and convert this automatically into the c++ that we then use in Unigine. We are not very satisfied with this solution, as it is difficult to implement animation blending in such a framework and also finetuning constants within is a huge pain.

In light of all this, we would be interested in your view and grateful for your comments on how would you approach animation controller design and tuning in Unigine? Do you think that the new "schemer" that you demoed for material mixing could be useful for this? Q1 2021 2.14 promises new animation system. Could you elaborate on this a bit more, so we can adjust our plans accordingly?

Thanks a lot for your input!

  • Like 7
Link to comment
  • 1 month later...

Hi Jirka,

Thank you for the waiting.

We are currently focusing on internal API improvements that would (in theory) implement a proper state machine or some kind of Schemer analogue in the future. So, some quality of life changes are coming (but I'm not quite sure about the exact date).

Here is the current state of research:

image.png

And result (WIP):

Your feedback is always welcome :)

  • Like 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Hi,

i check your example and i can see that you use point to transition between animations and then lerp special animation.
Also your transition between animations is sharp, i mean that is not smooth.

I will describe how i working with animations.
We using animation controller that origin is from Unity that we convert to FSM state machine, which using created animation block in unigine.

The animations are root motion, this means that bone move mesh in the world. I write support for it, when i get delta position and rotation from root motion bone after animation time set, then reset root motion bone to origin position.
Delta position is used to move BodyRigidPtr, which checking if can move to target position. After check is done i take position of BodyRigidPtr and set it to ObjectMeshSkinnedPtr.

For this logic i have 2 base classes for loop animation and for one time animation.
With them i create classes for blend animations based on angle and vector, also switch by select animation from list.

For example move animation is drive by vector or angle to set max 2 animations, the change of vector/angle is smooth.

The transition between animation states is always smooth. It drive by percent value from source animation frames to compute weight between source and target animation for lerp and set percent value of target animation frames to set start time of target animation. 
Because we want smooth lerp between animations without sharp changed.

For example start move and stop go over this animations:
Transition from "Idle" (loop) to "startWalk" (one time) to "walk" (loop) to "stopWalk" (one time) to "idle" (loop). Each transition have own set of percent value to smooth between them.
                                                                               
Each animation state have X check, that controls if you stay in actual state or you change to another state.                                                                               

For example how much animations, layers and states we use:                                                                                                                                  
Sword and shield controller have count of animations 105, count of layers 135, count of states 65.
Unarmed controller have count of animations 84, count of layers 102, count of states 46.

Result:

Link to comment
54 minutes ago, binstream said:

Can you share your state machine? This will help to make sure that our new animation system will be able to handle setups like this one.

Actually it is not bad idea. But we need to rip it from our client code base to separate project, so it will take some time.

Link to comment
52 minutes ago, demostenes said:

Actually it is not bad idea. But we need to rip it from our client code base to separate project, so it will take some time.

A documentation / scheme screenshot would do as well.

Link to comment

Would you consider to go direction motionmatching?

We have been using some methods for our latest project, but it does not work in realtime like that video.

 

  • Like 1
Link to comment
  • 3 weeks later...
On 2/26/2021 at 2:46 PM, binstream said:

Can you share your state machine? This will help to make sure that our new animation system will be able to handle setups like this one.

It is done, I ve uploaded on your FTP, see PM.

Link to comment
  • 1 year later...
  • 4 months later...

Доброго времени, простите что на русском. Скажите, ведётся сейчас работы над удобным контроллером анимаций, и когда его стоит ждать?

И сразу идея, как по мне гениальная и удобная (ради этого в спешке пишу сюда). Введи возможность смешивания анимаций не только по одной и по обеим осями, но и по трём осям. Зачем?: Удобно будет смешивать положение персонажа - шаг, присядь, лежа - за что будет отвечать 3-я ось. Я по примеру из документации делаю в 3-х осях и это удобно. Оси XY - отвечают идентичное положение с ввода WASD, а Z - тип движения.

Link to comment
  • 3 months later...
On 2/26/2021 at 5:11 PM, silent said:

image.png

Hey I know this is an old-ish post and sorry if it's a newbie question, but when following your script I get an error at "private Animator animator = null;"

 

image.png

Link to comment
×
×
  • Create New...