microsoft / MRLightingTools-Unity

A Unity library and MRTK extension for estimating and replicating the current environment's lighting on Mixed Reality devices.
MIT License
188 stars 25 forks source link

Performance multiple stamps #1

Closed jelmerS2 closed 5 years ago

jelmerS2 commented 5 years ago

Using ARFoundation and testing on an iPhone XS (should be fast), performance is very slow when Single Stamp Only is switched off, no matter what the other parameters. It seems as if the Stamp FOV parameter is not respected, and that the script takes a stamp every x frames, no matter if you keep viewing from the same camera angle. I would expect that no stamp would be taken, when there already is a stamp from the current viewing angle.

maluoi commented 5 years ago

Thanks for bringing it up! What version of Unity are you using?

jelmerS2 commented 5 years ago

Using 2018.3.4f, XCode 10.1, iOS 12.1.4 packages: ARFoundation preview 20, ARKit preview .17 PS: Didn't install the Mixed reality toolkit package from the package manager, I suppose that's not necessary for ARFoundation builds

maluoi commented 5 years ago

Hey @jelmerS2, I added some changes in the development branch that should fix your issue! If you could give it a try and verify, that would be awesome :)

jelmerS2 commented 5 years ago

Hi, Yes performance has improved massively, thanks! However now I can't see much happening after the initial "stamp" (single stamp is off). But it could be me, I'm not exactly sure what I should expect.

maluoi commented 5 years ago

Stamps after the first one aren't likely to be super obvious, there shouldn't be much or any visible popping. The stamp will happen on the cubemap in front of you, but visible reflections typically come from the part of the cubemap behind you!

The best way to know for sure is to look at a reflective sphere, and check it to see if there are reflected features from two opposite sides of the room.