Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Removing video background

Discussion in 'Unity MARS' started by herra_lehtiniemi, Aug 31, 2021.

  1. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    Hi!

    New to Mars. I was wondering if there’s an easy way to remove video background? Interested in both:
    1) Detect human and make all other pixels in video feed transparent.
    2) Make pixels in video feed beyond certain depth transparent

    Grateful for even some vague directions on how to approach. Manipulating the video feed seems like a mystery.
     
  2. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    297
    Hey there,

    to access the camera texture you can check on https://forum.unity.com/threads/access-camera-image-and-or-environment-probes.935555/ where @amydigiov mentions that you can grab your camera image directly from
    MarsRuntimeUtils.GetActiveCamera(true).GetComponent<ARCameraManager>()


    MARS supports body tracking (iOS only), so you could perhaps use a body avatar https://docs.unity3d.com/Packages/com.unity.mars@1.3/manual/BodyTracking.html that uses an unlit shader, then after grabbing the texture (as I mentioned above) you can discern pixel by pixel which part of the image belongs to the tracked avatar and one that belongs to the camera feed.

    There are lots of way to achieve that; this is one approach. Hope it helps! :)
     
  3. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    jmunozarUTech likes this.
  4. jurianod

    jurianod

    Joined:
    Mar 3, 2022
    Posts:
    2
    Everything necessary is a couple of snaps. Open the Kapwing Studio and transfer your own video, or utilize one you found on the web to remove background from image for free. With your video layer chosen, click the "Impacts" tab and select the "Eliminate Background" choice. Utilize the see to pick the edge that best works for you, and commodity for a foundation free video.
     
  5. unity_A6D7B8B13C29E5AFCA07

    unity_A6D7B8B13C29E5AFCA07

    Joined:
    Apr 10, 2023
    Posts:
    1
    The only free tool that I found is imgaix.com
     
  6. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    176