Compiling code plugins for Unreal Engine binary release.

Hi guys.

This post isn’t directly related to do with the Ultima Underworld Demo Remake (News about that soon) but it might be useful for many people out there who, like me have come across this problem and not been able to find a solution. I finally found out the process and would like to share it in a format that should help others.

Who is this tutorial for?

  1. Anyone who only uses the binary release of Unreal Engine.
  2. Uses Blueprint only projects.
  3. Has never or rarely used Visual studio.
  4. Wants to compile code plugins from GitHub/forums to be used with the binary release of Unreal Engine and be able to keep them up to date when new version are released.

I probably also need to say that this may not be the best way to do this but it is the way I found works for me. Let me know if there is a better way.

Prerequisites

  1. make sure you have a binary version of Unreal Engine installed. This means a version that is installed by the Epic Games Launcher. I’m going to be using the latest release of Unreal Engine at the time of writing which is 4.16.2.
  2. You will also need an Unreal Engine account and a GitHub account that are linked together. Go here for instructions on how to set this up.
  3. You will need to install The GitHub desktop application from here. Check you GitHub account works OK with the App.
  4. Install Microsoft Visual Studio Community 2017 from here. After it has installed configure it to work with Unreal Engine using the instructions here.
  5. A plugin that you would like to use. For this tutorial I’m going to use the run time mesh loader plugin by the forum user GameInstitutes here but you can use any similar plugin. If you are following along just go to his GitHub page and download the Zip file using the green button labelled “clone or download”.
  6. Install a text editor. I prefer Notepad++ from here.

Setup

  1. Go to the following location in you binary install of Unreal Engine. The default location is C:\Program Files\Epic Games\UE_4.16\Engine\Source\Runtime\Launch\Resources
  2. Right click on the version.h file and open it with Notepad++.
  3. Scroll down to line 71 which should read #define BUILT_FROM_CHANGELIST  followed by a number. For 4.16.2 the number is 3514769.
  4. Make a copy of this number. It will be different if you are using a different version of the Engine.
  5. Go to the Unreal Engine GitHub page here.
  6. Make sure the “Branch” drop down button is set to “release” or the same version of the binary Engine that you are using.
  7. Click the green “Clone or download” button
  8. Click “Open in desktop”
  9. This will launch the GitHub desktop application and fill in the URL and default local path location. If you need to change the local path location please do so here. Make a note of this location as we will be going there soon. For this tutorial I am changing mine to D:\GitHub.
  10. If everything is OK click the “Clone” button. This will take a while to download.
  11. Go to the folder location where the files were just downloaded.
  12. Run Setup.bat as administrator by right clicking and “Run as administrator”‘. This will download the rest of the software. This will take a long time depending on your internet connection speed.
  13. When this has finished right click GenerateProjectFiles.bat and run as administrator. When this has finished you should see a file called UE4.sln. This is the Visual Studio project file.
  14. Now go to the folder D:\GitHub\UnrealEngine\Engine\Source\Runtime\Launch\Resources and open the file version.h in Notepad++.
  15. Scroll down to line 71 #define BUILT_FROM_CHANGELIST 0
  16. Replace the 0 with the number we saved in step 4.
  17. Save the file.
  18. Now go back up to the folder D:\GitHub\UnrealEngine containing the UE4.sln file.
  19. Double click the UE4.sln file. If you have installed Visual Studio correctly then this will load Visual Studio and then load the Unreal Engine source code. This will take a while to load depending on your system. Make sure there is no activity in the blue bar at the bottom of the screen.
  20. When it has loaded fully you will see a file list on the left hand side of the screen. highlight UE4 under the engine folder by clicking on it and then right click and click build. This compile process can take several hours to complete depending on your system specification. When it has finished you should see 0 failed.
  21. Close Visual Studio
  22. Go to the folder D:\GitHub\UnrealEngine\Engine\Binaries\Win64
  23. Run the file UE4Editor.exe. It would also be a good idea to create a shortcut to this file on the desktop for future use.
  24. This will launch the newly compiled Epic Games Launcher which will look familiar to binary Engine users.
  25. Click the “New Project” tab
  26. Click the “C++” tab
  27. Make sure the Basic Code template is selected with no starter content.
  28. Change the name to something suitable. I use PluginDev so I can re use the project to compile plugins in the future.
  29. Click “Create project
  30. When the project has been created and opened, close the project.

Compile the plugin

  1. Got to the location of the project created in step 30. the default location is C:\Users\<your username>\Documents\Unreal Projects\PluginDev
  2. Create a new folder here called Plugins.
  3. Open the zip file of the plugin you downloaded from GitHub. copy the contents to the plugins folder you just created. In our case the folder structure should be C:\Users\<your username>\Documents\Unreal Projects\PluginDev\Plugins\RuntimeMeshLoader.
  4. Go to the folder C:\Users\<your username>\Documents\Unreal Projects\PluginDev
  5. Double click the PluginDev.sln file. This will load the project into Visual Studio.
  6. When the project has fully loaded, right click PluginDev and click build. This will take a while to finish.
  7. Close Visual Studio.

Use the Plugin

  1. Go to the folder C:\Users\<your username>\Documents\Unreal Projects\PluginDev\Plugins
  2. Right click the RuntimeMeshLoader folder or the plugin folder you are trying to compile and click copy.
  3. Go to the folder of the Binary project you want to use the plugin in. for example C:\Users\<your username>\Documents\Unreal Projects\<your project>.
  4. Create a plugins folder if there is not one already there.
  5. Go into the Plugins folder, right click and paste the new compiled plugin.
  6. Open your normal binary Unreal Engine Launcher and load your project. If everything worked there should be no errors during loading the project.
  7. Click edit, Plugins.
  8. In this case scroll tot he bottom of the list to find the “Other” category. You will see the RuntimeMeshLoader plugin. Make sure it is ticked. If you are trying to use a different plugin then search the list for it as it may be under a different category.

Conclusion

This is quite long process for someone who has not done this before. It has worked so far with the few plugins  have needed but I can’t be sure if this will work for all. Hope this helps someone and let me know if you know a better way or I did something wrong.

Advertisements

Addition to my vive setup

Ok so again it has been a while since my last post. Just to show you my new toy. I got one of the new Vive trackers. The best use case I could come up with was a way to track the upper body. This would enable me to do true decoupled locomotion from the headset orientation and also allow me to lock virtual items to my body like a utility belt, holster. Arrow quiver or sword sheith and have it stay oriented to my body and not the headset. Here is how I attached it.

My New Toys

Avatar

So it has been a very long time since I made an update. I have been waiting for some new hardware to arrive and now that time has come. As you can see below I now own an HTC Vive and the Oculus Rift CV1. The Oculus actually arrived first and got used for about a day. A week later my Vive turned up there hasn’t been a day since that it hasn’t been used. The Vive with hand controllers and the room scale are hands down the current ultimate VR experience. I was a huge fan of Oculus all through the DK1 and DK2 but HTC and Valve have really nailed it with their first generation headset. I will do a full review of both heat sets and my own personal comparison. Both have things they do better than the other but for the overall experience you just an’t beat the Vive.

Lighting test – Hand held torch

Avatar

Hey guys

I have been playing with lighting for the first person character and wanted to start with a hand held torch. The flames need to be much more dynamic when the torch is moved but it is a good start. Also the hand and arm IK is still a bit dodgy (may also have been too close to my hydra base station when recording this).

Managed to figure out a better way of capturing video using the nvidia shadowplay feature on my nvidia 780ti so videos should be much better from now on.

Really really looking forward to the DK2 shipping soon. It’s gonna be awesome. Also congrats to control VR for reaching their kickstarter goal. Can’t wait to get my hands on (in) that hardware.

UPDATE : This video made it into the UnrealEngine Twitch live stream spotlight. WOW thanks guys!

btn_donateCC_LG

Playing with DX11 distance based tessellation for environment objects

Avatar

Hi guys

I’ve been looking at how to make realistic looking environment materials and it seems that tessellation is a very powerful way of representing detail in geometry. Especially when you factor in the stereo effect of the Oculus Rift which makes the effect really realistic. So to figure out how to do this I focused on one of my wall materials as a test. I found 3 of very useful tutorials online, that when combined gave me the results I wanted. The first tutorial I found was by a guy called RealDaveTheFreak. you can find his Youtube channel here and its worth checking as he has some great tutorials.

He has 2 tutorials on tessellation. One for basic tessellation and one for distance based tessellation. However his solution for distance based tessellation while great for small static meshes doesn’t work quit as well for larger objects. his tutorial uses the distance from the object with the material on it, to the camera. As I said this works fine for smaller static meshes but not for larger meshes as it will tessellate the entire mesh when it may not be necessary as parts of the object could be far away.

The second tutorial is by Epic’s Alan Wilard (Hope I spelt that right) and is about location based opacity. You can find it here and the second part is here. This uses a cool feature called a sphere mask to make parts of meshes transparent.

The third tutorial is on vertex painting and it by MetalGameStudios. You can find some great tutorials by them in their Youtube channel here.

So using the Sphere mask with a center based on the camera location and using a falloff and radius to adjust I got the following effect.

The frame rate is quite low on the video capture but in editor and in game it runs silky smooth. If anyone knows how to capture better video please let me know. I’m currently using Microsoft Expression screen capture.

I have tessellation on the ceiling, floor and walls.

A problem I encountered was separation in some of the meshes in certain places where the floor meets the walls.

Capture1

So using the info I got from the vertex painting tutorial I used vertex colors to mask out the height map for the problem areas.

Capture2

here is the tessellation part of the material for you guys to try out.

Capture

The texture sample is the height map.

 

Hope this helps anyone and thanks to the guys who made the tutorials that got me this far.

 

btn_donateCC_LG