Jump to content
Sign in to follow this  
Wrench

The Double Cockpit Issue

Recommended Posts

Okay folks, this 'double cockpit' issue keeps coming up, so here's some info to help you solve your own problems.

 

For folks who are having problems with cockpits not being in the proper position, the default is to match the entry in the data.ini:

 

[Pilot]

SystemType=PILOT_COCKPIT

PilotModelName=WW2Pilot

Position=0.00,2.86,0.97

 

with the position in the cockpit.ini:

 

[CockpitSeat001]

ModelName=Meteor_Pit

Offset=0.0,0.0,0.0

Position=0.00,2.86,0.97

 

That should in theory make your eye point from the cockpit match what the eyepoint of the pilot model, which of course should allow you to see what the pilot sees.

 

However, TK has reduced the NearClipDistance parameter in the FLIGHTENGINE.INI in the latest patch, causing some odd issues with external aircraft parts showing that shouldn't.

 

Lets talk a little about how all these parameters relate to each other.

 

All Component entries in an aircraft's data.ini have this parameter:

 

ShowFromCockpit=TRUE

 

This is exactly what it sounds like...the mesh name and any SystemName in the Component entry will be visible from the cockpit view.

 

In the FLIGHTENGINE.INI file there will be a parameter called NearClipDistance. This parameter is in meters, and tells the that within the cockpit view, anything with the distance is not to be drawn except for the cockpit LOD. Also, under normal conditions, the cockpit LOD will overdraw everything in the cockpit view (aircraft, weapon and pilot LODs).

 

One more parameter that is sometimes relevant is the OpenCockpit parameter located in the cockpit.ini file. If this is set to TRUE, the NearClipDistance parameter will NOT be applied to that aircraft and the cockpit LOD will no longer overdraw everything. Anything with ShowFromCockpit=TRUE in the data.ini will be drawn and visible from the cockpit...even stuff that could be inside the cockpit. I use this to advantage in the F-111s, allowing you to have a WSO sitting next to you.

 

However, all the models I have built have anticipated such a development.

 

Note in the this OUT file:

 

 

- WindscreenFrame [264 polys, 792 verts (decal)] '07 - Default'

-- WindscreenGlass [32 polys, 96 verts (decal)] '19 - Default'

- CanopyFrame [679 polys, 2037 verts (decal)] '07 - Default', AnimationID: 4

-- CanopyGlass [318 polys, 954 verts (decal)] '19 - Default'

- Cockpit [152 polys, 456 verts (decal)] '07 - Default'

-- GunSight [12 polys, 36 verts (decal)] '19 - Default'

 

Note that the WindscreenFrame, CanopyFrame, and Cockpit are separate meshes, all the meshes normally closest to the pilot...and the ones that usually cause the visual issues.

 

So, for this aircraft, I've put the following in the data.ini:

 

Component[009]=HidePart1

 

then

 

[HidePart1]

ModelNodeName=Cockpit

ParentComponentName=Fuselage

ShowFromCockpit=FALSE

DamageRating=DESTROYED

HasAeroCoefficients=FALSE

SystemName[001]=Pilot

 

 

Note what happens...basically I've told the sim that in cockpit view, I don't want to see the Cockpit mesh (plus any submeshes) in the external model. You can do this for every mesh that you don't want to see from the cockpit view. This is the preferred method I use, to preserve the actual view from the cockpit as much as possible while avoiding clipping problems.

 

Give that a shot for any model that you are having issues with. You may have to do some searching in the model's OUT file to determine what to hide.

 

One additional note. If your aircraft CGPosition parameter (located in the data.ini) is anything other than 0,0,0, the method I described above will not quite work. The cockpit position will be offset by the numbers in the CGPosition parameter.

 

The way to prevent this from happening is inserting this line into the data.ini just below the CGPostion parameter (located in the [AircraftData] section):

 

CockpitCGOffset=TRUE

 

What this does is remove the offset CGPosition and the position you set the cockpit at will be its true position reference the LOD model's zero point.

 

In simple terms, if you always set this parameter as TRUE, the cockpit will always be put at the position you set in the cockpit.ini file. I find having this line in all my models doesn't affect anything for aircraft whose CGPosition is 0,0,0 , while fixing those aircraft who's CGPosition is something other than that.

 

FC

 

===========

Wrench Note: if the aircraft does NOT have the OUT supplied (which happens a lot of times), you can find the mesh name with any of the may freeware HexEditors available. All you need to know is the approximate mesh name and use the HexEditors search function to "Find" and confirm the name

W

  • Like 4

Share this post


Link to post
Share on other sites

Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and 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..