Heres how to get that folded effect on an already created pattern using photoshops displace function.
First we need to create the displacement map, so create a new file of 512x512.
fill that layer with any colour you want and then overlay a black and white gradient onto it at zero degrees so the gradient runs downwards.
make the gradient as close or as spread as you want your final folded material to be.
Then save this as a .psd........ive named mine folds.psd.
Now open your template and bring in or make from scratch ,your material you want to give the folded look to.
now go to filter/distort/displace
this will ask you for the location of a displacement map......just navigate to where you saved your map your created earlier.
Then choose how much displacement you want.
Set the horizontal scale as zero.....the vertical scale should be set around 10...the higher the numbers the more displacement there is.
notice how the bottom of the pattern has been warped
Next open up your saved displacement map and overlay it onto the warped pattern.
Next reduce the opacity on the displacement map layer until you're happy with the result.
Then save as a .png and check how it looks on your avatar.
And the finished result