Suchen und Finden
Title Page
1
Copyright Page
2
Contents at a Glance
3
Table of Contents
4
About the Author
10
About the Technical Reviewer
11
Acknowledgments
12
Introduction
13
Layout conventions
14
Chapter 1 Getting Started
15
Getting the Away3D library
15
Setting up a project
16
Using Adobe Flash CS4/CS5
16
Using Flash Builder
17
Using FDT
19
Using FlashDevelop
20
Open source workflow using the Flex SDK and Makefiles
21
Summary
22
Chapter 2 Creating Your First 3D Project
23
Starting up the engine
23
Adding 3D objects to the scene
24
Understanding constructors and initialization objects
26
Lighting the scene
26
Animating objects in 3D
28
Enabling interactivity in 3D
29
Summary
29
Chapter 3 The View, Scene, and Camera
32
Understanding the basics
32
View
32
Scene
33
Camera
33
Exploring the fundamentals of 3D
33
Working with coordinates in 3D space
34
The rendering process
35
Clipping
35
Z sorting
35
Perspective Projection
36
Setting up the chapter base class
36
Creating and using the view
38
Centering the vanishing point
39
Clipping the viewport
39
Managing the scene
41
Adding and removing 3D objects
42
Accessing 3D objects in the scene
43
Working with nested 3D objects
44
Moving, rotating, and scaling in 3D
45
Using containers as pivots
47
Creating and using cameras
49
The Camera3D object
50
Moving the camera
50
Rotating the camera
51
Adjusting the zoom and focus properties
52
Aiming at objects using lookAt()
54
The TargetCamera3D object
55
The HoverCamera3D object
56
Summary
59
Chapter 4 Primitives, Models, and Sprites
60
Knowing the basic terminology
60
Vertices
60
Faces and segments
61
Meshes and primitives
61
Billboards and sprites
61
Setting up this chapter’s base class
61
Understanding common primitives
63
The plane primitive
64
Back-face culling
65
The cube primitive
65
The sphere primitive
66
Understanding wire primitives and line segments
67
Wireframe primitives
68
Combining wireframe and regular primitives
69
Drawing irregular lines in space
70
Using regular polygons
72
Working with external models
74
Workflow when loading a model
74
Optimizing external resources for size and speed
76
Converting a model to ActionScript
77
Using the converted model
78
Creating a library of models
79
Applying bitmap filter effects to 3D objects
81
Using 3D sprites
82
Creating smoke using 3D sprites
82
Tutorial: Creating a twisted image gallery
85
Laying out the application shell
86
Creating the TV sets
89
Loading the gallery image
92
Creating the menu items
92
Displaying the content
94
Adding movement and interactivity
96
Summary
98
Chapter 5 Materials, Lights, and Shading
100
Understanding Away3D materials
100
Using color and bitmap materials
104
Working with wire materials
108
Using lights and shading materials
110
Lighting in Away3D
111
Omnidirectional lighting with point lights
111
Parallel beam lighting with directional lights
112
Background lighting with AmbientLight3D
112
Creating and configuring light sources
113
Controlling the intensity of a light source
113
Shading materials in Away3D
115
Flat shading materials
115
Using normal map shading
119
Generating a normal map
121
Using DOT3 materials in Away3D
122
Using environment shading
126
Using animated and interactive materials
129
Using the MovieMaterial class
129
Using the VideoMaterial class
131
Summary
132
Chapter 6 Vector Shapes and Text in 3D
134
Working with vector graphics
134
Vector graphics vs. raster graphics
135
Creating lines and curves
135
Using the Away3D drawing API
136
Preparing the chapter base class
137
Drawing 3D vector shapes
139
Creating simple shapes with straight lines
139
Creating curved shapes
141
Creating open-ended line segments
142
Creating nonplaner shapes
143
Creating shapes with holes
144
Importing 3D vector shapes
145
Extracting vector shapes from an SWF file
145
Animating imported vector shapes
148
Importing 3D Text
149
Extracting vector data from a font
150
Extruding text
152
Warping text along a path
153
Knowing the limitations of vector graphics in Away3D
157
Summary
158
Chapter 7 Procedural 3D Content
160
Preparing the chapter base class
160
Building a pyramid primitive
162
Starting with AbstractPrimitive
162
Setting up the constructor
163
Adding public properties
164
Building the Pyramid mesh
165
Mapping UV coordinates
168
Using the extrusions tools
172
Creating a ribbon using the PathExtrusion class
172
Creating a vase with the LatheExtrusion class
174
Using mesh modifiers
176
Creating a terrain using the HeightMapModifier
176
Summary
181
Chapter 8 Interactivity
183
Setting up the chapter base class
183
Interacting with 3D objects in a scene
186
Introducing the MouseEvent3D object
187
Using MouseEvent3D’s scene coordinates
189
Using MouseEvent3D’s UV coordinates
191
First-person camera keyboard controls
194
Walking with the keyboard
195
Looking around by dragging the mouse
197
Looking around by scrubbing the mouse
200
Summary
203
Chapter 9 Animation
204
The basics of scripted animation
204
Using basic tweening
206
Path tweening
208
Importing animation
213
Working with MD2 animations
213
Importing an MD2 file
213
Playing an MD2 animation
215
Working with COLLADA animations
218
Importing a COLLADA file
218
Playing a COLLADA animation
220
Creating programmatic animation with bones
220
Defining an animation rig
221
Bone tweening
221
Summary
225
Chapter 10 Optimizing Tips and Tricks
227
Preparing the chapter base class
227
Optimizing geometry
229
Using level-of-detail objects
229
Culling and clipping polygons and meshes
233
Back-face culling
233
Viewport clipping
234
Object culling
237
Manual culling
237
Using models effectively
238
Polygon counts
238
Intersecting polygons
238
Double-sided geometry
239
Optimizing materials
243
Optimizing shading
243
Static shading
243
Normal map images
244
Conserving material instances
247
Exploring general best practice techniques
249
Switching between 3D coordinate systems
249
Converting from object space to scene space
252
Converting from object space to screen space
255
Changing camera lenses
255
Traditional perspective projections
256
Extreme wide-angle projections
256
Isometric projections
257
Summary
259
Index
261
Alle Preise verstehen sich inklusive der gesetzlichen MwSt.