What can be the cause for pain right under the kneecap when walking (bend/straighten knee)? I've had an mri, but it showed that nothing's wrong.

Early case of. Chondromalcia, of the patella, that when apply the most pressure most at that joint, which cause some friction between the knee cap and the thigh bone which in turn cause some inflammation and pain.