Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: L-3 sight for the stock P-38J (and L and L-late)  (Read 3650 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6044
L-3 sight for the stock P-38J (and L and L-late)
« on: October 23, 2015, 09:35:15 PM »

New Lynn-3 Gun Sight for the Stock P-38J (and L and L-late)



Get it here:

https://www.mediafire.com/download/7gnpmw6ekcww8ad/00_L-3_Gunsight_P-38J.7z


readme file contents:

New L-3 Gun Sight for the Stock P-38J (and L and L-Late)


Features:

- Much more detailed; polygon count increased by a factor of about 7.
- 6-DOF friendly, with polygons extending to the rear parts.
- Correct reflector plate mounting.
- Sight mount 'bar' included, so that the sight does not just 'float' in the air.

-----

The main improvement from stock concerns the reflector plate mounting. The real thing had the reflector plate being given two sets of three notches ground into the bottom sides. The mounting screws passed through these notches, and a pair of angled metal 'clamps' were fastened down thereby so as to hold the reflector securely in place.

The actual angled 'clamps' were narrower along the sides, not fully covering the glass sides. I extended them down farther so as to fully hide the sides, thereby eliminating the need to model the exterior glass notche surfaces. I deemed the polygon count already high enough after modeling the interior notch surfaces (among other things).

The other obvious improvement is the modeling of a recessed collimator lens.

I did not model the power coupler (which attaches to the lamp holder, this last being modeled) nor power cable. They are for the most part mostly hidden from view when the POV is not too far offset laterally.

-----

The canopy glass reflection has been altered, from the original 'reflection' of the interior to my more standardized 'dirt' scheme. If you don't like this, simply delete the two files:

refl.mat
REFL.tga

(NOTE: The REFL.TGA texture contains also the elements for the plexiglass housing for the mirror, as well as the--now redundant--reflector plate face and edge. I might add my distaste for the intermixing of notably different elements having transparency in a single texture. This requires the more onerous balancing of transparency by altering the graphic. Separating such elements into separate graphics permits the simpler expedient of ,erely varying a number or numbers in their .mat files.)

Additionally, as part of this 'dirt' scheme' I reversed the surface normals for the canopy glazing polygons in the file, Body.msh. This was achieved for each vertex by multiplying the three relevant numbers by -1, so as to reverse the signs. This now makes the 'dirt' more visible on surfaces when *facing* the source of illumination, and much less prominent when facing away. This may be fine to leave as is if reverting to the stock 'reflection' texture (refl.mat/.tga); the iluminated surfaces seen in reflection are necessarily brightest when facing the light source, and so such reflection would be strongest when the reflecting glass surface lies in the general direction of the light source.

But if this is not wanted, and instead the usual surface normal orientations are desired, the simple expedient is to delete my Body.msh (if you have another working version), after copying the values for the viewpoint hooks in the section [HookLoc], as will be detailed in the section following this.

The other option is to make the necessary alterations in my supplied Body.msh. The canopy glazing section is easily identified in Body.msh due to the values being separated more widely with TABs instead of the usual spaces. The first four lines (of the 130) are reproduced below:



0   0.301422   -0.0438232   -0   0.958162   -0.286225
-0.462433   -0.354065   -0.0438232   -0.990347   0.13861   -0
-0.447144   -0.243286   -0.0438232   -0.983595   0.180392   -0
-0.424225   -0.143433   -0.0438232   -0.959175   0.282809   -0.00167848

In each line the surface normals are defined by the last three numbers; for line #1:

-0   0.958162   -0.286225

you would make these read:

0   -0.958162   0.286225

That is, each value is multiplied by -1 so as to reverse the sign. (A negative zero is the same as zero.) This can be done in a spreadsheet, by copying the 130 lines, multiplying all values in columns 4, 5 and 6 by -1, and then pasting all back into Body.msh.

-----

The in-cockpit viewpoints are set in the view hooks sections of Body.msh shown here:

[Hooks]
CAMERA <BASE>
CAMERAAIM <BASE>

[HookLoc]
//0 0 -1 -1 0 0 0 1 0 -1E-05   0.15401   0.50248   L U B
//0 0 -1 -1 0 0 0 1 0 -1E-05   0.13393   0.28413

0 0 -1 -1 0 0 0 1 0   0   0.169   0.402  //F10 U1.5
0 0 -1 -1 0 0 0 1 0   0   0.164   0.234  //U3 F5

IMPORTANT! Newer game versions may have additional viewpoint hooks (I'm an old dinosaur using 4.08.). If this is the case, and you don't have an extracted Body.msh from your game version, you should try to obtain the view hook data to be included. I welcome any input from current game version users on the matter in this thread.

CAMERA sets the 'normal sitting' viewpoint; CAMERAAIM sets the 'gun sight' view as toggled by the default SHF-F1 keys. In [HookLoc], the first line defines CAMERA, the second line CAMERAAIM. Here I've retained the original data, but 'REM'ed out' those two lines with the characters "//"; the lines to be read by the game follow. not preceded with "//" characters.

The characters "L U B" which I've added as a reminder indicate that increasing the last three values of each line move the viewpoint left, up and back, in meters, respectively. (The first nine values define the transformation matrix.) These values here suit my tastes for my head tracker setup. You likely might wish to alter them to suit your own situation.

-----

Hier.him has necessarily been altered so as to properly locate the sight, reticle and reticle mask. If you have another mod for the stock P-38J having its own version of hier.him, you should transfer my data for:

[Z_Z_RETICLE]
[Z_Z_MASK]
[Pricel_D0]

to the other mod's hier.him, then disable/delete mine. In any event, that version of hier.him (or any other file appearing in duplicate) which is read first is the one used by the game. You need not delete mine if the other is read first, by appearing earlier in an alphabeticially arranged file folder listing.

-----

Curiously, the game represents the sight mount 'bar' as seen from the outside as a later variant, while internally the armored glass frame supports a horizontal bar as present for an earlier mounting scheme. The later mount bolted directly to the glass, which necessarily could not be done with a bar present. This bar helped to support the earlier mount I represent here, although I do not include the side 'braces' whose U-shaped gaps fit over the bar so as to provide--I presume--additional constraint on unwanted mount movement.

-----

In some versions at least, the L-3 sight offered a means of adjusting the reticle in the vertical plane, presumably to facilitate aiming for various ordnance such as bombs and rockets. I've seen photos of a knob located on the forward block through which the mounting screws/bolts pass, mostly on the left side, and sometimes on the top. I contemplated adding such a knob on the side, but decided to dispense with it due to its typically being mostly masked by the sight body as seen from typical viewpoints. And it keeps the polygon count down.

For reasons of typical invisibility due to sight body masking, I also left out the dial which indicates the number of mils of reticle adjustment.

-----

I include a variety of reticle patterns to choose from, having no clear idea of the pattern actually used. The stock reticle (in 4.07) was of the N-9 pattern, this being a broken circle with central dot. As incorporated, the projected diameter appears to possibly have been about 86 mils--an odd size, based on a quick calculation (I've not used it for years, and so have not actually measured the on-screen size.)

I gather that one reticle pattern which was likely used at times in the P-38's sight was a 50 mil diameter circle with a so-called ground attack ladder having short arcs stepped down from the center in 5 mil intervals. This is the default I supply. It is also included in the dedicated "-reticles" sub-folder, and named suggestively.

If you wish to use another reticle, copy it to the "P-38J" parent folder, then rename it to "reticle.tga". It's OK to over-write the one already there; the two "-reticles" folders contain ALL reticles as a kind of archive.

All reticles of diamter 50 and 70 mils are interchangeable as far as "Z_Z_RETICLE.msh" is concerned; they are already dimensioned to a common standard, and are grouped in the folder, "-reticles_50-and-70mils". Also included there is the matching file, "Z_Z_Reticle.msh." The 100 mil reticle had to be scaled differently, and so in "Z_Z_RETICLE.msh" the reticle must be dimensioned accordingly. This version of the .tga is found in the folder, "-reticles_100mils", with tha appropriate "Z_Z_Reticle.msh." As done for the reticle.tga, copy to the "P-38J" parent folder the appropriate mesh, renaming it to "Z_Z_RETICLE.msh". And again, it's OK to over-write the existing version.

Suppose that instead of a 100 mil diameter reticle, one of 110 mils (1.1 times larger) was actually employed. Copy overthe .tga and .msh for the 100 mil reticle. Then, in "Z_Z_RETICLE.msh" you need only multiply the dimension of 0.47366 by 1.1, to get 0.521, changing all eight instances thusly.

While it's all still fairly un-clear to me, I gather that USAAF reticles were usually of 50 mils diameter early on, with possibly a trend toward increasing to 70 mils and then about 100 mils as the war progressed. I leave it to you to choose the one you prefer.

The included reticle patterns:
- plain circle with dot; 50, 70 and 100 mils diameter
- broken circle with dot; 50 and 70 mils diameter
- plain circle with ground ladder; 50 mils diameter
- broken circle with ground ladder; 50 mils diameter

Note that I have eschewed the practice of building reticles from two layers, one sharp and the other blurred. I use a single layer, already colorized, and kept fairly 'sharp.' There is no good reason optically for a reticle produced by any half decent collimator to have any discernible 'glow' extending beyond the actual demarcation separating light from dark. Yes, a *quite* bright reticle can lead to some degree of retinal 'saturation', manifesting as a slight widening of those bright lines. But not to the extent suggested by the 'glow layer' approach as commonly implemented. The eye's dynamic range is *very* much larger than that of a camera; photos can much more readily evince the effects of saturation, and so should not be relied upon as an indicator of such diffusion.

In "Reticle.mat" is found the parameter,

  tfMipMap 1   //0

(The comment, "//0" merely indicates the other possible setting.) This controls the way a re-scaled texture is drawn. When set to zero, the texture is re-scaled continuously, which retains a consistent degree of clarity at any scaling--until substantially under-sampled (as for very wide FOVs.) Under-sampling results in a 'shimmery', pixellated, kind of 'broken' appearance.

When set to one, the texture is re-scaled in steps of power two. This eliminates the effects of under-sampling, but has the disadvantage of presenting as blurry when the scaling is other than a neat multiple of two. Particularly so just before a transition occurs.

Due to the small size of a 50 mil reticle, coupled with its being constructed to reasonably high resolution so as to withstand some magnification at smaller FOVs, I've set tfMipMap to 1 so that it not become 'shimmery' at wide FOVs. I encourage you to try setting this to zero (after first observing the current behavior during FOV changes), and see which method you prefer. If you run at very high screen resolution, and/or tend to not much use wider FOVs, under-sampling will be of less concern and so tfMipMap 0 would be a better setting. Or, if you find that at one or more of your preferred FOVs the reticle is blurred, then tfMipMap 0 is probably best, even if the 'shimmery' aspect is seen at the wider FOVs.

If you would rather use another reticle from elsewhere, here's how to scale it correctly. You may use a ruler, or measure pixels in image viewing software.

Jump in the cockpit, get the reticle fully visible, pause the game, then set the FOV to 10 degrees. No matter your screen resolution or aspect ratio, the FOV sets the field width between L and R edge of the display.

Using a ruler, measure the width of the displayed scene, then the width of the reticle.

For U.S. equipment, where the mil is 1/1,000 radian the in-game, angular reticle diameter is

measured reticle diameter / screen width * 174.55.

For example, suppose your displayed scene width is 450mm, and the reticle diameter at a 10 degree FOV is 200mm. The reticle angular diameter is

200 / 450 * 174.55 = 77.58 mils.

If it's supposed to be 70 mils, the scaling factor is 70 / 77.58 = 0.9023. You multiply the current dimension (repeated 8 times) in Z_Z_RETICLE.msh by this ratio.

For example, suppose that in Z_Z_RETICLE.msh the dimension is 0.2771 (this is for the full .tga, not just the smaller reticle it contains.) To reduce the too-large 77.58 mil reticle to 70 mils, multiply all 8 instances of 0.2771 by the ratio 0.9023, to obtain 0.25.

Now, suppose that instead of 77.58 mils the reticle should be 100 mils. The scaling ratio is 100 / 77.58 = 1.289. The values of 0.2771 in Z_Z_RETICLE.msh become 0.2771 * 1.289 = 0.3572.

You can do the same using a screen shot, measuring pixel separations.

When upsizing a reticle in Z_Z_RETICLE.msh, be aware that the reticle graphic must not be larger than the dimension of the 'backing surface' located behind it and as defined in Z_Z_MASK.msh, the first 8 lines from which I supply below:


-1.51   -1.51   -5.06866   0   0   1
1.51   -1.51   -5.06866   0   0   1
1.51   1.51   -5.06866   0   0   1
-1.51   1.51   -5.06866   0   0   1
-0.21   -0.21   4.82   0   -0.7071   0.7071
0.21   -0.21   4.82   0   -0.7071   0.7071
0.21   0.21   5.24   0   -0.7071   0.7071
-0.21   0.21   5.24   0   -0.7071   0.7071

The first 4 lines define the 'backing surface', the 4 corners of which make a square having sides 3.02m long (+/-1.51m from the axial sight line). Your Reticle.tga can approach this dimension before these values would require to be increased themselves. This should never be of concern here, given the current 'over-sizing.'

The following 4 lines define the nearby 'blocking surface' through which the circular hole is punched, located more or less in the plane of the reflector plate, and 0.42m wide/tall (+/-0.21m). If you encounter instances where 6-DOF or other set viewpoints place your POV beyond the edge of this nearby 'blocking surface' such that the reticle becomes incorrectly visible, you should increase the extent of this surface as necessary to keep the reticle hidden. The adjustments need not be symmetrical; you could make all 4 values different in magnitude. On each line, generally the first number sets the L/R dimension and the second number the up/down dimension. Whether the sense of orientation is positive toward the left or right, or up or down, can vary from plane to plane.

Incidentally, on all these lines the third number sets the longitudinal, or fore-aft distance, relative to some datum. the last 3 numbers set the surface normals, which effectively are immaterial for an invisible texture but are required by convention for the graphics engine.

-----

I give permission for the free use of this work, in whole or in part, by any person or entity, without restriction.

WxTech
Oct 23, 2015
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

steven197106

  • Observer
  • member
  • Offline Offline
  • Posts: 1626
Re: L-3 sight for the stock P-38J (and L and L-late)
« Reply #1 on: October 24, 2015, 10:06:41 AM »

WOW! great mod, SAS~Tom2 is going to love you for this ;D
Logged
i7-5820k CPU 3.30gHZ, 16 GB ram, RTX 2080 Graphic card, 49" CHG90 QLED Gaming Monitor, VKB- T-Rudders Mk.III pedals, VPC MongoosT-50 Flightstick with VPC Desk Mount, VPC Extensions Set with a thrustmaster warthog grip on the stick, saitek TPM System, thrustmaster warthog throttle,

SAS~Tom2

  • SAS Honourable Member
  • member
  • Offline Offline
  • Posts: 7954
  • no sweat
Re: L-3 sight for the stock P-38J (and L and L-late)
« Reply #2 on: October 24, 2015, 02:26:02 PM »

 :)
 
I only need to find a way to integrate it into a 3D mod by Jero and my custom pit. :D
Today a bit stressed, will try if I can get to it or pm WxTech with the latest update, maybe it can be merged.
The only issue I see is that Jero made a re meshed gunsight for his new work, but I assume a solution may be mixxing the new 3D and texture parts with what we have.  ;)
Will get to it later..

Cheers

T.
Logged

SAS~Tom2

  • SAS Honourable Member
  • member
  • Offline Offline
  • Posts: 7954
  • no sweat
Re: L-3 sight for the stock P-38J (and L and L-late)
« Reply #3 on: February 22, 2016, 01:14:50 PM »

WOW! great mod, SAS~Tom2 is going to love you for this ;D

After recently having exchanged some pms with WxTech, I am rather convinced the author is a genious and the modelling parameters and instructions outlined in a.o. this thread are well beyond my linguistic (and logical) horizon.
In other words, I find these mods impressive and understand ca. 40% of the given instructions.
Not since they are bad but since they border on science.
What I find impressive is the amazing amount of dedication to detail.
Compared to this, my mods of reflections are rather the jackhammer method. :P
But who compares, it is all about grabbing the best mods for each player's preferences and, optimally, combining those.
I feel tempted to read this thread again...and see how much of this I can inhale to learn about producing better cockpit canopy reflection mods. :-|
Logged

greybeard

  • Modder
  • member
  • Offline Offline
  • Posts: 1931
  • diligo veritatem
    • Old stuff about RB3D and a tiny "IL2 corner"
Re: L-3 sight for the stock P-38J (and L and L-late)
« Reply #4 on: March 05, 2020, 12:17:36 PM »

Fixed reticle position, which was lower than where bullets land. Raised gunsight by 5 cm, inspired by following drawing:



I was unable to raise as well the support horizontal bar, though.

Download link

Cheers,
GB
Logged
CPU: AMD Athlon 64 - RAM: 2GB DDR @ 201 MHz - MoBo: ASUSTeK Computer INC. A8N-SLI (Socket 939) - Vidcard: 1024MB NVIDIA GeForce 9400 GT (Club3D) - Screen: L1750SQ (1280x1024@75Hz) - Audio: Realtek AC'97 Audio.
Pages: [1]   Go Up
 

Page created in 0.046 seconds with 27 queries.