Specifying a ViewGroup Definition When Launching P3D?

Any issues, problems or troubleshooting topics related to the Prepar3D client application.
Locked
MHargrove
Posts: 251
Joined: Sun Dec 18, 2011 9:08 pm

Specifying a ViewGroup Definition When Launching P3D?

Post by MHargrove »

Is there any way at all to specify an alternative ViewGroup definition you want to use at application launch? --something other than the standard ViewGroups.xml defintion?

My issue is this: I use ViewGroups to define the cameras on my three 'external visual' PCs in my sim. These displays are scenery only. Up until now I've been satisfied with a single ViewGroup definition for all of my aircraft (using the 'WideView Dummy' aircraft). In most ways this works fine -- but it doesn't give me a way to adjust the eyepoint depending upon what aircraft is selected on my 'master' PC. There is clearly a pretty big difference between the eyepoint for a C-172 and a Boeing 747!

I have software that simultaneously launches P3D on all of my "client" PCs which can invoke any of the supported command line switches -- but I don't see anything that would permit me to specify which file to use for a viewgroup definition. I'm guessing there is NOT a way to do this -- but I thought I'd ask before I figure out a kludge :-)

-M.
Mark Hargrove
Longmont, CO
User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Re: Specifying a ViewGroup Definition When Launching P3D?

Post by Beau Hollis »

If you use multichannel, the view group selected on the server should be applied to all clients, and each time the server switches cameras, the clients switch cameras too so that the view groups are all offset from the proper camera. You can define multiple view groups in ViewGroups.xml. The currently selected viewgroup will be re-activated when running p3d again. One thing to note is that the view group offsets are applied relative to the current camera. This is why view groups still function even when switching between different view types like the vc and locked spot. As long as each aircraft scenario is loading to an aircraft relative camera, the different eye points should be respected.

There isn't a way to specify which view group to use from the commandline, but the currently active group is saved in the Prepar3D.cfg, so you could change it there. I think if your startup scenario uses the proper aircraft and camera on all machines, you wouldn't need different view groups, but i might be misunderstanding your use case.
Beau Hollis
Prepar3D Software Architect
MHargrove
Posts: 251
Joined: Sun Dec 18, 2011 9:08 pm

Re: Specifying a ViewGroup Definition When Launching P3D?

Post by MHargrove »

Thanks for the response, Beau!

I need to give multi-channel another look. The issue I had with the first first time I tried to use MC is that I couldn't find a way to keep my client PCs views from panning with the server PC. My server runs "panels", but since nobody supplies 2D panels these days, what that really means is that I have a VC cockpit view that's zoomed in to just show the "six pack" (or whatever the equivalent is in a glass cockpit). I use the hat switch to pan around the cockpit. In my first attempts to use MC, the external views ALSO were panning and I couldn't find a way to make that stop. Is there a way to lock the client cameras so they don't move?

What I've done as a workaround for the ViewGroups.xml thing is slightly kludgey, but it works. I have a little client-server app that allows me to simultaneously start/stop/restart the P3D process on all of my clients from a control panel on my master PC. It has a mechanism to let me configure multiple different 'launch' variations so I can (for example) invoke a different -fxml: command-line switch depending on what scenario I want to launch on the clients. I added a mechanism to run a command script BEFORE P3D is launched. Each client has a .cmd file that simply copies a template ViewGroups-<some airplane>.xml to ViewGroups.xml. Since that copy operation executes before P3D is launched, it "sees" the ViewGroups.xml that I want.

One quick question that's been bugging me. Each aircraft has a reference datum point defined in the aircraft.cfg file, along with an eyepoint, which is defined as an offset from the datum. Then, in a ViewGroup frustum definition, the OffsetXYZ is measured from the eyepoint -- is that correct?

-M.
Mark Hargrove
Longmont, CO
User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Re: Specifying a ViewGroup Definition When Launching P3D?

Post by Beau Hollis »

On a single machine multi-monitor setup, you could simply exclude them from your view group and use standard cameras.
I'm not sure if there is a way to do that in MC. You putting them in separate groups, but i think activating the second group would probably close the first group's windows. You might be able to switch from the view group view to a standard camera if you have a mouse hooked up to the client. I believe standard cameras and panel windows can still be opened on a client manually even though there isn't a way to do this via a message from the server yet.

As for your other question, it would be the eye-point in that case. (Plus any further offset by the biasXYZ in the camera definition i think). The view group offsets are to the final calculated camera/eye value, so that things like chase cameras can still work.

Also note that updating viewgroup settings in the servers UI while in MC will cause ViewGroups.xml to be updated on the clients at runtime, so you may want to back those up.
Beau Hollis
Prepar3D Software Architect
MHargrove
Posts: 251
Joined: Sun Dec 18, 2011 9:08 pm

Re: Specifying a ViewGroup Definition When Launching P3D?

Post by MHargrove »

I probably expressed my main question poorly.

In a multi-client, multi-channel configuration, is there a way to uncouple the client views from the 'master' PC view, so that you can pan around in the cockpit without the external views panning? That's was my primary issue when I looked at MC the first time 'round when it first came out.

-M.
Mark Hargrove
Longmont, CO
User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Re: Specifying a ViewGroup Definition When Launching P3D?

Post by Beau Hollis »

All views in a view group move together regardless of what machine they are on. If you don't include your client displays in your view group, they won't move with it. They also won't respond to changing views on the server, but loading a scenario on the server should open it on the clients too, so you might be able to work something out. I believe the sim object position will still be updated.
Beau Hollis
Prepar3D Software Architect
Locked