I'm making a glow in the dark cube. I think I figured out the best way to make the cube glow and animate the values change when the light goes out. But I'm wondering if there is a tip for making the internal not glow so much and fade darker inside the cube. As you can see from the first image this is a real cube, and you can see between the pieces it gets dark. But my model emits at the same level all around. So should I just assign a different emission to the faces on the inside of the cube and just emit at a darker color, or is there a better way to fade the emission darker inside the cube.

Real cube

enter image description here

my model enter image description here enter image description here enter image description here enter image description here

I lower the value for the mix shader when I need the cube to glow in the dark, and raise it back when the light in the room animates on again.

UPDATE: I didn't have any other angle of the real Rubik cube till today to show what I'm trying to do. The new image is what I'm trying to show. Inside the pink circles, I'm showing that the glow fades darker. And that happens on every face of the Rubik cube. How can I make the same effect to only fade darker on the faces that are on the inside of the Rubik cube. Each piece on the cube has the same material, so do I have to make the faces on the inside a different material and somehow make the glow fade dark separately from the outside faces of the Rubik cube.

enter image description here

  • $\begingroup$ yes you can make the emission decrease on the Z axis (or whatever axis it is), see my answer here to see how you can use the Separate XYZ node to create a gradient: blender.stackexchange.com/questions/234886/… $\endgroup$
    – moonboots
    Commented Aug 20, 2021 at 18:48
  • $\begingroup$ if you're using cycles, glow is almost always better done in the compositor, which has a specific node, then in the materials which don't. If you're using eevee look into bloom. $\endgroup$ Commented Aug 20, 2021 at 20:18
  • $\begingroup$ @moonboots I added a video of the test I made to see the change switching from lights on and lights off, then glowing. I don't think ill be able to use the separate XYZ node because it's not going to be a shot from one side, it will be an animation in the end. $\endgroup$ Commented Aug 23, 2021 at 4:11
  • $\begingroup$ so maybe for the inner faces don't use an Emission node but rather a Diffuse? $\endgroup$
    – moonboots
    Commented Aug 23, 2021 at 6:06
  • $\begingroup$ So are you suggesting I select the inner faces and give them a different material and make it diffuse instead of emission and leave the outer faces as emission $\endgroup$ Commented Aug 23, 2021 at 14:04

1 Answer 1


Even though I am not sure where the effect on the real cube comes from, you can create a shader with variable emission across the surface using some Vector Math nodes.


Assuming the object center is in the middle of your cube. If your cube is larger than 2 units you need to throw in some scaling before the ColorRamp.

Basically we are computing a Manhattan distance from the object center, which fits for a cube. For spherical object the Euclidian distance would be the right fit, which is much easier to compute in a Blender shader tree, as shown.

  • $\begingroup$ I'm sorry I've been busy, so I haven't been on in a while. I updated my question with a little more detail, I hope :) does this new update kinda explain what I'm trying to do. The pieces don't have a hole like your model does. I'm needing the fade to be on the outside and on certain sides that only lead inside the Rubik cube. $\endgroup$ Commented Sep 1, 2021 at 23:54
  • $\begingroup$ My shader tree assumes that your whole Rubik's cube is one mesh. The whole in the center of my model is for demonstration purposes. If you want to apply this material to several objects you cannot take their location, as it will be different for each object. Instead you could use a vector constant for the point in the middle of the cube, but be aware that the material will not move with the objects. $\endgroup$
    – geloescht
    Commented Jan 13, 2022 at 15:22
  • $\begingroup$ No, each pieces of the cube is its own object. Their origin points are all in the center of the whole cube. I animate the cube layer rotations so I can't join all the pieces into one object $\endgroup$ Commented Jan 16, 2022 at 22:28
  • $\begingroup$ If each cube's origin point is in the middle of the rubiks cube you can still use this shader tree. However, their rotation must be taken into account in order to 'attach' the texture to the objects. Let me see if I can patch that in. $\endgroup$
    – geloescht
    Commented Jan 19, 2022 at 10:44
  • $\begingroup$ I mainly do animation for Instagram with my cubes, so the cubes are seen rotating or solving itself. Would that make it complicated? $\endgroup$ Commented Jan 26, 2022 at 0:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .