SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

flying-w
Posts: 55
Joined: Sun Jan 01, 2012 3:27 pm

SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

Postby flying-w » Tue Aug 01, 2017 11:26 am

Hi All,
Through SimConnect I create a camera for looking at at AI aircraft instances, using the following code snipet:

simconnect.CreateCameraDefinition(guid, SIMCONNECT_CAMERA_TYPE.OBJECT_AI_VIRTUAL, cameraTitle, origin, direction);
simconnect.CreateCameraInstance(guid, cameraTitle, MauleID, DATA_REQUESTS.REQUEST_MAULE_CAMERA);
simconnect.ChangeView(cameraTitle);

For example, I can create a camera that is a "top down" view of an AI object. This worked perfectly in Prepar3D V3, but we may have lost something on the way to V4. In V4, the AI external model is not rendered when switching the main view to the AI camera instance. The interior model is rendered if defined, but that is unsuitable for external viewing and most commercial AI packages only provide external models.

I have adapted the "Managed AI Waypoints sample from the SDK to demonstrate the problem, so it can be seen to be independent of any add-ons. I can recreate the problem in a base Prepar3D V4 with nothing else installed.

Here's some example screenshots. Firstly how it looks (correctly) in Prepar3D V3 from the AI Camera Instance created by the sample:
Image

Now let's move over to Prepar3D V4 with the same SimConnect code. Here we can see just the internal model of the AI rendered, the external model is not shown.
Image

The situation becomes more extreme if we pick a Prepar3D simobject designed to be AI rather than a user aircraft. Here's the C130 seen from the user aircraft cockpit. We've not created the AI Camera Instance yet:
Image

Finally we create and switch to the AI camera, and there is no model shown at all. The only things to see here are the beacons and strobes (hard to see in the screenshot), and the red cycling label describing the AI.
Image

I have two standalone code samples demonstrating the problem based on the SDK samples as described above, one each for Prepar3D V3 and Prepar3D V4. In the samples the code is the same, the only differences in the projects are x86 v. x64 platform and the SimConnect.dll reference. Each sample was built with the latest available simconnect.dll appropriate to each version:

http://www.supertrafficboard.com/downlo ... era_V3.zip
http://www.supertrafficboard.com/downlo ... era_V4.zip

Would Lockheed Martin take a look at this please?

Many thanks
Simon

User avatar
Rob McCarthy
Lockheed Martin
Posts: 948
Joined: Wed Aug 24, 2011 1:37 pm

Re: SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

Postby Rob McCarthy » Fri Aug 04, 2017 12:45 pm

Simon,

We'll investigate this on our end and get back to you.

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead

User avatar
Rob McCarthy
Lockheed Martin
Posts: 948
Joined: Wed Aug 24, 2011 1:37 pm

Re: SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

Postby Rob McCarthy » Mon Aug 07, 2017 1:36 pm

Do you see this issue when using the OBJECT_CENTER option? There is also a LATLONALT_ORTHOGONAL option that behaves similarly to the Top Down camera. The OBJECT_AI_VIRTUAL camera will attempt to use the Virtual Cockpit of the vehicle as the origin point and render the interior model of the aircraft.

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead

flying-w
Posts: 55
Joined: Sun Jan 01, 2012 3:27 pm

Re: SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

Postby flying-w » Tue Aug 08, 2017 8:37 am

Rob
When I use the other options, including those you have suggested, I do not see a problem with the AI model rendering. However the camera is now pointing at and tracking the user aircraft instead of the AI model, so as a solution it won't work for me.

"The OBJECT_AI_VIRTUAL camera will attempt to use the Virtual Cockpit of the vehicle as the origin point and render the interior model of the aircraft."

Is that a change from Prepar3D V3, because the full exterior model was rendered as you can see from the testcases I provided? If that is the case, how do I define a camera that points at and tracks an AI aircraft simobject, and renders the exterior model?

Thanks
Simon

flying-w
Posts: 55
Joined: Sun Jan 01, 2012 3:27 pm

Re: SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

Postby flying-w » Fri Aug 18, 2017 10:02 am

So was "OBJECT_AI_VIRTUAL" not working correctly in Prepar3D V3 as it was rendering the external model, and this has now been fixed in V4 to present the internal model only? If so, can we have an enum like OBJECT_AI_EXTERIOR please to restore the functionality (we have have received inadvertantly) in V3?

It would be a shame to loose it completely, quite a number of my customers use my SuperTrafficBoard add-on just to watch AI aircraft around an airport.

Many Thanks
Simon

User avatar
Rob McCarthy
Lockheed Martin
Posts: 948
Joined: Wed Aug 24, 2011 1:37 pm

Re: SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

Postby Rob McCarthy » Fri Aug 18, 2017 2:36 pm

We'll investigate what caused the differences in behavior between versions and get back to you.

Also default cameras are created for AI entities and can be activate through the view menu.

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead

flying-w
Posts: 55
Joined: Sun Jan 01, 2012 3:27 pm

Re: SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

Postby flying-w » Tue Sep 12, 2017 10:14 am

Hello Rob,
Did your investigations of this issue reach any conclusions?

Thanks
Simon
Last edited by Rob McCarthy on Tue Sep 12, 2017 5:48 pm, edited 1 time in total.
Reason: Typo: "Rod" instead of "Rob"

User avatar
Rob McCarthy
Lockheed Martin
Posts: 948
Joined: Wed Aug 24, 2011 1:37 pm

Re: SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

Postby Rob McCarthy » Tue Sep 12, 2017 5:49 pm

Hi Simon,

Sorry I don't have any updates on this issue yet. It's in our queue and we will look into it shortly.

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead

User avatar
Rob McCarthy
Lockheed Martin
Posts: 948
Joined: Wed Aug 24, 2011 1:37 pm

Re: SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

Postby Rob McCarthy » Tue Oct 03, 2017 12:11 pm

Simon,

We took a deeper dive into this and it is currently functioning as expected. This call will use the Virtual Cockpit origin of the object triggering the interior model to draw. We can look into adding an exterior function to SimConnect in future releases.

The PDK can be used to create cameras and have them target specified objects. Using this will fix the problem you are currently running into. The CameraPDK sample shipped in the SDK is a good example on using this functionality.

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead

flying-w
Posts: 55
Joined: Sun Jan 01, 2012 3:27 pm

Re: SimObject Model Rendering incomplete in P3D V4 compared to P3D V3

Postby flying-w » Fri Oct 06, 2017 5:42 am

Thank you for the analysis and advice. Certainly I will investigate the PDK, and please consider the inclusion of external model rendering in the scenario as described here for a future release.

Simon


Return to “SimConnect Interface Questions”

Who is online

Users browsing this forum: No registered users and 2 guests