FBX 2 import export

free scripts, plugins, models, textures
Post Reply
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

FBX 2 import export

Post by clintonman »

The first version of the updated FBX import/export plugin has been posted. This will only import meshes, but this aspect is improved over the old plugin. It does not import animations or skeletons yet and it does not export anything yet.

Improvements:
http://united3dartists.com/forum/vi ... f=4&t=3543" onclick="window.open(this.href);return false;

Better wavefront obj import
Better 3ds import
16 materials per mesh over the previous maximum of 8
automatic rsx plugin installation

find it here:
http://www.clintons3d.com/plugins/trues ... index.html" onclick="window.open(this.href);return false;
under the FBX_2 section

source code is also available
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: FBX 2 import export

Post by clintonman »

The import portion is done as it's gonna be.
It now converts NURBS to polygon meshes. Animations import and are better than before with less crazy flipping on rotations. Camera animation for focal length is imported from fbx file generated by Lightwave. Transparency import can be tricky since it varies from one program to another so I added an option to ignore transparency values when importing. Loading of a file one section at a time is easier than in the original version. You just tell it how many items to load from the file and repeat running the import until all of the items in the file have been read.

The only disappointing part is that I wasn't able to crack the bind-pose problem. It will read in skeletal meshes and the bones will look lined up properly, but when skinned and animation imported it becomes a great looking skeleton animation with a twisted ugly mesh attached to it. There is some incompatibility between the mesh binding and the animations imported. If you don't import animation everything else works.

Next up is the export portion of the plugin. I don't expect any real improvements for the exporter. The code will just be cleaner and easier to maintain or extend.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: FBX 2 import export

Post by clintonman »

The new exporter is done. It works the same as the old one but the results are better and it crashes less. Camera and light transforms are not good and the skeleton is still limited to all joints set to 0,0,0 rotations to get good skinning on export. This also fixes the rsx install location for the full version of truespace and includes a button to uninstall the previous fbx2 rsx plugin. It can't copy the new rsx file if a version is already installed and active.
Clinton Reese

http://clintons3d.com
User avatar
Tiles
Master Chief Petty Officer
Posts: 401
Joined: 27 May 2009, 08:34

Re: FBX 2 import export

Post by Tiles »

Nice one. Thanks Clinton :)

There are unfortunately a few qirks left.

When i cancel the import then i get nevertheless a Import complete message.

The Import FBX Button and the export FBX button leads to the im- and export dialogue where you can im and export FBC; OBJ and Collada. Wouldn`t a "Import" Button without the "FBX" part justifiy it better?

Now the showstoppers:

Textures gets lost while export. In the mtl file part of the obj file you can clearly see that it is not written.

Mesh data gets rotated around the world center. Means when i load a mesh with Modeler and save it with Workspace then the mesh gets saved at another location and with another rotation.

The UV gets flipped vertically when exporting.
Free Gamegraphics, Freeware Games http://reinerstilesets.de
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: FBX 2 import export

Post by clintonman »

Tiles wrote:Nice one. Thanks Clinton :)

There are unfortunately a few qirks left.

When i cancel the import then i get nevertheless a Import complete message.

The Import FBX Button and the export FBX button leads to the im- and export dialogue where you can im and export FBC; OBJ and Collada. Wouldn`t a "Import" Button without the "FBX" part justifiy it better?

Now the showstoppers:

Textures gets lost while export. In the mtl file part of the obj file you can clearly see that it is not written.

Mesh data gets rotated around the world center. Means when i load a mesh with Modeler and save it with Workspace then the mesh gets saved at another location and with another rotation.

The UV gets flipped vertically when exporting.
Thanks for the feedback. Good point on the button labels.

I can answer the texture problem now. The only material type that fully exports are created from BlankDXMaterial as the base. It won't work with the compiled(closed), vray or lightworks materials. I will create some materials so it's easier to get started with them. I'll get back to you on the uv and rotation/location issues.
Clinton Reese

http://clintons3d.com
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: FBX 2 import export

Post by froo »

Hey Clinton.
Are objects only exported as triangle meshes? Or can they be exported as quads and ngons as well?

Thanks

Froo
User avatar
Tiles
Master Chief Petty Officer
Posts: 401
Joined: 27 May 2009, 08:34

Re: FBX 2 import export

Post by Tiles »

I can answer the texture problem now. The only material type that fully exports are created from BlankDXMaterial as the base. It won't work with the compiled(closed), vray or lightworks materials. I will create some materials so it's easier to get started with them. I'll get back to you on the uv and rotation/location issues.
Hm, that`s quite a handicap. For leveldesign needs i always end in reimporting lots of small things and make one big thing out of it. And this small things are of course all textured ...
Free Gamegraphics, Freeware Games http://reinerstilesets.de
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: FBX 2 import export

Post by clintonman »

froo wrote:Hey Clinton.
Are objects only exported as triangle meshes? Or can they be exported as quads and ngons as well?

Thanks

Froo
It's not limited to triangle export and I don't remember off the top of my head if it does concave polygons or not.

Edit: Just did a quick test and it does export concave polygons.
Last edited by clintonman on 28 Aug 2012, 02:14, edited 1 time in total.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: FBX 2 import export

Post by clintonman »

Tiles wrote:
I can answer the texture problem now. The only material type that fully exports are created from BlankDXMaterial as the base. It won't work with the compiled(closed), vray or lightworks materials. I will create some materials so it's easier to get started with them. I'll get back to you on the uv and rotation/location issues.
Hm, that`s quite a handicap. For leveldesign needs i always end in reimporting lots of small things and make one big thing out of it. And this small things are of course all textured ...
Well, it would take a lot of work to be able to read all the different types of materials in truespace with the plugin, but maybe some kind of conversion script would be possible/easier.
I did a quick check of the transformation problems and that will take some thought to fix. I exported an fbx and an obj file of the same thing and imported into Lightwave. Fbx looked ok but obj was rotated. So the fbx sdk is not writing obj and fbx the same way and I'll have to make some kind of corrections depending on the file type. It's also possible lightwave is doing something weird. The only true way to test is with a copy of Maya or Max both of which are way too expensive for me. I'll have to wait until I have a good 30 day chunk of time so I can use one of their trials and have time to fix what i find.
Clinton Reese

http://clintons3d.com
User avatar
Tiles
Master Chief Petty Officer
Posts: 401
Joined: 27 May 2009, 08:34

Re: FBX 2 import export

Post by Tiles »

Blender imports Obj just fine, and isn`t this expensive ;)

Means you could do some experiments with exporting from Blender, importing in tS, exporting in tS and reimport in Blender.

There`s no FBX import in the trunk yet though. But it`s at its way. They have plugged Assimp in. And you can find it in the experimental Bratwurst branch :)

Corresponding thread: http://blenderartists.org/forum/showthr ... rter/page7" onclick="window.open(this.href);return false;

And Graphicall, where you should be able to find such a build: http://www.graphicall.org/" onclick="window.open(this.href);return false;

Another idea would be Unity. It imports Obj and FBX :)
Free Gamegraphics, Freeware Games http://reinerstilesets.de
Post Reply