Forum Navigation
You need to log in to create posts and topics.

Rendering Polyhedral Matching in Viewport

Dear OVITO team,

I am currently working with the Ovito PRO gui. I'm looking through the rendering documentation but I don't see an easy way to just put in the polyhedral matching data (in the GUI pipelines window, i've attached a photo) into the rendering viewport.

Is this visual part of a data table or is it all done manually via matplotlib so that I would have to do the same in the rendering viewport via a simple python script and color legend/text with dynamic variables?


Thank you!


Uploaded files:
  • You need to login to have access to uploads.


Yes, if you would like to include these data in a rendered image or animation, you currently have to add a Python layer to the viewport and write a script that renders the data into the image in the specific way you want it. You may have seen already this example code, demonstrating the use of matplotlib to render a histogram plot of data dynamically computed by OVITO.

In principle it would be possible for us to extend OVITO and offer a built-in viewport layer type in the future, which allows inserting a plot of a data table into the rendered image directly. However, such a data plot would look similar to what you can currently find in OVITO's data inspector panel, and there would only be few configuration options for controlling the visual appearance of the plot. I'm not sure if such a program feature would be able to satisfy the varying and sometimes very specific requirements of users -- unlike the Python-based solution, which provides much more flexibility and room for customization. Please let me know what you think.

Furthermore, in your case you seem to ask for a tabulated display of the structure counts (as seen in the PTM modifier panel) rather than the bar chart that is commonly generated from the same data table (as seen in the data inspector panel). This case already shows that it will be difficult to meet the varying needs of different users.

Perfect. That's what I was looking for. I guess I just missed that example.

Thank you, Dr. Stukowski.

By the way, is there a repository for people to add ovito scripts or information to share with other users in case they find it useful?

You are welcome.

Yes, having some kind of public repository or collection with user-provided scripts for OVITO would be generally useful, I agree. That could safe many users from reinventing the wheel. But there are some difficult questions associated with this idea, for instance:

  1. How can we give authors the possibility to update, improve and maintain their scripts after they have been uploaded to the central repository?
  2. Who takes responsibility of a script after its original author is no longer available? Who provides support to other users who want to use the script, who have questions or specific adaption requests?
  3. Should authors provide some sample data along with their scripts to demonstrate the functionality? Were is that data stored?
  4. Are there minimum requirements regarding the documentation and source code comments that uploaded scripts must provide?
  5. What is better: A central repository managed by the OVITO team hosting all the scripts, or just a simple directory of links pointing to GitHub/GitLab repositories, for example, which are managed by the original script authors?

Feel free to comment on these open questions. Other participants of this forum are invited too. We will try to find answers to these question in the coming months. Perhaps there are already other script repositories for other software projects out there that we can use as suggestions. For instance, I am wondering if there are public repositories for LAMMPS or HOOMD simulation scripts, or for matplotlib, for example.