3D Part3 CMT3317.

Slides:



Advertisements
Similar presentations
Real-Time Rendering 靜宜大學資工研究所 蔡奇偉副教授 2010©.
Advertisements

Lecture 8 Transparency, Mirroring
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Skater World: Part Four By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 2009.
SE 313 – Computer Graphics Lecture 13: Lighting and Materials Practice Lecturer: Gazihan Alankuş 1.
CS 4363/6353 INTRODUCTION TO COMPUTER GRAPHICS. WHAT YOU’LL SEE Interactive 3D computer graphics Real-time 2D, but mostly 3D OpenGL C/C++ (if you don’t.
1 Round 6 Technology CAD / CAM. 2 Passport Photo Frame Drawing Area Draw / Edit Toolbox Drawing Aids Toolbox Position, Size and Direction Information.
Point Lighting Using Shaders Game Design Experience Professor Jim Whitehead March 13, 2009 Creative Commons Attribution 3.0 (Except copyrighted images.
Simple 3D Camera Game Design Experience Professor Jim Whitehead March 6, 2009 Creative Commons Attribution 3.0 (Except copyrighted images) creativecommons.org/licenses/by/3.0.
Week 1 - Friday.  What did we talk about last time?  C#  SharpDX.
Field Setup Field Setup (5 stations) Separate large field into three equal “stations” using cones, and small field into two equal “stations” using cones.
SE 313 – Computer Graphics Lecture 11: Projection Painting and Merging Textures Lecturer: Gazihan Alankuş 1.
3D Concepts Coordinate Systems Coordinates specify points in space 3D coords commonly use X, Y, & Z A vertex is a 'corner' of an object Different coordinate.
Introduction to 3D Graphics Lecture 4: Scenes and Scene Graphs Anthony Steed University College London.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
Week 2 - Wednesday CS361.
TERRAIN SET09115 Intro to Graphics Programming. Breakdown  Basics  What do we mean by terrain?  How terrain rendering works  Generating terrain 
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Realtime NPR Toon and Pencil Shading Joel Jorgensen May 4, 2010.
Mark Nelson 3d projections Fall 2013
Point Sprites Course Information CVG: Programming 4 My Name: Mark Walsh Website: Recommended.
Sky Boxes and Vector Math 2 Course Information CVG: Programming 4 My Name: Mark Walsh Website:
Speed Tree Let’s Make a Forest Copyright © 2015 – Curt Hill.
Skater World: Part Four By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 1, 2009.
Color: This channel applies color, textured patterns, or images to the surface.
Graphics for Games Particle Systems CO2301 Games Development 1 Week 23.
Components in photo journalism BY: KYLE COACH BY: SIR. FADERA.
The Stingray Example Program CMT3311. Stingray - an example 2D game May be useful as a simple case study Most 2D games need to solve generic problems.
2D Graphics CMT3311. This covers... How to make a transparent sprite How to add a sprite to your project and draw it Properties of sprites and how to.
Object Animation CMT3317. Do you need to do animation? We consider ways of animating composite objects – that have a number of different parts e.g. a.
One-point perspective images have a tendency to draw the viewer along the lines to the vanishing point. This effect can be used to greater advantage by.
Mirrors. What is a plane mirror? ● Its a plain mirror! (But called a plane mirror...) ● Its a FLAT and SMOOTH mirror, like many in your home. ● The reflection.
6.2 Extending Human Vision
Introduction to Computer Graphics
Skater World: Part Four
Part 1: Working with Histograms in-camera
- Introduction - Graphics Pipeline
Week 2 - Monday CS361.
Computer Graphics Imaging
Photographic Compositions
Mrs. Bryant 6th Grade Science
Cropping your way to happiness.
Week 11 - Wednesday CS361.
Rocket Difficulty Time Approximately 30–35 minutes Art Deco Clock
Mirrors.
Ogre Overview.
BACK FACE DETECTION back-face detection Determination of whether a face of an object is facing backward and therefore invisible. The usual test is whether.
IMAGES.
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.
Assignment 8 Chess Game.
CS451Real-time Rendering Pipeline
Jim X. Chen George Mason University
Three-Dimensional Concepts. Three Dimensional Graphics  It is the field of computer graphics that deals with generating and displaying three dimensional.
Properties of Reflections
OOP Paradigms There are four main aspects of Object-Orientated Programming Inheritance Polymorphism Abstraction Encapsulation We’ve seen Encapsulation.
Photo Album 2 by Your Name Set photo album to 1 picture per slide
Computer Animation Texture Mapping.
1.02 Investigate image editing.
Blender API: Part 2: Game Engine
Introduction to Grasshopper for rhino
Dr. Jim Rowan ITEC 2110 Vector Graphics II
Computer Graphics Material Colours and Lighting
Unity Game Development
Phases of the Moon.
Animation Ideas Robot walking from one side of the screen to the other, getting closer to camera each time Bump into something - object? Look at something.
Dr. Jim Rowan ITEC 2110 Vector Graphics II
Using billboards within games
1.02 Investigate image editing.
Presentation transcript:

3D Part3 CMT3317

Scene objects Some cheap world objects can be made with simple shapes like planes and transparency – like transparency is used in 2D Far away objects that the player will never be let near can be approximated by images or photos attached to planes

Fir tree This cheap fir tree is an image attached to a plane

Oak tree This slightly more complex example uses two planes Many other simple shapes can be used to make objects e.g. cones etc In the game the black areas need to be transparent

Class changes Since 3D step1 some classes have changed. The helper class() has been removed and simpleObject updated. It seem logical to revise the ship class to input handing is done in the main program The ship class now has function to rotate around each axis in a positive or negative direction – and to advance, retreat and reset its position.

Ship: rotation around the y axis – x and z are similar

Ship: advance, retreat, reset

Input handling Input handling is now done in Game1.cs

Simple object SimpleObject() is as it was but the functions … SetupEffectTransformDefaults() Draw() … have been moved out of the Helper Class and into SimpleObject()

SimpleBlendedObject() In order to use transparency we need to turn on alpha blending in the Draw() function We create a new class SimpleBlendedObject which is subclassed from SimpleObject and contains a draw function DrawBlendedModel()

DrawBlendedModel DrawBlendedModel() turns on alpha blending Draws as usual Then turns alpha blending off

Class SimpleBlendedObject

Objects with alpha blending

Billboarding A billboard is a plane with a texture on it that always rotates to face the camera so that the player never sees that it is just a plane We make a class BillboardObject which is a subclass of SimpleBlendedObject () The matrix class has a method to rotate the object based on the camera parameters: Matrix.CreateConstrainedBillboard()

Billboard: draw() and billboard() functions

The fir tree always faces the camera. See Step3_3D_Billboard.zip

Lighting problem One problem with billboarding is that the lighting of the object means that its brightness changes as it rotates To stop this we turn of lighting inside the SetupEffectTransformDefaults() function, so the Billboard class overrides the inherited version of this function

Beware of textures on plane Mathematically planes only have an inside and an outside - they are one sided -which means textured planes disappear when viewed from the wrong side, as with this red tree

MS example There is a nice example also at XNA creators club Its complex though, nearly all the work is done in the shader – it includes a wind model that appears to blow the trees and grass around http://creators.xna.com/Headlines/developmentaspx/archive/2007/01/01/Billboard-Sample.aspx

MS Example