Wednesday, 27 February 2019

Goxel to LDR - Coloured Voxels Part 3

I've carried working on optimising coloured voxel models into ldr files - I'm making progress.  In the image, on the left is the voxel file from Goxel (that I made on my iphone BTW!).  The optimised ldr (that I create by processing the resulting .vox file) is top right and the file rendered image in Stud.io bottom right - for some reason Stud.io has decided to delete some of the bricks from the render (all the bricks appear correctly in the stud.io interface but when I click render some bricks are not rendered!) - I'll worry about that later!  However the script does now convert the individual 1x1 bricks into larger bricks and does the 90 degree rotation on alternate layers to add strength.



There are still a few problems -

1) I can't currently read the colours!  Weird I know but I get a colour from the .vox file (and that colour is consistent where it appears) but I can't currently read the RGB values - I manually fix the colours with a find replace - hopefully I'll get the RGB values shortly - then I need to do a compare between the voxel RGB and Lego RGB and find the closest match.

2) Due to the way my script scans the .vox model there is a tendency for it leave a number of 1x1 bricks on each layer pass - this didn't occur with single colour models as the 1x1 bricks would be merged with their nearest neighbour.  However with coloured voxels this is not always the case - I should be a be able to fix this with a second pass to clean up any remaining 1x1 bricks which have the same colour neighbour.

3) There is some kind of mirroring/reflection going on when I process the .vox file

No comments:

Post a Comment