Re-voxelizing a voxel mesh (Sorry for the length)
Posted: Mon Sep 27, 2021 10:33 pm
Hey guys,
I've been spending over a month trying to find a way to solve a problem, but to no avail. Finally, after discovering CloudCompare, I feel like I'm closer than ever to finding a solution. I apologize in advance for the length of this topic post and I also thank you in advance for any guidance/tip/insight.
GOAL: Let's say I create a voxel mesh in MagicaVoxel, but instead of using MagicaVoxel/QuBicle (or any voxel editor) to texture the fine details of my voxel mesh, I want to texture it in a software that offers me greater and more flexible tools to texture my mesh (ex: in an aliased fashion with brushes and textures). Given this scenario, the end-goal would be to export the voxel mesh from MagicaVoxel as an OBJ and texture it in Cinema 4D (in my case), after which I would like (somehow) to export the textured OBJ mesh back to MagicaVoxel in its voxel state. Worth noting that between MagicaVoxel and Cinema 4D, no transformation would be made on the actual mesh. I'd only modifying and baking the UV map in Cinema 4D. So ideally, I would end up with an identical voxel mesh in MagicaVoxel as the one I originally started with, but with different color data for each voxel.
WHAT I'VE TRIED: I've been experimenting with tons of different softwares and librairies, such as BinVox, countless Voxelizers and misc. tools found on Github. The Voxelizer-route has always been more of a no-brainer, but unfortunately, I have not found 1 single publicly available Voxelizer that allows me to have fine control over the grid matrix, hence every attempt at using a Voxelizer so far has resulted in a non-identical (i.e. not a 1:1) recreation of my original voxel mesh from MagicaVoxel (i.e. offset voxels, missing voxels, etc).
BREAKTHROUGH: After so much trial and error, I've finally found a possible lead. Using MagicaVoxel, CloudCompare and FileToVox (https://github.com/Zarbuz/FileToVox), I could potentially achieve my goal.
A few things that I know for certain:
I think I'm gonna cut it there because this topic is getting way too long, but I wanted to make sure I would explain myself thoroughly.
At this point, any glimpse of help or guidance would be greatly appreciated, as I feel quite lost currently, despite feeling "close" in some ways.
Thanks a ton(!) in advance.
I've been spending over a month trying to find a way to solve a problem, but to no avail. Finally, after discovering CloudCompare, I feel like I'm closer than ever to finding a solution. I apologize in advance for the length of this topic post and I also thank you in advance for any guidance/tip/insight.
GOAL: Let's say I create a voxel mesh in MagicaVoxel, but instead of using MagicaVoxel/QuBicle (or any voxel editor) to texture the fine details of my voxel mesh, I want to texture it in a software that offers me greater and more flexible tools to texture my mesh (ex: in an aliased fashion with brushes and textures). Given this scenario, the end-goal would be to export the voxel mesh from MagicaVoxel as an OBJ and texture it in Cinema 4D (in my case), after which I would like (somehow) to export the textured OBJ mesh back to MagicaVoxel in its voxel state. Worth noting that between MagicaVoxel and Cinema 4D, no transformation would be made on the actual mesh. I'd only modifying and baking the UV map in Cinema 4D. So ideally, I would end up with an identical voxel mesh in MagicaVoxel as the one I originally started with, but with different color data for each voxel.
WHAT I'VE TRIED: I've been experimenting with tons of different softwares and librairies, such as BinVox, countless Voxelizers and misc. tools found on Github. The Voxelizer-route has always been more of a no-brainer, but unfortunately, I have not found 1 single publicly available Voxelizer that allows me to have fine control over the grid matrix, hence every attempt at using a Voxelizer so far has resulted in a non-identical (i.e. not a 1:1) recreation of my original voxel mesh from MagicaVoxel (i.e. offset voxels, missing voxels, etc).
BREAKTHROUGH: After so much trial and error, I've finally found a possible lead. Using MagicaVoxel, CloudCompare and FileToVox (https://github.com/Zarbuz/FileToVox), I could potentially achieve my goal.
A few things that I know for certain:
- MagicaVoxel has both the options to export your mesh as a "point clouds" OR "PLY mesh", which appear to be relevant for my case
- FileToVox pretty much allows me to convert any point cloud or PLY mesh into a VOX file, which in theory seems like it'd be the solution, but, whatever point cloud I can generate from my voxel OBJ mesh in CloudCompare, once said point cloud has gone through FileVox, I am not able to get an identical 1:1 replica of the original voxel mesh I started with in MagicaVoxel. This could be due to CloudCompare's generated point cloud not being a perfect grid (using the "Sample points" function) and/or a failure of FileToVox's part.
I think I'm gonna cut it there because this topic is getting way too long, but I wanted to make sure I would explain myself thoroughly.
At this point, any glimpse of help or guidance would be greatly appreciated, as I feel quite lost currently, despite feeling "close" in some ways.
Thanks a ton(!) in advance.