This project is a WebGL-based 3D application that demonstrates various shading, transformation, lighting effect, texturing, animation, multiple objects rendering techniques and interactive features for computer graphics.
- Flat Shading: Basic shading with constant color per face
- Gouraud Shading: Smooth shading with color interpolation at vertices
- Phong Shading: Advanced shading with per-pixel lighting calculation
- Toon Shading: Cel-shading effect with discrete color levels
- Blinn-Phong Shading: Modified Phong model using halfway vector
- PBR Shading: Physically Based Rendering for realistic materials
- Introduced two distinct light sources at different positions in the scene.
- Verified via specular highlights under Phong shading and distinct colors from each source.
Implemented transformation controls including:
- Translation
- Rotation (around X, Y, Z axes)
- Scaling
- Shearing
- Implemented view-space clipping along at least one axis (X, Y, or Z) for occlusion control.
- Rendered at least three objects in the scene.
- Included two different models, showcasing multi-object handling.
- Lighting Effects: Color Cycle, Two Lights Interaction with RGB setting, Color Light Mixing.
- Texture Control: Import, UV scale, Mapping, etc.
- Customized Multi-Object Model Importing
- Animations: Auto Rotation for Multi-Objects.
- Select models from the right panel
- Adjust position, rotation, and scale
- Toggle auto-rotation
- Switch between different shading modes
- Adjust material properties
- Modify lighting parameters
- Upload and apply textures
- Choose blending modes
- Adjust texture coordinates
- Adjust clipping planes
- Toggle panel visibility
- Resize viewport
- Teapot
- Mercedes
- Plant
- Patchair
- Mig27
- Longteap
- Kangaroo
- Fighter
- Easter
- Csie
- Church
- Car Road
- WebGL for 3D rendering
- HTML5 Canvas
- JavaScript for interaction handling
- Web Audio API for audio processing
- Custom GLSL shaders for various rendering techniques
- Custom vertex and fragment shaders for each shading mode
- Matrix transformations for 3D model manipulation
- Texture coordinate handling for material mapping
- Real-time audio analysis for dynamic effects
- Efficient model loading and rendering pipeline
- Open
index.html
in a WebGL-compatible browser - Select desired models from the right panel
- Choose a shading mode from the left panel with dropdown menu
- Experiment with different controls:
- Model rotation and positioning
- Texture mapping options
- Lighting parameters
- Clipping planes
- Firefox web browser with WebGL support
index.html
: Main application filejs/
:webgl-utils.js
: WebGL utility functionsutils.js
: General utility functionsjson.js
: JSON handlingcss_style.css
: Styling definitions
textures/
: Texture image filesmodel/
: 3D model JSON files
Shih-Yu Lai. This project is part of the Interactive Computer Graphics course, implementing various computer graphics concepts and techniques using WebGL.