Слайды и текст доклада
Pic.5
Length Pythagorean Formula |V| = sqrt(x2 + y2)
Pic.6
Addition A = (1, 2) B = (4, 0) A + B = (1+4, 2+0) = (5, 2)
Pic.7
Subtraction A = (1, 2) B = (4, 0) A - B = A + (-B) A - B = (1-4, 2-0) = (-3, 2)
Pic.8
Scalar Multiplication A*3 = (3*1, 3*2) = (3, 6) (unit vector = divide the vector by it's length)
Pic.11
Real world examples In which direction should the missile be fired to hit the target? Is the enemy visible in the field of view? How far is the bullet from the window?
Pic.12
Solutions Solutions have been done by many before. Know the basics to find them quicker. Use utils and classes like: Vector3D Vector3DUtils Plane3D, Ray (4. 0) Vector3
Pic.14
Spaces Euclidean space using Cartesian coordinates. (X, Y and Z) Local/Model Space World Space View/Camera Space (Point-of-view) Screen space (2D)
Pic.15
Left- and right-handed systems
Pic.16
MATRICES AND SPACES
Pic.17
Matrices Matrix = Transformation placeholder So again: Local/Model matrix World matrix View/Camera matrix WVP = world * view * projection
Pic.18
Classes/Utils Matrix3D Matrix3DUtils Matrix4x4
Pic.20
Linear transformation Translation
Pic.21
Linear transformation Scale
Pic.22
Linear transformation Skew
Pic.23
Linear transformation Eulers Quaternions Avoids gimbal lock Slerp (Smooth interpolated rotation) Matrix – memory intensive
Pic.24
Multi linear transformation Stack of matrices Apply all at once to an object The order is importent Identity matrix
Pic.25
Nonlinear transformations Sin curve displacement Warp
Pic.27
Most common projections
Pic.29
Programmable pipeline
Pic.42
About shaders Small programs that runs on the GPU. Most shader languages are the same. Vertex and Fragment shaders work in pairs. The pair is compiled into a Program Uniforms, Attributes, Varyings, …
Pic.43
Low level shading language Assembly language ARB (GPU) AGAL (Adobe Graphics Assembly Language)
Pic.44
High level shading languages HLSL – DirectX API Cg – NVIDIA GLSL – OpenGL ShaderLab – Unity3D PixelBender3D – Molehill HxSL – haXe Shader
Pic.45
Vertex shader VS or VSH Executed at each vertex Transform between coordinate systems Lighting Defines the final position of that vertex Outputs some variables to the Fragment shader.
Pic.46
Geometry Shader Dynamic creation of geometry on the GPU Only Shader Model 4. 0 Direct3D 10, OpenGL 3. 2 Not available in OpenGL ES 2. 0 (Molehill, webGL)
Pic.47
Fragment Shader FSH Processed at each visible fragment Fragment != Pixel Handles bump effects, shadows and lights, reflections, refractions, textures, ray casting and other effects. Output is a pixel …
Pic.48
Texture objects Texels Power of Two (POT) 2, 4,…512, 1024 pixels Flipped pixel order (OpenGL) Integer/Floating-point
Pic.49
Texture Filtering Fixing artifacts Texture magnification/minification Mipmapping Different techniques:
Pic.50
Let’s have a look at the WegGL implementation (click on image) three. js
Pic.52
Shader tool examples Shader Toy – WebGL MeShade – WebGL PixelBender3D – Molehill Node Based Shader Editor – Unity3D
Pic.54
Animations, Skin and Bones Tweens Animation controllers Blending Mixing/Additive Vertex animations in shader Procedurally animating
Pic.55
Animations in Away3D Broomstick
Pic.56
Materials Material is the collection of properties applied to an object. Shaders is the implemention. ”The code” In Unity, think that materials is a collection of exposed properties of the shader.
Pic.57
Some ingredients: Color Diffuse: base color Ambient: color of ambient light (shadowed parts). Mostly the same as diffuse. Specular: Highlight color Emissive: Glow. Overrides shadows. Alpha: …
Pic.59
Unitys Normal Shader Family
Pic.60
Lighting Uses normals Directional/point-lights Material settings to decide final color. Lighting is computed at each vertex. Light mapping (beast) Deferred shading
Pic.63
Quality and performance Non realtime-shadows fastest! Shadow map resolution Number of lights
Pic.65
Special effects Effects Color correction Postprocessing stage / GPU LDR/HDR, Tone mapping
Pic.68
Very simple physics demo
Pic.69
Frameworks Goal: Games, experimental, Vizualisation? Reach: Plugin? Multiple platforms/screens? Cost: Open source? Licenced? Support: Large community?
Pic.71
Unity3D Boo, C# and JavaScript Plugin Great and simple IDE Competent and mature framework Pro version to get all goodies Multiple screens/targets Future: Export to flash/molehill
Pic.73
Flash/Molehill Actionscript Plugin 3D content always under the DisplayList All the other stuff in the flash player. Molehill currently in alpha
Pic.75
Optimizing Profiling memory usage, cleanup/destroy Object Pooling! polygonal lab Take control of rendering pipeline Compression/Model to ByteArray AWD, Away3Ds own format (Prefab) Trends of …
Pic.77
WebGL Javascript No plugin Open / Royalty-free Not available in all browsers yet Frameworks in early states Probably available on iOS soon
Pic.83
WebGL vs. Molehill APIs HTML5 vs. Plugin. WebGL will probably run in iOS browser. Easy to port between them. Once it running on the GPU, performance is hardware related regardless of API. It is the …
Pic.84
Debugging Profiling CPU FlashPreloadProfiler Profiling GPU Pix for windows Intel® Graphics Performance Analyzers (GPA)
Pic.87
Random interesting topics
Pic.88
Random interesting topics Level of detail
Pic.89
Random interesting topics Octree, BSP Tree, Portals and Sectors
Pic.90
Random interesting topics Global illumination / Ambient occlusion
Pic.91
Random interesting topics Raytracing/Raycasting/Raymarching
Pic.92
Some useful resources
Pic.93
Books and papers Away3D 3. 6 essentials Mathematics for Game Developer by Christopher Tremblay Mathematics for 3D Game Programming and Computer Graphics by Eric Lengyel Game Graphics Programming by …
Pic.94
Thanks! Wow! You made it all the way here! I hope you got inspired to continue your journey into the third dimension. Thanks for listening! twitter. com/inear
Скачать презентацию
Если вам понравился сайт и размещенные на нем материалы, пожалуйста, не забывайте поделиться этой страничкой в социальных сетях и с друзьями! Спасибо!