2
$\begingroup$

enter image description here

enter image description here

enter image description here

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.

$\endgroup$
3
  • 1
    $\begingroup$ It looks like you're using a curve object. Use UV coordinates instead. $\endgroup$
    – Nathan
    Dec 20, 2021 at 4:21
  • $\begingroup$ @Nathan This doesn't work. If I use UV instead of object, I can go between 0 and .999 and the material is off. As soon as it hits 1.0 , its completely on now. Not gradually like I desire. Thank you for the comment though :) $\endgroup$ Dec 21, 2021 at 1:56
  • $\begingroup$ See the answer for a bit more detail. $\endgroup$
    – Nathan
    Dec 21, 2021 at 2:44

2 Answers 2

0
$\begingroup$

i am not sure why you want to make it complicated, but you can easily animate a flash/curve with GN like this:

enter image description here

result:

enter image description here

Note: animating the End value from 0-1 animates as you see it.

Animating the other direchtion: animate the Start value from 1 to 0.

$\endgroup$
1
  • $\begingroup$ Hello! Thanks for the response. After some testing, this kinda helps / kinda hurts what my goal is. By using your method, I am able to animate the reveal like the video you have. I am also able to add my displace modifier AFTERWARDS to give it the wiggle effect like the lightning ought to have. However, when I go into edit mode on this spiral I've created, there are no anchor points do adjust the shape of the curve, nor vertices to edit like a mesh. This is important to other aspects of the bolt I need to animate. Converting to mesh eliminates everything done so far, so that's a no - go too. $\endgroup$ Dec 21, 2021 at 2:01
0
$\begingroup$

If you're using a curve to create this, curves in Blender have the pleasant property that they create a follow-active-quads style UV map. We can take a look at how this UV map looks by converting a curve to a mesh and inspecting the UV map that is created:

enter image description here

This is a polar map: the Y axis represents angle from the center, from -180 to 180 degrees mapped to 0,1, while the X axis represents the length along the curve.

This makes it extremely easy to animate a curve growing simply by checking whether the UV.x is greater than some particular value. Here, I'm just checking to see if the UV is greater than 0.5, and emitting white if it is, black if it is not, but there is no end to what can be done here; a simple modification would be to mix with transparency on the basis of UV.x. Of course, the comparison value (for the greater than) can be animated, or driven from a #frame driver.

However, I'm not certain exactly how your exact shape is being created; the modifiers look quite a bit more complicated than I would expect. You have several curves shown in your outliner, so I'm not sure if one of them represents your actual lightning bolt.

$\endgroup$
3
  • $\begingroup$ I feel I may be biting off more than I can chew haha. I've gotten bolts (mesh version) to do almost anything I need them to except having the grow from one point to another. (Or at least revealing it's texture giving the same illusion). Your answer is more complex than I am used to, specifically with all the UV info. I feel that communicating via this answer thread will not yield great results. Is there a place ( and are you willing?) where we can talk about this in detail? Like streamed to you via discord? Don't want to take up your time if you don't want, but it would make the process easier $\endgroup$ Dec 21, 2021 at 3:06
  • $\begingroup$ Yeah, BSE isn't great for conversation. I don't like real time stuff myself, but I'm always happy to help people out on blenderartists.org, where it's a bit easier to have a conversation (and there are other people happy to help there as well.) $\endgroup$
    – Nathan
    Dec 21, 2021 at 3:26
  • $\begingroup$ Okay. I am not familiar with this BA, as I'm new to blender in general. But I can try to hop over there. Thanks for the suggestion! $\endgroup$ Dec 21, 2021 at 3:38

You must log in to answer this question.

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