Getty Images 1 / 19

Jason Segel's "Forgetting Sarah Marshall" was amazing in its hilarious grossness and unexpected scenarios like a naked breakup scene. But in the five years since that movie's release, Segel has evolved his romantic comedies to be more adult -- with, don't worry, the occasional fart joke thrown in here and there.

Wonderwall got to catch up with "The Five-Year Engagement" writer and star, picking his brain about how he makes his movies so darn funny. As the movie gears up to hit theaters on April 27, get the scoop on working with Emily Blunt, the art of improv versus a script, and how the cast crashed a bachelorette party in Michigan.

First things first. Is it true you guys crashed a bachelorette party while filming in Michigan?

Jason Segel: We went to go do karaoke and there was a bachelorette party. It wasn't a private party. They were super excited.

What songs did you sing for karaoke?

We sang "Brown Eyed Girl" and Joe Cocker's "With a Little Help From My Friends."

RELATED: Jason and more funny celebs

How has this movie evolved in the five years since it's inception?

Nick [Stoller] and I sold this immediately after "Forgetting Sarah Marshall." It was before it had even come out. It was this and "The Muppets" around the same time. So we've been writing both for the past four years. This one is the truest to our evolution as a team. It's more adult than "Sarah Marshall" or "Get Him to the Greek" in that it explores relationships in a pretty deep way, and it's also really funny, I hope. It has an amazing cast pulling off some scenes that are just hilarious. But our model was "When Harry Met Sally" or "Annie Hall." Our taste is obviously a little bit broader than those movies, but shooting-for-the-stars-wise, that is what we were modeling it after -- those classic romantic comedies.

Did you use personal experiences for some of the scenes or were some written in a ridiculous way to get laughs?

It's got its share of big laughs and odd scenes, but they are all stuff that we have experienced in some way or another.

You're known for pushing the limits in movies. What were your boundaries, if any, for this movie?

Our boundary is reality. ... We don't try to do anything to push the limits of taste at the sacrifice of reality. The story, for as funny as it is, is very grounded. So there is never an effort to try and show how gross we can be or how far you can push any limits.

How do you decide what to keep in terms of having scenes filmed straight from the script and the improv?

We learned a lot in the editing room for "Forgetting Sarah Marshall." You really just never know what you are going to use until you start throwing stuff together. You craft the tone of the movie in editing to some extent. A lot of it happens in writing and then when we are filming, you are trying the scenes in a lot of different tones sometimes. Then the final crafting goes in the editing, because you don't know what is going to get cut yet. You don't know what is going to get laughs in the test screenings. So you want to have everything in your toolbox when you get in the editing room.

RELATED: Jason and more celebs having fun on set

Did you rewrite any of the scenes once you had your cast finalized?

We rewrite every time we cast somebody. We sit down with them and go through the script literally scene by scene. We talk to them and get a sense of how they speak and stuff. I had worked with Emily [Blunt] before and I knew her. So I was kind of writing it in her voice. Then she signed on … thankfully.

Who did you have to do the biggest rewrites for?

We really sat down with her [Blunt] and found out how she wanted to play this character and how she saw it. We did a hefty rewrite for her. Then we didn't know what the Winton character [Rhys Ifans] was going to be like until we found the dude. If that had been someone else … even just the fact that he is Welsh. You can't just ignore that as a character trait. No one can write a character as interesting as Rhys can think of it. You know what I mean? Rhys is going to do it better than I can write it. We believe in our actors when we cast them.

How do you show the evolution over five years?

We didn't do any flashbacks. One of the tricky elements was if you know this is a movie that takes place over five years -- at year three are you starting to think, "OK. I have two years left of this movie." You know what I mean? So we tried to keep it interesting and we played with time. Not every year of the movie takes as long as each other. … We have some time markers throughout the movie. But it's not all necessarily "One year. Two year. Three Year." We use different devices like hair, facial hair, wedding invitations, wedding cancelations. It's just to keep track of time moving along.

RELATED: Jason and more celebs at the Oscars