Texture resolution in P3D v4.5 POD view

Any issues, problems or troubleshooting topics related to the additional features present in the Prepar3D Professional Plus client application.
Post Reply
zamirk
Posts: 125
Joined: Mon Jul 21, 2014 8:39 am

Texture resolution in P3D v4.5 POD view

Post by zamirk »

Hi,

I am developing POD view for ISR but having issues in terrain loading while setting applied for world level of detail radius to max. As POD view can view beyond the settings available, how can I achieve high resolution textures beyond these settings. If this feature can't be achieved in P3D v4.5 then is it possible in your latest releases so that I can consider spending some bucks for upgrading my P3D.

Anyone from LM team, kindly guide me.

Regards,
Zamirk
User avatar
Martyson
Posts: 14706
Joined: Sun Mar 25, 2012 11:08 am

Re: Texture resolution in P3D v4.5 POD view

Post by Martyson »

Hello zamirk ,

You could do some testing for up to two weeks for free:

P3D Refund Policy:
https://www.prepar3d.com/support/refundpolicy/
Best Regards,
Vaughan Martell PP-ASEL (KDTW)
zamirk
Posts: 125
Joined: Mon Jul 21, 2014 8:39 am

Re: Texture resolution in P3D v4.5 POD view

Post by zamirk »

It means I have to upgrade otherwise there is no solution to this problem I am facing.
User avatar
Beau Hollis
Lockheed Martin
Posts: 2440
Joined: Wed Oct 06, 2010 3:25 pm

Re: Texture resolution in P3D v4.5 POD view

Post by Beau Hollis »

You should try using TerrainLodOrigin and SceneryLodOrigin in your camera definition as a first step. There is more info on this in the learning center. This features was available in v4.5.
https://prepar3d.com/SDKv4/sdk/cameras/ ... ation.html
If you are using C++ you can also control this behavior via the camera interface:
https://prepar3d.com/SDKv4/sdk/pdk_api/ ... aae1a95e58
https://prepar3d.com/SDKv4/sdk/pdk_api/ ... 5e0c9ddb95

In this case you set a LLA value, so you would need to pull that from the camera or target to emulate the simpler mode based approach used when setting it via the camera definition.

The same distance based loading is done, but the origin used for the distance calculation is set to your target so you should get full res terrain textures there. Also, because our GPU terrain uses whatever LODs are loaded across multiple view, you would still get full resolution terrain texture near the user if you have another camera open. That's not the case for scenery models which might not draw near the user if in a pod view with a scenery radius set 100 miles away. You also want to be careful about combining high terrain/scenery draw distances with multiple cameras that have very different origins. There is a hard limit of the total number of terrain tiles (2048) which you might max out if you have multiple views and your terrain texture resolution is set all the way up to say 7cm.

Thanks,
Beau Hollis
Prepar3D Software Architect
zamirk
Posts: 125
Joined: Mon Jul 21, 2014 8:39 am

Re: Texture resolution in P3D v4.5 POD view

Post by zamirk »

Thanks for your masterly guidance.

If I use C++ option and provide data to "SetTerrainLODOriginLLA()" which you have described above then I have to set TerrainLODOrigin to "Camera" in camera definition and same for the scenery. Am I Right?

Also I am using LOD 16 textures for photorealistic imagery, can you please guide to improve texture loading time if I implement C++ option which will help while pan operation in the POD view.

Thanks again for your precious time and help.
zamirk
Posts: 125
Joined: Mon Jul 21, 2014 8:39 am

Re: Texture resolution in P3D v4.5 POD view

Post by zamirk »

I have written the following code in Targeting Pod SDK sample, but it's not working. One thing to add, I am selecting Pod View on my main P3D window and running following code at 1Hz. Can you please highlight what I am missing?

Code: Select all

double lat, lng, alt;
g_spControllableCamera->GetCameraLookAtLLA(lat, lng, alt);

//Query for ICameraSystem
if (!g_spCameraSystem)
{
     auto* wndPluginSystem = PdkServices::GetWindowPluginSystem();
     if (wndPluginSystem)
     {
             auto* curwnd = wndPluginSystem->GetCurrentwindow();
             if (curWnd)
             {
                     auto* camSystem = curwind->GetCameraSystem();

                     if(camSystem)
                     {
                               camSystem->QueryInterface(IID_ICameraSystemV450, (void**)&g_spCameraSystem);
                      }
               }
        }
}

if (g_spCameraSystem)
{
        g_spCameraSystem->SetTerrainLODOriginLLA(lat, lng, alt);
        g_spCameraSystem->SetSceneryLODOriginLLA(lat, lng, alt);
}
Clifton Crane
Lockheed Martin
Posts: 1188
Joined: Tue Sep 25, 2012 2:34 pm

Re: Texture resolution in P3D v4.5 POD view

Post by Clifton Crane »

Hi zamirk,

I believe GetCameraLookAtLLA() will return latitude/longitude in degrees, whereas SetTerrainLODOriginLLA() and SetSceneryLODOriginLLA() expect lat/lon in radians. Both functions should use meters for altitude.

Regards,
Clifton
Clifton Crane
Prepar3D® Software Engineer Sr.
zamirk
Posts: 125
Joined: Mon Jul 21, 2014 8:39 am

Re: Texture resolution in P3D v4.5 POD view

Post by zamirk »

Hi Clifton,

Thanks for your response.

But documentation says:

Set the LLA of where the center of the terrain LOD radius for this camera will go.

Parameters
lat Latitude of LOD ring center in degrees
lon Longitude of LOD ring center in degrees
alt Altitude of LOD ring center in meters

Regards,
Clifton Crane
Lockheed Martin
Posts: 1188
Joined: Tue Sep 25, 2012 2:34 pm

Re: Texture resolution in P3D v4.5 POD view

Post by Clifton Crane »

Hi zamirk,

Thanks for pointing that out. I've taken a second look and can confirm that SetSceneryLODOriginLLA and SetTerrainLODOriginLLA expect radians for lat/lon. I will correct the documentation.

Regards,
Clifton
Clifton Crane
Prepar3D® Software Engineer Sr.
zamirk
Posts: 125
Joined: Mon Jul 21, 2014 8:39 am

Re: Texture resolution in P3D v4.5 POD view

Post by zamirk »

Hi Clifton,

Thanks for the update.

I have tried setting latitude and longitude in radians but still P3D failed to load terrain. I am setting 'TerrainLODOrigin = Target' in Camera definition. When we lock ground P3D loads terrain successfully but on unlock it unloads terrain immediately. We want P3D to load terrain where camera is pointing and for this purpose on your guidance I have impleted the previously posted snippet in Targeting Pod sample. It seems that what we are setting by using "SetTerrainLODOriginLLA()" is being overriden from somewhere else.

Regards,
Zamirk
zamirk
Posts: 125
Joined: Mon Jul 21, 2014 8:39 am

Re: Texture resolution in P3D v4.5 POD view

Post by zamirk »

Hi Clifton,

Any idea, what else I can do?

Regards,
zamirk
Posts: 125
Joined: Mon Jul 21, 2014 8:39 am

Re: Texture resolution in P3D v4.5 POD view

Post by zamirk »

Any hint on to SetTerrainLODOriginLLA?
Post Reply