Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show Dynamic Text on a Paper using Vuforia augmented for iOS and android

I have a requirement to show a text on a paper when mobile device place it on the paper ,this is basically an augmented reality feature.

There will be an maker in the paper , and the app it self will recognise the marker and should place a dynamic text which receives from server . So this text will change

So as a start i decided to move with Vuforia SDK since it has more support than any other sdks available. So i managed to run there sample apps and show there "tea pot" in my own marker ,

But now comes the hardest part , that i need to render text on the marker instead of tea pot. so seems i have two options

1) Using unity create the 2d text object 2) Using openGL render text as in teapot

So my question is what is the appropriate way to do this ?? i know OpenGL is not easy to implement , even the Unity will provide multiple unnecessary files both have pros and cons

what is the best way to this ??

like image 765
Mr.G Avatar asked Mar 09 '17 12:03

Mr.G


1 Answers

You get your text from server, let's say json file. Parse it and apply the result to a text mesh object or a Text object in a world canvas.

https://docs.unity3d.com/Manual/class-TextMesh.html

https://unity3d.com/fr/learn/tutorials/topics/user-interface-ui/ui-text

You can place those object in place of the tea pot under the image target or modify the DefaultTrackableEventHandler so that instead of affecting Collider and Renderer on child object it would do action on any object.

Look for the OnTrackingFound/Lost methods.

like image 70
Everts Avatar answered Oct 05 '22 23:10

Everts