Semi-transparent screws

Help and techniques for creating Air Manager Instrument Graphics

Moderators: russ, Ralph

Post Reply
Message
Author
JackZ
Posts: 2267
Joined: Mon Feb 22, 2016 1:02 pm

Semi-transparent screws

#1 Post by JackZ »

Hello to all

Was experimenting with the problem of screws over a changing background and I finally ended up with a quite satisfactory solution: semi-transparent screws.
Capture.PNG
I worked carefully (maybe too much considering the final size) on shadows transparency and depth of the screw itself and its imprint with no backgroundand at all, then saved the image of one screw in the usal png with alpha channel format and added a set of 3 to 4 screws to each gauge individually.
I then displayed each screw with a slight img_rotation() and some random rotation angle (but not much because of the shadows).

Code: Select all

if display_screw then 
	screw1=img_add("screw.png",35,35,40,40)
	img_rotate(screw1,math.random(-35,25))
	screw2=img_add("screw.png",35,425,40,40)
	img_rotate(screw2,math.random(-30,30))
	screw3=img_add("screw.png",425,35,40,40)
	img_rotate(screw3,math.random(-45,35))
	screw4=img_add("screw.png",425,425,40,40)
	img_rotate(screw4,math.random(-15,35))
end
As usual, I also added at the begining of the code a display variable in order to display or not the screws as needed.

Code: Select all

display_screw=true -- set it to false if  not needed
The screws will be that way the exact same color as the background panel filler, and will of course follow the instruments, so a simple filler background will do the trick for V2.1.3 and the gauge will that way still be compatible with 3.x versions, where a "panel filler" background gauge is no longer needed.
Capture2.PNG
Capture3.PNG
Capture4.PNG
Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

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

Re: Semi-transparent screws

#2 Post by russ »

Nice work Jacques. A future 3.0 beta should soon support user defined properties which will allow those without any scripting knowledge to customize the look of instruments right from the settings tab.
Russ Barlow
Air Manager Evangelist

Post Reply