Shoulder Patches will not Display

  • 10 Replies
  • 448 Views
Shoulder Patches will not Display
« on: January 19, 2018, 05:49:48 AM »
Well this time it was a little bit trickier.  You not only changed the name of the ".pbo" file, you changed the filenames of the insignia textures.

Units:
   1id_co.pa       to   1infantry_div_ca.paa
   1acav_co.paa      to    1cavalry_div_ca.paa

Placed the corrected command in the units' init box:

   this setObjectTexture [0, "\uns_patches\data\color\1cavalry_div_ca.paa"];

Tried this with three insignias utilizing two units, one with tiger stripe fatigues & the other with od green on the Da Krong & Rung Sat maps.

This time I was rewarded by not generating any error, but it still would not display the insignia on either units left shoulder.
What I mean by rewarded is that when I tried it with my custom insignia, I did not get the error message "file not found".  It just would not display the shoulder patch.

description.ext

Code: [Select]
class CfgUnitInsignia

{

class 1cavalry

{
displayName = "1st Infantry Division"; // Name displayed in Arsenal
author= "UNSUNG"; // Author displayed in Arsenal
texture = "\uns_patches\data\color\1cavalry_div_ca.paa"; // Image path
textureVehicle = ""; // Does nothing currently, reserved for future use
};

class unitname

{
displayName = "Unit Name Patch"; // Name displayed in Arsenal
author= "OleGreyGhost"; // Author displayed in Arsenal
texture = "\insig\unitname.paa"; // Image path - image size = 128x128
textureVehicle = ""; //  Reserved for future use
};

class 1aviation

{
displayName = "1st Aviation Brigade"; // Name displayed in Arsenal
author= "UNSUNG"; // Author displayed in Arsenal
texture = "\uns_patches\data\color\1aviation_bde_ca.paa"; // Image path
textureVehicle = ""; // Does nothing currently, reserved for future use
};

};

Placing the command -  [this,"unitname"] call BIS_fnc_setUnitInsignia;  - in the units' init box produced the same result.
There wasn't any error generated, but again it did not display the shoulder patch.

I did observe  these descriptions listed in the display name " [UNS] & (Sub), but when I used them as part of the filename an error was generated.  What are they for??

By any chance could this be related to the heli art not displaying??

Hope this helps in resolving the issue......

P.S.
Running Arma3 with an I7 6700k ( no O/C ) plugged into a GigaByte Z170x mobo with 16gig of GSkill ram pushing a 2TB hd into a GigaByte 1070 video card which lights up a 2230 Viewsonic 1080 p monitor at a steady 90 to 100 fps with all settings at very high.
Arma3  v 1.80    fully updated with all DLC.
Mods are:
   Community Base Addons  v 3.5      3den Enhanced      Unsung 3.2 Echo   Pook Camonets  v 6.0      Pook AM Pak


*

TeTeT

  • ****
  • 66
    • Unsung homepage
Re: Shoulder Patches will not Display
« Reply #1 on: January 19, 2018, 12:50:35 PM »
Thanks for the detailed bug report! I will open a task in our internal bug tracker on the shoulder patches.

I briefly checked setting the camo of the SOG one-zero to the patch and that worked, e.g. the uniform was the patch. So the path to the patch is all good. Unfortunately the insignia / shoulder patch was never visible.

You can also check that the shoulder patches / insignia don't work in the arsenal. Select a vanilla uniform and a Unsung shoulder patch, it's visible. Select a Unsung uniform and a Unsung shoulder patch and it's not visible.

Another mystery in need to be resolved...

Re: Shoulder Patches will not Display
« Reply #2 on: January 20, 2018, 06:19:03 AM »
@TeTeT

I checked in the arsenal and it is just like you said.  Unsung/no & vanilla/yes.

Experimented with my custom art but found the import to be useless.  Beyond my capabilities, due to the lack of documentation.

Experimented a little further with my custom art on the Huron with the this setObjectTexture [0, "custom_art.paa"]; command.

What a mess:

http://www.mediafire.com/file/lt7wx469nop16cf/custom_art.jpg

      { You have to hit the view button and then clear the blank page to see the screenshot. }

This was at the "[0," position.  The green back half will be filled in with the "[1,"  position of the command.

From what I can gather, if it wasn't included with the model, users will not be able to add any custom art.

Correct me, if I am wrong.

I also tried that command with a NATO Officers uniform & a pilots uniform.

The "[0," position will display the texture on the officers' uniform and the "[1,"  position will display the custom art as a shoulder patch on the left arm.

Finally, some success.

The pilots uniform did not show any change, so I did not think to test with the "[1,"  position.

Will test some more with the BIS_fnc_setUnitInsignia command.

Hope this helps.

Cheers.......

Hope this helps
« Last Edit: January 20, 2018, 07:11:04 AM by OleGreyGhost »

*

TeTeT

  • ****
  • 66
    • Unsung homepage
Re: Shoulder Patches will not Display
« Reply #3 on: January 25, 2018, 01:16:07 PM »
Maybe some background information on what you're trying to do:

Arma 3 models can be partially or fully retextured with setObjectTexture[Global]. For this the model needs to have 'sections' defined in model.cfg which are then exposed via 'hiddenSelections' in config.cpp. These 'hiddenSelections' can then be textured in the 'hiddenSelectionsTextures' field.

With the 'setObjectTexture[Global]' command you walk over the 'hiddenSelections' array in the config, with 0 being the first entry.

A sample hidden selection can be found in the unsung patrol boats:

Code: [Select]
                HiddenSelections[] = {"num1","camo1"};
                HiddenSelectionsTextures[] = {"\uns_pbr\data\code\0.paa","\uns_pbr\data\pbr_co.paa"};

The names in 'HiddenSelections[]' array refer to the sections in model.cfg, which have to be defined as selection in the model as well.
In this case we have 'num1' and 'camo1' selections. The 'HiddenSelectionsTextures[]' array now sets these two hidden selections and 0.paa and pbr_co.paa will be displayed.

For fun and adding some variety we have randomized the skin selection for the PBR in functions\fn_randomSkin.sqf, which is called from config.cpp->init eventhandler. Any of the existing textures for the patrol boat is applied randomly.

BI uses a similar but more complicated system for variety in gear and vehicles, which you can start reading upon here: https://community.bistudio.com/wiki/Vehicle_Customization_(VhC) .

Cheers,
TeTeT
PS: I've looked up and down the uniform config and models and haven't figured out why the insignia is not displayed, even it is defined in model, model.cfg and config.cpp...

Re: Shoulder Patches will not Display
« Reply #4 on: January 26, 2018, 09:32:22 AM »
First, I apologize for cross-posting about texture displays for the uniform patches & vehicle insignias  in this post.
I sort of understand what you are saying, though I have never dealt with the textures at this level.  This sets up your  model & texture display in game.  The hidden selection allows alternate textures to be displayed with the setObjectTexture command.
I am not able to get very much info from your ".pbo" file.  Notepad does not read binarized files very well.

I did some extensive testing with the textures for uniforms & patches on the BIS units.  Not all units will accept the changes.
Using the nato officer as the test bed:
   this setObjectTexture [0, "folder\camo_pattern.paa"];   (first position)
      is now used for displaying the uniform textures.
They are not clear and crisp like the camo texture of the cap.  They appear much larger & splotchier.  (like a camera out of focus).  256x256 displays slightly better than 128x128.
   this setObjectTexture [1, "folder\unit_jnsignia.paa"];   (second position)
      is now used for displaying the shoulder patches.
Using 128x128 size, as per your handbook, the insignia is clear, legible & in the proper proportion to the uniform

Where you mention the PBR having two sections, do you have a template available to allow for seamless integration of the texture to the model.
The Huron uses two sections for texture display.  You can observe a vertical separation just behind the gunners door above the fuel tank.  This stretches over and around to the other side.
Depending on the texture being used, most of them usually do not line up.
Does BIS have any templates for their assets??

What I did observe on the BIS officer units' left shoulder is an area that looks like a pocket.  It is in this area that the patch is displayed.  Your units left shoulder does not display any such area.  The BIS pilot unit will not accept any changes.

Here is a small mission I used to test the units on your CSJ_SEA map.
http://www.mediafire.com/file/1vr4zhioou8159q/Testing_insignias.7z

In it you will see the discrepancy in size & fuzziness from the uniform texture as compared to the hat texture.  Camo texture utilized is not that sloppy.  Enjoy the unit patch.

Thanks for the link, this will keep me busy.  Hoping this will clear things up for me.

Regards.....

P.S.  Thanks for the Chickenhawk mission.  Top Notch.  I am enjoying the replayability....

Re: Shoulder Patches will not Display
« Reply #5 on: January 28, 2018, 10:04:08 AM »
I checked out that Link.  That is a little beyond me at this time, I am just beginning to learn scripting.  But it did help me find some info I needed.

I was able to get the textures to display properly on the BIS uniforms and helos, but cannot get the textures to display on the Unsung uniforms or patches.

But sadly, it turned up another problem.  It seems the hueys will not accept any textures.  The cobras & chinooks displayed them properly as shown below.

http://www.mediafire.com/file/t2s3mk41yajwebm/texture_problems.jpg

Will poke around some more.

Regards......

*

TeTeT

  • ****
  • 66
    • Unsung homepage
Re: Shoulder Patches will not Display
« Reply #6 on: February 06, 2018, 03:51:00 AM »
Hi,

as mentioned in the other thread you need to add a sleep before trying to overwrite the textures.

I don't want to go overboard, but maybe it's a time now for you to use some serious tools for modding arma: https://armaservices.maverick-applications.com/Products/MikerosDosTools/ Start with the free tools and if you get along with them consider subscribing.

When you have installed the Mikero's tools you can double click on a pbo and it will extract it's content in a sub directory named after the pbo. E.g. uns_uh1d_c.pbo will create a irectory uns_uh1d_c and there you find all the config and code and (in other pbos) models in.

For example for the Huey you can then check uns_uh1d_c\scripts\init_UH1D.sqf which is called from the init event handler. Good luck with the journey!

If you need further help feel free to join the Unsung discord for some real time chat: https://discord.gg/BebweQA My nick is TeTeT there.

Re: Shoulder Patches will not Display
« Reply #7 on: February 07, 2018, 06:37:43 AM »
Thanx for the link.  Will definitely try these tools out.

Was getting a little frustrated with the Arma tools.

Regards...

P.S.

Did you get the hornets unit patch???

*

TeTeT

  • ****
  • 66
    • Unsung homepage
Re: Shoulder Patches will not Display
« Reply #8 on: February 07, 2018, 09:09:47 PM »
...
Did you get the hornets unit patch???

No, what is it about? A patch you created?

Re: Shoulder Patches will not Display
« Reply #9 on: February 08, 2018, 07:03:55 AM »
It is the unit patch for the 116th AHC. 

Figured you could add it to the mod at your liesure.


Quote
Here is a small mission I used to test the units on your CSJ_SEA map.

http://www.mediafire.com/file/1vr4zhioou8159q/Testing_insignias.7z

You probably missed the reference due to it being a verbose post.  {# 4 on 1/26 }

Enjoy........

« Last Edit: February 08, 2018, 07:06:13 AM by OleGreyGhost »

Re: Shoulder Patches will not Display
« Reply #10 on: April 25, 2018, 12:25:17 AM »
In the latest update the shoulder patched now appear, however they sit too low on the arm, and clash with the rank stripes.

Many of the patches are also too oversized.

New Zealand patch needs fixing.