In reference to your kids:
You can teach your kids anything, but they grow up and learn stuff on there own and develop their own opinions. It may be hard to stay in their lives now, but you can never get these years back. Someday they will have there own opinions and any crap your ex wife tried to fill them with, they can reject and replace them with their own feelings. If you walk out now you may lose them forever. If you keep trying and stay active in there lives one day they may see things in a different light and you can have close relationship with them. Just don't give up hope.