Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Resolved Does AR Foundation support ARKit 3 Simultaneous Front and Back Camera?

Discussion in 'AR' started by HVRAT, Jul 16, 2019.

Thread Status:
Not open for further replies.
  1. mfuad

    mfuad

    Unity Technologies

    Joined:
    Jun 12, 2018
    Posts:
    332
    This video describes how to check supported configurations per device:
     
    scrant likes this.
  2. scrant

    scrant

    Joined:
    Jun 1, 2017
    Posts:
    66
    Bump @davidmo_unity any further thoughts on the above? Many thanks.
     
  3. davidmo_unity

    davidmo_unity

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    84
    The simplest way would be to set the camera facing direction and the light estimation values to the desired configuration (in this case, front-facing camera and HDR light estimation) and let the manager then push these requests through the default configuration chooser.

    The ConfigurationChooser class is intended to allow you to control the prioritization of features. Here are some rudimentary examples:

    Consider a situation where you want the a configuration that consumes the absolute bare minimum amount of power for a paticular feature set (this is what our default one tries to do). You could request a set of features and the device may give a set of configurations with differing camera configurations but you know that on the device you are working on says that the front facing camera takes up considerably less power than the back-facing camera. You could write a ConfigurationChooser that will prioritize configurations that utilize the front-facing camera over the back-facing camera.

    Another example would be that you know you will be running on older devices that support EnvironmentProbes or something like that but you also know that the cost of enabling them is extremely high and generally not worth messing with. Instead of reauthoring your scene to account for lower end devices or potentially creating a component that consumes information about the device on scene load, you could write a configuration chooser that has a list of specific devices that will not choose configurations that contain EnvironmentProbes.

    You can absolutely do that, you could activate the face tracking camera and run for a brief period to capture a reasonable estimate of the light in the environment, cache the values, and then change the to front facing camera. What you would need to account for is that Z-positive in Unity coordinate system is into the screen and so the Z-coordinate may need to be negated to put it into the right orientation.
     
  4. mfuad

    mfuad

    Unity Technologies

    Joined:
    Jun 12, 2018
    Posts:
    332
    Hey everyone, this thread has aged gracefully so we're going to close it. Check out the latest guidance provided by @davidmo_unity, and please post new threads if you have any additional questions/issues. We'll be more than happy to take a look. Cheers!
     
Thread Status:
Not open for further replies.