Create custom AR Quick Look experience without using the device's camera - swift

I'm wondering if there's a way to recreate the "Object" experience when viewing a .usdz file through Apple's AR Quick Look. I want an experience that showcases a 3D object without "augmenting reality".
Some options that I'm thinking of that might be able to recreate this feature:
1) Using ARKit, disabling the camera and setting my own background with a custom image. I would then set the usdz/object in the center of the device's screen while having all the interaction functionalityfor the 3D object.
2) Web AR - recreate this 3D experience elsewhere and showcase this on a webview.
Any guidance or discussion about this is much appreciated - thank you!

You can use Google's model-viewer if you are going with the web solution. Another easy and effective solution would be echoAR (full disclosure, this is where I work). You can simply upload your models there and then get a link to thier model-view. You can upload models in different formats (obj, fbx, glTF, glb, USDZ) and it'll automatically convert it to the format you need to view on any device.

Related

What is the difference between the camera and image picker plugins?

I’m pretty new in flutter. So bear with me. I’m not sure the difference between plugin “camera” and “image picker”.
I was able to capture video and image by using “image picker”. From my perspective,”image picker” is more straightforward and easy to implement but on the internet, seems like “camera” plugin is more popular.
Then I want to ask, when it comes to taking video and picture, especially video. Is there any pros and cons? Any help appreciated!
The two plugins differ in functionality and most importantly in purpose:
camera allows you to embed the camera feed into your own application as a widget, i.e. have control over it as well.
The image_picker plugin will launch a different application (a camera or gallery application) and return a File (an image or video file selected by the user in the other application) to your own application.
If you want to implement (and customize) the camera for you own purposes, you will have to use camera, but if you only want to retrieve imagery or video from the user, image_picker will be your choice.

Focus to a object in square form using ios Camera?

Actually I need a region over camera overlay like mostly of the QR code scanner app.
And when a square box comes within it just focus and click picture from it. Any idea how to implement it. I was using the UIIMAGEPICKER class but after doing some googling I found that I need to use the AVFoundation framework. But unfortunately I am not the near one.
Any code or any tutorial will be helpful. Please let me know how can I implement this.
One more thing if i need to take picture can i make the picture only to the region size?
Yes, you are correct. You will need to use AV Foundation to implement this. Have a look at the 'Using the Camera with AV Foundation' video from the WWDC 2010 session videos, to get an overview of the framework.
AvFoundation has no Dependancies on UIKit. So you will get some nice performance increases over using UIImagePickerController. It will also give you Full Access to the camera.
When using AV Foundation you are in control of the 'Device Capture Settings' i.e. Flash as well as Focus Mode and Exposure; including their points of interest. Have a look at the Programming Guide to see how to use these, or the device behaviour may differ from what you expected.
You can also download and example of an application that uses AV Foundation to implement the camera here.
Once you're up and running with that, have a look at this tutorial to get started with the overlay on the camera.
One more thing if i need to take picture can i make the picture only to the region size?
Yes you will be able to implement this. You can also configure the AVFoundation session itself to output the lowest practical resolution.

Which formats can I use for animated 3D objects

.. in order to use in augmented reality application on iphone?
I have an app working like that; camera detects the marker and then it places an object related to that marker. However the object is not animated. It stands there. Of course i can move the object programmatically but i don't want to do that. What i want is the object has animation itself. I searched but i can't find exact file format. There are .obj files (not animated itself, is it true?), .mtl files, .anm files .etc. If the format is one of them, then can you give me an example model?
Thanks
Definitely MD2 is your best choice. I have integrated jPCT-AE and Vuforia and it works like a charm. AFAIK MD2 is best for animated models mainly because it can store the key-frame animation in itself and you can have any kind of animation with it at almost no cost.
Here is a test video:
http://youtu.be/chsHh0pEhzw
If you have more question do not hesitate ;)
You should specify what AR SDK/platform you are using to create the iPhone application you are talking about. That being said, for many of the common AR SDK available the MD2 format is often used to display animated models (either with a built in render engine or with example code that shows how to use the MD2 format with that SDK):
http://en.wikipedia.org/wiki/MD2_(file_format)
http://www.junaio.com/develop/docs/documenation/general/3dmodels/
OBJ (Wavefront) files do not support animation.

How to implement 360' show case on ios?

Ah ... where to start ,Before I learn the iphone app develop
I found a very interesting app : The Elements
You can see every object is rotatable like 3D
But it is by take many photos from every angle form objects
How to implement it ??(via Scroll view ???)
And I found Apple's new HTML5 sample
Looks like the HTML version is not smooth as the app version
Maybe it just because of the photos too less ...
So , my question is what if I have a series of pictures , how to change the picture when finger swipe the view ???And the swipe speed also effect the rotate speed.
Thanks for any reply or answers : )
I think you can look into FVImageSequence, However you may need to modify the code to auto-rotate the complete sequence.
A link to original post is here
The Elements app as described in your original question is just a sequence of photos that were taken on each degree by a professional Photographer.
hope that helps.
i think it has nothing to do with photos. Most likely its normal 3D rendering.
Nineveh GL 3D Engine allow you to import 3D objects models(like .obj models that you can create with some application like Google SketchUP) easily in your iPhone app, you can find some tutorials here. And as #GameBit said, i don't think that by changing images when the user scrolls is the best approach.

Using 3D objects in an iOS app

How would I go about adding a 3D object from Maya into an iOS app? For now, before it gets too complicated, I just want to add it in, no response to touch yet. Is there a tutorial about this? Thanks!
Edit: It doesn't necessarily have to be Maya. I can learn how to use another program.
Molecules is a great open source iOS app that uses OpenGL ES to render 3D objects that have nice touch interaction. Maybe that would be a good starting point.
Go to Xcode and start an OpenGL-ES Project.
Export your maya-model to *.obj(Wavefront)-format and use Jeff Lamarches obj-loader to create c-header files that you can include into your iPhone project!
For a more modern example of rendering 3D meshes, check out this library. It comes with an OBJ parser, so if you can export your geometry as an OBJ file, you can render and interact with it using the library on iOS. Here's a short video of the library in action.