Creating "backdrops" in Unity

I have a specific idea about setting up a game in Unity using “backdrops” or stage (theatre) design. It seems tedious to describe what I am going for so I have created a simple image illustrating my thinking.

6772-stage-design.png

Basically, there would be a background backdrop to display a sky, a middle backdrop to display some sort of landscape, a ground plane for the character to move around on, and a foreground backdrop to hang objects in front of the player (or camera rather), like tree branches or anything else that adds detail to the scene.

I have set this up in Unity using Unity’s Plane Game Objects and it was fairly simple to do. I then import a 2D “painting” created in Photoshop and apply them to each plane creating a stylised 3d space. My questions are:

  1. Are Planes the best thing to use for creating this kind of backdrop idea? Am I thinking about this in the right way?
  2. I am using the camera in perspective mode because I want to utilise 3D models on the ground plane. Is there a way to keep a consistent pixel ratio from painting the backdrops in Photoshop and the size of Plane I assign them to in Unity? Say my sky backdrop in Photoshop is 2000 pixels wide and 600 pixels in height. I would like to set it up in Unity to use those dimensions so there is no unintended scaling of pixels. (Hope that makes sense).
  3. Many assets would use transparency (PNGs). If the game utilised many many PNGs would that have an effect on performance?
  4. Lastly, is it possible in Unity to use scripting to scale and place these “backdrops” (being Planes or whatever is best) automatically? I used the Planes Game Object tool to place the planes and manually resized them and placed them, must be a more precise way. Also, generating a generic skeletal stage would make it more manageable to create new scenes.

Anyhow, those are my questions. I’m pretty new to Unity but comfortable with programming/scripting. Any thoughts, advice, or wisdom is greatly appreciated!

Many thanks indeed!
Mr. Squirrel

Just some random suggestions:

  • You can stack multiple camera’s on top of each other, each having their own settings (orthographic, perspective, etc.) It can eat up fill rate (important for mobile games.)
  • Planes will work. (Lots of empty space in the planes/stacked planes can eat up fill rate again.) If you can make the plane/geometry tighter around the art, it’s better for framerate.
  • PNGs are fine, they will be converted to another format on import. (You’ll have to set the textures to uncompressed to get the full png quality.)

The best way to find out whats right for you is to make some quick performance scene tests with placeholder art (on the devices you plan to release on.) These can be done very quickly (a day or so) and will give you a better foundation for your target look/device.
Good luck!

A couple of things:

For a given distance from the camera and a given field of view you can calculate height of the view…

Height = 2 * Tan(0.5 * field_of_view) * distance;

…and use the aspect ratio to get the width. The last time I used this code I think that I was sometimes off by a pixel (roundoff error?). There may be a better way.

The plane primitive from the GameObject menu has 200 triangles instead of 2. If you don’t have the tools to create one, I believe I saw a two-triangle plane for free in the asset store.