opensim-org / opensim-viewer

Front end of web based viewer of OpenSim models, data
Apache License 2.0
13 stars 3 forks source link

Encapsulate a visualizer in a Web application / HTML page #95

Closed jsn-inrs closed 1 year ago

jsn-inrs commented 1 year ago

As explained in the topic How to include a visualisation in a web (html) page ? in OpenSim's forum, I'd like to insert the Visualizer in a HTML canvas (or something like that), so that the 3D-model can be displayed in a web application in a common browser (Firefox, Chrome). Is it possible at the moment ? The idea is to run features based on OpenSim's API from a web application, without having to install the entire software and its graphical interface on a dedicated workstation. Please do not hesitate to contact me for any further information.

aymanhab commented 1 year ago

Thanks for the note, this is what we're actively working on in this repo. If you follow the link here you'll see where it stands for some baked in models, we're making this more general and available for the community and to handle arbitrary models. https://comforting-speculoos-d9e100.netlify.app/models

In the meantime if you need specific functionality in the 3D view please describe here or on separate issues. Thank you

jsn-inrs commented 1 year ago

Very fine, thank you, Arm26 should be a first use case. MoBL model (upper arm from the paper of Saul et al.) would be ideal, if possible.

jsn-inrs commented 1 year ago

Actually, I think I don't need another feature in the 3D view. What I plan is to have a web page which includes:

If someone has already built something similar, or if someone could help do so, I'm very interested in.

aymanhab commented 1 year ago

Thanks for the details/feedback, one key detail to point out here is that the name "viewer" was intentional to indicate visualization/plotting of precomputed motions/results rather than create fresh/new ones.

For example, posing a model through a trajectory can be precomputed and rendered without a problem (with OpenSim running on the backend, computing muscle wrapping and satisfying constraints etc.), however arbitrary combinations of sliders that produce novel poses as done by the GUI would require either running the OpenSim API/engine in the browser or expensive communication with the backend. So the plan is to allow for the specification of a json file that describes what sliders the user wants and also a chart/group-of-charts describing what quantities to plot (at least as of now).

Would love to hear your thoughts and the use case you have in mind so we can brainstorm and/or come up with a satisfactory solution.

jsn-inrs commented 1 year ago

Thank you for your answer and your interest in my request. Can we continue this discussion via private messages so that I can send you information about work that has not yet been published?

aymanhab commented 1 year ago

Sure, let's pick up the discussion by email.

Best regards, -Ayman

On Mon, Oct 2, 2023 at 12:21 AM jsn-inrs @.***> wrote:

Thank you for your answer and your interest in my request. Can we continue this discussion via private messages so that I can send you information about work that has not yet been published?

— Reply to this email directly, view it on GitHub https://github.com/opensim-org/opensim-viewer/issues/95#issuecomment-1742514864, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6JY4ANEFCLQINHIBLQINDX5JTO7ANCNFSM6AAAAAA47UUJL4 . You are receiving this because you commented.Message ID: @.***>

aymanhab commented 1 year ago

Will close as the general issue is being addressed, specific discussion don't belong here