This code should compile on 5.2, 5.3 and 5.4
See the marketplace page
Voxel Plugin Legacy for Unreal Engine
Home Page: https://voxelplugin.com
This code should compile on 5.2, 5.3 and 5.4
See the marketplace page
https://wiki.voxelplugin.com/Voxel_Graph_Quick_Start. Wiki is out of date, some of the nodes that are referred to don't exist anymore.
Possibility to add/remove voxels along spline would allow for handy terrain modifications: Easy rivers, terrain formations with desired shape, etc. Due to the Marching Cubes nature, combining many spline voxel shapes would result in interesting voxel shapes, easily editable. Ideally, spline point scale would affect voxel volume scale at this location, allowing for even more easy customization.
I've created a very professional visualization:
Some implementation ideas:
V1: Create a Capsule voxel shape tool, so it would allow to create a voxel capsule with desired length, start radius and end radius. Then, divide a spline into segments (with desired density) and add capsules from point to point, for each spline point.
V2: An algorithm for generating uniform point cloud along spline, which then could be used to feed into the Marching Cubes. First thing (probably there's a better way to do this) that comes to mind:
1. Get all possible marching cubes point locations inside spline bounding box
2. For every possible point check if it's in spline range, e.g. by using FindLocationClosestToWorldLocation() from Spline Component and then comparing the distance with spline scale at this spline location.
3. If it's within range, add a point, if not, ignore.
NavMesh doesn't currently generate past 89 degree slopes, preventing it from wrapping around a sphere. Not sure if you planned on adding path finding to your sphere worlds, but I think this is what's preventing it
Severity Code Description Project File Line Suppression State
Error /Script/Voxel.VoxelWorldGenerator's superclass must be /Script/CoreUObject.Object, not /Script/CoreUObject.Interface Procedural H:\MarchingCubes-master\Plugins\Voxel\Source\Voxel\Classes\VoxelWorldGenerator.h 15
`// Copyright 2017 Phyronnaz
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "VoxelWorldGenerator.generated.h"
class AVoxelWorld;
/**
*
*/
UINTERFACE(BlueprintType)
class VOXEL_API UVoxelWorldGenerator : public UInterface
{
GENERATED_UINTERFACE_BODY()
};
class VOXEL_API IVoxelWorldGenerator
{
GENERATED_IINTERFACE_BODY()
public:
/**
* Get default value at position
* @param Position Position in voxel space
* @return Value at position: positive if empty, negative if filled
*/
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Voxel")
float GetDefaultValue(FIntVector Position);
/**
* Get default color at position
* @param Position Position in voxel space
* @return Color at position
*/
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Voxel")
FColor GetDefaultColor(FIntVector Position);
/**
* If need reference to Voxel World
*/
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Voxel")
void SetVoxelWorld(AVoxelWorld* VoxelWorld);
};
`
It appears that LOD1+ of Cubic voxels are only displaying a default material, while marching cubes is showing the correct ones on all LODs (see image1)! some higher lod voxels are getting the other index though (image2). issue appears with all material modes.
Phyronnaz: this is because cubic doesn't find the exact surface voxels on higher LOD
So the displayed material is not exactly the one on the surface
I need help on implementing custom TCP sockets to speed up multiplayer.
What I need is to be able to send serialized data through TCP from the server to the clients.
I already started in VoxelNetworking.h/cpp but it's not working and I don't have time to debug it.
Please leave a comment below if you want to help me on that :)
Hello
Having an issue trying to get the code working on a mac. Unreal Editor crashes even though I have successfully compiled the plugin. Same thing happens if I allow the Unreal Editor to start a build. Not sure if its an XCode issue or lack of support for the Unreal Engine on macs. I have tried with Unreal Engine 17 and 18. Last attempt was with 17.2
SEGV_MAPERR at 0x3
FGenericPlatformMisc::RaiseException(unsigned int) Address = 0x100d9825b (filename not found) [in UE4Editor-Core.dylib]
FOutputDeviceMacError::Serialize(wchar_t const*, ELogVerbosity::Type, FName const&) Address = 0x100faf94f (filename not found) [in UE4Editor-Core.dylib]
FOutputDevice::Logf(wchar_t const*, ...) Address = 0x1010961bd (filename not found) [in UE4Editor-Core.dylib]
FDebug::AssertFailed(char const*, char const*, int, wchar_t const*, ...) Address = 0x100fe908e (filename not found) [in UE4Editor-Core.dylib]
FVertexFactoryType::FVertexFactoryType(wchar_t const*, wchar_t const*, bool, bool, bool, bool, bool, FVertexFactoryShaderParameters* (*)(EShaderFrequency), bool (*)(EShaderPlatform, FMaterial const*, FShaderType const*), void (*)(EShaderPlatform, FMaterial const*, FShaderCompilerEnvironment&), bool (*)()) Address = 0x10338fa4c (filename not found) [in UE4Editor-ShaderCore.dylib]
_GLOBAL__sub_I_Module.Voxel.cpp Address = 0x1574fd268 [/Volumes/Data/GameDev/UnrealEngine/projects/VoxelTest01/Plugins/Voxel/Source/Voxel/Private/VoxelProceduralMeshComponent.cpp, line 144] [in UE4Editor-Voxel.dylib]
Unknown() Address = 0x106e53a0a (filename not found) [in ???]
Unknown() Address = 0x106e53c3a (filename not found) [in ???]
Unknown() Address = 0x106e4f170 (filename not found) [in ???]
Unknown() Address = 0x106e4f103 (filename not found) [in ???]
Unknown() Address = 0x106e4e2a6 (filename not found) [in ???]
Unknown() Address = 0x106e4e33a (filename not found) [in ???]
Unknown() Address = 0x106e423e5 (filename not found) [in ???]
Unknown() Address = 0x106e4b002 (filename not found) [in ???]
dlopen Address = 0x7fff6b959e86 (filename not found) [in libdyld.dylib]
FMacPlatformProcess::GetDllHandle(wchar_t const*) Address = 0x100f9f1de (filename not found) [in UE4Editor-Core.dylib]
FModuleManager::LoadModuleWithFailureReason(FName, EModuleLoadResult&, bool) Address = 0x1010fe675 (filename not found) [in UE4Editor-Core.dylib]
FModuleDescriptor::LoadModulesForPhase(ELoadingPhase::Type, TArray<FModuleDescriptor, FDefaultAllocator> const&, TMap<FName, EModuleLoadResult, FDefaultSetAllocator, TDefaultMapHashableKeyFuncs<FName, EModuleLoadResult, false> >&) Address = 0x10306631f (filename not found) [in UE4Editor-Projects.dylib]
FProjectManager::LoadModulesForProject(ELoadingPhase::Type) Address = 0x103082b2a (filename not found) [in UE4Editor-Projects.dylib]
FEngineLoop::LoadStartupModules() Address = 0x100ca056d (filename not found) [in UE4Editor]
FEngineLoop::PreInit(wchar_t const*) Address = 0x100c854c0 (filename not found) [in UE4Editor]
GuardedMain(wchar_t const*) Address = 0x100c97901 (filename not found) [in UE4Editor]
-[UE4AppDelegate runGameThread:] Address = 0x100ca55d0 (filename not found) [in UE4Editor]
-[FCocoaGameThread main] Address = 0x100f6b446 (filename not found) [in UE4Editor-Core.dylib]
Unknown() Address = 0x7fff46120ee8 (filename not found) [in Foundation]
_pthread_body Address = 0x7fff6bbe36c1 (filename not found) [in libsystem_pthread.dylib]
_pthread_body Address = 0x7fff6bbe356d (filename not found) [in libsystem_pthread.dylib]
thread_start Address = 0x7fff6bbe2c5d (filename not found) [in libsystem_pthread.dylib]
Any insight would be appreciated.
Would be useful to have some more options on the VoxelToolManager:
Here is link to marketplace (https://www.unrealengine.com/marketplace/runtime-mesh-component). From description is says that is almost 100% compatible with the ProceduralMeshComponent and offers better performance in terms of memory. And many other features like navigation mesh support. Minus is everyone who wants to use your plugin needs to install runtime mesh component plugin.
Is it possible to support light maps for baked lighting?
This feature would only be interesting if the geometry never changes during runtime.
The use case would be, having designers sculpt geometry with an editor tool and use light mass to achieve a high quality lighting
It would be nice to be able to prune out large areas of empty voxels (prune) as well as a flood fill operation (which works like paint bucket in ms paint, removing unseen voxel caverns. and voxel combination functions such as SDF union or activity based intersect. These are nodes in houdini that might be nice to have
These are all features of OpenVDB that could be looked at for reference. Prune and flood fill are usually a option on every node as I believe houdini would otherwise hold lots of junk data in memory if it had to cache betwene a prune node.
https://www.sidefx.com/docs/houdini/nodes/sop/vdb.html
https://www.sidefx.com/docs/houdini/nodes/sop/vdbactivate.html
https://www.sidefx.com/docs/houdini/nodes/sop/vdbcombine.html
After 25000 in size holes start to appear in the sphere generator.
It would be great if the actor spawner had way to check and ensure hits on bigger surface areas, to avoid actor overhangs, etc.
When I am spawning buildings (big placements), one solution I have used is to do 4 line traces (at the 4 corners of the mesh's bounding box) to ensure good placement.
Thank you!
This line of code is causing a few errors for me wherever it is used:
const TArray< TWeakObjectPtr<UObject> >&SelectedObjects = DetailLayout.GetDetailsView().GetSelectedObjects();
Errors: C2228 C2530
"Left of '.GetSelectedObjects' must have class/struct/union"
"'SelectedObjects': references must be initialized"
This is a test
In the TriplanarProjection material function, the final Normalize operation under the "Weigths computation" comment section is not correct according to the reference paper at http://transvoxel.org/Lengyel-VoxelTerrain.pdf, causing visual artifacts over the blending area (brighter seams). To fix, you just divide by the sum of the components, instead of using Normalize.
This idea may sound improbable: destruction weight painting.
You can precise the parts where you want the terrain to be destructible by simply paint on desired vertices.
Also the amount of destruction will be defined by the weight assigned to the vertex groups.
crashes upon resize
I'm creating an issue as suggested by author. For now, dynamic Navmesh doesn't react to changing voxel terrain.
It would be great to have a pathfinding working with voxel terrain, as this is a crucial feature for most games. What we know for now is that it's probably possible to make UE Navmesh work with dynamic voxels, example: https://www.youtube.com/watch?v=a9c8lvTLUoI
Currently seeds can't be passed through flow merge nodes or function separators. Is this possible? One use case is having a single seed control a whole graph by using hash seed nodes to generate new seeds from the original, but this won't work if the original seed needs to be passed through function separators.
In editor I'm moving around voxel worlds to build a level, but I want to "bake" those worlds down a 1 voxel world for less draw calls.
You might wonder "why not use data assets"? Because I can tweak these worlds with tools and stuff, and its more accurate to final result
It would be nice to be able to "Stamp" a voxel world onto another like data assets can be stamped.
For those who only wants the plugin.
This plugin is pure gold! I am looking to integrate this plugin into my FPS project and want to make it response to damage. However, browsing code is very difficult and time consuming. Would you please build a small code reference page?
Please tell me what (set of) function(s) allow(s) to sculpt terrain?
Hey @Phyronnaz - Currently we do not have any atmospheric scattering for spherical worlds.
Would it be possible to get this so that we can have brighter scenes on planets. Example 1 Example 2 Example 3
Currently planets look dark and are hard to see from a distance even in the view port unless you have them selected.
Hey Phyronaz, I’m making a game and would like to use marching cubes for the vocal terrain but was wondering if there’s already a predetermined way to set biomes? (So that I can set certain AI to spawn in certain biomes)
At the moment they display whether the element is a Height or Ray spawner - it would be much more helpful to see the spawner name when collapsed
https://discordapp.com/channels/379297529235243020/379360645327486996/723293681087545384
When you manually place VoxelDataAsset on the world, it has a few options which help with performance:
"Import as Reference" (has to be unchecked) and "Merge Mode" and both of them work great.
Now here is the main problem, when you try to spawn the same exact asset via foliage spawner, it does not include those options which in result gives you very bad performance.
Would be nice if those options were exposed in the VoxelAssetSpawner, so solve the performance issues.
Since the pathfinding is done and AI characters can move around the voxel world even when using navigation invokers, as @Phyronnaz said:
The only thing that's missing now is having the possibility to generate collisions from different positions, because we don't want AI falling through the map.
Just like the Navigation Invoker Components invoke navmesh generation around them, we could have something like Voxel Collision Invoker Components, which would invoke voxel collision generation. Just an idea.
Title- The link just redirects to the download page.
Please see this post for details:
https://forums.unrealengine.com/community/released-projects/125045-voxel-plugin?p=1430629#post1430629
Hey bit of a feature request -
Would it be possible import mine craft worlds or parts of a minecraft world into UE via this plugin?
There is a C++ library here that may help with this.
Here is a video of Voxel Farm doing something similar. :)
Right now, the plugins works preferably for UE 4.17, maybe because of bUseAsyncCooking
However, this version is quite new and upgrading project breaks more than fixes.
Would you please consider making this plugin compatible with UE 4.16.x?
I commented out bUseAsyncCooking but don't really know the consequence!
Simple repo:
[2020.06.12-14.00.05:835][602]LogAssetEditorSubsystem: Opening Asset editor for MaterialInstanceConstant /Voxel/Examples/Materials/Quixel/MI_VoxelQuixel_FiveWayBlend.MI_VoxelQuixel_FiveWayBlend
[2020.06.12-14.00.06:613][602]LogMaterial: Display: Missing cached shader map for material Material_3, compiling.
The thread 0x99c has exited with code 0 (0x0).
[2020.06.12-14.00.06:635][602]LogShaderCompilers: Display: Worker (1/9): shaders left to compile 4
[2020.06.12-14.00.06:636][602]LogShaderCompilers: Display: Worker (2/9): shaders left to compile 3
[2020.06.12-14.00.06:636][602]LogShaderCompilers: Display: Worker (3/9): shaders left to compile 2
[2020.06.12-14.00.06:636][602]LogShaderCompilers: Display: Worker (4/9): shaders left to compile 1
Exception thrown at 0x00007FFBC038A799 in UE4Editor.exe: Microsoft C++ exception: _com_error at memory location 0x000000BA1C3FC268.
Fatal error: [File:D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/D3D12RHI/Private/D3D12Util.cpp] [Line: 581]
hr failed
at D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/D3D12RHI/Private/Windows/WindowsD3D12PipelineState.cpp:697
with error E_INVALIDARG
As requested awhile back, here is an issue post on something I thought would be useful. As it seems like the overhead of sampling a texture is semi-large, an option on the sample texture node to use a specific color when the pixel is out of bounds would be nice.
The example use case would be a height map texture where the borders of the image are all set to the same value on purpose. Such as 1.0 all around the sides and 0.0 to indicate the lowest field.
I need help to implement world origin shifting as suggested by @HeadClot.
Please leave a comment below if you want to help me on that :)
I've upgraded to Visual Studio 2017 (version 15.5.2) and still get the compile errors:
\CollisionMeshHandler.cpp(52): error C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
\CollisionMeshHandler.cpp(246): error C4800: 'int32': forcing value to bool 'true' or 'false' (performance warning)
When trying to correct for the error with "Value != 0", another problem occurs. The build is successful in Visual Studio, but when I go to launch the .uproject, it says it can't find the Voxel.dll and tries to rebuild, but fails. This may be an unreal problem, and not your plugin though. Any info that might help me?
A tool for the rapid creation of Solar System sized game worlds would be beneficial to level designers as it would allow them to visualize and layout solar systems faster as well as adjust orbits, and the like more accurately.
We already have origin re-basing built into Unreal Engine 4. So hopefully scale should not be a problem.
It might be worth looking at Star Citizen's Sol ED or This tool for Influence on this tool.
Hi there Phronnaz,
Trying to get your (super cool) voxel project going but getting several of these errors in VoxelPolygonizer.cpp:
Severity Code Description Project File Line Suppression State
Error C4800 'uint64': forcing value to bool 'true' or 'false' (performance warning) Procedural X:\dev\3D\Unreal\UE4\projects\examples\MarchingCubes-master\MarchingCubes-master\Plugins\Voxel\Source\Voxel\Private\VoxelPolygonizer.cpp 106
Googled a bit and the answer seems to be some sort of hacky casting, thought I'd ask you if there was a cleaner more correct way to fix it.
Also, why isn't everyone else getting the same problem? I'm running 4.17 on a 64bit win10 pc with heaps of everything.
i cannot get the example for multiplay in your project.
there's MPVoxelPlayerController but it doesn't work in Default map.
and I cannot find any map for multiplay.
any hint or clue plz
Currently they can't have collision, I don't know if your custom voxel grass type is going to implement this but maybe making the procedural foliage tool work on your voxel worlds would be easier. grass doesn't need collision obviously, but it would be nice for trees/rocks.
Currently just removing a tool's material in blueprint makes errors. Would be nice to be able to disable the tool overlay just by removing the material.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.