CS 4730 Ruminations on Sprites in Monogame Martin Kellogg, definitely not Ph.D.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

2D Geometric Transformations
This terms course Last term we both worked on learning 2 things –Processing –The concepts of graphics etc. This term will focus more on the basic concepts.
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
Picture Manipulation The manipulation of (already created) pictures. May be applied to vector graphics or bitmaps. We will consider bitmaps and introduce.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Math for CSTutorial 11 Course Outline Homogeneous Coordinates.
©College of Computer and Information Science, Northeastern UniversityJune 26, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lecture 11.
Course Website: Computer Graphics 3: 2D Transformations.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Math for CSTutorial 11 Matrix Multiplication Rule Matrices make linear transformations of vectors.
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
10/5/04© University of Wisconsin, CS559 Fall 2004 Last Time Compositing Painterly Rendering Intro to 3D Graphics Homework 3 due Oct 12 in class.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 2: Review of Basic Math
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
Basic Graphics Concepts Day One CSCI 440. Terminology object - the thing being modeled image - view of object(s) on the screen frame buffer - memory that.
COMP 175: Computer Graphics March 24, 2015
Week 2 - Wednesday CS361.
Geometric Transforms Changing coordinate systems.
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
Image Synthesis Rabie A. Ramadan, PhD 2. 2 Java OpenGL Using JOGL: Using JOGL: Wiki: You can download JOGL from.
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
CS-378: Game Technology Lecture #2.1: Projection Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
Tutorial 1 Introducing Adobe Flash CS3 Professional
Foundations of Computer Graphics (Fall 2012) CS 184, Lectures 13,14: Reviews Transforms, OpenGL
Homogeneous Form, Introduction to 3-D Graphics Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 20,
Shadows via Projection Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, November 5, 2003.
10/3/02 (c) 2002 University of Wisconsin, CS 559 Last Time 2D Coordinate systems and transformations.
1 Computer Graphics Week9 -3D Geometric Transformation.
11 Making a Sprite Session 4.2. Session Overview  Describe the principle of a game sprite, and see how to create a sprite in an XNA game  Learn more.
Digital Media Dr. Jim Rowan ITEC So far… We have compared bitmapped graphics and vector graphics We have discussed bitmapped images, some file formats.
Game Creation in XNA CS470 Final Project Chris Ragland.
CS559: Computer Graphics Lecture 9: Rasterization Li Zhang Spring 2008.
ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms.
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
Lecture 5: Introduction to 3D
1 Perception and VR MONT 104S, Fall 2008 Lecture 20 Computer Graphics and VR.
Computer Graphics Matrices
Honours Graphics 2008 Session 2. Today’s focus Vectors, matrices and associated math Transformations and concatenation 3D space.
Mapdraw ats315. Today’s goal: Drawing a map in the graphics window! Drawing a map in the graphics window!
Digital Media Lecture 5: Vector Graphics Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Graphics Lecture 2: Slide 1 Lecture 2 Transformations for animation.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
1 By Dr. HANY ELSALAMONY.  We have seen how to create models in the 3D world. We discussed transforms in lecture 3, and we have used some transformations.
Some Notes on 3-D Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, October 24, 2003.
Simple Sprite Sheets with Inkscape & Gimp David Cline.
COMPUTER GRAPHICS AND LINEAR ALGEBRA AN INTRODUCTION.
Introduction to 3-D Viewing Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 27, 2003.
CSE 167 [Win 17], Lecture 2: Review of Basic Math Ravi Ramamoorthi
Modeling Transformations
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Computer Graphics 3: 2D Transformations
Week 7 - Monday CS361.
Computer Graphics CC416 Week 15 3D Graphics.
Computer Graphics 3: 2D Transformations
Graphics Fundamentals
Graphical Output Graphical Text.
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
CS148: Introduction to Computer Graphics and Imaging
CENG 477 Introduction to Computer Graphics
COMP 175: Computer Graphics February 9, 2016
FP1 Matrices Transformations
Lecture 08: Coordinate Transformation II
3D Transformation CS380: Computer Graphics Sung-Eui Yoon (윤성의)
(c) 2002 University of Wisconsin, CS 559
Transformations.
Game Programming Algorithms and Techniques
Warm Up 6.3 Complete the chart for the given counterclockwise rotations about the origin. 90o 180o 270o R(3, -3) S(1, 4) Use.
Presentation transcript:

CS 4730 Ruminations on Sprites in Monogame Martin Kellogg, definitely not Ph.D.

CS 4730 Cunning Plan Sprites are an abstraction of all graphical content Three kinds of coordinates: world, screen, and object We can manipulate sprites using linear algebra –Some examples include translation, scaling, and rotation 2

CS 4730 What is a Sprite? Any graphical content 3 Either 2D or 3D We’ll restrict ourselves to 2D sprites

CS 4730 Coordinates We care about three coordinate systems: –Screen coordinates –World coordinates –Object coordinates 4

CS 4730 Screen and world coordinates 5

CS 4730 Object coordinates Position of a pixel within an object 6

CS 4730 What about Monogame? Implemented through the SpriteBatch class Three important methods: –Begin –Draw –End 7

CS 4730 Back to front… End() is easy – you call it when you’re finished drawing things! 8 Draw() is a touch more complex, but still simple. Three arguments: –The image to draw –The position at which to draw –A color to tint it (use Color.White most of the time) e.g. mySpriteBatch.Draw(background, Vector2.Zero, Color.White);

CS 4730 Back to front (continued) The Begin() method is the most complex You can pass it a variety of parameters that control how everything is drawn Or you can just pass it nothing (easiest and therefore most recommended choice) 9

CS 4730 Trivia (Classics)! This Roman general and statesman held the consulship for 59 BCE with Marcus Bibulus. Having completed the consulship, he held proconsular command in Gaul for nearly ten years before famously returning over the Rubicon river in January, 49. In later times his name was used as a title by the German Hohenzollern dynasty. 10

CS 4730 And another (Games)… Published in Japan in 2002 under the name Fuuin no tsurugi, this role-playing game follows a young noble of the Lycian League as he struggles to defend his homeland from the invasion of the neighboring kingdom of Bern. This noble, Roy, later went on to appear in an installment of a famous series of fighters directed by Masahiro Sakurai. 11

CS 4730 Where to draw things? This means using vectors They can describe positions (from the origin) 12

CS 4730 Transformations A function T: → Examples include: –converting object to screen coordinates –translation –scale –rotation 13 22

CS 4730 The Matrix and Vector2 classes This is how we can apply transforms in Monogame Make a Vector2 for your position 14 Apply matrix operations to the Vector2

CS 4730 Translation Translation is just a fancy way of saying movement Equivalent to vector addition Don’t need Matrix class 15

CS 4730 Scaling 16

CS 4730 Rotation 17

CS 4730 A final note about transforms As a general rule, most transforms are NOT commutative Why? 18

CS 4730 An example Rotate then TranslateTranslate then Rotate 19

CS 4730 Wrap up Your Physical prototypes are DUE in lab FRIDAY Thanks for listening! I’d really appreciate feedback on the lecture, so I set up this form. If y’all have a moment (it’s only two multiple choice questions and an optional free response) I’d appreciate it if you’d fill it out and let me know how I did!this form Another way to get to the form: 20