Texture and Colour in Virtual Worlds Programming for 3D Applications.

Slides:



Advertisements
Similar presentations
Lecture 2 Concepts, Terms and Definitions. Display Devices They are divided into a lot of small squares called pixels (“PICture ELements”). Each pixel.
Advertisements

(The Ingredients for Good Art)
Image Data Representations and Standards
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Informationsteknologi Monday, October 29, 2007Computer Graphics - Class 21 Today’s class Graphics programming Color.
Graphics File Formats. 2 Graphics Data n Vector data –Lines –Polygons –Curves n Bitmap data –Array of pixels –Numerical values corresponding to gray-
1 King ABDUL AZIZ University Faculty Of Computing and Information Technology CS 454 Computer graphicsIntroduction Dr. Eng. Farag Elnagahy
Images and colour Colour - colours - colour spaces - colour models Raster data - image representations - single and multi-band (multi-channel) images -
Introduction to Computer Graphics
Color of (digital image) Raed S. Rasheed Agenda Color. Color Image. Color Models – RGB color model. – CMYK color model. – HSV and HSL color model.
02/14/02(c) University of Wisconsin 2002, CS 559 Last Time Filtering Image size reduction –Take the pixel you need in the output –Map it to the input –Place.
1 Internet Graphics. 2 Representing Images  Raster Image: Images consist of “dots” of color, not lines  Pixel: Picture element-tiny rectangle  Resolution:
Colour Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 6 This presentation © 2004, MacAvon Media Productions Colour.
Elements of Art.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Digital Images The digital representation of visual information.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Higher Computing Data Representation.
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Storing Graphics EXTENSION.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
GCSE Computing#BristolMet Session Objectives#9 MUST identify the data needed for a computer to display an image correctly (metadata) SHOULD describe the.
I-1 Steps of Image Generation –Create a model of the objects –Create a model for the illumination of the objects –Create an image (render) the result I.
Lecture No. 3.  Screen resolution  Color  Blank space between the pixels  Intentional image degradation  Brightness  Contrast  Refresh rate  Sensitivity.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Computer Graphics Texture Mapping
Filtering and Color To filter a color image, simply filter each of R,G and B separately Re-scaling and truncating are more difficult to implement: –Adjusting.
Graphics Systems and OpenGL. Business of Generating Images Images are made up of pixels.
Color and Resolution Introduction to Digital Imaging.
Computer Graphics Bitmaps & Sprites CO2409 Computer Graphics Week 3.
Core Ideas 2 Art terminology. Line A line is a basic element of art, referring to a continuous mark, made on a surface, by a moving point. A line is long.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Graphics. Graphic is the important media used to show the appearance of integrative media applications. According to DBP dictionary, graphics mean drawing.
A pixel is not a little square & A voxel is not a little cube Chung ji hye.
Elements of Art -&- Principles of Design. Elements of Art Line Shape Form Space Texture Value Color.
Game Programming 06 The Rendering Engine
Which is the Pink Pen? Here is the Pink Pen (Example taken from
CHAPTER 8 Color and Texture Mapping © 2008 Cengage Learning EMEA.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
Graphics Lecture 4: Slide 1 Interactive Computer Graphics Lecture 4: Colour.
Data Representation The storage of Text Numbers Graphics.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Representing and Storing Graphics EXTENSION.
Computer Graphics Blending CO2409 Computer Graphics Week 14.
Introduction to Computer Graphics
Why a bitmap (.bmp), not a.jpg? If you cannot save a.bmp, make it an uncompressed.tif. Compression (of this 8-bit 397,000 pixel image): none (397kb memory)medium.
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
Resolution The resolution of an image is determined by the number of individually addressable points that make up the image, whether it is the number.
Digital Media Dr. Jim Rowan ITEC 2110 Chapter 3. Roll call.
HOW SCANNERS WORK A scanner is a device that uses a light source to electronically convert an image into binary data (0s and 1s). This binary data can.
© ExplorNet’s Centers for Quality Teaching and Learning 1 Objective % Understand concepts used to create digital graphics.
Mohammed AM Dwikat CIS Department Digital Image.
Composition & Elements of Art and Principles of Design A artists toolbox.
Elements & Principles of Design
Computer Graphics: An Introduction
Images Data Representation.
Data Representation Images.
Chapter 6: Color Image Processing
Colour Theory Fundamentals
DESIGN PRODUCTION ELEMENT OF DESIGN IN VECTOR GRAPHIC
GRAPHICS Source:
COMS 161 Introduction to Computing
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Color Model By : Mustafa Salam.
Multimedia System Image
Computer Systems Nat 4.5 Computing Science Data Representation
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
ELEMENTS OF DESIGN Line Shape Form Space Texture Value Color.
Presentation transcript:

Texture and Colour in Virtual Worlds Programming for 3D Applications

Contents Display Hardware Colour Texture Texture mapping?

Display Hardware

Display The output from the pipeline is reduced to a series of pixels - blobs of colour of varying intensity - which are burned onto the screen (even a HMD consists of two flat screens) The final stage is the process of forming the pixels on the disp[lay device. What devices are used to display graphics ?

CRT (the Monitor) Persistence

Colour

Colour Triads

Dot Pitch

Interlacing

Display Controller

True Colour / Pseudo Colour

Colour interpretation

Colour

Colour representations on computer are based on trichromatic theory. This theory states that any colour can be recreated by a suitable combination of primary colours (eg. Red, Green, and Blue. This is represented in computers by the Screen RGB values.

Colour Each RGB value represents the intensity of each of the separate components of a colour. Intensity is usually related to the voltage passed to the electron guns when drawing the image on the screen. To understand intensity we start by looking at greylevel images.

Greylevel Pixels = In a grey level image as in this case, each g nn is a single integer number. Pixel =235 Pixel=15

Grey Level Pixels Grey Level pixels are usually represented as integer numbers, ranging from 0 (black) to the highest possible value for the bit depth of the image. The bit depth for many greyscale images is 8 (8 bits= 1 byte of storage for each pixel). This gives a range of 256 grey levels ranging from 0 to 255.

Colour Pixels In this case images are stored as a triplet of values. where

Colour Pixels In this case bit depth refers to the number of bits required to store all of the available colours. For example 24 bit colour allows for 16.7 million different colours. When this is the case, the number of bits is divided by three to provide the number of bits for each separate channel (24bits=8 R bits+8 G bits+8 B bits).

Interleaved and Non- Interleaved colour images Interleaved images Each pixel stored as consecutive triplets in the image file “RGBRGBRGB…” Non Interleaved Images – Each channel recorded as a separate image “RRRRRRRRRR…” “GGGGGGGGG…” “BBBBBBBBBB…”

Colour Pixels – Alpha Channels Colour Pixels sometimes have four channels. In this case the fourth channel (the Alpha channel A) Determines the transparency of the pixel. If A=1 the object is opaque, if A=0, the object is transparent. A can have intermediate values, and act as a colour filter.

Alternative Colour Representations Mostly colour is represented as RGB (or RGBA), however other colour representations exist. Other means of colour representation exist, why are they necessary?

RGB Colour Space 0 R G B M C Y Conceptually a cube Three orthogonal axes RGB Independent

RGB Colour Space - Problems Cone sensitivities. Notice the overlap between red and green. This overlap implies that red and green are not orthogonal

Other Representation Schemes Hue Saturation and Intensity Transformation of RGB colour space. Black White Side View  S Red=0 o Blue Green Magenta Cyan Yellow Intensity

Texture

Texture Definition Texture is an elusive context. Most people know it when they see it!! Often describe textures as “coarse” or “fine”, “rough” or “smooth”. Often defined in terms of how particular objects feel to the touch.

Visual Texture These slides have visual texture. There is a pattern in the background that forms the visual texture. Arguably the text contributes to this. Texture is an important surface property of an object.

Textured Objects Given that texture is a surface property, it is important in the generation of VR worlds in order to add verosimilitude. Furthermore texture is an important part of the tactile experience of the world and some haptic devices allow for texture to be experienced in particular ways.

Texture In the development of VR worlds, texture is an important part of the experience. In this lecture the issue of adding texture to the geometric objects we have created is discussed. The process used is called Texture Mapping.

Texture Mapping

Textures are usually stored as two dimensional images, which are then used to dress the geometric shapes in a virtual world.

Texture Mapping

Each texture is stored as a two dimensional image. The texture can be generated artificially by computer graphics. Can be scanned from a photograph. Obtained by whatever means in order to achieve the requisite level of realism.

Texels The bitmaps of the images are stored as pixels. Although we actually call the pixels texels in order to differentiate. Pixels are used to define the screen.

Texture Mapping Wrapping a 2D texture around a 3D object is usually effected using affine transformations similar to those discussed in earlier lectures. The precise details of how textures are mapped can be found in various text books (eg. Angel - Interactive Computer Graphics) The Open GL API simplifies much of the task.

Texture Mapping

Texture Coordinates s t

However large the textured image is in texels, it is usually convenient to normalise the size of the image in terms of s and t. Say our image is 512x512, we define the texture coordinate for say (256,300) as (256/512,300/512) so that the coordinates are expressed on the interval [0,1].

Texture Coordinates Applying a texture to the surface of an object requires that the size of the object is scaled appropriately on the [0,1] interval. This helps to simplify the mapping process. 0,01,0 0,11,1

Magnification Texture is smaller than surface to be textured

Minification Surface is smaller than the texture

Shrinking and Stretching The shrinking and stretching required to perform minification and magnification involve the use of filters to effect the transition. These filters are usually based on some form of interpolation in order to make the textured image fit onto the surface.

Mipmapping Mipmapped textures are often used in VR worlds and games, particularly where movement of some description is necessary. The level of detail seen will vary according to the distance of the viewer from the object. Several different textured images are stored corresponding to the necessary level of detail.

Mipmapping Store the textured image at different scales.

Mipmapping Depending on the distance from the textured object, the most appropriate scale of iamge is selected in order to represent the texture.

Storing Textures. Textured images often require considerable amounts of storage. Textured images are usually stored in the memory of the computer. To represent a fully textured 3D world can require significant overheads. Dedicated hardware is often used.

Tutorial Discuss how to perform texture mapping in Open GL.

Defining Textured Images Could be scanned from photographs. Stored in the memory as arrays. Store the elements in these arrays as texels (as opposed to pixels) Open GL Standard requires that these bitmap images are an integer power of 2.

Texture Maps A texture map associates a unique point of the texture, with each point on a geometric object, that is itself mapped to screen coordinates for display purposes. If the object is represented in spatial coordinates as [x,y,z] then there are functions so that x=x(s,t) y=y(s,t) z=z(s,t)

Texture Mapping One of the problems is finding the precise nature of this mapping. Also have to consider the process of going from world coordinates to screen coordinates. Can think of texture mapping as two concurrent mappings: From Texture Coordinates to geometric coordinates Second from parametric coordinates to geometric coordinates.

Texture Mapping Conceptually the process is simple. An area of texture pattern is mapped on to an area of the geometric surface, corresponding to a pixel in the final image. This leads to a number of difficulties.

Texture Mapping 2d texture is defined as rectangular image. The mapping from this rectangle to an arbitrary shape in a 3D world might involve complicated processing – squaring the circle.