New proposal to commit for Sim_physics
Hi all! 🙂
Currently the handling of voxeldata is implemented without any kind of header for the sake of simplicity and because it was implemented as a test framework of future implementation in that direction (since datasets are one of the most powerful features of a volumetric engine). But voxeldata have started to being used for some serious scientific projects to import datasets into Blender, allowing it to easily fit into more scientific pipelines than before, that ́s why at least a basic header should be implemented, that will allow:
– Automatic resolution detection: The user no longer needs to manually set up the resolution of the dataset, a very dangerous procedure.
– Rectangular datasets: Previously only regular datasets (NxNxN sizes) were supported; now are possible any
combinations of NxMxK sizes
– Another important feature is the possibility to render only a single frame of the dataset during a whole animation, that ́s why I added the “Still” feature.
In the future more improvements could and should be done in that area as Blender starts to being used in scientific pipelines due to its huge flexibility. The changes to the current implementation are minimal but greatly improve the usability of the voxeldata feature.
The basic header implemented is:
typedef struct Header_vb //Header could be extended here easily
The changes to the already implemented tools that make use of voxeldata are also minimal, they only need to store the header at the beginning and to take into account the size of it (offset) to properly index the dataset, and nothing more!
I have reimplemented also the basic simulator to store the header (will not be compatible with previous builds). So, now the basic structure of a Blender compatible Dataset is
the Data format is a Linear array of floats, where each element is adressed as before by
the UI looks like this:
Fig. 1 – Automatic resolution detection
Fig. 2 – Still frame selected
For those impatient to wait inclusion into the sim_physics branch, here is the “semi-manual” patch (done against Sim_physics rev18682)