Jump to content
The simFlight Network Forums

Capturing images from FS 2004 through FSUIPC


Recommended Posts

Hello Folks,

I've been successfully working with FSUIPC in the past years in many languages (such c#, c, c++, pascal, vb) in several projects into the FS scope (autopilots, etc.). However, I'm now facing a huge challenge (maybe the major so far) which consists in capturing the view (yes, the view, the frames generated by FS2004, such as Cockpit View, Spot Plane View, etc.) of my FS2004 in order to embed it into a new window (or program Form, regardless of which language/IDE I'm programming), that is, is there any memory address that contains the images (frames) generated in the simulated environment which I can access via FSUIPC? So, succinctly speaking, is there any offset which is not in the offsets conventional list that can make it feasible?

Regards,

Rafael Coronel

Link to post
Share on other sites

However, I'm now facing a huge challenge (maybe the major so far) which consists in capturing the view (yes, the view, the frames generated by FS2004, such as Cockpit View, Spot Plane View, etc.) of my FS2004 in order to embed it into a new window (or program Form, regardless of which language/IDE I'm programming)

I think to do that you have to use a monitor program which hooks into the video display system, like those sed by VNC. It is fraught with problems, not the least of which dealing with the vast differences between full screen and windowed mode.

is there any memory address that contains the images (frames) generated in the simulated environment which I can access via FSUIPC?

No, it is not possible. There is no such memory where the image comes together except that in the video card. Images are built up through DirectX calls which build them in the video card memory using video card programming.

Regards

Pete

Link to post
Share on other sites

Thank you Pete for your response. Ok, I got it.

It might be a little bit out of the scope (or maybe not) for most FS developers but I guess this issue may be useful somehow, someday. Indeed, it turns out that it's been a quite hard to grab frames even using OpenCV and c++ programming, which is commonly used for many tasks concerning computing vision when you're connected to an online camera via USB camera or even to capture frames from AVI videos (post-processing, in this last case).

As I need to online process images that are generated by the FS itself, has anyone ever embedded a specific cockpit view (or others) into a window/panel in an external program so that it is possible to work with those images as they were simply objects to be manipulated by the program? Is there anything to do with the way cockpit developers split the FS cockpit view in multiple monitors? Can anyone give me a clue?

Regards,

Rafael Coronel

Link to post
Share on other sites

It might be a little bit out of the scope (or maybe not) for most FS developers but I guess this issue may be useful somehow, someday. Indeed, it turns out that it's been a quite hard to grab frames even using OpenCV and c++ programming, which is commonly used for many tasks concerning computing vision when you're connected to an online camera via USB camera or even to capture frames from AVI videos (post-processing, in this last case).

FSX includes a screen grab option I seem to recall, it'll save static views for you. Programs like FRAPS can record the moving pictures for you.

Is there anything to do with the way cockpit developers split the FS cockpit view in multiple monitors?

The different cockpit views are simply defined in the PANEL.CFG file, and in the Cameras definitions in other CF files. Multiple open 3D windows has been a built-in function of versions of FS going a way back. I don't think any of that is developed by cockpit developers.

Regards

Pete

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.