"Frame per second" export FBX error

fbx
exporter
3dsmax

(Yannick Deharo) #1

Hello everyone !

I have an issue with an animation came from an FBX file. I made the animation in 24 FPS but Sketchfab displays it in a weird way :

  • First, it displays 375 frames whereas my animation stands on 300 frames (301 withe the “0”). Sketchfab informs that it displays it in 30 FPS…

  • When my fan is turned on, it accelerates and the mesh is replaced by a blurred one. If I switch the SketchFab viewer from frames to seconds, a stupid animation is noticeable between this two steps : You can see the first helix being downsized and the blurred one being up-sized. These two transformations are meant to be invisible because the change takes just one frame. With the viewer set in “frames mode”, this glitch doesn’t appear.

The FBX doesn’t seem to carry the information that my animation is a 24FPS one. On 3DS Max, I have to import it in a 24FPS scene to obtain a good result. If I just double-click on the FBX to open it with 3DS Max, It will load a 30FPS scene with more than 300 frames. So, maybe it’s an export problem, but after some tests, I think that the truth is elsewhere…

Is there a way to advise Sketchfab that the animation is a 24FPS one ? Do I do something wrong with the export ?


(Yannick Deharo) #2

I made an other test. I changed my animation to 30FPS. With this adjustment, I hoped to solve my issue. But no ! So I believe that I understand better the origin of the problem : Maybe Sketchfab doesn’t take in account if the animation keys are set in “Linear” or “Stepped” ?

PS : Right now the 24FPS version isn’t on Sketchfab anymore; I can reupload it if you want to do some tests.


(Yannick Deharo) #3

Hi @james , Hi @bartv,

I “invoke” you because my thread seems to be invisible (Are you okay with that ?).

If it is possible, I would appreciate an explanation to the viewer behavior when it displays animation by time / by frames.

Is it true, as I’m thinking right now, that in the animation by time, the viewver reads every key as a “linear key”; creating movement between the initial keys even when these ones are set “stepped” (like a stop motion) ?

Does it exist a reason explainning that in “frame” mode this strange behavior vanishes ?

Does it exist a way to prevent the viewver to create animation between keys ? :
Does I have to bake my animation in a FBX first (to replace my curves by keys each frames), re-import this new FBX, change every key as a stepped one and then exporting again ?.. I am going to give a try at this, but I’m not sure that will do the job and it would be a very tricky way to export animation to real-time…

Thank you in advance.

Edit : I tried the tricky way… It works… But… It is still a tricky way no ?


#4

Sorry for the delay, it’s a bit beyond me. I’ve asked @waleguene to take a look.


(Waleguene) #5

Hi @YannickDeharo

During the processing, FBX animation is resampled with a framerate of 30 FPS, and it caused issues in the past when objects were disappearing from one frame to another since our baking was not aligned to the original framerate (which is the case here too).
We did fix this by taking into account stepped keyframes and adding keyframes so that the sharp animation is correctly kept by the baking process.

In order to keep the sharp animation, keyframes need to be set as stepped.
When I took a look at the model in 3dsMax in the curve editor for object “Helix”, the keyframes don’t seem to have been exported in stepped, as shown by the curve here:

image

Here is the fixed version:
image

If you do this on each scale curves for both nodes, you should have the expected result.

Could you give a try and keep us in touch ?
(also sorry for the delay, I wanted to take the time to test on my side that it was working as expected)


(Yannick Deharo) #6

Thank you all for your answers !

When I saw this little errors, before to post the thread, the first thing I did was checking these keys. In 3DS Max, they was set as stepped ! But, It’s true that I didn’t check my FBX export until now ( Shame on me ! :slight_smile: ).
So you’re right, the FBX doesn’t carry the “stepped” information !

I have some leads to follow in order to discover why the keys changes :

  • In order to have multi-takes FBX, I use the “GameExporter”. So, it may be the culprit
  • In order to see quads in the wireframe I export in “FBX 2014/2015” (I noticed prior that the 2016 version always gived me triangles)
  • On the same frame of the same object, I have a stepped key for scale and a linear for rotate…

… so I have to look further and I’ll say the result soon.

Thank you again !


(Waleguene) #7

@YannickDeharo a few export options could apply changes on animation and explain the results you have:

  • Triangle/quad issue : we did some tests a long time ago and found that depending on the type of object (Editable Poly vs Editable Mesh) of the meshes, the topology of the output was different. Here is a part of my answer from this old post:

I made some tests on my side and it seems that it depends on the mode of the object in 3dsMax. I tested exports of a cube in 3 different mods (Primitive/Poly/Mesh) and got triangles for Mesh >in both ASCII and binary samples, and Quads for Primitive and Poly exports.

Also, the option Preserve edge orientation might also change this behaviour (from my memory at least)

  • Stepped => Linear keyframes: whatever the exporter you use (regular vs Game exporter), be sure that Bake Animation is unchecked. If animation baking is done naively, it will output only linear keyframes, skipping any sharp change. That’s exactly that was causing the issue on Sketchfab before we updated to take into account stepped keyframes and the sharp animation they were carrying.

(Yannick Deharo) #8

Hi @waleguene !

I took this into account, about triangle/quad issue, I made a lot of tests. And yes, exporting in editable mesh create triangles, also, the “triangulate” option of the FBX axporter (obsiously),… Sometimes, even in edit poly and without “triangulate”, triangles appeared. So, I used a Reset XForm and the problem vanished… But a few times, I just hadn’t any explanations but I discovered that with the old version of the FBX exporter this cases also was solved… So, I took the habit to use it.

For stepped=>Linear. I always used “bake animation”. I always thought that was the right thing to do ! I will try to do without it the next time. I will probably make another test soon.

I’ll be back ! :robot:


(Yannick Deharo) #9

Hello !

Here is my new report.
I tried a lot of things again… I ended obtaining a good result but only by baking all of my curves into stepped keys (not just a few of their keys) before the export.

About the FBX export version, I confirm, with 2016 I obtain triangles on some objects but all of them are editable polys ! The same export with the 2014 one is clean. I do not pretend to explain it but it’s verified by experience.

So, the actual version is this one, but it still a WIP :

Edit : Maybe a problem come from my FBX exporter or from my *.max file… because when I give a look to my FBX file generated with the 2016 version, in 3DS Max, All the triangulated objects are now “Edit-meshes”. So I don’t understand why an edit poly become an edit mesh by exporting neither why all the objects in the scene don’t have the same behaviour… So weird…


(Waleguene) #10

@YannickDeharo cool to see that you finaly got something satisfying enough.
I’m surprised by the fact that you needed to make all the keyframes stepped. I’m convinced that setting only the required ones is enough, but maybe this subset of keys is not easy to spot.

About triangulation, if you enable export warnings in the FBX export settings, you should have some warnings about Editable Poly not being supported in FBX and being converted to Editable Meshes before exporting the scene into the file.
Also, I wrote this in a mail a long time ago about the same topic:

[From my quick test] If you have two cubes, and you merge one of them with a cylinder (having the top and the bottom with ngons), everything in Poly, you'll get triangles on the cube+cylinder, but the other cube will have quads.

That might be a cause of unexpected tesselation.

I hope you will manage to get exactly what you want, having these tricks in mind.


(Yannick Deharo) #11

Hi @waleguene,

I already know that ngons make shapes difficult to export as edit polys. But right now, the objects are turbosmoothed so every possible ngon is now a bunch of quads (I put a Turbosmooth and an Edit poly on the top of the modifiers pile before exporting). So why some of them become edit-meshes and not the others ? Some quads can be concave… Could that be the cause of the issue ?

About the keyframes, I just figured out where the issue come from, and it has nothing to do with the fact that the curve is entirely stepped or not !

When I animate the scale on 3DS Max I act on a Bezier Scale (by default). So I just have one curve for the scale. After the export, I import my FBX back in 3DS Max, and I find this replaced by a ScaleXYZ (3 curves). It turns out to be a step on the FBX creation from 3DS Max. The keys are slightly edited by this step (They all take the “Default In/Out Tangeants for New Keys” which is set as linear in my case)… That explain why a re-export from a “re-stepped” version of the FBX keeps the stepped or linear setting of the keys. Because the former FBX is already in ScaleXYZ, and the transformation from Bezier Scale doesn’t happen.

To test it, I took a new object, and animate its Bezier Scale with linear and stepped keys. Then, I have manually replaced the Bezier Scale setting by a Scale XYZ one and I noticed that my stepped keys were replaced by linear ones.

As a conclusion, from now on, I will never export scale animations from a Bezier Scale setting.


Multi-FBX + Animations