Download presentation
Presentation is loading. Please wait.
Published byTimothy Simon Modified over 9 years ago
1
Knowledge Systems Lab JN 5/9/2015 The Sword: A Role Playing Game for Demonstrating Computer Graphics Techniques Joshua R. New Computer Graphics Jacksonville State University
2
Knowledge Systems Lab JN 5/9/2015 Outline Introduction 2D Transparent, Image-based Font 3D ANSI/Symbol Font Fog Model Loading Animated Texture Particle System Video w/ Environmental Mapping
3
Knowledge Systems Lab JN 5/9/2015 Introduction The Sword – An RPG for demonstrating computer graphics techniques Created using C++ and OpenGL Most insight gained from Nehe’s OpenGL tutorials http://nehe.gamedev.net/ Computer Graphics by Dr. Mario Aguilar
4
Knowledge Systems Lab JN 5/9/2015 2D Transparent, Image-Based Font Load file and create font texture for HUD TGA_Load(&font_texture, "Art/font.tga", GL_LINEAR, GL_LINEAR); Targa Image (*.tga) Alpha Channel
5
Knowledge Systems Lab JN 5/9/2015 2D Transparent, Image-Based Font Transparent Text Example
6
Knowledge Systems Lab JN 5/9/2015 3D ANSI/Symbol Font wglUseFontOutlines( base,…//Start of display lists 0.2f,// Font thickness in Z direction WGL_FONT_POLYGONS,…) //Not lines printf(“FPS = %2.0f”,fps); glPrint(x, y, char *text)
7
Knowledge Systems Lab JN 5/9/2015 3D ANSI/Symbol Font Texture Effects: Gray Color, Object Linear, Eye Linear, Sphere Map
8
Knowledge Systems Lab JN 5/9/2015 Fog glFogi(GL_FOG_MODE, fogMode[fogfilter]); glFogf(GL_FOG_START, 30.0f); glFogf(GL_FOG_END, 190.0f); glFogf(GL_FOG_DENSITY, 0.007f); glFogfv(GL_FOG_COLOR, fogColor); glHint(GL_FOG_HINT, GL_DONT_CARE); glEnable(GL_FOG); fogMode[]={GL_exp, GL_exp2, GL_linear, GL_none}
9
Knowledge Systems Lab JN 5/9/2015 Fog NONENONE LINEARLINEAR EXPEXP EXP2EXP2
10
Knowledge Systems Lab JN 5/9/2015 Model Loading Milkshape 3D: Program for building, coloring, texture- mapping, and animating 3D models (*.ms3d) Screenshot of MS3D The One Sword Bubbling Cauldron
11
Knowledge Systems Lab JN 5/9/2015 Animated Texture Animate when the player is close to the texture (replicates a waving flag effect) - Change height value of each vertex according to a sinusoidal wave in order to create a 3D mesh Bitmap ImageSinusoidal HeightWaving LinesWaving Texture
12
Knowledge Systems Lab JN 5/9/2015 Particle System Flare (*.tga) Load *.tga for a single particle Particle system creates multiple images with specified properties –Number of particles per second –Properties (color, position, size) –Behavior (spread, velocity, gravity, attraction, etc.)
13
Knowledge Systems Lab JN 5/9/2015 Particle System BlendingOffBlendingOff BlendingOnBlendingOn
14
Knowledge Systems Lab JN 5/9/2015 Particle System EXPLOSIONEXPLOSION IMPLOSIONIMPLOSION
15
Knowledge Systems Lab JN 5/9/2015 Video w/ Env. Mapping Open AVI file Grab the next frame and treat as bitmap Environmental mapping – mapping of a texture from the environment to a surface in order to replicate reflections:
16
Knowledge Systems Lab JN 5/9/2015 Video w/ Env. Mapping SPHEREMAP OffSPHEREMAP On
17
Knowledge Systems Lab JN 5/9/2015 Future Directions Additional graphical techniques –Shadows using stencil buffer –Picking for selection of objects –Masking for appearance of 3D depth –Multi-texturing New MS3D loader Integration with gaming engine
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.