VBGamer |
|||||||||||||||||||||||||||
That's a tough one.... Steven Blom (1 reply, 0 views) (2001-Feb-15) In theory I know how it works, however, in practice it's quite processor intensive, especially when you're dealing with mpegs...
the other thing you're talking about is an animated mask.
which would simply stop certain pixels from being blitted, creating the impression of a foreground and background.
The first place I saw this was in FF7, I came to the conclusion (being in 3D) that the characters were actually walking around in an invisible 3D world. When the movies were playing, the camera angle changed, and the masking was faked by having invisible objects pass in front that were invisble, but still had enough substance to mask them.
in a 2D game, you'd have to decompress the MPEG, along with a 1 bit alpha layer. (visible or not visible), in your rendering loop, you'd have to lock your surface, and blit your graphic surfaces to the backbuffer while comparing the pixel to it's equivelent spot in the 1-bit mask.
Like I said though, the biggest problem lies within speed. I'm quite sure you could do most of this stuff using DirectX8, but you're not using DirectX8 for this project. I haven't really looked into the DirectShow capabilities.
I suggest finding some way to decompress an MPEG movie onto a directdraw surface, preferably in a fast language, because this kind of animation will KILL your frame rates (Look at how much FF7 starts jerking when Shinra blows up the 7th sector column... quite shocking compared to the rest of the game...)
Reguards,
steven Blom
|