14

As far as I know, this is because the humans centre of mass is near the pelvis. This is just a convention, but almost everyone does it. But it makes sense to choose a point that is at the middle (not a foot for example) and doesn't move too much. Let's say you choose the foot as root. If you want to do a walk animation, you'll move the foot and everything ...


9

The problem was one of numerical stability. Approx 30 hours of work on this over the course of 2 months, only to figure out I was doing it right from the very start. When I ortho-normalized the rotation matrices before plugging them into the retarget code, the simple solution of multiplying source * inverse(target) worked perfectly. Of course, there's a lot ...


8

You could precalculate a bounding box in bone local space for each bone, using just the vertices that have a non-zero weight for that bone. At runtime, transform each of these boxes to world space using the bone matrices for the current pose, then calculate an AABB that encloses all of the bone boxes. The AABB calculated this way will likely be a bit ...


6

First, it depends on the purpose of the bounding volume. Normally, bounding volume is used for culling (view frustum culling, occlusion culling, etc.). As you do skinning on GPU, you have already rendered the model before generating the bounding volume for culling. Therefore, you should compute the conservative bounding volume as tight as possible on CPU. ...


6

This will work if all you're concerned about is the translation part of each bone, but it is more common to represent your bone structure as a transformation matrix tree, which is probably the most popular way to do Forward Kinematics. Define a Node as follows: class Node { Transform localTransform; Node parent; List<Node> children; /...


6

To get a transformation matrix equivalent to the one you have, but reflected across a major axis you can compose it (multiply it by) a reflection matrix. That is, if you have your input matrix M and you multiply by a matrix N that has the reflection. To create the reflection matrix based on the major axis, you take the identity matrix and flip signs ...


5

Keep in mind I had this problem over 2 years ago and I have since moved onto Unity 3D. This is more of a conclusion than a solution. The main problem was that moving the bones did not move the mesh. I used Cinema 4D to model and rig the model and exported as fbx. There are many fbx export options in C4D and I tried many variants with no success. Here are ...


5

Most 3D animation/modelling programs support BVH file format for motion captured skeletal animations. There is free BVH database at https://sites.google.com/a/cgspeed.com/cgspeed/motion-capture/cmu-bvh-conversion and you can quickly test the downloaded animation at http://www.akjava.com/demo/bvhplayer/


5

If you were using assimp's implementation (AssimpViewer source) as reference, then you probably too missed the fact that Assimp's and glm use reverse matrix multiplication order. To clarify, we are talking about matrix-matrix multiplication, and the order is reverse relative to each other And we know that matrix multiplication is not commutative. So the ...


4

Any physics engine can do (at least) half the work for you. The effect you're seeing is achieved by blending ragdoll physics with explicit animations. You can do this by having animations apply forces to bones and letting physics do the work for you. I haven't implemented this myself so I'm not 100% sure on the technique, but there's some articles out ...


4

Loop Pose: Enable to make the motion loop seamlessly. It keeps looping the pose. Meaning, that you have same pose at begin frame and end frame.


4

I don't have an Android dev environment setup, but this looks like basic linear algebra. Try this: Matrix moveLeg = new Matrix(); moveLeg.postTranslate(-legCX,-legCY); moveLeg.postRotate(legRot); moveLeg.postTranslate(legCX,legCY); .. and another: int shinCX = legCX; int shinCY = legCY + thighLength; Matrix moveShin = new Matrix() m.postTranslate(-shinCX,...


4

I'd expect that they are no costlier than a standard bone to most game engines. The way animations are normally exported is by storing the transform of each bone for every frame of animation (with some optimizations to save on storage space). The standard skinned animation limitations in game engines tend to be: A maximum of four bones influence each ...


4

If you want your character's look to change uniformly (i.e. at any time, all sprites are at the same point of transition between states), the simplest way I can think of is to create them as separate skins in Spine. The Unity runtime tfor Spine then lets you render the skeleton with either skin, so you can control the transparency by rendering each skin once,...


4

OK, after much button mashing, I figured it out: If you click on your main FBX object, in the inspector you will find 3 buttons at the top. The ones we care about are Rig and Animations. If you go to Rig and drop down the "Root node" selector, then choose your root bone, it will open up some more options under the Animations button. Go back to the ...


4

Small clipping errors are almost impossible to avoid when developing games, as self collision with large amounts of animated characters are very costly to calculate. If you need (almost) perfect animations for cutscenes, animate each character on its own. But when you are animating for realtime, you should not worry about minor errors, as these are barely ...


4

Note that this is the 38th tutorial in a series. If you go back to part 22, you can see m_Entries is defined as follows: The m_Entries member of the Mesh class is a vector of the MeshEntry struct where each structure corresponds to one mesh structure in the aiScene object. That structure contains the vertex buffer, index buffer and the index of the ...


4

A technique which comes around again and again for decades is raytracing. While usual 3d engines are based on taking a bunch of vertices in 3d space and see where they end up if transformed to 2d space through a projection matrix, raytracing engines simulate a ray of light from each screen-pixel into the scene and see where it hits a surface. Raytracing ...


4

To throw out one other possibility, we can define a scene in terms of a signed distance field and raymarch against that. Many demoscene creations use this technique to create highly detailed scenes on a minuscule data budget, letting the mathematical formulae do the heavy lifting. This scene, from a demo called rgba slisesix was created by Íñigo Quilez, one ...


3

Are you sure the Blender screenshot was taken with the armature relaxed (ALT-R to relax the armature). Also make sure you're not in pose mode but rather in object mode when looking at your mesh's position in Blender, to see how it will look when imported in Unity. Finally, apply all transforms to object before exporting to Unity (CTRL-A, then Aplpy Scale, ...


3

The scale computation looks wrong to me. It should be obtained by dividing, not subtracting (with additional checks for divisions by zero), then it should be applied by multiplying (not adding) each column or each row of the final rotation matrix (not just the diagonal term). If you're fluent in C# you probably have realised that the code is very poor ...


3

Looking at your screenshot I'd say you need to transpose your bone matrices, that should fix your problem.


3

It should also be noted that I'm working in openGL, so any matrix transposes that might need to be applied should be considered. Maybe that's the key, have you tried negating some Z-coordinates around to convert from DirectX left-handed coordinates to OpenGL right-handed ones? You could negate all Zs before applying your transformations, and re-negate when ...


3

There is actually a doll for exactly this purpose: It appears to be under development by SoftEther Corporation. However, I imagine such a solution might be overkill. An alternative would be to use a GI Joe for your modeling. Record video of your GI Joe manipulations from the front, side and top. Using these synced videos, you can go frame by frame ...


3

You can still have the same single mesh just with different bones matrices (prepared for different animation frames of meshes instances) and do the transformations in shader. For that you need to decouple mesh from animated bones. So that you can still redraw same mesh several times, just changing the meshes position AND bones matrices between drawcalls. ...


3

I have founded the solution: https://www.youtube.com/watch?v=xf0VD4ba4ns In this video's desc link shows a file that I used to the new code wich is working


3

Ok i found the problem. It came down to my misconception of when to call glBindAttribLocation. Changes made with glBindAttribLocation will only take effect after calling glLinkProgram. It hadn't been a problem before but in this particular case it got me. For those on the same rocky path as me i found that the shadows of my animated models were scaled wrong....


3

All of my issues boiled down to misusing the model's index array. At first I purposely avoided using the model's indices because I wanted to have per vertex normals rather than per face normals. However, I completely forgot that the vertex list may not correspond to the correct rendering order, which lead to the results in my opening post. On my way to ...


3

You should not multiply by delta time here: float newRotation = verticalMovement * m_AimAmount * m_DeltaTime; Multiplication by delta time is useful when you're accumulating an incremental movement each frame, so the total movement builds at a consistent rate even if your frames are uneven durations. But that's not what you're doing here. Here, every ...


Only top voted, non community-wiki answers of a minimum length are eligible