I got a new ue4 project going, and I was able to add the UE4 Plugin, create a VoxelActor and texture it, then run and jump around a bit on the new terrain! Every time something didn't seem right, I was able to refer to the tutorial and see where I messed up, so thank you for making the tutorial detailed for these parts!

Since my world is not flat, I think I need to implement IVoxelLayer. I found all the C++ example projects, and I think I'll have an ok copying the example layers, but I'm struggling to get Visual Studio to recognize the code in the VoxelFarmPlugin. I'm trying to create a new class in my unreal project that inherits from VoxelFarm::IVoxelLayer. I know I'm definitely missing a step - I'm not all that familiar with Visual Studio, as I come from a Java/Eclipse background. I would definitely appreciate a pointer here.

Once I've got a VoxelLayer, how do I get my VoxelActor to include it?

EDIT: I didn't think I had changed anything, but now my main unreal project won't compile Here's the buildlog.

1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>------ Build started: Project: Shoggoth, Configuration: Development_Editor x64 ------
2>Creating makefile for hot reloading ShoggothEditor (game project files are newer)
2>Compiling game modules for hot reload
2>Parsing headers for ShoggothEditor
2>  Running UnrealHeaderTool "C:\Users\tim\Documents\Unreal Projects\Shoggoth\Shoggoth.uproject" "C:\Users\tim\Documents\Unreal Projects\Shoggoth\Intermediate\Build\Win64\ShoggothEditor\Development\ShoggothEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
2>Reflection code generated for ShoggothEditor in 6.7177152 seconds
2>Performing 6 actions (4 in parallel)
2>[2/6] Resource PCLaunch.rc
2>C:\Users\tim\Documents\Unreal Projects\Shoggoth\Plugins\VoxelFarmPlugin\Source\VoxelFarmPlugin\Public/VoxelFarmWorldActor.h(285): error C4596: 'ContourThreadJob': illegal qualified name in member declaration
2>C:\Users\tim\Documents\Unreal Projects\Shoggoth\Plugins\VoxelFarmPlugin\Source\VoxelFarmPlugin\Public\VoxelFarmWorldActor.h(285): error C4596: 'ContourThreadJob': illegal qualified name in member declaration
2>ERROR : UBT error : Failed to produce item: C:\Users\tim\Documents\Unreal Projects\Shoggoth\Plugins\VoxelFarmPlugin\Binaries\Win64\UE4Editor-VoxelFarmPlugin-552.dll
2>Total build time: 74.57 seconds (Local executor: 0.00 seconds)
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ""C:\Program Files\Epic Games\UE_4.18\Engine\Build\BatchFiles\Build.bat" ShoggothEditor Win64 Development "C:\Users\tim\Documents\Unreal Projects\Shoggoth\Shoggoth.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
2>Done building project "Shoggoth.vcxproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I suspect that I've got that add the voxel stuff to my Classpath somehow, but I'm not sure how to do that in VS/C++. Sorry!
0 0
Hi bladedpenguin,
this error is fixed in the upcoming release, simply remove AVoxelFarmWorlActor:: from the method declaration.
It should be bool ContourThreadJob() instead.
1 0
Augh well I feel foolish, since this is the same issue in the demo.  Still, when I try to create a new class, I am getting the error "Cannot find base class "VoxelFarm::IVoxelLayer""
0 0
It could be that the header VoxelLayer.h is missing from the plugin's include folder.
Can you see it?
1 0
To add a new IVoxelLayer in the UE4 plugin:

Open VoxelFarmBundle.cpp and locate the VF_UEC::BundleWorld::BundleWorld constructor. There you have a pointer to the worldGenerator object used by the actor. The generator contains the stack of voxel layers that will be used.

You must add your own by doing:

worldGenerator->addVoxelLayer(myLayer, false);
1 0
Thank you! I was able to find VF_UEC::BundleWorld::BundleWorld, and I can see where it is adding some other VoxelLayer.

In the filesystem, I could see Plugins\VoxelFarmPlugin\include\VoxelLayer.h, but Visual Studio still couldn't see it. I finally figured out though that I needed to "Generate Visual Studio project files" after adding the plugin. I think that solved my problems with VS, but now the UE4 Editor won't start. I've attached the files that it generated when it crashed.
0 0
Unfortunately we cannot see all the callStack in the dump, only the engine's calls.
If you can, on your side, double-click on the dump file, then on the right of the screen click on debugWithNativeOnly.
A pop-up will appear, you can press Break.
If you don't have the callStack window opened, go to Debug/Windows/Call Stack.
Hopefully, if you think this is still not helping you, you can provide us a screenshot of the callstack and/or of the piece of code where this occurs in the plugin.
1 0
Thank you!  I was able to figure out what the issue was, and it turned out to be unrelated to the VoxelFarm plugin.
0 0
I've made it a bit further. I created a new bundle without any biomes, and I was able to get one of the example  IVoxelLayer classes working. Unfortunately, I couldn't get VS to recognize any of my Unreal Project classes/includes, so I included the example class inline in the same file as VF_UEC::BundleWorld::BundleWorld. Obviously this isn't ideal, so I'm wondering what the ideal/correct way of getting plugin code to recognize my class is. I need additional data out of that class during gameplay. Perhaps this question is better suited to the UE4 forums.

Is there a way to clear cache on the VF plugin? I keep making changes to the VoxelLayer, and recompiling, and I see 2>Module.VoxelFarmPlugin.cpp in the build log, which makes me thing that the VoxelLayer and everything is being recompiled correctly, but I don't see any changes In the editor when i click Play, which makes me think that the VoxelFarmActor needs to be reset somehow, even though the game is restarted between compiles.

Once again, Thanks for your patience.
0 0