shycats / VirtuCameraBlender

Blender add-on to use with VirtuCamera iOS App for realtime camera motion capture.
https://virtucamera.com
Other
137 stars 7 forks source link

Freeze on starting to record #3

Closed dizyz closed 3 years ago

dizyz commented 3 years ago

PC: Ryzen 3900X with RTX 2080 Super, Windows 10 (20H2), Blender 2.90.1 iOS device: iPad Pro 2020 (11-inch)

Everything works fine with the default cube setup. (This is a very promising app + plugin!).

Then, I tried a more complex scene, which is the official demo scene "Mr. Elephant" from Blender (https://download.blender.org/demo/eevee/mr_elephant/). At first, the tracking system works fine, I can also stream blender viewport to my iPad easily. However, whenever I hit the record button to start recording camera movement, the stream would suddenly freeze, and the blender plugin seemed to stop responding to the iOS client. Even when the blender viewport is at wireframe mode and the streaming from blender to iOS is not enabled, still, that record button would make the plugin suddenly paralyzed. And I have to manually click "stop serving" and then click "start serving" to be able to reconnect to the server and make tracking system work again.

I believe this very well may not be a performance problem since my machine is a pretty decent one if not the best specced. At least it should handle the wireframe mode with no problem.

Would love to know the cause of this and maybe the solutions. Thank you so much.

dizyz commented 3 years ago

I should add that, after tapping the record button on iPad, the stream freezes, and no keyframes are recorded in Blender either.

shycats commented 3 years ago

Hello @dizyz, thank you for reporting this.

I've tested mr_elephant scene and found a bug when recording animation on cameras that are not in any view layer, like Camera.003 in that scene.

As a workaround until I fix this I recommend only using cameras that exist in a layer view.

As a side note, that scene seems to have a frame range starting and ending on the same frame, and that would explain why it stops recording instantly after hitting the rec button.

dizyz commented 3 years ago

Great! Thank you for this amazing project. I've had this idea of using my phone as a virtual camera for blender for quite a long time, but just didn't have the time to actually develop an app for it. Glad that someone finally made this, and it is packed with even more features than I would have put into it.

Looking forward for the fix. And again, amazing work!

dizyz commented 3 years ago

Any plan for an Android version? Would love to see that. Android has something similar to ARKit (which I assume virtucamera iOS app is using) called ARCore. And their environment analysis capabilities are pretty the same, (though the iOS devices that are with LiDAR would obviously be more accurate).

shycats commented 3 years ago

Hey @dizyz I'm glad you like the app :) At the moment I don't have plans for an Android version, but I don't discard it in the future.

About the bug, I've just released a new version of the add-on. I had to stop listing hidden cameras on the app, as Blender complaints about applying the Euler Filter on them, and that causes the error. I understand that this is probably not the ideal solution, but will prevent the app from freezing. I will keep thinking about a long term solution for this.