

{"id":9729,"date":"2021-01-18T13:43:30","date_gmt":"2021-01-18T17:43:30","guid":{"rendered":"https:\/\/sites.temple.edu\/tudsc\/?p=9729"},"modified":"2026-03-16T14:39:35","modified_gmt":"2026-03-16T18:39:35","slug":"creating-a-virtual-environment-in-blender-and-unity","status":"publish","type":"post","link":"https:\/\/sites.temple.edu\/tudsc\/2021\/01\/18\/creating-a-virtual-environment-in-blender-and-unity\/","title":{"rendered":"Creating a Virtual Environment in Blender and Unity"},"content":{"rendered":"\n<p>Posted on&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20250122234316\/https:\/\/sites.temple.edu\/tudsc\/2021\/01\/18\/creating-a-virtual-environment-in-blender-and-unity\/\">January 18, 2021<\/a>&nbsp;by&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20250122234316\/https:\/\/sites.temple.edu\/tudsc\/author\/tuf70655\/\">Evgeny Kukshinov<\/a><\/p>\n\n\n\n<!--more-->\n\n\n\n<p>As I promised in my previous&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20250122234316\/https:\/\/sites.temple.edu\/tudsc\/2020\/11\/13\/types-of-vr-research\/\">blog<\/a>&nbsp;post, I will explain how I created a virtual environment (VE) in Blender and Unity for my study. It is a&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20250122234316\/https:\/\/sketchfab.com\/3d-models\/vr-studio-draft-391423e6543b456baf77305ab8a075e1\">virtual replica<\/a>&nbsp;of the VR studio at the&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20250122234316\/https:\/\/sites.temple.edu\/tudsc\/\">Scholars Studio<\/a>&nbsp;which can be used as a transitional space to other VEs, ensuring a more immersive virtual experience.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Blender<\/strong><\/h2>\n\n\n\n<p>Because I needed to make a&nbsp; specific room, i.e. with specific measurements, I had to model it separately. One of the ways to do this is via&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20250122234316\/https:\/\/www.blender.org\/\">Blender<\/a>, an open-access 3d-modeling software. Although Blender is not the most precise tool for 3d modeling, it is useful to know how it works because it is quite multifunctional. In general, all transformations are based on moving, scaling, and rotating, not just the object itself, but&nbsp; its elements (or a combination of them), i.e. vertices, edges, and faces.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1018\" height=\"536\" src=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Screenshot-2025-11-17-115906.png\" alt=\"\" class=\"wp-image-9733\" srcset=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Screenshot-2025-11-17-115906.png 1018w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Screenshot-2025-11-17-115906-300x158.png 300w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Screenshot-2025-11-17-115906-768x404.png 768w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Screenshot-2025-11-17-115906-850x448.png 850w\" sizes=\"auto, (max-width: 1018px) 100vw, 1018px\" \/><figcaption class=\"wp-element-caption\"><em>Image taken from Blender.org<\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<p>One of the ways to recreate a room in Blender is to use blueprints or some version of it (also you will need to add a one m^2 reference square, as the red one seen below). Before you start modeling, you need to change the dimensions of the initial cube (it appears in every new project), which sides are two meters long, to make them one meter long. Pressing the [N] button (in the \u2018object\u2019 mode, which can be changed by [Tab]), the dimensions should be put down to 1x1x1 (not scaling).&nbsp;<\/p>\n\n\n\n<p>After that, you can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add an Image \u2192 as Reference.<\/li>\n\n\n\n<li>Then, using the existing reference cube, you need to scale [S] the image scrolling enough so the cube is placed above the 1m^2 square.<\/li>\n\n\n\n<li>Also, use [G] to move around the cube.<\/li>\n\n\n\n<li>All of that should be done in the object mode that can be switched to by [Tab].&nbsp;<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"843\" height=\"490\" src=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/1-1.png\" alt=\"\" class=\"wp-image-9734\" style=\"width:602px;height:auto\" srcset=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/1-1.png 843w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/1-1-300x174.png 300w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/1-1-768x446.png 768w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Extruding walls<\/h2>\n\n\n\n<p>Now, you can use the cube you have to make one wall but before that you need to know the height of your room to make this first wall or column. Once you shape the cube into proper dimensions (doorway or windows can be done later), you can start extruding [E] faces to make the other walls from the same object. One of the reasons why it is necessary to use Blender instead of Unity3D is because not all angles of the room I need to design are 90 degrees.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Doorway and windows<\/h2>\n\n\n\n<p>Creating a doorway and\/or a window is possible via the modifier \u201cBoolean\u201d with \u201cDifference\u201d option:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, it is necessary to shape a new object into the shape of the hole you need to make in the room<\/li>\n\n\n\n<li>Place the properly shaped new object inside the relevant area in the wall<\/li>\n\n\n\n<li>Then, you need to choose the room in object mode, add modifier and add a new shaped object into modifier slot which will cut the hole by \u2018Apply\u2019ing the modifier.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"930\" height=\"633\" src=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/2.png\" alt=\"\" class=\"wp-image-9735\" style=\"width:760px;height:auto\" srcset=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/2.png 930w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/2-300x204.png 300w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/2-768x523.png 768w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/2-850x579.png 850w\" sizes=\"auto, (max-width: 930px) 100vw, 930px\" \/><\/figure>\n<\/div>\n\n\n<p>In the end:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Make a surface for the floor (while not creating a ceiling until Unity) with a plane<\/li>\n\n\n\n<li>Delete the reference blueprint.<\/li>\n\n\n\n<li>Also, it is essential to go to Object\u2192 Apply \u2192 Scale to set the current model measures as default.<\/li>\n\n\n\n<li>After that, you can export the model as a .fbx file which can be imported to Unity.&nbsp;&nbsp;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Unity<\/strong><\/h2>\n\n\n\n<p>To start, you will need to create an account and install&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20250122234316\/https:\/\/store.unity.com\/?_ga=2.264049804.1238834299.1608135591-1307298730.1607561295#plans-individual\">Unity3D<\/a>. The basic version is free to download and use. In general, you can get most of the objects you need (including some basic room or even entire VEs) in the&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20250122234316\/https:\/\/assetstore.unity.com\/\">asset store<\/a>&nbsp;that also has free objects and other VE elements. The only job is to place them in a way that suits you, i.e. moving, scaling, and rotating objects.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"807\" height=\"160\" src=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/MoveRotateScaleTransform.png\" alt=\"\" class=\"wp-image-9736\" srcset=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/MoveRotateScaleTransform.png 807w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/MoveRotateScaleTransform-300x59.png 300w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/MoveRotateScaleTransform-768x152.png 768w\" sizes=\"auto, (max-width: 807px) 100vw, 807px\" \/><figcaption class=\"wp-element-caption\"><em>Image taken from Unity<\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<p>When you start a new project in Unity, you will see a new empty scene that only has a basic camera and a source of light. All of that can be seen in the Hierarchy window (usually on the left side), which includes all elements used in your scene. Usually on the bottom, there is a project window with all the files that you have and can use. Usually on the right side, there is an inspector window which displays all the information about a selected object.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"460\" src=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/3.png\" alt=\"\" class=\"wp-image-9737\" srcset=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/3.png 901w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/3-300x153.png 300w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/3-768x392.png 768w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/3-850x434.png 850w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><\/figure>\n\n\n\n<p>Most of the objects (in .fbx format) I used in Unity I downloaded from cgtrader.com or other similar websites that have free 3d models. But, if you need more detailed and specific models, then you can create them in Blender with more training. To note, downloading assets in the last version of Unity is possible only through the website but uploading should be done in Unity through Package manager, i.e. it is confusing.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Materials<\/h2>\n\n\n\n<p>Once you have all the objects you need, you can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Put them in your scene and see how it looks.<\/li>\n\n\n\n<li>If you export objects outside of the Unity asset store, extract materials of the objects (can be seen in the Inspector menu on the right side), which will then allow you to manipulate them.<\/li>\n\n\n\n<li>Manipulate two main qualities in the materials that are smoothness and metallic features, which is basically the level of how reflective the object is.\u00a0<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Lighting<\/h2>\n\n\n\n<p>The way your scene looks heavily depends on how you manipulate the materials\u2019 features and how you place your lighting. Each new scene in Unity has a basic camera and a lighting source, or the directional light.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Default\u00a0<em>directional light<\/em>\u00a0is basically a sun in Unity, if you rotate it, it will change the light as if the daytime changes. There are other sources of light that can be added and that will help to lighten up your space (unless it is not an outside space).<\/li>\n\n\n\n<li><em>Point light<\/em>\u00a0basically lights up everything around its range.\u00a0Point lights with lower range and intensity (all can be changed in the Inspector) can be used in the lamps to add a glowing effect.<\/li>\n\n\n\n<li><em>Spot light<\/em>\u00a0is like a flashlight, it is a good option to use for many lamps and other light sources.\u00a0<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"557\" height=\"374\" src=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Light-Point.jpg\" alt=\"\" class=\"wp-image-9747\" srcset=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Light-Point.jpg 557w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Light-Point-300x201.jpg 300w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"376\" src=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Light-Spot.jpg\" alt=\"\" class=\"wp-image-9748\" srcset=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Light-Spot.jpg 558w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/Light-Spot-300x202.jpg 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><figcaption class=\"wp-element-caption\"><em>Images taken from Unity<\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Animation<\/strong><\/h2>\n\n\n\n<p>If you need to include, for instance, a moving object into your VR scene, it is easy to do with animation.&nbsp;First, you need to add an Animation via the Window menu. Save the animation file into a separate folder as much as any other type of objects in the Project window. Once you choose the object you want to make a simple animation with (like moving back and forth):<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select the object<\/li>\n\n\n\n<li>Push the Record button<\/li>\n\n\n\n<li>Double-click on the timeline in how many seconds you want the object to move<\/li>\n\n\n\n<li>Physically move the object to that position.<\/li>\n\n\n\n<li>In the end, you need to copy the initial keyframes of the object so it could come back to the position it was before.<\/li>\n<\/ul>\n\n\n\n<p>To note, the timeline in the animation window is in seconds (1.00 is one second).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"942\" height=\"216\" src=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/4.png\" alt=\"\" class=\"wp-image-9749\" srcset=\"https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/4.png 942w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/4-300x69.png 300w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/4-768x176.png 768w, https:\/\/sites.temple.edu\/tudsc\/files\/2025\/11\/4-850x195.png 850w\" sizes=\"auto, (max-width: 942px) 100vw, 942px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">VR camera<\/h2>\n\n\n\n<p>To use this environment with a VR headset you will need to replace the basic camera with the VR one. For that you need to go to the Build setting -&gt; Player setting -&gt; XR (and install XR management plugin). If you use Oculus headsets, you can install the&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20250122234316\/https:\/\/assetstore.unity.com\/packages\/tools\/integration\/oculus-integration-82022\">Oculus Integration<\/a>&nbsp;asset to get the VR camera. After that, you can replace your basic camera with the VR one, and the VE can be used.&nbsp;<\/p>\n\n\n\n<p>In the end, creating a simple virtual environment can be done just in Unity with existing models and objects. Making it look and sound more realistic will take much more time and learning. At the same time, making it \u2018interactive\u2019 or creating an interface will require to learn scripting\/coding in C#. It all depends on your needs. Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Posted on&nbsp;January 18, 2021&nbsp;by&nbsp;Evgeny Kukshinov<\/p>\n","protected":false},"author":34028,"featured_media":9730,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[405,291,2],"tags":[238,518,321,519,45],"class_list":["post-9729","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-digital-humanities","category-gaming-studies","category-grad-students","tag-3d-modeling","tag-animation","tag-digital-scholarship","tag-virtual-environments","tag-virtual-reality"],"_links":{"self":[{"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/posts\/9729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/users\/34028"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/comments?post=9729"}],"version-history":[{"count":2,"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/posts\/9729\/revisions"}],"predecessor-version":[{"id":9751,"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/posts\/9729\/revisions\/9751"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/media\/9730"}],"wp:attachment":[{"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/media?parent=9729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/categories?post=9729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.temple.edu\/tudsc\/wp-json\/wp\/v2\/tags?post=9729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}