Unable to get RemoteView outputs on client side

we are experimenting with VTK-js and RemoteView and started simply with the RemoteView example but we’re unable to get it working.

Running the server via vtkpython/python will result in the page displaying the cone, but when interacting with it only the rendering on the server is updated. So interaction happens on the browser, motion is visible on the server. The image on the browser remains still. Upon interaction, the buffer size on the render changes every time (the window resizes when clicking and releasing on it).

The tests were performed on two setups:

  • NixOS Linux

    • Python 3.9
    • vtk 9.0.1
    • wslink 1.1.0
  • Windows 10

    • Python 3.9
    • vtk 9.0.20210717.dev0
    • wslink 0.1.14

We looked around for hints about this, but were unable to find any definitive solution.
There are no warnings on server side (started with --debug) nor the client side (in the developer console).
The code is exactly the one found today on the example page.

Are there any specific requirements to get it working?
Thank you

I’ll see if I can try it sometime next week, but can you test with vtk-9.1-(rc) available from PyPI which will bring the latest wslink and many improvement we’ve done lately. This should be more in sync with the current version of vtk.js.

Also we have an example app using that remote view in a Vue context here. Can you see if that works?

By the description, it seems that VTK is not pushing the image to the client even if the events seems to go through. I’m not sure why. Maybe it is related to the recent change that I did within vtk.js and wslink.

Also, depending on what you are trying to do, we have a new tool that rely on vtk.js to do this kind of things while removing most of the app building complexity. Since it is very opinionated to lower the entry bar, it may not be a good fit here, but I though it could be worth mentioning in case you don’t really want to create your own web stack.

1 Like

Hello Sebastien, thanks for your answer and sorry for the late reply.

We tried using version 9.1.0-rc2 (built from sources) and it helped!

  • In the RemoteView example on the VTK-js website, the result is now as expected: it is possible to control the scene and both server and clients are now updating correctly. This seems to work properly on Linux, but not on windows (possibly on building issues on our side, so we will try again tomorrow.
  • OTOH, for the Vue example you provided, both with version 9.0.1 and 9.1.0-rc2, the example is mostly not working and it seems that only controlling the slider will trigger an update on the server side (no changes on the client side, beside the very first buffer render). This is consistent on both Linux and Windows.

If there are any flags or options we could test to help in debugging, we’ll gladly help. In additio, I’m using nix package manager on Linux, so I could provide flake.nix and a flake.lock files for reproducible builds, if you are interested.

Also, we are aware of the new tool you mention, but in our case we are doing some advanced stuff so we will likely continue relying on VTK/VTK.js directly.


Thanks for your feedback. It is good that the vtk.js example works with latest VTK.
I guess, I will just need to “update” the vue template to make sure the latest wslink/vtk.js is used along with some of the small API change from wslink.

Also, I’m assuming you are building VTK from source because you have custom add-on classes? If not, using our pre-built package is really convenient. :wink:

Ok, I hope it’s not too much work.

Just curious: if wslink/protocols/API changes are not compatible, can’t that be reflected on semantic versioning?

I’m building from source because NixOS is a source-oriented distribution, but it’s pretty convenient this way as well :grinning_face_with_smiling_eyes:

Thank you, I’ll mark this as solved.

That is just a guess since I know I changed the API on the JS side of wslink (not the server).

Otherwise it is not much work at all… Just need to get to it. :wink:

1 Like

I’ve just updated the project to work with the latest versions (vtk.js/wslink/VTK9.1).
If you are curious on the changes I had to make, here is the commit

1 Like

It works, no issues found. Thank you a lot!

1 Like