Отдельная благодарность ripieces
twitter.com/dtugend
Работает начиная с версии 2.46.0 HLAE
mirv_streams add normal main
mirv_streams add hudBlack hudBlack
mirv_streams add hudWhite hudWhite
Всякие математические штуки, стоящие за режимами наложения и стримами:
mmhud.txt v3
Variable names / description:
game - original colour output by game on screen (with HUD)
a - original alpha used by game for HUD)
hud - original game HUD colour
bg - "main" stream, original game background (everything drawn without HUD)
hudBlack - "hudBlack" stream
hudWhite - "hudWhite" stream
vegas - Output in Sony Vegas.
aeMain - The composition with bg stream, which you probably mainly will want to edit and add effects.
aeGame - Output in Adobe After Effects.
Forumlae:
Don't forget that we are in _clamped_ RGB space, so you need to take extra care when manipulating the formulae!
game = a * hud + (1-a) * bg
hudWhite = a * hud + (1-a) * 1
hudBlack = a * hud + (1-a) * 0
vegas = ((hudWhite - hudBlack)) * bg +(1-(hudWhite - hudBlack)) * 0 + hudBlack
= (1-a) * bg + a * hud
= game
aeMain = bg
aeGame = (hudWhite-hudBlack) * aeMain + (1-(hudWhite-hudBlack)) * 0 + hudBlack
= (1-a) * bg + a * hud
= game
Автор: Barabulyko
Комментарии (0)
Язык: