VoxelPlugin / VoxelPluginFreeLegacy

Voxel Plugin Legacy for Unreal Engine
https://voxelplugin.com
1.56k stars 297 forks source link

[Feature Request] Import Raw Voxel Data with Color #378

Open chaojian-zhang opened 3 years ago

chaojian-zhang commented 3 years ago

In my current understanding, .vox format (and it's unnecessarily complex and not well documented) is limited in size while 3D Coat's Raw Voxel stores floating point values for their surface generation purpose - thus not capable of storing color information (and they have no plan supporting colors in voxels).

It would be ideal and can be as simple as an import toggle for Raw Voxel format, that allows embedded color information (as material index, i.e. 256 in size, would be fine). This will allow generating voxel data using external tools.

Otherwise, please just support a slightly different yet new raw plain voxel array format, with color index information.

For instance:

# Header
# Bytes     # Content       # Value     # Description
4           Magic number    VPRX        Voxel Plugin Raw Voxel
4           X                           X starting position            
4           Y                           Y starting position
4           Z                           Z starting position
4           Size X                      X dimension size            
4           Size Y                      Y dimension size
4           Size Z                      Z dimension size

# Voxel Buffer
# ... Each voxel is 1 byte

The starting positions are for reference purpose and ideally the importer will allow adjustments.

You can also use MagicaVoxel Viewer's .xraw file format, but there are quirks associated with that format and I don't like it.

Thanks!

Phyronnaz commented 3 years ago

What would be your use case here?

chaojian-zhang commented 3 years ago

For instance, I would wish to be able to import Minecraft Schematic file directly. And since the Minecraft Schematic file is not supported, I am planning to write a custom converter to convert it to some 3D array of colors. But I need a format that allows such an array of colors to be imported into Voxel Plugin - currently neither Vox nor 3D Coat format would allow that - correct me if I am wrong.