|
Eric Lengyel
Founder and Chief Technology Officer
Terathon Software LLC Eric Lengyel (pronounced LENG · el, with no Y) holds a Masters Degree in Mathematics from Virginia Tech
and is the best-selling author of the book Mathematics for 3D Game Programming & Computer Graphics
(Charles River Media, 2002). He is also a member of the editorial board for the Journal of Graphics Tools
and a major contributor to the successful Game Programming Gems series.
Eric previously worked in the advanced technology group at Naughty Dog and is now credited on several PlayStation 3 titles based on technology that he developed there. Long ago (in programmer years) he was the lead programmer for the fifth installment of Sierra Studio's popular RPG adventure series Quest for Glory. When he's not engaged in multiplayer deathmatch, Eric can usually be found running somewhere in the mountains surrounding Silicon Valley. |
|
Contents
- Books and Book Chapters
- Game Developers Conference Slides
- Journal Papers and Magazine Articles
- Past Game Projects
- Masters Thesis
- Contact Info
Books and Book Chapters
|
Charles River Media, 2004.
This book, now used as a text in computer graphics courses at many universities
around the world, illustrates the mathematics that a programmer would need to develop
a professional-quality 3D engine. Although the book is geared toward applications
in game development, many of the topics appeal to general interests in 3D graphics.
It starts at a fairly basic level in areas such as vector geometry and linear algebra,
and then progresses to more advanced topics in 3D game programming such as
illumination, visibility determination, and collision detection. Particular attention
is given to derivations of key results, ensuring that the reader is not forced to endure
gaps in the theory. The book assumes a working knowledge of trigonometry
and calculus, but also includes sections that review the important tools
used from these disciplines, such as trigonometric identities, differential
equations, and Taylor series.
|
|
Charles River Media, 2003.
OpenGL has been a top choice for game programmers and developers of graphics
applications, mainly because of its cross-platform operability, but also because it is constantly
evolving to keep pace with hardware advances in the form of extensions. Until now, the games
industry was lacking one single, concise reference to help make sense of the dozens of extensions
available. The OpenGL Extensions Guide provides this much needed resource and concentrates
specifically on 78 of the extensions most important to developing modern 3D games.
The book is laid out in an intuitive fashion, discussing groups of extensions that modify
or augment similar components of the base OpenGL architecture. In addition, the text
focuses mainly on operational and implementation issues, discussing the underlying
mathematics of an extension only when it is critical to understanding that
extension's functionality.
|
|
Mathematical Concepts
Introduction to Game Development,
Charles River Media, 2005.
Mathematics has become an essential component of modern game development. As both
the main processors and graphics processors in our gaming hardware become more powerful,
the complexity of the mathematics used to model realistic environments and physical
simulations increases without bound. This chapter provides an introduction to several
fields of mathematics that are vital to today's game engines.
Trigonometry is a ubiquitous tool used extensively by game programmers and serves as this chapter's opening topic and prerequisite for the indisputably important topic of linear algebra. The bulk of this chapter discusses vectors and matrices, the indispensable tools of linear algebra with which every 3D game developer needs to be familiar. We also introduce mathematical representations of geometrical entities, such as lines and planes, and describe how to perform certain routine calculations with them. |
|
Tweaking a Vertex's Projected Depth Value
Game Programming Gems,
Charles River Media, 2000.
The goal of this article is to find a way to offset a polygon's depth in a scene without
changing its projected screen coordinates or altering its texture mapping perspective. Most 3D
graphics libraries contain some kind of polygon offset function to help achieve this goal.
However, these solutions generally lack fine control and usually incur a per-vertex performance
cost. This gem presents an alternative method which modifies the projection matrix to achieve
the depth offset effect.
A Fast Cylinder-Frustum Intersection Test
Game Programming Gems,
Charles River Media, 2000.
Before attempting to render a complex object, many games first determine whether a geometrically
simple volume bounding that object is visible. Due to their computational efficiency, spheres
and boxes are commonly used as bounding volumes, but it is sometimes the case that objects are
naturally suited to be bounded by a cylinder. Although we will not be able to achieve the speed at
which a sphere or box could be tested, this gem presents a quick algorithm for determining whether
an arbitrary cylinder potentially intersects the view frustum (and thus whether it is visible).
|
|
Applying Decals to Arbitrary Surfaces
Game Programming Gems 2,
Charles River Media, 2001.
Many games need to render special effects such as scorch marks on a wall or footprints on the
ground that are not an original part of a scene, but are created during gameplay. These effects
are commonly implemented by creating a new object, which we will call a decal, that coincides
with an existing surface and rendering it using some kind of depth offset technique. Applying a
decal to the interior of a planar surface is simple, but difficulties arise when applying decals
to the more complex surfaces used in today's games to represent curved objects and terrain patches.
This article presents a general method for applying a decal to an arbitrarily shaped surface and
concurrently clipping the decal to the surface's boundary.
|
|
T-Junction Elimination and Retriangulation
Game Programming Gems 3,
Charles River Media, 2002.
This gem describes how to detect possible sources of seams in complex 3D scenes and how to
modify static geometry so that visible artifacts are avoided. Since T-junction elimination adds
vertices to existing polygons (that are not necessarily convex), this article also discuss a
method for triangulating arbitrary concave polygons.
Also published in Best of Game Programming Gems, 2008. |
|
Oblique View Frustums for Mirrors and Portals
Game Programming Gems 5,
Charles River Media, 2005.
Techniques for rendering mirrors and portals displaying a remote part of the scene require that
an extra clipping plane be used to prevent geometry seen in the mirror or portal from crossing
into the local scene. This gem discusses a technique that modifies the projection matrix in such
a way that the conventional near plane of the view frustum is repositioned to serve as the generally
oblique boundary clipping plane.
|
Game Developers Conference Slides
Journal Papers and Magazine Articles
|
Oblique Depth Projection and View Frustum Clipping
Journal of Game Development, Vol. 1, No. 2, 2005.
Several 3D rendering techniques have been developed in which part of the final image is the
result of rendering from a virtual camera whose position in the scene differs from that of
the primary camera. In these situations, there is usually a planar surface, such as the
reflecting plane of a mirror, that can be considered the physical boundary of the recursively
rendered image. In order to avoid artifacts that can arise when rendered geometry penetrates
the boundary plane from the perspective of the virtual camera, an additional clipping plane
must be added to the standard six-sided view frustum. However, many 3D graphics processors
cannot support an extra clipping plane natively, or require that vertex and fragment shaders
be augmented to explicitly perform the additional clipping operation.
This paper discusses a technique that modifies the projection matrix in such a way that the conventional near plane of the view frustum is repositioned to serve as the generally oblique boundary clipping plane. Doing so avoids the performance penalty and burden of developing multiple shaders associated with user-defined clipping planes by keeping the total number of clipping planes at six. The near plane is moved without affecting the four side planes, but the conventional far plane is inescapably destroyed. We analyze the affect on the far plane as well as the related impact on depth buffer precision and present a method for constructing the optimal oblique view frustum. |
![]() |
Unified Distance Formulas for Halfspace Fog
Journal of Graphics Tools, Vol. 12, No. 2, 2007.
In many rendering simulations, it is necessary to model a fog volume that is
bounded by a single plane but is otherwise infinite in extent. In such cases,
the partial distance within the fog volume through which light travels between
a surface point and the camera must be determined for each pixel rendered. This
paper presents unified formulas that provide the correct distance traveled
through a fog halfspace for all surface points and camera positions,
effectively removing the need to code for multiple cases separately. One
formula is derived for a volume having a constant fog density, and a second
formula is derived for a volume having a fog density that increases linearly
with distance from the bounding plane.
On Faster Sphere-Box Overlap Testing
(with Thomas Larsson and Tomas Akenine-Möller)
Journal of Graphics Tools, Vol. 12, No. 1, 2007. We present faster overlap tests between spheres and either axis-aligned
or oriented boxes. By utilizing quick rejection tests, faster execution times
are observed compared to previous techniques. In addition, we present alternative
vectorized overlap tests which are compared to the sequential algorithms.
|
|
Gamasutra.com, October 2002.
The idea of using the stencil buffer to generate shadows has been around for over a decade,
but only recently has 3D graphics hardware advanced to the point where using the stencil
algorithm on a large scale has become practical. Not long ago, there existed some unsolved
problems pertaining to stencil shadows that prevented the algorithm from working correctly
under various conditions. Advances have now been made, however, so that stencil shadows
can be robustly implemented to handle arbitrarily positioned point lights and infinite
directional lights having any desired spatial relationship with the camera. This article
presents the intricacies of the entire stencil shadow algorithm and covers every mathematical
detail of its efficient implementation.
|
|
MacTech Magazine, June 1999.
MacTech Magazine, January 1996.
MacTech Magazine, November 1995.
|
Past Game Projects
|
Yosemite Entertainment / Sierra Studios
Lead programmer, 1996–1998 |
Masters Thesis
|
Hyperreal Structures Arising from an Infinite Base Logarithm
By Eric Lengyel, Virginia Tech, 1996.
|
Contact Info
|
My email address is lengyel@terathon.com. I get a huge amount of email,
and I do read every bit of it. However, because of the volume of email that I receive, it would not be practical for me to respond
to each and every one of them. If I did, then I wouldn't have time to do anything else, so please don't be offended if you don't
get a response from me.
If you are a C4 Engine licensee, then the fastest way to get a response from me about engine questions is by posting in the C4 Engine forums. Before posting a new question, please do a quick search to see if the question has already been answered. I can receive private messages through the forums, but I would prefer an email over that option. |















