Blueprint API
Last updated
Last updated
This page lists all the blueprint functions available in the plugin
Updated 2021-01-30 05:10:17.367206
Add a disable edits box to the world
Add a disable edits box to the world
Runs asynchronously
Create Data Asset from World Section
Add a voxel asset to the world: can be a data asset (eg imported from a mesh), or a graph asset
Will not provide the Previous Generator, so won't work with graphs that use it!
Unlike ImportAssetAsReference, this one copies the asset data into the world. Can be expensive for large assets. Use this if your asset is relatively small
Add a voxel asset to the world: can be a data asset (eg imported from a mesh), or a graph asset
Cheap, unless there are edited voxels in the zone the asset is imported in
Will provide the PreviousGenerator to voxel graphs
Add a voxel asset to the world: can be a data asset (eg imported from a mesh), or a graph asset
Cheap, unless there are edited voxels in the zone the asset is imported in
Will provide the PreviousGenerator to voxel graphs
Runs asynchronously
Add a voxel asset to the world: can be a data asset (eg imported from a mesh), or a graph asset
Will not provide the Previous Generator, so won't work with graphs that use it!
Unlike ImportAssetAsReference, this one copies the asset data into the world. Can be expensive for large assets. Use this if your asset is relatively small
Specialization of ImportAsset for data assets with no scale nor rotation
Specialization of ImportAsset for data assets with no scale nor rotation
Add a voxel modifier asset to the world. Should be a graph asset.
Unlike ImportAsset, this WILL provide the Previous Generator to the graph, so you can access the existing voxel value
Unlike ImportAssetAsReference, this one copies the asset data into the world. Can be expensive for large assets. Use this if your asset is relatively small
Add a voxel asset to the world: can be a data asset (eg imported from a mesh), or a graph asset
Will not provide the Previous Generator, so won't work with graphs that use it!
Unlike ImportAssetAsReference, this one copies the asset data into the world. Can be expensive for large assets. Use this if your asset is relatively small
Invert Data Asset
Set Data Asset Material
Add a box shape
See: AddBox, AddBoxAsync and FVoxelBoxToolsImpl::AddBox
Add a box shape
Runs asynchronously in a background thread
See: AddBox, AddBoxAsync and FVoxelBoxToolsImpl::AddBox
Remove a box shape
See: RemoveBox, RemoveBoxAsync and FVoxelBoxToolsImpl::RemoveBox
Remove a box shape
Runs asynchronously in a background thread
See: RemoveBox, RemoveBoxAsync and FVoxelBoxToolsImpl::RemoveBox
Paint a box shape
See: SetMaterialBox, SetMaterialBoxAsync and FVoxelBoxToolsImpl::SetMaterialBox
Paint a box shape
Runs asynchronously in a background thread
See: SetMaterialBox, SetMaterialBoxAsync and FVoxelBoxToolsImpl::SetMaterialBox
Set the density in a box
See: SetValueBox, SetValueBoxAsync and FVoxelBoxToolsImpl::SetValueBox
Set the density in a box
Runs asynchronously in a background thread
See: SetValueBox, SetValueBoxAsync and FVoxelBoxToolsImpl::SetValueBox
Use bSelectVoxelOutside to choose which voxel to select, between the two sides of the face hit
Get Cubic Voxel Value
Set Cubic Voxel Value
Remove materials that do not affect the surface. Same visual result but will lead to better compression.
Digging will look different.
Remove materials that do not affect the surface. Same visual result but will lead to better compression.
Digging will look different.
Finds the closest voxel to Position that is not empty
This is useful to do edits, or to query the material at a position
Finds the closest voxel to Position that is not empty
This is useful to do edits, or to query the material at a position
Get a save of the world and compress it
Get a save of the world and compress it
Get the density at Position
Get the material at Position
Get the material at Position
Get a save of the world
Get a save of the world
Get the density at Position
Get the density at Position
Read a large number of voxels at a time
Read a large number of voxels at a time, asynchronously
Load from a compressed save
Load from a save
Round voxels that don't have an impact on the surface. Same visual result but will lead to better compression
Round voxels that don't have an impact on the surface. Same visual result but will lead to better compression
Set the material at Position
Set the material at Position
Set the density at Position
Set the density at Position
Stamps a cylinder, to quickly level parts of the world
If additive, will stamp a smooth cylinder above Position. Else will remove one below Position
See: Level, LevelAsync and FVoxelLevelToolsImpl::Level
Stamps a cylinder, to quickly level parts of the world
If additive, will stamp a smooth cylinder above Position. Else will remove one below Position
Runs asynchronously in a background thread
See: Level, LevelAsync and FVoxelLevelToolsImpl::Level
Convert Mesh to Voxels
Convert Mesh to Voxels No Materials
Create Mesh Data from Static Mesh
Create Texture from Material
For some surface tools you'll need to use CreateSurfaceVoxelsFromHitsWithExactValues instead
Will store the voxel values
Find voxels using linetraces
Find voxels using linetraces, asynchronously
Get Hits Average Normal
Get Hits Average Position
Get Hits Positions
Add a sphere
See: AddSphere, AddSphereAsync and FVoxelSphereToolsImpl::AddSphere
Add a sphere
Runs asynchronously in a background thread
See: AddSphere, AddSphereAsync and FVoxelSphereToolsImpl::AddSphere
Apply a 3x3x3 kernel
See: ApplyKernelSphere, ApplyKernelSphereAsync and FVoxelSphereToolsImpl::ApplyKernelSphere
Apply a 3x3x3 kernel
Runs asynchronously in a background thread
See: ApplyKernelSphere, ApplyKernelSphereAsync and FVoxelSphereToolsImpl::ApplyKernelSphere
Apply a 3x3x3 kernel to the materials
See: ApplyMaterialKernelSphere, ApplyMaterialKernelSphereAsync and FVoxelSphereToolsImpl::ApplyMaterialKernelSphere
Apply a 3x3x3 kernel to the materials
Runs asynchronously in a background thread
See: ApplyMaterialKernelSphere, ApplyMaterialKernelSphereAsync and FVoxelSphereToolsImpl::ApplyMaterialKernelSphere
Remove a sphere
See: RemoveSphere, RemoveSphereAsync and FVoxelSphereToolsImpl::RemoveSphere
Remove a sphere
Runs asynchronously in a background thread
See: RemoveSphere, RemoveSphereAsync and FVoxelSphereToolsImpl::RemoveSphere
Removes all the voxels in a sphere, if their single index is contained in Internal (Min <= Index <= Max)
Mainly intended for the cubic mode
See: RemoveSphereWithDurability, RemoveSphereWithDurabilityAsync and FVoxelSphereToolsImpl::RemoveSphereWithDurability
Removes all the voxels in a sphere, if their single index is contained in Internal (Min <= Index <= Max)
Mainly intended for the cubic mode
Runs asynchronously in a background thread
See: RemoveSphereWithDurability, RemoveSphereWithDurabilityAsync and FVoxelSphereToolsImpl::RemoveSphereWithDurability
Reverts the voxels inside a sphere shape to a previous frame in the undo history.
Can be used to "paint" the undo history
NOTE: Does not work with bMultiThreaded and does not fill ModifiedValues!
See: RevertSphere, RevertSphereAsync and FVoxelSphereToolsImpl::RevertSphere
Reverts the voxels inside a sphere shape to a previous frame in the undo history.
Can be used to "paint" the undo history
NOTE: Does not work with bMultiThreaded and does not fill ModifiedValues!
Runs asynchronously in a background thread
See: RevertSphere, RevertSphereAsync and FVoxelSphereToolsImpl::RevertSphere
Reverts the voxels inside a sphere shape to their generator value
NOTE: Does not work with bMultiThreaded and does not fill ModifiedValues!
See: RevertSphereToGenerator, RevertSphereToGeneratorAsync and FVoxelSphereToolsImpl::RevertSphereToGenerator
Reverts the voxels inside a sphere shape to their generator value
NOTE: Does not work with bMultiThreaded and does not fill ModifiedValues!
Runs asynchronously in a background thread
See: RevertSphereToGenerator, RevertSphereToGeneratorAsync and FVoxelSphereToolsImpl::RevertSphereToGenerator
Paint material in a sphere shape
See: SetMaterialSphere, SetMaterialSphereAsync and FVoxelSphereToolsImpl::SetMaterialSphere
Paint material in a sphere shape
Runs asynchronously in a background thread
See: SetMaterialSphere, SetMaterialSphereAsync and FVoxelSphereToolsImpl::SetMaterialSphere
Set the density in a sphere
See: SetValueSphere, SetValueSphereAsync and FVoxelSphereToolsImpl::SetValueSphere
Set the density in a sphere
Runs asynchronously in a background thread
See: SetValueSphere, SetValueSphereAsync and FVoxelSphereToolsImpl::SetValueSphere
Smooth materials in a sphere
See: SmoothMaterialSphere, SmoothMaterialSphereAsync and FVoxelSphereToolsImpl::SmoothMaterialSphere
Smooth materials in a sphere
Runs asynchronously in a background thread
See: SmoothMaterialSphere, SmoothMaterialSphereAsync and FVoxelSphereToolsImpl::SmoothMaterialSphere
Smooth a sphere
See: SmoothSphere, SmoothSphereAsync and FVoxelSphereToolsImpl::SmoothSphere
Smooth a sphere
Runs asynchronously in a background thread
See: SmoothSphere, SmoothSphereAsync and FVoxelSphereToolsImpl::SmoothSphere
Trim tool: used to quickly flatten large portions of the world
Best results are obtained when Position and Normal are averages: use FindProjectionVoxels to do some linetraces, and then GetAveragePosition/Normal on the result
This ensures the tool usage is relatively smooth.
Works by stamping a shape into the world (if bAdditive = false, the stamp is destructive: voxels are removed instead)
The shape is the smooth union of a sphere SDF and a plane SDF. The smoothness of the union is controlled by the Falloff parameter.
See: TrimSphere, TrimSphereAsync and FVoxelSphereToolsImpl::TrimSphere
Trim tool: used to quickly flatten large portions of the world
Best results are obtained when Position and Normal are averages: use FindProjectionVoxels to do some linetraces, and then GetAveragePosition/Normal on the result
This ensures the tool usage is relatively smooth.
Works by stamping a shape into the world (if bAdditive = false, the stamp is destructive: voxels are removed instead)
The shape is the smooth union of a sphere SDF and a plane SDF. The smoothness of the union is controlled by the Falloff parameter.
Runs asynchronously in a background thread
See: TrimSphere, TrimSphereAsync and FVoxelSphereToolsImpl::TrimSphere
Apply paint material to the processed voxels, using the processed strengths
See: ApplyStack, AddToStack
See: EditVoxelMaterials, EditVoxelMaterialsAsync and FVoxelSurfaceEditToolsImpl::EditVoxelMaterials
Apply paint material to the processed voxels, using the processed strengths
Runs asynchronously in a background thread
See: ApplyStack, AddToStack
See: EditVoxelMaterials, EditVoxelMaterialsAsync and FVoxelSurfaceEditToolsImpl::EditVoxelMaterials
Apply processed voxels strengths to the voxel values
See: ApplyStack, AddToStack
See: EditVoxelValues, EditVoxelValuesAsync and FVoxelSurfaceEditToolsImpl::EditVoxelValues
Apply processed voxels strengths to the voxel values
Runs asynchronously in a background thread
See: ApplyStack, AddToStack
See: EditVoxelValues, EditVoxelValuesAsync and FVoxelSurfaceEditToolsImpl::EditVoxelValues
Propagate the materials of the voxels, so that the new surface is painted correctly
Must be called BEFORE EditVoxelValues!
See: ApplyStack, AddToStack
See: PropagateVoxelMaterials, PropagateVoxelMaterialsAsync and FVoxelSurfaceEditToolsImpl::PropagateVoxelMaterials
Propagate the materials of the voxels, so that the new surface is painted correctly
Must be called BEFORE EditVoxelValues!
Runs asynchronously in a background thread
See: ApplyStack, AddToStack
See: PropagateVoxelMaterials, PropagateVoxelMaterialsAsync and FVoxelSurfaceEditToolsImpl::PropagateVoxelMaterials
Add to Stack
Apply a constant strength to the surface voxels
Apply a falloff to surface voxels, based on their distance from a point.
Make surface voxels go towards a plane
Important: if bExactDistanceField = true, this node should be called last! Modifying strengths after it will result
in glitchy behavior
Apply Stack
Apply Stack Async
Apply a strength curve to surface voxels, based on their distance from a point:
Strength = Curve.SampleAt(Distance(Voxel.Position, Center) / Radius)
Apply a strength mask to surface voxels, based on their position projected onto a plane
Apply terracing
Debug Surface Voxels
Find voxels that are on the surface. Faster than FindSurfaceVoxelsFromDistanceField, but the values won't be exact distances
Find voxels that are on the surface. Only keep the one with the surface right above them that are facing up. If 2 surface voxels have the same X Y, will only keep the one with the higher Z
Find voxels that are on the surface. Only keep the one with the surface right above them that are facing up. If 2 surface voxels have the same X Y, will only keep the one with the higher Z
Find voxels that are on the surface. Faster than FindSurfaceVoxelsFromDistanceField, but the values won't be exact distances
Find voxels that are on the surface using an exact computation of the distance field using the GPU
Get Bounds
Compute the scale for ApplyStrengthMask from a wanted size
Deproject
Get Axis
Get Ray Direction
Get Ray Origin
Is Alternative Mode
Is Key Down
Get Modified Voxel Materials Bounds
Get Modified Voxel Values Bounds
Apply
Call this to delete any tool preview actors
Call this to do some initial setup
Will be called in the first tool tick if you don't
Get Tool Name
Get Voxel World
K2 Advanced Tick
Tick the tool
Make Tool Axes
Make Tool Keys
Make Voxel Tool
Make Voxel Tool Tick Data
If bLoadBlueprints is true, all the blueprints inheriting from VoxelTool will be force loaded
If false, tools whose blueprints are not loaded won't show up
Get Active Tool
Get Tools
K2 Get Shared Config
Set Active Tool
Set Active Tool by Class
Set Active Tool by Name
Add Neighbors to Set
eg if you want to cache all the data that's going to be used by render chunks when updating the world
Make IntBox from global position and radius
Add Int Vector Int Vector
Divide Int Vector Int
Get Max Intvector
Get Min Intvector
Multiply Int Int Vector
Multiply Int Vector Int
Multiply Int Vector Int Vector
Substract Int Vector Int Vector
Add Box
Add Point
Apply Transform
Breaks an Int Box
Break Int Box with Validity
Will move the box so that GetCenter = 0,0,0. Will extend it if its size is odd
Contains
Equal Equal Int Box Int Box
Extend
Extend Int Vector
Get Center
Get Corners
Get Size
Infinite Box
Intersect
Is Int Vector Inside Box
Is Valid
Is Vector Inside Box
From -Radius(included) to Radius(excluded)
Make Box from Position and Radius
Makes an Int Box. Min must be <= to Max
Make Int Box from Points
Make Int Box with Validity
Not Equal Int Box Int Box
Overlap
Remove Translation
Scale
Translate Box
Get Halton 1D
Get Halton 2D
Get Halton 3D
Generates a random position on the unit sphere, given some random input between 0 and 1
Make Halton Stream
Reset Halton Stream
Call this after changing the voxel world LODs setting while created
Call this after changing a voxel world VoxelMaterial/MaterialCollection to apply it
Number of processing tasks not finished
Returns true if there are still foliage tasks queued
Returns true if there are still mesh tasks queued
Call this to recreate the voxel world entirely, optionally keeping data intact by saving it
Call this to recreate the voxel world rendering entirely, keeping data intact
Call this to recreate the voxel world spawners
Update all the chunks
Update the chunks overlapping Bounds.
Update the chunks overlapping Position
Apply a Paint Material to a Voxel Material
Create from color
Create paint material for 5 way blend
Create for multi index
Create for multi index, setting the data directly
Create for multi index wetness
Create for single index
Create UV paint
Get Color
If SortByStrength is true, Index 0 will have the highest strength, Index 1 the second highest etc
Get Raw Material
Get Single Index
Get UV
Make Color Material
Make Material Mask
Make Raw Material
Make Single Index Material
Returns whether voxel collisions are enabled at Position
Are Voxel Collisions Frozen
Set Voxel Collisions Frozen
Bind Voxel Chunk Events
Bind Voxel Generation Event
Cache the materials in the bounds
Cache the materials in the bounds
Cache the values in the bounds
Cache the values in the bounds
Clear Cached Materials
Clear Cached Materials Async
Clear Cached Values
Clear Cached Values Async
Compress Voxel Save
Decompress Voxel Save
Clear all the data in the world, including items/assets
Clear all the edited data in the world, excluding items/assets
Clear all the material data in the world
Clear all the value data in the world
Bounds of this world
Get a custom float output value
Get a custom int32 output value
Get the normal at Position using the density gradient. May differ from the mesh normal
Has Material Data
Has Value Data
Scale the voxel world data. Will recreate the voxel world!
Check for Single Materials
Check for Single Materials Async
Check for Single Values
Check for Single Values Async
Will undirty the chunks identical to the generator
Will undirty the chunks identical to the generator
If the voxel generator is a heightmap or if an heightmap asset is provided,
will update the heightmap to the max Z surface in the voxel world
Will not edit the data: RoundToGenerator should be called after for best results
Will revert the values who don't have a voxel neighbor with a different sign from the generator value
Will ignore items when computing generator values
Will revert the values who don't have a voxel neighbor with a different sign from the generator value
Will ignore items when computing generator values
Set Box as Dirty
Set Box as Dirty Async
Clear all the frames. bEnableUndoRedo must be true
Get the current history position
Redo last undone frame. bEnableUndoRedo must be true, and SaveFrame must have been called after any edits
Save the edits since the last call to SaveFrame/Undo/Redo and clear the redo stack. bEnableUndoRedo must be true
Undo last frame. bEnableUndoRedo must be true, and SaveFrame must have been called after any edits
Will compact the texture pool used by the greedy mesher, reducing fragmentation & memory usage
See: stat VoxelTexturePool
Will create Texture if null, and set it
Returns Texture for convenience
Texture will have the following config:
Pixel format: PF_B8G8R8A8
Compression settings: TC_VectorDisplacementmap
SRGB: false
Filter: TF_Bilinear
Will create Texture if null, and set it
Returns Texture for convenience
Texture will have the following config:
Pixel format: PF_R32_FLOAT
Compression settings: TC_HDR
SRGB: false
Filter: TF_Bilinear
Same as CreateOrUpdateTextureFromVoxelFloatTexture with nullptr in input
Texture will have the following config:
Pixel format: PF_B8G8R8A8
Compression settings: TC_VectorDisplacementmap
SRGB: false
Filter: TF_Bilinear
Same as CreateOrUpdateTextureFromVoxelFloatTexture with nullptr in input
Texture will have the following config:
Pixel format: PF_R32_FLOAT
Compression settings: TC_HDR
SRGB: false
Filter: TF_Bilinear
Creates a voxel color texture by putting a float texture into a specific channel
Creates a voxel float texture from the color channel of a texture
Get Voxel Color Texture Size
Get Voxel Float Texture Size
Is Voxel Color Texture Valid
Is Voxel Float Texture Valid
Apply the photoshop Maximum filter
Set each pixel to the max value in a radius Radius
Apply the photoshop Minimum filter
Set each pixel to the min value in a radius Radius
Create Tool Rendering
Destroy Tool Rendering
Is Valid Ref
Bounds: In world space
Set Tool Rendering Enabled
Set Tool Rendering Material
Iterate all voxel worlds in the scene, and return all the ones that contains Position
Iterate all voxel worlds in the scene, and return all the ones that overlaps the actor bounding box
Iterate all voxel worlds in the scene, and return all the ones that overlaps Box
Iterate all voxel worlds in the scene, and return the first one that contains Position
Iterate all voxel worlds in the scene, and return the first one that overlaps the actor bounding box
Iterate all voxel worlds in the scene, and return the first one that overlaps Box
Transform a box in global space to voxel space
Transform a box in voxel space to global space
Returns the memory used by positions and indices buffers in this voxel world
Should give a rough estimate of how much memory is used for physics
Get the current memory usage of different parts of the plugin
Get the peak memory usage of different parts of the plugin
Log Memory Stats
Get Data Memory Usage in MB
Get Number Of Voxel Threads
Number of threads allocated for the voxel background processing. Setting it too high may impact performance
The threads are shared across all voxel worlds
Can be set using voxel.threading.NumThreads
Interval Contains Float
Interval Contains Int 32
Mark spawners as dirty so that they don't get trash if they go out of scope
IVoxelFoliageInterface helpers
// Regenerate spawners in an aera
Update the voxel component positions
Get the 8 neighbors in voxel space of GlobalPosition
Convert position from world space to voxel space
K2 Global to Local Bounds
K2 Global to Local Float
Convert position from voxel space to world space
K2 Local to Global Bounds
K2 Local to Global Float
On Clear
On Generate
Init Chunk
Initialize Collection
K2 Add Item to World
K2 Add Item to World
Called first, before DoEdit and UpdateRender
Note: Tick is a BlueprintImplementableEvent. The native Tick will always be called before.
Might not always be called - if you want to compute things for the frame, use Tick
Cook collision meshes and save the result to VoxelCookedData
Can then be loaded using LoadCookedVoxelData
Useful for servers
Cook collision meshes and save the result to VoxelCookedData
Can then be loaded using LoadCookedVoxelData
Useful for servers
Loads collision cooked with CookVoxelData
The voxel world must not be created: it won't ever be created, collision meshes will be loaded directly
Note: Only the voxel world collision settings will be applied
Useful for servers
Make Voxel Cooking Settings from Voxel World
Get Bounds
Get Size
Schedule Refresh
Debug Voxels Inside Bounds
Draw Data Octree
Draw Debug Int Box
Get Sediment Texture
Get Terrain Height Texture
Get Water Height Texture
Initialize
Is Initialized
Step
Is Valid
Creates a color texture by reading a color output from a generator
Creates a color texture by reading a color output from a generator, asynchronously
Creates a float texture by reading a float output from a generator
Creates a float texture by reading a float output from a generator, asynchronously
Is Valid Generator Picker
Is Valid Transformable Generator Picker
Creates a new generator instance. Consider using VoxelWorld->GetGeneratorCache()->MakeGeneratorInstance instead
See: MakeGeneratorPickerFromObject
See: MakeGeneratorPickerFromClass, MakeTransformableGeneratorPickerFromObject
Creates a new transformable generator instance. Consider using VoxelWorld->GetGeneratorCache()->MakeTransformableGeneratorInstance instead
See: MakeTransformableGeneratorPickerFromObject, MakeGeneratorPickerFromClass
See: MakeTransformableGeneratorPickerFromClass, MakeGeneratorPickerFromObject
Set a voxel generator parameter
Set a voxel generator parameter
Is Valid
Get Height
Get Width
Create Proc Mesh Plane
Refresh All Voxel Invokers
Get Index Material
Get the material index from a material or a layer name
Used by paint material customization. Some materials might be null.
Connect to a TCP server
Start a TCP server
Create Multiplayer Interface Instance
Get Multiplayer Interface Instance
Do not call this directly: call the respective Add Data Item instead!
Draws a line in the world & in the voxel graph preview
Draws a point in the world & in the voxel graph preview
Get Generator Cache
Add Worms
Read Values
Test Values
Get Tool Direction
Get Tool Normal
Get Tool Position
Get Tool Preview Position
Set Tool Overlay Bounds
Note: Material will not be updated if the mesh did not change
Can Edit
Will also debug them
Delta time accounting for the skipped frame waiting for updates
Get Last Frame Tick Data
Get Mouse Movement Size
Get Tick Data
Get Value After Axis Input
Last Frame Can Edit
Update Sphere Overlay Material
Create World
Destroy World
The generator cache allows to reuse generator objects
This is required for DataItemActors to allow for smaller update when moving them
Used to init generators
Is this world created?
Has the VoxelRenderer finished loading?
Set Generator Class
Set Generator Object
Can be called at runtime
Set Render Octree Chunk Size
Set Render Octree Depth
Set World Size
Is Voxel Plugin Pro
Returns the number of cores the CPU has. Ignores hyperthreading unless -usehyperthreading is passed as a command line argument.
Raise Error
Raise Info
Raise Warning
Creates (or reuse if possible) a new generator instance
Among other things, this is required for DataItemActors to reuse generators, which allows for smaller update when moving them
Creates (or reuse if possible) a new generator instance
Among other things, this is required for DataItemActors to reuse generators, which allows for smaller update when moving them
Apply Voxel Size
Set Scene
Apply voxel physics in a section of the voxel world by removing floating parts
Make voxel line trace parameters