Tutorial: Creating 3D Animations - MicroImages

Transcription

3DANIMATIONTutorialCreating 3DAnimationsinTNTmips TNTedit TNTview

Creating 3D AnimationsBefore Getting StartedThis booklet introduces techniques for constructing and manipulating animated3D perspectives in TNTmips , TNTedit , and TNTview . Animated 3D perspectives are constructed from a surface object, one or more drape objects, and aselected path through the terrain. After you define the 3D animation, you canview a wireframe preview, render the solid surface animation in the view window(only a very fast computer will give satisfactory solid renderings in real time), orcreate an MPEG file for later viewing and wider distribution.Prerequisite Skills This booklet is a companion volume to the tutorial 3D Per-spective Visualization. Take up the exercises in this booklet only after you arefamiliar with the concepts in that booklet. This booklet also assumes that youhave completed the exercises in the tutorials Displaying Geospatial Data andNavigation. The exercises in those booklets present basic skills and techniquesthat are not covered again here. Please consult those booklets for any review youneed.Sample Data The exercises presented in this booklet use sample data that isdistributed with the TNT products. If you do not have access to a TNT products CD, you can download the data from MicroImages’ Web site. In particular, this booklet uses objects in the CB DATA data collection. Make a read-writecopy of these files on your hard drive; you may encounter problems if youwork directly with the read-only sample data on the CD-ROM.More Documentation This booklet is intended only as an introduction to 3Danimation. Consult the TNT Reference Manual for more information.TNTmips and TNTlite TNTmips comes in two versions: the professional ver-sion and the free TNTlite version. This booklet refers to both versions as“TNTmips.” If you did not purchase the professional version (which requires asoftware license key), TNTmips operates in TNTlite mode, which limits objectsize.The 3D Perspective process is available in TNTmips, TNTedit, and TNTview. Allthe exercises can be completed in TNTlite using the sample geodataKeith Ghormley, 25 April 2005It may be difficult to identify the important points in some illustrations withouta color copy of this booklet. You can print or read this booklet in color fromMicroImages’ Web site. The Web site is also your source for the newesttutorial booklets on other topics. You can download an installation guide,sample data, and the latest version of TNTlite:http://www.microimages.compage 2

Creating 3D AnimationsMaking 3D AnimationsThe Display Spatial Data process in the TNT products provides a number of flexible tools for 3Dand stereo 3D visualization of many kinds of projectmaterials. One of the most powerful visualizationfeatures is 3D animation, which lets you create ananimated fly-by of any 3D surface. You can fly overelevation surfaces (or sail over bathymetric surfaces)for realistic animations, or you can use non-physical surfaces: any kind of raster object generated byTNT’s analytical processes that lends itself to 3Dvisualization. Your animation can follow a linear pathor a complex line, it can orbit a central point, or it canremain at a fixed point and pan the view.You can define complex overlays that include raster,CAD, vector, TIN, and database pinmap layers.The general sequence of steps is:1. select a surface object and first drape layer2. define a flight path3. add drape layers4. record the resultSteps 2 and 3 can be mixed,but generally it is quicker todefine the flight path on asingle drape layer whileworking with the surfaceobject in 3D wireframe preview. Even moderately powered computers can rendera 3D wireframe animation inreal time, while only very fastcomputers can give satisfactory results rendering a3D animation in solid view.To view a solid 3D animation, it is more practical tocreate an output animationfile.page 3The 3D Animation processin TNTmips can produceMPEG and AVI files that canbe played on any computer.Below: a 3D animation thatorbits Mount Whitney inCalifornia. WHITORB4.MPG isavailable from theMicroImages Web site.

Creating 3D AnimationsA 3D AnimationSTEPS; open the Display SpatialData process; select Open /Open 3DAnimation; select 3DSIM / LAYOUTS /PAGE4 from the TNTsample data; select the Layers tab inthe Animation Controlswindow; click the Play buttonin the PerspectiveView windowThe sample data distributed with the TNT productsincludes a simple 3D animation layout. Launch theDisplay Spatial Data process and select Open 3DAnimation from the Open menu. Use the standardselection tools to get the PAGE4 layout from the LAYOUTS project file in the 3DSIM folder.TNT opens three windows: an Overhead View window (a familiar 2D view), a Perspective View window (familiar from the 3D Perspective Visualizationtutorial), and an Animation Controls window. ThePerspective View window contains a wireframe preview of the Crow Butte map quadrangle elevationsurface.Examine the playback controls in the PerspectiveView window. Click the Play button and watch thewireframe animation. The faster your computer’sprocessor and video subsystem, the smoother theanimation appears.PauseFast ReversePlayback controls in thePerspective View window let youstart and stop the animation.The Perspective View windowinitially shows a wireframe viewof the surface object.Play Reverse Fast ForwardPlayThe Layers tab in the AnimationControls window offers layer controlsfor the surface and drape layers.page 4

Creating 3D Animations3D Animation ControlsThe Overhead View window contains the 2D display controls familiar to you from other displayand visualization processes. Likewise, except forits playback controls, the Perspective View window contains controls that should already be familiar to you. Most of the controls unique to the 3DAnimation process are found in the Animation Controls window.STEPS; in the AnimationControls window, selecteach of the tabbedpanels in turn; after you have surveyedthe controls, close thePAGE4 layout with File /Close in the AnimationControls windowIn the Animation Controls window, select each ofThe Edit Animation Paththe tabbed panels in turn and examine their contool in the Overheadtents. The Layers panel offers standard layer conView window lets youtrols. The Overall panel lets you select the map apply standard drawingprojection and also reports the distance and fly time tools to the animation path.for the current path. The Motion panel lets you select the type of animation: path, orbit, or pan. TheViewer panel gives height and pitch controls. The Subsequent exercises willLimits panel lets you set maximum values for ve- treat the animation controlslocity, acceleration, deceleration, and turn rate. The individually.Manual panel reports the current pathsettings from the drawing tool in theOverhead View window, and lets youenter exact values to fine-tune the pathThe Edit Animationparameters.Path tool lets youchange the animationpath.page 5

Creating 3D AnimationsAdd Surface and Drape LayersSTEPS; Select 3D / New 3DAnimation from theDisplay Spatial Datamenu; add CB ELEV /DEM 16BIT as asurface layer; add CB COMP /8 BIT as a drapelayerNOTE: As with the 3DPerspective visualizationprocess, some controlparameters can cause youto lose sight of the layers inthe Perspective Viewwindow. Some values mayplace you beneath thesurface, or looking awayfrom it. If your view “goesblank,” select the Viewertab in the AnimationControls window. Try adifferent Height Value or adifferent Pitch Angle inorder to recover the view.Select New 3D Animation from the 3D menu in theDisplay Spatial Data process. TNT opens the Overhead View, Perspective View, and Animation Controls windows.The first thing to do in a new animation is always toadd a surface layer. Click the Add Surface icon button in the Animation Controls window and selectQuick-Add Surface. Use the standard selection process to select the raster object CB ELEV / DEM 16BITfrom the CB DATA folder. Notice that the PerspectiveView window shows a wireframe as soon as youcomplete the selection, but that the Overhead Viewwindow is empty: you must select a drape layer inorder to see anything in the Overhead View.Click the Add Layer(s) icon button in the AnimationControls window and select the CB COMP / 8 BITraster object from the CB DATA folder. For now, addjust one drape layer. A subsequent exercise willshow how to enhance your 3D animation with creative layer effects. But it is a good practice to limityourself to just one drape layer as you begin thedefinition of a 3D animation.page 6

Creating 3D AnimationsDefine a Simple PathThe Motion tab in the Animation Controls window offers three types of animation: path, orbit, and pan. Selectthe Path value on the Type option button. Since the Edit Animation Path toolin the Overhead View window is preselected, TNT opens the standard Line/ Polygon Edit Controls palette. If youare unfamiliar with these drawing tools, refer to thetutorial Editing Vector Geodata. If some other toolhas been selected in the Overhead View window,click the Edit Animation Path tool icon.Draw a simple one-segment path on the OverheadView. Notice that TNT updates the wireframe inthe Perspective View window to show the startingpoint and orientation you have selected. You maywish to visit the Viewer tab in the Animation Controls window and try different Height and Pitchvalues.Click the clear button in the Line/Polygon EditControls palette to remove your line, andthen draw another. Experiment with different starting points and path directions.The Line/Polygon Edit Controls arepresented in more detail in thetutorial Editing Vector Geodata.page 7STEPS; select Path in the Typeoption button of theMotion tab in theAnimation Controlswindow; use the Line/PolygonEdit Controls tool paletteto draw a simple linesegment as illustrated; visit the Viewer panel inthe Animation Controlswindow and trydifferent Height andPitch values

Creating 3D AnimationsWireframe AnimationSTEPS; use each of the playbackbuttons in the Perspective View window;use the layercontrols in theAnimation Controlswindow to turn off theHide/Show icon for thesurface layerTurn off the Hide/Showicon for View 2 for thesurface layer so that youwork with only the drapelayer wireframe.Use the wireframe mode for all interactive setup andtesting of your animation. Wireframe renderingsrequire much less processing than solid view renderings, and thus even moderately-powered computers can give you a reasonable wireframe animation effect.Familiarize yourself with the operation of each ofthe playback buttons in the Perspective View window. First click the Play button, which runs theanimation from the first position to the last. Thenclick the Play Reverse button, which runs the sameanimation backwards. Try the Fast Reverse and FastForward buttons which dropframes to render the animation at4X speed. The Pause button stopsthe animation at its current position so than any of the Play or Fast buttons resumethe animation from that position. The Stop buttonalso stops the animation at its current position, butthereafter, the Play and Fast buttons re-start theanimations from their initial positions.Recall from your work in 3D PerspectiveVisualization that each layer has its ownwireframe representation. Use the standard layer controls to examine the colorassignments for each layer.The drape layer wireframe color is red.If the Hide/Show icon for thedrape layer is on, the drapelayer’s wireframe hides thesurface layer in thePerspective View window.page 8

Creating 3D AnimationsImprove Rendering SpeedOnly the fastest computers will be able to render a3D animation so that you will be able to view theanimation effect in solid view mode. Normally,you should define your 3D animation in wireframemode and then use the Record Movie buttonto create an MPEG or AVI file for later viewing.A long complex animation that uses multiple surfacelayers may take an hour or more to process into anoutput animation file (see page 14).If you have a very fast computer, you may want tosee solid renderings of your 3D animations. Theprocess attempts to maintain the specified velocity for viewing, and when the computer is not fastenough, the process drops frames. In the most severe case, the process may render only the initialand final frames, dropping everything in between.Many other generaloptimization tricks apply tothe 3D Animation process(and to all TNT processes): get a faster computer pre-process 24-bit color ifyou work in 8-bit colormode add more RAM get a faster videosubsystemYou can take some measures to relieve some processing burden and produce a smoother 3D animation: Resize the Perspective View window. Thesmaller the window, the lower the demands onprocessing power. Turn off foreground smoothing. Foregroundsmoothing blurs the blocky, discrete imagepixels near the viewer. It improves the appearance, but it increases the processing load. Use constant altitude instead of constant heightabove the surface (Viewer panel in the Animation Controls window). Hide the drape layers with the layer controls inthe Layers tab of the Animation Controls window Even the wireframe animation can be improvedif you use a lower wireframe sampling ratepage 9To get a preview of thesolid view before recording, you can pause thewireframe animation atvarious points along theway and temporarily turnon the Solid View. Checkthe appearance of the fullyrendered “snapshot,” andthen resume the animationin wireframe mode.

Creating 3D AnimationsDefine a Complex PathSTEPS; trace the Crow Buttedrainage path asillustrated; play the wireframeanimation; clear the drainage pathand draw an arbitrarypath with extreme zigzags; play the wireframeanimation; adjust the Maximum TurnRate in the Limits taband run the wireframeanimation again (tryvalues 10 deg/s, and 100deg/s)The simple straight-line path you defined in the previous exercise has limited real-world usefulness.More often, your 3D animations will be designed tofollow some real-world feature such as a mountainridge, a canyon, or a pipeline. You can use the Line/Polygon Edit Controls to define a path of any complexity. Your path can cross itself many times andreturn to its point of origin. Any 3D animation thatforms a closed path can be shown continuously withthe loopback feature of your animation viewer software.For this exercise, trace the drainage in the Crow Buttemap quadrangle as illustrated.When you define a complex path, TNT automatically smooths the turns so that the corners in theline do not cause a jerky animation effect. TheLimits panel in the Animation Controls window letsyou adjust the parameters that control how the process handles corners. Test severalcontrol values in wireframe mode onan extreme zig-zag path.Use a complex path to followreal-world features, such ascanyons, ridges, or roadways.Use the standard TNT linedrawing tools to define acomplex path, such as the oneillustrated, which follows adrainage along its course.page 10

Creating 3D AnimationsOrbit a Central PointA special type of circular path in the 3D Simulator iscalled an orbit. In orbit mode, the animation keeps acentral point as the focus of the view and movesthrough an arc or circle around it. Because it keepsthe same point at the center of the animation, anorbit gives an especially strong visual sense of the3D features of the surrounding terrain.Select Orbit in the Type option button in the Motion panel of the Animation Controls window. TheEdit Animation Path tool becomes a simple circletool. Drag the center of the circle to the point youwant as the central focus. Drag the edge of thecircle to move the orbit path closer or farther awayfrom the center. Drag the radius of the circle toselect the initial viewpoint.Other controls in the Motion tab let you select afull-circle or just an arc, and choose the directionof the orbit (clockwise or counter-clockwise).You can select Full Circle, One-Way,or Two-Way sweeps in Orbit mode.STEPS; select Orbit in the Typeoption button in theMotion panel; drag and resize the circletool; play the wireframeanimationfull-circle orbitinitialviewfocusorbitpathpartial orbitThe Orbit tool shows the orbitpath around the focus point,and a radius that representsthe initial viewing direction.Controls for the Orbitmode let you definesection time, turn rate,sweep length, and orbitdirection.page 11

Creating 3D AnimationsPan from a Single ViewpointSTEPS; select Pan in the Typeoption button in theMotion panel; drag and redirect thecircle tool; play the wireframeanimationThe Pan tool could be usedin conjunction with outputfrom the TNTmipsViewshed process(Process / Raster /Elevation / Viewshed). Youcould drape the viewshedoutput raster on the 3DAnimation View.The final type of path in the 3D Animation processis not really a path at all: the Pan mode. In panmode, the viewpoint remains fixed and the animation pans around it. The animation is created bysweeping the direction of view through an arc orcircle that pivots around the viewpoint. Because itremains on one point at the center of the animation,a pan gives a weaker visual sense of the 3D featuresof the surrounding terrain. Pan views are useful forviewshed animations and any applications whereline-of-sight is important.Select Pan in the Type option button in the Motionpanel of the Animation Controls window. The EditAnimation Path tool becomes a simple circle tool.Drag the center of the circle to the point you wantas the center. Drag the radiusof the circle to select the initial view direction. You candrag the edge of the circle toenlarge or reduce its size, butthe Pan tool’s circle size hasno effect on the animation.Other controls in the Motiontab let you select a full-sweepor just an arc, and choose thedirection of the pan (clockwise or counter-clockwise).The Pan tool shows a circlearound the central viewpoint,and a radius that representsthe initial viewing direction.page 12

Creating 3D AnimationsAltitude, Pitch, and LimitsMost default control values in the 3D Animationprocess produce good animation results. Nevertheless, you can access many specific parametersfor exact control of the animation.The Motion panel lets you specify a length of timefor the animation; the process automatically adjuststhe relative speed. Or, you can specify a speed andthe process adjusts the time required.The Viewer panel lets you set the height and pitch.Be careful: some combinations of height and pitchcan move the surface out of the view.STEPS; visit each of the panelsin the AnimationControls window; examine the currentcontrol values andconsider how thosesettings produce thecurrent animation; play with different controlvalues and see if you canpredict the effect on theanimationThe Limits panel changes the speed and smoothness for starts, stops, and turns.The Manual panel lets you add and modify pathcoordinates to achieve exact positions.Values in the Limits panelchange the speed andsmoothness of the animation.Change the time or speed and theassociated value is updated automatically.Add or modify path coordinatesto specify exact positions.The wrong height or pitch valuescan cause the animation to look inthe wrong direction and not see thesurface.page 13

Creating 3D AnimationsRecord a MovieSTEPS; click Record Movie; in the General panel,select MPEG MovieFormat and turn on theReduce BackgroundSpeckle toggle; in the Template panel,select and positionProfile, Plan, and NorthArrow elements; in the Profile and Planpanels, choose styles forpath, viewer, and terrainelements; in the Graphics panel,choose settings for theNorth Arrow; click [OK] to create theanimation fileThe movie output option lets you create an animation that can be viewed in real time and easily distributed. A number of animation viewers are available for all types of computers. Some have sophisticated, interactive controls that can be used to goodeffect for 3D animations created in TNT. Other viewers may not work as well, so if you have any problems viewing a movie, the first thing you should dois try a different viewer.Start with a short movie. A 30-second MPEG moviemakes a file of about 3 Mb. The AVI format isuncompressed, and files are much larger, thoughthey do not run the risk of containing unwantedcompression artifacts.Click the Record Movie button in the AnimationControls window. Apply the output options in theRecord Movie window and click [OK] to createthe output animation file.You can apply line styles, point symbols,and fill patterns to the elements in theprofile and plan panels.The Template, Profile, Plan, andGraphics panels let you addposition views to the output file.The General panel offers severaloptions. The Reduce BackgroundSpeckle toggle suppresses samplingartifacts evident in distant features.page 14

Creating 3D AnimationsCreative Layer EffectsDesign your animations by beginning with short,simple animations. After you have established thebasic look and have determined which parameterswork best, you are ready to add multiple drape layers: images, vectors, CAD, TIN, and databasepinmaps. You can even add GeoFormula and SMLlayers. Use styles for point, line, and polygon elements. Of course you may wish to experiment withother 2D and 3D visualization features in the Display Spatial Data process in order to find the lookyou want. In particular, consider using Shaded Relief effects by using the surface layer for shadedrelief information also.Several sample animationfiles are posted onMicroImages’ Web site(www.microimages.com).Play those animations onyour computer to see howmany of the animationoptions can be selected andcombined.Several movie files created by the 3D Animation process are available from the MicroImages web site.Look for sample animations inhttp://www.microimages.com/sim/Below: NASA space shuttleimage draped on a USGS DEMwith associated contour linesand road vector overlays. PointSymbol indicating public Airportor Air Strip from the Bureau ofTransportation Statistics.Above: The flight follows a fourlane cross-country highway inTurkey. 3D point symbols appearin 3D perspective and representhighway signs.page 15

Advanced Software for Geospatial AnalysisMicroImages, Inc. publishes a complete line of professional software for advancedgeospatial data visualization, analysis, and publishing. Contact us or visit our web site fordetailed product information.TNTmips TNTmips is a professional system for fully integrated GIS, image analysis,CAD, TIN, desktop cartography, and geospatial database management.TNTedit TNTedit provides interactive tools to create, georeference, and edit vector, image,CAD, TIN, and relational database project materials in a wide variety of formats.TNTview TNTview has the same powerful display features as TNTmips and is perfect forthose who do not need the technical processing and preparation features of TNTmips.TNTatlas TNTatlas lets you publish and distribute your spatial project materials on CDROM at low cost. TNTatlas CDs can be used on any popular computing platform.TNTserver TNTserver lets you publish TNTatlases on the Internet or on your intranet.Navigate through geodata atlases with your web browser and the TNTclient Java applet.TNTlite TNTlite is a free version of TNTmips for students and professionals with smallprojects. You can download TNTlite from MicroImages’ web site, or you can orderTNTlite on CD-ROM.Indexaltitude . 9Animation Controls window . 4, 5AVI output . 14background speckle . 14drape layers . 6Edit Animation Path . 5foreground smoothing . 9height and pitch . 7, 13improving speed . 9layers panel . 5limits panel . 5, 10, 13line/polygon edit controls . 7line-of-sight animations . 12making 3D animations . 3manual panel . 5, 13minimum turn rate . 10motion panel . 5, 7, 11-13mpeg output . 14multiple layers . 15new 3D animation . 4Voice: (402)477-9554www.microimages.comnorth arrow . 14optimization . 9orbit . 11overall panel . 5pan . 12path . 5, 7, 10, 13pitch and height . 7, 13plan view . 14play animation . 4playback controls . 4, 8prerequisite skills . 2profile view . 14record a movie . 14sample data . 2speed improvement . 9surface layers . 6TNTlite mode . 2viewer panel . 5, 13watershed animation . 12wireframe animation . 3, 4, 83DANIMATION

page 7 Creating 3D Animations Define a Simple Path The Motion tab in the Animation Con-trols window offers three types of ani-mation: path, orbit, and pan.