10 Nov 2006 J. Perl How to Make a Movie 1 Geant4 Visualization Special Topic: How to Make a Movie Geant4 Spenvis Joint Workshop Joseph Perl SLAC.

Slides:



Advertisements
Similar presentations
Introduction to Operation of the XL-30 Scanning Electron Microscope Tutorial # 1 Overview of XL-30 Microscope Control Program.
Advertisements

Computer Basics Hit List of Items to Talk About ● What and when to use left, right, middle, double and triple click? What and when to use left, right,
FINAL CUT PRO VIDEO EDITING SUITE REVIEW. FINAL CUT PRO REVIEW GETTING STARTED: Start by clicking the Final Cut Pro (FCP) icon in your dock. Wait for.
11 January 2011 Geant4 Visualization Commands J. Perl 1 DAWN OpenGL Geant4 Visualization Commands Basic Visualization Commands Makoto Asai (SLAC) slides.
Chapter 6 Photoshop and ImageReady: Part II The Web Warrior Guide to Web Design Technologies.
Objectives Define photo editing software
12 Dec 2006 J. Perl Recent Developments in Geant4 Vis 1 HepRep/WIRED DAWN OpenGL Recent Developments in Geant4 Visualization Geant4 Lecture Course Tsukuba,
15 Sept 2007 J. Perl Overview of Geant4 Visualization 1 HepRep/HepRApp DAWN OpenGL Overview of Geant4 Visualization Geant4 Mini-Tutorial Hebden Bridge.
14 User Documents and Examples I SLAC Geant4 Tutorial 3 November 2009 Dennis Wright Geant4 V9.2.p02.
12 May 2007 J. Perl Future Plans for Geant4 Visualization 1 HepRep/HepRApp DAWN OpenGL Future Plans for Geant4 Visualization What’s Planned for the Next.
18th September 2007New Features in G4 Visualisation Hebden Bridge 1 Visualisation New or improved features 2007 Smooth trajectories Event keeping Picking.
Geant4 Visualization Review
11 May 2007 J. Perl How to Make a Movie 1 Geant4 Visualization Special Topic: How to Make a Movie Joseph Perl SLAC.
Highlights of latest developments ESA/ESTEC Makoto Asai (SLAC)
Graphics and Still Images John H. Krantz Hanover College.
SLAC Geant4 Tutorial 2009 J. Perl
12 May 2007 Geant4 Visualization Commands J. Perl 1 DAWN OpenGL Geant4 Visualization Commands Basic Visualization Commands Joseph Perl, SLAC HepRep/HepRApp.
Video on the Web John H. Krantz Hanover College. Outline What is Video Acquiring with a Digital Camera Creating with ImageJ Editing with QuickTime Delivering.
Macros Tutorial Week 20. Objectives By the end of this tutorial you should understand how to: Create macros Assign macros to events Associate macros with.
1 Advanced PowerPoint Cliff Solomon. 2 Presentation Outline Inserting Movies and Animations Into Your Presentations Using Progressive Disclosures and.
1 Chapter 20 — Creating Web Projects Microsoft Visual Basic.NET, Introduction to Programming.
© 2010 Delmar, Cengage Learning Chapter 4: Creating Animation.
1 ADVANCED MICROSOFT POWERPOINT Lesson 7 – Working with Visual and Sound Objects Microsoft Office 2003: Advanced.
Introduction to VBA. This is not Introduction to Excel We’re going to assume you have a basic level of familiarity with Excel If you don’t, or you need.
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Japan.
Chapter 3 Working with Symbols and Interactivity.
ES 101. Module MS Front Page Tutorial and Web Hosting.
Zubanov Alexei, 2006 Aug 07 – Sep 28 QtROOT package extension with Coin3D lib.
CIS—100 Chapter 9—PowerPoint 1. The PowerPoint User Interface 2 There is a tall band across the screen that contains many, very visual commands arranged.
Tutorial 6 Working with Bitmaps and Gradients, and Publishing Flash Files.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
User Documents and Examples I Sébastien Incerti Slides thanks to Dennis Wrigth, SLAC.
Learn about the types of Graphics that are available Develop a basic Graphics applet Develop a basic Graphics application Review the Java API and use.
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
CHAPTER TEN AUTHORING.
S. Guatelli, CPS Innovations, Knoxville, 13 th -21 st January Brachytherapy exercise.
Tutorial 7 Planning and Creating a Flash Web Site.
Adobe Flash CS3 Revealed
Geant4 Visualization 1 OpenGL DAWN VRML. Visualization Visualization Seeing what one does usually helps One can visualize geometry, hits, trajectories.
Introduction to Flash Animation CS 318. Topics Introduction to Flash and animation The Flash development environment Creating Flash animations  Layers.
WIRED 4 An extensible generic Event Display Mark Donszelmann SLAC, Stanford, U.S.A. CHEP2004, 27 september – 1 october Interlaken, Switzerland.
7 June 2005 Visualization & GGE Demo J. Perl 1 HepRep/WIRED DAWN OpenGL Geant4 Visualization & GGE Demo Joseph Perl, SLAC.
Adobe Flash CS4 – Illustrated Unit A: Getting Started with Adobe Flash.
Quick Introduction to creating Eyeblaster ads.  Steps for creating an Eyeblaster ad  Building Eyeblaster compatible flash assets  Adding Eyeblaster.
12 October 2006 G4Vis: Status, New Features and Issues 1 HepRep/WIRED DAWN OpenGL G4Vis: Status, New Features and Issues Geant4 Collaboration Workshop.
Adobe Photoshop CS5 – Illustrated Unit A: Getting Started with Photoshop CS5.
PHOTOGRAPHY BASICS PARTS OF THE CAMERA AND HOW IT WORKS.
Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl.
May 20, 2005Wah-kai Ngai1 Basic Visualization Tutorial Using Geant4.
Geant4 examples Sébastien Incerti On behalf of the Geant4 collaboration with special thanks to Luciano Pandola, INFN.
XP Tutorial 3 Creating Animations. XP New Perspectives on Macromedia Flash MX Elements of Animation Layers are used to organize the content of.
June 4-8, G4 Paris Visualization II P. Gueye/J. Perl 1 DAWN OpenGL Geant4 Visualization Commands Basic Visualization Commands Paul Guèye, HU Courtesy:
Introduction to Animation In animation, a series of images are rapidly changed to create an illusion of movement.
Adobe Photoshop CS4 – Illustrated Unit A: Getting Started with Photoshop CS4.
CIS 205—Web Design & Development Flash Chapter 3 Working with Symbols and Interactivity.
Software Overview How to… Review Video and Data  Review the Journal Review the Journal  Simple Search Simple Search  Advanced Search Advanced Search.
Photoshop CS6 – Nelson Unit 3: Photoshop CS6. Objectives Define photo editing software Start Photoshop and view the workspace Use the Zoom tool and the.
Trajectory and Hit Visualisation Jane Tinslay, SLAC October 2006.
Movie Maker This presentation will get you started with using Windows Movie Maker - Your very own movie studio. It provides step by step instructions for.
Reading and Writing Image Files
Getting Started with Adobe Photoshop CS6
User Documents and Examples I
Pre-Production Determine the overall purpose of the project.
Geant4 Visualization Commands
Animate Workspace. Objective % Utilize appropriate tools and methods to produce digital animation.
Visualization Status/Development
WIRED 4 Event Display Linear Collider Simulation Workshop
ANIMATE WORKSPACE Stage Timeline Properties Panel Library Panel
Movie Maker This presentation will get you started with using Windows Movie Maker - Your very own movie studio. It provides step by step instructions for.
Presentation transcript:

10 Nov 2006 J. Perl How to Make a Movie 1 Geant4 Visualization Special Topic: How to Make a Movie Geant4 Spenvis Joint Workshop Joseph Perl SLAC

10 Nov J. Perl How to Make a Movie The techniques presented here were pioneered by John Allison. This talk draws heavily on the documentation and examples that John presented at last month’s Geant4 Collaboration Workshop in Lisbon. Acknowledgement

10 Nov J. Perl How to Make a Movie Part 1: The Old Technique Stitching Still Pictures Together to Make a Movie

10 Nov J. Perl How to Make a Movie Making movies with just changes to camera position has been possible for years using macros Produce a large number of still images Stitch them together into a movie file (mpeg) Conversion to mpeg somewhat complicated Finally documented in December release New section of the Application Developers Guide, section I’ll show you here how to do it with OpenGL, but you can also do it using other drivers that can output pictures, such as DAWNFILE and RayTracerX Stitching Still Pictures Together to Make a Movie

10 Nov J. Perl How to Make a Movie Movies: Stitched Together from Multiple Stills

10 Nov J. Perl How to Make a Movie It’s All About Macros Main Macro /control/verbose 2 /vis/open OGLSX /vis/drawVolume /vis/viewer/reset /vis/viewer/set/style surface /vis/viewer/set/projection perspective 50 deg /control/alias phi 30 /control/loop movie.loop theta Inner Macro, movie.loop /vis/viewer/set/viewpointThetaPhi {theta} {phi} /vis/viewer/zoom /vis/viewer/refresh At each step of the macro the volume rotates a little zooms in a little and then refreshes the OpenGL window Demo live from Geant4 Omit /vis/viewr/refresh on auto-refresh devices such as OGLIX and OGLSX

10 Nov J. Perl How to Make a Movie To Create a Movie File, Start by Saving the Individual Frames Main Macro stays the same: /control/verbose 2 /vis/open OGLSX /vis/drawVolume /vis/viewer/reset /vis/viewer/set/style surface /vis/viewer/set/projection perspective 50 deg /control/alias phi 30 /control/loop movie.loop theta Inner Macro, movie.loop, just has one extra command to output to file /vis/viewer/set/viewpointThetaPhi {theta} {phi} /vis/viewer/zoom /vis/oglx/printEPS /vis/viewer/refresh At each step of the macro the volume rotates a little zooms in a little and then an eps file is produced Omit /vis/viewr/refresh on auto-refresh devices such as OGLIX and OGLSX

10 Nov J. Perl How to Make a Movie From EPS to MPEG (slide 1 of 2) To turn the many eps files into a single mpeg, you first need to generate an mpeg parameters file. To do this, you will use the script: make_mpeg2encode_parfile.sh which can be found in geant4/UserDoc/UserGuildes/ForApplicationDeveloper/html/ Visualization/ Run the script as: make_mpeg2encode_parfile.sh G4OpenGL_*eps Edit the resulting mpeg2encode.par file to specify file type and size Before “/* horizontal_size */” put a size, such as: 600 /* horizontal_size */> Before “< /* vertical_size */” put a size, such as: 600 /* vertical_size */> Before /* aspect_ratio_information” put a ration, such as: 1 /* aspect_ratio_information 1=square pel, 2=4:3, 3=16:9, 4=2.11:1 */

10 Nov J. Perl How to Make a Movie From EPS to MPEG (slide 2 of 2) You’ll need an eps conversion facility called “convert” that you can get from: imagemagick.org Batch convert the eps files to ppm files using a shell command such as: for i in G4OpenGL*eps; do j=`basename $i.eps`; command="convert $i $j.ppm"; echo $command; $command; done Finally, run the mpeg encoder using the parameters file and the ppm files: mpeg2encode mpeg2encode.par G4OpenGL.mpg mpeg2encode is free software from: The resulting mpeg file can be run in any mpeg player. For example, on a Mac, opening G4OpelGL.mpg starts a QuickTime player. The above instructions used OpenGL, but you can also make a movie using other drivers that can output pictures, such as DAWNFILE and RayTracerX. For details on making movies from any of those drivers, see section 8.10 of the Geant4 Application Developers Guide.

10 Nov J. Perl How to Make a Movie Part 2: the New Technique Time Development of the Event Live from OpenGL

10 Nov J. Perl How to Make a Movie New Technique: Time Development of the Event New features in the December release will allow you to do a new kind of Geant4 movie. You will be able to make movies that show Time Development of an event I.e., a shower in slow motion Based on technique of “time-slicing”, breaking trajectories into individual slices, each with a time attribute. requires newer visualization features, rich trajectory and some extensions to the OpenGL Stored driver /vis/open OGLSX or for windows /vis/open OGLSWin32 You can run these animations Directly from Geant4. You do NOT need to output any files or stitch them together into an mpeg.

10 Nov J. Perl How to Make a Movie Movies: Live from Geant4 OpenGL

10 Nov J. Perl How to Make a Movie You’ll Need the December 15th Release Because you’ll need the latest Rich Trajectory code Because you’ll need the latest Rich Trajectory code so that it can instrument each trajectory step with a time value so that it can instrument each trajectory step with a time value And the latest Enhanced Trajectory Drawing code And the latest Enhanced Trajectory Drawing code so that it can slice the trajectory into many different graphics primitives based on time slices so that it can slice the trajectory into many different graphics primitives based on time slices And the latest Geant4 OpenGL Driver And the latest Geant4 OpenGL Driver so that it can show one time slice at a time so that it can show one time slice at a time And the latest Trajectory and Hit Filtering And the latest Trajectory and Hit Filtering so you can get all of those annoying low energy gammas out of the picture so you can get all of those annoying low energy gammas out of the picture The techniques shown in this talk were first unveiled by John Allison at the Geant4 Collaboration Workshop just last month in Lisbon The techniques shown in this talk were first unveiled by John Allison at the Geant4 Collaboration Workshop just last month in Lisbon See John’s example movies at: See John’s example movies at:

10 Nov J. Perl How to Make a Movie The New Vis Tutorial Examples The December release includes two new example macros in the visTutor part of example N03. This lecture is based on those examples. /examples/novice/N03/visTutor/exN03Vis12 /examples/novice/N03/visTotur/exN03Vis13 Before you try to make a move, just build and run exampleN03 normally and check that you have OpenGL working. You’ll need the “stored” version of OpenGL for this work: /vis/open OGLSX or on Windows /vis/open OGLSWin32 Make sure something appears in the OpenGL window when you do a simple visualization command such as: /vis/drawVolume

10 Nov J. Perl How to Make a Movie The New Trajectory Commands The new examples use various forms of the following commands: Add trajectories using the new Rich Trajectory option /vis/scene/add/trajectories rich Create a trajectory model to color by charge /vis/modeling/trajectories/create/drawByCharge Specify the new time-slicing option in the trajectory model /vis/modeling/trajectories/drawByCharge-0/default/ setTimeSliceInterval 0.1 ns Chops trajectory into pieces, each assigned a time range Remember that particles are often relativistic and travel 30 cm/ns Filter trajectories to remove gammas /vis/filtering/trajectories/create/particleFilter /vis/filtering/trajectories/particleFilter-0/add gamma /vis/filtering/trajectories/particleFilter-0/invert true

10 Nov J. Perl How to Make a Movie The New OGL Commands At present, the time-dependent animation only works in the Stored Mode OpenGL drivers /vis/open OGLS* So the commands are specific to /vis/ogl Specify time window /vis/ogl/set/startTime 2 ns 1 ns Items are displayed if their time range* and viewer’s time window overlap Default time range is -infinite to infinity, so normal items such as detector geometry are always drawn Specify how fast slices should fade, gives a “vapor trail” effect /vis/ogl/set/fade 1 Specify whether the light wavefront should be shown /vis/ogl/set/displayLightFront true mm Specify whether the current time should be displayed /vis/ogl/set/displayHeadTime true

10 Nov J. Perl How to Make a Movie The Time-Slice Loop Simplest form, from exN03Vis12.mac /control/alias timeRange 0.1 /control/loop loop.mac startTime -{timeRange} where loop.mac specifies start time and range for which slices to show /vis/ogl/set/startTime {startTime} ns {timeRange} ns Slightly more complicated form, from exN03Vis13.mac, adds panning so that camera follows the light front and specifies time slices by end time rather than start time /control/alias timeRange 0.1 /control/alias dx 0.3 /control/loop loop.mac endTime where loop.mac specifies end time for which slices to show /vis/viewer/pan {dx} 0 mm /vis/ogl/set/endTime {endTime} ns {timeRange} ns

10 Nov J. Perl How to Make a Movie Running the New Vis Tutorial Examples examples/novice/N03/visTutor/exN03Vis12.mac does three animations in a row: Draw by charge with trajectory points Draw by particle ID (remove g’s) p-m-e decay examples/novice/N03/visTutor/exN03Vis13.mac does one animation, more complex since it includes camera panning 10 GeV EM shower showing light front Camera follows (pans) at speed of light To run either of them: Get the December release, Geant4.8.2 Build examples/novice/N03 Run N03 with one of the above macros, such as: $G4WORKDIR/bin/Darwin-g++/exampleN03 visTutor/exN03Vis12.mac

10 Nov J. Perl How to Make a Movie Still from exampleN03 visTutor/ exN03Vis12.mac 1 GeV electron into lead-liqAr calorimeter Demo live from Geant4 Unfortunately text is lost making a movie file (a current OpenGL  eps “feature”)

10 Nov J. Perl How to Make a Movie Some More Example Animations The following is a set of example animations prepared by John Allison. You can check them out yourself from John’s movies page:

10 Nov J. Perl How to Make a Movie 50 MeV electron into lead-liqAr calorimeter e - red e + blue  green Yellow circles are step points -- geometrical boundaries or physical processes Single50MeV.mpg

10 Nov J. Perl How to Make a Movie 10 GeV electron into lead-liqAr calorimeter over 800 ps Single10GeVSlow.mpg Single10GeVSlow.mpg Gammas filtered out /vis/filtering/ trajectories/create/ particleFilter /vis/filtering/ trajectories/ particleFilter-0/add gamma /vis/filtering/ trajectories/ particleFilter-0/ invert true Electrons red Positrons blue

10 Nov J. Perl How to Make a Movie Same 10 GeV electron, camera follows by panning at light speed Single10GeVFollowed.mpg Single10GeVFollowed.mpg Shows light front (wave front of light starting at same time and place) /vis/ogl/set/ displayLightFront true mm Time range 800 ps

10 Nov J. Perl How to Make a Movie 100 MeV  + pi+100MeVmu+e+.mpg pi+100MeVmu+e+.mpg Stops, decays to  + Stops, dallies (meanlife 2  s), decays to e + Annihilates to gamma-gamma Compton scattering Duration 4  s

10 Nov J. Perl How to Make a Movie 10 Gev  - pi-10GeVEMShower.mpg pi-10GeVEMShower.mpg N04 hadronic physics Interacts early (potential confusion with EM shower) Produces EM shower, presumably via charge exchange to  0  Neutrons also produced  + magenta  - cyan n yellow green Others grey Duration 2 ns

10 Nov J. Perl How to Make a Movie 10 Gev  - pi-10GeVNeutrons.mpg pi-10GeVNeutrons.mpg N04 hadronic physics Produces neutron chain reaction  filtered e- red e + blue  + magenta  - cyan n yellow green Others grey Duration 2 ns

10 Nov J. Perl How to Make a Movie Another 10 GeV  - pi-10Gevpi+neutron SideView.mp4 pi-10Gevpi+neutron SideView.mp4 3 fast  -  + interaction 3 ns Mpeg4 encoding with QuickTime Pro

10 Nov J. Perl How to Make a Movie Same pi-10Gevpi+neutron Zoom.mp4 pi-10Gevpi+neutron Zoom.mp4 Perspective view Slow zoom Detector drawing suppressed 3 ns

10 Nov J. Perl How to Make a Movie References and Further Resources

10 Nov J. Perl How to Make a Movie Geant4 Visualization Resources Geant4 Installation Guides  Hands on WIRED3 Tutorial  Hands on DAWN Tutorial  Hands on OpenGL Tutorial  Geant4 Visualization Commands  (and.pdf) Geant4 Advanced Visualization  (and.pdf) On-line Documentation on Geant4 Visualization:  html/Visualization List of Visualization Commands:  html/Control/UIcommands/_vis_.html For Questions or Comments: Geant4 Visualization Online Forum: 

10 Nov J. Perl How to Make a Movie References OpenScientist Home Page OpenScientist Home Page HepRep: a generic interface definition for HEP event display representables HepRep: a generic interface definition for HEP event display representables Fred: oh no, another event display (a HepRep client) Fred: oh no, another event display (a HepRep client) WIRED3 HepRep Browser WIRED3 HepRep Browser DAWN Hot Information DAWN Hot Information DAWN Home Page DAWN Home Page DAWNCUT Home Page DAWNCUT Home Page DAVID Home Page DAVID Home Page Satoshi Tanaka’s GEANT4 Ritsumeikan University Group Home Page (more information on DAWN, sample PRIM files, images, etc.) Satoshi Tanaka’s GEANT4 Ritsumeikan University Group Home Page (more information on DAWN, sample PRIM files, images, etc.)