Thoughts on Slicing: Lessons from DivX
So, this is a long walk, but I’ll bring you back to model slicing tech and Skeinforge.1
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 talking2 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.3
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. 4 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?
- Photo courtesy of Devlin Thompson [↩]
- Say, any movie by Woody Allen [↩]
- Say, any Marvel comic book movie. [↩]
- Yes, I really did this. [↩]
| Tagged with | codec, divx, frankenstein, gcode, hybrid settings, mix and match, settings, skeinforge, video transcoding | 7 comments |



7 Comments so far
Spirail
yes, would be awesome.
We all have a long way to go together….
whosawhatsis?
I’ve been wanting something like this for printing raftless. What I would like is a way to print the first layer very slowly as a thick layer (say, 2x normal layer height for convenience), with thicker tracks to match, like the base layer of a raft, This layer would have less detail, but it would stick really well and wouldn’t need to be removed after printing the way a raft does. After this layer, instead of the interface layers that a raft uses, it would continue the print from that height. This could be done by slicing with two different profiles and merging the first layer of one with all but the first two layers of the other, but it would be really tedious without a skeinforge plugin doing the work (even an external script, which I could easily write) would be a pain to use on every print.
aubenc
Interesting concepts here…
I’ve already find my self doing sort of “the truly optimal compressed video experience” by merging two gcode files into one and it really works wonders.
My approach would be a little bit different:
You 1st slice your model in big sections, the model is displayed in a adjustable degree of transparency that changes the color/opacity/whatever when is selected, you can fine tune your “raw cut-off” with the help of zoom/translate/rotate the object/point of view.
Once you are happy with the big sections you just assign a profile to each of them. Normally you should be able to specify a profile for the whole model and then just change the profile to apply to some sections.
Nudel
prusajr did something similar here: http://blog.reprap.org/2010/12/pretty-outside-ugly-inside.html
Also, alternating layer heights would be less visually pleasing, if that was the goal.
How about an automatic sensing (perhaps derived from the skeinforge “cool”) of how detailed a layer is, and adjust the layer height accordingly?
Nudel
@whosawhatsis?
Skeinforge (41) already does that. Check out “Object First Layer” under raft. There you can set the first layer to be printed slow and with higher flow. I use 0.6 infill feed rate, and 0.75 innfill flow rate, which make sure the first layer sticks and gives it a good base for the rest of the print.
Luke
I’ve always pictured something akin to blenders key-framing. Each frame a different layer where you can modify specific settings by layer or use various forms of interpolation to set settings across layers. Get a nice view of your model on the side, color gradients showing settings. I would feel downright pampered to have that kind of control.
MTO
Have you tried out SuperSkein? it has a view called something like object MRI. you can scroll through layers… i dont see why you couldnt take that interface and add a few per-layer options (sounds like shells, infill, layer height would do it and they could probably be reduced to some radio buttons). SS then generates gcode when you save it, so you wouldnt have to splice two files together.