The root word and its derivatives don't share the same stress pattern, unless the latter is -ful, -ness, etc.
unique, boutique, technique, baroque, oblique, etc--all these words have a specific pattern.
- o+que > OH
- i+que > EE
- a+que > AY
VC+que pattern: you don't hear the above set of vowels in this case. Instead, you hear CAT, BOT, BET, BUT, BIT vowels, because the stressed syllable is closed.
In -ty pattern, the stress falls on the antipenult (third vowel from the right).
In 'opacity', the stress falls on the third from the right, which is 'a'. Since it is stressed, it attracts a coda consonant, making it a closed syllable.
o-PAC-i-ty: CAT Vowel, instead of GATE vowel in opaque.