Emission Shader on edge

Hi. I am trying to create a Star Wars-inspired Darksaber, but I can’t get the blade to work. In other words, how do I make the material so that the blade is black in the center but emits light on the very edges and the light adapts to the camera’s position? Thank you.

Hello and welcome to BA!

This sounds like a job for… the “Inverted Hull” method.

Only instead of traditional dark outline you can use emission material:


Welcome to BA :slight_smile:
Something like this should get you started:

Step 1

Step 2

Everything in the node group is the nodes from the first screenshot.

Step 3

Step 4

Similar nodes to step one.

Step 5

Connect steps 3 and 4:

Step 6

Connect everything with a simple Math node:

Step 7

Change these to 4D instead of 3D. Type #frame in the W slot. Press spacebar, watch the magic happen!

Or, what @StrayBillie said, if you want something faster and simpler :wink:


Thanks. However, in Blender 3.3, there is no backface culling option in Rendered View, so it doesn’t work properly. Did that setting move?

You can find it in Material Properties > Settings - it’s unique parameter for each material. Checking it just for outer material should be enough.

@joseph, ooh, fancy - I like it :slight_smile:

1 Like

Thanks. It worked perfectly. And I distorted the emission with some noise and animated the position, which gave it a cool effect.

This is a little confusing, but I will keep it in mind for later. Thanks!