Taz1004 Posted May 13, 2020 Posted May 13, 2020 I've been searching for the label opacity issue only to find posts saying that it's a bug. So I did some trial and error and below is my workaround for changing label opacity. Opacity value in Labels.lua doesn't seem to do anything. You have to play with color_blending_k. Setting this value to 1 will be completely opaque, setting it to 0 will be completely transparent. However, color blending blends with the ColorUnknown defined at the bottom of Labels.lua. So if you set the color_blending_k to 0, your label will be transparent but the ColorUnknown will show up. Problem is that this ColorUnknown only had 3 digits for RGB value and no 4th digit for alpha. So I simply added the 4th value to read: ColorUnknown = {50, 50, 50, 0} -- will be blend at distance with coalition color And this seems to have worked. ColorUnknown is transparent and setting the color_blending_k between 0 and 1 seems to work as transparency. Below is my GroundFormat example. It is set it to be 75% opacity at 8,000m. 30% opacity at 4,000m. And disappear at 3,200m. GroundFormat = { --[distance] = {format , alignment, color_blending_k, opacity, shift_in_pixels_x, shift_in_pixels_y} [3200] = {ground_symbol_far ,"CenterCenter" ,0 , 0.1 , 0 , -1}, [4000] = {ground_symbol_far ,"CenterCenter" ,0.3 , 0.1 , 0 , -1}, [8000] = {ground_symbol_far ,"CenterCenter" ,0.75 , 0.2 , 0 , -1}, [16000] = {ground_symbol_far ,"CenterCenter" ,0.75 , 0.3 , 0 , -1}, [24000] = dot_symbol(0.5, 0.1), } Better Smoke - Better Trees Caucasus - Better Trees Syria - Better Trees Mariana - Clear Canopy Glass
Recommended Posts