01 - introduction and overviewpanozzo/cg/01 - introduction, images.pdf · csci-ga.2270-001 -...
TRANSCRIPT
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Staff
http://cs.nyu.edu/~panozzo/
Daniele Panozzo
Lecturer
Zhenyi He
Assistant
https://snowymo.github.io/zhenyi-he/[email protected]@nyu.edu
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Who Am I?• Assistant Professor of Computer Science since February 2016
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Graphics @ Courant
Denis Zorin Kenneth Perlin Daniele Panozzo
Geometry ProcessingDigital Fabrication
Architectural Geometry
Virtual RealityComputer/Human Interface
Animation
Fluid and Solid SimulationMicrostructures
Scientific Computing
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
What is Computer Graphics?
• In a broad sense is the use of a computer to create and manipulate images
• It involves a combination of hardware (input, processing, output) and software
• It can be 2D or 3D
• It is used in most electronic devices
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Graphic Areas
Modelinghttps://www.youtube.com/watch?v=Udno6EA5lXY
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Graphic Areas
User Interaction
Copyright: Andrew Guyton
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Graphic Areas
Virtual Reality
Copyright: Maurizio Pesce
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Graphic Areas
Image ProcessingBy IkamusumeFan - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=41790217
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Graphic Areas
Geometry Acquisition
By Creative Tools from Halmdstad, Sweden - CreativeTools.se - VIUscan - Laser-scanned - ZPrinter - 3D printed - Viking Belt Buckle 24, CC BY 2.0, https://commons.wikimedia.org/w/index.php?curid=12419129
http://www.agisoft.com
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Applications
Video Games
Copyright: Nintendo
Cartoons/Visual Effects/Films
Copyright: Blender Foundation
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Applications
CAD/CAM Simulation
By Andreas Babucke - self made with EAS3, original upload at http://de.wikipedia.org/wiki/Bild:Lambda2_scherschicht.png, CC BY 3.0 de, https://commons.wikimedia.org/w/
index.php?curid=2999003
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
ApplicationsMedical Imaging Information Visualization
By Etan J. Tal - Own work, CC BY 3.0, https://commons.wikimedia.org/w/index.php?
curid=12743250
By Mcstol - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=18553353
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Two major approachesPer-pixel - “Raytracing”
By Henrik - Own work, GFDL, https://commons.wikimedia.org/w/index.php?curid=3869326
Per-object - “Rasterization”
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Per-pixel
By Henrik - Own work, GFDL, https://commons.wikimedia.org/w/index.php?curid=3869326
• Easy to parallelize but hard to map to hardware
• Expensive!
• It can be extended to model many physical phenomena such as internal scattering, diffraction, reflections, etc.
• Used to obtain high quality images
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Per-object
• Easy to map to hardware
• While it cannot model directly complex effects, we can approximate them
• Used in interactive applications (mostly)
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Course Goals
• Study the fundamental mathematical concepts used in image synthesis algorithms
• Implement a basic rendering system based on ray tracing
• Implement two interactive applications based on object-order rendering (rasterization), one in 2D and one in 3D
• Apply these techniques in a final coding project
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Final Coding Project
• Individual project, we will publish the rules later but you are essentially free to do whatever you want, as long as it requires computer graphics
• The project will be presented in a fast-forward session at the end of semester (3-5 minutes per project)
• The winner will be awarded with a paid trip to SIGGRAPH 2017!
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Prerequisites• Linear Algebra
• We will quickly review the concepts that you need, if you are not familiar with basis, points, vectors, matrices and linear systems, please review it on the textbook (Chapter 2, 5)
• C++
• We will review the basic concepts of C++ next week, comparing them with Java. Keep this reference at hand http://www.cppreference.com
• Why C++?
• Git
• It will be used to distribute material and to deliver homework
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Organization• Communication through the course repository/website: https://
github.com/danielepanozzo/cg
• Mailing list (if you did not receive the test email, let me know)
• Weekly lecture: Mondays 7.10-9 PM
• Office hours:
• Daniele: Mondays 5PM-6PM - 715 Broadway, 12th floor
• Zhenyi: Thursdays 5PM-7PM - Room 412 Warren Weaver Hall
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Lectures
• I will upload the slides on the website before the class, so that you can directly annotate them
• For every class, I will always add references in the end to the textbook and/or external resources
• At the end of every lecture, I will quickly introduce the topic of the next lecture and give you pointers — you are encourage to take a look at the material before I present it in class
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Lectures
• Please interrupt me at any time to ask questions
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Material
Fundamentals of Computer Graphics, Fourth Edition 4th Edition by Steve Marschner, Peter Shirley
https://open.gl
https://www.wikipedia.org
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
GradingAssignment Topic Grade
1 Ray Tracing 17.52 Raster 2D 17.53 Raster 3D 17.54 Final Project 27.5
Total Exercises: 80%• Final Oral Exam: 20% (you must get at least 10% in the final to pass)
• You must pass the final to pass the class
• The oral exam will be recorded (if you don’t want to be recorded send me a private email before the end of the week)
• There will be optional tasks, that will allow you to recover points lost in the assignments
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Policy
• You are encouraged to consult with your classmates/friends but collaboration in the assignments is NOT allowed
• You are not allowed to copy code online or use external libraries (except those provided in the class) for the first 3 assignments
• We will use plagiarism tools to validate all homework
• I am horrible with names but I would still like to make an effort, please help me :)
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Course Schedule 1/2• 12 September: 01 - Intro, Basic Math Pointers, Images, Ray Tracing 1 (Chapters 1,2,3,4)
• 19 September: 02 - C++ and CMake quick intro (slides), primer linear algebra (Chapter 5)
• Assignment 1: Ray tracing (due in 3 weeks)
• 26 September: 03 - Ray tracing 2 and Shading (Chapers 4, 10)
• 3 October: 04 - Transformation matrices and affine spaces (Chapter 6)
• 17 October: 05 - Rasterization 1 (Chapter 8, 17)
• Assignment 2: 2D Vector graphics editor (due in three weeks)
• 24 October: 06 - Rasterization 2 (http://open.gl and Chapter 17)
• 31 October: 07 - Curves and Splines (Chapter 15)
• 7 November: 08 - Viewing Transformations (Chapter 7)
• Midterms grades
• Assignment 3: 3D Mesh viewer (due in two weeks)
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Course Schedule 2/2• 14 November: 09 - Data structures and Implicit Modeling (Chapter 12, 22)
• Assignment 4: Final Project Discussion (due in 6 weeks)
• 21 November: 10 - Texturing 1: Textures and procedural noise (Chapter 11)
• 28 November: 11 - Animation and Quaternions (Chapter 16)
• 5 December: 12- Colors and Light (Chapter 18, 19, 20)
• 12 December: 13 - Texturing 2: UV Mapping and Bump mapping (Chapter 11)
• 13 December: 14 - Geometry Acquisition and Processing or Open Q&A for the projects
• 19 December: FINAL and project presentation
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Break
• What do you prefer?
• Let me know after this 10 minutes break!
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Basic Math• Sets
• Functions/Maps
• Interval
• Logarithm
• Solving quadratic equations
• Trigonometry
If you are not familiar with some of these topics, refresh them before the next class.
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Images
By The original uploader was Darth Stabro at English Wikipedia - Transferred from en.wikipedia to Commons by Pbroks13 using CommonsHelper., CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=15789788
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Raster Devices
• Output
• 2D: Display (LCD,LED)
• 1D: Hardcopy (ink-jet, dye sublimation)
• Input
• 2D Array: digital camera
• 1D Array: scanner
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Bayesian Color-Filter
By en:User:Cburnett - Own workThis vector image was created with Inkscape., CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=1496858
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Pixel Coordinates - Raster Image
0,0
x=-0.5y=-0.5
0,3
3,0
Be Careful: Y is flipped
in some APIs
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Pixel Values (Framebuffer format)
• 1-bit greyscale - text
• 8-bit RGB (24 bits) - web and email
• 8-bit RGBA (32 bits) - alpha channel, see next slide
• 16/24/32bits - high accuracy for photography and HDR
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Monitors Intensity, Gamma Correction
• What is the minimal and maximal light intensity?
• The intermediate intensities are different for each person, and it is non-linear
• Monitors needs to be calibrated for a certain viewer, using a procedure called “Gamma Correction”
• The rule is simple: displayed intensity = (max intensity) * a�
Pixel Value
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Gamma Correction
• Find the neutral gray:
• Compute
• The colors will not be uniform on normal screens, one of the major factor affecting the cost of screens is their ability to be consistent on all pixels!
By X-romix 10:00, 7 June 2008 (UTC), Updated by --Rubybrian (talk) 14:25, 14 September 2010 (UTC); Photographer: Toni Frissell - This file was derived from: Weeki Wachee spring 10079u.jpg, GFDL, https://commons.wikimedia.org/w/index.php?curid=4176109
0.5 = a�
� =ln 0.5
ln a
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
RGB vs CMYK colors• RGB is additive • CMYK is subtractive
By BenRG and cmglee - http://commons.wikimedia.org/wiki/File:CIE1931xy_blank.svg, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=32158329
Calibration is very important!
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Alpha Compositing
• A way to represent transparency
• The pixels of an image are blended linearly with the image below
c = ↵cnew
+ (1� ↵)cold
↵ = 1
↵ = 0
RGBA is very common, and you will use it often!
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
Image Formats• Lossy:
• jpeg - compact, introduces artifacts
• Lossless:
• png - common for web applications
• ppm - very simple, not compressed
• tiff - mostly scientific use
CSCI-GA.2270-001 - Computer Graphics - Fall 16 - Daniele Panozzo
References
Fundamentals of Computer Graphics, Fourth Edition 4th Edition by Steve Marschner, Peter Shirley
Chapters 1,2,3