Something I've always considered is the emotional state at that time.
For example, if you're in a hurry to get out the door, trip, and skin your knee, it won't be a "good" pain because your feeling frustrated with yourself and the situation. On the other hand, if your wrestling around and having fun and it gets rough, it would probably be an erotic and enjoyable pain.
In other words...
good emotions + stimuli = good pain
bad emotions + stimuli = bad pain