The primary goals of this assignment are:
- Become familiar with the GIT version control system.
- Make a successful build of the Unreal Engine 4 (UE4) from source.
- Become familiar with UE4, the use of the Unreal Editor, and visual scripting.
- Bake expensive content to a texture.
- Introduce methods of performance measurement and comparison.
- Work through the submission process we will use this semester.
To ease you into working with Unreal, this assignment is pretty specific about what to do. I expect that by the end of the semester, I'd be able to say, "Bake a material using multiple noise nodes into a texture and compare the performance of the original material with one using the baked texture." In other words, you should expect that subsequent assignments will rely more and more on your ability to figure out how to do what is required. This may require searching for help online or experimenting on your own.
On this and future assignments, graduate students (those taking the class as CMSC 691) will have additional component(s) that are less clearly defined and may require more research or experimentation to complete.
The PCs in the GAIM lab (ENG 005) are available for use for this class. If you have a reasonably powerful PC or Mac, you may be able to use it instead. Pay attention to the listed minimum system recommendations for UE4. In general, if you would not want to play a modern 3D game at a reasonably high quality setting on your computer, you probably do not want to use it for this class. It is also a bad idea to try to use UE4 on a VM, because the overhead is too great, especially for graphics-heavy work.
Most UE4 engine development takes place on Windows, so that tends to be the most stable and tested platform. I also test everything I ask you to do in this class on Mac. It is possible to build UE4 for Linux, but that is the least well supported platform, and I am not able to test or trouble-shoot there. Consequently, if you do elect to try to build UE4 on Linux plan significant extra time to figure out issues on your own (or time to abandon Linux if you get stuck).
No matter what platform you use, you will need to buy a USB stick or USB drive of at least 64 GB. If you are primarily working on the lab computers, this will give you sufficient space for development that you can take with you and easily move between computers. If you are working at home, this will keep your files on portable form to show the TA or me when you have problems.
Since it takes a significant amount of time to build UE4 (especially once we start making changes to the engine code later in the semester), multiplied by the number of students if we need to build to grade, we will mostly not be directly running your projects. We'll look at what you commit through git, and at video of your running project that you will record and upload.
We will be looking for multiple git commits with meaningful commit messages during your development. These should be made using a local git client to the clone of the repository on your USB drive, then pushed to your fork of the repository on github and submitted by tagging the revision you want to submit when you are done.
Numbed items are things you need to do, bullets below them are possibly helpful comments.
Get set up
- Create a Github account if you do not already have one.
- Send me your github username, so I can give you access to the class material. You will not be able complete step 7 of this part, or anything after it, until you have that access.
- Create an Epic account if you do not already have one, and link your Github account to your Unreal Engine profile.
- Join the Epic Games github group.
- Get a GIT client. You should never commit through the github web interface for this class.
- Follow the directions
to enable SSH github access.
- I recommend against a separate SSH passphrase for this.
- Fork the
UMBCGAIM/g4g2018class repository to get your own copy on github.
- Under "Settings" for your
g4g2018fork, choose "Collaborators & teams", and add me (olano) and the TA (shashankbukka) as collaborators with Write permission.
- We'll need that to grade, and will deliver grades back to you by checking a rubric text file back into your repository.
- Clone your copy to your USB drive.
- I recommend using the command-line tools for this step, even if you are using a visual interface for everything else. This will allow make a shallow clone with only the most recent release revision (about 5 GB), instead of the entire history of UE4 (about 15 GB).
- On PC, right click in a directory window and choose "Git Bash". On Mac, you can access them in a Terminal window.
- Use "
git clone --depth 1 --no-tags repositoryURL", where
repositoryURLis the URL you get from the "Clone or Download" button on github.
- If you are not working in the lab, get OBS Studio for recording video, and the C++ compiler tools for your platform (Visual Studio for Windows, free from imagine.microsoft.com; Xcode for Mac).
- Run the
Setupscript in the
g4g2018directory on your USB drive.
- Run the
- You will need to re-run this only when you add or remove source files.
- Open the generated project file (The newly created
UE4Visual Studio solution or XCode project).
- Do a
- This will likely take at least an hour. Fortunately, you will not need to do a full build often.
- Later, you might want
UnrealLightmassas well, but we won't need it yet.
- Run UE4Editor to make sure it worked.
Create an Unreal Project
- Create a new blank Blueprint project without starter
content. Call the project "
assn1" and save it at the top level of
- We won't be using the starter content for this (or any) projects, and it adds a ton to your git repository size.
- We do want the name and location to be the same for everyone to ease grading.
- Also, if you put it at the top level of your git repository,
when you re-run
assn1project will appear when you open
UE4in Visual Studio or XCode.
- Now would be a good time to commit a checkpoint of your progress.
- Be sure to save in the UE4 Editor before you commit.
- Look at what it wants you to commit before you do it
(command-line that's "
- You will need to stage the things you want to commit
git add files").
- This should be the
assn1.uprojectfile, and everything in the
Configdirectories. Don't commit anything from the
Create a test scene
- Create a level named "
- Add three planes.
- Use Text Render Actors to label them them "Baseline", "Computed", and "Baked".
Make the "Baseline" test case
- Create a new unlit Material for the "Baseline" plane.
- Connect a constant color of black (0,0,0) to Emissive
- This will allow us to measure how much time is spent on stuff other than the material.
Make the "Computed" test case
- Create a new unlit Material the "Computed" plane.
- Use at least a couple of Noise nodes to make a cloud-like texture,
connected to Emissive Color. Use texture
coordinates as the input
to the Noise nodes.
- Using the texture coordinates makes sure the Computed and Baked cases will be the same scale
- You'll need to use the "AppendVector" node to add a third component to the 2D texture coordinates.
- It doesn't need to look exactly like mine. I expect everyone's to look a little different.
- In fact, I don't care that much what it looks like as long as you've hooked up a couple of noise nodes in the Material editor.
Create a Blueprint to bake the "Computed" material
- Create a Render Target texture.
- Make an Actor Blueprint, and use
DrawMaterialToRenderTargetto draw the "Computed" material into the RenderTarget on
- Do not use the built-in "Bake Materials" button. The point is to create a simple Blueprint (plus baking yourself gives more control over the process).
- Place this Blueprint in your scene.
- When you hit "Play", the Render Target texture should be filled in
Make the "Baked" test case
- Create a third unlit material for the "Baked" plane that uses
texture coordinates to look up in the render target texture.
- The "Computed" and "Baked" planes should look identical.
- Run in a separate window (using Play in Editor, otherwise known as PIE).
- Collect at least five timings with a screen-filling view of each of
- Use the
ProfileGPUconsole command, or
- Use the
- Report the mean time for each, as well as the mean difference from Baseline.
- Use OBS to record a short video of your running project.
- Show us your computed and baked materials, your blueprint, and the project playing in the editor.
- Upload that video to youtube or your google drive.
- For full credit, you must commit multiple times during
- We'll be looking for your development process, so make sure the commit messages are somewhat meaningful, and at meaningful points along the way.
- Add an "
assn1.txt" to the top directory.
- Include your name and campus ID at the top of this file.
- Describe your test computer (at least OS, CPU, and GPU).
- Include the average reported
time for each of your three materials, the difference between the
Computed and Baked cases and the Baseline, and the screen size used for
timing (as reported by the
- Include the link to the video of your running scene, and make sure we can access it.
- Be sure to commit all of the necessary files: your assn1.txt, asssn1.uproject, and all uassets and umaps.
- Push your changes back to your personal github repository.
- You can and should do this multiple times during development.
- Wait to tag until your final commit.
- Add an "
assn1" Tag for your final commit.
- The command-line command for this is "
git tag assn1", then "
git push origin assn1".
- You should push your changes before midnight, but can still tag an existing commit after the deadline. Since it is tricky to move tags once they are made, this is probably a good idea.
- The command-line command for this is "
Also add a blueprint to switch between the three materials on a single plane when the user hits "1", "2" or "3". Note that you'll need to enable keyboard events for that Blueprint.