Basic 3D Graphics Engine developed in C++ using OpenGL
Edge Engine its a 3D graphics Engine for Game Development developed with C++ and OpenGL. It has been developed by students of the Degree in Videogame Design and Development of the Universitat Politècnica de Catalunya. You can check out our webpage here.
Check our latest release here
For our final part of the project we have created a particle system. With this final module you can create, and modify already existing particles in our engine, and it will be used to complete the engine we will be using for our next big subject: PROJECT 3
For our particles to work we needed the following things:
Here we have an example of our base class with all the things needed related to the particles themselves.
class Particles {
public:
Particles();
Particles(Particles* particleReference);
~Particles();
public:
float3 position;
float lifetime;
float speed;
float size;
float dirVariation;
Color color;
float3 direction;
bool active;
float distanceToCamera;
ModuleComponentBillBoard* billboard;
};
The billboard itself what does is allow us to create a base for our particles to be drawn and align them to the camera. We have three type of alignments, Screen Alignment, World Alignment and Axis alignment. Each gameObject containing particles also has this component as to have it as a base for particles and not having to create multiple gameObjects for the same particle (more or less like instancing)
The emmitter class is the one responsible of producing and destroying all the particles needed, being the most important class for the functionality of all our particles. Each particle will be updated thanks to this class
Here it’s where all active particles are handled, more or less like an entities manager but this time only focused on all the particles that we have in game.
We have created three base particles, one customizable, a smoke particle and a firework. For each particle you can change it’s values through the inspector. Some changes available being, changing speeds,directions, colors and even more. Each particle works like it’s own class another time similar to how entities work, each type has it’s own variations and can be coded to generate even more like in the firework example.
Caution: If you click right and open the .gif in a new tab the resolution improves drastically.
In this gif we can see all the functionalities of our particles, this allowing the users to create customizable particles for different projects. As seen in the GIF before we can modify multiple settings of the particles as the lifetime, the amount of them or its size to say a few. Another functionality added is that the particles created can have the color changed in the inspector tab.
Caution: If you click right and open the .gif in a new tab the resolution improves drastically.
In this gif we see the firework working, we can create multiple fireworks. As we can observe in the image from above the fireworks that are spammed with the key 1 are created with enough randomization that the explosion dont always feel the same one. For it to be perfect we would also delete the gameObject holding the particle after explosion.
Caution: If you click right and open the .gif in a new tab the resolution improves drastically.
In this gif we can see the functionality of our engine in general,things such as loading meshes and textures, changing parts of the gameObject through the inspector, the hierarchy system and also the capability of swapping textures of gameObjects with just the user interface.
Copyright (c) 2022 Albert Ramisa & Alejandro Martin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.