3d game development intro to game engines engines
play

3D Game Development Intro to Game Engines Engines Jay Urbain, - PowerPoint PPT Presentation

3D Game Development Intro to Game Engines Engines Jay Urbain, Ph.D. SE3250 OpenGL Programming Guide: http://www.glprogramming.com/red/ http://people.msoe.edu/~urbain/cs421/index.html http://jmonkeyengine.org Game engine


  1. 3D Game Development – Intro to Game Engines Engines Jay Urbain, Ph.D. SE3250 • OpenGL Programming Guide: http://www.glprogramming.com/red/ • http://people.msoe.edu/~urbain/cs421/index.html • http://jmonkeyengine.org

  2. Game engine • System designed for the creation and development of video games. • Software framework for developers. • Core functionality: – rendering engine for 2D or 3D graphics rendering engine for 2D or 3D graphics – physics engine for collision detection/response – Sound – Scripting – Animation – AI – Networking, streaming, memory management, threading, localization support, and a scene graph.

  3. Game engine • The process of game development is often economized, in large part, by reusing/adapting the same game engine to create different games. • Select appropriate Game Engine from engine attributes (previous slide). (previous slide). • Use Java Monkey (jME3) as exemplar.

  4. jMonkeyEngine (jME) • Game engine made for 3D development. • Uses shader technology extensively. • jMonkeyEngine is written in Java and uses LWJGL as its default renderer. • OpenGL 2 through OpenGL 4 is fully supported. OpenGL 2 through OpenGL 4 is fully supported. • jMonkeyEngine is a collection of libraries , making it a low- level game development tool. • Coupled with an IDE like the official jMonkeyEngine 3 SDK it becomes a higher level game development environment with multiple graphical components (NetBeans).

  5. 3D Graphics and Audio • OpenGL is the Open Graphics Library, a platform-independent specification for rendering 2D/3D computer graphics. • Alternatively, Microsoft XNA is a set of tools and runtime environment for video game development and management. – XNA is based on .NET Compact Framework 2.0 for Xbox 360 development and .NET Framework 2.0 on Windows. development and .NET Framework 2.0 on Windows. • For Java, there are two implementations of OpenGL-based renderers: – Lightweight Java Game Library (LWJGL) – jme3 uses lwjgl. – Java OpenGL (JOGL) • OpenAL is the Open Audio Library, a platform-independent 3D audio API.

  6. jME -Context, Display, Renderer • Context makes settings, renderer, timer, input and event listeners, display system, accessible to a game. • Display System is what draws the custom JME window (instead of Java Swing). • The Input System is the component that lets you respond to • The Input System is the component that lets you respond to user input: Mouse clicks and movements, keyboard presses, and joystick motions. • The Renderer is what does all the work of calculating how to draw the 3D scenegraph to the 2D screen. • The Shader is a programmable part of the rendering pipeline.

  7. Scene Graph • Objects in a virtual space. • Virtual space where your game appears. • Objects in the scene graph are called spatials . • Spacials have a translation (location), rotation, and scale. • Locations in the scene graph are defined using X, Y, and Z Locations in the scene graph are defined using X, Y, and Z coordinates.

  8. Three Dimensions

  9. Translation

  10. Rotation

  11. Rotation

  12. Geometry • A geometry is the type of spatial that is visible on the screen. • A geometry has a mesh to define its form and a material to define its appearance. a material to define its appearance.

  13. Geometry • A geometry is the type of spatial that is visible on the screen. • A geometry has a mesh to define its form and a material to define its appearance. • Geometry with and without material color.

  14. Nodes Spacial that can have other spatials as children, i.e., a collection. • Children of the node are moved and rotated relative to their parent node. • The scene graph uses a base root node that all spatials are connected to. •

  15. Nodes Spacial that can have other spatials as children, i.e., a collection. • Children of the node are moved and rotated relative to their parent node. • The scene graph uses a base root node that all spatials are connected to. •

  16. Nodes and Geometries

  17. Translate Geometry

  18. Child Geometry Relative to Node

  19. Translate Node

  20. Translate Node

  21. Rotate Node

  22. Rotate Geometry (child object)

  23. Rotate Geometry

  24. Rotate Node about Z-Axis

  25. Scale Node

  26. Scale Node

  27. Scale Child

  28. Scale Child

  29. Organizing with Nodes

  30. Geometry - Polygon, Mesh, Vertex Most visible objects in a 3D scene are made up of polygon meshes – game • characters, terrains, buildings, etc. A mesh is a grid-like structure that represents a complex shape. • Mathematically simple to render in real time, and detailed enough to be • recognizable. Every shape is reduced to a number of connected polygons , usually Every shape is reduced to a number of connected polygons , usually • triangles; including round surfaces. Polygons' corner points are called vertices . • Every vertex is positioned at a coordinate , all vertices together describe • the outline of the shape. Create 3D meshes in tools called mesh editors, e.g in Blender, Maya. • jME can load finished meshes (models) and arrange them in scenes. •

  31. Materials: Color, Lighting/Shading “ Color " is part of an object's light reflection. • Our brain uses shading and reflecting properties to infer an object's shape • and material. Differentiate chalk & milk, skin & paper, water & plastic. • Ambient color • – The uniform base color of the mesh – what it looks like when not The uniform base color of the mesh – what it looks like when not influenced by any light source. – Usually similar to the Diffuse color. – Min. color you need for an object to be visible. Diffuse color • – Base color of the mesh plus shattered light and shadows that are caused by a light source. – Usually similar to the Ambient color.

  32. Ambient Lighting No light source – material color •

  33. Light Sources - Emissive color Emissive color • – The color of light emitted by a light source or glowing material. – Only glowing materials such as lights have an emissive color, normal objects don't have this property. – Often white (sun light).

  34. Light Sources - Reflections Reflections: Shininess • – Degree of shininess of a surface. – Shiny objects have small, clearly outlined specular highlights . (E.g. glass, water, silver) – Normal objects have wide, blurry specular highlights. (E.g. metal, plastic, stone, polished highlights. (E.g. metal, plastic, stone, polished materials). – Uneven objects are not shiny and have no specular highlights. (E.g. cloth, paper, wood, snow) .

  35. Light Sources - Reflections Reflections: Specular Color • – If the material is shiny, then the Specular Color is the color of the reflected highlights. – Usually the same as the emissive color of the light source (e.g. white). – You can use colors to achieve special specular effects, such as metallic or iridescent reflections. or iridescent reflections. – Non-shiny objects have a black specular color.

  36. Materials: Textures Simplest case: object has one texture, the Color Map, loaded from one • image file. The more information you provide to the Color Map, the higher the • degree of detail and realism. Whether you want photo-realistic rendering or "toon" rendering (Cel • Shading), everything depends on the quality of your materials and Shading), everything depends on the quality of your materials and textures. Modern 3D graphics use several layers of information to describe one • material, each mapped layer is a texture.

  37. Color Map / Diffuse Map • A plain image file or a procedural texture that describes an object's visible surface. • The image can have alpha channels for transparency. • A Color Map is the minimum texture. You can map more textures as optional improvements. textures as optional improvements. • Color Maps are unshaded. The same is called Diffuse Map in a Phong-illuminated material, because this texture defines the basic colors of light that are diffused by this object.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend