Log in or register to post comments

Compiling a simple project example not tracking image target

May 9, 2012 - 5:01am #1

Hi,
I am new to Unity 3D extension so i followed "compiling a simple Project" provided by you step by step.

I have done each and step for iOS (iPhone 3GS) but it seems like app is not tracking the image target. not even the sample apps. where i am doing wrong?

I can see the camera preview in my iPhone app but nothing happens if i try to track the image. No animation is there.

these are the steps i follow

1. I create a new Unity project
2. imported vuforia-ios-1-5-9.unitypackage
3. delete default camera
4. imported my trackbles
5. Drag an instance of the ARCamera prefab into my scenes
6. drag an istance of ImageTarget prefab into my scenes
7. I set my custom dataSet
8. Add the cube as a child of the object ImageTarget
9. set the directional light.
10. activated the default dataset
11. changed the build settings (e.g.. support for arm7 only, resolution and presentation: Portrait)
12. deploy my application to my device
13. have a print out of image and tried to track but nothing happened

Please tell me if i am missing something

Compiling a simple project example not tracking image target

December 6, 2012 - 1:08am #17

sorry for late reply david.
the problem solved. i build the new unity project and it run perfect in my iPad. thank you everyone :)

Compiling a simple project example not tracking image target

November 30, 2012 - 9:42pm #16

I'm glad that you have found a solution. Can you send me the video that will not stop playing so that we can test it?

Compiling a simple project example not tracking image target

November 30, 2012 - 6:45pm #15

ok N... 

actually i make a unscientifically recognized self hypothesis about this hehehe.
please CMIIW 

i dont know why, but, especially to compile in iOS device, i have to convert my portrait m4v encoded from other format video to "correct" *.mov first. then convert again to m4v.. then the file will be the "correct" m4v format. 
because this way works.

but the problem is a mov video like has a default matrices indexes so if i encode the portrait video to *.mov, the rest of the undefined matrices index values will be filled by "0".. in other words it means the rest of the video will be black colored.

if i adjust the scale of the video to my portrait frame size, then it will be not proportional. because the black "frame" will be included and your original video frame will be tightened.

i did realize it and then i search and downloaded a video converter which can convert the mov video and crop the video in its converting process to h264 m4v..

unfortunately, you cant do this to H.264 m4v. because the black colored frame still will be there. when converting to H.264 m4v, the output video will be in a same ratio with the subject video.. so the rest will be black even you have cropped the original video.

finally, i convert the mov video with a full screen zoom to H.264 m4v first, so you will get a wide unproportional full screen video without black frame, and then edit the scale in the script VideoPlaybackBehaviour.cs so you can adjust your video width to be proportional again.

thank you so much N and david,,. hope the bug fixed in next version 

and the issue "audio keep playing while not tracking trackable" is still unsolved. :(

regards

Yoze

 

Compiling a simple project example not tracking image target

November 30, 2012 - 1:24am #14

Hi Yozelectric,

This is a video decoding bug that will be fixed in the next release of Vuforia.

In the meantime you could try and encode with iMovie to see if it helps, as that's what was used for the stock videos.

thanks,

N

Compiling a simple project example not tracking image target

November 29, 2012 - 8:40pm #13

hello again mr.davidbeard, actually after i check, my video has been encoded using H.264.. 
but my video still broken

i use video with 14 fps only. is it a problem? 
vuforia sample video is 26 fps 

here is the pic of my app on the ipad
http://postimage.org/image/mc7jlabcr/

and the code you give, it is exactly same with the code i use in the TrackableEventHandler.cs
the same problem happened with vuforia sample videoplayback (unity) 
the audio still continue playing even when the camera isn't tracking the trackable

 

regards

 

yoze

Compiling a simple project example not tracking image target

November 29, 2012 - 6:43pm #12

thank you so much david. 
i will check it up soon. 

 

Compiling a simple project example not tracking image target

November 29, 2012 - 6:32pm #11

The audio will continue to play for a couple of seconds, to maintain continuity if you return to the target. But it should stop afterwards. Do you see the same with the Video Playback sample - have you altered or removed the TrackableEventHandler?

You should see the following in Update..

 

        // Pause the video if tracking is lost for more than two seconds

        if (mHasBeenFound && mLostTracking)

        {

            if (mSecondsSinceLost > 2.0f)

            {

                VideoPlaybackBehaviour video = GetComponentInChildren<VideoPlaybackBehaviour>();

                if (video != null &&

                    video.CurrentState == VideoPlayerHelper.MediaState.PLAYING)

                {

                    video.VideoPlayer.Pause();

                }

 

                mLostTracking = false;

            }

 

            mSecondsSinceLost += Time.deltaTime;

        }

Compiling a simple project example not tracking image target

November 29, 2012 - 6:25pm #10

okay thank you david.. i will try to re-encode the video.

and about the 2nd issue of my post before.. what am i missing? :(
the audio don't stop playing even when i moved my camera to my girlfriend's pet, Stuart the rabbit. :(

 

Compiling a simple project example not tracking image target

November 29, 2012 - 6:14pm #9

For maximum compatibility across platforms we recommend (on the readme.txt) to use H.264 for video encoding, AAC for audio encoding and that the everything should be packaged on an MPEG-4-like wrapper. We have found that ".m4v" works well on iOS, Android and Unity while ".MP4" often needs to be re-encoded when imported on Unity.

Things that the developers should stay away from: H.263, AVI, WMV, MKV.

Also many devs have had success using the Handbrake transcoder and configuring this using its iPhone video settings. 

Compiling a simple project example not tracking image target

November 29, 2012 - 6:01pm #8

hi all. i have discovered the problem. everything is about codesigning. i enrolled the developer member and pay $99. now everything goes well.
(before this post, i used a trick in this site  http://iphonedevwiki.net/index.php/Xcode#Developing_without_Provisioning_Profile )

but now i found other new problems:
1. my m4v video played with terrible graphic in VideoOnTexture mode. like the video frames twisted 100 times. and we can not see anything at all except a random colors in the rendered video.
- vuforia sample video played perfectly..
- it is portrait oriented video
- when it is double tapped then video played in full screen mode perfecly. no problem
- the audio played great. much much better than in android devices :)
i thought its because of convertion error when i made the m4v.. is there any rule about the video we use in the videoplayback?

2. the video just like still playing in the background even when i moved the camera away from trackable. because i still hear the audio. only, the graphic not comes out.
what should i change in the script? because, it runs well in android

XCode 4.3.3
iOS 5.1.1 - ipad3
Unity 3.5.6f4
OSX Lion 10.7.4

regards
sorry for bad english
and thank you so much 

Yoze

 

Compiling a simple project example not tracking image target

November 28, 2012 - 3:36am #7

Hi Yozelectric,

Ok you need to provide more information than this:

  • what did you change recently?
  • what does the xcode log say?
  • has it loaded the dataset?
  • have you tried on other devices
  • have you tried building the samples such as video playback?
  • have you tried your dataset elsewhere within the standard samples?

N

 

Compiling a simple project example not tracking image target

November 27, 2012 - 5:00pm #6

happens to me also... until today.. my app started and run the camera normally.. but my trackables are not detected.. the app just like accessing the camera and not doing anything... what happened to my app :(

xcode 4.3.3
iOS 5.1.1
Unity3D 3.5.6f4
using videoplayback unitypackage

 

Re: Compiling a simple project example not tracking image target

May 15, 2012 - 11:17pm #5

**the old version of vuforia for unity is just a .unitypackage has nothing to do if i install new version

I just solve the problem, will be fine if QDevNet specify "in order to test Vuforia 1.5 you need to generate a .mobileprovision certificate", I say this because i have my ipad with jailbreak and i dont need a certificate for deploy apps into my ipad; I did not believe that certificate was necessary in order to detect the imagen target :)

Re: Compiling a simple project example not tracking image target

May 15, 2012 - 6:24pm #4

Be sure to uninstall any older versions before installing from a newer version of the SDK.

Can you post a log of your build and run session from XCode?

Re: Compiling a simple project example not tracking image target

May 15, 2012 - 6:17pm #3

I have the same probleme with ios (ipad2) but only with vuforia-ios-1-5-9.unitypackage when i test old version of vuforia-ios 1.0 works perfect detect the imagen target
even when I compile the example like imagen target its not working :(

i try vuforia-adroid-1-5-10.unitypackage and works perfect with my htc android

the problem is only with ios and the last version of vuforia

osx lion 10.7.2
xcode 4.2.1
unity3.5
ipad2

Re: Compiling a simple project example not tracking image target

May 9, 2012 - 1:28pm #2

Did you set up your dataset to be both loaded and activated (ARCamera Inspector view)? See the "Adding Dataset Load to Camera" section in the Getting Started guide.

If it still isn't working please attach the log (Console output) from Xcode.

- Kim

Log in or register to post comments