3D Game Development


3D Space

3D Primitives

Transformations

Projections

Lighting and Shading

Ray Tracing

Texture Mapping

What is Wrong With Java for Game Development (Standard Edition)?

Introducing the Lightweight Java Game Library (LWJGL)

User Interfaces in LWJGL


OpenGL

OpenGL Functions and Demos

Early Example OpenGL Game

Camera and Viewing

Lighting

  1. The following is a tuple that defines the position of a light source: FloatBuffer pos = FloatBuffer.wrap(new float[] {-0.5f, 1.0f, 1.0f, 0.0f});.
  2. Light positioning: GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, pos);
  3. Light intensities:
    • Use GL11.glLight() with a tuple that defines the intensity
    • GL_AMBIENT
    • GL_DIFFUSE
    • GL_SPECULAR
  4. Spotlight:
    • Must define a light position
    • Need a few specific parameters: the spot cutoff, the spotlight's direction, and the spotlight's focus (all three are necessary)
    • The spot cutoff (GL_SPOT_CUTOFF) is the parameter that defines the angle between the edge of the light cone and the cone's axis. Thus, GL11.glLight(GL_LIGHT0, GL_SPOT_CUTOFF, 15.0f) creates a 30 degree (15.0f*2) light cone.
    • By default, the spotlight's direction is (0.0, 0.0, -1.0), down the negative z-axis.
    • GL11.glLight(GL11.GL_LIGHT0, GL11.GL_SPOT_DIRECTION, spotlight direction via tuple)
    • The focus of the spotlight: GL11.glLight(GL11.GL_LIGHT0, GL11.GL_SPOT_EXPONENT, some floating point number that defines amount of concentration)
  5. Material:
    • Define reflectance of material on object (via color tuple)
    • GL11.glMaterial(GL11.GL_FRONT, GL11.{GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_EMISSION}, your color tuple});
    • Shininess (specular exponent): GL11.glMaterial(GL11.GL_FRONT, GL11.GL_SHININESS, some floating point number that defines shininess);

Texture Mapping

Terrains

OpenGL Loose Ends

3D Model Loading via OpenGL / LWJGL

Particle Systems

3D Modeling Using Blender 3D

Putting It All Together (3D): The Game Engine

jMonkey Engine (jME)

jME Scene Graphs

jME Development

jME Tools