Outline. CE318: Games Console Programming Lecture 3: 3D Games and Cameras. Outline. 3D Vectors. Diego Perez. 3D Principles. 3D Models.

Size: px
Start display at page:

Download "Outline. CE318: Games Console Programming Lecture 3: 3D Games and Cameras. Outline. 3D Vectors. Diego Perez. 3D Principles. 3D Models."

Transcription

1 Outline Lecture 3: 3D Games and Cameras 1 3D Principles Diego Perez 2 3D Models 3 Cameras 4 Lab Session 3 dperez@essex.ac.uk Office 3A /15 Outline 2 / 50 3D Vectors A 3D vector is a geometric object that has magnitude (or length) and direction. 1 3D Principles 2 3D Models 3 Cameras 4 Vectors can be used to represent a point in space or a direction with a magnitude. The magnitude of a vector can be determined by the magnitude attribute. 3D Vectors in Unity have many properties and methods, and all of them can be consulted in the reference: Lab Session / 50 4 / 50

2 Operations with 3D vectors (1/4) Operations with 3D vectors (2/4) In Unity, you can use the normal operators for adding or subtracting to vectors, and also for multiplying or dividing a vector by a number: 1 Vector3 a = new Vector3 (1,2, -1); 2 Vector3 b = new Vector3 (3,4,0) ; 3 int val = 2; 4 5 Vector3 sum = a + b; // or a-b 6 Vector3 mult = a * val ; // or a/ val A unit vector is any vector with a length of 1; normally unit vectors are used simply to indicate direction. A vector of arbitrary length can be divided by its length to create a unit vector. This is known as normalizing a vector. A vector can be normalized in Unity by calling the function public void Normalize. 1 Vector3 a = new Vector3 (1,2, -7); 2 a. Normalize (); 3 Debug. Log (a. magnitude ); // =1 Addition: (1, 3, 1) + (2, 2, 0) = (3, 5, 1) a + b b + a Subtraction: (4, 3, 5) (3, 1, 6) = (1, 2, 1) a b b a Scalar multiplication: x(2, 3, 1) = (2, 3, 1)x = (2x, 3x, 1x) 2(2, 3, 2) = (4, 6, 4) Negation: a = (3, 0, 1), a = ( 3, 0, 1) b = (2, 2, 3), b = ( 2, 2, 3) Dot product: a b = b a = n i=1 a ib i a b = a b cos(θ) Cross product: a b = a b sin(θ)n a b (b a) n is the unit vector perpendicular to the plane containing a and b. 5 / 50 6 / 50 Operations with 3D vectors (3/4) The Cross Product operation (also called vector product) is a binary operation on two vectors in three-dimensional space, denoted as a b = a b sin(θ)n. The cross product a b of the vectors a and b is a vector that is perpendicular to both and therefore normal to the plane containing them. If the vectors have the same direction or one has zero length, then their cross product is zero. You can determine the direction of the result vector using the right hand rule. Operations with 3D vectors (4/4) An example of use of the cross product is finding the axis around which to apply torque in order to rotate a tank s turret. With the direction the turret is facing now, and the direction that it needs to face, the cross product gives the vector to rotate around. 1 Vector3 GetNormal ( Vector3 a, Vector3 b, Vector3 c) { 2 Vector3 side1 = c - a; 3 Vector3 side2 = b - a; 4 return Vector3. Cross ( side1, side2 ). normalized ; 5 } 7 / 50 Cross product can also be used to determine the normal of a plane (i.e. a triangle in a surface), in order to calculate directions for collisions and lighting. 8 / 50

3 Smooth Damp public static Vector3 SmoothDamp(Vector3 current, Vector3 target, Vector3 currentvelocity, float smoothtime, float maxspeed = Mathf.Infinity, float deltatime = Time.deltaTime); Gradually changes a position towards a desired goal. The vector is smoothed by some spring-damper like function, which will never overshoot. A common use is for smoothing a follow camera. It returns the new position (as moved in a frame towards the goal) and sets the velocity that the object must keep. current: The current position. target: The position we are trying to reach. currentvelocity: Current velocity, which value is modified by the function at every call (to smoothly continue the movement in the next frame). smoothtime: Approximately the time it will take to reach the target. A smaller value will reach the target faster. maxspeed: Optionally allows you to clamp the maximum speed. deltatime: The time since the last call to this function. By default Time.deltaTime. 1 transform. position = Vector3. SmoothDamp ( transform. position, 2 targetposition, ref velocity, 0.3 f); Transforms Every object in a scene has a Transform, that determines its position, rotation and scale. Position: Position of the Transform in X, Y, and Z coordinates. Rotation: Rotation of the Transform around the X, Y, and Z axes, measured in degrees. Scale: Scale of the Transform along X, Y, and Z axes. Value 1 is the original size (size at which the object was imported). Every Transform can have a parent, which allows you to apply position, rotation and scale hierarchically. (There are equivalent functions in Mathf and Vector2) 9 / / 50 Local versus World/Global Coordinates (1/2) The Transform component of a game object contains several vectors, such as forward, up and right. These vectors determine the local coordinate system of the game object. The local coordinate system (also known as local space, model space or object space) has all its three axes at right angles to each other: they are orthogonal, and can be used to know which part of the object is the front, which is the top and which is the side. Actually, they are orthonormal, as these three vectors are unit vectors. When a rotation operation is applied to modify the Transform, all axes will be rotated to reflect the change while keeping their relationship to one another. Local versus World/Global Coordinates (2/2)* On the other hand, the world coordinate system defines Vector3.forward, Vector3.up and Vector3.right, that determine the directions of positive Z, Y and X respectively, and it is a common coordinate system for all objects in the scene. Note that the local and global coordinate systems need not be aligned. It s thus more accurate to say that you rotate around the object s forward vector, rather than the z-axis. 11 / / 50

4 Transforms.Translate (1/2) Transform.Translate: public void Translate(Vector3 translation, Space relativeto = Space.Self); Moves the transform in the direction and distance of translation. If relativeto is left out or set to Space.Self the movement is applied relative to the transform s local axes. (the x, y and z axes shown when selecting the object inside the Scene View.) If relativeto is Space.World the movement is applied relative to the world coordinate system. Examples: A) Move the transform in the forward direction. 1 void Update () { 2 transform. Translate ( Vector3. forward ); 3 } B) The previous example moves the game object forward, one unit per frame. But maybe one unit per frame is not precise enough (i.e. too fast). Multiply by Time.deltaTime to move the game object forward, one unit per second. 1 void Update () { 2 transform. Translate ( Vector3. forward * Time. deltatime ); 3 } Transforms.Translate (2/2) C) In the previous examples, the speed was fixed to one unit per second/frame. We can change this: 1 public float speed = 5; // speed of this game object 2 void Update () { 3 // (5 units forward per second ) 4 transform. Translate ( Vector3. forward * Time. deltatime * speed ); 5 } D) The previous example is equivalent to supplying Space.Self as a second parameter: the movement is relative to the local coordinates of the object. If we want to move the object in the world coordinates space (where Vector3. Forward Positive Z axis), we would do: 1 public float speed = 5; // speed of this game object 2 void Update () { 3 // (5 units forward per second ) 4 transform. Translate ( Vector3. forward * Time. deltatime * speed, 5 Space. World ); 6 } Note that Time.deltaTime is set (by default) to 1/60 = It s set to a frame rate of 60 frames per second. 13 / / 50 Lerp Rotations in 3D There are three different rotations that can be done around a 3D point: Linearly interpolates between from and to by the fraction t: public static Vector3 Lerp(Vector3 from, Vector3 to, float t); This is most commonly used to find a point some fraction of the way along a line between two endpoints (eg, to move an object gradually between those points). This fraction is clamped to the range [0...1]. When t = 0 returns from. When t = 1 returns to. When t = 0.5 returns the point midway between from and to. 1 Transform target ; 2 Vector3 offset = transform. position - target. position ; 3 Vector3 targetcampos = target. position + offset ; 4 float smoothing = 5f; 5 6 transform. position = Vector3. Lerp ( transform. position, targetcampos, 7 smoothing * Time. deltatime ); (There are equivalent functions in Mathf, Vector2, Color and Material) 15 / 50 Each one of these rotates around a specific vector: Pitch: rotation around X axis. Yaw: rotation around the Y axis. Roll: rotation around Z axis. 16 / 50

5 Transforms.Rotate Transform.LookAt Transform.Rotate: public void Rotate(Vector3 axis, float angle, Space relativeto = Space.Self); Rotates the transform around axis by angle degrees. If relativeto is left out or set to Space.Self the rotation is applied around the transform s local axes. (The x, y and z axes shown when selecting the object inside the Scene View.) If relativeto is Space.World the rotation is applied around the world x, y, z axes. Examples: A) A normal rotation around the Y axis (Yaw), providing the angle: 1 public float turnspeed = 15f; 2 void Update () { 3 transform. Rotate ( Vector3.up, turnspeed * Time. deltatime ); 4 } B) And the rotation could be applied around the local or the world coordinates space. 1 public float turnspeed = 15f; 2 void Update () { 3 transform. Rotate ( Vector3.up, turnspeed * Time. deltatime, 4 Space. World ); 5 } Transform.LookAt: Rotates the transform so the forward vector points at target s current position or worldposition. public void LookAt(Transform target, Vector3 worldup = Vector3.up); public void LookAt(Vector3 worldposition, Vector3 worldup = Vector3.up); Example: A nice use is for targeting the camera to a position: 1 public class CameraLookAt : MonoBehaviour 2 { 3 public Transform target ; 4 5 void Update () 6 { 7 transform. LookAt ( target ); 8 } 9 } 17 / / 50 Transform.localScale Unity does not include any Transform.Scale function. However, it is possible to modify the field localscale, to modify the scale of the transform. 1 using UnityEngine ; 2 using System. Collections ; 3 4 public class ExampleClass : MonoBehaviour { 5 void Example () { 6 transform. localscale += new Vector3 (0.1F, 0, 0); 7 transform. localscale *= 1.005f; 8 } 9 } Important: Remember that if you want to move an object with a collider (it will interact with physics), you should not use Transform.Translate or Transform. Rotate. Instead, you should use the physics functions instead (see next lecture). You should use Transform.Translate or Transform.Rotate when the object has a rigidbody marked as kinematic. 19 / 50 The Gimbal Lock Problem (1/2) * Rotating a game object directly using Euler degrees is very intuitive. In a translation, a quantity on each one of the axis is given to change the position. If an object s transform position is (x, y, z) and we want to change this by moving it with (δx, δy, δz), the final position will be (x + δx, y + δy, z + δz). The same holds true for rotations. Internally, the Transform holds a Matrix formed by the (local) vectors Right, Up and Forward. When applying a rotation in (radians), the following matrix are used to multiply and change the transform matrix: X-Rotation - Pitch: cos sin 0 sin cos Y-Rotation - Yaw: cos 0 sin sin 0 cos Z-Rotation - Roll: cos sin 0 sin cos This way of applying rotations works fine, but it is exposed to the gimbal lock problem: the loss of one degree of freedom in a three-dimensional space that occurs when the axes of two of the three gimbals are driven into a parallel configuration. 20 / 50

6 The Gimbal Lock Problem (2/2) A possible set of rotations is the following combination of matrices. If β = 0: cos α sin α cos γ sin γ 0 R = sin α cos α 0 0 cos β sin β sin γ cos γ 0 = sin β cos β cos α sin α cos γ sin γ 0 = sin α cos α sin γ cos γ 0 = cos(α + γ) sin(α + γ) 0 sin(α + γ) cos(α + γ) In this configuration, there are two angles available, but effectively only one angle changes the transform (α + γ). Changing the values of α and γ in the above matrix has the same effects: the rotation angle α + γ changes. The rotation axis remains in the Z direction: the last column and the last row in the matrix won t change. For a detailed description of the gimbal lock problem (in this, and other engineering problems), check: 21 / 50 Quaternions (1/2) * Quaternions are four dimensional vectors of real numbers that allow three operations: addition, scalar multiplication and quaternion multiplication. They are used to represent rotations. They don t suffer from gimbal lock and can easily be interpolated. Unity internally uses Quaternions to represent all rotations. Quaternions work with four components: w, x, y and z. These components work together, and they should never be modified individually. The class Quaternion offers the following functionality: Quaternion.LookRotation: public static Quaternion LookRotation(Vector3 forward, Vector3 upwards = Vector3.up); Creates a rotation with the specified forward and upwards directions. If used to orient a Transform, the Z axis will be aligned with forward/ and the Y axis with upwards if these vectors are orthogonal. 1 public class ExampleClass : MonoBehaviour { 2 public Transform target ; 3 void Update () { 4 Vector3 relativepos = target. position - transform. position ; 5 Quaternion rotation = Quaternion. LookRotation ( relativepos ); 6 transform. rotation = rotation ; 7 } 8 } 22 / 50 Quaternions (2/2) * Outline Quaternion.Slerp: public static Quaternion Slerp(Quaternion from, Quaternion to, float t); Spherically interpolates between from and to by t. 1 public class ExampleClass : MonoBehaviour { 2 public Transform from ; 3 public Transform to; 4 public float speed = 0.1 F; 5 void Update () { 6 transform. rotation = Quaternion. Slerp ( from. rotation, to. rotation, Time. time * speed ); 7 } 8 } (There is an equivalent function in Vector3) 1 3D Principles 2 3D Models 3 Cameras Quaternion.identity: public static Quaternion identity; 4 Lab Session 3 The identity rotation (Read Only). This quaternion corresponds to no rotation. Is perfectly aligned with the world or parent axes. 1 transform. rotation = Quaternion. identity ; 23 / / 50

7 The 3D Mode Analogous to the 2D mode, there is an option when creating a new project to set the editor for a 3D mode: 3D Game Objects (Primitive Meshes) Unity has some pre-defined primitive meshes: Cube Sphere Capsule By default, the Scene View will be set to 3D view, although it is possible to switch to 2D view at any time. 25 / 50 Cylinder Plane Quad 26 / 50 3D Transforms As in 2D mode, all 3D game objects have a Transform component: Vertices, Triangles, Meshes A mesh is a collection of 3D points (vertices) that, when combined together, define a physical presence of an object. Every mesh is made up of a series of triangles, given by its vertices. Translation, Rotation and Scale can be set in the transform or applied directly on the Scene View using the control gizmos. Translation Rotation Scale Triangles are used because: 3 points determine a unique triangle with sides that don t cross each other. 3 points determine a triangle in a unique plane (flat shape). 27 / / 50

8 Mesh Filter and Renderer Models (1/2) A model is a mesh with its applied material, texture and shader. Mesh Filter: The Mesh Filter takes a mesh from your assets and passes it to the Mesh Renderer for rendering on the screen. Mesh Renderer: Takes the geometry of the object from the mesh filter and renders it at the position defined by the objects Transform component. Cast Shadows: If enabled, this Mesh will create shadows when a shadowcreating light shines on it. Receive Shadows: If enabled, this Mesh will display any shadows being cast upon it. Materials : A list of Materials to render model with (see later). Use Light Probes: Enable probe-based lighting for this mesh (see further lectures). 29 / 50 Supported formats: Importing meshes into Unity can be achieved from two main types of files: Exported 3D file formats, such as.fbx or.obj. Proprietary 3D application files, such as.max and.blend file formats from 3D Studio Max or Blender for example. Unity can read.fbx,.dae (Collada),.3DS,.dxf and.obj files. 30 / 50 Models (2/2) Materials * Unity provides a default material for every mesh (simple, plain grey material). One of its basic parameters is a texture. A texture is a simple image file: A model has a Model Material applied to it. A material can be seen as the skin of the mesh. Every mesh needs a material in order to be seen on the screen. The model material (saved in a file) has two parts: the texture and the shader. 31 / 50 We can create a new material in Unity and assign the texture to it. Then, it is possible to apply the new material to the object: 32 / 50

9 Shaders Built-in Shaders (1/4) Shaders in Unity are used through Materials, which essentially combine shader code with parameters like textures. The shader is responsible for telling the material which properties it takes, such as colors, sliders, textures, numbers, or vectors. The default shader is Diffuse: it is a very basic, flat shader, evenly lit (equal amount of lighting on each vertex). Two placement options are available for each Texture: Main Color. Tiling: Scales the texture along the different axes. Offset: Slides the texture around. 33 / 50 Built-in Shaders (2/4) A set of built-in Shaders are installed with the Unity editor, grouped in families: Normal: The basic shaders in Unity, for opaque textured objects. Examples: Diffuse: Diffuse computes a simple (Lambertian) lighting model: The lighting on the surface decreases as the angle between it and the light decreases. Vertex Lit: All lights shining on it are rendered in a single pass and calculated at vertices only. You specify specular color, emissive color and shininess. Normal Bumped Diffuse: Normal mapping simulates small surface details using a texture, instead of spending more polygons to actually carve out details. It does not actually change the shape of the object, but uses a special texture called a Normal Map to achieve this effect. Normal Bumped Specular : Like the Normal Bumped Diffuse shader, but it includes specular color and shininess. 34 / 50 Built-in Shaders (3/4) Transparent: The Transparent shaders are used for fully- or semi-transparent objects. Using the alpha channel of the Base texture, you can determine areas of the object which can be more or less transparent than others. This can create a great effect for glass, HUD interfaces, or sci-fi effects. TransparentCutOut: The Transparent Cutout shaders are used for objects that have fully opaque and fully transparent parts (no partial transparency). Things like chain fences, trees, grass, etc. Self-Illuminated: The Self-Illuminated shaders will emit light only onto themselves based on an attached alpha channel. They do not require any Lights to shine on them to emit this light. This is mostly used for light emitting objects. For example, parts of the wall texture could be self-illuminated to simulate lights or displays. Reflective: Reflective shaders will allow you to define areas of more or less reflectivity on your opaque object through the alpha channel of the Base texture. High reflectivity is a great effect for glosses, oils, chrome, etc. Low reflectivity can add effect for metals, liquid surfaces, or video monitors. 35 / / 50

10 Built-in Shaders (4/4) Outline Unity also provides different shaders grouped into categories. Here are some examples: Nature. Particles. Sprites. Graphical User Interface. Unlit (ignore lights on the material). Mobile. Mobile shaders are optimized for mobile platforms. Although their quality is lower, sometimes they are good enough to be used in other platforms, providing a better performance. 1 3D Principles 2 3D Models 3 Cameras 4 Lab Session 3 37 / / 50 Cameras Cameras are the devices that capture and display the world to the player. They can be customized, scripted, or parented just as any other game object. You can create multiple cameras in the scene. Every scene in Unity needs to have a camera, or nothing will be shown. Screen Space is a 2D area with the origin in the lower left corner, and with a size equal to your resolution. Viewport Space is a normalized area, from (0, 0) to (1, 1). Camera Projection The Viewing Frustum is the shape of the region that can be seen and rendered by a camera. The projection of the camera allows it to simulate perspective in the rendered scene. In a Perspective Projection, the viewing frustum of the camera takes the shape of a pyramid. In an Orthographic Projection the size of the near plane and the far plane is the same (therefore, the viewing frustum is shaped as a cube). Thus all objects of equal size are rendered the same size independent of distance to the camera (i.e. the perspective is lost). 39 / / 50

11 Camera objects (1/4) Camera objects (2/4) Transform: transform component of the camera. Camera: camera component (can be attached to any game object!). GUILayer: to enable/disable rendering of 2D GUIs. Flare Layer: to enable/disable Lens Flares (lights refracting inside camera lens) in the image. Audio Listener: calculates the output audio. There can only be one audio listener in the scene! Settings of the Camera Component: Clear Flags: Each Camera stores color and depth information when it renders its view. The portions of the screen that are not drawn in are empty. You can set the clear flags setting to specify what to draw in these empty areas: Skybox: Any empty portions of the screen will display the current Cameras skybox (chosen in the Render Settings: Edit Render Settings). It will then fall back to the Background Color. Alternatively a Skybox Component can be added to the camera. Solid Color: Any empty portions of the screen will display the current Cameras Background Color. Depth Only: Nothing is drawn in the empty portions of the screen. This is typically used with more than one layered cameras (bad setting for only one camera). Don t Clear: Scene rendered in the previous screen does not get deleted. 41 / / 50 Camera objects (3/4) Background Color: Color for the background. Culling Mask: used for selectively rendering groups of objects using Layers. Example: All user interface elements are set to a UI Layer, that is rendered by a separate camera. A scene camera draws the rest of the scene. In order for the UI to display on top of the scene Camera, you need to set the Clear Flags to Depth only and make sure that the UI Cameras Depth is higher than the scene Camera. Projection: Perspective or Orthographic. Orthographic projection lacks perspective, and it is mostly useful for making isometric or 2D games, and they are great for making 3D user interfaces. Field Of View: Width of the Cameras view angle, measured in degrees along the local Y axis. Clipping planes: Far and Near planes, specified in Unity units. Near is the closest point relative to the camera that drawing will occur, while Far is the furthest point relative to the camera that drawing will occur. 43 / 50 Camera objects (4/4) * Viewport Rect: Four values that indicate where on the screen this camera view will be drawn (values 01). (X, Y ) are the beginning position where the camera view will be drawn, and (W, H) are the width and height of the camera output on the screen. Depth: The cameras position in the draw order. Cameras with a larger value will be drawn on top of cameras with a smaller value. Rendering Path: Options for defining what rendering methods will be used by the camera. For more details see: RenderingPaths.html Target Texture: (Unity Pro Feature) Reference to a Render Texture that will contain the output of the Camera view. It can be used to create sports arena video monitors, surveillance cameras, transparencies, etc. Occlusion Culling: (Unity Pro Feature) disables rendering of objects when they are not currently seen by the camera because they are obscured by other objects. HDR: Enables High Dynamic Range rendering for this camera. unity3d.com/manual/hdr.html 44 / 50

12 An Example of a Follow Camera Using Multiple Cameras (1/3) * 1 public class CameraFollow : MonoBehaviour 2 { 3 // The position that that camera will be following. 4 public Transform target ; 5 // The speed with which the camera will be following. 6 public float smoothing = 5f; 7 // The initial offset from the target. 8 Vector3 offset ; 9 10 void Start () 11 { 12 // Calculate the initial offset. 13 offset = new Vector3 (0,10, -10) ; 14 } void LateUpdate () 18 { 19 // Create a postion the camera is aiming for 20 // based on the offset from the target. 21 Vector3 targetcampos = target. position + offset ; // Smoothly interpolate between the camera s 24 // current position and it s target position. 25 transform. position = Vector3. Lerp ( transform. position, targetcampos, smoothing * Time. deltatime ); 26 } 27 } When having multiple cameras, the Depth parameter controls the order in which the cameras draw the scene. If the values are different, the camera with the lower Depth value will be drawn first. If the values are equal, the first camera added to the scene will be drawn first. Note that all cameras actually draw the scene, but the last one overrides all the others if its Clear Flags is not set to Depth Only. Also: Consider using Transform.LookAt to set the camera s transform forward vector. 45 / / 50 Using Multiple Cameras (2/3) * It is possible to avoid this overriding by setting the property Clear Flags to Depth Only in one of the cameras. Using Multiple Cameras (3/3) * Split Screen: 2 cameras drawing in different parts of the viewport. They can both be assigned to the same Depth, as they are not overriding each other. In order to indicate which parts of the viewport each camera draws, modify the Viewport Rect attribute of the cameras. Clear Flags = Skybox. Clear Flags = Depth Only. The camera with Clear Flags = Depth Only only draws those objects hit by the camera. The rest is not drawn. Culling Masks: By assigning objects to layers, and setting the culling mask property of the cameras, it is possible to make cameras draw objects from specific layers: 47 / / 50

13 Outline Lab Preview 1 3D Principles 2 3D Models 3 Cameras During this and next week s lab you will create a 3D game: The game will consist of a 3D space shooter, although it only expands in two dimensions, as it is seen from above. You will learn how to set a project up, create a scene, place game objects, process input to move the player, etc. The game implemented is described in this online tutorial: 4 Lab Session 3 Next lecture: 3D Physics and Audio. 49 / / 50

CS 130 Final. Fall 2015

CS 130 Final. Fall 2015 CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

More information

Chapter 17: The Truth about Normals

Chapter 17: The Truth about Normals Chapter 17: The Truth about Normals What are Normals? When I first started with Blender I read about normals everywhere, but all I knew about them was: If there are weird black spots on your object, go

More information

Topics and things to know about them:

Topics and things to know about them: Practice Final CMSC 427 Distributed Tuesday, December 11, 2007 Review Session, Monday, December 17, 5:00pm, 4424 AV Williams Final: 10:30 AM Wednesday, December 19, 2007 General Guidelines: The final will

More information

CS354 Computer Graphics Rotations and Quaternions

CS354 Computer Graphics Rotations and Quaternions Slide Credit: Don Fussell CS354 Computer Graphics Rotations and Quaternions Qixing Huang April 4th 2018 Orientation Position and Orientation The position of an object can be represented as a translation

More information

CS 354R: Computer Game Technology

CS 354R: Computer Game Technology CS 354R: Computer Game Technology Texture and Environment Maps Fall 2018 Texture Mapping Problem: colors, normals, etc. are only specified at vertices How do we add detail between vertices without incurring

More information

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models 3D Programming Concepts Outline 3D Concepts Displaying 3D Models 3D Programming CS 4390 3D Computer 1 2 3D Concepts 3D Model is a 3D simulation of an object. Coordinate Systems 3D Models 3D Shapes 3D Concepts

More information

CMSC 425 Programming Assignment 1, Part 2 Implementation Notes

CMSC 425 Programming Assignment 1, Part 2 Implementation Notes CMSC 425 Programming Assignment 1, Part 2 Implementation Notes Disclaimer We provide these notes to help in the design of your project. There is no requirement that you use our settings, and in fact your

More information

IMAGE-BASED RENDERING AND ANIMATION

IMAGE-BASED RENDERING AND ANIMATION DH2323 DGI17 INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION IMAGE-BASED RENDERING AND ANIMATION Christopher Peters CST, KTH Royal Institute of Technology, Sweden chpeters@kth.se http://kth.academia.edu/christopheredwardpeters

More information

Unity3D. Unity3D is a powerful cross-platform 3D engine and a user friendly development environment.

Unity3D. Unity3D is a powerful cross-platform 3D engine and a user friendly development environment. Unity3D Unity3D is a powerful cross-platform 3D engine and a user friendly development environment. If you didn t like OpenGL, hopefully you ll like this. Remember the Rotating Earth? Look how it s done

More information

CMSC 425: Lecture 6 Affine Transformations and Rotations

CMSC 425: Lecture 6 Affine Transformations and Rotations CMSC 45: Lecture 6 Affine Transformations and Rotations Affine Transformations: So far we have been stepping through the basic elements of geometric programming. We have discussed points, vectors, and

More information

3D Modelling: Animation Fundamentals & Unit Quaternions

3D Modelling: Animation Fundamentals & Unit Quaternions 3D Modelling: Animation Fundamentals & Unit Quaternions CITS3003 Graphics & Animation Thanks to both Richard McKenna and Marco Gillies for permission to use their slides as a base. Static objects are boring

More information

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1 Transformations 1-1 Transformations are used within the entire viewing pipeline: Projection from world to view coordinate system View modifications: Panning Zooming Rotation 1-2 Transformations can also

More information

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009 Model s Lecture 3 Sections 2.2, 4.4 World s Eye s Clip s s s Window s Hampden-Sydney College Mon, Aug 31, 2009 Outline Model s World s Eye s Clip s s s Window s 1 2 3 Model s World s Eye s Clip s s s Window

More information

Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers

Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers Question 1. a) (5 marks) Explain the OpenGL synthetic camera model,

More information

Introduction to Visualization and Computer Graphics

Introduction to Visualization and Computer Graphics Introduction to Visualization and Computer Graphics DH2320, Fall 2015 Prof. Dr. Tino Weinkauf Introduction to Visualization and Computer Graphics Visibility Shading 3D Rendering Geometric Model Color Perspective

More information

Transforms Transform

Transforms Transform Transforms The Transform is used to store a GameObject s position, rotation, scale and parenting state and is thus very important. A GameObject will always have a Transform component attached - it is not

More information

Shadows in the graphics pipeline

Shadows in the graphics pipeline Shadows in the graphics pipeline Steve Marschner Cornell University CS 569 Spring 2008, 19 February There are a number of visual cues that help let the viewer know about the 3D relationships between objects

More information

CS GAME PROGRAMMING Question bank

CS GAME PROGRAMMING Question bank CS6006 - GAME PROGRAMMING Question bank Part A Unit I 1. List the different types of coordinate systems. 2. What is ray tracing? Mention some applications of ray tracing. 3. Discuss the stages involved

More information

Three Main Themes of Computer Graphics

Three Main Themes of Computer Graphics Three Main Themes of Computer Graphics Modeling How do we represent (or model) 3-D objects? How do we construct models for specific objects? Animation How do we represent the motion of objects? How do

More information

Game Design From Concepts To Implementation

Game Design From Concepts To Implementation Game Design From Concepts To Implementation Giacomo Cappellini - g.cappellini@mixelweb.it Why Unity - Scheme Unity Editor + Scripting API (C#)! Unity API (C/C++)! Unity Core! Drivers / O.S. API! O.S.!

More information

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014 CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014 TA: Josh Bradley 1 Linear Algebra Review 1.1 Vector Multiplication Suppose we have a vector a = [ x a y a ] T z a. Then for some

More information

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment Notes on Assignment Notes on Assignment Objects on screen - made of primitives Primitives are points, lines, polygons - watch vertex ordering The main object you need is a box When the MODELVIEW matrix

More information

UI Elements. If you are not working in 2D mode, you need to change the texture type to Sprite (2D and UI)

UI Elements. If you are not working in 2D mode, you need to change the texture type to Sprite (2D and UI) UI Elements 1 2D Sprites If you are not working in 2D mode, you need to change the texture type to Sprite (2D and UI) Change Sprite Mode based on how many images are contained in your texture If you are

More information

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker CMSC427 Advanced shading getting global illumination by local methods Credit: slides Prof. Zwicker Topics Shadows Environment maps Reflection mapping Irradiance environment maps Ambient occlusion Reflection

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

More information

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted. CS 184: Foundations of Computer Graphics page 1 of 10 Student Name: Class Account Username: Instructions: Read them carefully! The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when

More information

LECTURE 4. Announcements

LECTURE 4. Announcements LECTURE 4 Announcements Retries Email your grader email your grader email your grader email your grader email your grader email your grader email your grader email your grader email your grader email your

More information

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11 Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION

More information

Computer Graphics 10 - Shadows

Computer Graphics 10 - Shadows Computer Graphics 10 - Shadows Tom Thorne Slides courtesy of Taku Komura www.inf.ed.ac.uk/teaching/courses/cg Overview Shadows Overview Projective shadows Shadow textures Shadow volume Shadow map Soft

More information

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON Deferred Rendering in Killzone 2 Michal Valient Senior Programmer, Guerrilla Talk Outline Forward & Deferred Rendering Overview G-Buffer Layout Shader Creation Deferred Rendering in Detail Rendering Passes

More information

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations CS 445 / 645 Introduction to Computer Graphics Lecture 21 Representing Rotations Parameterizing Rotations Straightforward in 2D A scalar, θ, represents rotation in plane More complicated in 3D Three scalars

More information

Pipeline Operations. CS 4620 Lecture 10

Pipeline Operations. CS 4620 Lecture 10 Pipeline Operations CS 4620 Lecture 10 2008 Steve Marschner 1 Hidden surface elimination Goal is to figure out which color to make the pixels based on what s in front of what. Hidden surface elimination

More information

Animations. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Kavita Bala

Animations. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Kavita Bala Animations Hakan Bilen University of Edinburgh Computer Graphics Fall 2017 Some slides are courtesy of Steve Marschner and Kavita Bala Animation Artistic process What are animators trying to do? What tools

More information

Input Nodes. Surface Input. Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking

Input Nodes. Surface Input. Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking Input Nodes Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking The different Input nodes, where they can be found, what their outputs are. Surface Input When editing a surface,

More information

UNITY WORKSHOP. Unity Editor. Programming(Unity Script)

UNITY WORKSHOP. Unity Editor. Programming(Unity Script) July, 2018 Hayashi UNITY WORKSHOP Unity Editor Project: Name your project. A folder is created with the same name of the project. Everything is in the folder. Four windows (Scene, Project, Hierarchy, Inspector),

More information

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala Animation CS 4620 Lecture 32 Cornell CS4620 Fall 2015 1 What is animation? Modeling = specifying shape using all the tools we ve seen: hierarchies, meshes, curved surfaces Animation = specifying shape

More information

Workshop BOND UNIVERSITY. Bachelor of Interactive Multimedia and Design. Asteroids

Workshop BOND UNIVERSITY. Bachelor of Interactive Multimedia and Design. Asteroids Workshop BOND UNIVERSITY Bachelor of Interactive Multimedia and Design Asteroids FACULTY OF SOCIETY AND DESIGN Building an Asteroid Dodging Game Penny de Byl Faculty of Society and Design Bond University

More information

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52 cs337 It looks like a matrix Sort of Viewing III Projection in Practice / 52 cs337 Arbitrary 3D views Now that we have familiarity with terms we can say that these view volumes/frusta can be specified

More information

Orientation & Quaternions

Orientation & Quaternions Orientation & Quaternions Orientation Position and Orientation The position of an object can be represented as a translation of the object from the origin The orientation of an object can be represented

More information

lecture 18 - ray tracing - environment mapping - refraction

lecture 18 - ray tracing - environment mapping - refraction lecture 18 - ray tracing - environment mapping - refraction Recall Ray Casting (lectures 7, 8) for each pixel (x,y) { cast a ray through that pixel into the scene, and find the closest surface along the

More information

Game Mathematics. (12 Week Lesson Plan)

Game Mathematics. (12 Week Lesson Plan) Game Mathematics (12 Week Lesson Plan) Lesson 1: Set Theory Textbook: Chapter One (pgs. 1 15) We begin the course by introducing the student to a new vocabulary and set of rules that will be foundational

More information

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015 Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather

More information

Ray Tracer Due date: April 27, 2011

Ray Tracer Due date: April 27, 2011 Computer graphics Assignment 4 1 Overview Ray Tracer Due date: April 27, 2011 In this assignment you will implement the camera and several primitive objects for a ray tracer, and a basic ray tracing algorithm.

More information

CS452/552; EE465/505. Intro to Lighting

CS452/552; EE465/505. Intro to Lighting CS452/552; EE465/505 Intro to Lighting 2-10 15 Outline! Projection Normalization! Introduction to Lighting (and Shading) Read: Angel Chapter 5., sections 5.4-5.7 Parallel Projections Chapter 6, sections

More information

Caustics - Mental Ray

Caustics - Mental Ray Caustics - Mental Ray (Working with real caustic generation) In this tutorial we are going to go over some advanced lighting techniques for creating realistic caustic effects. Caustics are the bent reflections

More information

Chapter 9- Ray-Tracing

Chapter 9- Ray-Tracing Ray-tracing is used to produce mirrored and reflective surfaces. It is also being used to create transparency and refraction (bending of images through transparent surfaceslike a magnifying glass or a

More information

Lecture 4. Viewing, Projection and Viewport Transformations

Lecture 4. Viewing, Projection and Viewport Transformations Notes on Assignment Notes on Assignment Hw2 is dependent on hw1 so hw1 and hw2 will be graded together i.e. You have time to finish both by next monday 11:59p Email list issues - please cc: elif@cs.nyu.edu

More information

Adaptive Point Cloud Rendering

Adaptive Point Cloud Rendering 1 Adaptive Point Cloud Rendering Project Plan Final Group: May13-11 Christopher Jeffers Eric Jensen Joel Rausch Client: Siemens PLM Software Client Contact: Michael Carter Adviser: Simanta Mitra 4/29/13

More information

Game Architecture. 2/19/16: Rasterization

Game Architecture. 2/19/16: Rasterization Game Architecture 2/19/16: Rasterization Viewing To render a scene, need to know Where am I and What am I looking at The view transform is the matrix that does this Maps a standard view space into world

More information

Computer Graphics I Lecture 11

Computer Graphics I Lecture 11 15-462 Computer Graphics I Lecture 11 Midterm Review Assignment 3 Movie Midterm Review Midterm Preview February 26, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/

More information

AGDC Per-Pixel Shading. Sim Dietrich

AGDC Per-Pixel Shading. Sim Dietrich AGDC Per-Pixel Shading Sim Dietrich Goal Of This Talk The new features of Dx8 and the next generation of HW make huge strides in the area of Per-Pixel Shading Most developers have yet to adopt Per-Pixel

More information

Google SketchUp/Unity Tutorial Basics

Google SketchUp/Unity Tutorial Basics Software used: Google SketchUp Unity Visual Studio Google SketchUp/Unity Tutorial Basics 1) In Google SketchUp, select and delete the man to create a blank scene. 2) Select the Lines tool and draw a square

More information

Working with the BCC Bump Map Generator

Working with the BCC Bump Map Generator Working with the BCC Bump Map Generator Bump mapping is used to create three dimensional detail on an image based on the luminance information in the image. The luminance value of each pixel of the image

More information

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students) TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students) Saturday, January 13 th, 2018, 08:30-12:30 Examiner Ulf Assarsson, tel. 031-772 1775 Permitted Technical Aids None, except

More information

Game Design Unity Workshop

Game Design Unity Workshop Game Design Unity Workshop Activity 2 Goals: - Creation of small world - Creation of character - Scripting of player movement and camera following Load up unity Build Object: Mini World and basic Chase

More information

Visualisation Pipeline : The Virtual Camera

Visualisation Pipeline : The Virtual Camera Visualisation Pipeline : The Virtual Camera The Graphics Pipeline 3D Pipeline The Virtual Camera The Camera is defined by using a parallelepiped as a view volume with two of the walls used as the near

More information

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19 Lecture 17: Recursive Ray Tracing Where is the way where light dwelleth? Job 38:19 1. Raster Graphics Typical graphics terminals today are raster displays. A raster display renders a picture scan line

More information

CS612 - Algorithms in Bioinformatics

CS612 - Algorithms in Bioinformatics Fall 2017 Structural Manipulation November 22, 2017 Rapid Structural Analysis Methods Emergence of large structural databases which do not allow manual (visual) analysis and require efficient 3-D search

More information

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources. 11 11.1 Basics So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources. Global models include incident light that arrives

More information

Deferred Rendering Due: Wednesday November 15 at 10pm

Deferred Rendering Due: Wednesday November 15 at 10pm CMSC 23700 Autumn 2017 Introduction to Computer Graphics Project 4 November 2, 2017 Deferred Rendering Due: Wednesday November 15 at 10pm 1 Summary This assignment uses the same application architecture

More information

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Computer Graphics. Lecture 9 Environment mapping, Mirroring Computer Graphics Lecture 9 Environment mapping, Mirroring Today Environment Mapping Introduction Cubic mapping Sphere mapping refractive mapping Mirroring Introduction reflection first stencil buffer

More information

INTRODUCTION TO COMPUTER GRAPHICS. cs123. It looks like a matrix Sort of. Viewing III. Projection in Practice 1 / 52

INTRODUCTION TO COMPUTER GRAPHICS. cs123. It looks like a matrix Sort of. Viewing III. Projection in Practice 1 / 52 It looks like a matrix Sort of Viewing III Projection in Practice 1 / 52 Arbitrary 3D views } view volumes/frusta spec d by placement and shape } Placement: } Position (a point) } look and up vectors }

More information

IAT 445 Lab 10. Special Topics in Unity. Lanz Singbeil

IAT 445 Lab 10. Special Topics in Unity. Lanz Singbeil IAT 445 Lab 10 Special Topics in Unity Special Topics in Unity We ll be briefly going over the following concepts. They are covered in more detail in your Watkins textbook: Setting up Fog Effects and a

More information

Ray-Tracing. Misha Kazhdan

Ray-Tracing. Misha Kazhdan Ray-Tracing Misha Kazhdan Ray-Tracing In graphics, we often represent the surface of a 3D shape by a set of triangles. Goal: Ray-Tracing Take a collection of triangles representing a 3D scene and render

More information

Unity Game Development

Unity Game Development Unity Game Development 1. Introduction to Unity Getting to Know the Unity Editor The Project Dialog The Unity Interface The Project View The Hierarchy View The Inspector View The Scene View The Game View

More information

Graphics for VEs. Ruth Aylett

Graphics for VEs. Ruth Aylett Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading VR software Two main types of software used: off-line authoring or modelling packages

More information

CHAPTER 1 Graphics Systems and Models 3

CHAPTER 1 Graphics Systems and Models 3 ?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 11794--4400 Tel: (631)632-8450; Fax: (631)632-8334

More information

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted. CS 184: Foundations of Computer Graphics page 1 of 12 Student Name: Student ID: Instructions: Read them carefully! The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is

More information

For each question, indicate whether the statement is true or false by circling T or F, respectively.

For each question, indicate whether the statement is true or false by circling T or F, respectively. True/False For each question, indicate whether the statement is true or false by circling T or F, respectively. 1. (T/F) Rasterization occurs before vertex transformation in the graphics pipeline. 2. (T/F)

More information

Actions and Graphs in Blender - Week 8

Actions and Graphs in Blender - Week 8 Actions and Graphs in Blender - Week 8 Sculpt Tool Sculpting tools in Blender are very easy to use and they will help you create interesting effects and model characters when working with animation and

More information

Designing the look and feel for Smoke and Neon powers The creation of a new toolset and pipeline for I:SS Pros and cons from our new workflow and

Designing the look and feel for Smoke and Neon powers The creation of a new toolset and pipeline for I:SS Pros and cons from our new workflow and Designing the look and feel for Smoke and Neon powers The creation of a new toolset and pipeline for I:SS Pros and cons from our new workflow and lessons learned attempting to make something new Defining

More information

Graphics for VEs. Ruth Aylett

Graphics for VEs. Ruth Aylett Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading Runtime VR systems Two major parts: initialisation and update loop. Initialisation

More information

Rotations in 3D Graphics and the Gimbal Lock

Rotations in 3D Graphics and the Gimbal Lock Rotations in 3D Graphics and the Gimbal Lock Valentin Koch Autodesk Inc. January 27, 2016 Valentin Koch (ADSK) IEEE Okanagan January 27, 2016 1 / 37 Presentation Road Map 1 Introduction 2 Rotation Matrices

More information

Open Game Engine Exchange Specification

Open Game Engine Exchange Specification Open Game Engine Exchange Specification Version 1.0.1 by Eric Lengyel Terathon Software LLC Roseville, CA Open Game Engine Exchange Specification ISBN-13: 978-0-9858117-2-3 Copyright 2014, by Eric Lengyel

More information

COMP30019 Graphics and Interaction Perspective & Polygonal Geometry

COMP30019 Graphics and Interaction Perspective & Polygonal Geometry COMP30019 Graphics and Interaction Perspective & Polygonal Geometry Department of Computing and Information Systems The Lecture outline Introduction Perspective Geometry Virtual camera Centre of projection

More information

3D Graphics for Game Programming (J. Han) Chapter II Vertex Processing

3D Graphics for Game Programming (J. Han) Chapter II Vertex Processing Chapter II Vertex Processing Rendering Pipeline Main stages in the pipeline The vertex processing stage operates on every input vertex stored in the vertex buffer and performs various operations such as

More information

Computer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima.

Computer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima. Computer Graphics Lecture 02 Graphics Pipeline Edirlei Soares de Lima What is the graphics pipeline? The Graphics Pipeline is a special software/hardware subsystem

More information

Visual Recognition: Image Formation

Visual Recognition: Image Formation Visual Recognition: Image Formation Raquel Urtasun TTI Chicago Jan 5, 2012 Raquel Urtasun (TTI-C) Visual Recognition Jan 5, 2012 1 / 61 Today s lecture... Fundamentals of image formation You should know

More information

CS451Real-time Rendering Pipeline

CS451Real-time Rendering Pipeline 1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does

More information

if(input.getkey(keycode.rightarrow)) { this.transform.rotate(vector3.forward * 1);

if(input.getkey(keycode.rightarrow)) { this.transform.rotate(vector3.forward * 1); 1 Super Rubber Ball Step 1. Download and open the SuperRubberBall project from the website. Open the main scene. In it you will find a game track and a sphere as shown in Figure 1.1. The sphere has a Rigidbody

More information

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre Public

More information

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre Public

More information

Setting up A Basic Scene in Unity

Setting up A Basic Scene in Unity Setting up A Basic Scene in Unity So begins the first of this series of tutorials aimed at helping you gain the basic understanding of skills needed in Unity to develop a 3D game. As this is a programming

More information

COS 116 The Computational Universe Laboratory 10: Computer Graphics

COS 116 The Computational Universe Laboratory 10: Computer Graphics COS 116 The Computational Universe Laboratory 10: Computer Graphics As mentioned in lecture, computer graphics has four major parts: imaging, rendering, modeling, and animation. In this lab you will learn

More information

Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations. CS 4620 Lecture 14 Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives

More information

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture Texture CS 475 / CS 675 Computer Graphics Add surface detail Paste a photograph over a surface to provide detail. Texture can change surface colour or modulate surface colour. Lecture 11 : Texture http://en.wikipedia.org/wiki/uv_mapping

More information

Rasterization. COMP 575/770 Spring 2013

Rasterization. COMP 575/770 Spring 2013 Rasterization COMP 575/770 Spring 2013 The Rasterization Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to

More information

Virtual Environments

Virtual Environments ELG 524 Virtual Environments Jean-Christian Delannoy viewing in 3D world coordinates / geometric modeling culling lighting virtualized reality collision detection collision response interactive forces

More information

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture CS 475 / CS 675 Computer Graphics Lecture 11 : Texture Texture Add surface detail Paste a photograph over a surface to provide detail. Texture can change surface colour or modulate surface colour. http://en.wikipedia.org/wiki/uv_mapping

More information

CS 4620 Program 3: Pipeline

CS 4620 Program 3: Pipeline CS 4620 Program 3: Pipeline out: Wednesday 14 October 2009 due: Friday 30 October 2009 1 Introduction In this assignment, you will implement several types of shading in a simple software graphics pipeline.

More information

Collision Detection. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Collision Detection. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Collision Detection Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering http://users.wpi.edu/~zli11 Euler Angle RBE

More information

Topic 10: Scene Management, Particle Systems and Normal Mapping. CITS4242: Game Design and Multimedia

Topic 10: Scene Management, Particle Systems and Normal Mapping. CITS4242: Game Design and Multimedia CITS4242: Game Design and Multimedia Topic 10: Scene Management, Particle Systems and Normal Mapping Scene Management Scene management means keeping track of all objects in a scene. - In particular, keeping

More information

Course Review. Computer Animation and Visualisation. Taku Komura

Course Review. Computer Animation and Visualisation. Taku Komura Course Review Computer Animation and Visualisation Taku Komura Characters include Human models Virtual characters Animal models Representation of postures The body has a hierarchical structure Many types

More information

Easy Decal Version Easy Decal. Operation Manual. &u - Assets

Easy Decal Version Easy Decal. Operation Manual. &u - Assets Easy Decal Operation Manual 1 All information provided in this document is subject to change without notice and does not represent a commitment on the part of &U ASSETS. The software described by this

More information

CS 465 Program 4: Modeller

CS 465 Program 4: Modeller CS 465 Program 4: Modeller out: 30 October 2004 due: 16 November 2004 1 Introduction In this assignment you will work on a simple 3D modelling system that uses simple primitives and curved surfaces organized

More information

Triangle Rasterization

Triangle Rasterization Triangle Rasterization Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/07/07 1 From last time Lines and planes Culling View frustum culling Back-face culling Occlusion culling

More information

move object resize object create a sphere create light source camera left view camera view animation tracks

move object resize object create a sphere create light source camera left view camera view animation tracks Computer Graphics & Animation: CS Day @ SIUC This session explores computer graphics and animation using software that will let you create, display and animate 3D Objects. Basically we will create a 3

More information

Advanced Lighting Techniques Due: Monday November 2 at 10pm

Advanced Lighting Techniques Due: Monday November 2 at 10pm CMSC 23700 Autumn 2015 Introduction to Computer Graphics Project 3 October 20, 2015 Advanced Lighting Techniques Due: Monday November 2 at 10pm 1 Introduction This assignment is the third and final part

More information