The Essential Guide to 3D in Flash (Essential Guide To...)

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

The ActionScript 3.0 language brought a lot more power and flexibility to Flash, enabling developers to build powerful applications that hadn’t been possible before. One usage of this increased power is in processing 3D graphics, and many Open Source 3D engines sprang up. This scene has matured now, and there are a few clear winners in the 3D engine space – such as Away3D, Papervision3D and Sandy. With the release of Flash CS4, Adobe added some basic 3D support into the main Flash IDE, increasing the public’s awareness of what’s possible. At the same time, the support they added was very basic, meaning that to perform any impressive functions developers still had to use a dedicated 3D engine, so the interest in these engines has grown and grown. This is the first book to deal with the popular Away3D engine, and one of the first up-to-date books on 3D in Flash. It is written by the Away3D development team.

Author(s): Richard Olsson, Rob Bateman
Edition: 1
Year: 2009

Language: English
Pages: 350

Cover......Page 1
The Essential Guide to 3D
in Flash......Page 2
ISBN-13 (pbk): 9781430225416......Page 3
Contents at a Glance
......Page 4
Table of Contents
......Page 5
About the Author
......Page 11
About the Technical Reviewer
......Page 12
Acknowledgments
......Page 13
Introduction
......Page 14
Layout conventions......Page 15
Getting the Away3D library......Page 17
Using Adobe Flash CS4/CS5......Page 18
Using Flash Builder......Page 19
Using FDT......Page 21
Using FlashDevelop......Page 22
Open source workflow using the Flex SDK and Makefiles......Page 23
Summary......Page 24
Starting up the engine......Page 25
Adding 3D objects to the scene......Page 26
Lighting the scene......Page 28
Animating objects in 3D......Page 30
Summary......Page 31
View......Page 35
Exploring the fundamentals of 3D......Page 36
Working with coordinates in 3D space......Page 37
Z sorting......Page 38
Setting up the chapter base class......Page 39
Creating and using the view......Page 41
Clipping the viewport......Page 42
Managing the scene......Page 44
Adding and removing 3D objects......Page 45
Accessing 3D objects in the scene......Page 46
Working with nested 3D objects......Page 47
Moving, rotating, and scaling in 3D......Page 48
Using containers as pivots......Page 50
Creating and using cameras......Page 52
Moving the camera......Page 53
Rotating the camera......Page 54
Adjusting the zoom and focus properties......Page 55
Aiming at objects using lookAt()......Page 57
The TargetCamera3D object......Page 58
The HoverCamera3D object......Page 59
Summary......Page 62
Vertices......Page 63
Setting up this chapter’s base class......Page 64
Understanding common primitives......Page 66
The plane primitive......Page 67
The cube primitive......Page 68
The sphere primitive......Page 69
Understanding wire primitives and line segments......Page 70
Wireframe primitives......Page 71
Combining wireframe and regular primitives......Page 72
Drawing irregular lines in space......Page 73
Using regular polygons......Page 75
Workflow when loading a model......Page 77
Optimizing external resources for size and speed......Page 79
Converting a model to ActionScript......Page 80
Using the converted model......Page 81
Creating a library of models......Page 82
Applying bitmap filter effects to 3D objects......Page 84
Creating smoke using 3D sprites......Page 85
Tutorial: Creating a twisted image gallery......Page 88
Laying out the application shell......Page 89
Creating the TV sets......Page 92
Creating the menu items......Page 95
Displaying the content......Page 97
Adding movement and interactivity......Page 99
Summary......Page 101
Understanding Away3D materials......Page 103
Using color and bitmap materials......Page 107
Working with wire materials......Page 111
Using lights and shading materials......Page 113
Omnidirectional lighting with point lights......Page 114
Background lighting with AmbientLight3D......Page 115
Controlling the intensity of a light source......Page 116
Flat shading materials......Page 118
Using normal map shading......Page 122
Generating a normal map......Page 124
Using DOT3 materials in Away3D......Page 125
Using environment shading......Page 129
Using the MovieMaterial class......Page 132
Using the VideoMaterial class......Page 134
Summary......Page 135
Working with vector graphics......Page 137
Creating lines and curves......Page 138
Using the Away3D drawing API......Page 139
Preparing the chapter base class......Page 140
Creating simple shapes with straight lines......Page 142
Creating curved shapes......Page 144
Creating open-ended line segments......Page 145
Creating nonplaner shapes......Page 146
Creating shapes with holes......Page 147
Extracting vector shapes from an SWF file......Page 148
Animating imported vector shapes......Page 151
Importing 3D Text......Page 152
Extracting vector data from a font......Page 153
Extruding text......Page 155
Warping text along a path......Page 156
Knowing the limitations of vector graphics in Away3D......Page 160
Summary......Page 161
Preparing the chapter base class......Page 163
Starting with AbstractPrimitive......Page 165
Setting up the constructor......Page 166
Adding public properties......Page 167
Building the Pyramid mesh......Page 168
Mapping UV coordinates......Page 171
Creating a ribbon using the PathExtrusion class......Page 175
Creating a vase with the LatheExtrusion class......Page 177
Creating a terrain using the HeightMapModifier......Page 179
Summary......Page 184
Setting up the chapter base class......Page 187
Interacting with 3D objects in a scene......Page 190
Introducing the MouseEvent3D object......Page 191
Using MouseEvent3D’s scene coordinates......Page 193
Using MouseEvent3D’s UV coordinates......Page 195
First-person camera keyboard controls......Page 198
Walking with the keyboard......Page 199
Looking around by dragging the mouse......Page 201
Looking around by scrubbing the mouse......Page 204
Summary......Page 207
The basics of scripted animation......Page 209
Using basic tweening......Page 211
Path tweening......Page 213
Importing an MD2 file......Page 218
Playing an MD2 animation......Page 220
Importing a COLLADA file......Page 223
Creating programmatic animation with bones......Page 225
Bone tweening......Page 226
Summary......Page 230
Preparing the chapter base class......Page 233
Using level-of-detail objects......Page 235
Back-face culling......Page 239
Viewport clipping......Page 240
Manual culling......Page 243
Intersecting polygons......Page 244
Double-sided geometry......Page 245
Static shading......Page 249
Normal map images......Page 250
Conserving material instances......Page 253
Switching between 3D coordinate systems......Page 255
Converting from object space to scene space......Page 258
Changing camera lenses......Page 261
Extreme wide-angle projections......Page 262
Isometric projections......Page 263
Summary......Page 265
Index......Page 267