0% found this document useful (0 votes)
11 views

CSC 381 Computer Graphics Practical Session_Introduction slide

The document provides an overview of a practical session on computer graphics, covering topics such as tools, setup, and the graphics pipeline. It highlights the applications of computer graphics in various fields and discusses programming languages, graphics APIs, and libraries used in the industry. Additionally, it introduces concepts of 2D and 3D graphics, drawing primitives, transformations, and shaders.

Uploaded by

eniolaolawale317
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

CSC 381 Computer Graphics Practical Session_Introduction slide

The document provides an overview of a practical session on computer graphics, covering topics such as tools, setup, and the graphics pipeline. It highlights the applications of computer graphics in various fields and discusses programming languages, graphics APIs, and libraries used in the industry. Additionally, it introduces concepts of 2D and 3D graphics, drawing primitives, transformations, and shaders.

Uploaded by

eniolaolawale317
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Computer Graphics -

Practical Session

Let's code some images.


Outline
● Introduction
● Tools of the trade
● Setup/Installation Overview
● Intro to 2D/3D graphics
● The graphics pipeline
● Drawing Primitives
● Transformation
● The viewing pipeline
● 3D viewing
Introduction
Computer Graphics is a fascinating field with
several applications in the contemporary
world, such as Animated films, VFX , Games,
Engineering Prototyping, Simulations and
Virtual Reality and more.

➔ Unexpected
The limit of CG is our imagination..

➔ Simple
Mastering CG is only something that
takes your devotion and time.
Some applications of Computer Graphics include:

1. Entertainment and Media


2. Design and art
3. Education
4. Simulation and training
5. Engineering and Manufacturiing
6. XR
7. Medical Imaging
8. etc…
Fascinating but don't know
how to get started?
Tools of the Trade
Programming Language
● C/C++, Java, C#, JavaScript, Python
Graphics API :
● OpenGL, DirectX11, Metal, Vulkan, DirectX12, WebGL
Libraries:
● GLEW, GLFW, SDL, GLM, SOIL, Assimp, stb_image
The programming
language of choice in
computer graphics is C++
but it is no way the only
language that can be used
in Computer graphics. The
main reason why C++ is
preferred is because of the
speed it offers.
Graphics API
● Abstraction of the GPU
● Used to Render and draw images
● Provides access to the GPU
● Learning Resources
○ https://learnopengl.com/
○ http://www.opengl-tutorial.or
g/
○ https://ogldev.org/index.html
○ Cherno openGl series
YouTube playlist
Libraries:
GLEW: An extension wrangler
https://glew.sourceforge.net/

GLFW: It provides a simple API for creating windows, contexts


and surfaces, receiving input and events.
https://www.glfw.org/

SDL : provide low level access to audio, keyboard, mouse, joystick,


and graphics hardware via OpenGL and Direct3D
https://www.libsdl.org/
SETUP

Story for illustration purposes only


C++ IDE : Vs Code. Visual Studio Community, CLion, Codeblocks

Setting up Visual Studio:


https://visualstudio.microsoft.com/vs/community/

Visual Studio: https://code.visualstudio.com/download

C++ Extension:
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpp
tools

Compiler: Mingw https://sourceforge.net/projects/mingw/


Creating a project

After downloading all the required


libraries and setting up your IDE, we can
then move on to creating a Project.

Launch your IDE.


In my Case Visual Studio Community
2D/ 3D graphics
● The difference between 2D graphics and 3D graphics is the DEPTH Dimension.
● In vector notation 2D has two axes X and Y.
● 3D has a third axis, the Z axis.
Examples of A 2D scene.
● An image on screen,
● Games scene like Super Mario
● Image on a canvas
● Etc
Examples of 3D scene
● Perspective view of a house in a visualization software
● Computer generated scenes explored in a virtual world,
● Sculpture of a statue
● The real environment
The graphics pipeline
The graphics pipeline is a set procedures that data
pass through as input, processed and displayed as an
image.
The viewing pipeline
Not so different from the graphics pipeline. But it's specific to viewing .

● Take the computer as a Camera screen you are looking through.


● We want to represent the vast 3D or 2D scene on a plane.
● We need some kind of transformation from World Coordinate to our
Device Coordinate Space
● The Model-View-Projection matrix
The view pipeling and clipping
Drawing Primitives

● Point
● Line
● Triangles
● Quads etc
Transformation

● Translation
● Rotation
● Scaling
● Shearing
● Reflection
Working with Shaders
Shaders are small programs running on the GPU
● Five types of shaders namely: Vertex shaders, Fragment/Pixel Shaders, Geometry
Shaders, Tessellation Shaders and Compute Shaders.
● Materials
● Photorealistic Based Rendering (PBR)
● NBR
● 3D viewing and projection
PBR vs Non-PBR shaders
Viewing and projection
● Projection
● The model - view - projection matrix
● Camera
To be continued…

All images sourced from google.

You might also like