What Are Cull Distance Volumes And How Do They Work? (Unreal 4)

By Zac Jackson

Do you have a level that has too many objects in it, that seems to be loading or performing poorly? Cull distance volumes can help optimize your scene by not drawing objects (meshes) when they are small enough to be considered unimportant. Level Streaming will do close to the same thing, however, for the purpose of this tutorial, we will be sticking to cull distance volumes.

 

What is a Cull Distance Volume?

Cull Distance Volumes are optimization tools provided by the Unreal Engine that allow for meshes to be culled (not drawn to the screen) based on that meshes distance from the camera and its size. The mesh size is calculated using the longest dimension of the bounding box, and the cull distance chosen is the one closest to that size.

 

How to Use Cull Distance Volumes

Step 1:

Start a blank project or open up a blank level in your current project.

 

Step 2:

Add 3 cubes to your level: one big, one medium, and one small. This is to show you how the different properties in a cull distance volume work. You can find the cubes in the “Modes” section, under the “Basic” tab.

 

 

Scale them so that all 3 cubes are different sizes, ranging from small to large. Arrange them to be a little apart from each other.

 

 

Step 3:

Under the “Volumes” section under the “Modes” menu, select a Cull Distance volume and drag it into your level. Next, scale it so that the 3 cubes and the level are inside the volume.

NOTE: You can have more than one cull distance volume in a level depending on the size of the level, and the overall feel you are going for. This also is helpful with performance in towns for example. Adding a cull distance volume to the interior of a house so that when the player camera is outside of it, the meshes within it are not drawn is a good use of this.  

 

 

 

Step 4:

Click on your cull distance volume and navigate to the “Details” panel. This is typically found in the bottom right corner. Once there scroll down to the “cull distance volume” tab.

 

 

NOTE: The culling distance volume details allow you to change the shape of the volume itself, along with many other items of customization including size. Experiment with these, to get the most use out of a cull distance volume for your level.

 

Step 5:

Under the “cull distance volume” tab, you can see that we can add “elements”. These elements give you the option of size and cull distance. The size option is the “bounding box” size of the object (in this case, our 3 boxes), and the “cull distance” is the distance at which that size of object should cull (not be drawn). Make sure there are 3 elements set up under this tab. Each element should represent the size of a box.

I’ve set my size and culling distance elements to the following sizes, as they are the approximate sizes of the small, medium, and large boxes.

 

 

From the above image, element 1 tells the engine to cull anything below 200 in size ( remember, this is bounding box size) from a distance of 800 units, element 2 tells the engine to cull anything that’s 300 or less in size from a distance of 1600 units, and the final element tells the engine to cull anything 450 or less in size from a distance of 2600 units.

 

Step 6:

Hit play and test out your cull distance volume. If you start from far away, you’ll notice that the large box draws first, followed by the medium box, and then the small box.

 

 

Culling Foliage

If you have a bunch of foliage instances in a bigger level and would like the same desired effect as a cull distance volume, you can modify some of the settings for each foliage type that you have in your scene.

 

Step 1:

Navigate to the Foliage editor.

 

 

Step 2:

Click on the foliage mesh that you would like to cull.

 

 

Step 3:

Under the “Instance settings” for the foliage there is a “Cull distance” option. This option allows the foliage to cull in between a minimum cull distance and a maximum. This makes it so that each instance of foliage your scene tries to load slightly more random (within the minimum /maximum distance that you set) so that all foliage instances do not load all at once (if you want this effect, make the minimum and maximum values the same).

 

 

FINAL NOTE: Cull distance volumes do not work with movable objects. To see if an object has been set as movable, navigate to the “Details” panel look for the “Mobility” option. Meshes can be set to either be static or movable here.

Do you have any level optimization techniques that you’d like to share? Let us know in the comments!

January 2018 Kickstarter Campaigns Fall Short But Worth Looking At

By Tim Youngblood

 

There have already been some interesting games announced and successfully crowdfunded this year, but I’d like to show some love to some games that didn’t meet their funding goals. Here are three games from January 2018 that caught my eye.

 

Wild Mage: Phantom Twilight 

Wild Mage was developed by Luna Orion in Unreal Engine 4. Unfortunately, Wild Mage is likely to miss out on its funding goal, but the team at Luna Orion has already produced the framework for a beautiful looking game. If I had to guess why the game didn’t reach their funding goal, I would say it was because the team at Luna Orion was trying to raise money so they could quit their day jobs and focus on development for a year. While I think that the team likely would be able to deliver on their goal of a Winter 2019 release, very few crowdfunding campaigns with the goal of game developers quitting their day jobs tend to succeed.

Of all the Kickstarter campaigns for video games run in January, Wild Mage was the unfunded project that fits into the type of games that I like to play. Granted, it isn’t hard to suck me in with wizards and pretty colors. The game features fully destructible environments that are procedurally generated. Combine this with being a multiplayer game, and Wild Mage has a lot of potential for replayability. If Luna Orion implements player versus player later on, I could certainly find myself getting hooked.

 

 

Learn More About Wild Mage

 

Genesis Noir

Genesis Noir was developed by Feral Cat Den in Unreal Engine 4. The game features a minimalist noir look, an awesome interactive soundtrack, and a complex plot that gets very meta. With 8 days left, Genesis Noir is a little over halfway past their funding goal. Their marketing efforts have been on point, but I think a lot of gamers are hesitant to donate to a single player game that likely lacks replay value. That being said, I think that this game is something truly original and has the potential to disrupt an industry that has increasingly become a prisoner of corporate and consumer expectations.

 

 

Learn More About Genesis Noir

 

AVARIAvs was developed in Unity by Andrew Linde. The game puts a new twist on the classic JRPG format by allowing players’ parties to compete in ranked PVP. Turn-based games aren’t getting the love that they used to on consoles, so a game like this can change the way competitive gamers view JRPGs. The game also boasts 2000 possible party combos, which will hopefully help eliminate the dreaded regression to cookie-cutter compositions in player versus player games.

With 7 days left in its campaign, AVARIAvs has $8,000 to raise in order to meet its funding goal. This is a game that I’m certainly rooting for because it has the potential to create a new genre in gaming.

 

 

Learn More About AVARIAvs

How to Implement Source Control In Unreal 4 with GitHub

By Zac Jackson

 

Working with a team to make your project come to life? Source control allows you to make an online version of your project so that if anything happens to the content on your PC, you can always get the most up-to-date files that work in only a few simple steps. This makes Source control useful for solo developers as well.

What is a Pull Request?

Before we get into the tutorial, let’s discuss Pull Requests. A Pull Request is when someone has a fork of your project (basically a copy of it on their account) and they would like to add some of their project to yours. This becomes incredibly useful for when you have multiple team members working on the game and adding things like textures or source code from different computers.

We are going to be using GitHub for these Pull Requests. Pull Requests need to be accepted by the project owner, so don’t worry about someone adding something that you didn’t want.

Requirements:

  • Unreal 4
  • Some knowledge of Unreal 4’s user interface
  • Git Installed (download link)
  • Little knowledge of GitHub (Basically what we covered above)

Tutorial:

Step 1: Navigate to GitHub’s Website and create an account. GitHub is free for public repositories, but only 7$ a month if you’d like to keep your project private (recommended). Skip this step if you already have an account set up.

 

Step 2: Once you’ve made an account, Download GitHubs desktop application and install it. Once installed, login to the app, you should see this window:

 

 

Step 3: Next we need to create a repository. Click “Create new repository” on the left. It will ask you to name it, as well as give it a description. I chose to create this repo for Origin Story, so I named it after that. GitHub will automatically want to create a folder named GitHub in the documents folder of your computer, for this example, I made a folder on my external drive.

Once you’ve chosen what you’d like to do, click “Create Repository”.

 

 

Step 4: You should now see the window below. Next click on “Open this repository in explorer”. Once there, drag and drop your project files into this folder.

NOTE: Make a copy of your game first if you can and drag and drop that. Always play it safe and back everything up, especially when moving files.

 

 

Once you’ve moved the files, they should start to populate in the GitHub app.

 

 

Step 5: Once the files have completed moving, we can commit. A commit is a way of saying why certain files were created or what you obtained in a commit. For example, “added houses” would tell us that in that commit, we added houses.

To do this, you can click “Commit to Master” at the bottom left of the window. Remember to name and leave a description for the commit first.

NOTE: We can also create a branch and commit changes to a branch instead of the master as well.

 

 

Step 6: Now what we’ve done basically is create a “local commit”. This means our changes only affect local files and does nothing to the online version. To update the online version as well, click on “Publish Repository” at the top right of the window.

 

 

NOTE: You can choose whether the repo is public or private if you have the upgraded github account. Remember, public means that anyone can access your code and private means that only people you add to the repo can access it. After that, you can click publish.

Now all of our files are safely backed up on the cloud.

Step 7: Next, we can connect the GitHub repository to Unreal 4. To do this, open your project in the Unreal 4 engine. Remember to open the project up from the Git folder you made for the repository. Once its open, click on the “Source Control” button at the top of the screen. It will drop down a menu, click on “Connect to Source Control”

 

 

Step 8: You should now see the Source Control Login window. Choose Git(beta) from the provider menu. If you have Git installed, it should automatically find the git path. Once this is done, click “Accept Settings”. Your project is officially connected to GitHub!

 

 

If you make any changes to your project, you can click on the “Source Control” button at the top of the Unreal 4 window and then select “Submit to Source Control“ from the drop-down menu. Go through the next window’s instructions, it basically just asks you to comment on the commit before sending it to GitHub. You should now see the commit populate in the GitHub App!

 

Additional Resources

Git and GitHub have an incredible amount of supporting information and tutorials for all of your needs for team collaboration.