Contours Newsletter
ADDING FLASH MOVIE EXPORT OPTIONS TO YOUR TECPLOT MACROS
Utilize Flash's flexibility and quality to impress colleagues, managers, prospects and customers.
Flash animation of
SPLASH unsteady simulation results for an America's Cup yacht moving through oblique seas.
Flash Best Practices
Here are some tips to make Flash work for you:
- Always use Antialiasing.
- Use the default Supersample factor of 3.
- Use the free Swiff Player to view Flash animations.
- Use the Swiff Point Player to insert Flash movies into PowerPoint.
- Use True Color if file size is not an issue.
- Use JPEG compression when file size is an issue. Experiment with the Quality slider to find the right balance between niceness and file size.
- Never resize your animations. Make new animations for every desired display size.
- A good Flash resource is December 2003's Flash Contours article
Flash Macro Commands
Add the following commands to your Tecplot macros to create Flash animations (or replace current export setup options). Flash output is only available in Tecplot 10 Release 2 or newer.
You will need to adjust the image width, animation speed and quality for your specific files.
True Color Commands — Use for Presentations, Sharing and PowerPoint
$!EXPORTSETUP EXPORTFORMAT = FLASH
$!EXPORTSETUP BITDUMPREGION = ALLFRAMES
$!EXPORTSETUP IMAGEWIDTH = 300
$!EXPORTSETUP USESUPERSAMPLEANTIALIASING = YES
$!EXPORTSETUP SUPERSAMPLEFACTOR = 3
$!EXPORTSETUP ANIMATIONSPEED = 10
JPEG Compression Commands— Generate Reasonably Sized Files for Web and E-mail
$!EXPORTSETUP EXPORTFORMAT = FLASH
$!EXPORTSETUP BITDUMPREGION = ALLFRAMES
$!EXPORTSETUP IMAGEWIDTH = 300
$!EXPORTSETUP USESUPERSAMPLEANTIALIASING = YES
$!EXPORTSETUP SUPERSAMPLEFACTOR = 3
$!EXPORTSETUP ANIMATIONSPEED = 10
$!EXPORTSETUP FLASHIMAGETYPE = JPEG
$!EXPORTSETUP QUALITY = 45
Flash Macro Example
The macro below created our Plot of the Month movie — Liquid Flow Through a Nozzle.
-
Flash export options:
- Speed is set to 8.
- JPEG compression is used to reduce file size for quick Web loading and display.
- Quality of 85 is used to balance niceness with file size.
- A 325 pixel wide movie is created. This fits well into our article.
- Supersampling is set to 3.
- The movie is named nozzleflow.swf.
#!MC 1000
$!VarSet |MFBD| = 'C:\Program Files\TEC100'
$! EXPORTSETUP EXPORTFORMAT = FLASH
$!EXPORTSETUP SUPERSAMPLEFACTOR = 3
$!EXPORTSETUP ANIMATIONSPEED = 8
$!EXPORTSETUP FLASHIMAGETYPE = JPEG
$!EXPORTSETUP QUALITY = 85
$!EXPORTSETUP IMAGEWIDTH = 325
$!EXPORTSETUP USESUPERSAMPLEANTIALIASING = YES
$!EXPORTSETUP EXPORTFNAME = 'C:\user\Desktop\nozzleflow.swf'
-
Flash export options:
- The flow solver generates 80 data files that are saved as Tecplot layout files.
- The first layout is opened and altered (borders are removed and specular highlights added).
- The first frame of the animation is exported.
- The next Tecplot layout file is opened and the loop continues.
- After 80 frames export, the Flash animation is saved.
$!LOOP 80
$!OPENLAYOUT "H:\plots\nozzle\File-|LOOP%02d|.lay"
APPEND = FALSE
$!REDRAWALL
$!IF |LOOP| ==1
$!FRAMELAYOUT SHOWBORDER = NO
$!GLOBALTHREED LIGHTSOURCE{INCLUDESPECULAR = YES}
$!EXPORTSTART
$!ENDIF
$!IF |LOOP| !=1
$!FRAMELAYOUT SHOWBORDER = NO
$!GLOBALTHREED LIGHTSOURCE{INCLUDESPECULAR = YES}
$!EXPORTNEXTFRAME
$!ENDIF
$!ENDLOOP
$!EXPORTFINISH
$!RemoveVar |MFBD|