Getting started with Unity3D

Screenshot of the scene made with Unity3D. Video at the end of this post.

In my previous post, I dived into UX desing for virtual reality. But in order to actually design anything for VR it’s good to understand the basics of the 3D design. Unity3D and Unreal Engine are probably the two most used tools and game engines for VR. I had no preferences which tool to use so I picked Unity which felt somehow easier to start with. There are also plenty of tutorials and documentation available for Unity. I’m also Mac user andm Unity seemed to work with MacOS High Sierra pretty well. So I downloaded Unity 2017.2 and started to draft my first scene.

Understanding 3D

Before jumping from 2D world to 3D world, it’s good to understand 3D basics. Luckily, I do have previous experience of 3D design and coding. In the early 2000, I worked for a company called Cadmatic which was a good introduction to the 3D CAD world. The basics are the same whether to use 3D CAD or 3D game modelling tool. The difference usually is that in CAD models the 3D assets may not be so high-fidelity, but instead they can contain huge amount of data (parts, blueprints, technical details) which can be used for maintenance and e.g. material listings.

There are many 3D modelling software in the market for different price and for different purposes. Some of those can be used for for creating realistic looking high-fidelity 3D models and some of those are for something else.

I have used Blender, mostly because it’s free and you can do amazing things with it if you have enough time to learn it. I can’t say, I’m Blender expert, but I have managed to do couple of things in the past for different purposes. Here are few examples:

Google Chromecast modelled with Blender

Olegtron 4060 modelled with Blender

Motion tracking with Blender

Blender is a great tool to create amazing photorealistic 3D renderings, 3D assets and even movies (none of my examples reach that level, but web is full of great looking examples). My examples here are rather simple, but even with simple models, it’s usually good to understand things like how materials, textures, lighting, shading and camera work. I have also photographing background, which is a great hobby to understand lighting and composition.

Having previous experience of 3D modelling, software development and photographing really helps to get started with Unity3D.

Goals for my first Unity Scene

Before I usually start to learn something new, I want to set clear target for myself. This time I set the following goals:

Use built-in and free Unity3D assets

Create a terrain with mountains and water

Create dynamic clouds and some vegetation such as trees

Create moving objects

Create a movie like a clip using multiple cameras

So before going any further, here is a short video of what I managed to do with Unity :

My first scene made with Unity3D. Note that framerate has dropped a bit because I recoded the scene using QuickTime player.

What you see in the video was created in 3–4 evenings/nights. I think the result is quite nice especially because the starting point was that I had zero experience of Unity. It usually takes some time to even learn basics such as keyboard shortcuts and how to even navigate within the UI but this time it was quite easy.

Using Unity3D

Unity user interface is quite clear. You can organize views by dragging them to positions which works best with your working flow. Compared to Blender user interface, Unity felt bit more intuitive and at least I, didn’t have any problems with it. Blender is great, but I think there is a bit more difficult learning curve.

Unity Asset Store

I didn’t do any asset modelling by myself but Unity provides an asset store. Asset store is integrated into Unity and there are both free and commercial assets. There are also assets from the Unity such as Standard Assets for some nice to have essentials and Cinemachine asset which is needed for virtual cameras. I also searched a free asset for a spaceship and picked the one you can see on the video.

Asset store is a nice way to create even quite a stunning scenes without needing to spend hours or days to make your own 3D models. It can be used for prototyping your ideas quickly or helping you to learn Unity3D, which was my case.

Creating a Scene

Terrain creation was surprisingly simple. You can find many tutorials of that topic. There are nice built-in tools to modify terrain shapes and sculpture it to mountains and lakes. Adding textures can be done like with any paint brush tool and it’s pretty much the same work flow for trees and grass too. Tools really make easy to shape a terrain, but it’s good to have an idea first before starting the work and make sure your initial terrain plane is big enough. I made a mistake by not creating a big enough terrain plane in the beginning. So I needed to create another terrain and combine it with the first one, which wasn’t that easy task. There might be a clever way to do that, but maybe I’m wiser next time :)

Adding water was really easy too. In standard assets, you can find few different water assets. Creating an area for a water may be challenging and I spent some time to fix some parts because positioning water and shaping terrain, must match perfectly.

I wanted clouds to be dynamically generated and particles helped to achieve that goal. Usually there are many parameters to adjust and particles are always bit more difficult topic to handle right. Luckily there are also plenty of tutorials for this topic too.

I struggled mostly with spaceship movement. In the first version, I actually created spaceship movement using C# script and it was relatively easy to do with it, but for cinematic scenes, it was a wrong way. For that kind of scenes, timeline is the right answer.

Timelines for spacehip and for virtual cameras.

As you can see from the gif above, the spaceship movement and the virtual cameras are controlled using timelines. Virtual cameras can be used for overriding main camera view. You can place many virtual cameras in the scene and use timeline to controls which camera view is shown at the specific moment. I had three virtual cameras in the scene: One Dolly Track controlled camera, one camera up in the mountains and another camera placed close to the water. Timeline track also used for controlling Dolly Camera movement ie. how it moves along the dolly track (as shown in the gif). Camera view blending is also done using the timeline — is it just a cut or zoomed in like it was done in my example.

Spaceship timeline is rather simple. It defines the position & rotation of the spaceship in a specific moment. To do that, set timeline track to recording, define a key frame for a specific time and set spacehip position and rotation. That’s pretty much it. When recording is done and you play the timeline, Unity takes care of movement between user defined points. Unity allows editing all the parameters and user can switch also to animation view where animation can be edited separately.

Where to go from here?

I started to play with Unity because I’m interested in to virtual and augmented reality applications. It’s also really interesting to see how VR and AR can be used for prototyping different concepts already in a design phase. For example, architects can use VR to test different design solutions. VR may help to solve usability problems of the different products e.g. a car interior and exterior design.

I find it very interesting to see where XR applications evolve in few years, which makes UX design even more important. So the next phase for me is to try to create some sort of small application in Unity which could be really used in VR and to have there also way to interact with the 3D world using a specific input method. Let’s see what, I’ll come up.