
Frankenstein Code
So, this is a long walk, but I’ll bring you back to model slicing tech and Skeinforge.
A very long time ago I tried to compress The Matrix from my DVD copy to the size of a CD using a DivX video codec. Back when I did this there were two different modes for DivX – one for slow video and one for fast moving video. Slow video was compressed in a qualitatively different way from fast video. With slow moving video each frame could use more of the prior frame for reference – since not much was changing. It is also important that each frame in slow moving video be sharper. With fast moving video the codec would need to account for drastic changes in scenery from frame to frame, but it could allow for slightly blurrier definitions since sharper frames wouldn’t be that noticeable amidst lost of movement. Some movies with lots of talking could be reasonably encoded with just the slow-DivX codec, while other movies with tons of action could be encoded with just the fast-DivX codec.
However, for the truly optimal compressed video experience, you wanted to take the entire DVD and break it into it’s component scenes, sort them as “fast” or “slow,” encode them all separately, and then stitch them all back together. The result was an excellent blend of the two types of compression for a movie that looked better than if it had been encoded with either type alone. While video compression has come a long way since then, with codecs that automatically detect scene motion and frame changes to apply the best codec to that portion of the video, this history lesson is not without merit.
Okay, back to 3D printing theory.
Let’s suppose you had a model that needed different fill ratios, fill patterns, shells at different layers. If you slice the model more than once using the same layer thickness, you could conceivably stitch together different GCodes with different properties and settings. Or, if you kept careful track of layer thicknesses, you could even combine different layer heights. For instance, you could print three really detailed sections at 0.2mm layers and then two other courser layers at 0.3mm per layer – as long as you took great care to splice the layers back and forth at intervals of 0.6mm.
I don’t have the programming chops to create a visualization program for GCode, but I could conceive of a very very cool system that would allow you to mix-and-match these settings. It could look like this:
- You would slice a model in whatever different ways you want.
- The visualization program would line up your various GCode models next to one another.
- If the layer heights were different, it would highlight alternating blocks of layers that were thick enough to be evenly divisible by all GCode models.
- If the layer heights were all the same, it wouldn’t highlight any regions.
- You could then click on regions or sections for each GCode model (probably using a series of vertical sliders) to select portions of each GCode model.
- In the background would be a composite model that was comprised of the combined layers. Ideally there would be an indicator showing completion progress for the model.
- You hit a button and the program simply spliced together the different layers from different GCodes and outputs a single Franken-GCode.
- Print!
What do you think?