
This material is a bit special: it's going to be rendered to a render target that is then going to be sampled by the mesh importer.

If you want to import the mesh colors, tick Paint Colors and choose a material to use: Configure the Voxel Size using both the black/white squares size and Expected Size as help:.In the importer details, set the mesh you want to import:.Drag a new Voxel Mesh Importer to your scene:Įach black/white square represents a voxel.If it's not, you will have leaks in the form of holes in your data asset. To have the best results, your mesh needs to be watertight. Note that mesh to voxel conversion can also be done at runtime, for instance in the Mesh Stamp tool! Original asset on the left, voxel size visualization in the middle, imported voxel asset on the right. While the import isn't lossless, it can give some great results: In addition to the shape, the mesh colors can also be copied over. The plugin supports converting a mesh to voxels. You can see the memory used by Heightmap (and Landscape) assets using stat VoxelMemory:Īn uncompressed 16k heightmap with materials can take up to 1.2GB, so you should watch that value carefully! They can take some time to decompress on load. Imported heightmaps do not need to be squares nor power of two.
MAGICAVOXEL IMPORT PBX ARCHIVE
Above this resolution, the archive goes beyond 2GB and overflows. The max size you can import is approximately 16000x16000. Heightmap assets heights are stored as uint16. You can then either use it as world generator:.Make sure to assign them a different channel/index: Select your heightmap, the material config you want to use (see Materials) and add your weightmaps.Right click the content browser and choose Voxel Heightmap Asset:.You can import heightmaps up to 16kx16k in the plugin (see Technical Details as to why this limit).
MAGICAVOXEL IMPORT PBX FULL
Landscape assets heights are stored as float to keep the full precision of the Unreal Landscape.

If you are not using RGB, you need to assign them indices:

Select the landscape you want to import in the Landscape Importer details:.Add a new Voxel Landscape Importer to your scene.To convert an existing Unreal Landscape to voxels, do the following: Unreal Landscape on the left, voxel on the right: The import is perfect: the voxel mesh will exactly match the landscape one. The plugin supports importing Unreal Landscapes. 3.2.3 Importing Roughness, Metallic and other stuff.
