A Quick method to remove the Background of existing instruments

Help and techniques for creating Air Manager Instrument Graphics

Moderators: russ, Ralph

Message
Author
JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

A Quick method to remove the Background of existing instruments

#1 Post by JackZ »

Here' s a quick method to remove the Background color (screws, etc...) of an existing instrument using SKINMAN.

In other terms starting from this:
Capture00000.PNG
How to end end up with this:
Capture0000.PNG
Here's the method I used. You NEED to have SkinMan installed:
STEP 1: In AIR MANAGER , in The CREATE/EDIT tab
Select the instrument you want.

Caution! it is advised to make a CLONE of your original instrument first!
Working on a clone version of the original ensures you that your instrument won't be modified by a subsequent Internet update...

Then click on the Folder button and navigate to the Resources Folder
Capture00.PNG
Remember the location and name of the Background file to be modified, then launch SkinMan (You can use the supplied file below to save time.:
Capture01.PNG
Remove_Bezel_example.zip
(9.32 KiB) Downloaded 397 times
Last edited by JackZ on Mon Mar 06, 2017 3:34 pm, edited 1 time in total.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: A Quick method to remove the Background of existing instruments

#2 Post by JackZ »

continued:

In Skinman verify that the Ellipse shape is in the Normal Mode AND that its transparency (Master Alpha) is set to 50% (it's already made for you in the file)
Capture2.PNG
Import your background image to be modified from the resource folder of your cloned instrument and place it at the correct place and size if needed.
Then in the Tree window, place the ellipse shape under the image item (The ellipse should be placed upfront with a transparency of 50%)
Capture3.PNG
Resize the Ellipse to cover only the parts of the instrument you want to be "saved"
VERY IMPORTANT in the Tree windows make sure that the ellipse and the image are linked as shown, the ellipse should the "child" of your background image.
Capture4.PNG
Now here's the power of SKINMAN: Boolean operations! Since both graphical elements are linked,select the Ellipse in the Tree View, then choose Shape*(star) mode: It's magic!
Capture5.PNG
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: A Quick method to remove the Background of existing instruments

#3 Post by JackZ »

Final Steps:

Select your image item in the Tree view,
The add some Dropped Shadow a Density of 50 to 60 is fine.

Adjust the sense of depth of the Bezel using the Offset parameter.
Remember: unless in very rare cases, the lighting conventionally comes from the top and from the left, so the direction should be left at -45 to create realistic shadows!
Capture6.PNG
You are finished. Export your new Background image to the instrument Resources folder, (The clone!) replacing the existing image. IMPORTANT!: Make sure that your file is saved under the PNG format with alpha channel
IMPORTANT: Use exactly the same name as the original version of the Background image, or else, you will be forced to modifiy the Logic.lua code!
Capture7.PNG
Last edited by JackZ on Tue Jul 06, 2021 9:15 am, edited 3 times in total.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: A Quick method to remove the Background of existing instruments

#4 Post by JackZ »

Run the new instrument in Air Manager.

Congratulations, the background has been removed, and you even have dropping shadows to give the sense of depth 8-) !
Capture0000.PNG
Jacques (JackZ)
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: A Quick method to remove the Background of existing instruments

#5 Post by JackZ »

A final Note:
You can also "save" the screws with your background image if needed:

Just repeat the Bolean operation for each screw, by copying the image primitive and adding each time a small ellipse mask of the size of one screw to "save" only the screw of the entire background.

Notice that the shadow offset for the screw is less (3 to 5) than for the bezel itself(8 to 10) since the depth is lesser.

Jacques
Capture8.PNG
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

docjl
Posts: 129
Joined: Tue Mar 01, 2016 4:24 pm
Location: Besançon

Re: A Quick method to remove the Background of existing instruments

#6 Post by docjl »

Well done Jacques. It's exactly the technic I've used to make some holes in my ovh panel to let korrys brights when I modify the intensity of lighting.
It's someone of this forum who gave me this trick of "shape*"
Jean-Luc

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: A Quick method to remove the Background of existing instruments

#7 Post by JackZ »

Tout à fait Jean-Luc, merci!
Le problème des instruments avec des textures/couleur de fond pas adaptées est récurrent, je suis content d'avoir trouvé cette astuce!

The problem of existing gauges with inadequate background color/texture is a recurring problem one can encounter when trying to setup a panel with gauges coming from different sources, I'm glad to have found a relatively easy way to solve it.


Jacques
PS: Ca avance tes panels ATR?
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

docjl
Posts: 129
Joined: Tue Mar 01, 2016 4:24 pm
Location: Besançon

Re: A Quick method to remove the Background of existing instruments

#8 Post by docjl »

JackZ wrote: Mon Mar 06, 2017 10:12 pm PS: Ca avance tes panels ATR?
Oui et non... Il est terminé, mais je ne trouve pas le temps de réaliser les tests et recherches de bugs.
La gestation est longue ! :D
Jean-Luc

User avatar
russ
Posts: 593
Joined: Tue Oct 27, 2015 5:37 pm

Re: A Quick method to remove the Background of existing instruments

#9 Post by russ »

Great Jack....very well explained ! It really will make gauges "portable" and especially with AM 3.0 where a panel can have a background graphic. This can create a realistic look for the panel to "drop" these no-background instruments on.
Russ Barlow
Air Manager Evangelist

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: A Quick method to remove the Background of existing instruments

#10 Post by JackZ »

Thanks Russ, really appreciated!

Now, I guess that one (or many) volunteer(s) has to take the plundge and start "cleaning" the existing instruments to make them "background ready" for the forthcoming Version 3.0 8-) .

I also figured that with a simple variable in the code, one could create a parametric gauge, in order to choose (or not) to display the existing background. This is very handy for say cokpit Builders that doesn't wnat the bezel or background to be displayed.

You just have to put at the very begining of the code something like thae following, that's what I do in all of the instruments I develop (showing or not the Bezel, the screws, the background):

Code: Select all

-----------------------------------------------------
--    CUSTOMIZATION VARIABLE SECTION
-----------------------------------------------------
AM_Display_background=true -- Give this variable the value true if you want a background
------------------------------------------------------
-- END of CUSTOMIZATION SECTION
-- !!!DO NOT MODIFY BEYOND THIS POINT!!!
-------------------------------------------------------
if AM_Display_background then 
	img_add_fullscreen("ADFback2.png")
end

The neat thing IMHO would be to add some additional parameters (check buttons) in the instrument "Panels" Tab in AM, that would set a bunch of additional internal property variables such as AM_DISP_BCKGD,AM_DISP_SCREWS, AM_DISP_BEZEL, thus allowing the developer to determine if it is needed to display or not the background, screws, etc... by querying the instrument property via instrument_prop(property), without having the final user to dig into the code at all....

Jacques
Last edited by JackZ on Tue Mar 07, 2017 4:49 pm, edited 2 times in total.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

Post Reply