Improving FPS in VaM for newbies. Advanced users please share your own tips and tricks.

ClubJulze

Well-known member
Featured Contributor
Messages
204
Reactions
591
Points
93
Patreon
clubjulze
Because I create motion capture scenes that rely heavily on keeping in time with the music, ensuring my scenes don't overtax everyone's computers is really important. Unfotunately, this means my scenes suffer in quality when I want to make them more elaborate. The more atoms I add, the more I have to work on lowering the quality of a models hair or dropping iterations on sim clothing. My biggest issue now is lighting. I like using lights for effects; different colors flashing to put some intensity into a scene or create a specific atmosphere.

However, when I want to use something that will tax a users machine, I often have to sacrifice quality in other areas. Some things I do to keep up the FPS in a scene involves messing with hair settings, clothing settings, light quality, collisions and ensuring props aren't being overlapped by too many light sources. I use spots instead of point lights, and sometimes turn off some of them casting shadows.

In my experience most FPS loss is due to physics; hair, sim clothing and person atoms really impact your perfomance.

HAIR
My first solution is to go to a model's hair physics and turn Curve Density and Hair Multiplier to 12.
1591483033332.png
Using oeshii's awesome madmoiselle hair as an example, in my desktop mode I have ~92 fps with the default settings of 24 and 24 respectively. If I change them both to 12, my FPS increases to ~131. That's HUGE!
1591483319049.png
To make up the difference in quality (IMO the hair look fine this way), I go to the looks tab and increase width by about 0.005-0.010. It's a bit better, but sometimes it can make the hair look worse. In my scenes, it makes little difference as the constant movement often distracts from the minor details.

In this particular instance, I also drop the Iterations (in the Physics Tab) to 1, and my FPS is now ~138.
1591483802412.png
Dropping hair iterations makes the hair limp. But I fix that by reducing the weight of the hair (in this case from 1.5 to 1). Increasing the Snap can also fix this in many cases.

CLOTHING
1591484287583.png
I've zoomed out a bit to show the clothing and you can see that being just a little bit further away from the model increased my FPS to ~200. So just keep that as a baseline for now.
Adding four pieces of sim clothing has dropped my FPS to ~140.
1591484414505.png
One quick solution is to turn off sim on undergarments. This increases my FPS to 169.
1591484898235.png
However, if you don't want to sacrifice the ability to quickly undress them the other option is to drop iterations on all sim enabled clothing.

With Sim Enabled on all the clothing, dropping the iterations to 1 on the undergarments only adds a tiny bit of FPS. However there is little to no visual limpness which is good. However, dropping the iterations on the skirt and shirt make them very limp and they look really awful. But... we did get a good amount of FPS back, now up to ~175 from the 140 earlier.
WzvJlKP.png
You can fix this; similarly to how I fixed the hair.
I just increase the stiffness from 0.5 to 1. Looks fine to me; almost no visual difference.
gNTdI5I.png
Shirts and dresses don't always work as well as these garments, but in this case the shirt looks absolutely fine with just the stiffness maxed.
fP4NaQW.png
Again, these quick fixes do not work for every piece of sim clothing, but you can mess around with weight, stiffness and sometimes the distance scale depending on the garment.

LIGHTING:
From what I've observed, the more lights you have and the more objects you have interacting with those lights the lower your FPS drops.
When it comes to FPS, I've found that spot lights have a great balance between performance and quality. Though directional lights are also great for overall lighting of a scene.

I've also learned that forced vertex lights are great for general lighting. I've discovered a sweet spot when it comes to lighting basic scenes, and that is using a max of 3 lights, often spots fixated on the primary focus of the scene form different angles with varying intensities. In most cases, that focus is 1-3 person atoms.

Here are a few screenshots with 4 different spot lights, set to red, green, blue and white. Global lighting is set to 0. Each pic has the Pixel Light Count increased by one up to the number of lights (1-4).
WSIahKO.png
LM1yu8C.png
Cu2rzWI.png
ugegYWn.png
You can see the big difference between the images that having your pixel count up changes the quality quite a lot. You may also notice how my FPS dropped a lot between 3 and 4. This demonstrates the importance of limiting how many overlapping lights should be the max in a scene. You probably also noticed the difference between 2 and 3 is negligible, also demonstrating that 3 is the sweet spot with overlapping lights.

It keeps going down, here's an example of 6 lights.
vTEjJ3j.png
More lights can make a scene look amazing, but while VaM is limited in how it handles it's resources, creators should probably stick to 3 lights overlapping on a single object. Thanks to kemenate and hazmhox for their input.

Different light type impact FPS differently, generally, Spot lights and Directional lights impact the least when used properly and Point Lights impact the most. As far as I've seen, area lights do nothing in VaM.
ForcedPixel lights impact FPS way more than ForcedVertex lights. ForceVertex only work as Point Lights and they do not cast shadows. However, IMO they actually look better as point lights than ForcedPixel lights with shadows disabled and still use less FPS.

Shadow resolution also has a impact on FPS. Each light has its own setting. These don't impact too much when increased on their own, but with a group of lights it makes a bit of difference. IMO the medium setting is very slightly different than very high and in many cases you don't need all the lights set on a higher quality. You can often adjust the shadow strength just slightly for each light to get a similar result without increasing the shadow resolution.

"Pro Tip: One can use (transparent) Image Panels for some fake Light and Shadow effect for screenshots. For example this "Spotlight Background" " -kemenate

Also see hazmox lighting guide here
 

Attachments

  • 1591491286383.png
    1591491286383.png
    680 KB · Views: 0
Last edited:
COLLISIONS
Collisions make a difference. The more objects with collision enabled AND are interacting with other collision enabled objects, the more it impacts FPS. Just turning advanced colliders off on a person atom can net you ~15 FPS in some cases. Turning off collisions on objects in scenes is a good way to lower the impact on your FPS. Though it is often pretty minimal, unless you have a lot of colliding objects to start.

WARNING! Before messing with collisions in a scene, ensure you plop down a save if you are working on a scene. Disabling then reenabling collisions often crashes VaM. So trust me when I say save before messing with collisions.

SCRIPTS
Scripts are also a culprit in impacting FPS. Especially ones that are constantly doing something, like animating morphs. Two big offenders are the Life and Emotion plug-ins. Because these check a lot of conditions and animate multiple things at once while randomizing stuff, they can have quite an impact on FPS. So, consider that when thinking of adding them to an already FPS impactful scene.

I have tried tacking these types of plugins on to my mocap scenes and not only do they often mess up the mocap, they can desync the dancer and music. They are great for scenes and bring models to life, but maybe not necessary for EVERYTHING. It's all about compromise, quality vs utility.

ATOMS
When building sets for my scenes, I like to use the shapes to build props and stages. However, I noticed a few things that caused them to impact FPS. I already mentioned that when an object is interacting with multiple light sources it can have quite an impact. But you can still have multiple lights sources but having them interact individually with solitary objects isn't quite as impactful. Also, I've noticed scaling objects up has a significant impact on FPS as well. This is ashame because I find the built in shapes to be great since you can apply textures to them to make them into anything you want. I've also already mentioned that having collisions turned on and interacting with other atoms will impact FPS.

PERFORMANCE SETTINGS
Obviously, how you set your performance settings is going to strongly impact your FPS. [NOW OBSOLETE] ONLY for those with RTX cards see this VRSS guide by kimboo I put on my Patreon for my patrons. That wasn't meant to be a plug, I just thought this needed to be posted somewhere so it wasn't lost in time on the VaMDiscord, but the original guide is on there to clarify. It really works too. To really see how much of a difference it makes set your Render Scale to 0.5 and your MSAA to 8x. Again, it ONLY works in VR for those with RTX cards.

All this advice is going to be different in desktop and VR mode as well as be based on your system specs. My desktop PC is a 32gb ram, 3 Raid 0 SSDs, 1080ti, and i7-7700k 4.20 GHz. My VR PC has 32 gb RAM, 4 Raid 0 SSDs (including m.2 drive), 2080Ti and an i7-8700k overclocked to 4.9 GHz. Both systems have AIO cooling and PSUs above 700 watts. Just to give a baseline.

Shader Quality is a minute detail thing. From a distance it really doesn't matter. However, low sucks, medium is great, and high is a bit better than medium. However, I found for most scenes, medium is just fine.
MSAA Level is all about Anti-Aliasing or edges. What I love about having a black background on many scenes is its often hard to even see any aliasing. The areas where you are going to notice aliasing the most is on fine objects, like hair and some clothing. Having it off just looks so bad. But even 2x is a great difference. 8x is great for hair, but such a huge impact on FPS.
Render Scale this is a resolution setting for VR only. Lowering this just slightly can give you a good boost in performance without too much impact on quality. I often set this to 0.9 or even 0.75 for heavily impactful scenes. Of course with the above VRSS guide, it makes very little difference in quality, but still increases FPS dramatically.
Pixel Light Count we already talked about this, see above.
Smooth Passes this is the quality of your models, the smoothness of the morphs and such. Having this set to 0 can boost your FPS a little, but some morphs look almost horrific with this off. I think between 2-4 is reasonable and doesn't have as much impact on performance vs the quality difference.
Glow Effects I say keep this off or on low. There are few objects in VaM that use this and the ones that do, I've noticed only minor differences between low and high as far as visual quality. It only has a small impact on FPS and only when objects using glow are in the scene.
Physics Rate set this to Auto
Physics Update Cap set this to 3
Desktop Vsync I would only mess with this if you are seeing issues with screen tearing in desktop mode. Not for VR.
Mirrored Surfaces this can make a big impact based on the quality settings each reflective surface is set to. If you see a signigicant impact on FPS with this, try changing the Texture Size and Anti-Aliasing settings on the reflective surfaces in the scene first, if you don't like the result, just turn it off.
Soft Body Physics Pandora's box. The second coolest feature of VaM (besides mocapping), but the most impactful on performance. With the VRSS guide above, you might be able to turn this on and still enjoy VaM no problem. However, soft body physics can break a scene and sometimes enabling it can explode a person atom. Use with caution. You can also enable the setting globally and disable it for individual person atoms, currently you can disable female glute and breast physics. This is a fact I discovered recently and wonder if there is a way to enable it using collision triggers. Get on it @Acid Bubbles if you don't already have a plug in for this.

UNTESTED
Process Priority
I've recently read, but have not yet tested this yet in VR due to the heat of approaching summer. Some people have reported experiencing better results when lowering this to Normal, though it is set to High by default. I'd love feedback on this.
Timer Scale and Playback Speed I have read that decreasing Time Scale to 0.25 (on the main UI) and then increasing Playback Speed to 4 (in the Scene Animation tab) can not only make Scene Animations smoother but also increase FPS.
SteamVR I have also read changing the rendering resolution down in SteamVR settings can increase FPS without having a strong impact on quality.

I am no expert and a lot of this is just from experimentation. Please give feed back and please let me know if I am mistaken about some of my observations. Hopefully this can help newcomers have a better experience and maybe even help some new creators find ways of improving performance in the scenes they make.

EDIT: Man lots of typos. I'll edit it in the morning.
 
Last edited:
Okay, I was thinking this of less than a guide rather than where multiple people contribute ideas, but I'll do that instead it you think it's better.
 
It is completely up to you. I was just making a suggestion in case you were not aware of the guides area. I think there are some advantages to making a resource in that is can be more easily found by users looking for guides since there is dedicated category for that.
 
I don't have many tips on Perfermonce (beefy PC used in Desktop Mode mostly). But a few Comments:
  • As far as I know the Pixel lights under 4 are packed together by the engine and therefore a lower number gives you less performance boost. Only more then 4 lights have an impact.
  • Also the Pixel light count affects only overlapping lights on one object. Basically. So you can have a ton of lights in a scene as long as they are far apart or something like that... there has been a good guide and discussion a while back see also here https://hub.virtamate.com/threads/scene-lighting-fps-usage.478/
  • For Smoothing: It comes down to personal taste, a bit. But I recommend a setting of 2 or 1. 3 and 4 distort some shapes, like around the eyes and some morph details COMPLETELY vanish. I used to make looks with the highest smoothing setting and had to expand the morph ranges extremely. A look like this would look completely terrible on lower settings. So now I use a setting of 1 or 2 because it looks more crispy on my machine and a shared look will not look completely wrong on higher setting (just less defined...)
  • If you reduce Hair Multiplier it's a good idea to increase Hair Width.
  • For hair creators: When generating hair obviously a short segment length + many segments is a lot more performance hungry then a long segment length + fewer segments. But keep in mind that tight curls work better on short segments. The vertex count on "recalculate style joints" give you a good idea about complexity.
  • idk about dropping the iterations. I think I have tested it a while ago and it can completely change the look, if the look relies on physics to keep it's shape. This also can happen with reducing the Physics frame rates :-(
Amazing. Spot light is really the fastest??? I would have never guessed, because it looks like it's the most complex and it has the most realistic light results anyway.
 
  • As far as I know the Pixel lights under 4 are packed together by the engine and therefore a lower number gives you less performance boost. Only more then 4 lights have an impact.

Each pixel light requires an additional pass in the shader. 1st pass of shader is vertex lights + global illumination. Then each pixel light that effects that pixel requires an additional pass of the shader to render. On top of that, pixel lights cast shadows, and each one has its own shadow cast pass unless shadows are off for that light. If you have pixel lights set to 1 in preferences, the shader will only do 2 passes and some of the pixel lights will be treated as vertex lights.

  • Amazing. Spot light is really the fastest??? I would have never guessed, because it looks like it's the most complex and it has the most realistic light results anyway.

Spot and point use nearly identical shader code, but spot can get a slight advantage that some objects can be pre-culled and not rendered.
 
I would have bet money on Directional light being the cheapest ? I guess with the shadow calculation running over everything it wastes more resources then a limited source like spotlight, which has more complex math involved. So, directional without shadow should be fastest, right?

So basically the performance should also be impacted by how far the range and angle of the light sources reaches. A huge spotlight that covers the entire scene might not be much better then a directional light...

btw Pro Tip: One can use (transparent) Image Panels for some fake Light and Shadow effect for screenshots. For example this "Spotlight Background"
 
Ah yeah I forgot to mention a single directional light is also done in 1st pass so is very low cost.

Shadow passes for all lights to create shadow maps are not as expensive as the render passes, and applying the shadow is pretty low cost. The shadow resolution setting can play a pretty large factor.
 
I would have bet money on Directional light being the cheapest ? I guess with the shadow calculation running over everything it wastes more resources then a limited source like spotlight, which has more complex math involved. So, directional without shadow should be fastest, right?

So basically the performance should also be impacted by how far the range and angle of the light sources reaches. A huge spotlight that covers the entire scene might not be much better then a directional light...

btw Pro Tip: One can use (transparent) Image Panels for some fake Light and Shadow effect for screenshots. For example this "Spotlight Background"

This is all just from testing stuff in desktop mode, but spots and directions seem to be quite close. It may be more along the lines of how many objects are interacting with that single light source. As you've said, a directional light might be less resource intensive if all the are interacting with is a single object. A wide spot light interacting with a bunch of objects may be more impactful than a directional light.

People may get different results, I haven't done much testing in VR just in desktop mode and simply assume the results would be similar.
 
I want to put this up as a guide pretty soon, but please if you guys have anything further to contribute or think I should change let me know.
 
In VaM, if you have a good GPU, you are most likely CPU-bound in most scenes, and the biggest factor for CPU is physics. 1.X physics is a big bottleneck due to how Physx in Unity works. The biggest contributor to physics in VaM is soft-body physics, followed by Advanced Colliders. For scene makers, I highly suggest selectively turning off glute and/or breast soft physics if they are not important for that particular scene. You can get a large boost in performance that way.

1591632007933.png


Turning off Advanced Colliders might also be acceptable on scenes where the person is not colliding much with other objects, like in a standing dance scene:

1591632048171.png


I sound like a broken record, but physics in 2.X is getting completely reworked to improve both performance and collision accuracy.
 
Keep your Pixel Light Count to 6. It ensures you will see every scene as the creator intended, if you have your Pixel Count set to 2 or 3, and the creator has 4 lights in the scene, you will only not be able to see all 4 lights at the same time.

To support what kemenate says, I would strongly suggest NOT to do that. We're in a thread that discusses performances so I'll assume we're talking about VR... not beauty shots. If a creator has used 6 -overlapping- lights setup this is kind of crazy with the actual version of VaM. And also, the creator can force pixel, so it won't respect your settings anyway.

Having a pixel light count at 3 max when playing AND creating is the most efficient way to control your performances AND the look of your scene.
If you start to see priority switch when using auto mode on lights ( when something looks dull suddenly because the light source switched to vertex ), this is a clue that you have too much light overlapping and by extension a potential performance issue.

As I was saying, you can push beyond the options by forcing pixel if you want... this is exactly what I've done in the scene I'm working on, and I'm at 75ish FPS on desktop, which is really low.

On the pixel lights performance part also :

- The more overlapping lights you got, the worse the perfs are when you have moving objects on the same spot. It as the same effect if you move your head around. Tweaking light using a static camera position does not reflect the performances as the same scene watched from a VR point of view where the player moves his head around a lot. For instance I made the test a while ago : on a simple room with 2 assets in the view and 6 overlapping lights on the floor and wall, and two characters off camera I was around 125fps. As soon as I was moving the camera by hand just a tiny bit ( and still keeping the characters off camera ), the average framerate was dropping to 70fps.

- Overlapping lights have a bigger impact depending on the geometry complexity ( which is kind of normal but not everybody knows :D ). Several overlapping lights on a basic wall = not really expensive. Several overlapping light on a single character = ouch.

On the perfs tweaking subject, as you said, spotlights are pretty efficient. But if you're using point lights, one thing to optimize them is to bring the perf monitor up and tweak the range slider. You can sometimes get back 10 to 15fps with overlapping pixel lights just by reducing the range without loosing too much illumination on the scenery.
 
To support what kemenate says, I would strongly suggest NOT to do that. We're in a thread that discusses performances so I'll assume we're talking about VR... not beauty shots. If a creator has used 6 -overlapping- lights setup this is kind of crazy with the actual version of VaM. And also, the creator can force pixel, so it won't respect your settings anyway.

Having a pixel light count at 3 max when playing AND creating is the most efficient way to control your performances AND the look of your scene.
If you start to see priority switch when using auto mode on lights ( when something looks dull suddenly because the light source switched to vertex ), this is a clue that you have too much light overlapping and by extension a potential performance issue.

Thanks for your input. I'll keep this in mind. I'm happy to be corrected. I've actually been limiting lights in my upcoming projects because of this. I'll update the thread.
 
Ho ! I forgot, little tip for desktop creators : when checking your performances, don't forget to disable the UI by using F1. The overall UI and (if you have it activated) the targets are really putting a strain on the framerate.
 
Nice thread and some useful info. My biggest issue as a user is loading scenes where the creator did everything in desktop mode which has a much higher performance headroom than VR. I only use VAM in VR and for interaction, not for screenshots, so many times I load a scene it is full of performance hogging lights, effects, clothing, too many ATOMS, or post processing effects that kill performance and then I have to spend time going in and deleting and adjusting things till performance gets back to normal. For me it's not a huge problem since I have a gaming rig with a 2080ti, but I know not everyone has a rig like that or never uses desktop mode like myself. I just wish creators would take that into consideration in the future.

Personally I am not going to change VAM or VR settings to get something to run, that should be on the creator, not the user IMO.
 
Nice thread and some useful info. My biggest issue as a user is loading scenes where the creator did everything in desktop mode which has a much higher performance headroom than VR. I only use VAM in VR and for interaction, not for screenshots, so many times I load a scene it is full of performance hogging lights, effects, clothing, too many ATOMS, or post processing effects that kill performance and then I have to spend time going in and deleting and adjusting things till performance gets back to normal. For me it's not a huge problem since I have a gaming rig with a 2080ti, but I know not everyone has a rig like that or never uses desktop mode like myself. I just wish creators would take that into consideration in the future.

Personally I am not going to change VAM or VR settings to get something to run, that should be on the creator, not the user IMO.
I agree that a creator should consider the impact on users machines when distributing a scene to the masses; however, most of what I learned as a user was specifically dissecting scenes for this purpose. It's not everybody's cup of tea to go digging around, I understand that. At the same time, not all users or creators use VaM in VR so it's hard to expect them all to do this. I personally test each scene in VR despite doing most of my editing in desktop mode; although, I can kind of gauge what the FPS in VR will be versus what my desktop tells me. Of course, my VR machine is more powerful than my desktop.

As a point against what you are saying though, almost all game developers include performance settings in their games so users can tweak them to balance performance and quality. It's impossible for a dev to know every users system so they do their best to ensure people know what to expect if they buy the game based on system requirements. PCs aren't consoles and it's not unusual to expect the end user to have some responsibility when it comes to tuning for performance.
 
Also, you can't really summarize VaM as a standalone VR experience thought and scaled for a specific hardware.

Let's imagine Maxman likes scenes with 2 characters a bed and a single pixel light and sets his options based on that. It does not mean all creators are not going to be more creative or not release scene that are bigger than this.

VaM is more a tool than a game. Creators are gonna try to push the boundaries of what the tool can do, and it will be impossible to ask for a 90fps experience for every single scene... from a solo scene with 2 assets to a complete story with a ton of atoms, sound, textures and scripting.

You can ask for a developper that knows exactly what the engine is going to render to optimize the game accordingly. You cannot ask for creators in the case of VaM to be able to do the same. Especially since creators ( with a bit of knowledge and will to optimize ) are also making a scene that work on their setup. A creator with a low end configuration will produce something that will run on almost anything. A creator with a super computer will probably build something that is a bit more demanding.

Which supports exactly what Julze says at the end : settings are made for a specific game. See a scene in VaM as almost a standalone game. Some games needs a tiny PC to run even on highest settings. Some games needs a big PC to run even on the lowest settings.

Althought, at the moment we all know that the bottleneck is caused by the engine version. It will be way smoother in 2.x :)
 
Physics Rate set this to Auto
Physics Update Cap set this to 3

These are still a grey area for me.

I seem to find setting Physics Rate to fixed 45FPS works best for me in Oculus VR
And I still don't really know what exactly Physics Update Cap does. I found it best set to 2

I was just thinking there. It would be great if we had a plugin that would be able to dynamically lower various settings in VAM until the current frame rate hits a user defined value e.g. 45FPS for me appears to be the minimum I am comfortable with - I only started doing the hair physics optimizations myself recently and went from getting only about 20FPS to about 45FPS in same scene with this and a few other optimizations (like removing redundant background stuff)

I never wrote any plugin before but I wonder how easy it would be to do - I know there was one previously written which was able to pull common buttons into a central panel wasn't there? I don't know how to programmatically parse a scene and find various objects though.

p.s. " bring the perf monitor up and tweak the range slider " - is there a shortcut key to bring Performance Monitor up? its a pain having to go into menus in VR and turn back to Edit etc just to get it up, also wish it was off to side instead of stuck right in middle of your view. Even if there was a "micro" version of it which just displayed FPS and nothing else in corner it would be much better.
 
Last edited:
For me it's not a huge problem since I have a gaming rig with a 2080ti,

It's crazy you have to fix others scenes to get decent VR performance with a 2080Ti o_O
Imagine how bad it is for poor people like me with just a 1070 ☹
 
Very good summary! Thank you.
Call me Captain Obvious, but I would like to add that some custom clothes and some asset environments have a huge impact on performance. There are some custom clothes that are poorly optimized and have way too much polygones. The same holds true for some asset environments. There are some clothes and assets that looks great and have a very small impact on FPS and other that looks far less complicated but will make your VR stutter (and vice versa, obviously). It is all about optimisation, complexity and maybe lights and reflection probes and stuff like that in Unity. I have a very old PC (i7 4970K GTX9080ti) and in VR I can feel fps drops in my stomach very well before reading the FPS count. ? Only solution if your FPS-drop is too much: don't use them.
 
@geo_gan I'm not rich by any means, I just am good at saving up for stuff. I'm very frugal.

@Captain Obvious. Yeah, I learned that as well. Some of the downloaded assets are so resource hungry that they aren't even possible to use in the current iteration of VaM. Hopefully this will all change once 2.0 is out.
 
@geo_gan I'm not rich by any means, I just am good at saving up for stuff. I'm very frugal.

@Captain Obvious. Yeah, I learned that as well. Some of the downloaded assets are so resource hungry that they aren't even possible to use in the current iteration of VaM. Hopefully this will all change once 2.0 is out.

I doubt VAM2.0 will do anything to speed up poorly optimized resource packs. That is just caused by polygon count and how fast your GPU can render that many polygons (given the same lighting in scene) - your GPU and polygon count in resources will not change in VAM2.0!

In fact the more advanced rendering engine may be slightly slower than current engine if it has to do a lot more work. Moving physics to more advanced parallel core capable version won't help in this situation.
 
Back
Top Bottom