So I have been playing around with different visualization tools the last few days. Generally, I use
gnuplot for all my plotting purposes and it does a great job producing paper grade plots. It even works quite well for just having a quick look at 3D data (like particle distributions et al.) or also 2D scalar fields, like a density field for example.
However, doing really fancy 3D visualization is not its purpose. I
have been testing
povray for that before and I got a few fancy images. But this does not quite give this immediate feedback of what you are doing: changing the colour mapping requires, naturally, a re-render, which for a decently sized volume data can take a couple of minutes.
So, something else was needed. First shot was
Vapor, developed chiefly by the National Center for Atmospheric Research's Scientific Computing Division and released in source and binary under a BSD license. That thing is aimed at geoscience visualizations, but what the heck. The interface is very intuitive, but I had some issues with converting my data into a format that Vapor can read. Technically, that should not be too difficult, but as soon as I have to write (okay, generate with a command-line tool) an XML file, I shiver. Not that the idea of structured meta-data would be bad, not at all. It is just that this is overly complicated for 'just a test'.
Instead of using my cool simulation data, I just played around with their demo data files (nice that they are provided!). Works quite smoothly and generates impressive volume renders which you can very nicely highlight with an easily edited opacity curve.
But because I wasn't too happy with the data import, I tried another tool. One that I remembered from my
CFD course:
VisIt. This was developed by the Department of Energy Advanced Simulation and Computing Initiative and is also available freely (also a BSD license) and is mainly aimed an 'terascale' simulations. Meaning that your data is located on a remote machine (most likely a cluster, providing also massive parallel computing power to perform data extraction and reduction on the fly) whereas the actual display is at your desktop. Now, I don't (yet) have terascale simulations, but VisIt can also handle small, every-day data-sets.
And it is much easier (or way more complicated, depends on your approach) to get data into a format to actually visualize it, because VisIt supports a lot of different data formats already out of the box. Especially it supports a simple ASCII format that allows me to directly plot the density field traced by the particles in the simulation. So I just took an old test simulation and started to play around with the features of VisIt.
I am impressed. It is extremely easy to get to decent results fast. Mastering that beast is certainly something that is not done in a day, especially I need to figure out how to do nice legends and axis labels, but for a three hour playing, I am quite content with the following figure:
Shown here are isodensity contours of the dark matter density field in a simulation box. The 3D contours are generate from a particle distribution (each particle knowing the local density) by first resampling the density on a regular grid (first data modifier) and then using this grid to extract the isodensity contours. Only three density contours are used, otherwise it becomes really crowded. The point is to on the one hand visualize the actual haloes (orange and green balls, where the orange is a higher density) and on the other hand also see the filamentary structure in which the haloes are embedded. Additionally, three slices are applied to the density field to directly show the field in these planes.
The next step will be to show a zoom in on the massive cluster you can see in the top left part in the box. But that is for a another play-time.