a vital technique in both is revolving around the songs tonic, the central key, and relating intervals to this
intervals are a major role aswell..
take this classic vader style riff:
A------------4-5-4---------3"
E-2"---4-5----------5-4
it starts with a tremolo picked F# (though its detuned) backed with bass, drums and vox, then a simple run then leads into another trem pick, this time of C#, a dimished 5th interval of that you started with
using this techniqueis very useful to back singing, try these interval styles:
minor 3rds
5ths
full octaves
7th (half a step below the one you start on)
another example of this is decapitateds 'blessed' intro:
A-----2-3-2-----------2-3-2--------------2-3-------1-2
E-0"-----------0"--5-----------3-2-1"-1------1--0"------0"
ill get soem recordins of it up if you need them
other vital techniques are pinch harmonics, and how they use them
a good style being to place them on the 3rd beat of a 4/4 rhythm, to catch out the listeners ears, check out "gorgasm : morbid overgrowth" and "cryptopsy : serpents coil" for 2 fine examples
'weird chords' are usueful aswell,
check out
www.ultimateguitarpage.com for more ways, under 'extreme metal'
if you want more reply and ill post more, but this posts rather long...
hope it helps!