introduction. painting with numbers! aspects modeling rendering animation
Post on 19-Dec-2015
229 views
TRANSCRIPT
![Page 1: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/1.jpg)
CSE 410 Computer Graphics Sessional
INTRODUCTION
![Page 2: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/2.jpg)
What is COMPUTER GRAPHICS?
Painting with numbers!
![Page 3: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/3.jpg)
Aspects
• Modeling• Rendering• Animation
![Page 4: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/4.jpg)
Aspects
VisualizationVirtual RealityImage ProcessingUser interaction / Human Computer Interface3D Scanning
![Page 5: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/5.jpg)
Applicability?
![Page 6: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/6.jpg)
![Page 7: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/7.jpg)
![Page 8: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/8.jpg)
![Page 9: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/9.jpg)
![Page 10: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/10.jpg)
![Page 11: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/11.jpg)
![Page 12: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/12.jpg)
Extent of CGWhat are we going to learn?
![Page 13: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/13.jpg)
Extent of CG
How CG systems work.How to model of real life objects.How to render modeled objects.How to make things more realistic.How to make things more beautiful.
![Page 14: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/14.jpg)
Extent of CSE410
![Page 15: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/15.jpg)
Extent of CSE410
Understanding of Graphics API : OpenGLUnderstand how to use 3D API’s to create
games, animations, renders or visualization.Learn how API’s work from inside.
![Page 16: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/16.jpg)
CG Basics
![Page 17: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/17.jpg)
Representation
Points
Lines
Polygon
![Page 18: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/18.jpg)
Mesh
![Page 19: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/19.jpg)
Textures , shaders , post processing and other techniques like radiocity and raytracing are used to produce realistic rendering of modeled objects.
![Page 20: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/20.jpg)
RenderingHow can we show the objects on the screen from the
mathematical data of the models we have?
![Page 21: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/21.jpg)
2D Hypothetical World
A canvasInfinitely extended drawing area having two perpendicular axes ( x and y )
A viewporta finite 2d rectangular are ( lets say it is 8x6 pixels ) that represents what is shown on the screen.
Lets assume we have the following things true for our fantasy world of rendering.
![Page 22: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/22.jpg)
CANVASVIEWPORT
![Page 23: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/23.jpg)
![Page 24: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/24.jpg)
We can do following drawing on the canvas.drawPointdrawRectangle (width , height )drawPicture
![Page 25: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/25.jpg)
And the following commands to place our desired drawing on the desired part of the canvas.
Translate ( x , y )Rotate ( x )
These commands effects any drawing done after calling them.
![Page 26: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/26.jpg)
Sample drawings and outputspoint().
![Page 27: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/27.jpg)
Sample drawings and outputstranslate(3,2)drawPoint().
![Page 28: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/28.jpg)
Now lets say we want to draw the following picture.
Translate ( -10 , -5)Rotate ( -45 )drawRectangle ( 10 , 5 )
![Page 29: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/29.jpg)
…and also don’t forget the need of a camera.
Camera (-4,-3)
![Page 30: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/30.jpg)
Now.. how does our graphics card calculate where
to draw the pixels when it receives such coordinates for drawing from our program?
![Page 31: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/31.jpg)
Sample again…
camera ( 0 , 0 )translate ( 3,-1)
point()
Canvas coordinate (3,-1)Screen coordinate (3,1)
![Page 32: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/32.jpg)
Sample again…
camera ( -2 , 1 )translate ( 3,-1)
point()
Canvas coordinate (3,-1)Screen coordinate ?
( 5 , 2 )
x = 0 + 3 – (-2) = 5y = 0 – (-1) + 1 = 2
![Page 33: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/33.jpg)
point()
translate ( 3,-1)
camera ( -2 , 1 )
Calculation for x axisCommands
0 + 3
- ( -2)
![Page 34: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/34.jpg)
Now we can make an equation !
Final coordinate on the screen
=
Actual coordinate+Transformation-Camera Position
}Gives us coordinate on the canvas
}Gives us coordinate on the screen
Modeling Transformation
Viewing Transformation
![Page 35: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/35.jpg)
This process of calculating final output picture from initial coordinates/models in a step by step manner is known as
Graphics Pipeline
![Page 36: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/36.jpg)
With understanding of the hypothetical world now lets get real,
How does our actual graphics systems work?How 3D objects are rendered on the screen?What more is there in the 3D pipeline?
![Page 37: INTRODUCTION. Painting with numbers! Aspects Modeling Rendering Animation](https://reader035.vdocuments.net/reader035/viewer/2022062407/56649d2c5503460f94a02843/html5/thumbnails/37.jpg)
Lets explore!