How to properly use Prop Fade Distance?

Seitan

L3: Member
Oct 30, 2015
135
8
382cebec62.png

What can I do?
 

Egan

aa
Feb 14, 2010
1,375
1,721
DuP7kib.png


Screen Space Fade screenspacefade <choices> The method by which the fading distance should be determined. If 'No', the fade distances is the distance from the player's view to the object, in inches. If 'Yes', the fade distance is the size of the object onscreen, in pixels.

Start Fade Dist/Pixels fademindist <float> Distance at which the prop starts to fade (<0 = use fademaxdist). If 'Screen Space Fade' is selected, this represents the number of pixels wide covered by the prop when it starts to fade.

End Fade Dist/Pixels fademaxdist <float> Maximum distance at which the prop is visible (0 = don't fade out). If 'Screen Space Fade' is selected, this represents the *minimum* number of pixels wide covered by the prop when it fades.

Fade Scale fadescale <float> If you specify a fade in the worldspawn, or if the engine is running under dx7 [hl2/ep1/portal] or dx8 [ep2/tf], then the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified. This scale factor gives you some control over the fade. Using 0 here turns off the forcible fades. Numbers smaller than 1 cause the prop to fade out at further distances, and greater than 1 cause it to fade out at closer distances.

typically only need to use start and end fade, set start to like 800, and end to like 1000, check what happens in game
 
Last edited:

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,258
999
Bear in mind the act of fading a prop in and out of sight costs processing resources. Keep the fade interval distances (the bit between the start and end) as short as possible.

If your prop is behind world brushes or in a room, then visleaves and area portals may be culling it anyway so fade distances could be pointless in those cases. Use it on stuff that will definitely be drawn but is a good distance away from the camera. Giving every prop in your map a fade distance would cost a lot of your time and have no real benefit.

https://developer.valvesoftware.com/wiki/Visibility_optimization#Draw_distance
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
A good example of props that fade where you can see them is in Goldrush, stage 2, first half. There are some props on the platform and in the building at the far end that fade out when you get close to BLU's entrance, as mentioned here.