News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 325
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 342
Total: 342

Author Topic: blender 2.75a animation import with fbx format  (Read 7918 times)

0 Members and 71 Guests are viewing this topic.

Re: blender 2.75a animation import with fbx format
« Reply #15 on: »
After messing with these all week,  I actually did figure out how to get the animations to work with meshes and rigs imported with Dusho's script.

It took a lot of hand rotating bones along their y normal axis. Like 4 hours worth.

But now I can fix all my clipping issues with my witch class and the run animation!


Re: blender 2.75a animation import with fbx format
« Reply #16 on: »
Great work Vkoslak! But it does sound like a LOT of work. Is this the sort of thing that could be scripted at some point in the future?


Re: blender 2.75a animation import with fbx format
« Reply #17 on: »
I think so.  I'm starting to look at a couple of things.




All the rotations seemed like something programmable. Usually 90 degrees around y, but the feet and pelvis had some extra rotations on x. Either 30 or 20. I can't remember.

I'm also looking into a way to convert the ogre animation files to something blender can use.  The funny thing is, my google searching lead me back to here to this post:  http://torchmodders.com/forums/tips-tools/dusho's-torchlight-mesh-viewer/

I've downloaded the source code, and its in C#. I program in C# for a living so that's a good start.  My idea is to basically add export animation functionality to put it in bvh or some other format that blender can understand.

Otherwise, I could take Dusho's plugin for blender and copy bits of it to load skeleton files, and then add on to it to import the key frames with translations as well.

Having that run animation in blender helped a lot. I spent quite a bit of time yesterday just cleaning up meshes I had already done. They were worse than I had thought. Especially my heavy plate set. I think I spent more time on it than the rest of the armors combined, and its my least favorite. It just looks boring to me.



Anyhow, I'll keep at it with trying to get all the animations working. I'll figure it out eventually. I just need to concentrate on it a bit.

Re: blender 2.75a animation import with fbx format
« Reply #18 on: »
Is that image your redo of the heavy plate set? That isnt boring at all, its extremely cool!

Im afraid we can only compensate your hard work (and time away from family) with our gratitude and being awe-stricken  :D

can i ask u what u think about full capes? Would they be tough to implement in either TL?  I know lots of ppl would be interested in that.


Re: blender 2.75a animation import with fbx format
« Reply #19 on: »
Capes shouldn't be bad at all if we can add the bones. I have an idea on how to animate it using some of blenders physics to make targets for the bones.

I actually managed to add one for an early mesh when I was just modding the vanquisher.  I basically took the skirt mesh, and moved it up to the back, and then rotated it so it was sticking out at nearly parallel to the ground. I left it weighted to the skirt bones. It kinda worked.

So far I have worked out with python and the blender api how to loop over each bone in pose mode, rotate it 90 degrees on y, and then go to the next frame. I'm now working on actually having it insert the keyframe for visual rotation. Also, not all the bones should be rotated. Like root and Bip01.  The blender api docs are as bad as MSDN. They are technically correct, but not all that useful.

Re: blender 2.75a animation import with fbx format
« Reply #20 on: »
The blender api docs are as bad as MSDN. They are technically correct, but not all that useful.
Haha! They probably didn't get any help from actual users (as in just users, not the app devs).


Re: blender 2.75a animation import with fbx format
« Reply #21 on: »
Ok, progress!

I have a python script that will copy the animations from the imported fbx file and apply it to the rigs created by Dusho's script fixing the rotations along the way.

I attached what I've done so far.  It needs some cleanup. The developer in me says it's not good enough :)   I just wanted to share in case someone else wanted to play with it.  I tried to comment the different functions I use.  I've only tested it with the idle animation at this point. The feet are doing some weird wiggle thing  ??? in the idle animation, but they are doing that just with copy rotations turned on before I apply any rotation fixes.  There is a decent amount of learning curve to this stuff.  All the hidden structs that are just plain wrong in the documentation. Once I get the script to a better place, I'll probably put it on github. All the cool kids are doing it...

Re: blender 2.75a animation import with fbx format
« Reply #22 on: »
Thanks mucho for this Vkoslak! Any chance of getting a readme to go along with this, for the less script-savvy? :P


Re: blender 2.75a animation import with fbx format
« Reply #23 on: »
Heya, Vkoslak.

Can you explain how to export to the FBX-format from 3ds max? Is there any nuances?

Re: blender 2.75a animation import with fbx format
« Reply #24 on: »
It's been a while since I've looked at it.  I'm finishing up some work, then I'll see what I can put together.

Re: blender 2.75a animation import with fbx format
« Reply #25 on: »
Ok, here you go.



Open the file you want to convert.



Once it loads, it should look like the screenshot.  Verify that its the animation/mesh you want.
I get a bunch of errors about missing textures.  I ignore them.



Find the export menu.



Export as an FBX.




Make sure the animation checkbox is selected.  I think I left everything else alone. 

Click OK.

It processes for a little bit, and then I get a warning about "By Object not supported".  I ignore this too.

Now I have an fbx.


The importing is a little more "fun".




These are the settings I use for importing.  I check the "Ignore Leaf Bones" and "Automatic Bone Orientation".



There! Perfect! 

Ok, it looks like a bad transporter accident.  We need Mr. Scott to fix it.



Go to a side view and select one of the meshes.  I picked "m_HumM_Nude" since it's the base mesh.


Now isolate it by pressing the "/" key.  Then be sure that you are in ortho mode not perspective.

Rotate the mesh -90 degrees.



Bam!


Now do a "CTRL-A" and select "Rotation".

I set my "end frame" to "35" and hit play to watch the animation.


Now press "/" to unhide all the other meshes. Pick another one to rotate and repeat.

Hopefully that helps.




I should add, that If you want to build out an animation library,  start with the base A-pose or T-Pose.
Then when you import the fbx files for the animations, delete the meshes attached to them.  You only need one set of meshes right?
Then hide the bones from the animations.  You should then be able to select your base bones, bring up the "dope sheet", switch it to "action editor" and select the animations from the other bones.  That might be worth a video tutorial though.


« Last Edit: March 17, 2016, 08:25:17 pm by Vkoslak »

Re: blender 2.75a animation import with fbx format
« Reply #26 on: »
Thanks Vkoslak.  :) Your guide is very detailed.

I want to try import some monster with animation.(Import .mesh in 3ds max - Export in .fbx - Import in Blender)
« Last Edit: March 17, 2016, 09:19:06 pm by Kva3imoda »

Re: blender 2.75a animation import with fbx format
« Reply #27 on: »
Hey @Vkoslak may i have your permission to transcribe your tut to the Torchmodders wiki?


Re: blender 2.75a animation import with fbx format
« Reply #28 on: »
Sure.

Re: blender 2.75a animation import with fbx format
« Reply #29 on: »
And it's done :P

May I ask; the reason for the interest in .FBX format is because it's easier to import/export .FBX to/from Blender?


 

Recent Topics+-