It's no secret that the character of Gollum was nearly all CGI-ed with his movements based off of Andy Serkis, but we say "nearly" because there were certain moments where parts of the actor stuck out. Most of the filming was done with Serkis in a black bodysuit to record his facial expressions and body motions, which were then digitally copied onto the screen. Other times, though, he was filmed in the scene opposite his castmates, and his appearance was then digitally switched out for the computer-generated version. It's with this latter technique that Serkis' actual drool was able to appear in the movie.
You might've noticed that the original image of Gollum in the first film where he's stalking the "Fellowship" was not how he ended up looking later on. That's because after the pre-corrupted scene of Smeagol in 'Return of the King' (portrayed by the non-computerized Serkis) was filmed, the crew wanted to redesign his image into the monstrous version we all know and love, so as to make him look more like his hobbit self.
Read More: 10 Things You Didn't Know About 'The Lord of the Rings' Movies | http://screencrush.com/the-lord-of-the-rings-things-you-didnt-know/?trackback=tsmclip