Mesh/skeleton bending oddly in game

Problems building or running the engine, queries about how to use features etc.
Post Reply
Unnuuk
Gnoblar
Posts: 1
Joined: Wed Feb 03, 2016 6:51 am

Mesh/skeleton bending oddly in game

Post by Unnuuk »

I'm redoing the animations for a game using blender, the files were originally .skeleton files from an Ogre based game.
Anyways, the animations are appearing differently in game than they are in blender. In game, it likes to make some of the bones bend sharply, but with other bones it turns the bend into an arch. The tail also bends oddly.
With the original game animations, none of these problems occur.

Is there any way to fix this?

Example 1:
(In Blender)
Image

(In Game)
Image

(Default Animations)
Image

Example 2:
(In Blender)
Image

(In Game)
Image

(Default Animations)
Image
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Mesh/skeleton bending oddly in game

Post by c6burns »

The only thing I can think is that you have more bone weights per vertex in Blender than the game supports.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Mesh/skeleton bending oddly in game

Post by dark_sylinc »

There's five possible explanations (they're not mutually exclusive):
  • There is a Subsurf modifier and it happens after the Armature. The Armature needs to happen first, before the Subsurf.
  • You have vertices with more than 4 weights. (or if you're using your own shaders in Ogre 1.x, your vertex shader is handling less weights per vertex than what the mesh requires).
  • The model or armature you're exporting has an arbitrary transform. First apply the transforms (Ctrl+A) before exporting.
  • The Blender version is using shape keys, thus displacing vertices from their original location.
  • You're scaling the bones. In Ogre 1.x scale was uniform (while Blender was non-uniform). There was a recent patch that allows a change in this behavior. You would need to build Ogre 1.10 from repository and enabled OGRE_CONFIG_NODE_INHERIT_TRANSFORM in CMake
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: Mesh/skeleton bending oddly in game

Post by duststorm »

Another possibility:
  • different skinning techniques are used: blender might be using dual quaternion while Ogre was using linear blend skinning? Or the other way around.
It's also possible that either Blender or Ogre have more advanced skinning techniques by now than dual quats.
Developer @ MakeHuman.org
Post Reply