Creating Floor Plan Screenshots

As we craft the puzzle structure for RedFrame, artificial it’s very useful to have a birds-eye view of the environment so that we can better see how puzzles physically relate to one another. I spent some time over the weekend creating a simple Unity editor script that allows me to export two very large screenshots, one for each floor of our house environment. The script creates a new downward-facing camera, sets it to orthographic mode, and adjusts its near and far clips planes to cut out only the vertical section of the house that I’m interested in. It then manipulates the camera’s projection matrix to produce an oblique projection. This oblique perspective makes it much easier to see walls and determine height, and has the fun side effect of making it feel like a top-down RPG.

Rather than capturing an image with Unity’s built-in Application.CaptureScreenshot method, I instead chose to render to a much larger off-screen RenderTexture with a square aspect ratio. This way I can guarantee that the resulting images will always be the same dimensions, regardless of how the Unity editor windows are set up.

I combined the two floor images in Photoshop as separate layers, and gave the top floor a slight drop shadow. I can easily toggle between the top and bottom floor by hiding the top layer. I’ve created additional layers in which I can create diagrams and notes. As the environment evolves, it’ll be very easy to re-run the script in Unity, producing a new pair of screenshots that can be dropped into the same Photoshop file.

You can download my floor plan screenshot script here. It was written very quickly, so if you see room for improvement please let me know!

RedFrame-House-Map

Posted in Design, Pipeline, Programming

Leave a Reply

Your email address will not be published. Required fields are marked *

*