smooth terrain using the table format"> PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

WriteVoxels

Sets a certain region of smooth terrain using the table format

Parameters

Name Type Default Description

Target region to write to. Must be aligned to the voxel grid. Will throw an error if region is too large.

Voxel resolution. Must be 4

3D array of Enum.Material. Dimensions must exactly match the size of the target region in voxels.

3D array of voxel occupancies (number between 0 and 1). Dimensions must exactly match the size of the target region in voxels.

Returns

Return Type Summary

Code Samples


Maximum Region Size

Many terrain methods throw an error if their given region size is too large. The limit is currently 4194304 voxels^3 for ReadVoxels() and WriteVoxels(), and 67108864 voxels^3 for other methods. For methods that take a cframe + size combination (e.g. FillBlock, FillCylinder etc.), then the region volume is calculated from the AABB of the target area.


Example