GSnap, Polished
While preparing a paper introducing GSnap to the world, I have refined several of the features. The code has also become more modular and the source documentation is now more detailed. Here’s a brief overview of what has been done:
- Divided the source into five components: Core, IO (input/output), CLI, GUI, and Viz (visualization).
- Used the Qt Framework’s QtScript functionality to add a nice scripting interface. The base scripting language is ECMAScript (JavaScript). This is augmented with custom functions which manipulate GSnap’s internal objects.
- Re-implemented the depth of field effect as a separate class rather than a large, complicated member function of the volume rendering class. The new depth of field effect uses a faster Gaussian blur algorithm and produces much better results because larger blur radii are now practical.
- Improved the performance and memory usage of the volume renderer for a given quality level by using a std::priority_queue to accelerate the neighbor search. This allows higher-quality volume rendering in a reasonable amount of time.
- Finished the gas temperature computation and color mapping feature.
- Redesigned the snapshot I/O to make it easier to add other snapshot format readers.
- Added a new visualization option, “–view stars,” which is intermediate between “–view particles” and “–view flux.” Star particles are rendered as points, but they are rendered in the context of the volume renderer. This means that interstellar dust is able to obscure and redden the starlight. The results are somewhat similar to Sunrise output. This option is better than the “–view flux” option for simulations containing hundreds of millions of billions of star particles
In addition to that, many of the code formatting rules are now automatically enforced using AStyle and the coding guide now discourages the use of exceptions and RTTI (as do Google, the LLVM project, and others). Several GCC-specific features have been exploited in order to improve the performance of the code when it is compiled with g++. Overall, the final binary file is smaller by about 30% and the volume rendering code runs about 10% faster just because of the GCC-specific pragmas and function attributes combined with the set of compiler flags that are now used. The performance of the velocity dispersion statistics functionality improved negligibly. The “hot” and “cold” function attributes were particularly helpful.
Here are a few sample renderings…
First, a demonstration of the improved color mapping and depth of field features. The gas in the foreground galaxy is in focus while the gas in the background galaxy is blurred. This draws attention to the foreground object without the need to remove the background object from the scene. Also, note: dark red = cold gas, white = warm gas.
Without the depth of field effect, your attention is not as focussed on the foreground object, since the background object is equally in focus.
Of course, foreground objects are also blurred. This is the same system as above, but rotated so that the background object is now in the front:
The effect works equally well with visual renderings:
Now, here’s a demonstration of the new –view stars option without including any gas in the rendering:
That’s pretty basic. Including gas (and dust) in the rendering process makes this looks more like a galaxy:
But in a real galaxy, you can’t see the individual stars like this. In fact, the particles in the simulation don’t really represent stars; they are more like tracer particles which represent the density field in a statistical sense. For a more realistic representation, we use the full volume renderer, which smooths the particles into a continuum:

If we add the gas image to the star image using photo editing software like ImageMagick, GIMP, or Photoshop, we get:

The distribution of stars relative to the gas is interesting. Finally, if we add the dust-attenuated star image to the gas image, we get this nifty looking rendering:

March 18th, 2015 at 2:33 pm
Our education is makes us emerge from whatever remains of the world. Individuals give more significance to the informed persons. It acts as a scaffold in the middle of us and the objectives and goals of our life.
July 27th, 2016 at 3:53 am
Hi there I am called Cala Galdana and I would just like to say that I enjoyed checking out your splendid blog and to wish you good luck with it in the future – Cala Galdana-Menorca
June 4th, 2017 at 2:29 pm
It's amazing! I'm going to do my assignment and this article is really useful.
August 6th, 2017 at 11:42 pm
All the health related fields of education are very important in our life because the health of all living beings depend on this field owing to the wide spread diseases and health problems. Our good research paper title will emphasize on the importance of medical education.
December 1st, 2017 at 3:47 am
Thank you for updating! Hope to see more posts from you.
piknu
February 18th, 2018 at 5:50 am
nice
February 18th, 2018 at 5:54 am
Thanks for sharing this article and we appreciate for this it is amazing
vape wholesale distributor UK
February 22nd, 2018 at 12:43 pm
great work
February 26th, 2018 at 5:13 am
It acts as a scaffold in the middle of us and the objectives and goals of our life. thanks for post
free download adobe photoshop 7.0 full version setup for windows 7
February 27th, 2018 at 4:36 am
o wow good information thanks for sharing
March 9th, 2018 at 1:23 pm
i needed this thanks
March 12th, 2018 at 12:01 pm
nice post
March 29th, 2018 at 4:31 am
LOlz ! Check My Webs Birthday Images
Good Morning Quotes for her
April 5th, 2018 at 12:43 pm
very nice information same like you can go to FilesAIO
April 14th, 2018 at 1:59 am
Thank you for sharing with us,
April 18th, 2018 at 1:19 am
Good article. Regardless of the ultimate reality, it would seem prudent to have the types of matrices presented here as tools for discussions…just in case.
April 19th, 2018 at 10:07 am
Great.
April 19th, 2018 at 12:32 pm
que imagens lindas, e sensacionais! imagina como deve ser ver um espetáculo desses de perto!
May 22nd, 2018 at 10:33 pm
Just two years ago, virtual reality (VR) was the chosen one of the VR/AR tech pairing, and Pokémon Go was nothing but whispers and safely-guarded intellectual property. Back then, it seemed as if only futurists were bullish on augmented reality (AR), the offshoot of VR that places virtualized objects into real environments. citrusbits.com/augmented-reality-developm…
August 1st, 2018 at 7:45 pm
very good
August 1st, 2018 at 8:40 pm
Thank you
August 3rd, 2018 at 12:57 am
nice pict
March 29th, 2019 at 12:51 am
good work
July 24th, 2019 at 1:34 am
virtual reality (VR) was the chosen one of the VR/AR tech pairing
happy veterans day
January 4th, 2020 at 10:17 pm
You shared something very interesting. It seems how courageous you are so we are enjoying such things. Keep it up for the future as well 🙂
March 15th, 2020 at 10:35 pm
You described it very well with examples i appreciate it. and I will be happy if you continue this effort in the future.
June 9th, 2020 at 2:50 am
Good post. Thank you for sharing with us
Apex Legends Season 2 Jacket
October 12th, 2020 at 8:56 am
Thanks for giving this information
February 10th, 2021 at 11:41 pm
I really like your writing style, fantastic information, regards for posting :D. “In every affair consider what precedes and what follows, and then undertake it.” by Epictetus.
March 12th, 2021 at 12:36 am
If you ever heard about Hotmail, one of the first email service on the internet? All you need about this email service are on hotmail login