Image Update: HISM Distance Culling


Scenery in《Drifting》

HISM Distance Culling


(As the camera moves away from HISM actors, spherical opacity mask kicks in and draw call rises, however, HISM actors that are further away from the camera will be disabled by distance culling and decrease the draw call. The combination of distance fade shader and distance culling allows the game to have a large number of opacity actors in a scene while maintaining a reasonable draw call)


In a previous post, I talked about how the distance fade shader causes the draw call for my scene increases dramatically and I need to find a way to disable actors - or more specifically HISM actors - when it's far away from the player camera. (see this video to learn more about HISM in UE4) 


(Although both StartCullDistance and EndCullDistance are exposed to the default property of HISM component, setting the value directly in its default tab window will cause the HISM to disappear in editor viewport - disregard of the viewport camera position in the world. That is why I move the distance cull logic to event begin play instead)

I've tried cull distance volume, however, after some research and testing I found out it's not applicable to moveable actors (including HISM). I dived into the UE4 source code and discovered there are already variables for HISM distance culling - StartCullDistance and EndCullDistance. The variables did what its name suggested and after some modification for my HISM actor class, I am able to reduce an average of 2 ms to the draw call for my scene which is a pretty huge performance improvement.

As I keep developing the project, optimization issue will always be on the top of my worklist. It is a process that requires the developer's constant attention and awareness of the potential performance cost of new features that are about to add to the game.

I hope you enjoy this week's update, have a relaxing weekend. (●′∀‵)ノ♡

Get 《Drifting : Weight of Feathers》

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.