Hello. I'm attempting lightning in Blender using Eevee. Referencing a video on Youtube, I created the material shader for the lightning bolt. In it, I am supposed to be able to create the "strike" of the lightning via texture coordinate magic. This KIND OF works. If it's just top to bottom or vice versa, straight up and down vertically, it works. But if I have the bolt mesh curve back around to go up again (as seen in pic), it's clear that the material reveal is doing a uniform top to bottom. If the beginning and end of the bolt are near each other at the top, they both come into view at the same time, and meet at the bend at the bottom. I can't for the life of me figure out a way to tell it to reveal from what I consider the beginning of the bolt, to the end of the bolt. Tried plugging all of the different little purple slots in the texture coordinate node in, and nothing fixes the issue.
I also tried looking into growing the bolt from one spot to another. Using bevel on a curve works great for this. Problem is, apparently I can't do displacement modifiers on a curve (which is needed for animating the bolt's movements). So I can either animate the bolt as mesh and its unable to grow along curve, or I can have it grow along curve and its not able to be animated via displacement modifiers.
Only workaround I can see is to just have the bolt physically pushed along a pre - placed curve. This sort of gives it the illusion that it's starting in one place, and ending at its target. However, I need to hide the bolts being active the entire render in some black object until they're needed. Which is a big hassle. There's gotta be a way to reveal this emission material along the bolt. Maybe there's a "start at this vertex, end at this vertex" sort of thing? I don't know.
If anyone has an idea of how to either A) make the material reveal itself from beginning to end custom, or B) I can make it grow from a point like a curve, I would be very grateful.