Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Unreal Development Kit Beginner's Guide

You're reading from  Unreal Development Kit Beginner's Guide

Product type Book
Published in Aug 2011
Publisher Packt
ISBN-13 9781849690522
Pages 244 pages
Edition 1st Edition
Languages
Author (1):
Richard Moore Richard Moore
Profile icon Richard Moore

Table of Contents (17) Chapters

Unreal Development Kit 3
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Pop Quiz Answers
1. Level Design HQ 2. Hello UDK 3. Applying Lighting Effects 4. Battling the Elements 5. Movement with Movers 6. Terrain 7. Adding Gameplay Elements into your Map 8. Complex Event Sequences 9. Materials Index

Chapter 4. Battling the Elements

This is a basic chapter on how the effects work using Unreal Engine 3's particle editor (cascade). It will quickly walk you through the interface of the editor and explain how a basic smoke particle, water, height, and fog can be set up.

In this chapter, we will cover the following topics:

  • The basics

  • Add a new particle emitter

  • The smoke example

  • Adding height fog

  • Creating the surface

  • Water volumes

  • Underwater

Let's Go!

To start with, we are going to look into the basics of cascade particles. The particle system in UDK is drastically different to its original UE2 variant. Particles now have a brand-new and extensive particle editor, and are saved as assets in a package, instead of actors in a level or a U file.

The ability to save a particle as an asset in a package is great, since all levels can now refer to the same particle, and if the particle has to be adjusted, it will only have to be done once.

The new particle system is module-based. You add blocks of stuff, if...

Time for action – the basics


  1. The cascade Particle Editor can be accessed only through an already existing particle. Thus, if you want to open the editor, you should either double-click an existing particle in the generic browser or simply create a brand new one.

  2. To create a brand new particle, open the generic browser, right-click in some empty space, and choose New Particle System.

  3. If all is right, the cascade Particle Editor will open automatically once the new particle has been created. Particles have a yellow edge in the generic browser. If you cannot see it, it might be hidden. Enable the Particle Systems in the top-left of the generic browser to show it, or simply enable the option Show All Resource Types.

    • Area 1: This is the preview window and will preview the particle effect.

    • Area 2: This is the list of different particle emitters and all of the modules that each emitter contains. A Particle System can contain multiple particle emitters. It is possible to have a water-drip effect and...

Time for action – add a new particle emitter


  1. Add a new Particle Emitter by right-clicking anywhere in Area 2 and clicking on the only option given (New ParticleSpriteEmitter). You now have a very basic particle.

  2. Now, you obviously want to modify the default set up. To do so, you can click on any of the modules, such as Lifetime or Initial Size. If you need more than the default settings, you can right-click anywhere in the column and you will get a list of additional modules that you can add.

What just happened?

So now we know what particle emitters are and that they are used for adding depth and character to our map. We also know how they can be created using the particle editor. So what's the next step? Let's go ahead and start by creating a smoke effect.

Time for action – the smoke example


Since an example can best explain it, we will go through all the steps required to make a basic smoke particle set up that spawns and rotates particles, fades in and out, and grows in size.

  1. First of all, you need a cloud material. Create your own cloud texture or use mine. Right-click this image and save it somewhere. Preferably, convert it to BMP or TGA before you import it.

  2. Add the texture to a Material and set it up as displayed in the following screenshot:

  3. The DepthBiasedAlpha will make sure that it is a soft particle. When a particle sprite intersects with a piece of geometry, the DepthBiasedAlpha will fade-out the sprite along the edge.

  4. The Vertex Color expression is really important. All materials that are used in particles must have a Vertex Color expression because it allows cascade to change the opacity and color of the particles. Without a Vertex Color, you cannot fade-out a particle, for example.

  5. Once the material has been set up it can be applied...

Time for action – adding height fog


Height fog is a great way to add atmosphere to your level. It can help set the mood and make distant objects really feel like they're at a distance. You can add height fog to your level by placing a height fog actor as follows:

  1. Open your level, go to the Actor Classes tab of the generic browser. HeightFog can be found under the Info category.

  2. Select HeightFog, then add it to your level (right-click somewhere in the level and choose Add HeightFog Here).

  3. You may not notice the effects of the fog right away, especially if you placed the actor on the floor. That's because the position of the height fog actor you just placed controls where the fog starts—if you placed it low (or on the floor), the fog starts too low to affect your level.

  4. Grab the HeightFog actor and move it up near the ceiling or higher. The fog still isn't very thick, but you should be able to see its effect on the level as the actor moves.

Setting parameters

  1. Bring up the properties of the height...

Time for action – creating the surface


  1. Go to the generic browser and find yourself a nice plane. Package UN_SimpleMeshes (loaded by default), has one.

  2. Add the plane to the level and position it correctly. You may need to scale it up a lot to make it fit the area.

  3. In its properties, expand the section Collision and set CollisionType to NoCollision.

  4. Next, expand the section StaticMeshActor, then the section Lighting, and disable everything.

  5. Leave the properties window open and return to the generic browser.

  6. Find yourself a neat water material. The packages UN_Liquid and UN_Liquid2 would be a good place to start. I personally used material UN_Liquid.SM.Materials.M_UN_Liquid_SM_DistortionRiver_01 for this tutorial, even though it is a one-sided material, it is kind of a problem as you will notice later. It is also possible to create your own water materials, but this is quite a complex process, explained in detail in my two water material tutorials. So please refer to those if you plan on doing so...

Time for action – water volumes


  1. Resize the red builder brush so that it covers everything that you wish to flood. It is important to match the top face of the red builder brush exactly with the plane you've just placed, or else the water would actually end at a location other than what the plane would imply. The plane's only use is to visually represent a body of water. The real water, however, is entirely independent of the plane. It would be possible to delete the plane and still have water to swim in, albeit invisible water.

  2. Once you have positioned the red builder brush correctly, right-click the volume button on the left toolbar and pick UTWaterVolume.

  3. Now, move the red builder brush away to reveal the pink water volume below. If you do not see it, you might have toggled volumes off with the O key on the keyboard. Your water is now swimmable.

What just happened?

So, we have now completed creating our surface for water, which is also swimmable, but what if we want to make it so that we can...

Time for action – underwater


As things look different underwater, you want to apply different post-process settings to the area.

  1. To do so, make your red builder brush roughly the same size as your water volume and position it at the same location.

    Note

    It may help to actually make it slightly smaller or larger than the water volume, as it may be difficult selecting the volume instead, if they are both at the same location. Once you have positioned the red builder brush correctly, add a PostProcessVolume.

  2. You now have two volumes around your body of water. Select the PostProcessVolume you've just added, and open up its properties.

  3. Expand the PostProcessVolume section and configure the properties marked in the following screenshot:

  4. By enabling bEnableDOF, you enabled the depth of field, causing the water to blur your vision, which you further tweaked with DOF_FocusDistance, DOF_FocusInnerRadius, and DOF_MaxNearBlurAmount. Also, by changing Scene_Highlights X to 2.000000 and Z to 0.500000, you gave...

Summary


We learned a lot in this chapter about the following:

  • The basics of the cascade particle editor

  • How to add a new particle emitter

  • How to create a smoke effect using the particle editor

  • How to add height fog

  • Creating a surface

  • How to create water volumes

  • Creating swimmable water

We have learnt how to incorporate different particle systems into your map, such as smoke, fog, and water. In the next chapter, we will be looking into movement with movers using triggers, emitters, and volumes to activate elevators and doors when walking past them.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Unreal Development Kit Beginner's Guide
Published in: Aug 2011 Publisher: Packt ISBN-13: 9781849690522
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}