This riff is all over the fretboard. Even though it might seem a little intimidating, there's actually a really basic pattern to it that you can follow. And that pattern is simply...octaves.
We are going to span over 3 octaves in each measure. First, we'll be playing a 3-note-per-string pattern on the D string, then we'll play that same pattern an octave higher on the B string, then we'll go two octaves lower and play the same pattern on the Low E string.
Play each measure by itself at first. Don't dive head first and try to play it all at once. When you get each measure down individually, then you can start merging them together. Practice slowly.