Geek Culture
Published in

Geek Culture

Creating an Office Den in Unity Part 1: Design and Organization

When it comes to designing a scene, it is imperative to remember that staying organized is just as important as placing 3D objects. In this article, I fill an empty room with furniture and other objects, while keeping the hierarchy clean and organized.

I have been given this empty office starter asset from GameDevHQ.

The room is built using Filebase, an ever growing asset library by GameDevHQ. I will be using Filebase for all of my asset needs during the construction of this project. There are thousands of assets to choose from. The search function is great for finding what you are looking for, and the locate feature is a fast way to let Filebase direct you to your asset in your Unity project.

After upgrading my project materials to the HDRP, I am ready to fill the scene with furniture and decorations. The overhead 3D and orthographic view is fantastic for arranging large pieces of furniture around the room. Using the side orthographic view is invaluable when it comes to placing objects on top of, or next to, other objects. Sometimes the 3D view can be visually tricky when trying to align an object perfectly to look like it is resting on a surface. A handy way to place multiple objects on one surface, is to copy the Y value in the transform after visual placement on the first object, and then pasting that height into the Y value on the other objects sharing a surface.

All of these objects will quickly create a lot of clutter in the hierarchy, so it is important to keep things organized as you work. Using empty game objects as parents for groups is a great way to accomplish high levels of organization. All objects in the scene are placed into either a Static or Dynamic parent object, depending on if they will be still or moving.

The only dynamic objects in the scene are the player and the ceiling fan.

All other objects in the static folder have sub-folders to organize things further.

The walls are separated into folders for décor or structure.

The office area is broken up into it’s own respective sections.

The desk has a sub-folder for the open drawer, which contains all of the objects in that drawer.

The lounge area has been organized in the same fashion, where the coffee table object holds the table itself and all of the items on it.

There are a lot of items in the display cases, so I broke those up into their own folders as well.

This is also great for relocating all of the objects as one if needed.

One issue I ran into was with this glass display case. See anything odd? Notice that there are glass shelves on the inside, but they are not showing through the glass doors on the front. The objects inside show through while the outer glass material hides the inner glass material.

All of the glass is using the same material. Note the option for Transparent Depth Prepass. When enabled, only the nearest transparent object will be rendered for each pixel. In this situation, the farther objects with the same transparent material never get drawn.
More on that here

In this case, I am going to disable the Transparent Depth Prepass option.

Now the glass shelves are showing through the doors as intended.

There is a ceiling fan in the room that I want to rotate when the scene plays, so I create a script called Fan Rotation.

The fan blades rotate on the Z axis, and are a child object to the parent ceiling fan .

In the hierarchy, this Circle_001 is the fan blades object, so this is what I want to attach this script component to.

Simply select the object and then drag the script on it to assign it.

I added a serialized field attribute to the rotation speed variable on the script, so I can adjust the speed of the fan in the inspector. I ended up using a value of 100 after testing.

The rotation script is simple. There is a variable to store the speed and another to store the vector rotation. Vector3.forward will continuously rotate the fan blades along the Z axis.

Here is the fan in action. I haven’t started with proper scene lighting yet, so this low quality gif is trying to capture the subtle changes happening with a single bright directional real-time light and the spinning fan blades.

I will cover lighting the scene in my next article, so I will leave off with some screen shots taken from the scene view. This desk looks to get frequent use.

An assortment of packages lay around, yet to be opened.

This guy is enjoying his coffee while thinking about what jacket he wants to wear today from his wardrobe.

The lounge is a nice place to relax, eat and do some reading.

It looks like a game of chess has been left unfinished.

There are a number of firearms around the room. It makes me think there are objects of value here and the owner isn’t afraid to defend himself with lethal means if necessary.

This low display case appears to have some ancient scrolls, stone tablets and medieval weapons.

There is a tall display case dedicated to artifacts from India.

There are more display cases with an assortment of treasures from around the world.

I hope you join me in my next article where I begin to light the scene. Thanks for reading!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store