I’m currently facing an issue where my frame rate drops quite heavily when rendering splats using playcanvas react. I’m loading the very same splat in the supersplat editor, but not facing the same issue with frame drops. I was wondering if there was some optimization I’m missing that I can hopefully carry over to my playcanvas react splats.
I’m not sure if there’s already another topic on this, but I haven’t found any in regards to optimizing playcanvas react splats.
I’m just using the basic splat setup I’ve found on the demo.
import { Entity } from "@playcanvas/react";
import { GSplat } from "@playcanvas/react/components";
import { useSplat } from "@playcanvas/react/hooks";
import { useRef } from "react";
function SimpleSplat({
src,
scale = 5,
rotation = [0, -90, 180],
position = [0, -5, 2],
name = "GSplat",
}) {
const { asset } = useSplat(src);
const entityRef = useRef();
if (!asset) return null;
return (
<Entity
name={name}
ref={entityRef}
rotation={rotation}
scale={[scale, scale, scale]}
position={position}
>
<GSplat asset={asset} />
</Entity>
);
}
export default SimpleSplat;
Thank you, that’s an option I overlooked, and it did help gain a few frames in return to smooth out the scene. Following your link, I’ve also added a pixel limitation of 0.8, which doesn’t appear to impact my splats much, while improving performance further (I’m not too sure if this is a correct approach though). Beyond these two steps, is there any improvements that can be made?
Just a singular gaussian. In fact, I believe turning anti-alias to false solves majority of the issue, but, I’m now facing probably the final issue, which is that in my scene, it’s a combination of Splat & GLB models. Turning off anti-aliasing improved the fps, but it also destroys the sharpness of my GLBs. I’m not sure how I can even approach this problem.
I’m currently running my scene in a local environment, so I currently don’t have a link to share.