In this tutorial we will learn how to create a 3D structure in Unity, and map it inside Millumin. Of course, you can use other technologies to do so, such as Cinema 4D. General info on this tutorial.
You must run Millumin V3 and Unity version 2018.1 (or above). You can download this complete project here to have a full demo, or follow the instructions below.
First of all, install the plugin for Unity : simply open Millumin, go to Preferences/Addons and select "Plugin for Unity" :
Let's start by creating an empty Unity project. Open Unity, and create a new project (File → New Project) and select the 3D template.
You should now have an empty scene with a Camera and a Directional light. Let's add a cube for our structure mapping (Right click inside the hierarchy view)
Press the "Play" button at the top of your Unity window. You should see something like this :
The cube is a bit small and we only see a single face of it. To make a nice-looking mapping we want to have as many faces visible as possible.
Select the cube element and go inside the inspector view. Scale its different axis to 3 and rotate it 25° along the Y axis.
We now see two faces of the cube.
Let's make the top face visible by moving the camera at 4 on the Y axis and rotating its X axis of a 25° angle.
This is the scene you should have now :
Before importing the Millumin Plugin we want to make sure our Unity project has the right settings.
Go to File → Build Settings → Player Settings → Other Settings :
- Uncheck "Auto Graphics API For
- Set the "Scripting runtime version" to .Net 4.x Equivalent
Now, and import Millumin plugin via the "Assets" menu (Assets → Import Package → Millumin)
Select your camera and add the Structure component from the Millumin option
The structure node property represents the part of your scene that will be sent to Millumin. In our case, we want to send the cube
The setup is done. Push the play button and open Millumin V3. Go to the output Menu, add a structure using the '+' button and select Unity as input.
You're done !
TipsFor structures with multiple elements, create an empty object named "Structure", and link it to the structure plugin. All children of this element will be sent to Millumin.
When you're done crafting your scene, change the Render mode property of the plugin to "Send Only". This will skip the Unity rendering preview and give you better performance.