Exporting 3D model from SketchUp to Unity - Orientation problem

I have 3D model of a room made in SketchUp. SketchUp3DModel. I exported it to Unity in .fbx file format. Everything is fine (materials, textures). However, there is one major issue. The model when imported in Unity is flipped by 180 degrees. (As a new user, I am unable to upload to images. Hopefully I can upload it in comments.) I tried rotating the model in Unity by 180 degrees but it doesnt solve the issue. It is very crucial for my work that the orientation of the 3D model matches. Is there a way to solve this? Or am I doing something wrong?

Here the screen shot of how the 3D model looks when imported to Unity. It is flipped by 180 degrees

Does your Sketchup model have the blue (z) axis up? It looks like not.

@endlessfix yes the blue axis is up.

Did you turn on Swap YZ coordinates?
Export > 3D Model > FBX Options…
fbx_183112

2 Likes

What mihai.s says is important, but if you got that wrong it would only cause the model to rotate 90 degrees. When you describe it as flipped 180 degrees, does that mean the roof is towards the ground instead of the sky?

@mihai.s, yes I did turn on Swap YZ Co-ordinates. What I see is that in SketchUp blue axis (Z) is up whereas in Unity Green Axis (Y) is up.

No, that is not the case. Being flipped by 180 degrees I mean that if you place the two images next to each other you will observe that the wall along green- blue axis is on the opposite side. I hope I am clear in my explanation. It is clear from the attached pictures.

Import this FBX file - up-FBX.zip (10.9 KB). You need to unzip it first.
How does it look?

In Unity 5 looks that way

I have attached the screenshot of imported file. It looks exactly like the one you showed. Could you also guide me through the cameras in SketchUp? What I mean is that, which camera view did you choose in Sketchup before you made the import to Unity.

UnityImportTest

This is the SKP file - up.skp (190.1 KB) , export it to FBX and then import it into Unity.
Does it look the same as the model I sent you the first time and which looked ok in your Unity?

Your images showed up later on, once you were able to post those too.

Assuming the SketchUp view is top down, and so is the Unity one, it is as if the model has been rotated 180 degrees. The Z axis of SketchUp has become the Y axis in Unity, which is what you want.

I do see the problem you’re describing, and mahai.s’ screenshot shows the problem as well. His FBX, or his SKP, all lead to the same problem. What makes it harder to notice is that the scene view is rotated 180 degrees. If you were to point the camera downwards, the Game view will show the incorrectly 180 rotated objects.

Look at the widget in the upper right, in SketchUp and in a fresh Unity project, with a top down view the Z axis increases in value as you go up the screen, and the red axis increases in value as you go to the right. In your screenshots you have the Z axis increasing going down the screen, and X axis increasing when going to the left. That’s why the model looks correct in the Scene view.

So, there may be a real issue to fix, but there is an easy work around. Unity can import SKP directly. It doesn’t do well with more recent SKP versions, but try a save as to an earlier version. In my test I used 2015. Here is a top down screenshot of mihai.s’ FBX on the left, and his SKP saved as 2015 and imported on the right.

@colin, importing the skp format works. I hope skp format should be fine while working with textures and for offline rendering in Unity.

@colin does it then mean that there is some orientation incompatibility when exporting in .fbx format?

I tried importing into Blender, but it seemed not able to cope with the FBX file. So I tried Cheetah3D instead. It can’t import SKP files, but does import the FBX from SketchUp ok. It shows the import the same as it appears in SketchUp.

If I export the model from Cheetah3D and bring that into Unity, it comes out wrong. A new model in Cheetah3D, exported as DAE, comes into SketchUp correctly, but incorrect into Unity.

I think I know what is happening. 3D coordinate systems are using called left handed and right handed. Which one is which isn’t obvious, but it ends up being that SketchUp is right handed, and when exported to make Y be up, it may not seem to be sufficiently left handed to keep Unity happy. I will see if anyone knows whether SketchUp does anything to force the FBX to be left handed.

You can see from this discussion that it isn’t just SketchUp that has the problem with Unity, and in the case of Maya, the solution was again to use a native Maya file.

https://forum.unity.com/threads/fbx-coordinate-system-confusion.164144/