FBX 2 import export

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

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:
vi ... f=4&t=3543"

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"
under the FBX_2 section

source code is also available
Clinton Reese

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

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: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

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: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

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: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

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: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

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"

And Graphicall, where you should be able to find such a build: http://www.graphicall.org/"

Another idea would be Unity. It imports Obj and FBX :)
Free Gamegraphics, Freeware Games http://reinerstilesets.de
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Obj should be fixed before the fbx save format. It's a matter of finding out what the fbx sdk is changing when it's saved. FBX is natively a Y-up XYZ rotation order file format. As far as I can tell truespace is Z-up ZYX rotation order as far as the fbx sdk is concerned. I need to put some code in that is aware that it's saving obj format and convert/unconvert the values that get saved.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

clintonman wrote:
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.
Looks like I was only half right with that answer. FBX exports polygons, but OBJ exports triangles. If that's a limitation of the fbx sdk then I won't be working on the obj portion of it anymore.

Found it. The sdk has a triangulate for obj files option that was on by default.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Update:

Fixed obj export
Upside down UV map
Crash caused by unoptimized triangulation
Buttons say just "import" and "export"

I believe the plugin makes the assumption that meshes have optimized triangulation. This assumption was causing an export crash in some cases. It still exports a bad mesh, but without crashing. The fix is to run the Optimize triangulation tool on the mesh before exporting.

It still only imports and exports "BlankDX" style materials and there are no plans to change this due to the large amount of work involved.
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 »

It still only imports and exports "BlankDX" style materials and there are no plans to change this due to the large amount of work involved.
I can understand that you don`t want to invest this work. But that means your im and exporter is incomplete. LUUV im and exports textures just fine. Which makes the Obj part of your im and exporter obsolete. Remains fbx. And at that end we have a buggy bones system, where it doesn`t really make sense to export animations anyways because you cannot animate them in a proper way. Means i can simply use obj ...

Anyways. It`s of course your time and your decision. But there is still something broken at the obj import. I tried to import a specific Obj file, and it crashes repeatable. Another obj file imports just fine. With texture by the way.

Uninstall doesn`t work proper. I click the Uninstall button, close trueSpace, reopen it, and the plugin is still there.
Attachments
crash.jpg
mesh_halberd_crashing.rar
(125.04 KiB) Downloaded 236 times
Free Gamegraphics, Freeware Games http://reinerstilesets.de
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Tiles wrote:
It still only imports and exports "BlankDX" style materials and there are no plans to change this due to the large amount of work involved.
I can understand that you don`t want to invest this work. But that means your im and exporter is incomplete. LUUV im and exports textures just fine. Which makes the Obj part of your im and exporter obsolete. Remains fbx. And at that end we have a buggy bones system, where it doesn`t really make sense to export animations anyways because you cannot animate them in a proper way. Means i can simply use obj ...

Anyways. It`s of course your time and your decision. But there is still something broken at the obj import. I tried to import a specific Obj file, and it crashes repeatable. Another obj file imports just fine. With texture by the way.

Uninstall doesn`t work proper. I click the Uninstall button, close trueSpace, reopen it, and the plugin is still there.
Thanks, I'll check out the crash and uninstaller. The uninstaller is only designed to work with the rsx plugin not the button and scripts. It exists because the rsx can't be updated without removing it first. The plugin does import and export texture materials, it just does not import export modelspace, vray and compiled materials.

Edit: I found half the reason for the crash. Looks like I had some bad code in there. The other half of the crash is caused by the triangulator code I borrowed from someone else. That code is used for polygons that are concave or have more than 4 vertices. I'll let you know when it's fully fixed. The image shows the imported mesh using the half fixed plugin and the simple polygon fan option.
halberd.jpg
Edit: Fixed one crash and gave fair warning for the other crash reason. new plugin is on the website.
New UI code was causing the importer to crash. Fixed
Triangulation code can also causes a crash but only when "convex polygons" is unchecked. Added a warning when this option is unchecked.

Question:

What format would you prefer for the materials?
I'm not going to write every possible material handling into this plugin, but I am interested in making material conversions for the Indigo and Yafaray renderers. Your preferred material type would be one more conversion.
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 »

Thanks for the fixes :)
What format would you prefer for the materials?
Not sure if i understand your question. Official material in the Workspace is DX, so i would say DX.

When you mean texture format, everything non destructive i would say. Maybe even compressed. Png jumps into my mind here :)
Free Gamegraphics, Freeware Games http://reinerstilesets.de
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: FBX 2 import export

Post by trueBlue »

To Uninstall your plugin try:

Code: Select all

RsPackage.Uninstall('Clintons FBX Package');
without the path.
IE: RsPackage.Uninstall(progPath + 'rsx\\Clintons3DFBX.rsx');
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

trueBlue wrote:To Uninstall your plugin try:

Code: Select all

RsPackage.Uninstall('Clintons FBX Package');
without the path.
IE: RsPackage.Uninstall(progPath + 'rsx\\Clintons3DFBX.rsx');
Thanks. :bananathumb:
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Tiles wrote:Thanks for the fixes :)
What format would you prefer for the materials?
Not sure if i understand your question. Official material in the Workspace is DX, so i would say DX.

When you mean texture format, everything non destructive i would say. Maybe even compressed. Png jumps into my mind here :)
materialConverter01.jpg
Textures will be controlled by truespace. If you use as png it will export a png or a reference to the png file. This image shows how it will work. The left is a compiled DX material and on the right is the BlankDX style material it would be converted to.
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 »

I see. Not sure if i can give advice here. But as told, png seems to me as a good image format.
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

Concerning textures, I'm not sure which would suite for import/exprot..
I would assume you would need to export UV's accurately (texcoordinates), a texture map (colour), normal map (bump) and maybe an accurate interpretation of the Phong attributes according to the FBX phong(Model) if it has any.

You could make a D3D node with fixed settings you want, and include it with your FBX plugin, so people can use that node before export to include those shader attributes (thus narrowing down the dynamics you'd have to code).
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Draise wrote:Concerning textures, I'm not sure which would suite for import/exprot..
I would assume you would need to export UV's accurately (texcoordinates), a texture map (colour), normal map (bump) and maybe an accurate interpretation of the Phong attributes according to the FBX phong(Model) if it has any.

You could make a D3D node with fixed settings you want, and include it with your FBX plugin, so people can use that node before export to include those shader attributes (thus narrowing down the dynamics you'd have to code).
materialCombinations.jpg
I thought about that, but one D3D node might be difficult because of all the possible combinations. I figure I'd recreate some of the compiled D3D materials(TextureBump, TextureBumpAlpha, TextureAlpha...) for a starting point. Image shows what the fbx import material looks like. You have to imagine all the different combinations that are possible. The fbx plugin looks at what is needed and connects the nodes or deletes them so you don't get a lot of nodes sitting around doing nothing.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Looks like I forgot to update this thread. A material converter script/plugin was created Feb 20 2013.

http://www.clintons3d.com/plugins/trues ... index.html"

FBX 2 Updates:

Jan 4 2013 - recompiled
Jan 24 2013 - fixed uv set 2 bug, added ability to export a 3rd uv set
Jan 28 2013 - fixed bind pose, fixed camera and lights transforms, fixed button appearance
Feb 4 2013 - fixed crashes from ambient light, no mesh normals and mesh with SDS materials
Mar 21 2013 - UDK game engine specific export modes, default export mode and Z-up export mode

http://www.clintons3d.com/plugins/trues ... index.html"
Clinton Reese

http://clintons3d.com
Wigand
Senior Chief Petty Officer
Posts: 204
Joined: 21 May 2009, 17:38

Re: FBX 2 import export

Post by Wigand »

Today, I tried it and got an error message:
Load node: Failed to load ....

Do I need something else to get it started?
Do I need a autodesk installation or such?

I am working on a W8 64 System.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Wigand wrote:Today, I tried it and got an error message:
Load node: Failed to load ....

Do I need something else to get it started?
Do I need a autodesk installation or such?

I am working on a W8 64 System.
No autodesk installation needed.
Was the error during installation or when trying to import/export? What did the "...." after "Failed to load" say?
Clinton Reese

http://clintons3d.com
Wigand
Senior Chief Petty Officer
Posts: 204
Joined: 21 May 2009, 17:38

Re: FBX 2 import export

Post by Wigand »

In TS7.6 I installed and loaded the plugin: Clintons3DFBX.rsx 5.003K
then opened Library browser and double clicked: Clintons3DFBX
A new section of two objects appeared. One called Clintons3DFBX as NA and a second
mostly invisible: install fbx2 import export.
This one I put into Link Editor. Now I got the:
LoadNode: Failed to load install fbx2 import export


Maybe there is something wrong with the paths.
You know I have a german system, and maybe you use the english path-names?
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: FBX 2 import export

Post by trueBlue »

Scripts created in tS76.1 are not backwards compatible. It is possible to Copy/Paste or Export/Import the scripts though in tS76. HTH
Wigand
Senior Chief Petty Officer
Posts: 204
Joined: 21 May 2009, 17:38

Re: FBX 2 import export

Post by Wigand »

Thank you TrueBlue for this hint.

I had to look for a ts761 installation file, but did not found.
I still have some Beta installation files on an old drive, but
they all told me that they are expired.
I thought the last beta did not have an expiring function.
Do you remember which one it was?

Now I copied a 761 folder direct from an XP partition into my
Programs (x86) folder. (without installation)
I was surprised because it launched.

........some hours later:

install fbx2 import export

Now I got the message:

Load Object: Invalid version: 26980
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Maybe you can try a fresh download and install. This page has ts7.61 both versions.
http://www.flat2d.com/Truespace_en.aspx"

Edit: and by default truespace doesn't install to the program files folder like a normal program
Clinton Reese

http://clintons3d.com
Wigand
Senior Chief Petty Officer
Posts: 204
Joined: 21 May 2009, 17:38

Re: FBX 2 import export

Post by Wigand »

Thank you for this link. This is what I have been looking for.

But, still problems:
As soon as I click on the Import Button I get an Alert: Import cancelled
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

The first thing you should see is a file open dialog. Maybe it's a win8 thing. Can you run in compatibility mode for older versions? I don't have win8 so no way to test the idea.

Edit: I did a test by downloading and installing on a non-developer Vista 32bit machine and it worked. This test was to be sure a bad version didn't get uploaded.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

fbx2015_abc_bvh.jpg
Updated to use fbx sdk ver 2015.1
Includes the older 2013.2 version because skeletal mesh import won't work with the 2015 version

Adds support to export non-overlapping animation clips as takes.
Fixes bare skeleton animation import
the new fbx sdk adds alembic mesh and several motion capture formats

The motion capture formats come in sideways so it would need some adjustment after importing.

image shows the sample alembic octopus mesh and bvh skeleton import
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

:shock: :shock: :shock: :shock: :shock: :shock:

Wow, this is amazing!

Alembic!?!!!
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Draise wrote::shock: :shock: :shock: :shock: :shock: :shock:

Wow, this is amazing!

Alembic!?!!!
Yep, but only the mesh. No animation.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Wigand wrote:Thank you for this link. This is what I have been looking for.

But, still problems:
As soon as I click on the Import Button I get an Alert: Import cancelled
I did a fresh install of the plugin and got the same bad behavior. When I tried to fix it it just disappeared on it's own. I think the plugin was failing to open the import dialog and this results in the cancelled message. It looks like a problem with trueSpace communication with windows. So bottom line is I have no solution but the problem may go away on it's own.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Update:

Bind pose(default pose) import is working now. The FBX format is weird. Some files don't have a bind pose specifically defined inside them, so you have to get it indirectly by looking at the skinning info. If a bone doesn't skin anything it doesn't show up so I combine that information with the pose of the skeleton in the scene at frame zero and hope for the best(so far so good).

Temporary skin files in the Biped folder are deleted after skinning.

The output console will display the number of takes in a file. Also reduced the number of status messages during import.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Update:

Bug fix. IK handles and locks was causing only a portion of the skeleton to export.

Discovered that the FBX export of skeleton animation may be off. It will animate ok in truespace but when the plugin runs through the animation the IK calculations may be off. More keyframes seem to improve it. Baking the animation before export may be the way to go. Need a new script for this.
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

I've tried to install it, with the two RSX plugins and then the script loaded via the dialogue, then all good.. but when I try export I get an alert with "Export Cancelled." dialogue. Then it proceeds to do nothing.

A little help?
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Draise wrote:I've tried to install it, with the two RSX plugins and then the script loaded via the dialogue, then all good.. but when I try export I get an alert with "Export Cancelled." dialogue. Then it proceeds to do nothing.

A little help?
It's a mystery, see 4 posts up. It happened to me and then then the problem just disappeared. The problem is that it's failing to open the window, so it returns export cancelled. It can't tell the difference between no window and pushing the cancel button. Unfortunately, all I can tell you is to fiddle with truespace and hope it fixes itself. In the mean time I'll take another look/do some google searches.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

I think I found a fix.

Download and replace the rsx file.

http://clintons3d.com/stuff/Clintons3DFBX2015.rsx"
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

AWESOME! Tried it out, works like a charm.

That fixed it! Whatever you did. Thanks Clinton, simply the best.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Great. I got super lucky finding the solution. I'll update the official release to use the new method.
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

I'm getting hard crashes right now. Why do you think that could be? Which RSX do I use again?

EDIT: been uninstalling, reinstalling, it's just.. cold hard out crashing on export.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Draise wrote:I'm getting hard crashes right now. Why do you think that could be? Which RSX do I use again?

EDIT: been uninstalling, reinstalling, it's just.. cold hard out crashing on export.
I'll see if I can find something this weekend. Does it crash when importing?
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

It does not. It says the import was canceled.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Go to
http://clintons3d.com/plugins/truespace ... index.html"

Download FBX_2 for trueSpace 7.61 to get the latest installer, click the title

Just below the title is Feb 14 2015 replacement rsx file
Download that, exit truespace and replace the rsx file to fix the import problem

----

I downloaded from the website, installed to a fresh install of truespace and it exports without crashing. When does the crash happen? When you click the button or after the file dialog or after some time has passed? Is it a specific scene or any object in any scene?

---

One thing I did learn is that the rsx files need the runtime libraries, but that has no bearing on your issue.
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

A fresh install.. hmm.......

I have a modified version of TS with Update 3....

Trigger the error by exporting anything, or importing anything, after the save dialogue pops up.

Get the following error when I confirm the name and destination.
error with FBX export.PNG
I will try reinstall TS and then... get my CTX in and see.. if there is a bad script in there (doesn't uninstall properly?)
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

It's a mystery to me. I did another test on a win8 virtual machine with the fbx export and then with the newer rsx file. It worked here on winxp, win7 and win8 so it's not the windows version. Can you post your scene, any scene and the full path name you're trying to save too?

I would backup the truespace folder before reinstalling that way you don't lose anything if it still doesn't fix it.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Update:

removed the old fbx 2013 rsx plugin
fixed a bridge renaming problem when importing by turning the bridge off during import then setting it back to the original value after import is complete
file export dialog name defaults to the selected item name or the scene name
new checkbox for exporting only the seleted items
added batch processing for exporting several items to individual files in one go.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Another update:

option to only export keyframes instead of baked frames. This makes for smaller files and faster exports.

exports 3 interpolation types: linear, stepped and cubic(smooth)
It doesn't read the keyframe handles only the type of keyframe .
http://clintons3d.com/plugins/truespace ... index.html"


On a side note I also updated the Clintons3dPlugin.rsx so script can read the keyframe data. It reads the value, the type of interpolation and the angle and length of the keyframe handles. The data is provided in JSON text format so it can be converted to a javascript object.
http://clintons3d.com/plugins/truespace ... index.html"
Clinton Reese

http://clintons3d.com
User avatar
Cellulo
Lieutenant
Posts: 927
Joined: 27 Sep 2012, 07:48
Type the number ten into the box: 9
Location: France

Re: FBX 2 import export

Post by Cellulo »

Thanks Clinton, it's include in my setup installation of trueSpace 7.61 Standalone.
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

I managed to get the export to work after redoing my CTX file, but now the Import has a "Import Canceled" dialogue every time I try use it. The dialogue doesn't load.

I keep finding bugs!

Maybe I'll try reinstall trueSpace instead of resetting the default context?
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Are you sure you have the latest version? That "Import Cancelled" should have been fixed a while ago. :( Try manually removing the Clintons3DFBX2015.rsx file and reinstalling the plugin. The latest rsx file has a date of April 8 2015.
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

I have lost track. I'll do that.
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

Uninstalled manually - though the script and buttons remain with the uninstaller? Then I downloaded the latest, and.. found out it was the version from April 5th (not April 8th as you implied). It still makes TS cold crash for me - now it isn't working.

If I get this going I'll be a happy man, but for now... I somehow seem to be cursed.

EDIT: Manually installed the RSX - uninstalled the one the script installed - import worked fine. Now I'm testing export.

EDIT_02: Export now works, with the right shaders. Seems I had a shader error that was causing it to crash. I may need to..... sort that out.

Phew, now it's all working. Lovely.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Glad you got it working. Can you share the shader that causes the crash?

I downloaded it fresh and the date says April 27, so I guess we can't really trust the date modified. The created date does show April 8th. I wonder where your April 5th is coming from.
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

Haha, it was the date I saw on the installer node.

It was my ultra shader or sss shader that crashed it.

Maybe if you put a shader checker to make sure your FBX shader is put on?
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Crash is fixed with new rsx file. The problem was undefined bitmap files in the nodes. Also updated the rsx file version to v1638407.

The new rsx file can be downloaded just below the main download link.
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

Hmm.. you have to do a lot of preperation before exporting - just read through the documentation. I had a CTX where it was working.. then got the same cold crashes later.

So.. I figured out that you need to follow some steps before export:

1. Fix triangulation
2. Fix corrupt SDS
3. Delete floating points
4. Paint with default shaders when and where possible (maybe?)
5. Flatten Geometry

I might make a script that does that...
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

Ah, that is what is crashing it.....

I have more than one material applied to the mesh - islands with different materials............. So.. I have to export with no material islands.... :(

CONFIRMED: one material applied works, two materials no.

EDIT: I should try this with a sphere....I did make it happen once... exporting selected with multiple materials applied.. how does the material system work?
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

The importer is limited to 16 materials and the export I think has no limit on the number of materials.
Can you post a sample that causes the crash?
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

I'll do that soon.

Just an observation, materials painted on "None" mode instead of "Object" or "Scene" doesn't seem to be crashing it. Object or scene mode yes, those both crash the painted sphere with two shaders (reset material editor, paint with that).

EDIT: tried it out on a model that always crashed on export, and using your material converter, converted the materials to "none" and it exported fine.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Updated the rsx file so it doesn't crash on instanced materials. They export as default white material.
download the new rsx file just below the main link
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

That fixed it. Awesome. Good work Clinton! Sorry about all the bug finds........ I think I had a knack for that. I'll be keeping on testing it here and there.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Draise wrote:That fixed it. Awesome. Good work Clinton! Sorry about all the bug finds........ I think I had a knack for that. I'll be keeping on testing it here and there.
Sounds good to me. :bananathumb:
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

Tried out hte DXF import from a file exported from Inkscape, as a ROBO-Master type of spline, and the legacy LWPPOLYLINE type.....But.. didn't do the DXF export from inkscape very well (it turned out to be just a cube? Clinton?)..
User avatar
seppgirty
Master Chief Petty Officer
Posts: 354
Joined: 22 May 2009, 03:34
Type the number ten into the box: 0
Location: pittsburgh Pa.

Re: FBX 2 import export

Post by seppgirty »

I get this error message when trying to import "i'm using 7.61 stand alone with unofficial update 3, Installed the 2008 c++ like you said.

I keep setting the bridge to on/auto
Attachments
error.jpg
truespace 3.2, 5.2, 6.6, ani-pack, flash plugin,........ you can check out my films athttp://www.chaosbrosfilms.com
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

seppgirty wrote:I get this error message when trying to import "i'm using 7.61 stand alone with unofficial update 3, Installed the 2008 c++ like you said.

I keep setting the bridge to on/auto
Doh! You got me. :oops: I've been testing on truespace full version. I'll take a look at it and get back to you.
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

tSBridge error is fixed now.
Clinton Reese

http://clintons3d.com
User avatar
seppgirty
Master Chief Petty Officer
Posts: 354
Joined: 22 May 2009, 03:34
Type the number ten into the box: 0
Location: pittsburgh Pa.

Re: FBX 2 import export

Post by seppgirty »

Awesome Clinton! I imported an FBX model from autodesk character generator. A .obj and a 3ds model and it seemed to work fine. Have not exported anything yet. I'll do that when i have time.

Thank you very much. :bananacool2:
truespace 3.2, 5.2, 6.6, ani-pack, flash plugin,........ you can check out my films athttp://www.chaosbrosfilms.com
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Update:

fixed a uv import bug. it was only importing indirect style uv. this adds a working direct style uv import.

i discovered the bug when importing an fbx from the unreal engine
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Update:

changed material importing method. The old method used a pre-existing 16 material node that is loaded from disc for each object then all the extra stuff was thrown out. The new method builds up from a simple node and loads from the plugin directly instead of disc. The result is much faster load times and removal of the 16 material limit for fbx imports.
new plugin version is now v.163841
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Update:

some export changes to take advantage of the new unreal engine fbx scene import feature

more efficient material exports - no repeated materials
small bug fix, position skeletal mesh root bone after binding/skinning
exports an extra null representing the actor position and name - useful for scene exports
exports mesh instances based on the unreal t3d export script static mesh tag
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Update:

improved Z up orientation of imported and exported items
fixed bug when exporting actor with skeleton root or mesh with non-zero rotations
fixed bug of keyframe only export - animation data was not being fully matched to the proper joints
new world space export option - reads the world matrix instead of the local matrix

new plugin version is v.1638412
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

Good fix!
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Small update:
option to only import animation information from the file
new rsx file version is v.1638413

I made this change because I plan to animate outside of truespace and it will be much cleaner if animation is the only thing that changes in the scene.
Clinton Reese

http://clintons3d.com
User avatar
BNG
Chief Warrant Officer
Posts: 684
Joined: 16 Oct 2009, 03:26
Type the number ten into the box: 0
Location: Texas

Re: FBX 2 import export

Post by BNG »

Do we need to remove older versions before installing the latest version?
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: FBX 2 import export

Post by clintonman »

Install steps are at the top of the page here: http://clintons3d.com/plugins/truespace ... inout.html"

1. download the zip file
2. load the RsObj installer using the file menu, not drag and drop
3. press the uninstall button to remove the old rsx file
4. restart truespace to complete the uninstall
5. press install button

other option - manually replace the rsx file while truespace is closed and then just run the install

you may need to get the vc++ runtime 2008 sp1 from microsoft if this is the first installation of an rsx plugin from my site
Clinton Reese

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

Re: FBX 2 import export

Post by clintonman »

Update: June 6 2017
Improved polygon to triangle code for import which may solve the problem of instability for importing concave polygons.
Level of Detail(LOD) export for meshes, not actors/skeletal meshes
New export mode, ue4cinematic, makes animations compatible with the Unreal Engine Cinematics system
rsx file version xxx...414
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: FBX 2 import export

Post by Draise »

THIS UPDATE. THIS UPDATE!!! :bananalove: :bananacheers: :bananaclaus: :bananalove: :bananacool2: :bananathumb: :bananacool2:

Return to “Repositorium”