Skip to content

oceanfox/3d_spacecraft_jogl

Repository files navigation

Graphics Programming Assignment - Spacecraft Scene (Received 93% Grade)

How to Run

To compile:

$ javac Spacecraft.java

To run:

$ java Spacecraft

Project Structure

The project is organized into the following packages:

  • camera: Camera and input handling
  • gmaths: Mathematical utilities
  • graphics: Core graphics components
  • primitives: Basic 3D shapes
  • scene: Main scene and object implementations
  • scenegraph: Scene graph hierarchy implementation
  • utils: Utility classes

Declaration

All work in the scene, utils package is my own work. I have also modified several files in the gmaths and camera packages and all the shaders. Find the sources of the textures in readme.txt in assets/textures.

Implemented Features

  1. Room
  • Textured walls, floor, and ceiling with multiple texture mapping techniques:
    • Normal mapping for surface detail
    • Specular mapping for realistic reflections
    • Height/Parallax mapping for depth effects
  • Back wall features dynamic specular-mapped text
  • Right wall demonstrates advanced repeating texture with normal and height mapping
  • Floor uses multi-layered texturing for path visualization
  • Ceiling implements opacity mapping for sci-fi grid effect
  1. Window and Space View
  • Custom fragment shader implementation for window frame effects
  • Advanced depth handling for window transparency
  • Multi-texture blending for frame materials
  • Normal mapping on metallic frame for realistic lighting
  1. Advanced Shader Features
  • Implemented multiple mapping techniques:
    • Normal mapping for surface detail enhancement
    • Parallax/Height mapping for depth perception
    • Specular mapping for material reflection properties
    • Opacity mapping for transparency effects
  • Custom shader implementations:
    • Multi-light shader supporting directional, point, and spotlight sources
    • Window shader with frame rendering and transparency
    • Skybox shader with rotation effects
    • Material shader with multiple texture coordinates
  1. Material System
  • PBR-inspired material system with:
    • Diffuse texturing
    • Specular reflection mapping
    • Normal mapping for surface detail
    • Height mapping for parallax effects
    • Opacity mapping for transparency
  • Custom material parameters for:
    • Ambient light response
    • Diffuse light scattering
    • Specular highlights
    • Surface roughness
      • Spins around the y axis

Controls

Camera:

  • Arrow keys: Move camera position
  • A/Z: Move forward/backward
  • Mouse drag: Look around

Interface Controls:

  • Camera X/Z: Switch camera views
  • Start/Stop Dance: Manual control for Robot 1's dance
  • Toggle Robot 2: Start/stop Robot 2's movement
  • Toggle Main Light: Turn on/off main scene light
  • Toggle Spotlight: Turn on/off Robot 2's spotlight
  • Light intensity sliders: Adjust brightness of lights

Textures and Resources

All textures used are either created specifically for this project or used under appropriate licenses. See assets/textures/readme.txt for detailed attribution.

  1. Advanced Lighting
  • Normal mapping
  • Specular mapping
  • Spotlight effects
  • Multiple light sources
  1. Enhanced Animations
  • Smooth interpolation
  • Physics-based movement
  • Complex hierarchical animations
  1. Advanced Rendering
  • Skybox implementation
  • Proper transparency handling Code built with reference to:
  • COM3503 3D Computer Graphics, University of Sheffield, Steve Maddock
  • LearnOpenGL.com tutorials on advanced lighting and mapping techniques

About

3D Computer Graphics Assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors