Download

Which features use GPU/CPU?

When working on new features, I often find myself wondering which features are going to put load on the GPU or CPU. Then usually have to run benchmarks as sanity checks using “stat unit”. It’s not really mentioned much in the documentation under each feature.

I’m wondering if any veterans could outline some basic rules of which UDK features use CPU or GPU.

Such examples as:

  • Dynamic lights.
  • Skeletal mesh animation.
  • Material rendering.
  • Particle systems.
  • Physics.
  • Dynamic shadow rendering.
  • Collision.
    etc

My game uses a lot of dynamic lights, which appear to put a lot of work onto the CPU. So I’m wondering if there’s anyway to offload any work from the CPU onto the GPU?

Any general discussion on this is welcome.

For your dynamics lights, if they are not moving, you can set a CustomTimeDilation to 0.1. That will improve the frame rate. A few years ago, I’ve developed an in-game editor, and slow down CustomTimeDilation to improve performances.
I’m curious what is your game?

Thanks for the tip, I will check that out.

Edit: I’ve tested and reducing CustomTimeDilation on my PointLightActors doesn’t appear to have any affect on performance (unfortunately).

bDisablePhysXHardwareSupport=False

Always crashes the game in my case.

I tried engine coding and idk render a simple cube is expensive so take in mind o guess that anything related to rendering is expensive

Hum, That worked for me, but I had 50+ dynamics lights on a scene. I’m not sure in your game that can happen.

Edit: Here is the editor I’ve done https://youtu.be/Ne9_aLUh2So?t=108.

This player, as example, has built a very large base with probably over 50 dynamic lights placed throughout:


It brings down the frame rate by quite a lot. Switching those point light actors to have a low CustomTimeDilation has no impact on frame rate.

I wonder if there is a way to limit how many rendering passes a mesh/material will have for lights touching it? Any optimization ideas are welcome.

I already disable shadow casting if framerate drops below a threshold, and group lights within a close radius to one another into single point lights at a given distance from the camera. This helps immensely when there are 100’s (even over 1000) of lights across the map, but not so much when the player is close to a densely packed area like the scene in this screenshot.

I will check my backups to see what I’ve done in the past.

Here my properties:

CustomTimeDilation = 0.00001 // ahahah !

bLightShafts = false
bCastShadows = false

Begin Object Name=PointLightComponent0
LightAffectsClassification=LAC_STATIC_AFFECTING

CastShadows = TRUE 
CastStaticShadows =TRUE 
CastDynamicShadows =FALSE
bForceDynamicLight =FALSE
UseDirectLightMap =TRUE 
	
	LightingChannels=(BSP=FALSE,Static=FALSE,Dynamic=TRUE,bInitialized=TRUE)
	PreviewLightRadius=DrawLightRadius0
	PreviewLightSourceRadius=DrawLightSourceRadius0
	Brightness=1
	LightColor=(R=255,G=255,B=255)	
 	bNonModulatedSelfShadowing = false
 	LightShadowMode= LightShadow_Normal// LightShadow_Modulate
	ModShadowFadeoutExponent = 3.0
minShadowResolution = 512
maxShadowResolution = 512
shadowFadeResolution = 512
	RadialBlurPercent = 3
	
	Radius=1024.0
	FalloffExponent=2
	ShadowFalloffExponent=2
	ShadowRadiusMultiplier=0
	ShadowFilterQuality=SFQ_Low
	ShadowProjectionTechnique=ShadowProjTech_Default 

End Object
LightComponent=PointLightComponent0