Generic viewer used mainly for SOFA (Simulation Open Framework Architecture) simulations.
It is built as a generic viewer using Qt and OpenGL, and plugins.
The GUI is composed of a main 3D view, a graph view and zones where the plugins can add buttons, widgets and menus.
A property system is used for the edition of objects in the graph. It is based on templates, supporting standard C++11 types (plain old data, vectors, arrays, and vectors of arrays or 2d arrays). A serialization of the graph to and from xml files is proposed.
The plugins add document types, each document associated with specific file types. The documents must manage the OpenGL rendering but a very basic render library is used for most of the created plugins.
Existing plugins are the following:
Using Assimp, open any 3d model for viewing and basic editing.
Materials can be modified, nodes can be moved and rotated.
Use double click on a graph item to access its properties, right click to add or remove a item (here only for the Nodes and Instances).
Basic visualisation of SOFA simulations, custom rendering (in another thread than the simulation), properties edition with instantaneous updating. This plugin use the Sofa Front End library developed by Digital Trainers (currently still private), which makes interfacing with SOFA easier.
This offers the same basic features as the runSOFA application bundled with the SOFA framework. Double click on an item in the graph to open its properties. For the time being, the graph is not automatically updated, it is necessary to click the "Update graph" button.
Note: when opening scenes using resources (meshes, textures) in another directory, the latter must be added to the Sofa paths list. On the first time opening a Sofa scene, a dialog box will ask to fill this list. If you will open Sofa examples, you must add "[...]/Sofa/share".
The user can create a SFE server from the opened simulation, which can then be accessed by another application running the SFE Client plugin.
Go to Tools/Launch server, modify the parameters if necessary, and click Ok.
The Read only parameter make it so that the server rejects client calls that would modify the simulation. It is recommended to leave it unchecked for now, as some actions on the client side will indefinitely block.
Connect over the network to a SFE server. Same features as SFE Local (rendering, edition, ...)
Multiple clients can connect to a single server, view and modify the properties of the simulation.
Once a server is running, go to File/New, select "Sofa Client". Enter the address and port of the server, and click Ok.
Simplified creation of SOFA simulations using higher level objects.
This uses the SGA library created for Blender SOFA, for adding SOFA physics to graphical scenes.
The workflow is usually:
Go to File/New, select Sofa Graph Abstraction.
An empty graph will be created. It is possible at any time to save the document as an XML file (with the .sga extension) and reload it later.
Go to Tools/Import mesh. All models types supported by Assimp can be imported.
If you click the Run button at this step, a dialog box will open asking for the type of simulation to use (Constraints Collision is usually the best choice), but then the screen will turn black. Click Run again to stop and return to the edition mode.
We now have to add roles to each model (physics, collision, visual).
A right click on an Instance will open a context menu from which it is possible to add a role to an object.
Then the type must be chosen.
A double click on the created object will open its properties.
The Run button will convert the graph to a SOFA simulation, and run it. Clicking it again to stop the simulation (destroy it), and return to the edition mode.
We then can export the scene. Go to Tools/Export Sofa scene and save the file.
For now the export does not create separate files for the meshes and the materials. The latter can be lost in the operation.
It is then possible to load the scene using the SFE Local plugin (File/Open, choose the exported file)
We see here the SOFA graph instead of the simplified SGA one.