Realtime import/export Questions and Support

Yes and yes. I haven’t done a test on Mac for a while but the plugin doesn’t use any libraries but only C++ code and Unreal functions.

Hi again Socke81,

I’ve been trying the plugin a bit more, and I wanted to run something by you to see if I’m doing anything wrong when importing a couple of models that I’m using for testing - which I’ve included through this link (Unique Download Link | WeTransfer)

They are basically the same model, with the exception that one has been exported with the “Y up” flag and the other one with the “Z up” flag. The Z up flag should be the correct one, as I’m dealing with 3ds Max. FBX 2019 Binary exporter.

The issue I have is that the Z-up model gets rotated 90 degrees (X axis) when I import it, whereas the Y up model gets imported in the right orientation. However, I would expect the Y up model to present a wrong rotation, as Max’s up vector is the Z one.

What do you think could be happening here?

Most 3D apps use Y up. Accordingly, there is compatibility with my plugin. Have you tried the “left-handed” setting?

Does it have to be FBX? The other formats do not have this problem.

I’ll take a look at your test files when I get a chance.

Thanks for the prompt response!

I’ve tried the left-handed setting, but that isn’t making a difference in terms of having the native Z-up models display correctly in Unreal. Furthermore, using the left-handed setting mirrors part of the geometry, so I assume the right-handed setting is the one to use on that front.

When it comes to FBX, I understand why you might be asking that question — FBX is notoriously inconsistent with coordinate systems. But again, I’m testing two FBX files exported from Max, and the issue seems to be how his plugin interprets their up vector declaration, not the FBX format itself.

Thanks for looking into the files, looking forward to knowing how to tackle this one :slight_smile:

Actually, it seems to be happening with OBJ files as well - so maybe the problem originates with files that have been created in that program? Here is another link to a couple of OBJs: https://we.tl/t-m7cnn9TZIM

Hm, I’m surprised about obj. It’s actually an fbx thing. Can you try gltf or gdb? There is only Y Up there.

Unfortunately I can’t export in those formats from 3ds Max 2022 natively. However, forget what I said about the up vector for OBJs - Max didn’t allow me to select the up vector, but rather swap the Z and Y vector when exporting, which would make the coordinate system left-handed as opposed to right handed.

So, please forget I said anything about OBJs haha

The FBX issue still stands though

I looked in the code. I read out the up axis. In your Y fbx file it says 1. In your Z fbx file it says 2. In my code I negate the value if the value is 1 for the Y rotation in unreal. I can’t remember why I added this but it seems to be a correction for Y Up files. Also fits your description.

So the rotation of your z fbx file is returned 1 to 1 as it is in it. Hm, I’m not sure what I need to rotate. Other fbx files seem to work correctly.

If it helps, I’m currently subtracting 90 from the Roll value of the relative transform present in the “Break Model Struct” function, and that seems to be working as a workaround for me at the moment.

But aren’t all the other fbx files rotated incorrectly? In other words, the ones you didn’t create yourself.

Ook, a bit more info in case it helps:

I’ve been testing the import across several models that have been exported from 3ds Max, and this is the workaround I’ve found for models who have been imported from 3ds Max (Z-up axis, +X points East, +Y points North):

  1. Adjust the Relative Transform value by subtracting 90 degrees from the Roll value of the Rotation component.
  2. Adjust the Location value by swapping the Y and Z axis, and multiplying the Z value (the new Y value) times -1.

Doing that seems to import the models at the right location and orientation. Attached an image for reference:

Not sure what to tell you on this one, as I mostly use FBX models created by me. But what I’m seeing should apply to all models exported from 3ds Max using the default setup (Z axis up, +X East, +Y North), I’m not doing anything bespoke.

I’ll have a closer look tomorrow. Somehow your customizations sound familiar. I have the feeling that you’re doing the same thing I’m doing in the code and negating it.

I have to be very careful in this area as a change could lead to undesirable results for many customers.

I completely understand, Socke. If you need any other models or more info from my end, happy to provide them.

I understand how frustrating all of these different coordinate systems can be, but as far as I’m aware my setup should be Max’s default. It doesn’t help at all that 3ds Max’s sometimes defaults to setting the Y axis as the up vector in its fbx export settings, which isn’t actually the value it uses. I’ve seen some colleagues confused by this fact, as the things they thought were being imported right into other programs were, in fact, using the wrong settings.

I created an FBX test file and exported it with Blender with Y and Z axes. I have implemented your code but the representation is wrong. Can you test the test files with your code? And maybe also import it into 3ds and export it with the default settings.

http://ue1.virtualbird.de/ape.zip

This is how it should look. Each monkey must be turned correctly. With my plugin with Z up the top right monkey is wrong. With your code they were all wrong.

Hi Socke,

I’ve imported the files you sent, and I can confirm that the only way to make them look as in your image is by using your default settings (so if I revert back the rotation and axis swapping I mentioned yesterday):

Even if I exported them from Max with the up vector set to Z, the rotation of some of the monkeys would be wrong with the previous setup I was using. This leads me to believe that I need to choose the “Y vector is Up” option instead of the Z one when creating an FBX in 3ds Max. That seems wrong, as the UP vector in Max is Z, but there might be something happening with how that program writes the FBX file.

I have no idea why that is the case, would love to hear your thoughts as to what might be happening behind the curtains.

On top of that, the export settings in Blender seem very confusing. The defaults are set to forward= -Z, up= +Y. AFAIK, Blender’s forward is -Y, and its up vector is +Z. However, importing through your plugin only seems to be working when using Blender’s defaults, and not what I think are the program’s real forward and up vectors.

All in all, it’s great to know that importing fbx models will work when choosing those specific settings, but I’m very confused as to why certain axis values (which seem to be the wrong ones) need to be chosen when exporting those files.

Please don’t take it as a negative comment towards your plugin - if anything, it’s more against the convoluted nature of all of these different coordinate systems.

Blender exports probably work best because I use Blender myself. I think 3ds max costs more than my car. :joy:
But I would like to customize the plugin so that it works with the standard export of 3ds max and blender.

The import into 3ds max of both files was correct or? So that must work. I just have to assign the correct axes.

Can you please export and upload the monkeys with 3ds max with the standard settings?

My first Peugeot 205 definitely costed less haha

Importing the files into Max works as expected, and it seems like the program can pick up the file’s metadata and adjust things accordingly. Here is the importer setup for the Z up axis file you sent - the one for the Y up looks the same, except the are I highlighted in red, which would display the appropriate axis:

Both files look the same once imported, so Max is doing its job in terms of placing the models were they are supposed to go.

When it comes to exporting the files, please find them through the following link: Unique Download Link | WeTransfer

I’ve exported them using these settings:

Using both the Z-up and the Y-up options for the two files you’ll see in that transfer. The one that says Y-up is the one that will import correctly into Unreal.

And great to hear that you are planning on customising the plugin to make it work with Max’s standard fbx export options! Max’s default option when exporting seems to be Y-up, even though its up vector is Z. I’m starting to wonder if the up vector property is intended to define the file’s up vector as defined by the FBX system, which might be different to Max’s, but I’m not sure if FBXs have a coordinate system of their own?

Is Y up the default setting of 3ds max? So the same one that Blender uses and that my plugin also understands? Thought Z up was standard for 3ds max.

Yes, it’s the default option that appears in Max’s FBX exporter.