Jump to content
Sign in to follow this  
Rydygier

Pictures containing partial transparency & kept same visual dimensions for any res

Recommended Posts

1. I made in GIMP a png picture containing partial transparent elements (eg smooth transitions from full cover to full transparent). This png I changed into paa using TexView2. I put it into mission folder and registered, what was needed in the description.ext. Then I was trying to display this in game using cutRsc or titleRsc. No picture was shown.

When I used for exactly same code and config another paa file, without partial transparency, but only 0% or 100% transparency, it was shown properly. Why is that? Is partial transparency not supported? Or maybe can be done something to show on screen pictures with half-transparent areas? The only way to show any partial transparency, I learned so far is using procedural textures like: text = "#(argb,8,8,3)color(0.01,0.1,0.3,0.25)". But this is not, what I need this time.

2. What resource config (x/y/w/h) will ensure, so displayed element will keep same on-screen dimensions/proportions for any screen resolution? So eg. a picture or settings window displayed in 800x600 will be of same visible size as when displayed in 1920x1080 (not enlarged, not stretched and not extending beyond the screen area for lower resolutions). In other words - at resolution change such picture will behave like sticker glued on the screen - no any visible change as for size/position/proportions.

Simply put - I need, so all users, regardless which screen resolution they are using, will see on the screen exactly the same.

PS Noted also third problem. paa picture in TexView2 preview may look good, but displayed on the screen have switched colors (eg. what was blue is red etc).

Edited by Rydygier

Share this post


Link to post
Share on other sites

1. I had a similar experience with TexView2 and vehicle textures. When i saved TGA files from Photoshop that had an Alpha channel, and converted them to PAA, it messed up the transparency: all the grey areas between black (0) and white (256) were rounded up or down to either black or white. There was no semi-transparency, only fully transparent or fully opaque. What worked in the end was appending the "_CO" suffix to texture names when saving a PAA. So if i opened "texture.tga" in TexView and saved it as "texture_co.paa", it worked, no longer messed up the Alpha. Give it a try, might work.

2. Looking at some code from UI_f.pbo, it seems to me the formulas for making consistent UIs across all aspect ratios and resolution are pretty complex

			x="0 * (((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_RADAR_X"",	(safezoneX + safezoneW / 2 - 2.8 * (((safezoneW / safezoneH) min 1.2) / 40))])";
		y="0 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 	(profilenamespace getvariable [""IGUI_GRID_RADAR_Y"", (safezoneY + 0.5 * 	((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
		w="5.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
		h="5.6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";

Share this post


Link to post
Share on other sites

Thanks a lot, very helpful. BTW this:

PS Noted also third problem. paa picture in TexView2 preview may look good, but displayed on the screen have switched colors (eg. what was blue is red etc).

Just solved by using to paa-ize the image "ImageToPAA" component of Arma 3 Tools instead of TexView2. However, unlike TexView2, that new tool accepts only 2^x,2^y dimensions, ignores the rest. And, a side note for Arma devs, I had real difficulties to locate Arma 3 tools launch option (first time tried them). Was forced to google the answer, where should I go in the Steam. Bah. Only because I read about them somewhere on these forums, I was awared about their existence, so I knew, so I may try to find such thing. Why it is so hidden feature?

EDIT: problem with partial transparent pictures was solved same way - by using Arma 3 Tools to paa-ize instead of TexView2.

Edited by Rydygier

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×