I think Miha's idea about the red cubes cut and lined up then white batter poured around them is part of the key. In the first picture, you can see a couple of the cubes are not touching each other but the white is perfect in between, which makes me the think the red was placed and the white poured. I don't see that in the other side though, not do I see any bubbles and the layers are perfectly aligned. It is possible the OP did another layer once the white was set, or they might have cut, moistened and set the other layer on top as Tienne suggested. I don't think this was done with dividers though. The lines are too crisp and perfect. Very cool.