[Tech Memo] Content Performance Profiler For Artists.

In game development,performance profiler is extremely helpful to optimize the game. but most Profiler is designed for programmers.

Actually artists(especially, shader/FX artists) need Profiler too.  unlike programmers who always want to find the reason behind of bad performance. What artists need is a tool which can verify their idea quickly,  if the performance doesn’t become good, then they go for another idea.

Obviously, Tools like pix can’t help them.

Why we need special profiler for Artists?

When I was working on Tom Clancy’s End War,  There was a big complain raised from ParticleEffect artist and Shader artist. It isn’t so easy to know the content performance on console, and profiler like pix isn’t powerful enough and not suitable for artists.  There are several big problems with current profile tools.

  • Slow iteration: there are no quick way to let them know the real performance on console. Pix is really not designed for this,  eg. if we use Pix, something like this will happen :
    • Step1.  Artist Modifies data(Shader/Particle System)
    • Step2. Cook the data into Xbox360 format (usually slow)
    • Step3. Launch the game on console and find the stuff we want to profile ( slow)
    • Step4. Capture the scene
    • Step5.Analysis and find the draw call (slow)

Then if artist change the data again, we need repeat step1-5,  the whole process takes so long that no artists want to do it.

However, this is so important for artist to optimize data. Both Shader Editor and Particle Editor are highly flexible, there are too many parameters and options, after combination, even engineer can’t predict what the performance is going to be. The only way is “profile it”, but   sadly, too painful.

  • Lacking Standard:  speaking of performance of a shader or particle system, we need fix the test conditions,  like Camera Distance, Geometry Shape, but if we run the game and find the object, then capture it,  it’s very hard to get the same conditions, error margin will be too big , then we can’t see the real performance change.
  • Static: for a particle system, what we really care about is the dynamic performance,  actually the performance curve  in its life time. Obviously, Pix can’t do it.
  • No Batch processing ability:  it we can do batch profiling, it will be a very good tool to monitor the content and find the problem data.

With those reasons, even artists want to optimize the data, it’s too difficult.  so all optimize/analysis task went to programmer side. Apparently, Engineer can’t do it too much, the efficient is low…

 My Profiler Design

For some reasons,  we never have a chance to do it in EndWar.  So I put the idea into the next project, I’ll show some design here. The profiler has two parts.

1) On-The-Fly Profiler: it’s a separated app, we run it on console (Xbox360) when we are editing content.  it supports:

  •  Connect with editor (eg. Shader Editor) , transfer and analysis  shader on the fly from network.
  •  Give important counter information as reference
  • Apply the shader onto standard geometry
  • Support to transfer texture and Mesh data (TD).

Actually, there is no real tech blocker,  finally,my shader profiler like this:

By this method, Artists can really have “ Editing on the fly and profiling on the fly“, it can automatically show the result on console screen.

2)In Engine Profiler for batch processing:   Create Test case in game engine, finish the batch testing in the night build. so we can find the most expensive/problematic content quickly.

  •  Consider Camera Distance, LOD etc, create several standard test cases.
  • Test particle system dynamic performance and give the curve.
  •  Batch process and sorting.

In my implementation,

Particle Profile results like this.

Shader Log tool output like this, basically it’s a txt file which contains performance data, you can use any tools to sort and analysis it.

Tech Points:

There is no much difficult about techniques, but there are 2 points may save you some time.

  •  Network communication, there is a sample “command console” in XDK, you can reuse their code to comunicate between X360 and your editor.
  •  For transfering  Shaders and constants, you can add a wrapper to your SetConstant API etc,  so that you can easily capture those values and data which will be sent into GPU.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: