Obito and Madara are Uchiha, and Madara even has stronger chakra with a stronger Dojutsu. They both break out of it. Nagato gets wrecked as he is not an Uchiha nor does Rinnegan offer Genjutsu protection.
Itachi stated only someone with my blood can break it. (something on those lines) With them being uchihas I would say yes. As for Nagato I would say he gets caught in it. Again this is just my opinion...