• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By Octane_Test
      I am developing a mini golf game in Scenekit. I have applied dynamic physics body to the ball and static physics body to the grass surface and the brick walls show in this image.
      Issue:
      When I apply the force to the ball, the ball’s linear and angular speeds change as shown in the graphs.  The ball’s speeds don’t reduce to zero (so that the ball can stop) but remains constant after certain value.
      Ball linear speed graph
      Ball angular speed graph
      Analysis Tests:
      When I increase the values to both the rolling friction and the friction, the ball speed is reduced quickly but remains constant after certain value (similar to the above graphs). When I increase the values of the linear damping and the angular damping, the ball speed behavior is same as the point #1. When I set the gravity value to -9.8 m/s2, the ball’s linear speed remains constant after 0.1 m/s. If I reduce the gravity value to -5 m/s2, the ball’s linear speed remains constant after 0.05 m/s. The friction, linear friction, linear damping and angular damping are same throughout the motion of the ball.
      There is 1 millimeter overlapping between the ball and the surface of the golf course.
      Questions:
      From the analysis test #3, I think the gravity is causing the constant ball speed issue. Is my assumption correct? If yes, how can I fix the issue? I can’t remove the gravity field as without the gravity field the ball will not roll along the grass and it will slide. Why the friction and the damping properties are not affecting the ball speed after certain value?
      Are there any other physics properties can cause such issue?
      From the analysis test #5, are there any chances that the ball is receiving upward push to correct the position of the ball?
      Solutions:
      If I increase the physics timestep from 60 FPS to 200 FPS, the issue is resolved. I am not able to understand how this change can fix this issue? After reducing the gravity value to -1 m/s2 and physics simulation speed to 4 (4 times fast physics simulation), the issue is fixed. Again, I am not able to understand how this change fix the issue? I would appreciate any suggestions and thoughts on this topic. Thank you.
    • By Sandman Academy
      Downloadable at:
      https://virva.itch.io/sandman-academy
      https://gamejolt.com/games/sandmanacademy/329088
      https://www.indiexpo.net/en/games/sandman-academy
      https://www.gamefront.com/@sandmanacademy
      http://www.indiedb.com/games/sandman-academy
    • By Sandman Academy
      Downloadable at:
      https://virva.itch.io/sandman-academy
      https://gamejolt.com/games/sandmanacademy/329088
      https://www.indiexpo.net/en/games/sandman-academy
      https://www.gamefront.com/@sandmanacademy
      http://www.indiedb.com/games/sandman-academy
    • By Sandman Academy
      Downloadable at:
      https://virva.itch.io/sandman-academy
      https://gamejolt.com/games/sandmanacademy/329088
      https://www.indiexpo.net/en/games/sandman-academy
      https://www.gamefront.com/@sandmanacademy
      http://www.indiedb.com/games/sandman-academy
    • By Sandman Academy
      Downloadable at:
      https://virva.itch.io/sandman-academy
      https://gamejolt.com/games/sandmanacademy/329088
      https://www.indiexpo.net/en/games/sandman-academy
      https://www.gamefront.com/@sandmanacademy
      http://www.indiedb.com/games/sandman-academy
  • Advertisement
  • Advertisement

Recommended Posts

Posted (edited)

So I have probably common question but somehow I got stuck and need a little help.

I managed to glue together skinned character animation player in C++/OpenGL (though it really does not matter). As an input I use MD5 (3d models from Doom) and Spine2d (2d animations in JSON). Everything works like a charm, with full blend tree support, skeleton deforming on GPU by supplied positions and quaternions, just like mama tough us with MD5. 

The problem started when I tried to add a proper animation from root bone:

To make blending between 2 animations a bit better, I had to remove the root bone rotation and position so the bones will "morph" more locally - otherwise If I mix animations '90 degree rotating' with 'standing still' the bones would be placed in bad positions. This is because positions are lerped, so they move on straight line. At the end of animation I just add the root bone to the whole skeleton and everything looks fine. This also served as a base to object moving.

As we all know, after the walk cycle such animation will pop to the start position. Unfortunately, to make object move, I  can't just add the animation delta at the end of the cycle. This is because if I change the animation weight, the end position will get weighted too. I just checked the Doom3 source code and it looks like they are storing animation delta of the full step, but maybe it is for evaluating where the animation will end up (AI and such). 

For now I assumed that I just need position. I store the root bone position before the frame time update as some additional old_root_bone joint. Than I pass this old_root_bone with all other bone positions (including the root bone itself) and when I'm ready to draw I can extract the difference in step and add it to the character position. It works.

Some minor thing to figure out is if I should take into consideration the Bind Pose of the root bone and add it somewhere.

The problem is that I have no clue what to do with the rotation. I have noticed, that some animations (I 'borrowed' animations from Batman Arkham series, as those are well suited for full character animation) rotate root bone as they please - for example in running animation the character is leaning forward - and if I rotate the model by difference in animations - I end up with character moving like hamster in the wheel.

 

So after this wall of text my questions are:

1. Am I doing the moving character from the root bone correctly?

2. Is this a common thing to ignore rotation and do it somehow manually in script? Eventually I can extract only single axis animation and use this, but I have no idea if that is a proper choice.

3. What are common practices for this kind of animations?

 

I'm attaching a short movie how the things look like. The 3 buttons below are:

- node stand/walk/run - anim weight

- node stand/rotate90/rotate180 - anim weight

- cross between the above 2 nodes (actually it is the weight of the turning node, but it is the same thing in this case)

 

BatWalk0001.mp4

BatWalkImg.png

Edited by Kundelstein

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Advertisement