Hello I’m trying to make an effect like the red cubes in this scene but I can’t get the same effect. So far I’ve tried using a bigger glass cube and a small cube with an emission shader inside of the bigger cube.
One object, one material solution
For this method to work you will need to use current Master branch of Blender 2.79 or 2.8. You can find them here: https://builder.blender.org/download/
This is because we will be using Bevel node for edge detection. Without it there are some workarounds in Blender 2.79b like for example using Bevel modifier and second material for bevels.
Let's break it down to the most interesting parts.
This is my dumb version of clipping vectors. What it does it basically using Color Ramps to clip axis vectors from left/right, top/bottom, and front/back to make smaller cube inside mesh. So two for X, Y and Z. You can tweak them in the same manner to get smaller or bigger cube. Those Color Ramps.
It's noise. In Volume. Added to the Inner Cube. Nothing much here except that you will need to use grey color for one of the handles to make it darker than cube itself.
This is why we need Master branch. We are using here Bevel node to detect edges and use it for mixing Glass with Emission.
Glass and Edge
Nothing fancy here. A bit optimized Glass shader and Emission for edges. Remember to use small Roughness value. I don't know if it's a bug or 'feature' but without it Master and 2.8 are going nuts with simple Glass.
I am not an expert but this is the closest I could get using a combination of Principled Volumetric/BSDF shaders and emission shaders. I'm sure experts in Cycles rendering can combine the nodes in a better way so that you'll get the same exact effects.
To be able to use the Principled Volumetric shader you need to download/compile one of the latest experimental builds of Blender 2.79 (maybe from August 2018 onward). The Volumetric Shader is not available in 2.79b. You can download the experimental builds of Blender from here. Here's the final result with 18 samples in preview mode:
Here's the node setup for the outer cube:
And here's the node setup for the inner cube:
And here's the .blend file: