Saturday, 1 June 2019

OpenSDRAW - Feel The Power!

I've started to look at OpenSDRAW - Its fairly complicated but seems very powerful, allowing you to manipulate libraries of parts and create animations (without having to get stuck into something like Blender).  I rendered a couple of the example animations...



Currently, I don't really know how it all works in detail - but I like what it can do!

Wednesday, 1 May 2019

Flexible Parts in Stud.io (but rubber bands remain elusive!)

The latest version of Stud.io supports 13 flexible parts (including string with stud on ends) but sadly rubber bands aren't available yet, which is a shame as they were an important component in my "Professor Branestawm's Invention For Peeling Potatoes" MOC.



The latest version does though fix the problem I had with "missing bricks" when I used the Stud.io photoreal renderer on models that had been created by my ColouredVoxel2LDR script.  You can see there are quite a few "holes" in the model on the left, but the model on the right has all the bricks present.





Monday, 1 April 2019

www.brickalo.com gets spammed!

It looks like my www.brickalo.com website has been found by some sort of SPAM robot.  I've kept an eye on the backend system which does not appear to have been compromised - any email addresses entered in to Brickalo are not used and the system does not send out any emails (there is no email server installed on the backend).  So it does appear that robots are now playing with Lego!



In the image above, probably 75% of the Rainbow Lego Towers have been built by some kind of spam robot!     

Sunday, 3 March 2019

ColouredVoxel2LDR Code on GitHub - Coloured Voxels Part 6

So I've posted my code and instructions to allow you to create LDraw .ldr files from textured 3D models on GitHub

https://github.com/pennyforge/ColouredVoxels2LDR

This includes a fix to remove (by merging into larger bricks) the spurious 1x1 bricks that could appear on the models (check out Yoshi's nose in the previous post for an example of this problem).

Hope you enjoy it - Let me know how you get on!



Friday, 1 March 2019

Video Game Giants - Coloured Voxels Part 5

Although the conversion of Yoshi to a Lego Model works really well, what I'd realised previously is that there is a problem with the way my code scans the voxel slice as there is a tendency for the code to create lines of 1x1 bricks, when they could clearly be converted into a larger brick shape.  The problem is caused by the fact that my code scans the voxel slice horizontally then vertically on each consecutive layer (as this adds strength to the resulting model), however with coloured voxels it's possible for lines of coloured voxels on the edge of the model - the skin if you like - to be interpreted as a single 1x1 brick on one slice and as a larger brick on a subsequent slice - you can see this quite clearly on Yoshi's nose in the image below.


I wanted to try to remove this 1x1 brick anomaly from the models as it is likely to effect the strength of the model (you can see a column of 1x1 bricks on the left of Yoshi's nose) and it looks unnatural in the build, no one would really use a row of 1x1 bricks when larger bricks are available.  Consequently I was going to need to do a second pass on each voxel layer to try to remove these lines of 1x1 bricks.


Thursday, 28 February 2019

Yoshi In Lego - Coloured Voxels Part 4


Here's Yoshi in Lego!  The original in Blender is top left, the voxel file in Goxel top right and the final Lego model rendered in Stud.io underneath.  I've now accessed the colour data from the vox file and I've written a comparison function to compare the RGB voxel data to the closet Lego colour (using the colour data from LDConfig.ldr), so the conversion of voxel colours to Lego colours is now automatic.

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