Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Handling different aspect ratios (21:9 and 16:9)

Discussion in 'Cinemachine' started by Corvwyn, Sep 6, 2017.

  1. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    I've been working on a dialogue system using cinemachine cameras, and it's turning out quite nice. The default shot | reverse shot over the shoulder cams are basically complete now. I've also done some medium, wide and establishing shots using the group composer. I'm switching cams from script based on priority. Thanks for making this easier!

    A State Driven Camera determining state from a variable/method in addition to animator states would be excellent ;)

    Well, let's get down to my current issue. I have a 21:9 ultrawide monitor running at 3440x1440. One thing I noticed when changing aspect ratio to 16:9, is, of course, that the corners get cut, ruining the composition of my shot.

    I'm going to start experimenting, and I have some thoughts on how I might do this. I thought I'd ask here for some advice.

    I guess the simple way of doing this would be composing the shot based on 16:9, so 21:9 would simply get more content on the sides. This would kind of ruin the composition for 21:9, so I'm not tempted to choose this, being a 21:9 user and all.

    Another solution, which would probably be the best, is to recompose the shot for 21:9, basically duplicating all the cameras. I guess this wouldn't be a problem, since it's a one time job, unless the cameras need tweaking that is.
     
    Last edited: Sep 6, 2017
  2. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    Hi @Corvwyn Great question. Currently the Unity FOV is in vertical degrees. This means that it will go as wide as your display can handle and you'll see more or less on the sides based on your display. This is the situation you're having.

    We are working on a 'Physical Camera' set of attributes for the camera where you'll be able to define 'Film back' which will include ratio - like 'Super-35mm' or 'IMAX' or 'Full Frame' etc, as well as lens focal length. This will set the ratio factor on the render target - AKA the standard Main Camera in Unity.

    You can set the Game view to preview your crop / ratio here
    upload_2017-9-6_20-39-49.png

    You can make your own ratios with the + button:
    upload_2017-9-6_20-41-20.png
    You can also mask off / crop with the Main Camera, in the Viewport Rect area:
    upload_2017-9-6_20-44-34.png

    So it's doable now but the Viewport Rect is in percentages up to 1 - which isn't great. Again, the Physical Camera which is coming will allow for a much easier / more accurate setup but you can do this now, howecer kind of clunkily.

    If you want to tune it for your wide display, you'll need to adjust the camera FOV to get the width you want. The issue is, if you run your project on a 19:9 display (or 4:3 - eek!) it will crop like crazy.
     
    Azurne likes this.
  3. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    Thanks for the info @Adam_Myhill

    For the Freelook cams using a wide FOV (like the default) for 21:9 is perfect, since an ultrawide is excellent for showing more of the world.

    For dialogue cams, like closeups I'd like to have more control, since adding extra FOV could turn a closeup into a medium-closeup for example. I'll try to experiment adjusting the FOV like you suggested, since I prefer not having black bars.

    I just want to avoid getting a pronounced zoomed-in effect, like in some games. This might also provoke motion sickness in some cases if it's overdone. Getting the exact same result with different aspect ratios would be impossible, but I'd like to get it as close as possible.

    I got really annoyed playing Witcher 3 on 21:9 for example, when I got both vertical and horizontal black bars in cutscenes. Good thing there was an ultrawide patch for that, but when I think about it I kinda ruined their composition by doing this. I'm going to make sure this isn't an issue for my game though.
     
    Last edited: Sep 8, 2017
  4. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    It's a huge problem. Cinema cameras had the 4:3 guides built into the viewfinders so DP's could be aware of the crop for TV's at home. Remember 'Pan and Scan' ? what a horrible solution to the issue where DPs composed for 2.39:1

    Now in modern times we have all sorts of crazy ratio screens and issues with framing and UI / HUD - where to put the HUD on a superwide screen? Percentage based offsets from the edges? It's a really really big problem.

    I don't think there's a silver bullet in here anywhere but I do think that games should expose some of these controls in a debug so you can toggle/define letterboxing and have some overall FOV compensation - the game Battlefield does a good job of this.
     
    Corvwyn likes this.
  5. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    Oh man. Pan and scan was horrible … It's a bit depressing that it's actually the way many games handle 21:9.

    I think I'll start by creating an editor script that show guides indicating different aspect ratios. That way it's easier for me to find the right composition for 16:9 and 21:9, which are probably the most prevalent aspect ratios for desktops.

    Good idea with the debug controls. I'll check out the approach Battlefield uses.