Home Artists Posts Import Register

Content

I've been doing some thorough testing of the performance impact of Naturalis v1.4. At a high level, there's some code that would benefit from optimization, but the impact of optimizing code is going to be very small in comparison to optimizing the morphs.

To everyone not yet using the unofficial CPU performance patch, you should! In my testing, it significantly reduces the performance impact of adjusting dozens of morphs every frame. Among other things, the patch optimizes VAM's morph related logic, and makes the skinning multithreaded, which means the cost of applying morphs gets spread out over multiple CPU cores.

In my test scenario, I added the plugin to two person atoms and tested the impact versus not adding the plugin, over and over again with different parts of the plugin enabled/disabled between each test. All of the advanced soft physics features like local distortion physics were disabled.

A quick summary of the results:

  • (1) Adding the plugins but preventing all continuous updates still caused a mysterious 5 fps drop (from 161 to 156). This was almost entirely due to Naturalis increasing the "physics quality" of breast and glute joints (similar what High Quality Physics in the VAM user preferences does), even when the physics quality setting in Naturalis user preferences was at 1 (default/lowest). In the next Naturalis patch, this will be fixed and the physics quality setting itself will also be removed as it's just not needed.

  • (2) With continuous updates enabled and with the unnecessary physics quality setting removed, there was a small framerate drop even when the models were just standing still: 158 fps without the plugins, 153 fps with the plugins. This overhead would be great to minimize and I have some ideas on how to approach that, but this is not a priority.

  • (3) And here's the real kicker. When animating the atoms using simple cycleforces to ensure that TittyMagic's and BootyMagic's morph values change continuously, fps dropped from the baseline (cycle forces on but no plugins present) of 112 fps to 77 fps - a whopping 30% drop! About two thirds of this drop was just from the application of updated morph values to the skin mesh within VAM itself.

I was quite shocked at the impact of morphing. It was way worse than I expected.

However it's actually a good thing because it means that the CPU performance patch directly helps with that. I tested (3) again with the CPU performance patch installed: the baseline fps was of course much higher at 146, and the fps with the plugin added dropped to 127. That's only a 19 fps drop (compared to 35 fps previously), or only -13%. It also shows that you can get better fps using Naturalis with the CPU patch than not using either.

Given that Shapeshift is also concerned with continuously applying morphs, I'll need to take care to keep its performance impact in check. Mainly this means keeping the number of morphs from ballooning out of proportion.

Also, when it comes to the morphing in TittyMagic and BootyMagic, it'd be great if I could reuse some of the morphs that Shapeshift adjusts. I.e. calculate the morph value from multiple sources. This, combined with reducing the number of morphs adjusted by TittyMagic and BootyMagic overall, will hopefully at least keep v1.4 on par with earlier versions in terms of the performance impact.

As a last resort, I'll look into limiting the rate at which the morphs can update. This could be especially useful for the joint angle morphs. Since those are not oscillating quickly, they just follow the joint angle in a more static way, something like 20-30 updates per second might be sufficient.

A bit more testing is needed on the advanced soft physics front. There's probably some optimization that could be done on my end, but I'm pretty sure the vast majority of the performance impact of adjusting soft physics continuously is a physics engine problem.

I hope that was informative!

-everlaster

Edited: 112 - 77 = 35, not 45

Comments

Lifson

Been running the cpu patch for a while and it's important to know that not everyone will see the same improvement. It's highly dependent on what cpu you're running. It would be helpful to know what cpu you have Everlaster. Thanks for the excellent testing for sure.

Arty Gumption

I hadn't known about that CPU patch. That has had a night and day difference on the game for me, with or without naturalis. Thanks for shouting that out! My performance is much, much improved in VR!!