Rendering Performance tips for heavy models?


(Maximedup) #1

Hello there,

Trying to improve the rendering performance for :
Looking for any tips available!
I just detached the lightning from the camera (edit: for the shadows not to be processed every frame), seemed to improved performance a bit.


(Stephomi) #2

The issue here are: polycount, number of materials, number of geometries

Sketchfab never fiddle with polycount, and 4M is a lot.

But the biggest issue is the number of geometries and materials.
Fortunetaly, we recently an automatic optimization that merges similar materials and merge the geometries if possible.

(If you open the console) here what it says:
*Geometry count : before 3159, after 3159
Material count : before 1535, after 169

1535 materials is a lot, 169, is still a lot.
3159 geometries is a lot too. For some reason they couldn't be merged together.
It either means many materials are using blending/additive transparency OR that the geometries are somewhat animated.
In that case, the geometries have animated stuffs, so we don't merge them.
You probably deleted an animation in sketchfab but it is still referenced as animated somewhay, it will be fixed soon and it basically means we'll be able to merge many geometres and ends up with 181 geometries instead of 3159.

Note that a light attached or not on the camera makes no difference in term of performance.
What matters the most is the shadows. If the model is animated or if the light it attached at the camera, then we have to generate the shadow on each frame.

(Maximedup) #4

Thanks for the reply.

I actually detached the light for the shadows not to be processed every frame.

I indeed removed an animation from the 3D settings panel in Sketchfab, but don't recall setting up any animation. Might have inadvertently put a keyframe somewhere :confused:

(Stephomi) #6

Note that in the editor we don't perform the optimizations I talked about, only in embed (model page, etc...).

(Stephomi) #7

The fix is live, now the performance should be better.

There's still a relatively high number of geometry (181) and materials (169) though.


Yeah, still a bit heavy, but so much better!

(Maximedup) #9

Nice improvements, thanks!

Imagin the original .fbx without materials being around 1.7Gb...!
This one weighs 200mb, still pretty hardcore to process! ^^