ia-dev / opensimQt

CPP GUI for OpenSim
Apache License 2.0
5 stars 6 forks source link

MS0108: Visualizer functions #10

Closed idhamari closed 4 years ago

idhamari commented 4 years ago

In this issue, we integrate the visualizer with the navigator. These tasks can be done in any order, the future work is not important for now :

idhamari commented 4 years ago

@yasseerr
I found this interesting example

I think we can use similar idea to implement the buttons in the top left of the visualizer in the java interface. We can even use cooler 3D buttons. What do you think?

idhamari commented 4 years ago

@yasseerr just checked, it seems vtk 9 will be released soon and 8.2 is stable. Please use 8.2.0. This will help to implement the skybox and other missing features.

Screenshot from 2020-03-09 18-37-03.

yasseerr commented 4 years ago

we will try and implement those buttons using vtk and hope it wont affect the performance, and for vtk i m already using the 8.20

idhamari commented 4 years ago

and for vtk i m already using the 8.20

Excellent I just build it and the compilation works but I get this runtime error:

 : error while loading shared libraries: libvtkFiltersExtraction-8.2.so.1: cannot open shared object file: No such file or directory

Any idea? if you don't I will check this tomorrow.

idhamari commented 4 years ago

The error above is fixed and everything now works. The problem was related to multiple Qt version installed. I removed all of them and reinstall qt using the terminal:

       sudo apt install qtdeclarative5-dev --reinstall qttools5-dev libqt5x11extras5-dev  qtchooser qt5-default qtwebengine5-dev qtcreator libqt5charts5-dev libqt5opengl5-dev libqt5designercomponents5 libqt5gstreamer-dev libqt5multimedia5-plugins libqt5x11extras5-dev libqt5webview5-dev libqt5websockets5-dev libqt5webkit5-dev libqt5webenginewidgets5 libqt5webenginecore5 libqt5webchannel5-dev libqt5svg5-dev libqt5qml5 libqt5xmlpatterns5-dev libqt5xdg-dev

This installs Qt-5.9.5.

idhamari commented 4 years ago

@yasseerr

Its been a week since the last commit. Please report here your progress or difficulties.

I found someone for the python milestone so I hope we will get some progress soon.

yasseerr commented 4 years ago

@idhamari sorry for the delay duo to academic/home tasks i will return as soon as possible for the progress i m currently working on the properties widgets which have different sub widgets for the functions/objects/... to edit the properties and need model on it own, and Qt does not have the sheet tool provided by java so a model was developed from the ground and this is the reason for the delay for the python ready to help with integration when its needed to achieve more progress

idhamari commented 4 years ago

Well done!

I think you should start with the visualization stuff first. For editing the properties, we have a workaround e.g edit the text in the model file.

yasseerr commented 4 years ago

Thank you! ok ,i will focus then on the visualization first , the properties can be displayed for now and the editing widgets and models for the properties will be implemented afterwards

idhamari commented 4 years ago

@yasseerr

I have a problem viewing this model that has .obj :

tst.zip

The model appears correctly in the java interface but not in our opensimQt

Could you please check what is the problem? this is urgent as I am working on a similar model now.

yasseerr commented 4 years ago

@idhamari i just checked and it seems we were using vtkXMLPolyDataReader to read the vtp files which they where xml files but the .obj files are not XML files so do you want to fix that first and create Obj files handlers , becuase i was working on adding the button widgets inside the vtk visualizer using the vtkTexturedButtonWidget and focusing on two issues loading the png images to the vtkImageData because the given exemple create the texture/image by code and the second issue i m working on is how to prevent vtkRenderWindowInteractor from stopping the qt Interface to intercept the clicks

idhamari commented 4 years ago

@yasseerr

Thanks for the information. Our interface should support at least all types that are supported by the current java interface.

I found a workaround so please continue what you are doing and go back to this as soon as you finished.

yasseerr commented 4 years ago

Hi! do you want to migrate to vtk 9.0 r2 release 17 days ago or keep using vtk 8.2 as the first fix some issues

idhamari commented 4 years ago

as the first fix some issues

if vtk 9 is useful, please use it.

yasseerr commented 4 years ago

ok ! thanks but a rebuild is needed when testing as some classes like QVTKOpenGLWidget became deperecated

idhamari commented 4 years ago

Ok, I will rebuild vtk to use vtk 9.0 r2

idhamari commented 4 years ago

@yasseerr

I just checked the last update. Everything works and It looks excellent but there is a performance issue.

yasseerr commented 4 years ago

@idhamari yes the last version is so slow compared with the 8.2 i m currently rebuilding to debug mode and trying to find the problem so we can implement the skybox+textured ground

yasseerr commented 4 years ago

@idhamari i was using --debug if you are building vtk with debug and not debbuging the code switch to DebWithReleaseInfo and it will be fast

idhamari commented 4 years ago

@yasseerr I am already using release build in Ubuntu. I will test it next week on Windows and see if there is difference.

For now please try to complete this task before the end of this month. If there is something takes long time, please create a new issue describing the problem so I can add a solution or a workaround.

yasseerr commented 4 years ago

@idhamari ok! it should be working smouthly in wondow and i will try to finish before the end of the month but some vtk bugs toke some time maybe with vtk 9 it will be straight forward,

for the rename other visualizer-tabs what does it says exacly

idhamari commented 4 years ago

but some vtk bugs toke some time

That is why we should open new issues for them.

for the rename other visualizer-tabs what does it says exactly

The idea is to have them hidden (with no title) for now and display them when needed. The programming names can be something like vsVWTab1 vsVWTab2 ...etc short for vsVisualizerWindowTab

yasseerr commented 4 years ago

ok! you can add and remove tabs from the QTabView programatically at any time but what is their content, do they start empty or they represent the OpenGL and Three.js tabs

idhamari commented 4 years ago

Then leave them for now. When we need them, we use them.

yasseerr commented 4 years ago

alright so i will remove them from the view and add them at any time during the execution , lets say when you click a button

idhamari commented 4 years ago

Next ToDOs:

idhamari commented 4 years ago

Only two more tasks and we close this issue.

yasseerr commented 4 years ago

@idhamari hi! before closing just for the rename in the popup menu you are willing use xml instead of openSimObject Properties (saving the model to the file) right? if so what library do you prefer OpenSim::Xml , TinyXml , Qt xml

idhamari commented 4 years ago

@yasseerr

you are willing use xml instead of openSimObject Properties (saving the model to the file) right?

I prefer OpenSim::Xml, this gives us more understanding of how opensim works. If this is difficult, then let's use Qt.

yasseerr commented 4 years ago

ok then a class vsXmlModelUtil will be created to handle xml operations

yasseerr commented 4 years ago

@idhamari the rename(model,body, from xml)/hide/show actions are added and mereged with master, give them a look and is there any priority task before switching to simulation

idhamari commented 4 years ago

@yasseerr

I just test it and everything works, thanks for your effort. Please start working on the next milestone when you have time.