LGDC - Main Page
(View a printer-friendly Version of this Page)Print (Mail us)Contact

Contents

LGDC | Articles

[News]
   Most Recent
   Archive

[Articles]
   Recent
   Everything
   Art & Design
   Editorials
   Interviews
   Management
   Programming
   Reviews

[Resources]
   Recent
   Everything
   Data
   Documentation
   Game Projects
   Libraries
   Sites
   Tools

[Information]
   About
   Mailing Lists
   Submissions
   Poll Results
   Site Source
   Contact

Webmaster

 

Alpha-blending and the Z-buffer [External article @ www.sjbaker.org]

Written 2002-01-06 UTC by Steve Baker in Category "Programming - Graphics" (Last Change: 2002-01-06 UTC)

 

 

Shock! - Horror!...
The Z buffer doesn't work for transparent polygons.
The problem is that the Z buffer prevents OpenGL from drawing pixels that are behind things that have already been drawn. Generally, that's pretty convenient - but when the thing in front is translucent, you NEED to see things that are behind it.

 

Fast Text in OpenGL [External article @ www.sjbaker.org]

Written 2002-01-06 UTC by Steve Baker in Category "Programming - Graphics" (Last Change: 2002-01-06 UTC)

 

 

Sooner or later, almost everyone finds the need to draw text using OpenGL. This text explains the basically three only ways to do this at the OpenGL level

 

Culling your scene to the View Frustum [External article @ www.sjbaker.org]

Written 2002-01-05 UTC by Steve Baker in Category "Programming - Graphics" (Last Change: 2002-01-05 UTC)

 

 

OpenGL can correctly reject polygons that lie 'off the edge' of the screen - and clip those that straddle the edge of the screen, but the cost of transmitting all those vertices to OpenGL only to have them thrown away is pretty high.

You could write code to reject those polygons yourself - but that would be pretty pointless because it would probably take as long - if not longer - than OpenGL takes.

The optimal solution is to do a coarse level cull in your application - rejecting entire objects that lie completely off the screen - and let OpenGL do the fine-grained cull at the level of individual polygons. This approach will greatly speed up most OpenGL applications.

This paper describes one efficient method for attacking this problem.

 

Tiling Textures Without Seams [External article @ www.sjbaker.org]

Written 2002-01-05 UTC by Steve Baker in Category "Art and Game Design - Graphics" (Last Change: 2002-01-05 UTC)

 

 

Sooner or later, you'll need to draw a texture that is too large to fit into a single texture map. You'll assume that you can split the image up into perhaps four smaller maps - and just attach those to four separate polygons.

Nice in theory - but in practice, you'll find that you get a thin seam between the adjacent textures...especially if you use MIPmapping.

 

Euler Angles are Evil [External article @ www.sjbaker.org]

Written 2002-01-05 UTC by Steve Baker in Category "Programming - Physics and Math" (Last Change: 2002-01-05 UTC)

 

 

Most people's first attempt at writing a camera/player movement routine do this kind of thing:

  while ( 1 )
  {
    ...read some angular velocities from a joystick or something ;
    ...add the angular velocities to the current angles ;
    ...convert current angles into a matrix ;
    ...invert the matrix ;
    ...put it onto the GL_MODELVIEW stack ;
 
    ...draw the scene ;
  }

This doesn't work - or at least, it seems to work - but only for heading changes - and perhaps small changes in pitch and roll. You have just discovered that - and that's why you are reading this page - right?

 

Matrices can be your Friends [External article @ www.sjbaker.org]

Written 2002-01-05 UTC by Steve Baker in Category "Programming - Physics and Math" (Last Change: 2002-01-05 UTC)

 

 

What stops most people from getting friendly with matrices is that they look like 16 utterly random numbers. However, a little mental picture that I have seems to help most people to make sense of what's going on. Most programmers are visual thinkers and don't take kindly to piles of abstract math.

 

Learning to Love your Z-buffer [External article @ www.sjbaker.org]

Written 2002-01-05 UTC by Steve Baker in Category "Programming - Graphics" (Last Change: 2002-01-05 UTC)

 

 

One of the more common OpenGL programming problems that I see concerns the poor precision of the Z buffer.

Many of the early 3D adaptors for the PC have a 16 bit Z buffer, some others have 24 bits - and the very best have 32 bits. If you are lucky enough to have a 32 bit Z buffer, then Z-precision may not seem to be an issue for you. However, if you expect your program to be portable, you'd better give it some thought.
The precision of Z matters because the Z buffer determines which objects are hidden behind which others - and if you don't have enough precision to resolve the distance between two nearby objects, they will randomly show through each other - sometimes in large zig-zags, sometimes in stripes.

 

Basic OpenGL Lighting [External article @ www.sjbaker.org]

Written 2002-01-05 UTC by Steve Baker in Category "Programming - Graphics" (Last Change: 2002-01-05 UTC)

 

 

Many people starting out with OpenGL are confused by the way that OpenGL's built-in lighting works - and consequently how colour functions. I hope to be able to clear up some of the confusion.

 

Keyboards Are Evil [External article @ www.sjbaker.org]

Written 2002-01-05 UTC by Steve Baker in Category "Programming - Other" (Last Change: 2002-01-05 UTC)

 

 

OK - so I hear you asking, what could possibly be evil about keyboards (apart from the stoopid CapsLock key of course!).
Try this (Yes - NOW! - I'll wait while you do it...):

  • Open a text entry window of some kind.
  • Press down (and hold down) the 'E' key.
  • Without letting go, press down (and hold down) the 'C' key.
  • Now tap repeatedly on the 'U' key. Do you see any u's coming out on the screen? No? I didn't think so.
  • If you have an older keyboard, maybe you did see a 'u' - but you probably see some m's too?!?
  • Try typing some other characters - notice that some work but some are either blocked or generate 'ghost' characters.
  • Try holding down other pairs of keys and tapping on a third - for almost any pair you choose, there are several other keys that don't work.

Clearly this is a bad thing for programs that expect the user to hold down keys to make things happen. Games with two players using the keyboard at once are particularly vulnerable to this.

 

Managing Open Source Projects [External article @ slashdot.org]

Written 2001-09-19 UTC by Stephanie Black in Category "Review - Books" (Last Change: 2001-09-19 UTC)

 

 

Summary: A HOWTO on putting the principles and advantages of Open Source programming to work.
Rating: 9 (out of 10)

Quote: "Don't just sit there -- go get the book, even if you're not currently involved in, or planning on, managing an open source project. The information is timely, the pace is lively, and Sandred has provided a wealth of insight into the open source movement's past, present and future. While some of his work has perceptual errors, these are few. The rest of it is pure gold."

 

 

Hosted By
SunSITE.dk

| News | Articles | Resources | Contact |
http://lgdc.sunsite.dk/articles/index.html - Last Changed 2002-02-28 UTC

 Powered by Zend Cache