Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Distance Culling Round 2

AUTHOR: Mike McGoveran
DATE:
5/12/2023

Problem:
With our minimap revised to now be a tile system with no details it had become time to readjust Cull distance on all our game assets as the minimap no longer needs to draw anything but the tiles.  The problem arose when I tried to reconfigure our Cull Distance Volume.   It appears that the Cull Volume does not function on meshes set to Mobile which is a setting that can not be changed when you are dynamically generating your rooms and halls at runtime.  If the asset is in the level BP editor you can toggle them but the Actor that houses the assets can only be set to static at it's root.  This is really surprising as making prefabs out of our assets is a must and we are probably not the first team that needs this functionality. 

Root Actor Component Transform

Static Mesh Actor Component

Solution:
The only way to get around the Cull Distance Volume's failures is to set the max draw distance per mesh, per actor BP.  This is a long and painstaking process that the CullDistanceVolume was designed to expedite.  I have since gone through our assets and corrected for this using this method however there came a new problem: ISM(Instanced Static Meshes) and (HISM)Hierarchical Instanced static Meshes don't seem to individually cull and instead seem to Cull from the point of origin of the container as an all or nothing.   Supposedly HISMs are not supposed to behave this way as that is one of the primary purposes of the class.  There is even a setting in these two classes referring to instance cull distance  that flat out does not work.  Strangely enough the CullDistanceVolume sometimes works on ISM's without any rhyme or reason.

Actor Static Mesh Component Independent Draw Distance

ISM/HISM Broken Draw Setting



the takeaway from this experience on our specific project is to never use ISMs or HISMs as they are not predictable inside prefabs and cross our fingers that UE5 will optimize the draw calls for us.   I suppose we should stay tuned for round 3?

Example of undefined behavior: same settings on all rooms  BEFORE

Example of undefined behavior: same settings on all rooms  AFTER Zoomout


Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.