Realtime 3D Computer Graphics Computer Graphics Computer Graphics Software & Hardware Rendering...

12
Realtime 3D Computer Graphics Computer Graphics Computer Graphics Software & Hardware Software & Hardware Rendering Rendering 3D APIs 3D APIs Pixel & Vertex Shaders Pixel & Vertex Shaders Conclusion Conclusion

Transcript of Realtime 3D Computer Graphics Computer Graphics Computer Graphics Software & Hardware Rendering...

Realtime 3D Computer Graphics

• Computer GraphicsComputer Graphics• Software & Hardware RenderingSoftware & Hardware Rendering• 3D APIs3D APIs• Pixel & Vertex ShadersPixel & Vertex Shaders• ConclusionConclusion

Computer Graphics

• All 3D graphics are represented by the All 3D graphics are represented by the computer as sets of triangles in 3D spacecomputer as sets of triangles in 3D space

• These triangles are rendered to the screen These triangles are rendered to the screen by correcting for perspective, and then by correcting for perspective, and then filling with solid, smoothshaded, or lit filling with solid, smoothshaded, or lit colors or texturescolors or textures

Software Rendering

• All the work of rendering done by the CPUAll the work of rendering done by the CPU• Consequently, generally slower and lower Consequently, generally slower and lower

qualityquality• The original method of producing realtime The original method of producing realtime

graphicsgraphics• No longer commonly usedNo longer commonly used

Hardware Rendering

• Most of the work of rendering done by a Most of the work of rendering done by a specialized hardware device, such as a 3D specialized hardware device, such as a 3D accelerated video cardaccelerated video card

• Consequently, often faster and higher Consequently, often faster and higher quality than softwarequality than software

• Most common in newer applications and Most common in newer applications and gamesgames

3D APIs: Direct3D

• Part of Microsoft’s DirectX APIPart of Microsoft’s DirectX API• Supports Windows 9x, 2000, and XP onlySupports Windows 9x, 2000, and XP only• Somewhat more complicated than OpenGL Somewhat more complicated than OpenGL

for the programmerfor the programmer• Often better supported by low-end video Often better supported by low-end video

cardscards

3D APIs: OpenGL

• Open standard originally created by SGI for Open standard originally created by SGI for high-end graphics workstationshigh-end graphics workstations

• Supported by many operating systems, Supported by many operating systems, including Windows, various Unix systems, including Windows, various Unix systems, Mac OS, and BeOSMac OS, and BeOS

• More high-level API, easier to create nice More high-level API, easier to create nice effects with less experienceeffects with less experience

Vertex & Pixel Shaders

• Allow the programmer to gain much greater Allow the programmer to gain much greater control of the hardware rendering system, to control of the hardware rendering system, to create otherwise difficult effectscreate otherwise difficult effects

• Can allow for much improved rendering Can allow for much improved rendering speed on supporting hardwarespeed on supporting hardware

• Supported by the latest NVidia and ATI Supported by the latest NVidia and ATI graphics cardsgraphics cards

Conclusion

• Computer GraphicsComputer Graphics• Software RenderingSoftware Rendering• Hardware RenderingHardware Rendering• 3D APIs: Direct3D, OpenGL3D APIs: Direct3D, OpenGL• Pixel & Vertex ShadersPixel & Vertex Shaders