week 1 wednesday what did we talk about last time
play

Week 1 -Wednesday What did we talk about last time? Introduction to - PowerPoint PPT Presentation

Week 1 -Wednesday What did we talk about last time? Introduction to the course Colors RGB CMYK HSL and HSV We will be thinking of images as linear buffers of data (which will usually store R,G,B and sometimes A values


  1. Week 1 -Wednesday

  2.  What did we talk about last time?  Introduction to the course  Colors  RGB  CMYK  HSL and HSV

  3.  We will be thinking of images as linear buffers of data (which will usually store R,G,B and sometimes A values for each pixel)  Bitmaps ( .bmp files) are almost that simple  Most common image formats ( .jpg , .png , and .gif files) are more complex  They use different forms of compression to keep the image size small  Otherwise, an 800 x 600 image is 3 bytes per pixel x 800 x 600 = 1,440,000 bytes > 1 MB

  4.  Stands for J oint P hotographic E xperts G roup  Good for images without too much high contrast (sharp edges)  Photographs are often stored as JPEGs  Uses crazy math (discrete cosine transform) to reduce the amount of data needed  Lossy compression

  5.  Good for images with low numbers of colors and high contrast differences  Has built-in compression sort of like zip files  Similar to the older GIF ( .gif ) images  GIFs are unpopular now because they only support 256 colors  GIFs also suffered from legal battles over the algorithm used for compression  Lossless compression

  6.  Tagged image file format ( .tiff or .tif ) images are another standard sometimes used in computer graphics or for scanned images  The TIFF standard is really crazy, supporting layers, LZW style compressions, JPEG style compression  DirectDraw surface container ( .dds ) files were designed for DirectX, allowing for the S3 Texture Compression algorithm  The pixel data is easily to decompress in hardware  TARGA ( .tga ) files have a very simple structure and are still used for some textures

  7.  What do we have?  Virtual camera (viewpoint)  3D objects  Light sources  Shading  Textures  What do we want?  2D image

  8.  The idea of a pipeline is to divide a task into independent steps, each of which can be performed by dedicated hardware  Example RISC pipeline: Instruction fetch 1. 2. Decode Execute 3. 4. Memory Access 5. Writeback

  9.  If you have an n stage pipeline, what's the maximum speedup you can get?  Consider a TV show with the following pipeline Write 1. Rewrite 2. Film 3. Edit 4.  Assume each step takes 1 week  How much total time does it take to produce a 13 episode season?  What if there was no pipelining?  Note that a pipeline's speed is limited by its slowest stage, the bottleneck

  10.  For API design, practical top-down problem solving, and hardware design, and efficiency, rendering is described as a pipeline  This pipeline contains three conceptual stages: Decides Produces what, Renders material how, and the final Application Geometry Rasterizer to be where to image rendered render

  11.  These conceptual stages may or may not be running at the same time  Each conceptual stage may contain its own internal pipelines or parallel execution

  12.  A critical concern of real time rendering is the rendering speed , determined by the slowest stage in the pipeline  We can measure speed in frames per second (fps) , common for average performance over time  We can also measure speed in Hertz (Hz) , common for hardware

  13.  Output device has a maximum update frequency of 60 Hz (very common for LCDs)  The bottleneck rendering stage is 62.5 ms  What's our rendering speed?  1/0.0625 = 16 fps  60/1 = 60 fps  60/2 = 30 fps  60/3 = 20 fps  60/4 = 15 fps  60/5 = 12 fps

  14.  The application stage is the stage completely controlled by the programmer  As the application develops, many changes of implementation may be done to improve performance  The output of the application stage are rendering primitives  Points  Lines  Triangles

  15.  Reading input  Managing non-graphical output  Texture animation  Animation via transforms  Collision detection  Updating the state of the world in general

  16.  The Application Stage also handles a lot of acceleration  Most of this acceleration is telling the renderer what NOT to render  Acceleration algorithms  Hierarchical view frustum culling  BSP trees  Quadtrees  Octrees

  17.  An application can remove those objects that are not in the cone of visibility  Hierarchies of objects can be used to make these calculations easier

  18.  Splitting planes are made through polygons to repeatedly subdivide the polygons in a scene in half  Often, BSP Trees are calculated a single time for complex, static scenes

  19.  Like BSP's, the space can be repeatedly subdivided as long as it contains a number of objects above a certain threshold  Octrees divide the space in three dimensions while quadtrees only focus on two

  20.  C# and MonoGame overview

  21.  No required reading ahead of time  But, checking out MonoGame is not a bad idea  To run it on your own machine, you'll need Visual Studio 2015 Community  Freely available  Alternatively, you can talk to Professor Stucki about getting the Enterprise edition, but those features won't be useful for this class

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend