I have fbx model exported from 3ds max. I have 3d coordinate that are extracted from a motion capture session. I want to animate the model using these 3d coordinates. after googling I found xna can be used for this purpose.
I found a tutorial on digitalrun that used kinectxna to capture motion and animate .fbx model using xna. but I can't build it because it wants kinect hardware elements.
I found another tutorial here. I am newbie to xna. I faced difficulties to understand that.can someone point me to right tutorial that expalins skeletal animation of .fbx model using xna?
You can start with this example to understand how animation work:
http://xbox.create.msdn.com/en-us/education/catalog/sample/skinned_model
The animation data is contained in the model itself. But you can change some code to work with your 3d coordinates.
Also...
I found a library to animation. XNAnimation Library
P.S. You can find a lot of tutorials and libraries for animation if you search "Skinned Model"
Related
This question already has an answer here:
SceneKit – Animation with DAE file format
(1 answer)
Closed 7 years ago.
I can’t get animations in SceneKit work correct. I’d like to build a beautiful game in 3D but I get stuck with a very simple and basic thing like animation :-(
I saw WWDC 2015 session 606 and was very impressed and start to build my game using sample code from Fox project (https://developer.apple.com/library/ios/samplecode/Fox/Introduction/Intro.html).
Steps I’ve made:
created a cube in 3d tool (Cheetah 3d) and export it in cube.dae
create skeletal animation (just a simple rotation) for cube and export only skeleton without mesh in cubeAnimation.dae
copy cube.dae and cubeAnimation.dae into Xcode project and convert them in cube.scn and cubeAnimation.scn
using Apple sample code (Fox project from WWDC 2015 session 606) add cube.scn on a scene
5. using Apple sample code (Fox project from WWDC 2015 session 606) add cubeAnimation.scn animation to cube.scn
build and run project ––> cube.scn is rotating BUT cube.scn resets it’s initial position to one that is in cubeAnimation.scn
Thinking that my 3d tool (Cheetah 3d) export in Collada with some issues I’ve tried to use models created by other developers but result was the same. I’ve tried to use Autodesk Maya to export animations but result was the same. I even tried to use model from Unreal Engine example (https://wiki.unrealengine.com/File:ThirdPerson_FBX.zip) but result was the same.
I put Xcode project source here https://www.dropbox.com/s/8vtmem4jqnetmwd/XcodeProject.zip?dl=0
I put models and animations source here https://www.dropbox.com/s/qkkbfhk7wrz4r4z/ModelsAndAnimations.zip?dl=0
Maybe there are some special Collada export settings to make animations work correct?
If the animation in cubeAnimation.scn animates matrices, then it is expected that this animation control the position, rotation and scale. If the keyframes contains rotations (euler angles, axis angles or quaternion) then it will rotate the busy without reseting its position.
So this depends on how the exporter exported the animation. (For example I know 3dsmax can export individual animation for translation / rotation /scale until you explicitly ask to "bake transforms").
A workaround is to have your skeleton centered in 0,0,0 in cubeAnimation.scn and use an intermediate node to move your cube in cube.scn
It seems it was my mistake, I didn't include rig in initial model when exporting to .dae. I only include rig in animated model.
I've been working with an animator to help with my game. The animations all work fine using morph targets, but the file size just gets way too large. Skeletal animations are the answer. We've spent a week working to get the animations exported from blender correctly.
After reading many many articles we were able to get basic animations working correctly. I make sure to set the armature to rest pose and export on the first frame and all that, but the more complicated animations are off.
You can see in this example here (click to cycle animations):
http://www.titansoftime.com/beta/animation2.html
My animator said the problems are related to bone constraints using his controllers. He said his technique is called "Inverse Kinematics".
Anyone have any ideas?
I have found the answer. For one you can not scale the geometry in the json loader (however you can scale the mesh object once created).
The main thing is that my animator was using inverse kinematics, which apparently three.js does not play nice with.
I am having an issue in unity. I have an animated model made in blender imported into unity. When the scene starts the model is the correct size and is at 0,0,0. When trying to use a java script to play an animation the model moves about a meter and scales by about half, the animation does play on the small model. The model was made in blender and is not anything out of the ordinary, the animations play in blender with out any issues. It was imported as a blender file not an fbx. Trying to import it as an fbx produced too many issues. The import did not cause any issues but two things of note: the rig was imported with -90x rotation and the animations can only be used as lagacy. The java script is not complicated it is only using "animation.CrossFade( "english_hook" );" or any of the other animations. I have tried to see if anyone else on the internet has seen this issue but either they ave not or I am not searching for the right problem. I am fairly new to unity and have moderate exprience in blender. Has anyone seen this kind of issue, know how to fix it or have any ideas?
Are you using Unity4? You might have to mark your animation as legacy, open your imported model in unity inspector, select "Rig" tab and set your animation to legacy.
I am beginner to medium skills, I can create mesh with many polygons, I need to texture map it, those i can handle, but, how to make it Roll Up and UnRoll (I can handle the keyframe animation - but, i just don't know what to do to make the carpet unroll or rollup. Can be carpet or roll of paper towels, just need to know how to do the effect? There are tutorials how to do it with Cinema 4D or Maya - but, i want to do it on the website within the Three.js framework. Any ideas ???
Or is there a way to export the animation data from, say, Blender or Maya?
Thanks
Maybe this one?
http://mrdoob.github.com/three.js/examples/webgl_animation_cloth.html
Let's search for a tutorial on youtube to create the animation in Blender or in Maya
(e.g.: http://www.youtube.com/watch?v=tN_FZiTbaG0)
Create your animation and export your scene into collada (.dae) format
Use the collada loader "webgl_loader_collada_keyframe.html" example file to run your animation. (Replace "pump.dae" with your just exported animation in the example file.)
you could also try using this as3mod port for three.js to manually "roll" a plane. http://nikos-web-development.netai.net/blog/mod3-a-javascript-port-of-as3mod-for-three-js/
I have experimented with the example COLLADA parser colladaloader.js and imported a skeletal animated collada model "Seymour_anim2.dae" from http://collada.org/owl/browse.php?sess=0&parent=131&expand=0&order=name&curview=0 using mrdoob.github.com/three.js/examples/webgl_loader_collada.html and http://mrdoob.github.com/three.js/examples/webgl_animation_skinning.html as an example. The loader seems to parse and store the skeleton structure and some skeletal animation data either in collada.animations or collada.dae.animations. The problem is that I can't get the skeletal animation to work using the methods in the examples.
Now, I'm wondering is there something wrong with the COLLADA parser, or are there some other methods/tricks in Three.js that could be used to play the skeletal animation of my model? I'd love to hear if you have any ideas how this could be done neatly in Three.js or is this even possible yet.
Edit: I have now also tested the model with GLGE framework and it loads, renders and animates it correctly. However, it would be very good to have skeletal animation for COLLADA model in Three.js because developing with GLGE is too time consuming and troublesome and GLGE is quite inactive project compared to Three.js. Skeletal animations are important for increasing immersion in a virtual world.
I've myself given up on Collada and went on using the included OBJ loader.
But halfway through I've found one thing that might be worth testing out.
There seems to be an alternative Collada loader, here: github ColladaLoader2.coffee
Hopefully it works somewhat better. Please let me know :)