• Home
  • Blog
  • My Hardware
  • Old portfolio
Project 8D

Jet Exhaust Particle System

7/23/2015

0 Comments

 
This particle system was designed using three emitters that are briefly discussed below: Combustion emitter, Smoke emitter and Heat emitter. 
Picture
Jet Exhaust Particle System: Emitter components

Combustion

Combustion is achieved by creating a GPU Sprites Emitter with 500 particles that are put through a vector field. This vector field is designed to push the particles in a jet stream like motion. Further, the vector field is set up as local vector field with a constant 'intensity' value and a 'tightness' value of zero, meaning that it only influences the particle's velocity (as opposed to completely taking over its velocity).  Therefore, the particles need to have an initial velocity when spawned. The velocity cone module is used to spawn the particles with an initial velocity along a cone with a small angle aperture that is always pointing downwards. The angle of the combustion cone is fixed but the velocity distribution is set up to be a 'Distribution Float Particle Parameter' in order to be able to control this parameter from code or blueprints. Exposing this parameter to code or blueprints allows for controlling how strong the overall combustion effect looks like and, in this particular case, its hooked to the strength of the thrusters. Which is in turn controlled by pulling the gamepad left thumbstick up and down.

It is worth mention that an alternative way to controlling the overall strength of the combustion effect could have been set up by using a global vector field instead. This means that is up to the blueprint/code to define and own the vector field allowing it to modify the vector field intensity dynamically (instead of modifying the velocity cone's velocity parameter).

A color over life module is used to create the blue to red gradient effect. Also the size over life effect allows for the sprite to grow twice its size as it ages.

Lastly, another key module to achieve this combustion effect is to use a subimage index module (sub UV). First of all, this subuv module allows for a sprite to play a sprite animation. In this case the explosion sprite atlas shown below was used.
Picture
Explosion Sprite Atlas
It should be noted that there are two ways to achieve sprite animations via subuvs: One option is to create a custom material that uses time to programmatically sweep the uvs horizontally and vertically across the sprite atlas. Another simpler approach, which was used here, is to create a custom material and just use a particle subuv expression. This expression automatically does the uvs horizontal and vertical sweeps (cascade tells it how many sub images there are horizontally and vertically). All there is left to do when using this expression is to provide the sprite atlas texture. When using this approach the subimage index module needs to be created in order to define how many subimages are to be used. Moreover, the amount of subimages horizontally and vertically is defined through the subuv section parameters in the 'required' module. 

Finally, a couple comments regarding collision. I found that GPU collision only works when the option 'Use Local Space' is disabled in the required module. According to Unreal Forums this is because "collision on GPU particles calls from Scene Depth and cannot function in local space". However, disabling this local space option causes the particle effect to have a trailing effect when flying and I didn't like that. Hence I disabled collisions on this combustion emitter (The cascade screenshot may not reflect that tho).

Smoke

Originally the smoke emitter was simply meant to be a simple CPU sprite emitter to simulate spark collisions when the jet exhaust got too close to the ground. This was meant to overcome the limitation of the GPU sprites from above not supporting collisions when dealing with local space. However, I couldn't get the sparks to look natural enough and eventually this module evolved into smoke. The particles in this emitter are simply shot down with an initial velocity and made to collide with any static actor in the world. A maximum of two collisions per particle was chosen and a damping factor vector that makes the particles (smoke) jump in an upward fashion when colliding. To create the sprite material a smoke alpha texture was used in a translucent material configuration. As usual, the particle color modulates the material emissive color as well as the opacity. Hence, to create smooth smoke a color over life was chosen where smoke is born light gray and dies black. Also, it is born almost translucent just to become fully opaque halfway and die fully translucent again. Finally, this is alpha texture used for the smoke sprite. 
Picture
Smoke Alpha Texture

Heat

The heat effect is mainly achieved by the sprite material. This material is set up as a lit translucent surface and the main thing about it is its refraction variation. The refraction variation is being driven by a lerp module that interpolates between 1.0 and 1.6 for the refraction index input parameter in the shader. Furthermore, this lerp is driven by a modulation between the particle's color and a noise texure being panned. Finally, the normal of this material is driven by two normal maps that are panned and then added to each other in order to create random motion. With the material set up, the emitter is setup to spawn particles on the surface of a sphere centered around the combustion emitter with an initial velocity pointing up (heat rises). A drag module helps slow down the particles as they mature and grow in size. Finally, the scale color module allows for the emitter to communicate to the material to increase that modulation factor driving the refraction interpolation.
0 Comments

Day-night Cycle HD Landscape

7/6/2015

0 Comments

 
In order to better showcase the HD landscape (discussed in my previous post), I decided to create a day-night cycle blueprint. The main idea is simple but, as usual, the devil is in the details...

At a very high level, the main steps were the following:
 - Create a 'Timeline' node inside the level blueprint.
 - Create the different parameter curves inside the 'Timeline' needed to drive all the cyclic items. More specifically, I'm talking about the sun position, the fog amount, skylight intensity, and the time of day.
 - In order for the time of day and sun position to be consistent I had to drive the sun position from -270 degrees at 00:00 to 90 degrees at 24:00 hrs. Moreover, my time scale was 1 hr = 10 seconds.
 - The fog parameters were trial and error but overall attempted to reduce fog during midday and increase it at night.
 - The skylight allowed for nice ambient lighting during day light but it had issues at night as it would light up the terrain like crazy. Therefore, I decided to drive the skylight intensity to almost zero during night time.
 - Create own copy of the engine's sky sphere in order to be able to tweak freely without affecting other levels or projects.
 - Cloud amount, cloud speed, and stars brightness can be tweaked in the sky sphere blueprint but only at construction time. Hence, in order to drive those material parameters with the time of day, create another 'Timeline' node inside the sky sphere's BP event graph. Then, create the different curves for cloud amount, cloud speed, and stars brightness inside this timeline node. Afterwards, hook up those outputs to the corresponding parameters of the dynamic material instance. Finally, connect the time of day, from the 'Timeline' node in the level blueprint, to the time input of the Timeline node just created for the sky sphere's BP event graph. This is how the two blueprints communicate.
 - Add milky way galaxy at night by grabbing picture from NASA and importing it as a power of two texture into the project. After that, find the section where the stars are being drawn inside the sky sphere's material and linearly interpolate the milky way galaxy texture. Getting the UV's tiling was trial and error but at the end found U tiling of 2 and V tiling of 1 factors worked best for me.
 - Create Matinee by adding camera groups, a director group and a soundtrack.

Learned lessons
 - Need to set the directional light as movable.
 - Need to register the directional light with the sky sphere in order to use its angle to drive the sun position.
 - Need to call the sky sphere's 'Update Material' function every time the sun position is updated.
 - It looks nicer with distance field ray traced shadows enabled.
 - Reduce skylight intensity at night in order to avoid glitches where the terrain lights up at night. Still investigating if this is a glitch with skylights or if its a problem where I'm abusing of the interface type of deal.

To do items
 - Explore the distance field shadows parameters better.
 - Investigate lighting artifact where there are isolated pockets of the landscape that light up at weird times during night cycle.
 - Investigate why the dirt mask applied to camera 2 is not working.
 - Improve landscape material. Investigate how to autogenerate landscape materials blends based on terrain features.
 - Another reason to improve the landscape material is due to the grid patterns being formed by the UV tiling.
0 Comments

    Author

    I'm a software engineer with a passion for computer graphics.

    Archives

    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014

    Categories

    All
    Blueprints
    Build
    Landscape
    Materials
    Matinee
    Misc
    Particles FX
    Set Dressing

    RSS Feed


Disclaimers:
All the information on this website is published in good faith and for general information purpose only. We do not make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information on our website is strictly at your own risk. We will not be liable for any losses and damages in connection with the use of our website. From our website, you can visit other websites by following hyperlinks to these sites. While we strive to provide only links to useful and ethical websites, we have no control over the content and nature of these sites and the links to other websites do not imply a recommendation for all the content found on these sites. Please be also aware that when you leave our website, other sites may have different privacy policies and terms which are beyond our control.