accessing screen buffer of other programs

Started by
22 comments, last by cody 22 years, 3 months ago
If you want to capture the entire screen, you could just go to the video memory offsets and copy them. Or if you know the rect, you can use that area instead of the entire memory block.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Advertisement
I wasnt quoting you Anon I think are posts got submitted at same time...

The fact that cody will record the screen with a cam corder will look like crap! Wont the cam corder capture the vsync of the monitor so it will look like you you have these big black lines go up and arround through your screen?
i think ansi ment the thing with the digi-cam.
i tested it with a cheap web-cam and yeah, it looks really bad, but with super cool digital camera it will look much better!

what billy wrote is interesting, but where do i get the source for this dll? i will take a look at some unreal sites...
i found the source but theres a problem:
ut doesnt call ClearZ on every frame... damn again!
i highly doubt you have a pc capable of capturing to ram as you would need quite a bit of ram (talking about 1gig or so). since very few pcs can run ut AND compress video on the fly at 25 frames per second. you do realize at 16bit video would get you (at 320x240 res) about 3.6 meg per SECOND. or 219meg per minute or 1089meg for a nice 5 minute video. now you probally could use some of the crappier codecs to get realtime compression on a 800mhz+ pc. if you got a pentium4 the divx4.11 codec is quite optimized and MAY yeild fast enough performance at 320x240 so that ut framerates dont go to crap. though ut may "steal" too much cpu to make it useful. also no matter how good the video camera it will look like crap thanks to the anomolies you get from the "scanning" the moniter performs during rereshing of the screen. basically if if avi capture is not built into the game dont even bother since the quality will suck unless you really want to work hard at writing all the required components.

as to demos not working. the thing is that they do, just not if you dont have the required levels/mods installed that the demo uses. i am not sure about player models, though i am pretty sure they dont matter (like if you were to play the game online).
well, i have 1gig ram and i will need about 10-20mb per second.
thats enough for half a minute video. there wont be single sequences that take longer.
i know all that is not perfect, but i will try...

and it really often happens that ut demos dont work!
when you play on a internet server there are downloaded many packages. (like cshp(anti-aimbot), ut map vote,skins and other stuff, and all that in many different versions)

compressing the video while recording is not an option i think.
divx is very fast and can compress in realtime without problems, but not when ut is running...

perhaps i will wait until there´s a new version of movieunreal...
Optionally, you could write an opengl32.dll wrapper that passes all calls directly through to the real opengl32.dll, except for calls to wglSwapBuffers. When SwapBuffers is called, you could do a glReadPixels and save to a file (or whatever).

As far as creating the wrapper, probably a good place to start would be glTrace (http://www.hawksoft.com/gltrace/).
Ron FrazierKronos Softwarewww.kronos-software.comMiko & Molly - Taking Puzzle Games to A Whole New Dimension
LordKronos: That was going to be my original idea (instead of when ZClear is called), but the problem is when writing an OpenGL app, you simply do a SwapBuffers (windows call) and it does not call a glSwapBuffers (well, not that i''m aware of anyways). I would not do a glReadPixels for an entire screen though!! :o). Using the OpenGL driver for UT gives you access to the windows DC (device context) and RC (rednering context), which makes image capturing pretty easy and fast (much better than "getting" every pixel). Cody, are you sure that UT doesn''t call ZClear every frame? If so, how did you determine this? I am trying to think of a good way to capture the screen on every refresh, it has to do something every 1 frame :o).

Billy - BillyB@mrsnj.com
I am almost positive from experience that it doesnt call clear every frame, because I remember playing one level once where the level data was messed up and there were places where no poly existed. As I recall, when you looked at these areas, you would just see garbage (blurred from previous frames). I suppose it could also have been doing something really strange, but to me it looked like it wasnt clearing.
Ron FrazierKronos Softwarewww.kronos-software.comMiko & Molly - Taking Puzzle Games to A Whole New Dimension
LordKronos: I know the Color Buffer isn''t cleared AT ALL, but I beleive the Z-Buffer is. They are 2 seperate entities.

This topic is closed to new replies.

Advertisement