Download presentation
Presentation is loading. Please wait.
Published byEthan Powell Modified over 9 years ago
1
A Few Things about Graphics Jian Huang Computer Science University of Tennessee
2
Graphics Graphics studies light transport in 3D scene, sometimes over time as well. Example applications abound nowadays in movies, MTVs, … In a nutshell, it’s some math and methods to compute such math efficiently on processors, memory banks and buses (lots of parallelism) Well, everything should start with that Rendering Equation
3
The Rendering Equation I(x,x’) = intensity passing from x’ to x g(x,x’) = geometry term (1, or 1/r 2, if x visible from x’, 0 otherwise) (x,x’) = intensity emitted from x’ in the direction of x (x,x’,x’’) = scattering term for x’ (fraction of intensity arriving at x’ from the direction of x’’ scattered in the direction of x) S = union of all surfaces
4
It’s not analytically solvable So, instead of simply doing the math, can we use computer to compute this equation in some simplified version (oftentimes, immensely)? When approximations are made, priorities are set accordingly to what is the most appealing to viewer given the current hardware capability The consumer of the result is human being, so the measurement of good and bad is not as conventional as other computer science disciplines
5
What does it take to get that equation done? First, one has to model the scene –What color model is used (RGB, HSV) –Surfaces as geometrical meshes (volumes …) –Materials as lighting and texturing parameters –Light sources Second, compute the result for a screen device as it would appear on a retina – the rendering process –The graphics pipeline –Speed and high quality (30 fps, 60 fps, 120 fps) –Framebuffer: 320x240, 640x480, …, 1024x768, … 6000x6000. –Popular engines use OpenGL or DX, D3D libraries
6
Geometric Primitives All geometric primitives are specified by vertices
7
Transformations Modeling transformations build complex models by positioning simple components Viewing transformations place virtual camera in the world transform from world coordinates to eye coordinates Vary transformations over time creates motion - Animation WORLD OBJECT EYE
8
Affine Transformation in 3D Translation Rotate Scale Shear
10
3D Models - The Mesh Assembled scene
11
A Virtual World Objects –Shape: meshed geometry (and topology) –Appearance: lighting, shading and texture Scene –Camera and viewing –Light position –Scene composition
12
Appearance Having just the geometry, objects don’t look right yet. The first step is to use light sources The second step is to put textures on
13
Multiple Light Source I L : light intensity For multiple light sources –Repeat the diffuse and specular calculations for each light source –Add the components from all light sources –The ambient term contributes only once The different reflectance coefficients can differ. –Simple “metal”: k s and k d share material color, –Simple plastic: k s is white Remember, when cosine is negative lighting term is zero!
14
Un-lit
15
Smooth Shaded
16
What is a Texture? Color Specular ‘color’ (environment map) Normal vector perturbation (bump map) Displacement mapping Transparency...
17
Rendering
18
Textures Make A Difference Good textures, when applied correctly, make a world out of nothing!
19
Examples
20
Examples (cont.)
22
Before and After “Good” Texture
24
More
25
Every Renderer is a State Machine All rendering attributes are encapsulated in the as states Transformations Viewing Rendering styles Shading Lighting Texture mapping
26
The Punch Line Graphics models the world with geometry and appearance attributes The rendering process is extremely computation- intensive. What processor won Processor-Of-The- Year award last year? The graphics state is complicated to maintain. The requirement is high interactivity
27
Distributed Graphics Systems for distributing the shared graphical state of multi-display, multi-person, distributed, interactive applications
28
Distributed Graphics Two key problems: –The graphics database needs to be distributed Replication is a standard go-around –The graphics states are distributed This is the tricky part
29
Distributed Graphics Two major categories: –Data can be replicated (let’s do this!) –Data can not be replicated Dependent on the choice –Drastically different approach –Specific pros and cons Let’s make sure graphics states are shared properly
30
Distributed vs. Monolithic Apps Distributed control –In a non-trivial distributed application, different components need to be notified of changes to the distributed state Interactivity –Network latency bandwidth limitations make updates to distributed state much slower. For performance, need to perform some operations locally Local variations –There are times when a shared graphical scene may need to be modified locally
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.