A plain-language approach to authoring AR
The latest version of Unity MARS features the Rules workflow, a new UI view and method for describing AR layout and behavior concisely and in plain language. This provides you with a clear starting point for creating your AR experiences, and an easy way to manage hierarchies and to describe interactions.
Unity MARS helps you lay out digital content in ways that relate to the real world. By using proxies (stand-ins for real-world objects) and conditions (the criteria you set for when and how you want your digital content to interact with those real-world objects), Unity MARS looks for a good location match in the real world to place your digital content, and then triggers actions and events. With Unity MARS, you can define any set of conditions you want. We call this set of conditions a Rule.
The new Rules view provides a plain-language description of the expected real-world environment and the AR content to populate it. Here are two basic examples: “On every horizontal surface, create grass” and “On an image marker, show UI.” These simple sentences hide a fair amount of complexity from the user.
For example, in a non-Rules Unity MARS scene, you would define the “On every horizontal surface, create grass” expression using a hierarchy of objects: a Replicator (“On every”), its child Proxy (“horizontal surface”), and its child content (“create grass”).
In the Rules workflow, you can quickly set up this AR scenario without needing to understand the underlying components or having to manage the Unity MARS object hierarchy.
A real-world example
Here you can see an example of a location-based experience authored using a photogrammetry scan of San Francisco’s Memorial Court and City Hall. We added descriptive data to the scan to provide more context for this location.
You can see that our rules are simple and self-explanatory; for example, “on every window, spawn window prop.” Our goal is that anyone working on this project should be able to get a good sense of what this experience will do just by reading through the list of rules – in this case, theme this area with a Sci-Fi styling.
Providing an easy starting point for advanced elements
As well as the above functionality, the Rules workflow contains a number of additional features such as Proxy Groups and Landmarks that help you further describe and organize your AR scenarios.
Using Proxy Groups to query for real objects
A Proxy Group lets you query for a number of real objects. For example, you might need a set of real tables in order to create a virtual bridge for your character to walk across, or a series of images in an art gallery to trigger narration, or navigation to the next area of your experience.
Proxy Groups also support special conditions that operate on multiple objects, such as a required distance range between the objects in the group. The Rules workflow provides a quick way to convert an existing single-object rule into a Proxy Group, and has simple ways to modify the group’s conditions in the Rules panel.
Using Landmarks for common objects
Another advanced Unity MARS capability is Landmarks: a system for calculating more precise points and geometry within a Proxy. This concept started with Unity MARS’s face mask functionality, and the standard “landmarks” of a face: eyes, nose, mouth, and so on. As we built the face workflows, we realized that the same concept could apply to other kinds of objects (for example, an image marker has corners and edges, and more granularity is possible, such as “the bottom edge”).
Where Landmarks really shine is in groups, like the earlier example of building a (virtual) bridge between two (real) tables. In order for that layout to look believable, you need more information than just that two tables exist; specifically, you need to be able to define a scenario like “Spawn a bridge between the closest edges of the two tables.”
The Rules workflow gives you a simple way to organize this information, as shown below.
In this example, you can see a plain text description of how the AR content should be laid out relative to the other objects.
Letting advanced users take the guardrails off
At Unity we try to build for 80% of use cases, without blocking the other 20%. This means that Unity tools should be broadly accessible and well configured for what most users want to do, but we always provide a path for the most technical users to do whatever they need to do.
While the Rules workflow lets us put some guardrails, shortcuts, and best practices into the AR authoring experience, we know that our most technical users will need our systems to do things we didn’t expect, and it’s our job to not get in the way. So while the Rules workflow automates the setup of the underlying Unity MARS object construction of Replicators, Proxies, Proxy Groups, Landmarks, and Actions – and hides these objects from the Hierarchy – we know that some users will want to step beyond the simplified UI and work directly with the underlying objects. When you inspect a ruleset object, there’s an option to show these objects in the Hierarchy. Advanced users can enable this option to modify the scene setup to fit their needs.
For a full walkthrough of how to start using the Rules workflow, take a look at the Rules documentation page.
Join our webinar to see the Rules workflow in action
We’re excited to make this workflow available in the latest version of Unity MARS, and are looking forward to hearing your feedback. Join us on Wednesday, September 16 at 10:00 am PT as we dive in and show you how to use Rules in your AR project.
Learn more about Unity MARS and start your free trial today.