Fixed (1.20.1.6) Performance drop on 1.20.1.5 for some CUAs with realtime reflection quality

via5

Well-known member
Messages
132
Reactions
389
Points
63
I have a scene that dropped from 30-35 fps to about 15. Looks like the physics times have significantly increased, going from 16ms to a steady 24ms. Settings at Max, MSAA 8X, Soft Body Physics disabled. Ryzen 7 3700X, 32GB of RAM, RTX 2070 S.

There's a CUA in this scene, which has no impact on fps on .4 but tanks it on .5. I'm guessing " CustomUnityAsset - realtime reflection probe quality setting now enabled by default" in the patch notes has something to do with it. As a temporary workaround, attaching this script to the offending CUA fixes it:

Code:
using UnityEngine;

sealed class DisableRealtimeReflection : MVRScript
{
    public override void Init()
    {
        foreach (var p in containingAtom.GetComponentsInChildren<ReflectionProbe>())
            p.mode = Rendering.ReflectionProbeMode.Custom;
    }
}

I've used Custom, but Baked also works. I don't know the difference.
 
Last edited:
This was changed on purpose to enable realtime reflection probes to work for custom unity assets that include them. @hazmhox requested this feature as he wanted to use it with some of his assets.

So I would consider this a "bug" on the CUA itself, not VaM. Can you PM me a link to the CUA so I can double check it?
 
That's why I suggested to use the "by script" for the probe itself on the other thread @meshedvr ^^

@via5 , meshed is right, if a probe exists, it should be configured properly ( more or less it's the "fault" of the creator / content author ;) ). A realtime probe is extremely intensive. It should be updated by script or swapped to a custom probe with a manual baked cubemap.

The difference between Baked and Custom is that, Baked does not capture realtime objects, Custom does with a specific flag enabled.
 
> Can you PM me a link to the CUA

Sent.

> I would consider this a "bug" on the CUA itself
> if a probe exists, it should be configured properly

Makes sense. It's frustrating to get a change in a dot release that cuts my fps by half in an already existing scene though. I don't care that much anymore because my script fixes it, but can you at least put a toggle somewhere?
 
If you know how to script and want to keep the probe, you can try updating it every second instead of every frame, and use an "Individual Faces" time slicing.

The only thing possible would be to have a toggle in the options that disables the realtime probes.

This is the problem with games like this : you have a community that produces content divided in several layers going from "I have not actual clue what I'm doing but I'm doing it" to "I know Unity like the back of my hand".

Honestly (not just because It is cool to have realtime probe for GI), this is a problem that highlights issues with existing assets and is a good way to see where you may have made errors when creating them.
It forces content creators to understand why some of their stuff put VAM to its knees and other don't : )
(and also gives you a bit of knowledge about the engine itself!)

Did you make the asset @via5 ?
 
> Did you make the asset ?

I didn't. Disabling realtime probes on it didn't seem to change anything graphically.

You're correct that there are many creators with various skill levels and that they are ultimately responsible for the content they create, but as an end user, this kinda sucks. I don't really care about the intricacies of Unity or the competence of creators, I just don't want to lose the already precious FPS I have to something I don't need.
 
I didn't. Disabling realtime probes on it didn't seem to change anything graphically.

Ok, it even means that the shaders used are not even using GI, that's a shame. Can you point me to the asset on the hub to see what it looks like ?


You're correct that there are many creators with various skill levels and that they are ultimately responsible for the content they create, but as an end user, this kinda sucks. I don't really care about the intricacies of Unity or the competence of creators, I just don't want to lose the already precious FPS I have to something I don't need.

I do understand. And I really feel you... but let's say the asset was released with the realtime probes enabled already. Even if the asset is beautiful, after testing it you may rate it badly / not use it, because it eats your FPS...

As you the end user, this is what makes the difference between a scene/asset that is made properly and thought for you who wants to have a great experience and an asset made without a bit of knowledge, test and attention to detail regarding how it looks and how it runs.

And obviously, you do care of the competence of creators... because if it was made with perfs in mind, you wouldn't have to post that thread right now ;)
 
I tried it out - this asset looks really nice with the reflection probe, and without it it looks pretty bland. If you disable via script as you have done, it remains being rendered but the probe has become static so it no longer affects performance. The creator of this asset could simply change the probe to just render once or do time slicing as @hazmhox mentions to lower requirements. They could also used a baked probe.

IMO - this asset should keep the reflection probe and maybe offer another high-performance option that has it removed.

I could also add a user preference to globally disable realtime reflection probes. I might add this for the next release, but I'm going to have it on by default for most preference levels (probably Mid and up).
 
> Can you point me to the asset on the hub to see what it looks like

I wouldn't want to point fingers. I can DM it to you if you want.

> If you disable via script as you have done, it remains being rendered but the probe has become static so it no longer affects performance

Right, that would be why I didn't notice a live change. Ultimately, I understand this is an asset bug and I might just have been unlucky, but there are plenty of old assets out there that might have the same problem and will never be updated. I think having a switch somewhere would be nice.
 
I just added a user preference for this so you can turn them off globally to go back to old behavior. It is on by default because I feel this is generally a visual upgrade that is worth it for the performance cost. Most reflection probes are low cost to render compared to the mirrored surface objects already in VaM.
 
I wouldn't want to point fingers. I can DM it to you if you want.

Yup of course! This is not a question to point fingers tho... it is always nice to share the knowledge and allow users to understand their mistake and improve the quality and performances of all content on the hub : )
 
Back
Top Bottom