Log in or register to post comments

Import my own trackable ImageTarget

May 17, 2011 - 10:29am #1

Hi guys,
I'm trying to get a trackable working, that I made thanks to the "my tackables" from the website. Here's what I do : I create a new project with the ImageTarget sample and then import my trackable (*.unitypackage).
So stones and chips are resized by the new config.xml file to "200 200" and then I'm not able to get my app working anymore, I mean once I build the apk and push it to the phone all I got at runtime is just the camera view without any 3D models displayed.
And if I resize to the previous scale images (chips and stones) or even use my own trackable, it doesn't work. But before I import my trackable, everything works just fine.
Any idea?

Re: Import my own trackable ImageTarget

August 19, 2011 - 12:33pm #22

Hi Peter,

You're right that Unity 3.4 and QCAR1.0.0.6 fix this issue. I am able to modify and reimport the my Trackable package with no crash at all.

Thank, that saves a tone of time.

Truyen

Re: Import my own trackable ImageTarget

August 16, 2011 - 6:25pm #21

Hello,

You application will not crash with 1.0.6 and Unity 3.4 or 3.3 . Also try recreating your trackables with the online tool. Please let me know if this fixes it. You may also want to try reducing the length of your trackable names if they are long.

Thank you,

-Peter

Re: Import my own trackable ImageTarget

August 16, 2011 - 6:16am #20

Hello Peter,
Thank for the reply and sorry that I could response earlier since I had an issue when login in to this forum.
Regarding your reply:
You should not have to reconstruct your entire project when changing the QCAR resources file. Please try updating to the new 1.0.6 QCAR Unity extension released this week and Unity 3.4 .
Just a clarification before I do this. If I import 1.0.6 QCAR to my current project running Unity 3.4 (the project already has a previous version of 1.0.6 QCAR), will the application crash like before I mentioned? well, just a worry since there are a lot of work to do in this project and It does take a long time to re-do it.

Thanks
Truyen

Re: Import my own trackable ImageTarget

August 11, 2011 - 12:38pm #19

Hello Truyen,

You should not have to reconstruct your entire project when changing the QCAR resources file. Please try updating to the new 1.0.6 QCAR Unity extension released this week and Unity 3.4 . Let me know if that fixes your issue. If not or you cannot update your system, please send me your target resources package to

and we can take a look.

Thank you,

-Peter

Re: Import my own trackable ImageTarget

August 9, 2011 - 10:12am #18

Hi Peter,

Thank for the good new Peter. I'll keep an eye on that.

When you said:
You do need to rebuild your project after importing new target resources.

Does it mean after import in Unity go to File -> Build&Run?

If it is, then I already did that and the issue still there? If it is not, then please help to elaborate more.

Thanks
Truyen

Re: Import my own trackable ImageTarget

August 9, 2011 - 10:07am #17

Hello Truyen,

You do need to rebuild your project after importing new target resources. The good news is that we will be releasing a maintenance release of the QCAR Unity extension shortly that is compatible with Unity 3.4. Unity 3.4 builds much faster I have found. Please keep an eye out for our maintenance release.

Thank you,

-Peter

Re: Import my own trackable ImageTarget

August 9, 2011 - 9:45am #16

Hi Peter,

Thank for your response. Here is the details

Can you describe what you mean by "whole application doesn't work."?
That means I can install the deploy pak to Dell Streak (Android) but When I run the application and point the camera to the trackable image, nothing is render. No 3D objects render.

Does the unitypackage import correctly? Are you checking that the ImageTargets are still assigned to trackables in the "Image Target Behavior" script attached to the ImageTargets?
It is Peter, All the Image Targets are assigned (having new trackable images added).

Can you check your config.xml when it is working and after importing the new package? Do you see the expected changes?
I do see the expect changes, some mores tags are added.

I don't know the reason, it's weird. What I can do now is to build the whole project again every time I change the My AR Trackable. It's time consuming!

Thank you,

Truyen

Re: Import my own trackable ImageTarget

August 9, 2011 - 9:31am #15

Hello,

Can you describe what you mean by "whole application doesn't work."? Does the unitypackage import correctly? Are you checking that the ImageTargets are still assigned to trackables in the "Image Target Behavior" script attached to the ImageTargets?

Can you check your config.xml when it is working and after importing the new package? Do you see the expected changes?

Thank you,

-Peter

Re: Import my own trackable ImageTarget

August 8, 2011 - 11:38am #14

My case is little bit different.

I import a custom package downloaded from my trackable => work ok.

Then I need to add more images to the custom package => I then redownload the package again => import => the whole application doesn't work.

I don't know whether this is the Unity issue or the QCAR ?

Any help is very much appreciated.
Truyenle

Re: Import my own trackable ImageTarget

May 18, 2011 - 1:11pm #13

Ok! Thanks guys! I'll try to find a way to get my trackable working...

Re: Import my own trackable ImageTarget

May 18, 2011 - 10:41am #12

That's correct.

- Kim

Re: Import my own trackable ImageTarget

May 18, 2011 - 10:38am #11

So the dat file actually is being fully overwritten, not appended?

Re: Import my own trackable ImageTarget

May 18, 2011 - 9:51am #10

It is a bit tricky overwriting existing target files, if other targets (ones with different names) are currently being used in your scene. You'll notice that the existing target names get written into the config.xml file, even though the tracking data is no longer available in the qcar-resources.dat file. After importing the files, I suggest changing all the targets in your scene to valid targets (ones you just downloaded) and then hand-editing the config.xml file to remove the old entries. This is something we'll try to improve in a future update.

- Kim

Re: Import my own trackable ImageTarget

May 18, 2011 - 9:07am #9

I'd just done the same on an instance of the imagetarget sample and am not seeing any updating of the TrackableBehaviour.Status, which I'm logging in the DDMS. Also the dat file mod date/time isn't updating on the file system, even after closing Unity. So I have the suspicion that it's being corrupted with the import. It appears that the import attempts to modify the existing resources rather than replace them - e.g. the config file in my project was updated with the new resource, not overwritten.

Kim will know more about what should be happening when importing new Unity package resources on top of existing resources. My advice at this point would be to remove the old dat and config files prior to the import, so that you're starting fresh.

Re: Import my own trackable ImageTarget

May 18, 2011 - 8:35am #8

Well, when I import the unitypackage the window pops up with the config.xml, the qcar-resource.dat and my image.jpg listed, I select them all and then click on import, so current config.xml and resource.dat are replaced by the ones in the unitypackage.

Re: Import my own trackable ImageTarget

May 18, 2011 - 7:03am #7

When you'd imported the new trackable, did you retain the original qcar-resource.dat file in [Project Path]\Assets\StreamingAssets\QCAR ?

I'm wondering if your project is actually building with the old resource.

Re: Import my own trackable ImageTarget

May 18, 2011 - 5:12am #6

I'm using Unity 3.3.0 with the latest version of the Extension. Also my trackable is rated 5 stars. The devices used is a Nexus One running gingerbread 2.3.3.
I'll try dragging out a new ImageTarget prefab and see what happens then. Thanks!

Re: Import my own trackable ImageTarget

May 18, 2011 - 4:56am #5

A couple questions:

Are you using the latest version (1.0.0) of the Extension?
What version of Unity are you using?

You may want to try dragging out a new ImageTarget prefab and using that, if all else fails. When you select your target name from the drop down the target should automatically resize and retexture accordingly. Then you can bind your 3D content as a child of the target.

- Kim

Re: Import my own trackable ImageTarget

May 18, 2011 - 12:36am #4

I'm working from the ImageTarget sample, so every scripts are already set. I'm just trying to replace the chips trackable by the one that I made.
And choosing my trackable from the drop down list in the Inspector is what I do actually.

Re: Import my own trackable ImageTarget

May 17, 2011 - 7:11pm #3

Also make sure you are selecting your trackable from the drop down list in the Inspector. Click on the ImageTarget, there should be an ImageTargetBehaviour script in the Inspector window, and an Image Target field with a drop down containing the target names you created with the My Trackables system.

- Kim

Re: Import my own trackable ImageTarget

May 17, 2011 - 4:22pm #2

Have you attached the necessary scripts to the targets and camera? These come attached in the samples, but need to be added manually when constructing a new project.

The scripts that I'm referring to are the tracker and camera device behaviours, init error handler and camera device menu - on the camera - and the image target behaviour and trackable event handler on the trackable (i.e. the target). Take a look at the scripts used for the samples and make sure that they're also present on the camera and image targets in your project.

Log in or register to post comments