there are great references for it... here are some keywords to assist in your research (aka google)
metasploit obfuscate payload
encoded payload metasploit
also some videos here
Metasploit Class Videos* (Hacking Illustrated Series InfoSec Tutorial Videos)



