Search Unity

ARFoundation Skybox camera or background

Discussion in 'Handheld AR' started by Edur-Games, Jan 15, 2019.

  1. Edur-Games

    Edur-Games

    Joined:
    Nov 21, 2017
    Posts:
    46
    Hi!
    Can I use a skybox as a background in the camera for ARFoundation?

    Thanks
     
  2. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    518
    The ARCameraBackground script is what renders the camera feed to the background. You do not need to use this in order to enable pose tracking. The default Unity Camera (without this script) will give you a skybox. Is that what you mean? No camera feed at all?
     
    newguy123 likes this.
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    158
    This sounds like something I want to do. Is it possible to switch between a camera feed and a skybox during runtime, ie switch of the ARCameraBackground and display the skybox, and vica versa?
     
  4. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    518
    Sure. You can either
    1. Have two cameras with different setups and toggle them OR
    2. Have one camera and disable the ARBackgroundCamera and switch the CameraClearFlags from solid color to skybox.
     
    newguy123 likes this.
  5. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    158
    Is it possible to do a LERP kind of thing between the two?
    Instead of the switch to just be instant, I'd like to fade between them
     
  6. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    475
    if you make your own material you can grab the feed in a shader and apply many types of effect to the feed including fading it out
     
  7. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    158
    Could you give me some more info on this please? Just a standard material, then stick that into the camera background?
    Or what kind of material and where do I put it?
     
  8. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    475
    You’d need to write your own shader