FBX Importer v0.001

Hi, sorry I didn’t get back to you sooner. I’ve been busy.
I’ll try and make some time this week to address the parser issues.

connections should be stores as a list of pairs, each pair has a keyword, in this case - ‘Connect’ and a value - [‘OO’, ‘Model::Lamp’, ‘Model::blend_root’]

Using dictionaries is not ideal IMHO because it means you cant have 2 items with teh same name, or if you do, you have to store in a list of values under the key name {‘Connect’:[…all connect values]}.

I read this a bunch of times and am not exactly sure what you mean, but here is a suggestion:

  1. provide a convenience function for Connections, e.g.
    fbx_parser.get_connections() = [ [‘OO’, ‘Model::Lamp’, ‘Model::blend_root’], …]
  2. store the fbx file in the dictionary using lists of lists.
  3. strive for convenience function contracts, but store everything in the dictionary.
    That is, I may change how Connections are stored in the dictionary, but
    get_connections() will always return a list of connection lists.

If that’s not right, please tell me how you would like to store the data. Essentially,
the connections will be stored as


fbx_dict.[Connections][Connect] = [ ['OO', 'Model::f2_02.R', 'Model::f2_01.R']
        ["OO", "Model::f1_02.R", "Model::f1_01.R" ],
        ["OO", "Model::th_IK.R", "Model::th_str.R"],
        ["OO", "Model::f1_IK.R", "Model::f1_str.R"], ]

If not a dict, then can you provide a data signature that would reveal connection data?
Thank you.

Hello,
I’ve tried to get everything I can into the dictionary. For some reason
cameras appear more than once. Here is a fairly complete dump of the
dictionary in plain text:
http://www.zettix.com/blender/fbx_dump.txt
And the most recent parser is here:
http://www.zettix.com/blender/fbx_import_2007_09_13.py

Takes, for example, should be completely embedded in the dictionary.
I wonder how hard it is to unravel your exporter…:wink:
Cheers.

Hey Zettix, Iv got a number of projects (all blender :wink: ) on at the moment and cant really devote time to this right now.

But I dont want this to die…

My reasoning for not using dict’s is this…

Dictionaries are unordered, FBX if not. in fact some FBX’s depend on tags being in an order.
Dictionaries only allow 1 key for each name, where as FBX can have some tags with the same name… how this is arranged is ambiguous - do you throw them into a list with 1 key as the parent? how is this delt with when there is multiple in 1 case and a single value in another. this is why I prefer to use nested lists, having the first few values being the type and name if available.

You could have worked out a way around this, I only skim read your recent code. but I just dont think the dictionary data structure matches an FBX well.

Thanks. I’m trying to decide whether to use Collada, FBX, or MDD in our art pipeline for an Ogre based game. I mainly used OBJ for non-animated meshes. But now we have some animations in Maya and Max and are trying to get them into Ogre. The FBX exporter contains the data we want because I can see it displayed properly in the Quicktime FBX viewer. The next step would be to load the FBX inside Blender and then export to Ogre. Modo 301 just added FBX support for import/export where I can generate facial morphs which can be loaded into Ogre.

Ideally, all the write statements from your exporter could be converted to read statements and we’d be ready to go.

What kind of $$$ would make this worth your time? (Dangles $50 bucks over paypal)…
Nobody knows your export script like you do, so the conversion should take a couple hours max right?

Here is the test model that I would want to see imported into Blender:
http://www.tagenigma.com/nemesis/FBX%20Walk.FBX

FBX support would need vertex, uvs, locators, and animation transform support.

The development of an FBX importer is very exciting. I would like to be of assistance. We have Maya 8.5 and Modo here at Studio 125. I would love to find ways to work with Blender and Maya side by side more eficiently.
BlendOn!
mthoenes

Hi I wrote an FBX parser. It builds a dict-like interface that preserves order (actually mirrors the dict in a list) and supports multiple values in a key (by calling a .getitem(key, 1) function, then checking if the returned valued is of type FBXMultipleKeyBag, a straight subtype of list; normal dict[key] behaviour just returns the fist item in the key value list if there’s multiple values).

You can find the code at:

http://pastebin.ca/707705

Unfortunately the code is too long to include in the post

Joe

I see it’s foolish to write a parser for a format you know nothing about. :eyebrowlift:
So I spent a little time looking at the exporter and it seems like it would be easier to reverse the exporter than to just organize an ascii config file. I’ll read the exporter more and see if I can’t crack it.

hmm, which of these scripts is best to use for import of plain mesh with uvs? …and textures too…

neither import UV’s at the moment, mine only imports meshes as an example, adding support for more info isnt not THAT hard, somebody needs to pick up development on the blender side, hint hint.
/me runs…

Any progress on this? Is there a working version I can test?

Any news on this script? Would love to make use of it…

The links to the importer script don’t work anymore: any news?
It’s a pretty important script, hope it’s not been abandoned…

it’s really an important script, considering fbx the interchange format autodesk is pushing and is putting in every 3d program they own…

yes, this would be so awesome!

where can i download the latest version?

I also think is very important, in teams and companies working with several tools/artists… Would be really nice.

Sorry if this is not the proper thread to ask BUT…

I teach a 3D animation class oriented at the gaming industry, in Montreal…

Most game companies (here) use 3DS Max, so my animators have to use that!

We are going into a game project mode in september (final session, an integration project following industry’s typical production pipeline)

I hope to use Blender game engine (we are using it now to prototype de Level designs, to playtest them -also good enough physics, Logic Bricks and the fact that we will have very few programmers)

BUT I need to be able to import 3DS Max animations (not only textures and meshes)

Only other choice on horizon (for the game engine) is Panda3D** (staying with Python)

FBX might work but the importer for Blender doesn’t seem to exist…

Any and every comment/suggestion welcomed !!!

** PyOgre doesn’t appear to be easier than Panda3D

Hi guys,

sorry for bumping into a semi-old thread, but all of zettix’s links to his script are dead. Does anyone have a copy of the latest one available that could be uploaded/mirrored somewhere else?

And, are there any news on the development of this script?

regards,
Alvaro

shared interest here…

me working right now for a company(can’t reveal the name) …doing all already in wings/blender… but I prevent they asking soon for working with some of their (3ds Max) assets, specially character animations… it’d rock to be able to import by fbx. Anyway, not to put pressure, things come when they come, is only me bumping as well as I know would be a very valuable adition.

And OT, btw, but…doing almost full project now with latest stable 2.46 , and man, how easy is to see how it’s all being empowered in every field… is really stronger for whole project (loving new features (not really new, but…) in uvmapping field, for example) … Doing some paid stuff, and not having any special show stopper using differnt software than these companies, is really nice… With fbx import, the workflow chain could be totally complete, with these kind of houses…

Afe, I guess why you need this as well… :wink: Very similar reason :wink:

Hello, I’m sorry but I’m no longer developing an fbx importer. I have never before or since actually used fbx, but just was interested in the challenge as a python programmer and the link to blender. It really needs someone who uses fbx. Thank you - Sean

Hey tgraupmann,

What you are wanting has already been solved.  Its called oFusion and it exports from Max to Ogre 3D.  Animation, Materials, lights, cameras, textures, bones, animated and skinned characters, etc.  It will cost $600 for a commercial copy and its free if you are using it for non-commercial works.

http://www.ofusiontechnologies.com/

Cheers,
Nate Nesler