I'm looking for a 'basic' AR SDK that allows me to draw images and 3D shapes around the user (no matter where he is). It would be even better if the SDK includes a simple way to detect interaction with the shapes (something like onClick).
I made a project from scratch on Android but there's still a lot of work to do and I'll need to do the same on iOS after... So that's why I'm looking for an SDK or a similar project (no matter what platform).
I tested Metaio but it's quite expensive and maybe overkill for my purpose because it uses LLA coordinates.
I tested DroidAR on Android but it's only for Android and it looks heavy too (don't need the GPS).
How about Qualcomm's Vuforia? I was able to quickly get a sample project running on it.
EDIT Looks like I was wrong about what it could do. According to this (which is slightly dated, so who knows) Metaio might be your only choice.
i really don't sure what you really want to do ..but if you simply show images or 3d models on camera without any detection you can achieve this very easily i am explaining for Android and you can extend it to ios on same logic.
first approach:
you have to use custom camera of Android in your app,then use any game engine as per your need..i will suggest Jpct-ae or Rajawali
they are very simple to integrate and can be used for 2d images and 3d models.
this tutorial will explains a lot
keep the gl-surafce transparent and you can have model floating in space ...
second approach :
to add some more effect to your AR app you can use sensor values to move model in 3d space as per movement of device..it gives a cool effect.
use first approach and additionally collect sensor values and apply that matrix to gl camera of your game engine..for sensor values follow here
good tutorial here..
i hope this may help you..i done these a long time ago but try to help if you want..
Related
When I move, the mobile (AR camera) object is also moving with it. I want to avoid this. How can this be done? The object should not follow the camera of mobile devices.
I want output like this image:
As far as I know Vuforia only allows you to place objects on different types of image targets, and if i understood correctly that you want to place an object in a 3D environment without an image target
you can do that but your Cellphone must have a gyroscope, here are some pretty good tutorials you can follow here to achieve that:
http://wirebeings.com/markerless-augmented-reality.html
https://www.youtube.com/watch?v=73ImdGxHnkU
This is a very basic tutorial to start understanding AR, if you want something more complex you need to look into projects like ARCORE (Android) and ARKIT (Iphone)
I'm asked to do an app with a 3D object mapped on a tag on the camera preview. The user should be able to rotate the 3D object on swipes, and to click on different area of the 3D object.
I'm investigating the different way to do it.
So far the best option I've found seems to be https://developer.vuforia.com/resources/sdk/unity, but I can't find whether it's possible to interact with the 3d model (rotate on swipe, define clickable areas).
Has anyone any experience with that?
I guess I can do it with some OpenGL, but I have no experience with it and it seems quite complex to start off with.
Is there any other library I should consider?
I would use OpenGL and start by the training tutorials on http://developer.android.com/training/graphics/opengl/index.html. Hope this helps! If you follow these tutorials you will be able to do what you want. ive tried unity and it is a really good engine too. and of course you can make an object clickable with unity! maybe using unity would be easier but the documentation on opengl is huge and is not that difficult to implement at least with first steps. hope this helps
The Metaio SDK can do all of that but I am not sure if it automatically provides the area of the model tapped, but you could ask here.
I am trying to create a small Android app with reasonably simple AR functionality - load a few known markers and render known 2D/3D objects on top of the video stream when those are detected. I would appreciate any pointers to a library for doing this, or at least a decent example of doing it right.
Here are some leads I have looked into:
AndAR - https://code.google.com/p/andar/ - This starts out great, and the AndAR app works well enough to render one cube on a single pattern on a real-time video stream, but it looks like the project is effectively abandoned, and to extend it I'll have to go heavily into OpenGL land - not impossible, but very undesirable. The follow-up AndAR Model Viewer project, which supposedly lets you load custom .obj files, doesn't seem to recognize the marker at all. Once again, this looks very much abandonware, and it could have been so much more.
Processing - Previously mentioned NyARToolkit is great with Processing from a PC - example usage, which works perfectly for the 'here's a pattern, here's an object, just render it there' functionality, but then it all breaks down for Android - GStreamer for Android is at a very very early hacky stage, and in general video functionality seems to be a rather low priority for the Android Processing project - right now import processing.video.*; just fails.
layar, wikitude etc, they all seem to focus more on interactivity, location and whatnot, which I absolutely don't need, and are somehow missing this basic usage.
Where am I going wrong? I would be happy to code some part of the video capture/detection/rendering, I don't need a drag-and-drop library, but the sample code from AndAR just fills me with dread
I suggest to take a look at the Vuforia SDK (formerly QCAR) by Qualcomm plus jPCT-AE as 3D-Engine. They both work very well together, no pure OpenGL needed. However you need some C/C++ knowledge, since Vuforia relies to the NDK to some degree.
It basically boils to to get the marker pose from Vuforia via a simple JNI-function (the SDK contains fully functional and extensive sample code) and use that to place the 3D-objects with jPCT (the easiest way is to set the pose as the rotation matrix of the object, which is a bit hacky, but produces quick results).
jPCT-AE supports 3D-model loading for some common formats. The API docs are good, but you may need to consult the forums for sample code.
I am an android development beginner with some experience in other object oriented languages like java, python, c#. So I have created various games before in Java, using buffers and graphics to draw lines and stuff. How do I do that stuff in android? I looked at some online guides, and they all seem to create a class to extend a View object, and the class will overrule the onDraw method, where they can cause the Canvas or something to draw a line.
But what if you want to draw a line based on user input? That method wouldn't work then would it?
For example, what is the simplest code for which I could draw a circle where the user touches the screen?
Also, i was wondering what books people would reccomend for beginners, especially one that includes stuff on graphics? I user the developer site for android, but I feel a book would also help a lot to understand android? Any suggestoins?
Thank you for your time, I greatly appreciate it!
There you go, this book is definitely what you need to read: http://www.amazon.com/Pro-Android-Media-Developing-Smartphones/dp/1430232676
what is the simplest code for which I could draw a circle where the user touches the screen?
Either use SurfaceView to draw or create a custom View handling onDraw() and onTouch()
Here is a suggestion ... load the API Demos app into Eclipse and explore the Graphics demo source code. There are a large number of graphics demos.
To load the API Demos app, in Eclipse click File > New > Other > Android Sample Project.
Then select your build target such as Android 4.2.
Then from the list of sample apps select the API Demos app.
And finally click Finish.
There are over 300 demos in the app, so it can be difficult to navigate. You want to look in the Graphics section.
"Android 2D Graphics with Canvas API" by Yevgen Karpenko is pretty good for beginners.
It explains basic concepts like coordinate systems and transformations, shows how to work with text and use different graphics primitives (lines, paths, circles, etc.). It also shows how to use multiple threads in graphics apps.
Below is the link for eBook version on Amazon.
http://www.amazon.com/Android-Graphics-Canvas-API-ebook/dp/B00DKIAVK8/ref=sr_1_8?s=books&ie=UTF8&qid=1374420538&sr=1-8&keywords=android+2d
Ok my question is simple:
How do I start working with 2D graphics on android? Untill now,I found on the how to make almost anything on Android,however with graphics I see is harder.
On the android sdk website,I get some simple codes that don't really help me,and I also searched for a book,guess what,I didn't find one that actually shows you how to make a little game explaining me what does every line of code.
So: How do I start working with 2D graphics? I'm interested because I want to make some games.I would be very happy to find a tutorial for ex. that shows you how to make a little character that just jumps over a box.I know you need an engine and all that stuff,and I would actually want to learn how to make a little engine.
libGDX runs on Android (and a few other platforms) and provides high level 2D graphics features like sprites, fonts, tile maps, particles, etc.
Tutorials here.
A few complete demo games with source code here.
Here's a whole series that seems pretty decent, and starts from the beginning.
Also, the techniques of "generic" 2D programming apply, so general-purpose game engine information is useful as well.
If you are interested in android games(2d), I recommend this book http://www.amazon.com/dp/1430230428/
The following book is very good for learning 2d graphics in Android.
"Android 2D graphics with Canvas API".
http://www.amazon.com/Android-Graphics-Canvas-API-ebook/dp/B00DKIAVK8/ref=sr_1_8?s=books&ie=UTF8&qid=1374420538&sr=1-8&keywords=android+2d
It is not for game developers though.
It teaches how to use graphics primitives and work with different coordinate systems. It also has a chapter on multithreading.
It has many simple examples good for beginners.