Unity Beginner Interface overview

If you are new to Unity, read the sections bellow. Otherwise you can go directly to the next step : 

Unity Tutorial : Unity Essentials

Unity3D Interface Overview

The Unity interface is made of a toolbar and multiple tabs that all have a specific use.


Unity Tutorial : Using the Unity Interface

Scenes

In Unity, the objects are organized by scenes. A scene is a group of camera(s), geometries and lights that can be animated, modified, added or removed when the application is running. The scene can also contain UI or other interface and settings elements.


The scene is defined in the “Hierarchy” tab and saved in the “Project” as a *.unity file. Several scenes can be loaded at the same time : their content is merged and can be visualized in the Scene and Game views.

Unity Tutorial : Scenes

Scenes can be created via the menu "File/New Scene".

Scenes can be opened via the menu "File/Open Scene", by double clicking on their file in the Project tab, or by being dragged from the Project tab to the Hierarchy tab.

Scenes can be removed by right-clicking on their name in the Hierarchy tab.

GameObjects and Components workflow

In Unity, every element in the scene is called a GameObject.




Unity Tutorial : GameObjects

NB : child GameObjects can also have children, yielding a tree structure hierarchy.


NB : changing the scale of a parent GameObject affects the position of the children.

Unity Tutorial : Transforms

Unity Tutorial : Deactivate Object

Editing Transforms

The Transform component of a GameObject defines its position, rotation and scale. The Transform can be edited in several ways :


Unity Tutorial : Transforms

Cameras

When you create a new scene in Unity, a camera is created by default in the scene.


You can add a new camera in the scene via the right-click menu “Camera” in the Hierarchy tab ,


The created camera can be set-up by editing the “Camera” component in the “Inspector” tab. See the Unity documentation for more details on the camera settings : https://docs.unity3d.com/Manual/class-Camera.html. 

In Predictive Engine, only the following “Camera” component’s settings are taken into account :

You can align a camera to the current scene view by selecting the camera GameObject in the Hierarchy and calling the menu "GameObject/Align With View" (shortcut : Ctrl+Shift+F).

Unity offers a good camera controller in the Scene view. You can choose to fit the Game view camera to the Scene view camera by adding a "Scene Camera" component to your camera.

As long as the camera is selected in the Hierarchy, the Game view camera will be configured and positioned exactly like the Scene view camera.

You can define preset camera positions using Unity's presets system :


To re-use predefined presets, use the Preset selector icon on the Transform component.

Set up multiple views for stereo

Using Predict Unity enables you to create stunning realistic VR scenes or stereo rendering. To render the two eye views from Unity, you just need to define the two corresponding cameras.


In Unity, you can choose where the camera should render on the screen. There are two main ways of having several cameras rendering at the same time :





Geometries

In Unity, a 3D model is instantiated in the scene by creating a GameObject with the following components : 


See the Unity documentation for more details on the geometry settings :

You can add a preset geometry in the scene via the right-click menu “3D Object/*” in the Hierarchy tab.

You can add a custom geometry in the scene by dragging a geometry file (*.obj, *.fbx,...) from the Project tab into the Hierarchy tab. 

Lights

When you create a new scene in Unity, a default directional light is created by default in the new scene.


You can add a new light in the scene via the right-click menu “Light/*” in the Hierarchy tab.  


See the Unity documentation for more details on the light settings : https://docs.unity3d.com/Manual/class-Light.html. 

Unity Tutorial : Introduction to Lighting and rendering (Section 9 : Light types) 

In Predict Engine, only the following settings from the “Light” component are taken into account :

When using the HDRP pipeline, the following settings are also taken into account : 

Reflection Probe and Light Probe Groups are not supported by Predict Engine and will be ignored. 

Environments

The skybox (also called envmap or HDRI) is a texture that defines the background of the 3D scene.


The skybox is defined on the camera. The “Clear Flags” variable of the Camera component defines how the background is computed : 



figure A 

figure B 

Unity Tutorial : Introduction to Lighting and rendering (Section 8 : Ambient Lighting) 

Standard Pipeline

In the Unity standard pipeline, the environment of a camera is defined by a material with a "Skybox" shader. 

Unity Tutorial : Using Skyboxes

The first step to add an environment on a camera is to create the skybox material :


Unity supports 4 types of skybox shader :

(Image 1)

(Image 2)

(Image 3)

(Image 4)

Predict Engine only supports skyboxes of type "Panoramic". Other types of Unity skyboxes are converted to "Panoramic" when the scene is loaded. This conversion can result in a loss of resolution or contrast.

In the example here against, the same envmap is given in the cubemap format (left) and the panoramic format (right). Both envmaps are given in the same resolution (4K). A detail of the result in OMEN is given above each envmap.

Panoramic environments should be defined using the NESWN convention.

Once you created the skybox material, you must assign it to the camera :

You can define default skybox settings in the "Environment" section of the Lighting Settings (menu Window/Rendering/Lighting Settings). These settings will be used on every camera in your project that doesn't have a "Skybox" component with a valid material.

HDRP Pipeline

In the Unity HDRP pipeline, the environment of a camera is defined by a texture with a "Cube" shape.

Unity Tutorial : HDRP Volumes

The first step to add an environment on a camera is to set up the texture shape :

Once you set up the texture, you must assign it to the camera :

You can define default volume settings for the HDRP rendering pipeline in the Project Settings (menu Edit/Project Settings...), in the "Volume Components" section of the "HDRP Default Settings". These settings will be used on every camera in your project that doesn't have a "Volume" component with the corresponding overrides.

There are several ways of defining volumes in Unity HDRP. More details on HDRP volumes can be found in the HDRP documentation :

https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/manual/Volumes.html .


Unity HDRP Volumes can be defined locally or globally, not necessarily on the Camera GameObject. The environment used in Predict Engine is, by order of priority :


Local volumes that are not defined on the camera will be ignored.

Materials

In Unity, materials are assets (*.mat files) that are found in the Project tab. 


You can create a material via the menu “Assets/Create/Material” or via the right-click menu “Create/Material” in the Project tab.


You can edit a material in the Inspector tab by selecting it in the Project tab. A material is defined by its shader (the program that defines how the material is lit/shadowed by a light) and some shader-specific settings.  

To set a material on a geometry, you can :

Tags : Ignore a GameObject in Predict Engine

It can sometimes be useful to add elements in the Unity scene that we want to ignore in the Predict Engine render. 

For instance, Predict Engine always uses the environment (skybox or solid colors) as a global illuminant : if there is a sun in the skybox, the scene will be lightened by the sun. In Unity, environment lighting is optional and can be replaced by a directional light in the scene, in which case you will want to ignore this directional light in Predict Engine.


To ignore an element (geometry, light, camera or other) in Predictive Engine, you just have to set its GameObject’s tag to “IgnoreInUVR”. The tag can be set on the top section of the “Inspector” tab.

Unity Tutorial : Tags