Building from a new UE4 C++ project (Part 2) - This brief tutorial is a continuation on how to create a project from scratch with the INDIE License with UE4 (step by step, if you're struggling) This second part involves placing an actor correctly in UE4 so that it will be interfaced with the VoxelFarm Engine. I am using UE 4.11.2 and voxel studio SDK 2.03.106, Windows 10.
1. Create a "Paks" folder in your project and bake an exported VoxelFarm bundle.pak to this folder for your project. (This is outlined in the tutorial documentation.) This will be the map that is rendered at runtime.
2. Create a CellMaterial folder in your project and copy the CellMaterial files from the Demo.UnrealVoxelFarm project into this one. This will be in the Content folder of the Demo.UnrealVoxelFarm
3. In the content browser of UE4 (bottom of screen where your files and assets are) go to C++ Classes --> YourProject, you should see VoxelFarmCharacter, VoxelFarmActor, NewProjectGameMode
and a VoxelFarm folder. Drag VoxelFarmActor into the scene, place it somewhere in the scene.
4. Click on the VoxelFarmActor that appears in the World Outliner (right hand side of UE4.) They Type should say "Open VoxelFarmActor.h"
In the details tab (bottom right) go to VoxelFarmActor and for the Vf Material assign it VoxelFarmCellMaterial. There is no green bar underneath the material at this point, indicating an error. Double click on the material to open up the blueprint view. You will see in the box "shade" there is an ERROR! in red on the box itself. Assets are missing and must be loaded. The error is "Missing Material Function"
5. Copy all the assets from Demo.UnrealVoxelFarm to the Content folder in yourProject. (Just the *.asset) files. Click on Compile and Build, don't click on Play yet.
6. The next part is a little detailed and involves the blueprint editor in UE4 (diagram coding.) In the world outliner click on your VoxelFarmActor, in the details tab, double click on the Vf Material to open the blueprint. Double Click the shade box that has ERROR!, double click sample3MaterialsLOD that has ERROR!, double click sampleMaterialLOD that has ERROR!, double click getMaterialProperty that has ERROR! Go up to the unconnected "Unspecified Function" and click that. In the details panel under "material Funct" select MaterialPropertiesHalfTexelNew from the dropdown. Then click save. In the blueprint editor there are tabs that have been opened during this step and you will notice the errors have been resolved. Going back to the main screen the VF Material for VoxelFarmActor should be green underneath, a green bar in the picture indicating there are no errors.
7. Save the project. Click Run/Play, it should be working nicely. When you reload the project later don't forget the VoxelFarmActor that was placed will only be on that specific map (so if you have multiple Map files you will need to place an actor for each scene.) The project can also be loaded and run from Visual Studio 2015.
This concludes "Building from a new UE4 C++ project" and "getting set up properly with the workflow and environment." This information is also found on the Unreal Engine 4 Example at http://voxelfarm.com/doc.html?unreal-engine-4-example