microsoft / RoomAliveToolkit

Other
715 stars 191 forks source link

.OBJ file import problem #23

Closed Dallemanden closed 8 years ago

Dallemanden commented 8 years ago

Hello, when saving the scene in the calibration tool to an .OBJ file, and importing it to Unity, i get the following error:

"ImportFBX Errors: Couldn't import file C:/Users/Admin/Desktop//Unity Projects/Test/Assets/3dobejct/3newpos2.obj.

UnityEditor.DockArea:OnGUI()"

I have done this before in an older update of the toolkit with out any problems, but now it won't load the object properly.

Any suggestions on why that might be?

The model is build from 3 proj and 3 kinects.

Thanks :+1:

thundercarrot commented 8 years ago

Does MeshLab load it?

Dallemanden commented 8 years ago

Yes it does, but it is just shown as a lot of squares.

screen shot 2015-11-22 at 20 56 20

It looks proper when i import it to Blender, however if i export it again, Unity crashes when trying to load the file.

thundercarrot commented 8 years ago

I can't seem to repro the problem. Can you post the file(s) somewhere where I can download it?

Are you by any chance in some locale that uses commas for decimal points? I've seen some problems with that; thought I had that licked but perhaps I missed something.

Dallemanden commented 8 years ago

Here is a link for the files: https://www.dropbox.com/sh/t1riawoq9q106zo/AACH0LaNH3PvYOzUkfT6VEFka?dl=0

We are located in denmark, and yes we use commas for decimal points, but the unity installation is using dots instead of commas.

thundercarrot commented 8 years ago

The uploaded .obj file does indeed have commas in it where it should have points. I thought I fixed this problem using .Net's InvariantCulture (see line 1426 of ProjectorCameraEnsemble.cs). Can you verify that you are all up to date on the master branch?

Dallemanden commented 8 years ago

I see that aswell, hmm. The InvarianCulture should take care of the problem as you say. The calibration has been done with a fresh download from 6 days ago, so it should be all up to date.

thundercarrot commented 8 years ago

I changed the way InvariantCulture was being used in the export functions. I think the problem was that Vertex.ToString was carrying on without InvariantCulture. Can you try this again and let me know how it goes?

Dallemanden commented 8 years ago

Thank you very much. Now it works, however there are still some minor errors (according to unity)

error

But it loads fine, and does aswell in meshlab :+1:

You can find the calibration folder here, if you are interested: https://www.dropbox.com/sh/2t7o6aqo07is6bd/AACcZ03qRXpRym50KRJyqgN1a?dl=0

We are still though experiencing some general problems with the toolkit. If you look at the post with the title "Undesired skew when objects gets moved outside the main ProCam unit" - https://github.com/Kinect/RoomAliveToolkit/issues/24 - the problem is described. We were hoping that the problem with .obj would solve it.

thundercarrot commented 8 years ago

We could certainly add normals to the .obj file, but I'm not sure how useful this is given that the geometry is already 'lit' by the color image texture.

The vertex limit is a well known limitation in Unity. It amazes me that it exists still.

Dallemanden commented 8 years ago

You are right about that, and yes there is some old odd limitations in unity, just look at how they are still using quicktime in regards to handling video.