Jump to content

Animation speed in Vulkan vs. OpenGL


Josh

5,137 views

 Share

I created a test of 1000 animated crawler models to see how the performance of Vulkan stacks up against our older OpenGL renderer. Here it is in OpenGL running at 37 FPS, which is pretty respectable considering how many animations are playing (and about 4 million polygons).

Untitled.thumb.jpg.b44b93637de7ab8603ab8b7dc57a2348.jpg

With Vulkan the same test yields a framerate of 66 FPS, 78% faster than the OpenGL version.

Untitled2.thumb.jpg.eeac3ff030cb7d90085e83e2a2f61bc2.jpg

Here is a video of the characters animating. Each skeleton is its own unique animation system, there are no shared skeletons in this demo.

 

  • Like 2
 Share

8 Comments


Recommended Comments

42 minutes ago, Ma-Shell said:

What happened to 

where you claimed 200 fps for 10000 characters? Was that all shared skeletons?

I believe the bottleneck in this situation is actually polygons rendered. I previously chose the goblin model because it was low poly, so I should do some more tests using that model instead of the 4000 poly crawler model.

Link to comment

I wish there was a standard for this but it really depends on your game.  I wonder how many triangles and bones these models are in Shadows of Mordor:

759300-middle-earth-shadow-of-mordor-pla

Or these in Arkham Knight:

BatmanAKPC_09.jpg

Link to comment

I ran the test using the goblin model. On this machine 1024 uniquely animated goblins onscreen runs at 200 FPS. With the old renderer it runs at 380 FPS, but it's not exactly an even comparison. The Vulkan renderer is doing a depth-prepass, so all skinned vertices are actually being rendered twice, once for the prepass and once for the final pass.

If all things were the same, I am sure the VK renderer would be going faster. So we are within the same range as my original tests, and now we have full lighting, normal mapping, and other stuff being processed.

  • Thanks 1
Link to comment

The engine will now allocate threads for animation based on how many skeletons there are and the total processing time for the last frame. It will attempt to allocate as many threads as are needed to keep the total processing time down within 60 FPS.

 

Link to comment

If I use shared animations so that less data is being uploaded to the GPU each frame, I get 400 FPS in the Vulkan renderer.

Link to comment

Actually I have found the bottleneck is in the data sent to the GPU. I added some tricks and now 1024 goblines are running at 450 FPS on my laptop, a bit faster than the original OpenGL version, even though everything is being drawn twice in the Vulkan renderer for the depth pre-pass.

I am satisifed.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...