Now, we will create a marker interaction. We will have two markers: the model, as in the previous sections, and some simple text, Component Description.
For this example, we will keep it simple, and when we focus on the model's marker with the camera, it will show the 3D model. However, when we put both markers together, the description text will appear.
Because we are going to reuse our 3D model's marker, we will create another project. Inside a project, single markers can't be repeated as the viewer won't know which content it should display over the marker. Thus, we will start a new project and create the necessary interaction. Let's get started:
- In the project window, create a new project, and in the blackboard window, call it Interactive Gearbox. For this project, select two marker interactions:
As you can see, a new button will appear in the top-right corner: Separated/Together. This button will switch between the two modes (when the markers are separated and together), allowing us to place different content over the markers in each case.
- Now, from the list of markers, make gearbox_worm the first marker:
- Now, drag the Load MARKER square onto the second one to load the component_desc.png picture on it:
- Press the 3D button and drag and drop the gearbox_worm model from the scrollview's end over the first marker. This will be our content for when markers are separated:
- Now, click on the Together button to change to the content that's going to appear when we put them close to each other. You will see that the previous content will disappear from the scene:
- Repeat step 4 to place the model over the first marker.
- Select the text button and drag and drop one of the fonts over the first marker in two separate instances to create two different sets of text. Select and place them like so:
- You can make use of the camera's buttons to reduce the scene and see it from the top in order to place the text properly:
- That's it. Now, press the save button and go back to the viewer window to launch the AR. Select the current project in the grid and press the eye icon:
- Now, you will see that, when they are separated, the gearbox shows the 3D model:
- Now, when they're put together, we're shown the 3D model and the text we added earlier:
Beyond this example, this kind of interaction is very useful for complex explanations such as chemical reactions (we have different components that behave in one way when they are separated and in another way when they are together), for word-forming, for commands (we can have markers such as Component Description, Assembly, or Basic Maintenance and, depending on which one we put close to the model, different information will appear), and more.