This will be another practical lesson with several hands-on walkthroughs to explore other features of Unity that are useful for building 3D applications. This includes adding an avatar to a scene such that the user can walk in an environment around buildings; and creating a camera animation to generate a video with a pre-programmed camera flight over the scene. We will learn to import resources from SketchUp, the Unity Asset Store, and to create a 360° movie that can be uploaded to YouTube and then watched in 3D on a mobile phone via the Google Cardboard.
By the end of this lesson, you should be able to:
To Read |
|
---|---|
To Do |
|
If you have any questions, please post them to our "General and Technical Questions" discussion (not e-mail). I will check that discussion forum daily to respond. While you are there, feel free to post your own responses if you, too, are able to help out a classmate.
In Lesson 2, we introduced 3D application building software like Unity as part of a general 3D/VR application building workflow. The main role of 3D application building software can be seen in providing the tools to combine different 3D models into a single application, to add dynamics (and, as a result, making the model more realistic), and to design ways for a user to interact with the 3D environment. We also learned that 3D application building software typically provides support to build stand-alone applications for different target platforms including common desktop operating systems, different mobile platforms, and also different VR devices.
In the previous lesson, you already use some of the tools available in Unity for adding dynamics and interaction possibilities to a 3D scene in the form of giving the user control over the movement of gameobjects, animating gameobjects via scripting, collision detection, basic graphical user interface, and scripting more advanced behaviors, e.g. collecting coins and awarding points. As you have already experienced, adding behavior to your gameobjects is done either through standard unity components (e.g. rigidbody, colliders, etc.) or through scripting.
In this lesson, you will gain more practical experience with other tools available in Unity. But first, let's start the lesson with a brief overview of general tools utilized by Unity for 3D application building. As we go through this first part of the lesson, you will begin to realize that you have already used some of these tools in the previous lesson! We roughly divided the following list into ways to make a scene dynamic and ways to add interactions. However, this is a very rough distinction with certain aspects or tools contributing to both groups. In particular, scripting can be involved in all of these aspects and can be seen as a general-purpose tool capable of extending Unity in almost unlimited ways (e.g. in the previous lesson we used scripting to both animate our coins by constantly rotating them, as well as collecting them upon collision with the ball).
Animations: Animations [1] obviously are one of the main tools to make a scene dynamic. We will talk about animations quite a bit in this lesson and you will create your own animation clip to realize a camera flight over a scene. Here are a few examples of animations that can make a scene more realistic and dynamic:
Since this is a Geography/GIS class, we also want to briefly mention that support for importing GIS data into 3D modeling and application building software to employ it as part of 3D or VR application is slowly increasing. The image below shows a world map GameObject consisting of meshes for all countries in the Unity editor. The meshes were created from an ESRI shapefile using BlenderGIS, an add-on for importing/exporting GIS data into Blender. Then the meshes were exported and imported into Unity as an Autodesk .fbx file.
Recently, Mapbox announced the Mapbox Unity SDK [11], providing direct access to Mapbox hosted GIS data and Mapbox APIs within Unity. We believe that more initiatives like this can be expected for the near future, partially driven by the huge potential that current developments in VR and AR technology offer to GIS software developers.
In this walkthrough, we will see how we can import a 3D model from a SketchUp into Unity. Although the Unity Asset Store contains a large repository of free 3D models that you can use in your projects, depending on the requirements, it might be needed to import custom models into Unity. As you have already gained some experience in modeling 3D objects in SketchUp, it will be useful to see how you can import your model directly into Unity and add behaviors to it. In this walkthrough, we will import a SketchUp model of the “Walker” building into Unity, extract its materials and textures, and add it to a scene. Then, we will add a first-person controller prefab from the standard assets of unity which will enable us to walk around our scene.
You should still have the Unity project “MyFirstUnityProject” from the beginning of the previous lesson. Open your Unity Hub and open the “MyFirstUnityProject” (if you do not have this project anymore, follow the instructions from the previous lesson on how to create it. Make sure you also import the first package you used in the previous lesson – download here [12]). We will use this project to perform this walkthrough. Download the following Walker Laboratory [13] SketchUp file and once the download is completed, navigate to the location where it is downloaded (by default it should be in your User\[your username]\Downloads).
In the Unity editor, create a new folder in your project folder structure and rename it to “Walker Building”. Drag and drop your downloaded SketchUp file into this folder. Create a new scene in the same folder, by right-clicking on the folder from the folder structure panel -> create -> Scene. Name this scene “WalkerScene”. Open this scene and drag your WalkerLabaratory SketchUp model into the scene. Reset its position and rotation values to zero. Change the position of the Main Camera in the scene so the building is within its view. Change the X rotation of the directional light to adjust the lighting/show of your scene.
You may have noticed that the Building object we have imported looks rather dull and is missing lots of textures and materials. To fix this problem, we need to extract all the materials and textures from the prefab of the model so that Unity knows how to map them. Select the prefab of the model you have imported into your folder. You can see that in the inspector menu it is detected that this is a SketchUp model, but all the materials for the individual components of this model are missing (labeled as none).
To fix this, click on the “Extract Textures …” button in the inspector panel. Create a new folder in the pop-up window and rename it to “Textures”, and then click on “Select Folder”. Do the same for Materials by clicking on the “Extract Materials …” and creating a new folder called “materials”. Once done, the model should have all the materials and textures added to it.
To add a first-person controller, we will use the default FPSController prefab on unity. This is the same prefab that you have used in the first part of the previous lesson. Navigate to the “Standard Assets” folder -> “Characters” -> “FirstPersonCharacter” -> “Prefabs”. Drag and drop the FPSController prefab into your scene. Place the FPSController somewhere on the plane (you can start with X=0 and Z=0 for position and then move the FPSController along these axes) and make sure the Y value of its position parameter is set to 1. Rotate the FPSController GameObject so it faces the building. If you play the scene now, you will notice that the FPSController will fall through the plane. This is because we have not yet attached colliders to our objects. The FPSController prefab already has a collider so all we need to do is to add colliders to the plane and all the children of the Walker GameObject.
To achieve this, you have two options. You should either select all the child objects of the building prefab that has a “Mesh renderer” component attached to it and add a “Mesh collider” to that object manually. Since these objects have meshes, the physics engine of Unity will use the shape of the mesh to create a collider with the same shape around that object. Or you can select the Walker prefab from your project folder and check the “Generate Colliders” parameter in the inspector menu under SketchUp option, and then press “Apply”. Press play, and you should be able to navigate on this plane using the WASD keys on your keyboard and look around using your mouse.
Once you are done experimenting with your new creation, disable the FPSController GameObject by clicking on it once, and then unchecking it from the inspector panel.
In the next walkthrough, we will cover animating a camera and for this, we need to use the static Main Camera in our scene.
Animations are one of the main methods to bring some life into a 3D scene in Unity and make it dynamic. Objects in the scene may be permanently going through the same looped animation (think of the leaves of trees moving in the wind) or they may be in a particular animation state that can change, potentially triggered by some external event (think of a human avatar that can switch from a walking animation to a running animation and that may have many other animations associated with).
The theoretical concept behind this idea is the notion of a State Machine: Each GameObject is always in one of a pre-defined set of states (state for walking, state for running, etc.), potentially associated with a particular animation. The transition from one state to another is triggered by some event which, for instance, can be some user input, a collision with another object, or simply a certain amount of time passed. The states with possible transitions between them form the object's state graph as shown in the image below. The state graph together with a pointer to the object's current state when the project is running constitute the object's state machine.
In this course, we will use animations only to animate the main camera to create a camera flight over the scene. Other uses for animations for 3D/VR applications could be making objects like plants more realistic, creating movable objects like doors, or populating the environments with dynamic entities like people or cars. Our camera flight will only need a single animation and, hence, state. So we won't have to deal with complex state graphs and the transitions between states. Nevertheless, please watch at least the first 90 seconds of the following video to get a bit of an understanding of the Unity's Animator component and controller and what happens under the surface when working with Animation State Machine. Don't worry if some of the details don't get completely clear.
The main tool for creating an animation in Unity is the Animation View. It's a very powerful but also slightly complex tool so that we will only get to know its basic features here. For details, please see the documentation available here [14]. The Animation View is for creating and editing animation clips as well as previewing them. Please watch the following short video to familiarize yourself with the idea of creating a camera animation clip in Unity using the Animation View. You do not have to try out what is shown in the video yourself; we will be doing this in the walkthrough in the next section (the walkthrough will slightly deviate from what is shown in the video though).
The Unity web page [15] has more videos related to animations available, dealing for instance with importing animations created in other software, creating animations for a humanoid avatar, etc. You won't need to know about these more advanced topics for this course, but if this a topic of interest to you, feel free to check these out.
In this walkthrough, we are going to program a camera flight over the Walker building using Unity's animation functionality similar to what you saw in the video from the previous section. Have the Walker Scene open. For your assignment, you will create this animation for the campus [12] with more buildings. (The building used in these instructions is the Walker building but you might see the name of Old Main in the hierarchy. That's just not using the right name. Hope it wont confuse you).
We should only have one active camera called “Main Camera” in the Scene. We will make the Main Camera to be the child of a general container object called “Camera Setups”. The animation for the camera flight will be defined for the parent object (Camera Setups) and applied to all its child entities. So use “GameObject -> Create Empty” to place the container GameObject in the scene. Change the name from “GameObject” to “Camera Setups”. (The image belongs to the scene with Old Main. In your Scene with the Walker building, you don't have the FPS Controller)
Finally, drag the “Main Camera” object onto “Camera Setups” so that it becomes a child of it. This is how things should now look in the Hierarchy Window:
Now we have to place the camera in a good starting position for our camera flight. We want the camera flight to start a little bit away from the Walker building, and then move towards it before transitioning into an orbit around the building. So move the Scene view to a perspective similar to that shown in the screenshot below. First, set the position of both the parent object “Camera Setup” and its child object “Main Camera” to 0,0,0. Then manipulate the location and rotation of only the parent object “Camera Setup” to move both objects at the same time to a location you desire. If you did everything correctly, the Main Camera Position and Rotation values will all still be zero as in the screenshot below because they are measured relative to the parent object.
Now we are going to create the camera flight path. First, we are going to create a new Animation entity for the camera flight in our project Assets and link it to our Camera Setup object. Then we are going to set intermediate positions for the camera along the desired flight path. Unity will automatically interpolate between these positions so that we get a smooth flight path.
Create a new folder called “Camera Animation” under the Assets folder. Open this folder, right-click on an empty space within the folder, select Create -> Animation. This creates a new animation clip entity. Let's call it “CameraFlight”.
Connect the CameraFlight animation to our Camera Setup object by selecting Camera Setup in the Hierarchy Window and then dragging the CameraFlight animation from the Assets Window to the free area with the “Add Component” button in the Inspector Window (you have seen examples of adding elements and components to GameObjects using this method in previous videos). After doing so, the Inspector Window should show the newly attached Animator component as in the screenshot below. In addition, a new Animator object called "Camera Setup.controller" will automatically appear in the Assets window.
During the next steps, make sure that "Camera Setup" remains selected in the Hierarchy Window. Go to "Window -> Animation -> Animation” in the menu bar to open the Animation Window which is the main tool for creating an animation.
Let us first make a few adjustments to the Animation Window to make things easier. At the top right, you can see the timeline for the animation. 1:00 means one second into the animation. You need to have the mouse cursor in the lower right part of the window and then turn the mouse wheel to adjust the timeline. Our animation should probably be around 1 minute long. So set it up so that the timeline goes until at least 60:00 seconds (= 1 minute). It is a good idea to make the Animation Window as wide as possible.
Now let’s clearly specify which properties we want to animate in our animation, namely the position and rotation values of our Camera Setup object. You will have to use the "Add Property" button twice to add the Position and Rotation, respectively. Press “Add Property”, then unfold the “Transform” entry, and use the + button to add Position and after that Rotation to the list. The result should look like in the second image below:
The diamond symbols below the timeline are the keyframes, which we will use to define intermediate positions and orientations for the camera along the flight path. As you can see, Unity has automatically created two keyframes, a start frame at 0:00 and another one at 1:00. You can select a keyframe by clicking on the upper diamond (the one that is in the darker gray bar, the selected keyframe is shown in blue) and you can drag it to the left or right to change the time when it will occur. You can delete a key frame by right-clicking the diamond and then selecting "Delete Keys". That's what we want to do here so that we end up with only the start keyframe like in the figure below:
The red record button on the top left determines whether changes will be recorded for the position in the animation where the vertical white bar is located which will result in a new keyframe being added at that position. When record is on, the position and rotation properties of the Camera Setup will turn red. Do a left-click at 10:00 in the timeline to move the white vertical bar to that position.
Now let's create a second keyframe at 10:00 and record it. Press on the record button (the red circle in the animation window) and then use the move or rotate tools to change the position and rotation of the Camera Setup GameObject in the scene. Note that all the changes you are making to the position and rotation of the camera will happen in 10 seconds, as this is the limit we have specified for this frame. Once you are happy with the changes, stop the recording.
Repeat the same process to add another keyframe every 10 seconds and make another recording.
You can use the perspective gizmo at the top right of the Scene Window to quickly switch between the top-down and side view of the view, which can be very helpful here.
You can now click the Play button in the Animation window (not the main Play button at the top!) and Unity will now show you the animation between the first and second keyframe in the Game Window. Press the button again to stop the animation.
Before continuing, make again sure that you have Camera Setup selected in the Hierarchy and that recording in the Animation window is turned on (record button with a red dot is highlighted).
Now continue with this to build a camera animation of 60 seconds with 7 keyframes in total, one every 10 seconds. For each of the keyframes move the view to the next corner of Old Main. The last keyframe at 60:00 should be roughly identical to the very first one, meaning you should move "Camera Setup" away from the building again.
The final animation should look similar to the one in this 360° video [16] (producing such a 360° video from the animation is described later in this lesson). Creating such animation can be a bit tricky at first but you will get used to it quickly. Don't worry if the orbit around the building isn't perfect. This is ok because we are only using very few intermediate keyframes here. You can try to improve on this in your homework assignment. If something goes completely wrong, you can always delete the last few keyframes using "right-click -> Delete Keys". Here are a few additional hints that you may find helpful:
Once you are done with your animation, you can close the Animation window, maximize the Game Window, and look at your camera flight in full size. Just press the main Play button at the top or CTRL+P.
Check out whether you are happy with your camera flight as it appears in the Game Window. If not, you can revisit it by selecting Camera Setups and opening the Animation window again under “Windows -> Animation”.
You can now go ahead and build a stand-alone Windows application as explained in Lesson 7. Our next goal will be a little different. We want to be able to see the camera flight in 3D and be able to actually look around. One option would be to turn this project into a VR application, for instance for the Oculus Rift or HTC Vive. But since most likely not many of us have access to an expensive VR device, what we are going to do instead is to use the Google Cardboard for our “VR application”. The approach we are taking for this is to record a 360° movie of our animation, make it available on YouTube, and use YouTube’s Cardboard support available on most smartphones to turn the video into a VR application.
You already learned about building stand-alone 3D applications for Windows with Unity. Creating stand-alone software that allows for experiencing the application in real 3D with the help of a VR head-mounted display connected to the Windows computer is not much different. While you probably won't be able to try this out yourself (unless you own a device such as the Oculus Rift or HTC Vive), Unity VR Overview [17] provides a good overview on VR support in Unity and building VR stand-alone applications. Additional information can be found at Unity Learn [18].
Similarly, you can build stand-alone applications for mobile platforms such as Android or iOS and even have the built app directly pushed to your mobile device. This requires additional software to be installed on your computer, such as the Android SDK if you are building for an Android phone or tablet. However, despite a lot of progress in hardware and, in particular, graphics performance on modern mobile devices, smoothly rendering 3D scenes in high quality on a mobile phone, for instance, can still be problematic. This is particularly true if the scene needs to be rendered for the left and right eye separately to support a VR device like the Google Cardboard. We will, therefore, take a different approach in the following walkthrough and instead use Unity to produce a 360° video that can be shared, for instance via YouTube, and then be experienced in real 3D on pretty much any(!) smartphone with the Google Cardboard. While this approach is limited in that no interaction between the user and the objects in the scene is possible, advantages of the approach in addition to being less dependent on high-performance hardware are that we do not need to produce different builds for different mobile platforms and no additional software needs to be installed. If you, however, are interested in exploring how to build stand-alone (VR) applications for Android devices, the Android environment setup instructions [19] and the video below are good starting points.
To be able to create a 360° video of the camera flight from the previous walkthrough we need a few things:
Let us start by importing the Unity extension for taking 360° snapshots.
Import the unity package (link in previous page) into your “MyFirstUnityProject” project. When done, a new folder called “360 Capture” will be added to your project folder structure. This folder contains a script and three Render Texture objects (one for each eye and one that merges them together). The script will capture the camera output and renders it on the textures. To set up our scene for capturing, add the script “CreateStereoCubemaps” to the Main Camera object (i.e. child of Camera Setup) by dragging the script onto it.
You will notice that in the inspector panel of the Main Camera GameObject there are three empty fields “Cubemap Left”, “Cubemap Right”, and “Equirect”. Will need to populate these fields with our textures in the “360 capture” folder. Drag the corresponding texture to the right place holder in the inspector panel of Main Camera as shown in the figure below:
Next, double click on the “CreateStereoCubemaps” script to open it in visual studio. In the start function of this script (as shown in the figure below), you can see that we have instructed Unity to capture 25 frames per second.
You do not need to study the rest of the script (unless you are interested in doing so), but to give you a general idea, we are capturing 25 monoscopic frames per second of the entire scene and saving each frame as a PNG file somewhere on our drive. Since the address of where the images are to be saved is hard-coded, you need to modify it to point to a location where you want the monoscopic images to be saved. On line 67, we have indicated this address (the orange text between the “ ”) along with a line of comment that tells you how to modify it (make sure you save the file after you have modified the address).
One easy way to update this address is to create a folder somewhere on your hard drive (you will need at least 1.5 GB of free space). Inside the folder click on the address bar on top and copy the address.
Make sure that the “\” in the address you have copied are replaced with “\\” when you replace it with the orange text in between “”.
Now if you play the scene, depending on the specifications of your computer system, the scene will perform differently. Since we are forcing Unity to capture 25 frames per second, the camera flight animation we’ve just created might not run very smoothly on older computers. If you play your scene now and notice lots of lagging, do NOT be alarmed. Let the camera flight animation finish (it could take a while on slower computers so be patient!), and then stop the scene from playing.
Now if you navigate to the folder, where you have instructed the script to save the PNG files, you will see that it is populated with around 1400-1500 images.
We now want to produce an MP4 movie from the individual 360° images. We will use the free command-line tool ffmpeg for this.
You can download a Windows build of the ffmpeg [12].
Extract the downloaded .zip and you get a folder with a bunch of files in it (similar to the image below). Make sure there are not two folders with the same name inside each other. The main executable ffmpeg.exe is located in the bin subfolder. We will directly run this .exe file, no installation is needed.
To be able to use the ffmpeg.exe as a command-line tool, let’s open a command prompt. Click on Windows and search cmd. Open cmd. You need to navigate to the location where you have extracted the content of the zip file. This is a very simple process.
For example, I have extracted the contents of the zip file (i.e., the folder named ffmpeg-20210331-6ef5d8ca86-win64-static) to my desktop. What I need to do is to first open the command prompt. This can be done by clicking on the start button on the windows bar and type "command prompt". By default, the command prompt is at the root location for the current user of the OS (e.g., C:\Users\Pejman>). Now I need to access to the folder we have extracted to the desktop. To do so, you need to type:
cd desktop
and then press enter.
This simple command with navigating the command prompt to the desktop folder of your computer. Using a similar approach, we need to access the "ffmpeg-20210331-6ef5d8ca86-win64-static" folder. Now instead of typing the complete name of this folder which is rather long, you can simply type cd followed by a few letters of the folder name (i.e., ffmpe..) and then press the tab key on your keyboard. This will autocomplete the name based on what can be found on the desktop. The next step is to go to the bin folder using the same method. At the end of this process, you should be at this location within the command prompt:
For more help, please visit Digital Citizen [21].
The command that you need to type in now to have ffmpeg create a movie is given below, but you will have to make some small changes to adapt it to your system: The highlighted part needs to be replaced with the path to your folder where the images are saved. (In case you start by copy & pasting the command from this web page into the command prompt rather than typing it yourself, please check that the double quotes appear as straight double quotes, not curly ones and you also may have to retype hyphens and underscores as well. The safest approach is to type the complete command yourself, or paste it into a notepad and copy it from the notepad.). The last part of the address, namely “Image_%06d.png” is a pointer to the first image in this folder, and the program will then iterate through all the images based on this starting point. You do NOT need to change this last part.
ffmpeg.exe -r 25 -start_number 100000 -i "C:\Users\jow\Documents\UnityProjects\MyFirstUnityProject\LSCaptureFiles\Image_%06d.png" -vcodec libx264 -crf 15 -pix_fmt yuv420p myfirstunityproject.mp4
In the command, we tell ffmpeg that the produced video should use 25 frames per second, where the images are located and the pattern for how they are named, which video codec to use, etc. The final parameter is the name of the output file (myfirstunityproject.mp4) that will be generated. When you execute the modified command (by pressing enter), ffmpeg should start to process the images and create the MP4 video. Remember there are about 1400 frames.
When ffmpeg is done, there should now be a file called myfirstunityproject.mp4 in the bin subfolder of ffmpeg. You can move this file, for instance into your Documents folder.
Now run the video and have a look. If your standard video player is not able to display the video, we recommend that you go to VideoLan [22] to download and install VLC, a great and free video player, and then watch the video with this program.
Now that we have the video our goal is to get it uploaded to a private YouTube channel and watch it with the cardboard on our smartphone. However, we first have to use yet another tool to adapt some of the metadata in the movie file so that YouTube will correctly recognize it as a 360° movie. We will follow Google’s Upload 360-degree videos [23] instructions.
The final steps of this walkthrough will require that you have a YouTube account and channel. That doesn’t mean that the 360° videos produced in this course will be publicly available for everyone. It is possible to use your channel only to share these with particular people, like everyone in this class. If you do not have a YouTube account/channel yet, please follow the Create an account on YouTube [25] instructions to create these.
You should now be on the main page for your YouTube channel. Click on the “Upload” link at the top to upload a new video. Set the field to determine who can watch the movie to “Private” for now. When you later want to share a video with the class, you can instead set this to “Unlisted” and share the link to the video. Unlisted means that everyone with the link can watch the video but it won’t be visible to anyone else as part of search results on YouTube. Now, drag the video file myfirstunityproject360.mp4 from the Window Explorer on to the upload icon. The upload will start immediately. After the upload is completed, YouTube will start processing the file. After this has finished as well, you can click “Done”.
The video should now be listed in the YouTube Studio [26] under the videos tab.
Clicking on it should take you to a page as shown below, where you can play your video, or open its link in a different tab.
You should now be able to watch this video on YouTube like any other video. You should, in addition, be able to look around during the camera flight either by dragging with the left mouse button pressed or by using the arrows in the top left corner of the video. By clicking the Settings icon at the bottom, you may be able to increase the resolution at which the video is displayed unless it is already displayed at the highest available resolution.
If you play this video on your phone, you will get the option to see it in VR mode when you switch to full screen. If you select that option, you can put your phone in a CardBoard and enjoy your first VR creation.
You can check out other VR videos on YouTube at YouTube Virtual Reality [27].
Note: Make sure your YouTube app is up to date!
Please reflect on your 3D spatial analysis experience, using ArcGIS Pro; anything you learned or any problems that you faced while doing your assignment as well as anything that you explored on your own and added to your 3D spatial analysis experience.
The homework assignment for this lesson is to apply the techniques you learned in this lecture to the historic campus scene that you already saw in the previous lesson (it should be already in your “MyFirstUnityProject” project under the “Historic Campus” folder). You are supposed to create a nice camera animation and produce a stand-alone windows application as well as a 360° movie. The video should be uploaded to your YouTube channel and shared together with your Windows application with the rest of the class by posting the links and a short description on the forums. Finally, you are supposed to provide constructive feedback on a video created by one of your classmates and submit a write-up reflecting on this assignment.
The assignment has several tasks and deliverables with different submissions deadlines, all in week 10, as detailed below. Successful delivery of the tasks 1-6 is sufficient to earn 90% on this assignment. The remaining 10% is reserved for efforts that go "above & beyond" by improving the historic campus model, e.g. in ways suggested below, before creating the video and stand-alone Windows application.
For this assignment, you will use the historic campus scene from Lesson 8. We suggest you start with a fresh download of the Unity project: Historic Campus [28]. The campus models have already been imported and placed in a scene (main) and things should look like in the screenshot below when opening the project in Unity. You are now supposed to create a ~1.5min camera flight over the scene using what you learned about animating the camera in this lesson. But before you start with the camera flight, you may want to think about what you want to do for "above & beyond" efforts (see details below) as this may have an effect on the camera trajectory you want to create (e.g. in case you are going to add additional models to the scene).
Produce a stand-alone Windows application showing your camera animation as you learned in this lesson. Please note that if you put in work for above & beyond points, this needs to be done before creating the Windows application so that these efforts are included.
Deliverable 1: Create a .zip file containing all the files and folders of your built.
Upload the application to the PSU Box Comunity Folder [29] and include the link to your application when posting on the Lesson 8 Video Discussion (see Task 4).
Produce a 360° video showing your camera animation as you learned in this lesson. Don't forget to adapt the meta information before uploading the video to your personal YouTube channel. Please note that if you put in work for above & beyond points that should be visible in the video, this needs to be done before creating the video so that these efforts are included.
Deliverable 2: Upload the 360° video to your YouTube channel and share it via a link. Include the link when posting on the Lesson 8 Video Discussion (see Task 4).
Deliverable 3: Create a post on the Lesson 8 Video Discussion including the links for your Windows stand-alone application & 360° video. Add a one-paragraph description of what you did to improve the model for above & beyond points, if anything. If your above & beyond efforts are only visible/audible in either the 360° video or the stand-alone application, please make this clear as well.
Watch a video posted by one of your classmates and write down 1-2 paragraphs in which you provide constructive feedback. If possible, please pick a video that has not yet received any feedback. Comment on the technical and aesthetic quality of the video and, if applicable, the extensions made to the model. Make suggestions on how the work can be improved or extended. If the description mentions that some additional effort is only included in the Windows stand-alone application, you can feel free to ignore that part.
Deliverable 4: Post your feedback as a reply to the respective video post on Lesson 8 Video Discussion.
Create a ~700 words write-up reflecting on what you learned in this assignment, what problems you ran into, if and how you were able to resolve these, etc. Please also include a complete description of things you did for above & beyond efforts. Provide some final assessment of your experience with Unity.
Deliverable 5: Submit your write-up to the Lesson 8 Assignment.
This part of the assignment is for allowing you to let your creativity run free to extend or improve the historical campus scene and/or explore some features of Unity development on your own based on one of the many tutorials available on the web. What you do is up to you; the following are just two suggestions for directions in which you can think:
If you are looking for some relaxing background music, you can browse freesound [33]for a suitable track that is freely available. Alternatively, or in addition to using music, you can record your own commentary describing either the scene or what you did for this assignment and have this played during the camera flight. If you experience any problems with adding sound, feel free to help each other out in Lesson 8 Discussion.
Helpful advice:
We highly recommend that, while working on the different tasks for this assignment, you frequently create backup copies of your Unity project folder so that you can go back to a previous version of your project if something should go wrong.
For the camera animation, we recommend using many intermediate keyframes unless the camera is just moving in a straight line. In particular, try to not have a rotation of more than 90° between two successive keyframes in the animation.
Criteria | Full Credit | Half Credit | No Credit | Possible Points |
---|---|---|---|---|
Camera flight has the correct length, is smooth and aesthetically pleasing. | 3 pts | 1.5 pts | 0 pts | 3 pts |
Windows stand-alone application is shared via Box and shows the camera flight. | 3 pts | 1.5 pts | 0 pts | 3 pts |
Video is shared via YouTube and shows the camera flight. | 3 pts | 1.5 pts | 0 pts | 3 pts |
Video has been correctly created and uploaded as a 360° video allowing to look around while the camera is moving over the scene. |
3 pts | 1.5 pts | 0 pts | 3 pts |
Above & Beyond: The number of points varies depending on how much effort was required (e.g. placing an additional 3rd-party 3D model in the scene will give fewer points than placing a self-made model or adding background music to the scene). | 3 pts | 1.5 pts | 0 pts | 3 pts |
Total Points: 15 |
Criteria | Full Credit | Half Credit | No Credit | Possible Points |
---|---|---|---|---|
Paper clearly communicates what you learned in this assignment, what problems you ran into, if and how you were able to resolve these, etc. Paper also includes a complete description of things you did for above & beyond efforts and a final assessment of your experience with Unity. | 5 pts | 2.5 pts | 0 pts | 5 pts |
Write-up is of the correct length and is well and thoughtfully written. | 5 pts | 2.5 pts | 0 pts | 5 pts |
The document is grammatically correct, typo-free, and cited where necessary. | 2 pts | 1.0 pts | 0 pts | 2 pts |
Total Points: 12 |
In this lesson, you significantly extended your Unity skills by learning how to add a user-controlled avatar and enable colliders for the objects in the scene, and how to create a camera animation with the Animation View. We also spoke about the different ways to create VR experiences for different devices with Unity, including using 360° videos for the Google Cardboard as an efficient option for devices that may not have the hardware performance to run VR applications in real-time. We have now come full circle with regard to the 3D and VR application building workflows we discussed in Lesson 2. We hope that these last two lessons focusing on Unity and the skills you acquired in them will prove to be a helpful complement to your 3D modeling and analysis repertoire.
You have reached the end of Lesson 8! Double-check the to-do list on the Lesson 8 Overview page to make sure you have completed all of the activities listed there before you begin Lesson 9.
Links
[1] https://docs.unity3d.com/Manual/AnimationSection.html
[2] https://docs.unity3d.com/Manual/StateMachineBasics.html
[3] https://docs.unity3d.com/Manual/ParticleSystems.html
[4] https://docs.unity3d.com/Manual/PhysicsSection.html
[5] https://docs.unity3d.com/Manual/Audio.html
[6] https://docs.unity3d.com/Manual/class-InputManager.html
[7] https://docs.unity3d.com/Manual/UISystem.html
[8] https://learn.unity.com/search?k=%5B%22q%3AUser+Interface%22%5D
[9] https://www.youtube.com/watch?v=dzOsvgc2cKI
[10] https://www.vive.com/us/accessory/controller/
[11] https://blog.mapbox.com/announcing-the-mapbox-unity-sdk-afb07d33bd96
[12] https://courseware.e-education.psu.edu/downloads/geog497/
[13] https://drive.google.com/file/d/1Qxbi9AaOq6CGPs5TYO3EALd3F2L68SYS/view?usp=sharing
[14] https://docs.unity3d.com/Manual/animeditor-UsingAnimationEditor.html
[15] https://learn.unity.com/tutorial/basics-of-animating
[16] https://www.youtube.com/watch?v=cTbKllbYuow&feature=youtu.be
[17] https://unity3d.com/learn/tutorials/topics/virtual-reality/vr-overview?playlist=22946
[18] https://learn.unity.com/
[19] https://docs.unity3d.com/Manual/android-sdksetup.html
[20] https://ffmpeg.zeranoe.com/builds/
[21] https://www.digitalcitizen.life/command-prompt-how-use-basic-commands
[22] http://www.videolan.org/vlc/
[23] https://support.google.com/youtube/answer/6178631?hl=en
[24] https://github.com/google/spatial-media/releases/tag/v2.0
[25] https://support.google.com/youtube/answer/161805?hl=en&ref_topic=3024170
[26] https://studio.youtube.com
[27] https://www.youtube.com/channel/UCzuqhhs6NWbgTzMuM09WKDQ
[28] https://psu.app.box.com/s/302dfknb69zvosx4ddo82co0ipueh7a3
[29] https://psu.box.com/s/2du3cg4rtx341kgvspou9zcd1p9mjrc7
[30] https://assetstore.unity.com/
[31] https://www.youtube.com/watch?v=q5ejxITvEh8
[32] https://www.youtube.com/watch?v=1BMJFgK68IU&ab_channel=Unity
[33] http://freesound.org/