Skip to content

This repository is a learning project that explores the fundamentals of 3D rendering with OpenGL. It is a collection of experiments and demonstrations, integrated with ImGui, allowing for easy exploration and modification of parameters.

Notifications You must be signed in to change notification settings

Shreyas9699/OpenGL-Explorations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenGL Explorations

This repository is a learning project that explores the fundamentals of 3D rendering with OpenGL. It includes a collection of experiments and demonstrations, integrated with ImGui for easy exploration and modification of parameters.

Gallery

Here are some project screenshots and a video:

Screenshots

Videos

Video 1 Video 2
Video 3

Features

  • Render Game Window (Clear Color)
  • Render Triangle
  • Render Square
  • Load 2D Texture
  • Render Sphere (UV Sphere)
  • Cube Rendering With Lighting Effect and Materials
    • Multiple material options
    • Phong lighting model
  • Cube With Texture and Lighting
    • Textured Cube with texture Diffuse, Emission and Specular
    • Phong lighting model with Attenuation
  • Fractal Brownian Motion Plane With Lighting
    • Fractal Brownian Motion Plane with Wireframe view, Rotation and each point movement.
    • Phong lighting model
  • Load and Tessellate Height Map
    • Load Height Map from png
    • Uses Tessellation and interpolation to generate 3D Height map from png
    • Uses FOV to dynamically change the tessellation levels
    • Renders Normals
    • Uses Frustum culling
  • Load 3D model using Assimp
    • Load 3D model from obj file
    • Render 3D model with Phong lighting model
    • Renders Normals
  • Particles in 3D (Implements in CPU)
    • Uses CPU to create, update and destroy particles from emitter
    • Max number of particle alive per frame is ~30K (with Avg of 22 FPS)
  • Particles in 3D (Implements in GPU Nvidia GTX 1050)
    • Uses CPU to create, update and destroy particles from emitter
    • Max number of particle alive per frame is ~1.5 million (with Avg of 120 FPS)
  • Fire Particle Simulation
    • Uses GPU to create, update and destroy fire particles from emitter
    • Each has its own temp and other properties.
    • Uses Smoothed-particle hydrodynamics (SPH) for more relastic particle simulation and have effect of particles on each other.
  • Procedural Terrain Generation
    • Uses SimpleX/Perlin noise to generate height map
    • Uses height map to generate 3D terrain
    • Uses Frustum culling before mesh generation, Multithreading, Dynamic tessellation based on FOV, and camera distance for performace optimization.

Particle system: Initial Implemented using Array of Structures (AoS), with commit [cc8fe1647093a94a01c6ae96c84aa74215fd3172]

Getting Started

You can follow same instructions on https://github.com/Shreyas9699/opengl-base-template to set it up.
OR
You can follow The Cherno Instructions

Prerequisites

  • OpenGL 3.3 or higher
  • GLFW
  • GLEW
  • GLM
  • stb_image
  • Assimp
  • ImGui

Usage

  • Use the ImGui interface to modify rendering parameters in real-time.
  • Explore different rendering techniques by selecting from the available demos.

Recent Changes

  • 2025-06-23: Using SPH calc, better fire simulation. Issue: Bad performance with large number of particles

Last Commit Commit Activity

Acknowledgments

About

This repository is a learning project that explores the fundamentals of 3D rendering with OpenGL. It is a collection of experiments and demonstrations, integrated with ImGui, allowing for easy exploration and modification of parameters.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages