3D Models and Meshes Asst. Prof. Rujchai Ung-arunyawee COE, KKU.

Slides:



Advertisements
Similar presentations
2000 Prentice Hall, Inc. All rights reserved. 1 Outline 3.1Introduction 3.2Game Loop Components 3.3How to Implement in C# 3.4Adding Image to XNA Project.
Advertisements

Constructor and New Fields // Don't synch draw() with vertical retrace of monitor graphics.SynchronizeWithVerticalRetrace = false; IsFixedTimeStep = true;
COMPUTER PROGRAMMING 2 Chapter 7 Sound. Objectives Find out how to prepare sounds for inclusion in Microsoft XNA projects. Incorporate sounds into XNA.
2D Graphics in XNA Game Studio Express (Modeling a Class in UML) Game Design Experience Professor Jim Whitehead February 5, 2008 Creative Commons Attribution.
Introduction to Shader Programming
Programming with Collections Collections in Java Using Arrays Week 9.
Triangles, Translations Game Design Experience Professor Jim Whitehead March 2, 2009 Creative Commons Attribution 3.0 (Except copyrighted images) creativecommons.org/licenses/by/3.0.
Adding a Syllabus Link. Let’s add the syllabus to the homepage. Return to the homepage Click “Add File” To get to the homepage, click the Course Content.
Computer Science – Game DesignUC Santa Cruz Adapted from Jim Whitehead’s slides Shaders Feb 18, 2011 Creative Commons Attribution 3.0 (Except copyrighted.
CSS552 Final Project Demo Peter Lam Tim Chuang. Problem Statement Our goal is to experiment with different post rendering effects (Cel Shading, Bloom.
Computer Science – Game DesignUC Santa Cruz Adapted from Jim Whitehead’s slides Sound in games Think about truly memorable games – They almost always have.
Building Basics. Types of Buildings Religious Towers Grocery Stores Apartments Houses Skyscrapers Ect. What types of special features do each of these.
I can haz gamez?. Bret Stateham Microsoft Developer Evangelist Blog:
11 Games and Content Session 4.1. Session Overview  Show how games are made up of program code and content  Find out about the content management system.
Finishing 2D COSC 315 Fall 2014 Bridget M. Blodgett.
Computer Science – Game DesignUC Santa Cruz CMPS 20: Game Design Experience January 14, 2010 Arnav Jhala.
CHAPTER 4 Images XNA Game Studio 4.0. Objectives Find out how the Content Manager lets you add pictures to Microsoft XNA games. Discover how pictures.
Rob Miles Microsoft MVP University of Hull Fun Programming with Visual Studio.
11 A First Game Program Session Session Overview  Begin the creation of an arcade game  Learn software design techniques that apply to any form.
Getting Started. XNA Game Studio 4.0 To download XNA Game Studio 4.0 itself, go to XNA Game.
Week 1 - Wednesday.  What did we talk about last time?  Syllabus  Colors  RGB  CMYK  HSL and HSV.
Using Namepsaces  This section lists the namespaces that the application will be using frequently. Saves the programmer from specifying a fully qualified.
Week 2 - Wednesday CS361.
Developing the Game User Interface (UI) Lesson 5.
1 Useful Tools for Making Video Games Part V An overview of.
11 Adding Sounds Session 7.1. Session Overview  Find out how to capture and manipulate sound on a Windows PC  Show how sound is managed as an item of.
Microsoft Tech Days 2012 Cheezia: Developing a Windows Phone XNA Game Rodrigo Barretto Software Engineer - MCPD on Windows Phone
Computer Science – Game DesignUC Santa Cruz Adapted from Jim Whitehead’s slides Announcements Prototype submissions will be directly from SVN on Gforge.
Introduction to XNA Graphics Programming Asst. Prof. Rujchai Ung-arunyawee COE, KKU.
XNA An Introduction. What XNA is… Microsoft® XNA™ is composed of industry- leading software, services, resources, and communities focused on enabling.
XNA Game Studio 4.0 Keyboard and Mouse Controls + more on Animated Sprites.
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.
Sprites, User Input, and Collision COSC 315 Fall 2014 Bridget M. Blodgett.
3D Cameras COSC 315 Fall 2014 Bridget M. Blodgett.
XNA Basic Displaying Image & Collision Detect. What’s format image that XNA support? XNA support only.bmp.png and.jpg image..PNG have transparent region.
Modeling and Animation A brief overview. Amanda Chaffin.
11 Writing Text Session 5.1. Session Overview  Show how fonts are managed in computers  Discover the difference between bitmap fonts and vector fonts.
Compound Data Types Part13dbg. 2 Point A Point is a simple built-in struct that stores a pair of screen coordinates. Instantiate a Point: Point aPoint.
Polynomials Objective: To review operations involving polynomials.
XNA ● Proprietary Microsoft framework ● C#. Interface.
XNA Tutorial 1 For CS134 Lecture. Overview Some of the hard work has already been done for you. If you build and run your game now, the GraphicsDeviceManager.
Computer Graphics Imaging Lecture 13 and 14 UV Mapping.
Rob Miles. Creating a Broken MoodLight An XNA game contains game data which is used by the Draw and Update methods – Update updates the game data – Draw.
Consumer Windows Phone Emulator Phone Emulator SamplesDocumentation GuidesCommunity Packaging and Verification Tools Windows Phone Dev Tools AppHub.
Computer Science – Game DesignUC Santa Cruz Tile Engine.
Import existing part with drawing
CHAPTER 5 Text XNA Game Studio 4.0. Objectives Discover how text is drawn using Microsoft XNA. Add some font resources to your XNA program. Draw some.
How to use a Pixel Shader CMT3317. Pixel shaders There is NO requirement to use a pixel shader for the coursework though you can if you want to You should.
6.3 Adding, Subtracting, & Multiplying Polynomials p. 338 What are the two ways that you can add, subtract or multiply polynomials? Name three special.
Lecture d game programming basics 1Elias Holmlid.
Lecture 4 Using SpriteFonts
Graphical Output Basic Images.
3GB3 Game Design Unity 3D Basics.
Game Development Unity3D.
GAM 245: Game Development II
Basic C++ What’s a declaration? What’s a definition?
Open BIDS and create new SSAS Project Right Click on Data Source and click on New Data Source.
Constant: value does not change
Computer Animation UV Mapping.
Lecture 2 - Building a Monogame Windows Project
6.3 Adding, Subtracting, and Multiplying Polynomials
JavaScript onLoad arrays
MTA-4201 Game Programming Chapter 8 : Scrolling Background & Font
03 | Creating, Texturing and Moving Objects
Introduction to OpenGL
Computer Graphics, KKU. Lecture 11
Online Pogo Game Customer Service
Pogo Game Customer Care Helpline Number

Call Pogo Contact Phone Number and Enjoy Pogo Game
Presentation transcript:

3D Models and Meshes Asst. Prof. Rujchai Ung-arunyawee COE, KKU

3D Models Simply called Models a hierarchy of meshes, which can be rendered independently. mesh is a collection of interconnected vertices, along with some rendering information. XNA provides special classes to manipulatemodels and meshes: Model and ModelMesh.

Using 3D models in XNA Add existing item of the model file (.x or.fxb) to the project. Declare a model variable as a member of the game class. Load a model with content manager and assign it to the model variable. Draw each mesh in the model.

Adding a model file

Declare a model variable public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; ContentManager content; BasicEffect effect; VertexBuffer vertexBuffer; Model myModel; …………… }

Loading model In the LoadContent method myModel = Content.Load ("Cube");

Drawing model In the Draw method, run through all meshes in the model and draw each one foreach (ModelMesh mesh in myModel.Meshes) { // Draw the current mesh mesh.Draw(); }

Model Transformation foreach (ModelMesh mesh in myModel.Meshes) { foreach (BasicEffect eff in mesh.Effects) { eff.World *= Matrix.CreateScale(0.5f); eff.View = effect.View; eff.Projection = effect.Projection; eff.EnableDefaultLighting(); } mesh.Draw(); }