Foliage & PCG
Generating foliage onto an existing surface.
Generating foliage onto an existing surface.
There is an example available on this topic!
As of this release, native Voxel Plugin foliage has been replaced with a PCG integration. This gives full control over scattering behavior, and allows for spawning actors (including voxel brushes) as well as the usual static meshes.
PCG updates from the Voxel World can be paused using the voxel.DisablePCGRegen 1
console command.
With PCG comes the ability to analyze points and do contextual operations on them. This opens the door to things like combining multiple smaller cliff points into a single larger cliff mesh. The logic that would be used for that kind of behavior is generic to any PCG-based system.
Points can be scattered on the terrain using the Voxel Sampler node.
When using PCG with Voxel Plugin, we strongly recommend:
On any PCG graph, setting Use Hierarchical Generation
to true.
Note that PCG's spline sampling does not work well with Hierarchical Generation. Use Voxel Metadata instead.
On any in-world graph actor:
Setting Generation Trigger
to Generate at Runtime
.
Setting Is Partitioned
to true.
On the PCG World Actor:
Setting Treat Editor Viewport as Generation Source
to true.
If the world isn't largely a heightfield (i.e. it contains lots of caves, or is a planet), setting Use 2DGrid
to false.