Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Showcase Unity - Blackmagic ATEM integration

Discussion in 'Virtual Production' started by olix4242, Dec 15, 2021.

  1. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Working on implementation of Blackmagic Atem switchers into #Unity. This is a nice way to have from 4 up to 16 cameras connected to Unity, and being able to switch live feeds based on scenes, to use a switcher control surface to switch virtual cameras and sync virtual cameras with real camera angles. It will also support Timecode in two directions, so that you can use unity to preview scenes, record switching, and have multiple video streams synced together for a later compositing. Who is working with live cameras in Unity/Unreal, probably knows that having more than one or two require a lot of horse power, and multiple capture cards, and can be pretty intensive for processing. By using a switcher, I have to deal only with a single video feed, but I can still support some pretty complex multicamera use cases. One of the main problems was dealing with a slight latency between physical switching and video feed latency that would result in virtual camera switching before a real camera. I have solved this issue by implementing a scene change detection protocol: when a switcher receives a physical command from a console button, a script checks contento of the image, and waits for it to change on an actual video feed. In this way I can sync virtual and real camera cuts perfectly on a frame basis, avoiding any problems with motion-to-photon latency. Hacky way, but it works really well and is accurate. It is also a perfect way to calculate latency of a video feed (that can be used for syncing other tools like camera trackers). A good thing is also that it can work with any Atem switcher, from a cheap ones like atem Mini, to broadcast ones. So it can be a cheap way to support multicamera setups for live virtual production and eventually been extended to big live event shows. (having an ability to use low cost switchers in a phase of home testing, and then bring a same code to a live event and use a broadcats hardware is a big plus in a covid times). A good news is that I plan to release this package for free, and include it also in my Deckard Chromakeyer package with a tight integration for VP.



    2021-12-15 02_34_09-Window.png

    DOWNLOAD PAGE
     
    Last edited: Dec 24, 2021
    LostPanda, matthewminer and newguy123 like this.
  2. matthewminer

    matthewminer

    Joined:
    Aug 29, 2005
    Posts:
    331
    This sounds really interesting. To clarify my understanding, this allows you to switch between physical cameras and their corresponding virtual cameras at the same time? That is, you could have two physical cameras connected to the ATEM, and when you switch between them, Unity receives the signal to do the same for virtual cameras?

    (I expect the video demonstrates the setup, but it appears to be unavailable.)
     
  3. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Yes. Exactly. You can have 4 cameras with ATEM MINI, ATEM MINI PRO, or up to 8 cameras with ATEM Mini Extreme (and ISO). Also, you can control switching those real cameras from Unity or Unity from switcher. So it's more like having multiple capture cards in your PC, but without an overhead of those cards and multiple video feeds. Hardware limit is that you can have only one active camera at a time. But with one additional capture card and Atem Mini Extreme, you could have actually 2 cameras active at a time (this is something that is in work right now).
    This is an explanation from my latest live streaming.
     
    matthewminer and newguy123 like this.
  4. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
  5. matthewminer

    matthewminer

    Joined:
    Aug 29, 2005
    Posts:
    331
    This looks fantastic. I look forward to trying it out (once I get my hands on an ATEM).
     
    olix4242 likes this.