AR Foundation. Capture Photo or Video of AR Experience for Sharing

Hello,

I am preparing a proposal for a client and I thought I better check something before I promise I can deliver it. Can you capture a photo or short video of an AR Foundation experience to save to a device to share with others. If so is it a difficult process? Is it documented somewhere? It must be able to be done somehow as Unity themselves shows a video to demonstrate AR Foundation on their website but I don’t see it prominently mentioned anywhere on the forums or the Unity site.

Thank you in advance for your help. :slight_smile:

This sounds like a general Unity question and not specific to ARFoundation. iOS has a built-in mechanism to capture a screen recording. There are many free and paid apps for Android which do this. If you want to capture a Unity app programmatically (which I think is what you want to do), there are 3rd party solutions on the Asset Store. A quick Google search turned up this one, for example.

1 Like

sorry but he is right. i am trying in the past few days to understand how to capture the screen and i cant manage to get it.

  • should i use the ARCameraBackground with a Graphics.Blit()?
  • should i direct the render into a renderTexture?
  • should i create another arsession in parallel?

i managed to copy all the virtual content into a screenshot, but not the augmented one.

any direction would help thanks

Here some references, which might be useful for you:
You can access the Camera image on CPU
tdmowrer also added a script for saving an image , but there are also other options. b.e. you can also use a unity method for capturing images.

ScreenCapture.CaptureScreenshotAsTexture()

As far as I know you can use on iOS the replay kit to record videos.

Capturing an image works pretty well, however I failed to record a video on android. I tried NatCorder, but it doesn’t work with ArCore. If someone got good recording results with ArCore I’d appreciate some advice.

my friend , you are only proving my point :slight_smile:
the unity API of ScreenCapture is the expected API that i dream of having. but since ArFoundation uses different computer vision calculations, I expect them to expose a simpler API call for us.

actually, i have eventually used ScreenCapture, but i had to remove all the redundant UI, make the snap, and then bring the UI again. this is a hassle. we should have a simpler way to do so.

It seems that the owner isn’t looking for this topic, but I wanna ask. Based on the same issue. Like Pokemon GO, you can open your camera, place the Pokemon on the ground and take a picture of it. As far as I search for it, I couldn’t find anything that could help me at all. My idea wasn’t to get a screenshot with all the UI there, was simply to take a photo, like your camera could do and save or share somewhere. And Pokemon GO was built in Unity, I would love to learn how they do it.

1 Like

Hi,

You can disable the UI when you take the screenshot. And enable it when it’s done.

Best,
Alexis

Just use Natcorder on the asset store… It will save you a lot of headaches and it doesn’t record the UI so that problem is solved too.