3
$\begingroup$

couldn't find anything on the internet for something like this, but is there a simple node setup for creating a material (in cycles) for a lightsaber blade? Simply white in the centre with a coloured glow on the outside. I have experimented with mixing shaders with emissions but cannot get the white centre.

What I want:

enter image description here

What I do NOT want:

enter image description here

$\endgroup$
1

2 Answers 2

4
$\begingroup$

I'd say postprocessing, simple glow... but if you really wan't pure cycles:

1) Start with a cube and 3d spherical gradient texture with coordinates set to Object (Absorption shader with inverted colors are here for simple visualisation): enter image description here

this gives us a smoothed sphere inside the cube: enter image description here

2) Scale texture coordinates in Z by some really low value - this will stretch the sphere texture in that axis, giving us something similar to cylinder: enter image description here

3) remove Invert Color and Volume Absorption shader nodes (which were used just to see what is really going on with the texture when scaling and using Object Texture coordinates) and plugin Mix shader node with Transparent and Emission shaders. Plug the output to Volume socket: enter image description here

4) It still is centered stretched sphere, but the transparency interpolation is too linear - lets try different interpolation (by powering linear values): enter image description here

5) Interpolation is much better, but the overall emission strength is way too low now - lets multiply the values now, and also stretch the cube in Z axis to desired shape: enter image description here Tweaking math nodes Power vs Multiply should give you expected smoothing and overall emission power.

6) Simply change emission color and lightsaber is ready to use: enter image description here

$\endgroup$
2
  • $\begingroup$ Now this, is podracing. Is there a setting that ensures the "whiteness" in the centre? I found with several colours that it would make the middle that colour also, only weaker colours allowed for a white interior... $\endgroup$
    – NBoss
    Nov 6, 2017 at 7:00
  • 1
    $\begingroup$ Well, not really, at least to my understanding how this works. Only thing that "ensures" white center is emission power - the more saturation you use, the more energy it has to emit to "overblow" color to white. The color information is still there though (in render result - right click on the white area to verify that and read RGB values) only on output image it is overblown to white. If you use hdr image - information is preserved. It can be used in postprocessing as well (for example glare node would actually still use that tinted color when used). $\endgroup$
    – kilbee
    Nov 6, 2017 at 19:06
0
$\begingroup$

Create a tube (case/ shell) around the object with the emission shader and give that casing a glass shader and a translucent and feed both of them to an add shader.

For the casing/ shell: You can also add a volume scatter or volume absorption and plug it to the volume node.

Post processing is cooler though. Try out this link :) https://youtu.be/fWcCkQ3943Y

$\endgroup$
1
  • $\begingroup$ This process does produce the blade but not the white centre? $\endgroup$
    – NBoss
    Nov 6, 2017 at 6:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.