Search:

  • Portfolio
  • Blog
  • About
  • Contact

Image backgrounds in Unity

Posted date:  December 17, 2010  |  5 Comments


December 17, 2010

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.

Easily adjust Backdrop’s
distance from the camera.

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.

Seamlessly incorporate 2D
images into 3D scenes.
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.

Post to Twitter


5 Comments

zhx

yet again, another impressive tool for the unity world, thank you !!! :-)

Reply

Will goldstone

Bob this is brilliant thank you!

Reply

kjuanlu

Good work¡¡¡ Thanks

Reply

pixelplacement

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.

Reply

Lex

Thanks so much for this, man. Epic work.

Reply


Wanna say something?





  Cancel Reply


  • Recent Posts

    • Simple State Saving
      Saving the state of a GameObject(read MonoBehavior) via traditional serialization...
    • The best darn throwable object spinner
      Nothing more I can say about this release other than its a draggable object rotator...
    • Unity needed cmd-g and ctrl-g
      I've found my left hand hitting the trusty "make group" key combination in Unity...
  • Categories

    • Augmented Reality
    • General Babble
    • Unity





© 2012 Bob Berkebile (PixelPlacement™) and additional respective holders all content used with permission