How much of a relationship do you need to have with your prof to get a "good" LOR?

The common advice is to go to office hours and make a good impression. I'm having trouble understanding how much of an impression I need to make. I'm confident all of my professors know who I am. I sit up front and I participate in class. I go to each professor's office hours once or twice. Not more because I have limited time and if I understand the material I feel awkward dropping in for no reason, especially if it's clear they're busy with research or other things. Is it enough for them... How much of a relationship do you need to have with your prof to get a "good" LOR?
Source: Student Doctor Network - Category: Universities & Medical Training Authors: Source Type: forums