Proper incidental notes...

As a beginner, my bass repotoire is fairly simple. If I'm playing with a rock or pop tune and I want to put "motion" in the bass line, instead of sitting on the tonic, I'll jump up to the 5th and the octave, then back down again. I'm sure that those of you that have more bass skills than myself can see why a newbie would do that -- your index is on the tonic, and you just drop finger three two frets ahead and you're done.

If I just ride rhythmically on the tonic, the song often tends to be flat.

I know my scales, and I know what I guitar player would play to add notes.

I'm looking for guidelines; I want to know why good bass players make the choices that they do. If you want to connect one chord to the next by adding some incidental notes between the two, where do you go? I hear a lot of bass players jumping up an octave in their bass lines, which is what led me to start abusing the fifth. Is the third a better choice?

What are the chords? You can pick notes that are in both chords. The third woks well, but you will change tonality if you are playing under a minor chord, which may or may not work depending on the song you are playing. There are a number of possibilities. Trust your ears and play what sounds right. The best advice I've ever heard was to learn all of the theory that you can, then forget it. Try not to over analyze and just play. If something that you play doesn't sound right, then use your theory to determine why it didn't and then decide what will. When I first started out, I refused to trust my ear and tried to figure out what the right notes should be! Once I got past that and just listened and experimented, I improved by leaps and bounds!

this is the fun stuff...there is so much you can do, and ways to look at it. A few thoughts:

Think melody: your path from root to root is its own melody. You can echo melodies you hear in a vocal or instrument line, or create your own melody. When you start thinking melody, you might think about walking up (or down) a scale from one root to the next, then you might think about breaking up a walk-up by (for instance) jumping to a tone above the tonic, and then dropping back down to the tonic.

And by the way, root-5-octave is great stuff. Chuck Rainey has described his style as playing lots of root-5-octave with a lot of rhythmic variation.

"your index is on the tonic, and you just drop finger three two frets ahead and you're done."

I'm sure there is more than one way to skin this cat, but...if you're playing a major scale (or Mixolydian), you're generally going to want your middle finger to fret the root, leaving your index free to hit the third and then your pinky to rest naturally over the 5th, and right below the octave. In a minor scale, your index will fret the root, with your pinky then resting over the (flat) 3rd on the same string. Now you have two distinct "box" shapes, and your fingers will quickly, and naturally go where they have to for either major or minor scales.