Can someone maybe Rosbone, tell where the border of the fow is in this clip. Because it seems almost like some models are visible while in the fow.
https://clips.twitch.tv/IcyShortBillRuleFive-PDZZCWFDf-1O51ak Kimbo vod clip
I am not smart enough to say exactly what the FOW is.
When you edit building damage in the worldbuilder, you create a sphere and position that sphere on the building where the damage is. When the render code draws the building it checks each pixel to see if its in the sphere or out and draws accordingly. In the sphere draws damage, outside draws normal object.
The FOW is a 2D array (Excel grid) where each cell is 1 meter. To create the FOW, you make a circle in the 2D array at the units sight distance. This does not show sight blocking objects. So you probably need to trace a line from the units position to the edge of the circle in 360 degrees.
This is a VERY time consuming process. I assume Relic is smarter than me and has a better plan. So in vCOH I dont think it was calculated very often. In COH2 it has some logic behind its calc (optimized).
Either way, you now have a Black and White picture (2D array) of the FOW. When drawing the level, you would perform a 2D check on each pixel as its drawn to see if its in or out of the FOW. Or even better just use the FOW cell value as a multiplier, then NO check is needed at all.
Since units are the same size as a cell generically, you could just check the models position vs the 2D array and skip drawing the unit (optimization).
The confusion comes in the fact that the FOW would have very hard edges and look really bad. So their needs to be some smoothing/blurring to get a nice soft shadow edge. This is where your sample image shows that it is not super clear where the actual edge is. So imagine the excel cells are black and white but when blurred you get grey cells in between.
In your image, the unit that is circled is probably in the visible part of the FOW but there is a dark stain texture under him so it looks like he should not be visible.
I did a quick test to find the line. First two frames are visible sniper. The next two frames are invisible sniper with FOW on and off.
If my guess is correct the line could be the first truly dark cell.
I hope that makes some sense.