Topic locked

3D Model is upside down

June 30, 2014 - 3:18pm #8

I am working with image targets and it seems like the 3D models when activated randomly appear upside down in the ARCamera.  I am using vuforia 3.0.6, but this was also happening in a previous version. Unity is version 4.5

This is happening in the Editor, where I am testing using my laptop Facetime camera.

I have tried changing the World Center Mode to various settings, thinking this was the camera flipping, but it is not.  Using the Camera as the World Center Mode for the ARCamera, I can clearly see that it is not moving or rotating.

Here is the issue, when using Camera as the World Center Mode:

1. I hold the marker up in front of the camera, the model appears correctly oriented (most of the time)

2. I move my marker away, and about 50% of the time when it is again recognized, the model is displayed upside down.

If I repeat this, it continues to flop back and forth between correct orientation and upside down.

Looking carefully at the ImageTarget marker, I can see that when it is correctly oriented, it hovers around with an X rotation of about 45 degrees. When it's flipped, the X rotation is 305 degrees or so.

So, the model, which is a child of the image marker, seems to randomly flip orientation.

How can I fix this? Is this behavior only in the Editor?

3D Model is upside down

July 1, 2014 - 5:21am #7

Think it's just an editor related issue, I sometimes have a similar issue when using my external webcam. Never have had the issue when deploying to device, i'm guessing that camera quality comes into play at some stage maybe. 

3D Model is upside down

July 1, 2014 - 10:13pm #6

Unfortunately, I built this project to iOS and it still flips the model. No idea where to start in terms of troubleshooting. Is it related to position of the camera or the models, or the image markers?

3D Model is upside down

July 2, 2014 - 7:52am #5

How many stars did the target recieve when uploading to target manager?

3D Model is upside down

July 2, 2014 - 8:15am #4

For this project, i have 5 markers, and it's happening with all of them the same way.  All of the markers got 5 stars when uploaded.

Trying to think of anything that I've done that's unusual, and nothing seems to make sense as a cause. I'm using Mecanim animated 3D models, I'm working on implementing a GUI, still having issues with that (shows up in editor but not on the device), so I have a GUI camera. I changed the default background layer from 30 to 8.  

All the markers are at 0,0,0 position & rotation in the scene, scaling i based on the marker size (38)... Other than that it's a pretty basic setup.

Last thing is the markers are square for uploading. But, in reality I am rotating the markers orientation so it's more like a diamond shape. I can't see why this would matter though, since the ARCamera is allowed to move all around it anyways.

3D Model is upside down

July 2, 2014 - 8:55am #3


I extracted a snapshot from the video you attached in the first post,

and I have made the picture attached.

As you can see, it seems you are hitting a sort of corner case scenario, by which the image appears as ambigously oriented; this can happen when the opposite edges of the marker (which is a square in your case) appear practically parallel to each other. In such a case, depending on the camera resolution, it may be difficult for the tracker to determine the "true" orientation. 

This effect can be accentuated when using a webcam (in Play Mode), as the camera calbration parmaters might be less accurate than on a mobile device (remember that the PlayMode feature is meant for testing via webcam, but it is not representative of the actual performance of Vuforia on a mobile device).

I hope the attached picture is sufficently self-explanatory.


Image icon ambiguous_perspective.png88.64 KB

3D Model is upside down

July 2, 2014 - 9:06am #2

Thanks for the input.

Oh no!  I've already installed the markers in this orientation so I will experiment with how to fix this.  I will try to just get rid of the square outline of my marker, and use just the organic shape (frog shape) correctly rotated when I upload it again. this might fix the problem.

Will report back if this works.

3D Model is upside down

July 2, 2014 - 10:17am #1

Thanks Alessandro, your idea put me on the right track. It was in fact an issue with ambigous perspective, but not because of the corners or the diagonal arrangement.  The marker was ambigous because in my comp I had skewed the image without perspective.

What I mean is, and in case someone else has this issue, is that the program could not tell which part of the marker was closest to the camera. The marker is a frog, it's right hand was farthest from the camera, it's left hand nearest.  I was making a comp of the marker in an environment, so I pasted the marker on a photo, and skewed it to make it look about right.  I skewed it uniformly, without any perspective.  If I had also estimated perspective, the right arm should have been slightly smaller than the left arm. Because it was not, the program had no way to know which was closest, so it randomly flipped the location of the camera to 'match' it's guess.

Not sure if that makes sense to people, but if you are comping and skewing markers in Photoshop, be sure to match the perspective of the camera or you will get this odd flipping behavior. It has nothing to do with the marker being square and turned on an angle, that works fine.

Topic locked