I don't know if VS2005 will install on Win98. You really need to upgrade your OS. :P VS2003, I'm pretty sure, will. You'll have to hunt for it, or ask for that 30MB email, tho.Originally Posted by Strike
![]()
I don't know if VS2005 will install on Win98. You really need to upgrade your OS. :P VS2003, I'm pretty sure, will. You'll have to hunt for it, or ask for that 30MB email, tho.Originally Posted by Strike
![]()
Well, if you have issues, post here or email me; I'll try to help. FWIW, I found the instructions provided by MS pretty easy to follow.Originally Posted by Shane Christopher
After quite a bit of work, I have to admit defeat. I'm going to have to rip out my AVI class and retool it.
Which really sucks, because it ALMOST works. Video plays great. The sound is there. The issue is the frigging sound format. It turns out that sound in an AVI file can be in any one of about three dozen or so formats. DirectSound, on the other hand, only likes one particular format. So if I try to play the sound, you can hear it, but it's all distorted (which is kind of funny to hear, actually).
So I tried to convert it. MS has a set of functions to do this (called acmStreamXXX) which is supposed to do just that. Perfect, I thought. I'll just read the AVI file format and the actual sound, run it through the converter to change the buffer into something DSound can deal with, and we're all set!
Unfortunately, after all that, I get back an error 255, which is the code for "conversion not possible". There's just nothing I can do with that. There is no way to debug that, the driver is just refusing to do it at all.
So, despite being within a hair's breadth away from being done, I'll have to switch over to using DirectShow instead, which is a whole different system. I used DShow to play the music in Sov, and I don't remember it being too difficult to set up. I'm just not really sure how it interacts with D3D and DSound to give a synched video/sound result. Guess I'll find out![]()
"They laughed when I said I was going to be a comedian ... They're not laughing now." - Bob Monkhouse
Have you considered using a 3rd-party converter tool to pre-convert existing files into D3D's preferred format, instead of consuming CPU doing it at runtime?Originally Posted by RonHiler
Just because I've got a dual-core computer now doesn't mean I want to waste cycles doing unnecessary audio conversions![]()
Yeah, it's not a bad idea. I'll look into it. I'm still going with DShow though, even if we were to convert the sounds in the AVI files into something DSound can deal with directly. It has much better synching capabilities than I can easily provide. I have it already working (with sound and everything!). The only small hitch is that in windowed mode I get some flickering (in fullscreen mode it works fine), so I'm going to have to use an offscreen surface, but other than that it works great.Originally Posted by Pix
On a bad note, DShow has the WORST docs I have ever had to read through. Really just awful. Good thing I'm not doing anything more complicated than playing a simple file.
"They laughed when I said I was going to be a comedian ... They're not laughing now." - Bob Monkhouse
So, news. It's been a bit of time since I've said anything about MD, and I'm sure some of you are wondering just what the heck is going on. Well, not to worry, I have actually been working on MD every day.
I expected to be done with Milestone 1 about 3 weeks ago. Unfortunately, I got stuck on that darned AVI player.
It's been quite frustrating actually. I'm using DirectShow. DShow is quite powerful, and in actual fact, it is REALLY easy to get an AVI to play with synched sound and everything. Which just makes it all the more frustrating when you can't quite get it to do what you want, heh. I've had the movie playing CLOSE to what I need several times now, but always there is some hitch. Fullscreen would work perfectly, but windowed play would flicker. Or windowed would work perfectly but there would be no option for fullscreen in that mode, and so on.
It turns out I can draw the movie frames using Direct3D (which is what I did originally when I was rolling my own solution before going to DShow). To do this, you use a particular type of filter called the VMR-9. Sound is handled by an entirely different filter, the VMR9 is strictly in charge of video. Now in it's default state, the VMR won't do fullscreen, and also you have to update the window through the WM_PAINT message. Since MD is strictly a D3D app, it doesn't use th WM_PAINT message much, so there were some problems.
However, it also turns out that two parts of the VMR9 filter can be replaced with custom parts. One of them (the mixer) we don't care about, it's not applicable to cutscene style movies. But the other, called the Allocator/Presenter is in charge of allocating D3D surfaces for the movie frames and presenting them onto the screen.
What's great about this is I can override the default a/p and use my own (which essentially just dumps the current movie frame onto a D3D surface), which will go through the D3D engine we already have. We just copy the surface over to a texture and draw it onto a quad on the screen. This works for both windowed mode and fullscreen, because all of that is handled by the engine already.
So anyway, I've written the custom a/p now (which required writing a COM interface) and I think things are about done (what's left is just a bunch of DShow API calls to let the VMR9 renderer know about the custom a/p). Barring any issues, I should finally be able to put this part to rest in the next couple of days and finish up the remaining miscellaneous parts of Milestone 1.
I'll be putting up version 2 of the design document (which I'm basically done with) around the same time I finish M1 and/or start M2. I'll also be releasing the M1 version of MD to whomever wants to test it out. The M1 version won't be terribly exciting, but hey it's a start right?![]()
"They laughed when I said I was going to be a comedian ... They're not laughing now." - Bob Monkhouse
Just to let you guys know, the custom a/p did the trick. The movies work perfectly in both windowed mode and fullscreen. So I'm going to work on finishing up M1, which should be fairly quick now.
"They laughed when I said I was going to be a comedian ... They're not laughing now." - Bob Monkhouse
Actually, at this point, that's a peice of cake. Once the movie frames hit the texture surface via the custom a/p, they become no different than any other D3D texture. I can put them anywhere. It just so happens I'm putting them on a quad that covers the entire window (or screen in fullscreen mode), but I could just as easily put them on the side of a mesh. Heck, I could even run them through a pixel shader and get some post-processing effects, heh.
It might be cool, just for the heck of it, to put the AVI movie on the globe mesh once it's back in, just to see what it looks like
You could actually do some pretty cool things with this sort of technology. For instance, it would be pretty simple to put a TV in a 3D game world (not MD, but any sort of FPS game), and have it playing. You could even let the player change the channels (you just need one movie track per channel to feed frames to the texture).
It was a pain to code, but I'm definitely going to be keeping this class around for future use.
"They laughed when I said I was going to be a comedian ... They're not laughing now." - Bob Monkhouse
Hah, you're like 15 years out of date on that. Syndicate (or maybe Syndicate Wars) had TV playing in-game. Ok, it wasn't 3D in the modern sense, it was actually faked with static top-down isometrics...but there was, in fact, a scene from Ghost in the Shell playing on a billboard.![]()