Making an animation in Shape by example
FYI: I made my own Library (copying Erica). I wrote an outline about the 2007 Shape paper, here. In case anyone is interested about the point of Shape.
Since our group is trying to utilize the Shape software for our simulations, I figure I would start to document helpful components to visualizing and modeling in Shape. Here I will briefly explain how one can make a movie, or animation in Shape. Some days toward the end of the day, I am going to go through the templates on their website. With Shape however, I have two main objectives:
- Learn how to convert our hdf5 simulation data to ASCII, so that it can be fed into Shape.
- Learn how to visualize this external data in Shape. What limits are there and what can Shape tell us about our data compared to other visualization softwares?
So if the template I check out is useful, I'll make a blog post about it explaining the objective of the template. Eventually I'll use these to make a series of wikipages documenting Shape for our purposes. However I am yet to be a "Shape Master." Otherwise I would have done 1 & 2 already. This template is quite simple: how do you make a movie in Shape?
Results:
(Make sure you check out the .gifs! They are really pretty.)
Image 1 | Image 2 |
BW GIF Red/Blue GIF | GIF |
Image 3 | Image 4 |
GIF | GIF |
This data is from one of the Shape templates, titled Animation 1 - Rotation. It is a bipolar nebula rotating around all three x-y-z Cartesian axes. Image 1 is a 2D projection, comparable to our column density map movies. However the object is not evolving in time. Image 2 is the line profile for the velocity vs. pixel intensity as the object rotates. Image 3 is the mesh used for the object. Image 4 is its PV-Diagram.
Guide:
This screen-shot was taken post-rendering. Click the big button with the Shape-S in the top, left-hand corner to view the data as seen here. Prior to rendering, the PV-diagrams will be black. Note that all of the data parameters are already in the template. You can adjust the colors if you want too. For instance I have also made a movie color coded to indicate Doppler-shifting, i.e. Red/Blue (see above). Other options include grey scale, rainbow (color), red/blue, gradient, and spectrum. Click the movie-film looking button in the same row as the renderer to get to the animation module.
Image 6 is what the animation module looks like. Instead of clicking the rendering button, you'll click the animation button (which is circled and marked as the second step). First you want to adjust what format your output will be. Note the timeline at the bottom of the GUI. As Shape makes your animation, it will tell you how far it is in the process. On the right hand side of the Animation module is the variable tree. Below the variable tree, in the table, is what is referred to as the variable stack. Essentially the functionality of this part of the animation module in v. 5 seems not much different from v. 4. Y
Here is a table of screen shots of all the parameters listed in the animation module.
Image 7. General | Image 8. Variable | Image 9. Output |
Image 7 (in order from top to bottom):
- Name of your file output
- Number of frames (where you want them to start and end in the simulation)
- Current frame tells you when Shape is in spitting your .png output (there is also a timeline at the bottom of the GUI that starts from first frame and ends at the number of the last frame) relative to the simulation
- Start and end times of your simulation for some given time units (years, days, hours, minutes, seconds).
- Like current frame, it tells you what current time your simulation is being animated at in your chosen units.
- Distribute & Fields: Using particles for rendering or output velocity vector information may require Shape to redistribute the particles in every frame. This is done by default. If you are not using particles, then disabling the distribution can save processing time.
- Render: Render while you animate. This is essentially required.
Image 8. (Currently investigating)
Image 9. Above in the results section of this post, you can see all of the options visualized that are listed here: 2D Maps, PV Diagrams, 3D Mesh, Hydro, Plots (Images) (Note: the numbers to the right indicate LxW size of the image, so these plots are 512x512), Plots (Ascii), Math Variables, and Time Units. You can denote the image type, and indicate where you want the images to be saved (a working directory).
Meeting Update 08/25/2014: I made a shape!
So in an attempt to visualize the pn data that Baowei set aside for me in SHAPE, I need to learn the ropes of the software first. So that is what I've been up to. The SHAPE guys have a youtube channel, so I am going through all their videos, copying what they do on my own computer with the software (see: SHAPE 3D Interactive Astrophysics)
So I made a torus. Understand the 3D view ports in SHAPE now, it is pretty intuitive when you know where things are located. Turns out you can also add observational photos to the background, which might be useful as a reference when you're creating detailed objects. In the SHAPE tutorials, they have a Jet Template Project in their Hydrodynamics module. My short term goal is to recreate that, and perhaps a few other templates until I can convert the data we have (see: SHAPE Templates).
Another issue is converting hdf5 to ascii, which Martin informed me is the necessary format to feed into SHAPE. Baowei has a script (see: Baowei's Page) where one first needs to rewrite each chombo with a single core, and then conver to ascii.
For fun I threw the chombo files into VisIt to see what they looked like:
Both sets have the same max and min.
Going forward:
- Attempting to become a shape aficionado, try to visualize the data we have in SHAPE… and understand it. Dig on some literature about p/pns.
- Working on doing the post processing for Erica's runs. They should all be complete now.
- Once I'm done making some of the typical movies of the colliding flows bovs, I'll work on doing the movie fly-throughs. Martin said he needed some pretty graphics, so I am going to try to get as much of this done as I can soon. Also for the VISTA contest in September 5th.
Meeting Update for week of July 10, 2011
Alfalfa, the new grass-style machine, is now <palpatine_voice>fully operational</palpatine_voice>. It can be reached via ssh:
ssh <username>@alfalfa.pas.rochester.edu
Users still need a VPN to connect to alfalfa from off-campus, but no VPN is needed to connect from another machine in the PAS domain.
All of the modules accessible on grass
and clover
are accessible on alfalfa
, as is ifort
. AstroBEAR's Makefile.inc.grass
seems to work for alfalfa
as well.
It turns out we lost email notifications when the wiki was brought back online, due to changes in the department's SMTP protocol configurations. This problem has since been fixed, and users are receiving emails about tickets again. We are still working to restore notifications about repository checkins.
I've created a page about scaling in AstroBEAR; it's still pretty rudimentary, but it's at least RFC-ready at this point. This is part of my effort to consolidate some of the tags in our wiki, and eliminating the 'attention-needed' category. Most of other 'attention-needed' pages were based on AstroBEAR 1.0 specs, so I moved them over to 'deprecated'.
Finally, an open question for the group: what should go on the visualization page? Most of the visualization tutorials are on the [Tutorials tutorials] page; should they be linked on the visualization page as well? Is there something else entirely that people would like to see there?