Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Games Programming Creating Split-View Cameras and Camera Overlays.

Similar presentations


Presentation on theme: "Web Games Programming Creating Split-View Cameras and Camera Overlays."— Presentation transcript:

1 Web Games Programming Creating Split-View Cameras and Camera Overlays

2 Agenda Unity Coordinate System for Camera View Positioning
Creating Split-View Interface Cameras Creating and Positioning Overlay Camera Viewpoints in the Interface

3 Split - Viewport Camera Layouts

4 Unity Camera Viewport Settings
Cameras have a default viewport size and position The default height (y) of a camera’s viewport is 1, but can be adjusted accordingly in the Inspector Windowed for the selected camera e.g. y = 0.5 will fill half of the vertical display view Similarly, the default width (x) of a camera’s viewport 1 but can also be adjusted, x=0.5 will fill half of the horizontal display view The camera’s viewport position is for the bottom left corner of the viewport to be at 0,0 , this cans also be changed via the Inspector Window settings for the selected camera. Multi-camera views need to be created with additional cameras other than the Main camera

5 Camera Screen Coordinates
Default Settings Viewport Height (0..1) x 0, y 0 Width (0..1)

6 Vertical Split-Screen
Height (0.5) Viewport x 0, y 0 Width (1)

7 Horizontal Split-Screen
Viewport Height (1) x 0, y 0 Width (0.5)

8 Quarter Screen Left Top
Viewport Height (0.5) x 0, y 0.5 Width (0.5)

9 Quarter Screen Right Top
Viewport Height (0.5) x = 0.5, y = 0.5 Width (0.5)

10 Quarter Screen Right Bottom
Height (0.5) Viewport x = 0.5, y = 0 Width (0.5)

11 Quarter Screen Left Bottom
Height (0.5) Viewport x = 0, y = 0 Width (0.5)

12 Adjust Settings in the Inspector Window

13 Summary: Split Viewpoint Cameras
The default camera settings are height = 1, width = 1. position of viewport lower left corner at x=0, y=0 Settings for the selected camera can be adjusted in the Inspector Window Create and position a custom camera for each required viewport and with a name that suggests its purpose Use the width and height settings together with the position settings for the bottom left corner of the camera viewport in the main window display view.

14 Creating Camera Overlays

15 Setting Camera Overlays
Cameras have a default viewing ‘depth order’ in the scene The default depth order value for a new camera is 0 This can be adjusted for the selected camera in the Inspector Window Cameras with a higher value depth order will be shown above cameras with a lower value depth order Cameras can also be sized and positioned overlaying an existing camera via the camera’s x , y, height and width as for split-view scenarios Camera overlays need to be created with additional cameras other than the Main camera

16 Camera Depth Order result cameraOne depth order = 0
cameraTwo depth order = 1

17 Adjust Depth - in the Inspector Window

18 Overlay and Scaling Scaled camera window overlay on main camera could be used as a follow overhead camera to aid character navigation in the world

19 Summary: Camera Overlays
The default camera depth order value is 0 Depth order value can be adjusted in the Inspector Window for the selected camera Once overlay is established, camera can be sized and positioned using selected camera’s height, width, and x, y settings in the Inspector Window as for split-screen layout Small overlay camera useful as a character navigation aid in large 3d Worlds


Download ppt "Web Games Programming Creating Split-View Cameras and Camera Overlays."

Similar presentations


Ads by Google