3
$\begingroup$

I'm working on a lyrics video enter image description here

In this scene there are 41 curved neons going from the floor to the wall in front of the camera.

enter image description here

I'd like to make their shader bright at the center (where the "Bishop Delgado" text is), then lesser and lesser on the sides, until it doesn't emit light anymore. How can I do that?

Here is the shader I applied to the neon tubes so far : enter image description here

$\endgroup$
0
7
$\begingroup$

You can get any object's local space with the Texture Coordinate node and use the distance from its center to create a falloff.

1 2

$\endgroup$
3
$\begingroup$

I would recommend using the Geometry input node -> position for this, especially if the BD text is centered and the tubes span across one axis. To make it work right, separate that vector into XYZ, take the appropriate axis (probably the X, but whatever axis the tubes spread along) and run it through some math nodes:

  1. Absolute. Turns negative into positive.
  2. Division. Divide by the distance between each of the tubes (they are evenly spaced).
  3. Round or floor, depending on wether you have an even or odd number of tubes. This prevents to glow from changing from one side of a tube to another.
  4. Division. Divide by half of the total number of tubes.

Then run that through the color invert node, and you should have a gradient that is white at the BD text and black at the edges.

$\endgroup$

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.