Loading [MathJax]/extensions/Safe.js

Special Aircraft Service

Please login or register.

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

Author Topic: Adding missing night textures to instruments?  (Read 2069 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6213
Adding missing night textures to instruments?
« on: May 10, 2016, 10:56:52 AM »

So, my 4.08 SBDs have no green glowing night texture for the artificial horizon's static part and the rotating vertical indicator. (Only the horizon bar has the green texture.) I made up a new GagePanel5_night.mat/.tga file pair, and added this texturing in the Panel_D0.msh plus the two panel damage meshes, and Z_TurnBank3.msh.

But now the green texture is *on all the time*. I guess each gauge must specifically have the toggling on/off control functionality defined in a class file, which I have no facility to undertake.

Can anyone confirm if indeed this behavior must be coded in a class file? If so, that's too bad. It would have been so handy for this to be treated in the same manner as the *_tree.tga files for maps, where no such coding is required for any new texture one might make up.

By the way, is this green night texturing for the SBD's artificial horizon still absent in the latest versions?
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9602
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Adding missing night textures to instruments?
« Reply #1 on: May 10, 2016, 11:36:21 AM »

I made up a new GagePanel5.mat/.tga file, and added this texturing in the Panel_D0.msh plus the two panel damage meshes, and Z_TurnBank3.msh.
You need add Materials : GagePanel5_night.mat with GagePanel5_night.tga

The same defect exists in 4131!  ;)   8)
Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6213
Re: Adding missing night textures to instruments?
« Reply #2 on: May 10, 2016, 05:30:29 PM »

Ah, I made a typo in my first post! It *was* the *_night.mat/.tga materials I did make up. But the new texture elements do not toggle on/off with the others already present for the other gauges. They stay lit up green *all* the time. Which is why I wondered if Java coding in a class file was also required....

So, we have here another 'graphical glitch' that's still propagating down the years since day one, and which really should have been fixed aeons ago. But no, we want yet another Spitfire or 109  mark to add to the already crowded stable. ;)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

western0221

  • Modder
  • member
  • Offline Offline
  • Posts: 6790
  • Live in Japan
    • IL-2 itaki blog
Re: Adding missing night textures to instruments?
« Reply #3 on: May 10, 2016, 05:45:05 PM »

Toggling night materials is implemented in each aircrafts' cockpit classfiles.

About SBD-3, its code is written in CockpitSBD3.class , public CockpitSBD3() method.
Here is 4.12.2m's CockpitSBD3() method.....
Code: [Select]
    public CockpitSBD3()
    {
        super("3DO/Cockpit/SBD-3/hier.him", "bf109");
        setOld = new Variables();
        setNew = new Variables();
        w = new Vector3f();
        pictAiler = 0.0F;
        pictElev = 0.0F;
        enteringAim = false;
        bEntered = false;
        cockpitNightMats = (new String[] {
            "GagePanel1", "GagePanel1_D1", "GagePanel2", "GagePanel2_D1", "GagePanel3", "GagePanel3_D1", "GagePanel4", "GagePanel4_D1", "misc2"
        });
        setNightMats(false);
        interpPut(new Interpolater(), null, Time.current(), null);
        if(acoustics != null)
            acoustics.globFX = new ReverbFXRoom(0.45F);
    }

The string array of "cockpitNightMats" is the list of "having night material" daytime material names.
When you want to add a new night materials "GagePanel5_night.mat" and "GagePanel5_D1_night.mat" , you have to change this line into here.

        cockpitNightMats = (new String[] {
            "GagePanel1", "GagePanel1_D1", "GagePanel2", "GagePanel2_D1", "GagePanel3", "GagePanel3_D1", "GagePanel4", "GagePanel4_D1", "GagePanel5", "GagePanel5_D1", "misc2"
        });

Without this java code changing, new night materials are never applied.
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6213
Re: Adding missing night textures to instruments?
« Reply #4 on: May 11, 2016, 12:14:09 AM »

Thanks; that's what I suspected.

Until I graduate to this level, such alterations will have to wait...

I wonder why such an obvious oversight was permitted in the first place. I mean, the artificial horizon being overlooked, of all things.
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: 6213
Re: Adding missing night textures to instruments?
« Reply #5 on: December 07, 2016, 11:48:29 PM »

I should add an update, of sorts.

Without being able to do the Java coding, my interim solution is to use an existing *_night.mat file. If space permits and no chance of including other bits results, I squeeze in the part that I want to include. If space is not available, I enlarge the graphic by adding more 'real' estate along one or two sides.

For the existing elements, naturally the mesh files must have the material mapping adjusted because of the new locations and scaling of the elements. But this is a simple mathematical operation, where an offset and scaling factor are applied in a simple formula to all UVs in a spreadsheet. Dead easy!

Now I can add all the missing night texture elements to my heart's content, without having to delve into Java coding. (But oh, how I'd love to get into Java! Probably my first order of business would be the tackling of tracer and smoke trail generation rates for some guns.)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1]   Go Up
 

Page created in 0.057 seconds with 20 queries.