Understanding workflow/use cases

Hi there,

I’m new to Unity Mars, but not new to Unity XR development. However, I’m having a hard time understanding the workflow for Mars, or rather how it can be useful for my use case.

I’m developing an AR application using ARFoundation. The app can roughly be described as a measurement tool. The user places virtual content anchored to planar surfaces in their environment. Measurements, annotations and other data is then displayed as 3d objects on that same surface.

How can I use Mars to help with the development of this kind of application?

I was envisioning that I could use Mars as a kind of virtual testing ground which would provide fake AR data like point clouds and planes - essentially eliminating the need to build to a device for debugging purposes… Is this the case?

Sorry if this is a stupid question, I’m just having a hard time wrapping my head around what exactly Mars is designed to achieve

Hi!

I also have much experience with AR foundation and I am taking MARS for a test drive.

I have similar questions about how to use AR Foundation AND mars. In a single app, I was hoping to do AR foundation type things when needed and use MARS as way to deal with planes, images, faces,… AND be a testing tool for the combined usage app. I am hoping that it is not separated where you can build EITHER Mars AR apps OR AR Foundation apps.

Hi there, you can definitely use MARS with AR Foundation; actually, is encouraged to use both. MARS is designed to leverage some things that ARFoundation comes with so yes; both projects can happily coexist in the same Unity project.

Being said that; MARS is a tool that (among many other things) is used for leveraging all the small details that come with Spatial Computing. like placing content on specific surfaces that have certain conditions (size for example) or simulate your AR Content in the Unity Editor instead of iteratively building and testing your AR app

Thanks.

I hope I have not HiJacked Adrain’s question.

With the addition of the Simulation View, Device View,… of Mars it is not clear to me how to build with AR foundation.

Typically, I build in the Scene View/Game View for AR Foundation as much as I can - then build for the real device.
It is kind of painful but you get used to it over time.

Maybe there is an example or brief tutorial?

Herb

Not sure which platform are you building for but another user posted a video here how to build for android; you might want to look into it. ( https://discussions.unity.com/t/797396 ) With regards to ARFoundation and MARS you will normally need ARCore / ARKit depending on your build platform. Make sure your versions match (https://docs.unity3d.com/Packages/com.unity.mars-ar-foundation-providers@1.0/manual/index.html).

The best place to get started is our docs with the getting started guide https://docs.unity3d.com/Packages/com.unity.mars@1.0/manual/GettingStarted.html

From there, the rest of the docs have small tutorials that teaches you how to do different things with MARS; for example. In the Forces docs (https://docs.unity3d.com/Packages/com.unity.mars@1.0/manual/Forces.html) we have a tutorial for setting an example scene of an AR dinner for two, we also have tutorials to get you started with Image Markers (leveraged by ARFoundation), face tracking, etc among many things supported by Unity MARS. (https://docs.unity3d.com/Packages/com.unity.mars@1.0/manual/index.html)

Thanks. I have been through most of that. I know how to setup the Player for ARKIT and build through Xcode and deal with the Signing,… I have gone through those steps more than I would like to remember. I have used AR foundation to build apps for some time.

I am dabbling with MARS, I like all the plane, images, face presets to build AR apps.

I want to extend the AR Foundation projects that I am currently building to include Mars type features (planes, images, face,… ). I was told you can but that leads to a few questions.

  1. Will my AR Foundations Gameobjects and prefabs work in SimulationView and Device View?
  2. How does the Mars workflow operate the AR Foundation stuff?
  3. Will AR foundation stuff work with Point Clouds etc?

If I can build in AR Foundation and MARS at the same time that would be helpful.

An Example of how to build in the combined AR Foundation and MARS would be helpful for me.

Hey @herbrush ,

  1. AR Foundation GameObjects will not work in Simulation (i.e. AR Foundation pipes into MARS, but MARS doesn’t currently pipe simulation data into AR Foundation). You will have to test AR Foundation features on device as usual. If you use MARS equivalents, they should work both in Simulation and on device (this is a noted issue we are aware of, but is difficult to achieve for a number of reasons).

  2. How does MARS share/work with AR Foundation: In short: When MARS runs on a device, it will either use the scene’s existing AR Foundation objects, or create ones if they aren’t there. So your existing AR Foundation content should work, and MARS will simply access those system, to setup it’s events, and pipe data into itself for Proxies for match against etc.

  3. For Point Cloud visualization, you can either use the MARS one, and/or use the AR Foundation version. The MARS version will work in Simulation, but on device will automatically create AR Foundation point cloud providers if requested.

We have internal samples, but basically the how is “just add both to a scene” and it should work. Let us know if there are any issues with this,
-Lewey

Thanks Lewey!

I am not sure that I complete understand your response - especially #2. I will do a couple of experiments to see if “should work” is really “does work”. Thanks again.