Kent, Brian R - 3D Scientific Visualization With Blender
Kent, Brian R - 3D Scientific Visualization With Blender
Download details:
IP Address: 128.196.130.121
This content was downloaded on 05/07/2015 at 06:43
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system
or transmitted in any form or by any means, electronic, mechanical, photocopying, recording
or otherwise, without the prior permission of the publisher, or as expressly permitted by law or
under terms agreed with the appropriate rights organization. Multiple copying is permitted in
accordance with the terms of licences issued by the Copyright Licensing Agency, the Copyright
Clearance Centre and other reproduction rights organisations.
DOI 10.1088/978-1-6270-5612-0
Version: 20150301
Preface x
Acknowledgments xi
Author biography xii
1 Introduction 1-1
1.1 Visualization in the sciences 1-1
1.2 What is Blender? 1-2
1.3 Rendering engines 1-4
1.4 Community support 1-4
1.5 Types of data visualization in the sciences 1-5
Bibliography 1-6
vii
3D Scientific Visualization with Blender®
4 Lighting 4-1
4.1 Lighting and color selection in Blender 4-1
4.1.1 Example: how to illuminate simulated terrain 4-1
4.1.2 Material emission 4-2
Bibliography 4-3
5 Animation 5-1
5.1 Keyframes 5-1
5.1.1 Example: how to rotate and animate an object 5-1
5.1.2 Example: using the graph editor 5-3
5.1.3 Example: adding a cyclic modifier 5-5
5.2 Frame rates and rendering output 5-5
5.2.1 Output formats 5-5
5.3 Node compositing 5-5
viii
3D Scientific Visualization with Blender®
ix
Preface
Observations, experiments and simulations in the sciences often have high impact
visuals that never cease to provide insight into the Universe. This book is the result
of exploring comprehensive software packages in 3D visualization for research in
astronomy and astrophysics. Surveying the broader scope of a variety of scientific
fields, we can see that the incredible results of our experiments can benefit in com-
municating results to both the scientific community as well as a broader audience.
This book is intended for the individual investigator or ambitious student to begin
learning the fundamentals of 3D visualization for science. We utilize Blender, an
agile and comprehensive software package for data visualization and animation.
The application programming interface allows scientists to import and manipulate
their data through the Python language. After introducing the fundamentals, the
book concludes with a number of illustrative projects to bring various components
together culminating in a series of visualizations.
A website1 is also available as a companion to the book with example files and
videos providing the user with step-by-step instructions on principles and projects
outlined in the text. It is my hope that these will serve as a launching point for
scientists to take their data visualizations to the next level.
1
www.cv.nrao.edu/~bkent/blender/
x
Acknowledgments
xi
Author biography
Brian R Kent
Brian R Kent, PhD is a scientist with the National Radio Astronomy
Observatory in Charlottesville, Virginia. His publications and
studies in astrophysics and computing include scientific visualizations
of a variety of theoretical and observational phenomena. He is
interested in visualizing data for scientific analysis as well as reaching a
broad audience with the stunning visuals that modern 3D graphics can
provide. Dr Kent received his PhD in Astronomy and Space Sciences from Cornell
University. His website is: http://www.cv.nrao.edu/~bkent/
xii
IOP Concise Physics
Chapter 1
Introduction
and gravitational waves all benefit from new visualization techniques [5].
Visualizing scientific apparatus before they are designed can help to optimize
the engineering and design of experiments.
Chemistry/Biology. Complex molecules and molecular dynamics during reac-
tions can be examined with 3D animations [6]. Studying proteins can reveal
their structure using data from nuclear magnetic resonance (NMR) studies.
GPU-accelerated processing has allowed for scalable solutions for visualizing
complex viruses [7].
Geography/Planetary Science. A wealth of mapping data exist, not only for the
planet Earth, but other surveyed planets in our Solar System. Using special
data storage models and GPU processing, 3D maps of planetary surfaces can
now be rendered in real time [8].
Medicine. Visualizing computed axial tomography (CAT scans) can show a
transparent view of organic structures. Classification and feature extraction
while performing diagnoses benefits greatly from be able to view real time 3D
movies of internal organs [9].
1.2 What is Blender?
Blender is open source software that allows a user to create high quality animations
of 3D models and data. It has wide usage in the video game and entertainment
industries. The software is also extremely useful for generating high quality scientific
visualizations. With its well organized Python application programming interface
(API), it can be scripted to load data from numerical simulations. The power of
Blender becomes evident when the user is given complete control over the camera
angle, field of view and rendering aspects of the final animation.
Blender’s traditional user base has been 3D graphics specialists working in
modeling and animation. However, with the intuitive graphical user interface (GUI)
and availability of Python libraries for reading a variety of scientific data, Blender
brings an exciting and unique visualization suite to the modern scientific workbench.
Developer/creator Ton Roosendaal and the Blender Foundation have created a
community to maximize the amount of on-line material for developers and users1.
The goal of this book is to provide the reader with an interesting and practical
introduction to Blender by way of science examples, each showing important soft-
ware features and 3D graphics techniques.
Figure 1.1 shows the structure of Blender and its main capabilities. This book will
examine each of the following topics and then use them in concert together for a
number of example visualization projects:
• Meshes and models
• Lighting
• Animation
• Camera control
• Scripting
• Composites and rendering
1
http://www.blender.org/forum/
1-2
3D Scientific Visualization with Blender®
Figure 1.1. This flow chart shows how a Blender workflow can be used in scientific visualization. Different
aspects of the Blender GUI and API will be analyzed throughout the book to show how various pieces can fit
together in a project [10]. Copyright 2013 Brian R Kent, publications of the Astronomical Society of the Pacific.
There are also external rendering engines that can be used with Blender. While
the examples and exercises in this book will use the internal Blender engines
Render and Cycle, the reader is encouraged to examine other rendering options for
different scenarios2.
Blender can take advantage of multi-core central processing units (CPUs).
The software also provides hooks for NVidia CUDA and OpenCL utilizing
accelerated GPU rendering. This can decrease rendering times by a factor of
three or four [10].
Blender also contains two powerful tools for building visualizations—the node
compositor and video sequencer. The node compositor allows multi-layered visual-
izations to be combined into a final animation, through the use of nodes—a visual
type of flow-chart style access to the Blender API and functionality. The video
sequencer is useful for editing and combining animations for presentation.
2
http://www.blender.org/download/external-renderers/
1-3
3D Scientific Visualization with Blender®
The software has modest desktop and laptop hardware requirements, depending
on the level of complexity for the visualization. The software runs equally well on
Windows, Mac OS X and many flavors of Linux. Hardware requirements, on-line
help and documentation, along with the software itself can be found at http://www.
blender.org.
Regardless of whether a desktop or laptop computer is used, it is highly recom-
mended that a three-button mouse with a scroll wheel be used in Blender sessions. The
numerical keypad on a standard keyboard also comes in handy when manipulating
the 3D view, which will be described in a later section. If the user is on a laptop, then
the top row numerical keys can be configured in the menu File → User Preferences →
Input and by checking ‘Emulate Numpad’. We will cover how these numerical keys
are used in a later section.
1-4
3D Scientific Visualization with Blender®
This book introduces important Blender concepts and, along the way, shows
users the critical parts of the interface that they will need to know to accomplish their
visualizations.
3
http://www.bioblender.eu/
1-5
3D Scientific Visualization with Blender®
Bibliography
[1] Szalay A S 2002 The SDSS Skyserver: public access to the sloan digital sky server data,
arXiv: cs/0202013
[2] Gray J 2002 Data mining the SDSS Skyserver database, arXiv: cs/0202014
[3] Kent B R 2013 Visualizing scientific graphics for astronomy and astrophysics Proc. ACM
SIGGRAPH’13 (Anaheim, CA, 21–25 July 2013) (New York: ACM) article no. 113
[4] Fedorko I, Lefebure V, Lenkes D and Pera M O 2012 New data visualization of the LHC
Era Monitoring (Lemon) system J. Phys.: Conf. Ser. 396 042019
[5] Sanders B C, Senden T and Springel V 2008 Focus on visualization in physics New J. Phys.
10 125001
[6] Moreland J L, Gramada A, Buzko O V, Zhang Q and Bourne P E 2005 The Molecular
Biology Toolkit (MBT): a modular platform for developing molecular visualization appli-
cations BMC Bioinform 6 21
[7] Stone J E, Vandivort K L and Schulten K 2013 GPU-accelerated molecular visualization on
petascale supercomputing platforms Proc. 8th Int. Workshop on Ultrascale Visualization
(Denver, CO, 17 November 2013) (New York: ACM) 6
[8] Myint S, Jain A, Cameron J and Lim C 2011 Large terrain modeling and visualization
for planets 4th IEEE Int. Conf. on Space Mission Challenges for Information Technology
(SMC-IT) (Palo Alto, CA, 2–4 August 2011) (Piscataway, NJ: IEEE) 177–83
[9] Linsen L, Hagen H, Hamann B and Hege H-C (ed) 2012 Visualization in Medicine and Life
Sciences vol 2 (Berlin: Springer)
[10] Kent B R 2013 Visualizing astronomical data with Blender Publ. Astron. Soc. Pac. 125 731–48
[11] Price R L, Puchala J C, Rovito T V and Priddy K L 2011 Physics accurate layered sensing
model Proc. 2011 IEEE National Aerospace and Electronics Conference (NAECON)
(Dayton, OH, 20–22 July 2011) (Piscataway, NJ: IEEE) 291–6
[12] Debevec P 1998 Rendering synthetic objects into real scenes: bridging traditional and image-
based graphics with global illumination and high dynamic range photography Proc. 25th
Annual Conf. on Computer Graphics and Interactive Techniques, Orlando, FL, 19–24 July
1998 (New York: ACM) 189–98
[13] Friendly M 2006 A brief history of data visualization Handbook of Computational Statistics:
Data Visualization vol 3, ed C Chen, W Härdle and A Unwin (Heidelberg: Springer)
[14] Andrei R M, Callieri M, Zini M F, Loni T, Maraziti G, Pan M C and Zoppè M 2012
Intuitive representation of surface properties of biomolecules using BioBlender BMC
Bioinform. 13 S16
1-6
IOP Concise Physics
Chapter 2
The interface and windowing set-up
File
Figure 2.1. The default Blender GUI that the user will see upon start-up. The main 3D view port allows the
user to interactively manipulate and create 3D objects. The left-hand side shows the Object Tools toolbar and
the right-hand side the Transform toolbar. The bottom of the screen shows the animation ‘tape deck’ and the
far right shows the data outliner and rendering, materials and texture tools.
the view in 15° increments. Using the keypad is advantageous for exact control and
positioning of the view. The central 5 key switches between orthographic and per-
spective modes. Both views have advantages in planning and executing scientific
visualizations. A list of keyboard shortcuts is given in appendix A.
Object movement can occur via translation, rotation and scaling (figure 2.4),
either in the GUI or via keyboard shortcuts. The bottom of the GUI has a number
of drop-down menus for switching between Object and Mesh Edit modes, selecting
the rendering style (wireframe, solid, textured, full) and changing the reference frame
(figure 2.5). In Mesh Edit mode single or groups of vertices, lines, or faces can be
selected (figure 2.6).
2.1.4 UV-view
The UV-editing GUI can be accessed via the drop-down menu at the top of the Blender
screen. This splits the main window interface into a 3D view port and UV-editing
interface that can be utilized when mapping data to mesh surfaces. This is typically
2-2
3D Scientific Visualization with Blender®
Figure 2.2. A mesh cube with the origin arrow triplet colored red, green, and blue for the X-, Y-, and Z-axes,
respectively. Controls are available for translation, rotation and scaling. The user can grab these handles to
manipulate an entire mesh object, or a single vertex, line, or face.
accomplished by entering Mesh Edit mode with the TAB key, right-clicking to select
the desired vertices and then pressing the U key to map the image to the surface with one
of the projection methods.
2-3
3D Scientific Visualization with Blender®
Figure 2.3. A schematic keypad view of a standard keyboard. The 2, 4, 6 and 8 keys allow the user to rotate
the selected object or data container in 15° increments. The 3, 1 and 7 keys shift the view along the line of sight
for the X-, Y- and Z-axes, respectively. The 5 key switches the 3D view port between orthographic and per-
spective modes.
Figure 2.4. Three Blender mesh objects showing the mouse handles for (a) translation, (b) rotation and
(c) scaling. These GUI elements allow the user to manipulate and position objects in the 3D view port [1].
Copyright 2013 Brian R Kent, publications of the Astronomical Society of the Pacific.
2-4
3D Scientific Visualization with Blender®
Figure 2.5. The drop-down menu for mode selection. The exercises in this book will focus primarily on the
Object and Mesh Edit modes.
Figure 2.6. The left panel shows a UV-sphere in Object mode. The right panel shows the same sphere with a
single face selected in Mesh Edit mode.
2-5
3D Scientific Visualization with Blender®
Figure 2.7. Example Blender GUI configured in quad view showing an N-body simulation of colliding
galaxies with the top, side and front views, as well as the view from the currently selected camera. The quad
view is useful for visual analysis from multiple directions and what the field of view for the final render will
show [1]. Copyright 2013 Brian R Kent, publications of the Astronomical Society of the Pacific.
2-6
3D Scientific Visualization with Blender®
Figure 2.8. The Object Tools and Transform toolbars which are used to precisely position objects and cursors in
the 3D view port. Each of the object properties can be keyframed from the Transform toolbar. By pressing the
TAB key and entering Mesh Edit mode, individual elements can be manipulated via the Object Tools toolbar.
2-7
3D Scientific Visualization with Blender®
Figure 2.9. The data outliner in Blender gives a global view of all the objects and associations between them.
Child/parent relationships, rendering status and 3D view port status are all reflected in this useful GUI element.
Figure 2.10. The Properties panel where materials, textures, rendering and scene controls can be manipulated.
From left to right the panel includes rendering, layers, scenes, world controls, object controls, constraints,
modifiers, vertex controls, materials, textures, particle generators and physics simulations.
Figure 2.11. The Blender animation time line that allows for scaling the frames of an animation as well as
viewing keyframe markers. From left to right the buttons indicate the start and end frames, current frame,
beginning frame, previous keyframe, reverse play, forward play, next keyframe and end of the animation.
2-8
3D Scientific Visualization with Blender®
Vertex groups and shape keys. Shape keys are useful for keyframing animations
with large numbers of particles, including smooth particle hydrodynamics
and N-body simulations.
Materials. An important part of scientific visualization involves selecting between
surfaces, grids and point materials to convey a variety of visualization elements.
These could include a range of phenomena, such as planetary surfaces, fields
lines, or data best conveyed through 3D scatter plots.
Textures. Textures are useful for loading topographic maps and 3D data cubes,
which can be brought into layered textures or voxel data structures,
respectively.
Particles. The built in Blender particle generator can be used for phenomen-
ological models and tracers for N-body and smoothed particle hydro-
dynamics (SPH) simulations.
Physics. This engine allows the user to set up forces, gravitational and magnetic
fields, and use the rigid and soft body dynamics features.
1
wiki.blender.org/index.php/Doc:2.6/Manual/Extensions/Python/Console
2-9
3D Scientific Visualization with Blender®
FITS. The scientific data format used in astronomy—the flexible image trans-
port system (FITS). These files can contain 2D and 3D imaging, spectra and
time-series [3].
GIS Shapefiles. The vector data format for geographic information systems [4] 2.
https://github.com/domlysz/BlenderGIS
MDL Molfile. A chemistry file with atomic coordinates and bond formation for
building molecules [5].
Image formats. JPEG, GIF, PNG and BMP files can all be imported for use as
texture images for 3D surfaces using the UV editor and materials/textures tabs.
Bibliography
[1] Kent B R 2013 Visualizing astronomical data with Blender Publ. Astron. Soc. Pac. 125 731–48
[2] Murray J D and van Ryper W 1996 Encyclopedia of Graphics File Formats 2nd edn (Paris:
O’Reilly)
[3] Hanisch R J, Farris A, Greisen E W, Pence W D, Schlesinger B M, Teuben P J, Thompson R W
and Warnock A III 2001 Definition of the Flexible Image Transport System (FITS) Astron.
Astrophys. 376 359–80
[4] Scianna A 2013 Building 3D GIS data models using open source software Appl. Geomatics
5 119–32
[5] Dalby A, Nourse J G, Hounshell W D, Gushurst A K I, Grier D L, Leland B A and Laufer J
1992 Description of several chemical structure file formats used by computer programs
developed at Molecular Design Limited J. Chem. Inform Comput. Sci 32 244–55
[6] Robitaille T P et al 2013 Astropy: a community python package for astronomy Astron.
Astrophys. 558 A33
2
www.esri.com/library/whitepapers/pdfs/shapefile.pdf
2-10
IOP Concise Physics
Chapter 3
Meshes, models and textures
Figure 3.1. Blender mesh examples that form the basis of data containers and grid constructs in scientific
visualization. These basic shapes—a cube, cone, UV-sphere, torus, cylinder and icosphere—can be manip-
ulated in the Blender 3D view port.
3-2
3D Scientific Visualization with Blender®
Figure 3.2. Blender Mesh Edit mode is selected and the vertex, line and face mode buttons are shown. This
allows the user to manipulate individual parts of a mesh object.
1
For excellent tutorials on both novice and advanced Blender usage visit http://www.blenderguru.com/.
3-3
3D Scientific Visualization with Blender®
Figure 3.3. This view shows the set-up for projecting a 2D map of the Earth onto a UV-sphere.
3-4
3D Scientific Visualization with Blender®
Figure 3.4. Earth map projection with images from http://earthobservatory.nasa.gov. Several layers are
presented here in a final composite, including a day and night side maps of the Earth and an atmospheric
layer.
3-5
3D Scientific Visualization with Blender®
Figure 3.5. In Mesh Edit mode (TAB key), a seam can be added with CTRL–E. In this particular example we
are marking the seam along a meridian.
• Choose the UV-editing menu and open a new image file (ALT–O).
• Select all vertices (A key), press the U key for UV Mapping and select ‘Sphere
Projection’ (figure 3.6).
• The results can be see by selecting ‘Texture Mode’ under the ‘Viewport
Shading’ drop-down menu.
3-6
3D Scientific Visualization with Blender®
Figure 3.6. With the seam on the meridian properly marked a map projection can now be applied using UV
Mapping.
3-7
3D Scientific Visualization with Blender®
Figure 3.7. The halo material can be applied to illuminate individual vertices in a scatter plot or catalog. These
small Gaussian spheres have size, illumination and color properties that can be adjusted.
3-8
3D Scientific Visualization with Blender®
Figure 3.8. A wire material can be applied to a mesh. This is useful in creating grids and bounding boxes for
visualizations.
• Select the ‘Wire’ option (figure 3.8). Change the color if desired.
• Change the wire material parameters: Diffuse Intensity: 1.0, Specular
Intensity: 0.0 and Shading Emission: 1.0.
Bibliography
[1] Blinn J F 1978 Simulation of wrinkled surfaces SIGGRAPH Comput. Graph. 12 286–92
3-9
IOP Concise Physics
Chapter 4
Lighting
Figure 4.1. The different types of lighting elements include 1 point, 2 sun, 3 hemi, 4 area and 5 spot lamps.
4-2
3D Scientific Visualization with Blender®
Figure 4.2. Simulated terrain generated with a displacement modifier and showing a lighting element in the 3D
view port.
Bibliography
[1] Kent B R 2013 Visualizing astronomical data with blender Publ. Astron. Soc. Pac. 125 731–48
4-3
IOP Concise Physics
Chapter 5
Animation
The output of a scientific visualization created with Blender can include 3D scatter
plots, static images of a 3D scene, or 3D animations with or without supporting
camera movements and tracking.
5.1 Keyframes
To facilitate the animation of a mesh object, the X, Y, Z position, rotation and
scaling must be recorded in a keyframe. Keyframes are noted in the animation
playback bar at the bottom of the GUI via yellow lines pertaining to the selected
object. Keyframes are inserted via the I key—possible selections are shown and
described in figure 5.1. Keyframes are deleted via the key combination ALT–I.
An advantage of using keyframes is that Blender will automatically interpolate
between frames—keyframes do not need to be set for every frame in the animation
of a mesh object.
Figure 5.1. Pressing the I key allows the user to key an object, which inserts a keyframe recording a positional
aspect of the object during a visualization.
Figure 5.2. The rotation is keyframed (in yellow) during the animation of a torus mesh object.
5-2
3D Scientific Visualization with Blender®
Figure 5.3. The Graph Editor allows the user to visually control the animation in Blender. By changing the
shape of these curves a smooth animation during the visualization can be created.
the Transform toolbar and choose ‘Insert Keyframe’. A yellow vertical line
will be placed on the Animation toolbar at the bottom of the window.
• Move the green animation slider to frame 150.
• Change the X-rotation value to 180 degrees in the Transform toolbar.
Right-click on the value and insert another rotation keyframe.
• Finally, move the green animation slider to frame 300, change the X-rotation
value to 360 degrees and right-click and insert another keyframe.
• Play the animation with the right pointing arrow play button on the
Animation toolbar.
5-3
3D Scientific Visualization with Blender®
Figure 5.4. These three panels show vectorizing the rotation about the X-axis (red curve), to which a cyclic
modifier is added to repeat the animation.
5-4
3D Scientific Visualization with Blender®
• Press the V key and set the ‘Keyframe Handle Type’ to ‘Vector’.
• Return to the 3D view port in the default view and replay the animation,
which should run at a constant speed throughout the number of frame
specified on the animation time line.
The torus will now repeat keyframed motion for the duration of the video
rendering, independent of the length.
1
wiki.blender.org/index.php/Doc:2.6/Manual/Render/Output
2
Download available at www.ffmpeg.org/.
5-5
3D Scientific Visualization with Blender®
Figure 5.5. Example nodes used for compositing. Each node has imaging inputs and outputs which can lead
to connecting nodes. Example nodes here give starting rendering layers, RGB color corrections, mixture nodes
to composite layers and output nodes that connect to the rendering engine.
5-6
3D Scientific Visualization with Blender®
Figure 5.6. This window shows three render layers being combined and passed through a color balance and
RGB node before being passed to the compositor. Nodes can be connected by drawing lines with the left
mouse button from one output to another image input. Lines can be destroyed with the CTRL key and nodes
can be deleted with the X key.
5-7
IOP Concise Physics
Chapter 6
Point of view: camera control
We will now discuss how to record our visualizations with the movement and
tracking of a camera. In Blender the currently selected camera object presents the
field of view that will be in the final render. Camera objects have a number of critical
parameters: the X, Y, Z location and rotation of the camera, the vector pointing
normal to the camera’s ‘film’ plane, the field of view, the viewing projection and the
aspect ratio. For example, in figure 6.1, the camera is located at position (1,2,3),
rotated at 45° along the X-axis, with a 35° field of view in a perspective projection
and an aspect ratio of 16:9 (1080p HD quality).
Figure 6.1. The 3D view port shows a camera pointing to a spherical mesh, with the Transform toolbar
detailing the camera’s exact position and rotation configuration.
Figure 6.2. Two examples showing (a) a perspective view of a cube mesh and (b) the same mesh with an
orthographic projection [2]. Copyright 2013 Brian R Kent, publications of the Astronomical Society of the
Pacific.
point directly at the defined center of the other object. For many scenarios, it is
useful to add an empty object to the visualization scene. The empty object does not
render in the visualization and is represented by an orthogonal set of axes in the GUI
(figure 6.3). In essence, the camera object will point toward wherever the empty
6-2
3D Scientific Visualization with Blender®
Figure 6.3. This view shows the location of an empty axis object. This type of object does not render and can
be attached to other meshes so that the camera can follow and track it during a visualization animation.
6-3
3D Scientific Visualization with Blender®
Figure 6.4. A camera object with a ‘Track To’ constraint applied such that the camera will always center its
field of view on the empty object that is a parent of the rendered cube. The blue dashed line normal to the
camera plane points from the camera object tracking to the object that it follows.
Figure 6.5. This panel shows a Bézier curve with a camera attached. The camera is locked to the curve and will
follow it through the animation, while pointing to the cube mesh object.
6-4
3D Scientific Visualization with Blender®
Figure 6.6. This window is found on the Properties panel and is used to keyframe the path animation for a
Bézier curve. Once the path is keyframed, an object such as a camera can be locked to the path.
useful when one wishes to move the camera through a scene while tracking at the
same time. The following scenario continues from the previous camera tracking
example.
• Right-click to select the scene camera object—it will highlight orange.
• In the Transform panel, zero out any offsets with the position and rotation to
be 0.0 and 0.0 degrees, respectively, for X, Y and Z.
• Click Add → Curve → Circle.
• Select the Object Data tab (figure 6.6) in the Properties panel. Click the check
box for ‘Path Animation’, change the frames to 300.
• On the Animation toolbar, set the frame to zero and then, under path ani-
mation, right-click ‘Evaluation Time’ and ‘Insert Keyframe’.
• On the Animation toolbar, set the frame to zero and then under ‘Path Ani-
mation’, set the evaluation time to 300.0, right-click ‘Evaluation Time’ and
‘Insert Keyframe’. The parameterized unit of the evaluation time in this
example is the frame number.
6-5
3D Scientific Visualization with Blender®
• Right-click to select the camera object again. Click on the ‘Constraints’ icon
and add the object constraint called ‘Follow Path’. Change the forward axis
to –Z and the ‘Up’ vector to Y.
• Play the animation and observe that the camera object follows the path with
the camera normal vector tangent to the circle.
• Add another object constraint for the camera—this time a ‘Track To’ con-
straint. Change the ‘To’ vector to –Z and the ‘Up’ vector to Y.
The camera will now follow the Bézier circle path during the animation, while
pointing at the cube. If the path is moved or scaled, the camera will follow.
Bibliography
[1] Carlbom I and Paciorek J 1978 Planar geometric projections and viewing transformations
ACM comput. Surv. 10 465–502
[2] Kent B R 2013 Visualizing astronomical data with Blender Publ. Astron. Soc. Pac. 125 731–48
6-6
IOP Concise Physics
Chapter 7
Python scripting
The Blender API can be used in Python scripts to automate tasks and read in sci-
entific data. The API allows the user to create and manipulate objects and data, edit
properties and groupings, and control the animation sequence of a scientific
visualization.
Figure 7.1. The editor and command line allow the user to control the Blender interface and functions via the
Blender Python API.
#Name X Y Z
Point001 4.2 2.3 5.6
Point002 1.2 9.3 6.4
Point003 4.3 2.3 7.4
...
7-2
3D Scientific Visualization with Blender®
We can then read in the specified data with the following short Python script.
import bpy
import bmesh
import csv
’’’For each row in the data list, map the fields and
data elements to a dictionary
Append the dictionary to the table list.
’’’
for row in data:
datarow = map(float,row[0].split())
rowdict=dict(zip(fields, datarow))
table.append(rowdict)
import bpy
import bmesh
import csv
7-3
3D Scientific Visualization with Blender®
obj = bpy.data.objects[’Cube’]
mesh = obj.data
bm = bmesh.from_edit_mesh(obj.data)
rowcount = 0
for i in range(0,len(bm.verts)-1):
try:
bm.verts[i].co.x = table[rowcount][’X’]
bm.verts[i].co.y = table[rowcount][’Y’]
bm.verts[i].co.z = table[rowcount][’Z’]
rowcount += 1
bmesh.update_edit_mesh(obj.data)
except:
pass
import bpy
import bmesh
import csv
import glob
for f in files:
#Switch to edit mode
bpy.ops.object.mode_set(mode = ’EDIT’)
print(Frame: + str(f))
bpy.context.scene.frame_set(framecount)
fields = [’Name’, ’X’, ’Y’, ’Z’]
csvin = csv.reader(open(f))
data=[row for row in csvin]
header=data.pop(0)
table = []
7-4
3D Scientific Visualization with Blender®
obj = bpy.data.objects[’Cube’]
mesh = obj.data
bm = bmesh.from_edit_mesh(obj.data)
rowcount = 0
for i in range(0,len(bm.verts)-1):
try:
bm.verts[i].co.x = table[rowcount][’X’]
bm.verts[i].co.y = table[rowcount][’Y’]
bm.verts[i].co.z = table[rowcount][’Z’]
rowcount += 1
bmesh.update_edit_mesh(obj.data)
except:
pass
bpy.ops.anim.keyframe_insert(type=’Location’)
7-5
IOP Concise Physics
Chapter 8
Projects and 3D examples
It is best to expand upon the overview of information presented in this book with
a collection of examples. Each example will use different parts of the Blender
interface to implement a different style of scientific visualization. Example blend
files, data files and videos will be provided to better illustrate some of these
features.
We then import the Hipparcos catalog with the following Python script:
import bpy
import math
import bmesh
import csv
obj = bpy.data.objects[’Circle’]
if obj.mode == ’EDIT’:
bm = bmesh.from_edit_mesh(obj.data)
for v in bm.verts:
if v.select:
print(v.co)
else:
print("Object is not in edit mode")
bm = bmesh.from_edit_mesh(obj.data)
fields = [’StarID’,’HIP’,’HD’,’HR’,’Gliese’,’BayerFlamsteed’,
’ProperName’,’RA’,’Dec’,’Distance’,’PMRA’,’PMDec’,’RV’,’Mag’,
’AbsMag’,’Spectrum’,’ColorIndex’,’X’,’Y’,’Z’,’VX’,’VY’,’VZ’]
dicts = []
bmesh.update_edit_mesh(obj.data)
8-2
3D Scientific Visualization with Blender®
• The data should load quickly. We can now add a material to the Hipparcos
data points.
• Select the data points and click the Materials tab on the Properties panel.
• Select ‘Halo’ and change the size value to 0.005 and hardness value to 100.
A white or light yellow color can be used to color the points.
We can now use the default camera object to point at an empty object as in
section 6.2.1.
• Add an empty object with Add → Empty → Plain Axes for the camera to
track (figure 8.1).
• Right-click to choose the camera object and set the position and rotation
values on the Transform toolbar to zero.
• Click the Constraints tab on the right-hand side Properties panel.
• Choose ‘Track To’ and select the target as ‘Empty’.
• Select ‘To’ as –Z and ‘Up’ as Y. This will correctly orient the upward and
normal directions when looking through the camera field of view.
8-3
3D Scientific Visualization with Blender®
Figure 8.1. The set-up for an empty tracking object. The camera will point to this object during the fly through
of the Hipparcos catalog.
8-4
3D Scientific Visualization with Blender®
Figure 8.2. A 3D rendering of the Hipparcos catalog, utilizing a halo material, a subdivided grid and camera
tracking.
Figure 8.3. A 3D rendering of an N-body simulation showing a collision between two galaxies.
10 000 disk particles and 20 000 halo particles with Milky Way scale lengths and
masses (2.1 kiloparsecs and 109 solar masses). The particle position data are shown
as a single vertex with a halo material. Each snapshot is keyframed as a camera
object is flown along a Bézier curve. A frame from the animation is shown in
figure 8.3.
8-5
3D Scientific Visualization with Blender®
The ASCII snapshot files produced by the simulation are in the following simple
X, Y, Z comma-separated-value format:
-44.4367,-44.1049,-0.539139
-94.6014,-74.8028,-0.5839
-70.9394,-77.0528,-0.357556
-58.1572,-57.4876,-0.917166
-63.3899,-61.3828,-0.793917
...
First a shape key needs to be created in the script with (for this simulation) 20 000
vertex points:
import bpy
import bmesh
#Switch to object mode
bpy.ops.object.mode_set(mode = ’OBJECT’)
bpy.data.shape_keys[0].key_blocks["Key 1"].value = 1
bpy.data.shape_keys[0].key_blocks["Key 1"].
keyframe_insert ("value", frame=0)
The snapshot data files are then read in using the csv and glob Python module.
The vertices are added to a single vertex circle object just like the mesh created in the
3D scatter plot example.
import glob
import csv
import bpy
import bmesh
files = glob.glob(’*.txt’)
files.sort()
8-6
3D Scientific Visualization with Blender®
for f in files:
fields = [’X’, ’Y’, ’Z’]
csvin = csv.DictReader(open(f), fields, delimiter = ’,’)
data = [row for row in csvin]
dicts = data
obj = bpy.data.objects[’Circle’]
mesh = obj.data
bm = bmesh.from_edit_mesh(obj.data)
rowcount = 0
for i in range(0,len(bm.verts)-1):
try:
bm.verts[i].co.x = float(dicts[rowcount][’X’])/10.0
bm.verts[i].co.y = float(dicts[rowcount][’Y’])/10.0
bm.verts[i].co.z = float(dicts[rowcount][’Z’])/10.0
rowcount += 1
bmesh.update_edit_mesh(obj.data)
except:
pass
We now change the vertices to have a material texture of a small Gaussian sphere.
1. With the circle object selected, click on the Materials tab in the Properties
panel to create a new material with the ‘Halo’ option.
2. Change the halo size to 0.05.
3. Change the hardness to 100.
4. Modify the desired halo color to your liking.
Since both galaxies are moving, we will keyframe an empty object to track the
centroid of one galaxy before the collision. As the collision evolves the empty object
will slow to a stationary position (figure 8.4). The camera object will also move and
track the empty object during the entire animation.
1. Add an empty object with Add → Empty → Plain Axes for the camera to
point toward.
8-7
3D Scientific Visualization with Blender®
Figure 8.4. An empty object is placed at the centroid of one of the galaxies and keyframed to move during the
camera tracking.
2. With the current frame set to zero, place the empty object near the center of a
galaxy and keyframe the position with the I key.
3. Play the animation through the first part of the collision and then stop. Move
the empty object to a new position near the collision centroid and add
another keyframe.
4. Right-click to choose the camera object and set the position and rotation
values on the Transform toolbar to zero.
5. Click the Constraints tab on the right-hand side Properties panel.
6. Choose ‘Track To’ and select the target as ‘Empty’.
7. Select ‘To’ as –Z and ‘Up’ as Y. This will correctly orient the upward and
normal directions when looking through the camera field of view.
Snapshots and different camera views from the final animations are shown in
figure 8.5.
8-8
3D Scientific Visualization with Blender®
8-9
3D Scientific Visualization with Blender®
From classical electrodynamics we know that the current density J has an azi-
muthal component in a ring of radius a. Reviewing these basic equations we have [3]:
J = −Jϕ sin ϕ′i + Jϕ cos ϕ′j . (8.1)
Due to the symmetry of the configuration, we can write the azimuthal component
Aϕ as:
⎡ 2 − k 2 K ( k ) − 2E ( k ) ⎤
Aϕ (r , θ ) =
μ0 4Ia ⎢ ( ) ⎥ (8.3)
4π 2 2 ⎢ k 2 ⎥
a + r + 2ar sin θ ⎣ ⎦
where K(k) and E(k) are complete elliptic integrals. The solution can be expanded in
the following approximation:
⎡ ⎤
μ0 Ia 2r sin θ ⎢ 15a 2r 2 sin2 θ ⎥
Aϕ (r , θ ) = 3 2 ⎢ 1+ 2
+ …⎥ . (8.4)
(
4 a2 + r2 ) ⎢⎣ (
8 a2 + r2 )⎥⎦
We will evaluate this expression, compute the contours and use vertex editing
mode to draw the contours. Because the scenario is azimuthally symmetric, we can
use the Blender spin tool to rotate the magnetic potential contours about the Z-axis.
Finally, we will add the current loop and animate the visualization. The data from
8.4 are generated and read in via the following Blender Python script:
import pickle
import numpy
import bpy
import bmesh
import csv
8-10
3D Scientific Visualization with Blender®
obj = bpy.data.objects[’MagneticField’]
bpy.ops.object.mode_set(mode = ’EDIT’)
bm = bmesh.from_edit_mesh(obj.data)
bmesh.update_edit_mesh(obj.data)
bpy.ops.object.mode_set(mode=’OBJECT’)
Due to azimuthal symmetry, the contours can be extended via the spin tool
(figure 8.6).
8-11
3D Scientific Visualization with Blender®
Figure 8.6. Quad view along each axis along with the camera view for the magnetic potential.
8-12
3D Scientific Visualization with Blender®
8-13
3D Scientific Visualization with Blender®
μ̄ = q (1 + q ) (8.6)
μ1 = 1 − μ¯ (8.7)
μ2 = μ¯ . (8.8)
The location of the triangular Lagrangian points L4 and L5 can be solved for:
⎛1 ⎞ 3
L 4 = ⎜ − μ2 ⎟ xˆ + yˆ (8.9)
⎝2 ⎠ 2
⎛1 ⎞ 3
L 5 = ⎜ − μ2 ⎟ xˆ − yˆ . (8.10)
⎝2 ⎠ 2
The collinear Lagrangian equilibrium points are derived as:
1 2 1 3 23 4
L1r2 = α − α − α − α (8.11)
3 9 81
1 2 1 3 31 4
L 2r2 = α + α − α − α (8.12)
3 9 81
7 ⎛ μ2 ⎞ 13223 ⎛ μ2 ⎞
2 3
7 μ2
L 3r 1 = 1 − + ⎜⎜ ⎟⎟ − ⎜⎜ ⎟⎟ . (8.13)
12 μ1 12 ⎝ μ1 ⎠ 20736 ⎝ μ1 ⎠
We can further refine these collinear Lagrangian points by using the Newton–
Rhapson method to solve for the vectors r1 and r2. These examples are included at
the book website2. Next we provide code that solves for these points.
1
For excellent research on this topic using simulations of cataclysmic variable stars, visit http://astro.tamuc.
edu/wood/.
2
www.cv.nrao.edu/~bkent/blender/
8-14
3D Scientific Visualization with Blender®
import math
import os
import csv
import numpy as np
from scipy.optimize import fsolve
import numpy as np
from scipy.optimize import newton
import matplotlib.pyplot as plt
errflg = 0
#Unpack tuple
mu1, mu2 = mus
T1 = 1. - r
T2 = T1 - 1.0/T1**2
T3 = r - 1.0/r**2
return dU
errflg = 0
#Unpack tuple
mu1, mu2 = mus
T1 = 1. + r
T2 = T1 - 1.0/T1**2;
T3 = r - 1.0/r**2;
return dU
errflg = 0
#Unpack tuple
mu1, mu2 = mus
8-15
3D Scientific Visualization with Blender®
T1 = 1. + r
T2 = r - 1.0/r**2
T3 = T1 - 1.0/T1**2
return dU
#Unpack tuple
y, z, mu1, mu2, Vref = data
T1 = 1.0/r1 + 0.5*r1**2
T2 = 1.0/r2 + 0.5*r2**2
return U
#Unpack tuple
x, z, mu1, mu2, Vref = data
T1 = 1.0/r1 + 0.5*r1**2
T2 = 1.0/r2 + 0.5*r2**2
return U
#--------------------------------------------------
# secondary / primary mass: M2/M1 (M1 > M2)
q = 0.2
8-16
3D Scientific Visualization with Blender®
# Equation 3.1
mu_bar = q / (1.0 + q)
# Equation 3.2, Location of Mass 1 (primary) is (-mu2, 0, 0)
mu1 = 1.0 - mu_bar
# Equation 3.2, Location of Mass 2 (secondary) is (mu1, 0, 0)
mu2 = mu_bar
# Equation 3.93
beta = -7.0*ratio/12.0 + 7.0*ratio**2/12.0 - 13223.0*ratio**3/20736.0
8-17
3D Scientific Visualization with Blender®
for n in range(1,npts-1):
try:
yguess = newton(Potential2, L4_y/10.0, \
args=(xx[n], zz[n], mu1, mu2, L1_U), maxiter = 10000)
except:
yguess = 0.0
yc[n] = yguess
yc[1] = 0.0
yc[npts-1] = 0.0
We can then read the X and Y pairs into a Blender mesh to draw the contours.
First we create a single vertex mesh in the GUI called ‘RocheOutline’.
import csv
import glob
import os
import bpy
import bmesh
obj = bpy.data.objects[’RocheOutline’]
bpy.ops.object.mode_set(mode = ’EDIT’)
bm = bmesh.from_edit_mesh(obj.data)
dicts = [{’X’: xx[i], ’Y’:yc[i]} for i in range(0,len(xx))]
bmesh.update_edit_mesh(obj.data)
bpy.ops.object.mode_set(mode=’OBJECT’)
8-18
3D Scientific Visualization with Blender®
Figure 8.8. The zero-velocity curves can be mapped and then rotated in 3D using the spin tool in Mesh Edit mode.
Once this contour is created, we can use a mirror modifier to add in the second
part of the symmetric contour and then spin the contour about the X-axis.
• Choose the Roche outline and add a mirror modifier about the X-axis.
• Enter Mesh Edit mode with the TAB key.
• Choose the spin tool on the left-hand Mesh Tools panel, set the degrees to 360 and
number of steps to 40. Set the X, Y and Z-axes to 1.0, 0.0 and 0.0, respectively,
making X the axis of rotation. Uncheck the ‘Dupli’ box so that a surface is created.
The primary and secondary masses can be added at their respective positions with
simple colored UV-spheres, as can the Lagrangian points, designated as small
tetrahedrons (figure 8.9).
8-19
3D Scientific Visualization with Blender®
Figure 8.9. The Roche lobes can be rendered transparent via the Properties panel Materials tab.
The data are obtained from the USGS PDS Imaging Node3. The two images each
have a size and resolution of 1000 × 1000 pixels at 1.32 kilometers per pixel. The
topographic map will be used for the relative heights between points on the surface
for the Blender mesh object. The Mars basecolor map will be used as a texture layer.
First we will activate a new feature under File → User Preferences → AddOns.
Click the check box for ‘Import Images as Planes’ and then ‘Save User Settings’.
This will allow us to to image a topographic map directly as a mesh plane object.
The images need to be grayscale topographic maps and not shaded relief maps.
• Choose File → Import → Images as planes and select the topographic map file.
• Press the TAB key to enter Edit mode.
3
Images and data available from www.mapaplanet.org.
8-20
3D Scientific Visualization with Blender®
Figure 8.10. Setting up the displacement modifier to load the Martian topographic map into a mesh object.
• Press the W key and select ‘Subdivide’. If a mesh division is less than the
number of pixels in the image, the resulting mesh will be averaged. This is
acceptable for quick look visualizations, but can be performed at full reso-
lution in the final rendering.
• In the Properties panel select Modifiers → Displace. Select the texture to be
the topographic map file. Set the strength (a convenience scaling factor) to
0.05. Set the texture coordinates to ‘UV’ (figure 8.10).
• In the Properties panel select the Materials tab. Set the diffuse and spectral
intensity to 0.0 and the shading emission to 1.0.
• In the Properties panel select the Textures tab. Add two textures—one for
the displacement from the topographic map and one for the surface
imaging. Their types need to be set to ‘Image or Movie’ and the coordinates
to ‘UV’. For the surface imaging the diffuse influence should be set to ‘Color:
1.0’ and for the topographic map ‘Intensity: 1.0’. These settings are described
in figure 8.11.
The final composite as viewed normal to the plane is shown in figure 8.12.
8-21
3D Scientific Visualization with Blender®
For this example we will use CAT scan data of a human head that is easy to download
and illustrates a simple example of volumetric rendering4. Other excellent examples from
radio astronomy and the NRAO radio telescope facilities can be found on-line as well5.
• Begin with the default file that loads on Blender start-up.
• Right-click to select the default cube object. This will act as the data container.
4
http://graphics.stanford.edu/data/voldata/
5
https://archive.nrao.edu/
8-22
3D Scientific Visualization with Blender®
Figure 8.12. Mars terrain composite generated from a map displacement modifer and texture layer.
• Scale the data container to match the data cube dimensions in the Transform
dialog on the right-hand side of the GUI.
• Click on the Materials tab on the far right-hand side of the Properties
panel.
• Click the ‘+’ button to add a new material. Select ‘Volume’ as the material
type.
• The graphic densities have been set in the accompanying blend file. For
different data these will have to be scaled appropriately by the user.
• Change the graphic density to 0.0 and density scale to 2.0.
• Under ‘Shading’ set the emission to 0.0 and scattering to 1.4.
8-23
3D Scientific Visualization with Blender®
The material type has been set and now the image slices can be applied to the
texture for the mesh.
• Click the Textures tab on the Properties panel.
• Click the ‘+ New’ button to create a new texture.
• From the Type drop-down box choose ‘Voxel Data’.
• Check the ‘Ramp’ box and set the far right ramp color to that of your
choosing. We will use a greyscale color for this example.
• Under the ‘Voxel Data’ section, open the first file in the image sequence.
• Change the ‘File Format’ and ‘Source’ to ‘Image Sequence’.
• Under ‘Mapping’ change the projection to ‘Cube’.
• Under ‘Influence’ select ‘Density’, ‘Emission’ and ‘Emission Color’ and set
their values to 1.0 (figure 8.13).
Several views of the data cube are shown in figure 8.14. The procedure outlined here
can be applied to any kind of 3D dataset that requires volume rendering for viewing [8].
A data cube from radio telescope observations is shown in figure 8.15 [9].
8-24
3D Scientific Visualization with Blender®
8-25
3D Scientific Visualization with Blender®
Figure 8.15. 3D rendering of a galaxy data cube obtained with observations from the National Radio
Astronomy Observatory Very Large Array in New Mexico, USA.
This example will combine a number of Blender physics module items and
demonstrate their properties.
• Begin by Add → Mesh → Plane and scale the object with the S key.
• Choose the Physics module on the Properties panel (figure 8.17).
• Select ‘Rigid Body’ and set the type to ‘Passive’.
• A ball (Add → Mesh → UV Sphere) should be added at a location Z = 1.0
above the plane.
• Choose the Physics module, select ‘Rigid Body’, and set the type to ‘Active’.
Hitting the play button on the animation time line will compute the position of
the ball with a = 9.8 m s−2 and no drag. The plane is passive and fixed, and therefore
8-26
3D Scientific Visualization with Blender®
Figure 8.16. Fields available to the user with the Blender physics module. Mesh objects can be set to react to
the physical constraints that occur because of a given field.
the ball simply stops. The ‘Surface Response’ for both the ball and the surface can be
modified from a range of zero to one. With a maximum value of 1.0 for both objects
the collision will be elastic with no energy dissipation—the ball will simply keep
bouncing throughout the animation repeatedly. We will now create projectile
motion by giving the ball an X-component to its initial velocity.
• Set the ‘Bounciness’ level to 0.5 for the sphere and 1.0 for the fixed plane.
• Add a second plane and rotate it with keys R–Y–90. Set the Physics module
to ‘Rigid Body’ and ‘Passive’ just like the first plane. In addition, check the
‘Animation’ box.
• Keyframe the X-location for the first and tenth frame. Due to the rigid body
dynamics we have now set up, the plane will give the ball an X velocity.
• Set the ‘Friction’ value for the fixed ground plane to 0.0.
Pressing the play button one more time from the beginning will now show the ball
exhibiting projectile motion.
We will use the mesh screw tool and multiple spheres to finish the rigid body
dynamics example.
• Add → Mesh → Circle to create the start of a rigid body tube.
• Enter Mesh Edit mode with the TAB key and add a rotation vector6 as shown
in figure 8.18.
6
wiki.blender.org/index.php/Doc:2.6/Manual/Modeling/Meshes/Editing/Duplicating/Screw
8-27
3D Scientific Visualization with Blender®
Figure 8.17. The Physics menu allows for the addition of fields to a visualization scene. These particular menus
show the configuration for a fixed passive surface with rigidity and elasticity values. The acceleration due to
gravity on Earth is set to the SI value of 9.8 m s−2, and the differential equation solver is set to 60 steps per
second under the Scene menu.
• Activate the screw tool on the left-hand side of the GUI and set the number of
steps to 48.
• A corkscrew tube will be created. Press the TAB key again to enter Object
mode and select the Physics Module tab. Set the ‘Rigid Body’ object to be
‘Passive’ with a ‘Mesh’ collision shape instead of the default ‘Convex Hull’.
This will allow the ball to roll inside the tube.
8-28
3D Scientific Visualization with Blender®
• Move the corkscrew relative to the plane mesh object such that the lower
opening will allow the ball to roll out onto the plane.
• Change the sphere object’s collision shape to ‘Sphere’ and place it at the top
of the corkscrew tube.
• Duplicate the sphere with SHIFT–D and place the new objects on the flat
plane (figure 8.19).
The simple elements for our rigid body dynamics simulation are in place. The last
step will be to bake the simulation elements and compute all the positions. As
depicted in figure 8.17, press the ‘Free All Bakes’ button followed by ‘Bake’. Press
the play button on the animation time line to view the simulation (figure 8.20).
For longer simulations, baking will take significantly longer depending on factors
like the number of vertices and fields in the simulation. However, by baking in the
dynamics and performing the computation a priori, the rendering time will be
significantly decreased.
Figure 8.18. The initial set-up for a rigid body simulation. This example from the Mesh Edit window shows
the set-up for a circle and rotation vector. The screw tool will be used to rotate the vertices about an incline to
create a corkscrew tube shape. This shape will have a mesh collision shape in the Physics module such that
another sphere can roll inside the tube.
Figure 8.19. UV-sphere mesh objects with a spherical collision shape set in the Physics module are duplicated
with SHIFT–D. The objects and properties are duplicated and set up for a collision.
8-29
3D Scientific Visualization with Blender®
Figure 8.20. The physics menu allows for the addition of fields to a visualization scene. These particular menus
show the configuration for a fixed passive surface with rigidity and elasticity values. The acceleration due to
gravity on is set to the SI value of 9.8 m s−2 and the differential equation solver is set to 60 steps per second
under the Scene menu.
Bibliography
[1] Perryman M A C et al 1997 The HIPPARCOS catalogue Astron. Astrophys. 323 L49–52
[2] Springel V 2005 The cosmological simulation code GADGET-2 Mon. Not. R. Astron. Soc 364
1105–34
[3] Jackson J D 1999 Classical Electrodynamics 3rd edn (New York: Wiley)
[4] Murray C D and Dermott S F 1998 Solar System Dynamics (Cambridge: Cambridge
University Press)
[5] Christensen P R et al Mars global surveyor thermal emission spectrometer experiment:
investigation description and surface science results J. Geophys. Res. 106 23823–72
8-30
3D Scientific Visualization with Blender®
[6] Levoy M 1988 Volume rendering: display of surfaces from volume data Comput. Graphics
Appl.
[7] Hassan A H, Fluke C J and Barnes D G 2011 Interactive visualization of the largest radio-
astronomy cubes New Astron. 16 100–9
[8] Kent B R 2013 Visualizing astronomical data with Blender Publ. Astron. Soc. Pac. 125 731–48
[9] Walter F et al 2008 THINGS: The H I Nearby Galaxy Survey Astron. J. 136 2563–647
8-31
IOP Concise Physics
Appendix A
Blender keyboard shortcuts
The listing below gives important keyboard shortcuts that will be useful in using
Blender for scientific visualization.
A Select/deselect all
TAB Toggle between Mesh Edit and Object modes
X Delete object
S Scale object
R Rotate object
G Grab object
I Insert keyframe
E Extrude selected vertices, lines, or faces
. Period key—center on selected object
CTRL–Z Undo
SHIFT–S Snap cursor
U UV Mapping
F12 Still frame render
T Object tools toggle
CTRL–E Mark edges and seams on meshes
→ Advance animation frame
← Reverse animation frame