New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

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

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Computer Graphics

by: Khalil Conroy

Computer Graphics CAP 4720

Khalil Conroy
University of Central Florida
GPA 3.76

Juraj Obert

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Juraj Obert
Class Notes
25 ?




Popular in Course

Popular in System Engineering

This 24 page Class Notes was uploaded by Khalil Conroy on Thursday October 22, 2015. The Class Notes belongs to CAP 4720 at University of Central Florida taught by Juraj Obert in Fall. Since its upload, it has received 68 views. For similar materials see /class/227210/cap-4720-university-of-central-florida in System Engineering at University of Central Florida.

Similar to CAP 4720 at University of Central Florida

Popular in System Engineering


Reviews for Computer Graphics


Report this Material


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: 10/22/15
CAP4720 COMPUTER GRAPHICS Volume Rendering Rendering until now Input geometry textures shaders Volume rendering CT scan rum i Data storage 3D textures same as 2D textures but add yet another dimension think of it as a 3D grid composed of volume elements or voxes Rendering algorithms Direct volume rendering Ray casting Splatting Surface reconstruction Marching cubes Ray casting Shoot rays through pixels Sample volume data along each ray Accumulate densities ll ill39il Ray casting cont man Ray casting on GPUs How A Store 3D volume data in a 3D texture A Map the 3D texture to a 3D box 1to1 use 3D texture coordinates uvw Integrate contributions along each ray aspmask 2 Ray casting on GPUS back faces 39WW 1 P ss2 V 7 V a tRende arget39endteTaI39ggtFF u c uIIMod LiBACKiFA CE E Is tShadeIoutputTexCoords 39 a irendelbo Pass3913 if a isetRelwd 39 argetframeBuffer sejS h39aaeI 39 91th htgenj1ies a req dermuad Integration Notes on ray casting Performance issues 20 texture fetches in a fragment shader might be too much for some applications adaptive ray marching stop integration when intensity reaches max 10 trim RE Marching cubes Approximate surface by a collection of cubes Compare density at each vertex to a threshold ib i l Marching cubes How many configurations can we possibly have i new be M rching cubes cont Implementation Definitely not on older GPUs because you cannot create new geometry Possible with shader model 40 DirectX 10 and higher The number of cubes determines how coarsetine the final surface will be awMWEX M rching cubes cont Splatting Take a voxel and throw it at the screen It will splash its intensity around the neighborhood of the pixel that was hit Approximate this by using convolution typically Gaussian kernel The contribution will be max at the pixel that was hit and lower around it 11132008 CAP4720 COMPUTER GRAPHICS deep 13 Pervertex lighting Given a mesh light parameters and material parameters Compute colors in vertex shaders and interpolate across fragments Questions What space to use Howito pass parameters from QpenGL Design What parameters do we need to pass from OpenGL Vertices Normals 7 Light positions Light colors 7 Light intensities Light types How to pass them Using uniform variable types V9idmaint if tj Required transformations Projection to clip space uniform vec3 lightPosEye uniform vec3 lightColor void main ompute vertex position in clip spac gliPosition gliProjectionMatrix gliModeIIViewMatrix gLVertex Vertex in camera space Use OpenGL modeview matrix luniform vec3 lightPosEye uniform yec3 lightClolor void main QLPosition gliProjectionMatrix gliModeIIViewMatrix gLVertex it compute vertex position in camera space vec3 positionEye gliModeIViewMatrix g7VertexXy No mal in camera space Use OpenGL normal matrix uniform V903 ligntPosEye uniform V903 lightColor void mainl gLPos39t LProjectionMatrix gliModeIV ievyMatrix gLrVertex VecS39positionEye gliModeIViewMatrix gljertexlxyz ompute normal vector in camera space VecS39normalEye normalizelgLNormalMatri LNormall Illumination vector in camera space Use light position and vertex position uniform V903 lightPosEye uniform 3903 ligtholor void mainl l glj ositio gLProj ectionMat rix gliModeIViewMatrix gLVertex V903 positionEye gliModeIViewMatrix g Vertex V903 normalEye normalizelgliNormalMatrix glNoItma i Z M lumination vectorvfrom vertex to light V993 illumEy quotormaliziellightPosEye positionEyel Diffuse component Use dot product uniform V903 lighthsEye uniform V903 lightColor void maim gLPos39t LProjectionMatrix gLModeN vyMatrix gLrVertex vecs39positionEye gLMbdQIViewMatrix gl Vertex VecS39normalEye normalizegLNorn ialMatrixfgLNormavl V903 illumEye normal39 tPosEye positionEye diffuse39con iponent a39s projection of iun1inati nquot ctor on normal vector float diffuse n1ax00 dotiillum Eye normalEye Interpolation Use varying variables uniform V903 lightPo Eye uniform 3903 ligtholor Vvaryingyecls vertexColor void maim iModelVieva atrix gLVerteX V903 positionEyo gliModeNiew atrix gljerte V903 normalEye normalizegLNormalMatrix gliNormal V903 illumEye n39orntaliz39elightPosEye positionEye float diffuse n1ax00 dotiillum Eye normalEye xxyZ vertexColor diffuse lightCoior Fragment shader Just output the varying variable varying v923verlexblorg voigl main k gLErag Coin vs xCoIor 1 v0 Apnzn H 491 g AP z AHA Adding specular component Compute View vector unimrm v 3 ig1lPo Ey a VuniIorm v va rying v venexcxulor voigl main venex position Adding specular component Compute halfvector uniform vec3 lightPosEye uniform vec3 lightColor varying vec3 VertexColor void mainll l code for diffuse remains the same vec3 Viewae norn1alizepositionEye halfVectorquot a approximation of exact reflectionof the illumination vector vec3 haleye orn1alizeillun1Eye Viewae vertexColor diffuse IightColor Adding specular component Compute the specular contribution uniform vec3 lightPosEye uniform vec3 lightColor varying vecs vertexColor uniform float sharpness void main39 l vec3 Viewae normalizepositionEye vec3 haleye ormalizel illumEye Viewae project halfVector on normal and power it up a 0 if dot ormalEye illumEye lt 00 float specula powldotlhaInyev normalEye sharpness vertexColor diffuse lightColor specular OpenGL Just pass light position and light color glUniforms gl etUniformLocatiem glUnifor m1figlGetUniformtocation 39 Assignment 3 Implement pervertex and perpixel lighting shaders for point lights


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

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

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Jennifer McGill UCSF Med School

"Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Steve Martinelli UC Los Angeles

"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."

Become an Elite Notetaker and start selling your notes online!

Refund 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


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:

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

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.