Special Aircraft Service

Please login or register.

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

Author Topic: Stearman (as from BAT 4.2.1) compass fix  (Read 2641 times)

0 Members and 1 Guest are viewing this topic.

Strawkalling

  • member
  • Offline Offline
  • Posts: 103
Re: Stearman (as from BAT 4.2.1) compass fix
« Reply #24 on: December 30, 2022, 03:08:14 PM »

WxTech,

I presume the Stearman in BAT 4.2.1 is the Ultimate Stearman from here:

https://www.sas1946.com/main/index.php/topic,64904.msg735060.html#msg735060

Could this be added to your BAT 4.0 for testing?

Strawkalling
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5929
Re: Stearman (as from BAT 4.2.1) compass fix
« Reply #25 on: December 30, 2022, 03:13:42 PM »

That older compass has the scale doubled, for 720 degrees around the scale. Hence the code being set to have it do two turns for one turn of the plane.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5929
Re: Stearman (as from BAT 4.2.1) compass fix
« Reply #26 on: December 30, 2022, 03:57:44 PM »

OK, I've now got this plane in my game!


As I just knew it, here's the old compass code 'REM'ed out' with "//" characters, followed by the new code:

Code: [Select]
//        super.mesh.chunkSetAngles("zMagnetic1", 0.0F, -0.5F * setNew.azimuth.getDeg(f), 0.0F);
//        super.mesh.chunkSetAngles("zMagnetic2", 0.0F, -0.5F * setNew.azimuth.getDeg(f), 0.0F);
        super.mesh.chunkSetAngles("zMagnetic1", 0.0F, setNew.azimuth.getDeg(f), 0.0F);
        super.mesh.chunkSetAngles("zMagnetic2", 0.0F, setNew.azimuth.getDeg(f), 0.0F);

Because the old compass card was printed in reverse, the setNew.azimuth.getDeg value was made negative, so as to have the card rotate in the correct numerical sense, albeit opposite to reality. And because the scale was doubled up, as in N-E-S-W-N-E-S-W, the value had to be reduced by a factor of two. Hence the need for these two errors requiring that -0.5 factor. Now it's operating at unity, and the compass rotates correctly. That took just a few seconds to fix.

Next up; adding hysteresis (a slowed response), as well a limit to free rotation when exceeding a certain bank or pitch angle.



As to the compass glass showing up through the hull, as well as the edge of the glass appearing outside the window edge, in CompassGlass.mat, make this change:

  tfTestZ 1

In my install I do see both compass glasses from the rear 'pit. I'll be tweaking the texture for that glass, to make it less garish.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5929
Re: Stearman (as from BAT 4.2.1) compass fix
« Reply #27 on: December 30, 2022, 05:28:56 PM »

Updated mod supplied in the top post. It fully replaces the earlier one, having also a different name. Delete the old one!

Compass now working as I intend, and the cover glass is behaving.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

mechanic

  • member
  • Offline Offline
  • Posts: 140
Re: Stearman (as from BAT 4.2.1) compass fix
« Reply #28 on: December 30, 2022, 06:02:26 PM »

WxTech,

I installed your new compass fix in the stipulated hierarchy in both #WAW3 and #TGA3 wherein the Stearman resides. The compass on all headings, in each cockpit works beautifully in the Stearman bundled with BAT 4.2.2 Hotfix3.  Thanks for your perseverance. 
Logged

Strawkalling

  • member
  • Offline Offline
  • Posts: 103
Re: Stearman (as from BAT 4.2.1) compass fix
« Reply #29 on: December 31, 2022, 07:15:27 AM »

WxTech,

I just tried out your new compass in the Stearman and it works perfectly. Thank you for going above and beyond for what was less than a simple fix!

Strawkalling
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5929
Re: Stearman (as from BAT 4.2.1) compass fix
« Reply #30 on: December 31, 2022, 11:43:03 AM »

This plane's cockpit is nicely rendered, and deserves to have such oddities addressed.

How on Earth that compass card got created to have its scale doubled is a bit of a mystery. From the early days compass scales have typically been separated into two 180 segments, due to the small 256 pixel texture sizes then used. The texture used here was also an old 256 pixel job, but the full 360 degrees was put onto one scale, with clear evidence of the old second scale having been removed.

There is one remaining element which bothers me. The interior of the compass is a box surrounding the card. It's made from the same texture that's applied to much of the cockpit interior, which necessarily has a certain amount of specularity, not to mention a response to illumination. Here's the problem. When you fly toward a low Sun, you'll see the floor of this interior box become somewhat brightly visible when the lighting angle is optimum for specular reflectance. As though the Sun can illuminate the interior. Having some interior illumination when the Sun is more or less behind you and thus shining in through the window wouldn't be so bad (although this is too subtle to see, typically), having the opposite occur is just awful. (This is a perennial problem in so many cockpits, and for a wide variety of structures which normally could not be so illuminated--another topic I could go on about.  ;)  )

Where easily done, I replace the texture for such interior instrument boxes or backing surfaces with one of pure black and having no specularity nor response to illumination. In this way the innards remain nicely dark urges der ALL illumination angles.

But here this box has its vertices scattered about in the sizeable mesh. Excising these scattered vertices in order to group them for a dedicated treatment with another material is a bit of a labor when using a spreadsheet. The other, remaining vertices that collapse together require lots of renumbering in the faces making up the triangular polygons.

Anyhoo, at least the critical issues have been addressed.

By the way. When I activate the landing lights the game freezes, much of the cockpit structure disappears, and the sky turns black; lights off and all is normal. Another high-poly cockpit I installed for the Ar-196 has the same thing happen in a stuttering fashion when firing guns. Clearly there is some issue afoot when a local illumination source (landing lights, muzzle flash) is active. Could be some quirk in my HEAVILY modded game. Anyone else suffer this?
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Strawkalling

  • member
  • Offline Offline
  • Posts: 103
Re: Stearman (as from BAT 4.2.1) compass fix
« Reply #31 on: December 31, 2022, 02:29:53 PM »

In my setup (BAT 4.2.1 Hotfix 3) there is no landing light in the Stearman. I'm pretty sure that was the case previously, too. The nav lights and cockpit light are functional. There are some issues with a change in the illumination effect on the exterior of the aircraft when these are turned on, even in bright sunlight, but otherwise all is okay.

Strawkalling
Logged

Strawkalling

  • member
  • Offline Offline
  • Posts: 103
Re: Stearman (as from BAT 4.2.1) compass fix
« Reply #32 on: December 31, 2022, 02:40:06 PM »

Regarding the cockpit, yes, it is nicely rendered, but there are issues. The front and back cockpits should have the same sets of instruments, and the layout is not quite what it should be for a Stearman. What we're getting in BAT is probably cockpits based on a post-war civilian conversion. This photo shows what the 1930s/'40s cockpit layout was more like:

https://resources.globalair.com/specs/images/Vintage/Boeing%20Aerospace/Stearman/R-985/Panel/Stearman%20A-75%20Panel.jpg

Maybe a project for someone to tackle in the future  .....


Strawkalling
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5929
Re: Stearman (as from BAT 4.2.1) compass fix
« Reply #33 on: December 31, 2022, 04:21:44 PM »

I wrote landing light, but meant nav lights!

That photo shows the 'beauty cover' for the panel, hinged at the bottom. Our cockpit shows the bare panel underneath, which is completely flat but has had some peripheral surface normals re-oriented so as to suggest the edge bending of the beauty cover.

Our compass face is made a bit too large, explaining in part wjy I needed to increase the size of the card. The instrument is created in a far more complex way than is typically done. The common treatment is simply a single texture having 4 vertices. If this one were treated similarly I would have definitely made it of the correct size. But again, my being limited to a spreadsheet involves a goodly amount of time to re-work 3D models comprised of many vertices.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: 1 2 [3]   Go Up
 

Page created in 0.028 seconds with 25 queries.