I have been working on displaying the dark matter from the HDF5 data sets that I have been working on for my astronomy work. Over the last couple of days, I got the loading from HDF5 working and the translation into my local coordinates. The volume is changed from point coordinates to voxel coordinates, then scaled and clamped to the bounding box size. This has to be done because the camera slowly zooms in over the course of the animation and some of the gas / dark matter can leave the simulation.

The first result was encouraging, but wasn’t what I expected. In the following image, the green points is the dark matter volume displayed in Drishti.

The problem was that Drishti sucks at displaying dynamic range. The internal possible range of values is limited to the size of an unsigned char (0-255). While this would limit the memory usage, I wish there was an option to use short int, or even float because in the image above, all the dark matter points are physically there but the dynamic range is too high to accurately display them. This may have implications on how my other volumes are being displayed as well. I realised that dark matter for this simulation doesn’t have a mass associated with it and doesn’t share mass between voxels either. To check that the points were actually there, I fired up stereo2 and took an image of the raw points.

So the points are there, my code and Drishti just weren’t displaying them properly. I fixed the dynamic range issue by setting voxels that contained dark matter points to 1. The end result is shown below, and what is expected. Hopefully I can get some awesome movies going with the dark matter as well.