Home Decoration

Sylvain Joly

Search Knowledge Base by Keyword

You are here:
  • Main
  • Home Decoration

Home Decoration DEMO

Just as some applications let you place furniture in your living room, you can very easily build an application with SpatialStories in which you will instantiate your desired furniture and decoration to test it at home.

In the following example, we are using the Object Instantiator Behaviour, as our assets are not interactable.

This is the hierarchy of the project. Once converting the camera into an Interactive Camera we have the ARUtilities added to the scene. Then we add the Instructions prefab and create a behaviour we name Instantiate Objects.

  1. Get your assets ready: for this demo we created some assets with Google Blocks in VR. We downloaded the FBX files and added them to the project. You can import any model you want.
  2. Create the prefabs for your behaviour: drag the assets you imported into the scene. Place them properly inside an object with the pivot at the bottom if it’s not already the case. For each asset create a corresponding cursor. In our case we just have the same model with the circle Cursor below (this Cursor is available inside the Prefabs). Now all your assets and cursors have to be dragged in your project inside a folder so they will become Prefabs. You can then delete them from your scene.
  3. Prepare the behaviour: go to the SpatialStories menu on top of Unity and choose the Object Instantiator Behaviour (see  Object Instantiator Behaviour). Add the Prefabs you want to instantiate inside the Objects to be Instantiated (add as many as you want), and put also the corresponding cursors (Cursor Visual). See what our behaviour looks like:
  4. Set your behaviour: choose whether you want the objects to be placed in the order you defined or in a random mode*. Then specify if you are instantiating only a given number or if you will be instantiating endlessly. In our case we want our objects to be placed in order, and only be placed once so we choose LIST_ORDER, FINITE and put 4 as the number of objects to instantiate. Warning: choosing random causes some Prefabs not to be placed as the system only instantiates the Number you specify and he can choose twice or more times the same Prefab.
  5. Set how objects will be placed: Here our objects should go either on the floor or on a desk so we choose OVER_A_PLANE to make sure they will be placed over flat surfaces.
  6. Click on Generate Behaviour and you will see the generated IO in your hierarchy
  7. Guide your user: link the Instructions to the generated interactions.

You can have as much instructions as you consider necessary and just show/hide them depending on what is going on with the placement of your objects. The following image shows the hierarchy of the instructions:
– Instruction 1: Indication to look for flat surfaces (visible by default)
– Instruction 2: Indication to tap on screen to place objects (this appears as soon as a plane is detected and makes the previous instruction disappear)
– Instruction 3: a text when the user finishes to place the objects (this uses the CC_CountTriggers to know when all objects have been placed)
– A last interaction hides the text when the user taps on the screen (using Touch anywhere condition).