Your problems may be coming from a scaled or parented layer of from using the wrong type of lightning. Try this:
- Create a solid the size of your comp (Ctrl/Cmnd + Y) and name the solid Lightning
- Add Effect>Generate>Advanced Lightning
- Add a new null to the comp (Ctrl/Cmnd + Alt/Option + Shift + Y)
- With the null selected in the time line press the enter key and rename the null Origin
- Duplicate the null (Ctrl/Cmnd + D)
- With the duplicate selected in the timeline press Enter and rename the null Direction
- Select the Origin null, open the Motion Sketch panel and select start capture and draw a path
- Select the Direction null and repeat the motion sketch
- Select both nulls and reveal the position by pressing the 'p' key
- Select the Lightning layer, lock the Effects Control Panel and hold down the Alt/Option key and click on Origin to add an expression to the Origin property
- In the time line use the pickwhip to connect the Origin of Advanced Lightning to the Origin Null's position
- Repeat step 10 and 11 using the Direction property in the ECP
- Change the Lightning Type to strike
- Select the Position property in the timeline for the Origin null to select all of the position keyframes then hold down the Alt/Option key to retime the animation
- Repeat with the Origin null
- (Optional) Just to make sure that the lightning exactly follows the position of the nulls set all parameters below Conductivity state to zero or as low as they will go to create a straight beam
- Adjust the parameters of Advanced Lightning below Direction and change the Lightning type to suit your design.
There you go. As long as the nulls and the Lightning layer have not been scaled your effect will work perfectly or parenting has not been applied to any of the layers your effect will work perfectly. If you have parenting involved then you need to add toWorld or toComp corrections to the expressions.
Update: I thought that this would be a good candidate for one of my upcoming AE Basics tutorials so I threw together a first draft. Enjoy:
Awesome! Thanks for the step by step... haven't tried it but i will in the next day and let you know how it turns out. I am glad you created a little tutorial. I was thinking this was a probably a common problem a lot of people would ask but I was unable to find anything on the web scouring various search parameters. I was astonished that an effect like this was accomplished by most youtuber doing frame by frame key frames! The thought of the tedium set me on the path to find a better way and given I am a relative 2 month noob to AE, I gave the community a shot.
So awesome... your tutorial did exactly what i was looking to do. I posted what I was working on and have 1 follow up. There are these odd white circle flashes at the destination portion of the lightning at various points. Do you know what those are and how I would get rid of them? This is just a sample of what I was working on I am going to clean up the placement of the lightning but these white circles keep showing up. You'll see one on the left hand lightning destination at 33 seconds in.
Thanks a bunch.
Those are flukes caused by the settings and advanced lightning. try turning things down just a little bit.