In terms of the Chapter 13, the plan will actually improve your chances for obtaining another mortgage. Reduction of overall debt and establishing a regular payment record make this possible. The plan is designed to improve your credit score during the program. People are eligible for conventional or FHA mortgages after two (2) years of successful payments under the plan.
For Chapter 7, most mortgage companies tell us that after two years (if not sooner) you would qualify for a conventional or an FHA mortgage, so long as you are otherwise qualified.