Sister blog of Physicists of the Caribbean. Shorter, more focused posts specialising in astronomy and data visualisation.
Friday, 19 February 2016
Improved SPH particle visualisation in Blender
Today's, "I'm waiting for my simulations to finish" side project : improve visualisation of particle data.
A long-standing issue I've had with using Blender's halos to display particles (raw data example shown on the left) is that when you have many halos in close proximity, the halo opacities sum up so the circular shape of the halos is revealed (I call this the "glowing orbs problem", middle panel). Normally you can't just lower the opacity so that the total is lower, because in other regions the particle density is much lower so that would make most particles invisible. Sometimes that's a good thing - maybe you don't care about the low-density stuff, or you want to emphasise the density contrast - but often you want to show everything that's going on and preserve the density contrast.
Fortunately (?) smoothed particle hydrodynamics is more complicated than just taking a bunch of particles with gravity and seeing what happens. Particle properties are smoothed over different kernel sizes, which depends on the particle density. So each particle is assigned a different "smoothing length", in this case chosen to contain 50 particles. The bottom line is that you can think of each particle as having a finite size, which can be used to set the halo size in Blender (right panel).
What that allows you to do is resolve very dense features and display them as the bright but small structures they really are, without losing the diffuse material. Lots of tweaking still to do to get this optimised, but it's clearly far better than using a fixed halo size.
Since in Blender creating 10,000 unique objects and materials is the equivalent of shouting rude words at your computer and questioning its parentage, I use the smoothing length to bin the halo size so there are only 100 unique objects, not 10,000 (but still 10,000 vertices, which Blender has no problem with). This is pretty fast for loading a single frame, not sure how well this will work for animations but I think it should be OK.
Subscribe to:
Post Comments (Atom)
Giants in the deep
Here's a fun little paper about hunting the gassiest galaxies in the Universe. I have to admit that FAST is delivering some very impres...
-
Of course you can prove a negative. In one sense this can be the easiest thing in the world : your theory predicts something which doesn...
-
Why Philosophy Matters for Science : A Worked Example "Fox News host Chris Wallace pushed Republican presidential candidate to expand...
-
In the last batch of simulations, we dropped a long gas stream into the gravitational potential of a cluster to see if it would get torn...
No comments:
Post a Comment