Blog

Image backgrounds in Unity

There’s many aspects of 3D interactive development that hurt my brain but two in particular have caused the most trauma after I switched from 2D: How do you use an image as a backdrop and how do you render an image in 3D so that it appears at its exact pixel dimensions. After banging my head against several near clip planes I think I’ve constructed a strong solution to both of these issues. Say hello to Backdrop.

To use Backdrop simply drag it onto a camera and set an image for it to use as your background. One of the key features of how Backdrop calculates your image is that it will precisely place it to perfectly fill only what the camera sees. What this means is that if you set your Unity dimensions to say 640 x 480 and use an image with Backdrop that is 640 x 480 then you will get the EXACT reproduction of that image within 3D space. What’s even better is Backdrop utilizes a shader that calculates alpha and ignores lighting so you could easily stack image planes that have transparent aspects.

How does a puzzle game with a Backdrop instance that contains flattened stage art sound for optimizing Unity mobile games? Need a stationary background for a platform game similar to Monster Dash for iPhone?

Get back to your roots and rely on some good ol’ 2D solutions when you need them with Backdrop.

Download

6 Comments

  1. zhx
    December 17, 2010

    yet again, another impressive tool for the unity world, thank you !!! 🙂

  2. December 17, 2010

    Bob this is brilliant thank you!

  3. kjuanlu
    December 26, 2010

    Good work¡¡¡ Thanks

  4. February 13, 2011

    Just updated with some tweaks from Scott at work to optimize and allow easy image swapping so you can change your backdrop visuals in-game.

  5. Lex
    April 29, 2012

    Thanks so much for this, man. Epic work.

  6. Dylan
    March 17, 2013

    Awesome, thanks so much, worked a treat!