I am sure Favreau's Indie background and reputation for letting his actors use a little improvisation helped Sam Rockwell feel good about taking the role as Justin Hammer in Iron Man 2. Sam confirms:
"It's not dissimilar to other studio movies, but the thing that's different about it is (director Jon Favreau) really likes to improvise," states Rockwell. "So we get to play more on this movie than you would on a lot of studio movies."
In other words Favs isn't a micro manager, he wants the actors to perform the role as an extension of there own personalities, which is sometimes good and sometimes bad. A good Director (like Jon Favreau) will make that good.
Rockwell also said he received the script only a week before shooting, so Sam "kind of took it on faith."