werner.poetzelberger Posted July 3, 2013 Posted July 3, 2013 Hello, without too much background information ... Can someone identify this issue? We had it on several Characters until now, appearing differently. It appears to be something basic? Is it wrong skinning or export/material? Thx. werner
binstream Posted July 3, 2013 Posted July 3, 2013 Could you please provide us a model (both .smesh and original source file)?
werner.poetzelberger Posted July 4, 2013 Author Posted July 4, 2013 Hello binstream, here I provide the bindpose.smesh, one animation file, the .fbx file and the .max file (3dsmax 2014). Generally we have seen a similar effect of a messed skinned mesh with some of our export- tests. Particular, this you see in the image, happens over time. We are playing animations over a pretty long time. Mainly walks. The mesh starts to distort and the distortion grows over time. (Surely 5 - 10 minutes after start, the effect is definitely visible) The effect is bound to a certain direction as well and keeps distorting in this direction. We will also prepare a small sample world. Thx. Werner files.rar
helmut.bressler Posted July 4, 2013 Posted July 4, 2013 Hello, we were preparing an example world and world script showing our skinning problem. But it seems that turning on dual quaternion skinning solves the problem. In our animation system the position of the ObjectSkinnedMesh stays almost at the origin, a bone is transformed in order to move the character.Could this technique lead to a precision problem?I noticed that the mesh seems to be less distorted when the character is close to the origin. cheers Helmut
binstream Posted July 5, 2013 Posted July 5, 2013 It could be a precision problem, what is your world scale?
werner.poetzelberger Posted July 5, 2013 Author Posted July 5, 2013 The distance the characters are moving (away from its origin - pivot) is around 2000 units at maximum. The model and skeleton has been scaled down by factor 0.01 b.w.
ulf.schroeter Posted July 5, 2013 Posted July 5, 2013 You are wasting floating point precision. Don't scale down the models and also use the Node for world positioning instead as root skeleton bone
helmut.bressler Posted July 9, 2013 Posted July 9, 2013 This model is just for testing, the final models will have the proper size, which should help. I'm not sure that I would get a better precision from using the node for positioning because the bone matrix and the node matrix are multiplied anyway I think. In my case I have to use the bone matrix because I have non in place animations (the pivot does not move with the character) and I want to blend them, although I could split it up and do the positioning roughly with the node transformation and leave only a small offset for the bone matrices. However, since I have turned on the dual quaternion skinning the problem didn't appear anymore. cheers, Helmut
Guest slice3d Posted July 10, 2013 Posted July 10, 2013 Never mess up character movement animations and cutscenes together - this is a wrong decision for your content pipeline. Characters must be animated in place, exported, and then controlled in runtime via the node transformation (I recommend you to use Tracker for that) and with the help of a skinner. Increasing quaternion precision to fix your problem is not a solution - it's just a hack.
werner.poetzelberger Posted July 10, 2013 Author Posted July 10, 2013 Never mess up character movement animations and cutscenes together - this is a wrong decision for your content pipeline. Characters must be animated in place, exported, and then controlled in runtime via the node transformation (I recommend you to use Tracker for that) and with the help of a skinner. Increasing quaternion precision to fix your problem is not a solution - it's just a hack. Can you please argue further on that. Animating Characters in place is not an option for us, as it has one huge disadvantage: Sliding. We are doing an artproject, which must not show these kind of 'typical' gaming behaviors. Thats why we are using the transformation of the bones for the movement on the ground. (Btw. look at the MecAnim system in Unity3d ---> they are picking up this topic as well). Also, our animations all derive from Motion Capture, so we have very good data, and we want to use them in best manner. The blending and the positioning of the animations work very well. Tracker is a nice method, if you are dealing with systems like ' A character' which has behaviors. Our gamelogic is pre calculated as it has pathfinding, gamelogic and animation logic. Increasing quaternion precision to fix your problem is not a solution - it's just a hack. Can you please explain this in more detail. It worked out to be a solution. Shouldnt we do this? Are there disadvantages? Cheers Werner
Guest slice3d Posted July 12, 2013 Posted July 12, 2013 Oh, I thought you are working on some kind of a game/simulation project. I'm currently preparing an example based on your content, demonstrating how you can achive desired result without using double quaternions.
Guest slice3d Posted July 12, 2013 Posted July 12, 2013 >Our gamelogic is pre calculated as it has pathfinding, gamelogic and animation logic. I'm sorry, but I don't get it. As far as I know, using double quaternions for animated models definitely require more calculations. It can affect performance if you will use it on big amount of skinned characters (especially if they have complex skeletons with a lot of different bones). This feature (enabling dual quaternions) designed to help you in situations where you want to fix bone twisting problems and should be used only in case you have them (open Objects sample > skinned_04 demo scene, and see what happens when you enables/disables render_use_dual_quaternions). Ok, there are two ways to resolve your problems without enabling double quaternions. The first one does not require any asset modifications, but it is also a hacky solution (fits only if you have some hundreds character animations already). The second one is to modify your animations. Both of these methods will resolve precision and foot sliding problems, but I recommend you to use second one, which I will prepare for you later. Example of a first method you can find in attachment to my message. data.zip
helmut.bressler Posted July 15, 2013 Posted July 15, 2013 Dear slice3d, thank you for sharing this example, this first solution you have implemented there is also what I'm trying to do. I think I have it working without blending and from a quick test I can say that it looks very promissing without using the dual quaternions. Why do you call it a 'hacky' solution? It seems a perfectly clean approach to me :-) Performance could be actually really become an issue for us, we have 39 characters, and in a certain moment all of them are visible. Plus it is very likely that we have to blend two whole skeletons per character. cheers, Helmut
Guest slice3d Posted July 16, 2013 Posted July 16, 2013 Hey, guys! Here's second example showing you how this should be done and how this should work. No render_use_dual_quaternions, no expensive setBoneChildsTransform calls each frame. Just correct assets and simple linear node movement. No foot sliding here, now you are able to easily manipulate character movement speed at runtime and this should perfectly work with blending. Profit! Now you see why I'm calling all previous solutions 'hacky'? :) Best regards, Vyacheslav. example2.zip
werner.poetzelberger Posted July 17, 2013 Author Posted July 17, 2013 Hello Slice3d, thank you for this. i am wondering how this would work with more complex animations like walking curves, turns, sitdowns etc. without heavy post animation work and calculation of motion paths for the various clips. Our game 'knows' all the animations before they are played, as it is a long list of animation, assembled in advance following a path finding logic. There is no input interaction and there are no interactive events happening. Simple said, we are doing a huge 3d-animation player. If there are any ideas to optimize it, we are definitely happy to hear that. Thx and Cheers. Werner
Guest slice3d Posted July 17, 2013 Posted July 17, 2013 Hello, Werner! It is hard to say without seeing your complete project. I can only recommend you to: 1. Build all your 'actors' as game characters which can perform all required animations based on some input parameters (state, movement direction, speed, etc.). Use animation blend trees for that (see Skinner example from our SDK). 2. If all your character movements are predefined - there's no need to use dynamic path finding logic. Just create spline paths for them in 3ds max and export as Transformation (should then be imported as WorldTransform object in our engine). 3. Start character movement by following those predefined spline paths or control it with any path finding logic. Anyway, if you are worried about performance - you should build your character animation system as I showed you in my second example. Best regards, Vyacheslav
helmut.bressler Posted July 17, 2013 Posted July 17, 2013 I think the term 'game' is here misleading. We are working on an art project. In our project the characters are performing a 'game' on their own, but there is no user interaction. There is an AI running asynchronously in the backround which is ahead of the real time, providing all characters with animation lists. Our goal is to make the character movement as natural as possible, therefore we prefer long animations as repition is less visible when repeating the same animation several times. Thanks for you example Slice3d, it indeed works great, but as far as I understand it would require something like a in-place rotation, which we want to avoid. Instead we would like to use big curve walks (so a rotation + translation within an animation) cheers Helmut EDIT: I forgot to mention that precalculation would be definitely nice but is not possible due to the amount of data we would get. The animation lists for a single character will be for about 2 days. Also there is a variation within the game resulting from different initial conditions.
steve.brodie Posted July 19, 2013 Posted July 19, 2013 Hi Vyacheslav We are keen to do something similar to this. 1. Build all your 'actors' as game characters which can perform all required animations based on some input parameters (state, movement direction, speed, etc.). Use animation blend trees for that (see Skinner example from our SDK). 2. If all your character movements are predefined - there's no need to use dynamic path finding logic. Just create spline paths for them in 3ds max and export as Transformation (should then be imported as WorldTransform object in our engine). 3. Start character movement by following those predefined spline paths or control it with any path finding logic. Is it possible using this system to blend to different animations along the spline path, for instance walking, stop and traffic light idle, cross road, stand on elevator, walk through door and then sit down? Could this be done via tracker? It would be great if it could be blended in tracker somehow. Our other option is to create a plugin for axyz An(i)ma character motion system. Im talking to axyz about it at the moment. Steve
Guest slice3d Posted July 19, 2013 Posted July 19, 2013 Hi Steve, Character animation logic should be divided in two parts. First part - AI logic. It determines new position for your character node in the current frame (sets new transformation matrix), calculates and passes to the second part parameters such as: current movement speed, torso and legs directions (relatively to the node local coordinate system), head look target point, current state (idle, walk, sit, stand on elevator, traffic light idle, etc.), etc. Second part - is a blend tree. It gets all input parameters and performs animation blending based on these parameters (sets corresponding animations, determines speeds and weights for them). First part (AI logic) should be made by programmers. Second part (blend tree) should be made by technical animators and animators with the help of our Skinner system and any animation software (3DS MAX, Maya, Motion Builder). Or yes, you can use other middleware solutions for the crowd animation if you wish. Tracker shouldn't and can't be used for that - it is intended for other type of tasks.
Recommended Posts