Rendering Particles

The Untold Engine provides a Particle System which allows you to develop 3D particles as shown below:


Particle Designer

To make it easier for you, the Untold Engine supports a third-party application known as Particle Designer. Particle Designer is a powerful particle effects editor.


Exporting Particle Emitter

To export the particle emitter parameters, select the appropriate parameters. Before you export the file, set the export type to PEX, as shown below. And then click on Export. A PEX file with your desired Emitter name will be generated. You will use this file shortly.


Particle Texture

By default, the Untold Engine comes with a predefined texture for your particles (“particle.png”). The particle texture is shown below. However, you are free to use whatever texture you desire. To do so, simply add your texture to your project’s resource folder.


Creating a Particle System

Creating a Particle System using the Untold Engine is easy. Simply create an instance of U4DEngine::U4DParticleSystem as shown in line 1. Next, load the PEX file and texture file as shown in line 2. Load the attributes of the particle system into the GPU (Line 3). Add it to the scenegraph (line 4). And finally, initiate the particle’s emission as shown in line 5.

//1. Create a particle system
U4DEngine::U4DParticleSystem *particleSystem=new U4DEngine::U4DParticleSystem();

//2.Load the particle's attributes file and particle texture into the Particle System entity

    //3. load the attributes into the GPU

    //4.add the particle system to the scenegraph. If you are using a Skybox, make sure to set the proper order of the particle system in the scenegraph. In this instance,
    //I set the order to -5

    //5. initiate the particle's emission


You can also set other parameters for the particle system, such as Enable Additive Rendering, noise and noise detail.

particleSystem->setEnableAdditiveRendering(true); //set true by default        
particleSystem->setEnableNoise(true); //set false by default
particleSystem->setNoiseDetail(2.0); //ranges from [2-16]