Hello guys, this is my first time asking a question here, i’m currently building my first VR experience for a company as a school project and i’ve encountered a problem locking my progression and that i can’t seem to fix. I’m targeting native Quest 2 and using OpenXR.
Basically at first I wanted to add a point light to my scene (in a room) since it was a bit dark and the outside directional light was not enough. But when I built the scene on Quest 2, I realised a huge frame rate drop only when my hand was in certain area, near another object with high poly count. So i disabled all the lights in the scene and noticed the performance was buttery smooth but as soon as I added them back the frames dropped, always in the same area. So i tought it was a performance drop related to my hands realtime shadows casting on this object, my first idea was to disable them through the culling mask of the lights but nothing changed. I then tried ALL combinations of light settings but even without shadows casted from my hand at all the frame drop is still there.
Here is the performance graph when using only 1 baked directional light outside the room, and 1 baked point light in the room, with the lighting rendering mode set to substractive. There is basically no shadows in the room but i still get the same rendering time spike when my hand is in the area :
The huge difference in fps is probably because of VSync, which is hardware managed by the quest. Could you include in the screenshot the actual usages of the CPU?
I imagine i can’t simply disable Vsync on a VR headset, what are the other options in this case ? The framerate goes under the vsync threshold so it is halved if i understand correctly but what could be causing the drop in the first place ?
You’re GPU Bound. It’s likely an overdraw/optimization issue. Do you have any large transparent objects in the scene?
How many SetPass calls are there?
It’s the big CAD model given by the company that I imported in Unity and that i’m working on in VR. I tried changing the mesh compression settings when importing it to the scene but it didn’t seem to reduce the triangle count. I also tried to play with occlusion culling since some parts of the CAD are hidden behind other parts, by checking static and baking the occlusion but that wasn’t enough. Do you know of any other way I could reduce the performance impact without fundamentally reworking the model. Would tweaking even more the quality and rendering settings reduce the draw calls and triangles counts ?
CAD Models are extremely complex. You can’t just throw a production-level CAD file into a Quest 2 and expect it to work.
My guess is that it’s a large mesh with lots of submeshes, and these sub meshes each have their own material?
Each submesh is a draw call. each seperate material is a draw call. you need to combine these.
If it’s a static mesh that has no interactivity (you’re just looking around it and not like, opening doors or anything), you’d have better luck doing a mesh merge with a tool like MT mesh Combiner or MeshBaker on the Asset Store, and reducing the draw calls of the mesh that way.
Okay yeah I understand that, since it was working at first i never realized how huge it was. Thank you very much for the help, i’ll try to see how I can optimize all this !