FBX 2 import export

free scripts, plugins, models, textures
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 »

Update. I got an email from a user who was getting crashes. He made a video demoing the crashes and that lead to the crash fixes mentioned below.

rsx file version v.1638415
fix crash bug - animation only option when wavefront obj import
add pivots to imported meshes
new control for null size with a smaller default value
fix yaw 180 option to add an additional 180 degrees in the z axis
normalize the mesh normal vectors exported
fix crash - installer in scene, added "DoNotProcess" boolean value
fix crash - character mesh is grouped and mesh is grouped error message
legacy character library crash fixes
- bad mesh normals
- no mesh normals
- horse skeleton error

Still not compatible with old charaters, but doesn't crash when exporting them.
The ue4cinematic export mode is now obsolete. Epic fixed most of the non-standard cinematic mode fbx stuff.
Clinton Reese

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

Re: FBX 2 import export

Post by Draise »

This is probably the most important addon that keeps trueSpace relevant even today. I'm glad you got the normals issues fixed. I usually reset the normals on import in other software. Forgot to report it!
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 »

Yeah, I found the normals because of the old mesh normal crashes. I did a fbx text export and that's when I noticed the crazy normal values. They were something like 100 times bigger than they should have been. :idea: As I write this I realize that the cause is that they are being multiplied by the export scale. It won't make any difference now, it normalizes before export, but I'm going to fix it in the code and get rid of that scale multiplier. Just for the sake of it.
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 »

Update July 13 2020

Now uses FBX v2019.5, the last 32bit version of the FBX SDK
Option to import/export scene instanced materials
Can save to earlier FBX versions
File size is smaller - just a happy accident, I guess, or Autodesk cleaned out a bunch of unneeded stuff.
Removed some old obsolete Unreal Engine export modes.
Installer clears the most recent files lists.

Motivation was that I had an FBX file that was too new to be read by the FBX v2015. Autodesk broke backward compatibility with version 2016. v2019 is the last FBX version that works in 32bit, so it's the last version that will work with trueSpace.

http://clintons3d.com/plugins/truespace ... inout.html
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 »

July 14, 2020

One day later found a minor issue in the plugin - then found other issues to fix

Now uses a default texture for when the original file texture image is not found
fixed an emission value import problem I didn't even know was there
made import of emission and alpha values more efficient
the new instanced material export was using the material name attribute if it was available, otherwise using the material node name. Added this to the non-instanced material export which only looked at the material node name

One thing I found about tS scene instanced materials is that if 2 materials have identical output then the extra will be deleted. This is good for the case of an fbx file I got from from cad that had unique material names for everything even though it was the same material. In this case something like 60 materials got distilled down to just 1 material.
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 »

Update January 2021

Autodesk updated their FBX to version 2020. It added strict format checking and the file from tS was not passing the test, resulting in entire sections of the file being ignored by software using the 2020 standard. This update fixes that problem by removing extraneous indices for the uv values and normals.
Also added the option to triangulate meshes in the exported file, which also fixed the 2020 strict problem.

Fixed a crash bug caused by export material instancing when no material instancing exists in the scene and the case where the export material instancing was not active but scene items had material instancing.
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 »

Update February 2022

Fixed 2 crash bugs from animation and materials
Now exports parenting structures

only the rsx plugin was updated, no script changes

http://clintons3d.com/plugins/truespace ... inout.html
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 »

Update Aug 19 2023

support for vertex colors
can import more than one actor at a time
can import actors made with multiple meshes
can import into a full scene - does not need to be empty for actor import
if exporting selected and using instanced materials, the Materials node will be automatically selected
no longer adds a pivot to mesh imports
camera import option - before it always imported cameras
imports using standard tS lights and cameras instead of the custom fbx versions
plugin version 1638424
status line feedback for import and export
fixed animation range import - was using the current scene range, so if it was 300 frames a 10 frame animation would import as 300 frames
randomize materials import option - if different materials have identical appearance tS would combine them when scene instancing is used, this prevents losing the materials, unreal editor does this - exports identical materials with different names
defaultmodeltextureshader turn on bitmap compression
texture alpha add ALPHAMAP usage
list animation takes in the file to the log view - so can choose the animation if needed
improved error feedback
remove scene Materials from exporting as nulls in the fbx file
fixed crash caused by importing a mesh that has no geometry - no vertices, edges or faces
improved texture detection import for specular, bump and alpha maps

One thing I discovered is that the FBX SDK won't read all the texture maps from 3DS and OBJ files. It only reads the color maps. Looks like a bug that will never get a fix. Even the Autodesk FBX Converter only sees the color maps.

I also played with adding support for light animations(color, intensity, cone angle), but discovered that I don't have anything that would read or write it. The only thing I have that does is the old XSI Mod Tool. The Unreal Engine will export light animations in an invalid format that even it can't read back in.

There is still a few changes to make and a lot of testing to do.
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 »

Update August 22


import fix for skeleton chains that end with nulls
split the oversized import UI panels - new anim panel and options panel
can run transfer bind more than once(needed in some cases) and fixed bug where the bind root joint position did not transfer to the animated fake skeleton root joint

plugin version 1638425
export - mesh errors report only once per mesh
import - remove single animation key that was added to all objects, fixes inconsistent orientations
fixed bug that should have messed up many imports - dont know how I got away with it but it's fixed now
import - allow for root joint parent transforms - positioning was off when the skeleton root had a parent item
directional light make the size bigger after import, default size was too small
import rsx Only Animation working again, script xfer only anim done and working
clear scene - ask about vray and layers nodes
new import cleanup script
external script - started FixBitmapsForExport - good for fbx and gltf export

I don't anticipate making a lot of updates any time soon.

http://clintons3d.com/plugins/truespace ... inout.html

The FixBitmapsForExport script is needed for embedded textures inside trueSpace. The exporter needs the image files to exist on the local file system. This script will report on the state of the bitmaps and provide a tool to recreate the texture files so the fbx exporter can see them. This is also a replacement for an older script called "TextureFileReport"

http://clintons3d.com/plugins/truespace ... texturefix
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 »

That was weird, had to re-upload almost all the files from yesterday.
Files are now all updated.
Clinton Reese

http://clintons3d.com
Post Reply