Category Archives: OpenGL

Real time procedural water demo

I added procedural water in the “Procedural terrain engine”.

Normally when creating water one often use tiling Du-Dv and Normal textures to create distortion effects and lighting. This is how I did it in the Realization EngineHere I am generating those textures procedurally on the GPU in real time instead. This allows me to adjust diffrent parameters to change the look of the water. It also removes the repeting patterns in the water that are clearly visible when using texture images that are loaded from the disc.

Procedural terrain engine is my own graphics engine I have written In C++ using OpenGL, GLSL and GLFW to experiment with procedural generation of different typs.

Procedural terrain engine demo

This is a demo I made using C++, OpenGL and GLFW. It is a proceduraly generated landscape in which the user can “walk around”. The terrain is generated using Simplex-noise and is made up of chunks that are loaded and removed as the user walks over the terrain. It is possible to walk infinity (or at least very very far) in one direction without reaching any edge or crashing the program. The chunks are rendered in different levels of detail depending on the distance from the camera to improve performance.

Real time cloth simulation

This is a project I made together with two others students: Mikael Lindhe and Eleonora Petersson. This project was made in the course “Modelling Project TNM085” at Linköping University. The video demonstrates two pieces of cloth that are simulated in two different ways.

The first cloth is represented with particles that are connected with each other using constraints. This mean that whenever the cloth moves, the distances between the particles are corrected to make the cloth retain it’s shape. This is the “usual” method for simulating cloth in computer games.

The second cloth is simulated using a method where the particles are connected with each other using springs. When the cloth moves, forces are applied to all particles to correct them to there original distances from each other.  This method proved to be more computationally heavy and less stable then the first method.

I was mainly working on the graphics part for this project, while the others focused more on the simulation part. It was the first time I developed a basic rendering system for modern OpenGL in C++ from scratch. It was also the first time I made a program that updates vertex buffer data for an object every frame.

Improved world editor in Realization Engine 33

I made a new videon showing how I decorate a small island to demonstrate the new improved world editor mode. Now the user can place any abject as well as moving and rotating them. Objects and also be deleted. The world can be saved to a file from the editor. At startup, the program looks for a save file in the same folder as the executable file, if no save file is found, a default file is loaded. The video also shows some post processing effects I have implemented.

Download an try it yourself: http://sor.brinkeby.se/

Mouse cursor ray casting in Realization Engine version 22

I have added a simple editor mode in my graphics engine that allows me to move and rotate entities with the mouse cursor.

This works by casting a ray from the camera, trough the mouse cursor, into the world. To select objects, the distance from the objects local origin to the mouse ray is calculated using linear algebra, if this distance is small enough the object is selected. Then the intersection point between this ray and the terrain is calculated using binary search, and used to position the selected object.

Download version 22 and try it yourself: Realization Engine download page

Double jump using [Space] to begin flying mode. Use space and [Shift] to fly up and down. Hold down [Alt] to free the mouse cursor to interact with objects. Click and drag objects with the left mouse button to move them. Click and drag with the right mouse button to rotate objects. Press the center mouse button to spawn a new “physics-barrel”.

Particle systems in Realization Engine

Version 19 of my graphics/game engine project demonstrates particle systems with fire, smoke, falling leaves, and snow. All entities (objects) also support normal maps. This makes it possible to make rough and uneven surfaces look more realistic. There is also multiple skyboxes that can be faded and mixed independently. Watch the video or try it yourself:
Realization Engine downloads page
Realization Engine project page

Water rendering in Realization Engine v13

In update 13 a have added water to the world. The water is created using a reflection texture and a refraction texture that are applied to the water surface. The textures are distorted and animated by two DuDv maps. There are also specular light reflections on the surface, the surface normal is calculated using two normal maps.

More info here: https://axelsdiy.brinkeby.se/?page_id=1006

Realization Engine update version 10

Made some progress with my graphics engine. In this video I show a simple menu. I have also added a lot more content to the world, like trees, rocks and more flowers to make it more interesting. There is also a very simple physics engine that controls the behavior of moving entities. This is demonstrated by the (very unrealistic) sliding crates and barrels in the video.

Link to the Realization Engine page

Realization Engine – computer graphics demo

This is another 3D graphics engine I have made using modern OpenGL, Java and LWJGL 3.0. I wanted to make something a little more realistic than my previous project, “Tile World 3“. So far I have made a simple terrain using a height map and implemented multitexturing using a blend map. There is also a first person camera that can walk around on the terrain, the “player” can jump and respond to physics. This “graphics engine” will be the platform for more experiments in the future. For example I want to try water rendering with reflations and particle systems.

I will upload a new version of the runnable application to this page every time I make any progress. Try them yourself! The demo requires Java and a decent graphics card to work.

Tile World 3 – 3D game demo with Java and LWJGL

Tile world 3 is a game demo a have made using Java and LWJGL. The demo is programmed using modern OpenGL with GLSL shaders. The user controls a first person camera, and can explore the world by walking, running, swimming, jumping and sneaking using the mouse and keyboard or a XBox360 controller. The demo features simple 3D collision handling and some simple animations. This is a very interesting and very educational project, so I will probably continue working it and ad more features.

Download the demo here: To the game demo download page

Read more about the project here: To the Tile World 3 page