### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# ST Found Eng Electromagnetics ECE 595

UNM

GPA 3.99

### View Full Document

## 50

## 0

## Popular in Course

## Popular in Engineering Electrical & Compu

This 35 page Class Notes was uploaded by Roel Green on Wednesday September 23, 2015. The Class Notes belongs to ECE 595 at University of New Mexico taught by Pradeep Sen in Fall. Since its upload, it has received 50 views. For similar materials see /class/212140/ece-595-university-of-new-mexico in Engineering Electrical & Compu at University of New Mexico.

## Reviews for ST Found Eng Electromagnetics

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/23/15

ECE 59568 491 CS 591 RealTime Rendering amp Graphics Hardware Today I Real time ray tracing I Course evaluations Basic idea Ann uncements I Hope that you have started the nal project I Won39t be in for of ce hours tomorrow I Next week Joe Kniss was supposed to give lectures but he has a family emergency He won39t be here so class is cancelled work on your project I GFX Cafe this week Ken Perlin 133 What is ray tracing I Rendering algorithm developed by Turner Whitted I T Whitted An Improved Illumination Model for Shaded Displayquot Communications of the ACM 1980 Basic idea I Send ays out 39om the eye a ray is speci ed by a origin and a direction I One or more rays are sent out per pixel I Intersect the ray with the scene geometry I If ray intersects then compute shaded value at t at surface send shadow ray to test shadow I If surface is reflective compute reflection ray and repeat I If surface is re 39active compute re 39acive ray and eat Ray tracing algorithm I Innater recursive need a termination condition I Embarassineg parallelquot Sample images Newer images Newer images Newer images Ray tracing in feature film Advantages rm iii i Observations Ray tracing acceleration techniques Uniform grids Uniform grids mm mm Worstcase for uniform grid I Teapot in the stadium Binary space partition Uniform grids Spatial hierarchies I Oct tree I BSPtree I kd tree Acceleration structures I Acceleration structures are necessary if we want fast ray tracing I Ifwe want a realtime ray tracing implementation we will need to be able to handle the acceleration structures Uniform grids Oct Tree Approaches for realtime ray tracing I Use fast CPU or cluster CPU implementations Susallek et al I Implement ray tracing on the commodity graphics hardware Purcell et al I Build custom hardware for ray tracing Woop et al Fast CPUcluster implementations I E iLll l Examples Publication p Saariand raytracer Examples Examples Ray tracing on the GPU Basic idea Streaming raytracing Streaming ray tracing Representing data on the GPU Representing data on the GPU The grid and the triangles are represented on the GPU using textu es mm a 83 quot WWquot Custom hardware for ray tracing Woop et al RPU architecture A Programmable Ray Processing U tfor Realtime Ray Tracingquot SIGGRAPH 2005 m Egg mmquot Upcoming conferences EG Symposium on Interactive Ray Tracing Ulm Germa Submission deadline June 14 Realtime ray tra 39 g and its use In interactive global illuminationquot Eurographics 2003 a a quot WWquot Announcements E595 C5491 65591 RealTime Rendering amp Graphics Hardware Transforming normals Correct normal transformation What are normals used fol II mm W W Last time Incorrect normal transformation so we have covered the vlew transformation Perspective projection 39 39 Orthographic projection Orthographic projection Orthographic projection Perspective projection Eastern art at the time orthe Renaissance Oeveioprnent orperspective projection Perspective projection Perspective projection I That39s all good but how do we use these in realtime rendering I De nition of the view frustum Clipping I Inside view volume if wltyltw Clipping algorithm More sophisticated Variation of SutherlandHodgman polygon clipping algorithm Clip triangle against each edge in turn to create new trian les Clip these against other edges Perspective projection I Derivation of perspective projection matrices Clipping I Why do it early Saves a divide by w Triangle Clipping Algorithm Clipping I Vertices have been projected to the canonical view volume mmun an ii mm m e 5 mm Clipping algorithm I Naive Do it while rasterizing Rasterize the entire triangle reject the fragment if it is outside the window This is essentially scissoring which we will talk about later orks but you waste a lot oftime rasterizing 39agments that don39t end up in the screen Triangle Clipping Algorithm Triangle Clipping Algorithm Triangle Clipping Algorithm Triangle Clipping Algorithm Triangle Clipping Algorithm Viewport transformation On to rasterization I Take vertices that are 1 to 1 and map them I The triangles are now ready for rasterization t0 0 to screen Width and 0 t0 SUBS 7519 I First let us review the different spaces we for X and y FESPECtiVEIY have looked at Coordinate spaces Rasterization Rasterization I The goal of rasterization is to take the M mathematical representation ofa triangle given by the vertices and determine which pixels should be lit on the screen CllpPlnE Homudemze Rasterization Bounding box algorithm I Th so ere are two problems the rasterizer must Ive Determine which pixels are touched by the triangle Determine the value of interpolants at each of these vertices x mm mm x mm mm Reading I End of chapter 3 ECE 59568 491 CS 591 RealTime Rendering amp Graphics Hardware Questions I Of ce hours Tuesday 2 4pm in ECE 2250 Don t we do this already I Don39t render stuffthat is off screen Clipping algorithm I Don39t render stuffthat is hidden by I The problem inef ciency I Both algorithms scale linearly with scene complexity Last time I Finish the rendering pipeline Rasterization Texturing Framebuffer operations I Handed out the project Back to the application I Last week we covered the graphics pipeline I Now we go back to the beginning The algorithms I Quickly eliminate geometrythat cannot be seen I We want to be conservative If there is a chance the object can be seen render it I We don39t throw it out unless we are certain it does not appear on the screen I This create what is known as a potentially visible se VS I Still use clipping and zbuffer for accurate rendering T day I QA session I Applicationside optimizations and data struc ures Applicationside optimizations I We will focus on optimizations for rendering I In short don39t render what cannot be seen Don39t render stuffthat is off screen view 39ustum culling Don39t render stuffthat is hidden by something else occlusion culling Bounding volume hierar hy I Bound complex objects by a simple geometrical representation I If bounding geometry is not visible the object is not visible Example Hierarchical Bounding Box Algorithm I Represent the bounding box hierarchy as a tree data structur Binary space partitioning Example Hierarchical Bounding Box Algorithm Binary space partitioning Hiera ical Bounding Box Algorithm I Requires spatial sorting of scene objects I If objects are not spatially coherent in the data structure then bounding boxes will be very loose I We can use the scene graph which describes the scene Binary space partitioning I Another way to subdivide space Binary space partitioning Binary space partitioning BSP construction I Happens once for a static scene I Must be updated every time the scene geometry changes I However it is possible to add new objects to the structure I Now that we have created it let us traverse it during rendering Binary space partitioning Binary space partitioning BSP traversal algorithm backtofront I For each node ofthe tree far branch rst render current node visit front branch BSP traversal algorithm backtofront I No zbuffer needed I Surfaces are automatically ordered from back to front I Essentially it is an implementation of the painter39s algorithm Painter s algorithm I As long as you paint the surfaces from back to front order visible surface determination is automatic BSP traversal algorithm fronttoback I For each node ofthe tree front branch rst render current node visit far branch To avoid cobbering a surface with something behind it check to see if anything has been drawn at that pixel before writing BSP traversal algorithm fronttoback I Before a pixel is set we have to test to see if there is something already there I Depth complexity same as before I With added work for checking the frontto back could be more expensive than backto front traversal I Solution need a fast way to check which pixels have been already se Proble I Pixels might be overdrawn over and over again I Inef cient I In graphics we call this overdraw the depth complexityquot of the scene BSP traversal algorithm fronttoback n tT tr Dynamic screen I Maintain an array of pointers the height of the screen I Each pointer will indicate a linked list that represents continuous segments of unlit pixels I Each element of the list has three elds xMin xMax and pointer to next item I When rasterizing polygons each span is compared to the list at speci c yposition to see which pixels should be drawn Depth complexity d frags rendered pixels in the image I Essentially tells you how many times on average each pixel was drawn BSP traversal algorithm fronttoback Cells and portals I Keep track ofthe doorways in rooms to precompute visibility Cells and portals Other approaches Reading I LOD simplify the geometry of objects far I Articl he Wizardry of Idquot IEEE Spectrum away so that you do not have to render as Article ronttoBack Dismay of BSP many triangles Treesquot Gordon 8 Chen I Careful when you switch resolution to avoid Mouer amp Haines Chapter 9 through 95 39POPPinQquot Announcements Last time EEQE CS 1 65 591 RealTime Rendering amp Graphics Hardware p Scene Graphs Game engines Game engine rendering 9 hvmtw39m um Game engines Ogre engine Ogre screenshots Ogre screenshots Ogre screenshots Ogre screenshots Torque engine Torque screenshots Gamebryo engine Gamebryo screenshots Gamebryo screenshots Unreal3 screenshots Unreal3 screenshots E In Unreal3 screenshots Unreal3 screenshots Field Trip Improvement over time Realtime APIS DpenGL state machine Issuing geometry Immediate mode Immediate mode Immediate mode Vertex arrays I Instead of performing individual calls per vert 39 ex pack them Into an array and call it ce First we must enable the vertex arraysquot tum L L mm mm Display lists I Provides a cache of OpenGL commands I Cannot be modi ed m cm GPU Programmability Applicatlun Cummand Fragment Wm WM Vertex arrays I Provide a pointer to the array that contains the appropriate information I Similar calls exist for color texture coordinates etc Wm WM OpenGL Extensio s I OpenGL was meant to be d namic and to evolve as hardware capabil ies changed I Designers developed an extensionbased architecture where the driver reports to OpenGL what extensions it exposes I Complete list of extensions can be seen in the extension registry httpAAwwopengbrg egistry m Wm WM Vertex program I Extension GLAR Bvertexprogram Wm WM Vertex arrays I To draw use ltlmt ll I To send down the l element or Jim u A mm 111 GPU Programmability Applicatiun Cummand Geumetrv Rastenzatiun mm Fragment Sample program Reading I ARBvertexprogram and ARBfragmentprogram speci cations become familiar with the instruction sets Announcements c cswhcssm RealTime Rendering amp Graphics Hardware Th F Hard shadow configuration How39s it handled in of ine algorithms How39s it handled in offline algonthms 39 Last time it Soft shadow configuration How39s it handled in offline algorithms How39s it handled in of ine algorithms7 I i m Penumbra Wedges AkenineMoller et al 2002 How it handled in offline algorl39 ms7 Heckbert and Herf 1997 m Hump may am Soler and Sillion 1998 39i i mum Approximation Smoothies Chan et al 2003 Penumbra maps vvyman et ai 2003 Smoothie approximation an h unit m Construction of smoothie geometry Smoothie approx Smoothie approximation 2m m i r i mm aim mm Overview of smoothie algorithm L CI AOI oOCI Overview of smoothie algorithm n hams 5i Smoothie shading EL shamnu ECE 595ICS 491ICS 591 RealTime Rendering amp Graphics Hardware Today DirectX Highlevel shading languages Carmack plan December 1996 Announcements ln 0 project due tonight by midnight This includes source code and report I39ll be giving the Sigma Xi talk on Dual Photographyquot Thursday Feb 15 at 5pm NM Conference Center Room G WWWm DirectX Really a collection ofAPls for different tasks in the form of COMcompliant objects Play to handle n between PCS etworking DirectSound for playingrecording of sound fx DirectMusic for playing audio soundtracks DirectDraw for 2D drawing to the screen Direct3D for 3D rendering Last t e Vertex and Fragment programs Emmau H story of ectX In 1992 a company was founded called RenderMorphics They created a 3D API called RealityLab In 1995 Microso bought RenderMorphic and soon produced the 3D API called DirectX 20 for Mndows95 DirectX 20 released June 1996 DirectX 30 released September 1996 People began to use it Emmau Carmack plan December 1996 nu m9 mu m Dmman History of DirectX Differences between DirectX and OpenGL Carmack plan December 1996 Overview of DirectX Carmack plan December 1996 m Taking a look at some code Taking a look at some code Taking a look at some code Vertex and index buffers Taking a look at some cod Simple example Some things are msier than OpenGL 39 vel shading languages Hig level shad39ng languages Reading Realtime Shading Language Stanford 2001 Paper on Direct3D 10 architecture by David Blythe Cg NVIDIA 2003 Paper on RTSL by Proudfoot et aI HLSL Microso 2003 Paper on Cg by Bill Mark very similar to Cg I G SL 3DLabs 2003 ncuded in OpenGL20 spec AGE W m3 1 My mm Previous Work i l leccnslmcled Mm a 7 tilllltttl mmma m samples penunne Q There has been considerable research into reducing these sampling artifacts D Here are several techniques that do this while taking into account limitations of memory and bandwidth EL Texture Compression 11111111111 swim tenure Signal wk 7 ill lil i lianslmmw mew sample mm clinic slam SSTC Texture Compression I D Campbell et aL 1986 L 4 x 4 blocks are compressed into 64bit blocks a Beers et al 1996 n Fixed 6 1 compression ISLEch33 al13993997 u Gold standard incorporated into DirectX and 3 Fenney 2003 available in most graphics hardware a Strom et al 2005 El Adaptive Textures 11111le 39 a L A T V ween u mime llll quotminimum screen mass 1 male mm sum pg screen W EJmnlinq Subject to the same criteria as texture 3 Fernando et al 2001 compreSS39on u Benson et al 2002 c Samples must be randomly accessible in a known 1 Kraus et al 2002 constanttime 0 Only Kraus et al 2002 is feasible for hardware 39 n implemen atio Texture Synthesis n 411 Niel usiunal ammielexlme signal lecanslmcleds nal 20 at zamg m g V Itanskrme imnszmples mplmlutureswnal a WWW u DeBonet1997 I W et al 2001 mm NE a Efros et al 2001 n Turk 2001 W 9 339 20 n Zelinka et al 2002 u Kwatra el al 2003 Doom3 Texture Example SignalSpecialized Parameterization MULLLML we lexlm Sam 1 111111 l unmanned mm m t9 we 19 m mm Texture Compression mammal mm W 5 lsamnled stamina samnlmg Texture compression has requirements that make 1 Campbell et al 1986 standard image compression algorithms unfeasible a Beers et al 1996 1 Extremely fast decompression quot a Random pixel access 1 Femey 2003 u Strom et al 2005 1 Known constanttime lookup p SignalSpecialized Parameterization 11111111th 1 sample Karim Sl nlll scrumsnare saimillnq a Terzopoulos et al 1991 D Sloan et al 1998 a Hunter et al 2000 n Igarashi et al 2001 a Sander et al 2002 s Balmelli et al 2002 n Alliez et al 2002 n Carr et al 2004 The Silhouette Map Algorithm The Silhouette Map Algorithm I The most objectionable artifact is the excessive blurring that occurs along boundaries in the texture Unlike existing techniques silhouette maps are unique in that they directly embed boundary quot information in the texture The result is a texture that can reconstruct the sharp edges ofthe original at any magnification The most objectionable artifact is the excessive blurring that occurs along boundaries in the texture m The Silhouette Map Structure Our goal was a structure which embedded discontinuities in a texture in a manner compatible with GFX hardware 1 It must be randomly accessible in constant time This implies a xedgrid structure 2 It must be localized V For cachecoherence we cannot access data far from the point to shade 3 It must be fast r A simple approximation to the real contour will work as long as it is fas The resulting structure is called a silhouette map Nearest Neighbor Access I Project point into appropriate cell I Fetch silhouette point and 4 neighbors I Fetch color samples I Line segments to neighbors approximate discontinuity edge I Determine which skewed quadrantwe re in IShade point based on the Y Fastoaliatmidappemion quadrants sample The Silhouette Map Algorithm meammi lerlu gm Featuredependent Grid Deformation The Silhouette Map Algorithm l Silhouette map data I Color sample data is an ordinary bitmap I Silhouette point data specifies point locations in byte or float A The Silhouette Map Algorithm Silhouette map reconstructi I Standard texture reconstruction is done in HW I Reconstruction is done in a fragment program I Nearestneighbor and linear reconstruction A The Silhouette Map Algorithm mm mm pr Silhouette map generation I Directly from vector graphics I Using a highres image as input 1 lF r Nearest Neighbor Reconstruction I Fetch silhouette point and color sample data I Compute offset of point in local cell coordinates Nearest Neighbor Reconstruction a Fetch silhouette point and color sample data 1 Compute offset of point in local cell coordinates a Compute line segments to neighbors Equation of line Xuv Yu ltXm Yul 1gt X ltXlli ylli 1gt Initial Results converted to 32 x 32 pixel texture Linear Reconstruction ltyl Yul Xii X91 XI Yii Xll Yr 9 lta b cgt axbyc Nearest Neighbor Reconstruction a Fetch silhouette point and color sample data D Compute offset of point in local cell coordinates a Compute line segments to neighbors D Test point against each of I the line segments Testing point against ine ltXiyi1gt ltaiii bill Cgt Initial Results A 128x128 pixel texture Standard texture linear reconstruction E1 Linear Reconstruction a Reconstruct signal from 4 corner samples preserving edges 1 Unfortunately reconstruction program does not know which are valid edges 1 Need to explicitly state which line segments represent valid edges 1 lnterpolate from color samples accessible from point to shade E A silhouette m ap Nearest Neighbor Reconstruction a Fetch silhouette point and color sample data 3 Compute offset of point in local cell coordinates 0 Compute line segments to neighbors in Test point against each of the line segments a Perform a series of conditional ops to output correct corner sample Initial Results Using texture signal to modulate a shader d w nearestneighbor linear reconstruction onstruction wth thresholding Linear Reconstruction m Reconstruct signal from 4 corner samples preserving edges 1 Unfortunately reconstruction program does not know which are valid edges 11 Need to explicitly state which line segments represent valid edges El lnterpolate from color samples accessible from point to shade Six different interpolation cases Fast Calculation of Linear Filter Graphics hardware has a builtin bilinear filter 9Xiy1 Y 1XC xB y 1XD M l 4 corner case gxy 1 corner case gij 39 Results of Linear Reconstruction Original Fast Calculation of Linear Filter Graphics hardware has a builtin bilinear filter 9X1Y1 y 1XC xB y 1XD M Fast Calculation of Linear Filter Graphics hardware has a builtin bilinear filter 9XYY1 y 1XC xB y 1XD M l 4 corner case gxy 1 corner case gij L E 011 quot 2 corner case gxj or giy Knig Demo Fast Calculation of Linear Filter Graphics hardware has a builtin bilinear filter 90W 1 y 1XC xB y 1XD M l 4 corner case 90W Fast Calculation of Linear Filter Graphics hardware has a builtin bilinear filter 90W 1 Y 1XC xB y 1XD M l 4 corner case gxy 1 corner case gij ill 1 2 corner case gXj 0F 9 l 3 corner case gxj giy gij 1A SSF Implementation D Graphics hardware can tell us whether the texture is being magni ed or minifed D We can use this information to blend between silhouette map and mipmap l 39 red t magni cation nal result gt mini cation v for the bias you will have blurring in u Reading Sen P Silhouette Maps for Improved Texture Magni cation Symposium on Graphics Hardware 2004 XBOX 360 System Architecture by Andrews and Baker

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.