Models of self-affine cracks in brittle and ductile materials