Hi all, I am trying to render a large number of quads with instances. I have tried both PlayCanvas and Babylon.js, but in most cases, the framerate is lower in PlayCanvas.
Thanks LeXXik. You may increase the values of numInstances and/or numQuadsPerInstance at the beginning. On my desktop with an NVIDIA 1060, when numInstances is set to 30,000, the FPS of the PlayCanvas snippet will be around 33. If your machine is better, perhaps 100,000 will be sufficient?
import * as pc from 'playcanvas-mjs';
const numInstances = 10000; // try to increase this value
const numQuadsPerInstance = 128;
I increased the count to 500 000 on both, got the following results:
PlayCanvas: 21 FPS
Babylon: 11 FPS
If you want to get any meaningful readings, I would create both examples on localhost and record the performance log from dev tools in Chrome. You can then see what exactly takes time in both cases.
That may be the screen size issue? Since the default layout of the JSFiddle page will show a very small canvas.
If you choose the column layout as follows and drag the left code panel to make the canvas take a similar size to the Babylon Playground, I believe the results would differ. .
By the way, I have already set up a local environment and have obtained similar results. The online snippets are for easy reproduction. I have run profiler of chrome and found the CPU payload very small in both cases, so I believe the problem is with GPU. And I have compare the usage of drawElementsInstanced of both cases (from Spector.js plugin), their data size and GL states are almost the same.
When I switch the antialias option here between true and false, the framerate does not change at all. I tried a splat ply with 500 million points, the framerate is 33 on my 1060 machine, with both antialias options.
I wonder why does changing the antialias setting in the above code snippet experiment cause a large framerate difference, but not in SuperSplat?