Hello,
Blood in urine of hematuria can be due to infections of the kidney/bladder, disorders of the kidney/bladder, certain blood disorders, strenuous exercise and certain medications. You will need to consult your primary care physician for proper assessment. He may do tests like urine analysis, blood tests, X rays, ultrasonography, CT scan and sometimes cystoscopy to detect the cause for painless hematuria.
I hope it helps. Take care and regards.