Optimization of JCMs and Flections

Issue #1577 resolved
garden created an issue

I have done some research on the effect of mute shapekeys on optimization.
G8+FACS - 83fps
G8+FACS (mute all) - 83fps

G8+JCMs - 73fps
G8+JCMs (mute all) - 95 fps
G8+JCMs + Mute Drivers - 90fps

G8+Flections - 92fps
G8+Flections (mute all) - 96fps

G8+Flections + JCMs - 67fps
G8+Flections + JCMs (mute all) - 91fps

As we can see, mute shapekeys FACS do not affect performance, but mute shapekeys JCMs and Flections do, and significantly.
Perhaps FACS shapekeys affect a small number of polygons, and JCMs affect a large number of polygons, so there is an influence of mute.

So, I suggest adding for JCMs shapkeys and Flections shapkeys drivers for mute, which will be mute shapkeys if the value of the JCMs and Flections morph driver is 0.
I have already done this manually with the model I imported JCMs into and it works fine.

Video
Here is a video, the program for video recording spends about 10-15 fps, but even with it you can see that the fps is more than 73 that were without mute.

The driver expression should be "1-a", or "1 if a<0.0001 else 0", because a==0 does not work correctly, it looks like some drivers are equal to 0.00000...01 even in a calm state.

Comments (6)

  1. Thomas Larsson repo owner

    Implemented in last commit. Zero morphs are muted for jcms and flexions, both with easy import and if they are loaded manually. I also added muting as an option for custom morphs. The expression is set to abs(a) < 0.0001, to make it work also for negative morph values. Clothes shapekeys are muted when the corresponding body shapekeys are.

  2. Log in to comment