This I learnt thru trial and error but can work very well.
Using func_occluder to hide models
I use it by placing a 1 unit wallpaper like the pic below,
Apply nodraw texture to all faces except the one facing the player that texture should be "tools/toolsoccluder", make it a func_occluder entity.
This will hide models behind it so be careful where u place it, players will disapear too if incorrectly placed!
In dev mode I use these key binds to show the occluders at work, the green boxes are the models being hidden by the occluder:
bindtoggle "o" "r_occlusion"
bindtoggle "p" "r_drawpixelvisibility"
bindtoggle "[" "r_visocclusion"
Max view distance
Also with all props/models set the max view distance etc, you can set the distance using the camera button in the entity properties window .
If the player cannot see the model then there is not point in displaying it all the time, models behind walls for instance.
I find the longest line of sight that the player can see the model, go a little further then set the max view distance, you call also set the fade for smaller props like light fixtures etc.
In my case, I hid the generator in the base (big red block) to players outside of the base, determined by distance.
Using func_occluder to hide models
I use it by placing a 1 unit wallpaper like the pic below,
Apply nodraw texture to all faces except the one facing the player that texture should be "tools/toolsoccluder", make it a func_occluder entity.
This will hide models behind it so be careful where u place it, players will disapear too if incorrectly placed!
In dev mode I use these key binds to show the occluders at work, the green boxes are the models being hidden by the occluder:
bindtoggle "o" "r_occlusion"
bindtoggle "p" "r_drawpixelvisibility"
bindtoggle "[" "r_visocclusion"
Max view distance
Also with all props/models set the max view distance etc, you can set the distance using the camera button in the entity properties window .
If the player cannot see the model then there is not point in displaying it all the time, models behind walls for instance.
I find the longest line of sight that the player can see the model, go a little further then set the max view distance, you call also set the fade for smaller props like light fixtures etc.
In my case, I hid the generator in the base (big red block) to players outside of the base, determined by distance.
Last edited: