Log in or register to post comments

Sprites / Particles Appearing In The Wrong Place in iOS App

August 15, 2012 - 9:53am #1

I've been supplied with a Unity scene by a 3D modelling agency.

Their scene has 3 models. One of the models is made up of several elements. Some of the elements have been constructed using 3D polygons. Other elements have been made using particles.

We've placed 3 frame markers into the scene and attached each model onto its own marker.

When we build everything into an iOS app for iPhone and iPad, install it, run it and point the camera at the relevant frame marker image, the appropriate model shows up in the camera window, as expected.

The problem is that for the model with the particle elements, sometimes those elements show in the correct position (relative to the marker, and relative to the rest of the elements in the model), but other times they appear in different locations, either slightly to the side, or further towards the camera, or sometimes quite a long way to the side or behind where they should be.

The 3D company say that the particles are done as sprites and that they are set so as to always face the camera. However, when making an iOS app from Unity, we swap out the Unity camera for a Vuforia one, so I'm wondering whether that could be anything to do with it.

I've tested this with only one marker (the one for the model with the particles) and I can't get it to mis-behave. It's only when I introduce the seoncd or third markers in front of the camera that things start to go wrong.

There's also the fact that we only want one model showing at any one time, even if there are multiple markers in view, so we've had to add some code to achieve this effect. The code we're using is detailed here: https://ar.qualcomm.at/content/limiting-number-recognised-frame-markers-one

I have a feeling that it may be related to this - perhaps there's some strange status change combination that we're not catering for and not cleaning things up when a marker goes in and out of the tracked state. To get things to go wrong, I have to partially cover up a marker, then make it all visible again, but this does sometimes happen if a marker goes partially out of view and then comes back into view again.

There's an image file showing the properties of the particle elements here (https://lh6.googleusercontent.com/CezSzNBRQxA-E_i94pJwqeh-w1dITVjL8nHM1M-mVPtryzSN-gMZTXXUIRFsSqwU4fSbCkUUpxM), in case it's anything to do with that, as it doesn't happen to the elements that were created with polygons.

Any help would be greatly appreciated, as we need to submit for client approval soon. I'm happy to provide further info if that would help.

Sprites / Particles Appearing In The Wrong Place in iOS App

August 15, 2012 - 7:14pm #2

Have you tried disabling the markers by referencing their MarkerBehaviour components (e.g. GetComponent<MarkerBehaviour>().enabled = false )

Also are your models parented by the FrameMarkers, or by a GameObject which is a child of the FrameMarker - you might try the latter to see if that helps.

Also try different World Center Mode settings on the ARCamera. The ARCamera should be recognized as a standard Unity Camera for the purpose of having the particle system 'look at' that camera, but I don't know how it was implemented.

Are the particles directional, do they move in a consistent direction? If so, do they consistently point towards the camera?

Log in or register to post comments