Week 1 – Introduction to Unreal
What was covered in the lecture:
– Camera Move: W A S D
– Navigate inside the software
– Change the material of an object
– Move, rotate, and resize an object
– Move the actor inside the scene
– Change the weight and other scientific parameters of an object
– Save a project
– To make an object moveable and to apply gravity on him -> Stimulate Physics [ON]
I think all the class topics were clear, and the order in which they were taught was right. I feel that I still need to practice and play with the software to feel more comfortable with the topics we covered.
The workshop activity:
The weekly activity:
Actor in Unreal Engine
In Unreal Engine, an “Actor” is an object that can be placed on a level. Actors can be a camera, static/dynamic mesh, or player start location. Actors support 3D transformations such as translation, rotation, and scaling. Gameplay code (C++ or Blueprints) can create and destroy them.
Reference: Unreal Engine Documentation– Static Mesh Actor – A Static Mesh represents 3D geometry, such as furniture, buildings, statues, cars, etc. When choosing a Static Mesh as an Actor type, it gets stored as an Asset in the Content Browser. It can then place instances of this Actor into the level.
Reference: Unreal Engine Documentation
Components in Unreal Engine
A Component is a piece of functionality that can be added to an Actor. When adding a Component to an Actor, the Actor can use the Component’s functionality. For example:
– A Spot Light Component will make your Actor emit light like a spot light.
– A Rotating Movement Component will make your Actor spin around.
– An Audio Component will give your Actor the ability to play sounds.
Components must be attached to an Actor and can’t exist by themselves.
When adding Components to an Actor, you are putting together the pieces that will make up that Actor as a whole. For example, the wheels on a car, the steering wheel, the body of the car, the lights etc. would all be considered as Components while the car itself is the Actor.
Week 2 – Materials
What was covered in the lecture:
Materials Inputs:
– Base Colour – changes the colour
– Metallic – how metal-like the material is
– Specular – the reflective properties of the material
– Roughness – controls how smooth or rough the material is
– Anisotropy and Tangent – allow to have different roughness properties in different directions
– Emissive – allows materials to emit light. Good for creating neon
– Opacity – used in Translucent Blend Mode and allows values between 0.0 – 1.0. Good for creating masks.
Material Expressions (the ones we more likely to use):
– Panner – Moves the material input. It is used to create effects such as fire, water, or smoke.
– Add – Takes two inputs, adds them together and outputs the result. 50%50%.
– If – For things we want to change inside the scene.
– Multiply – Takes two inputs and, multiples them together and outputs the result. The results are similar to the multiply layer in Photoshop.
– Lerp [macro texture linear interpolation unreal] – Linearly interpolates between A and B based on Alpha (100% of A when Alpha=0 and 100% of B when Alpha=1).
– Fresnel – Changes the colour of the outside of the material
– Texture coordinate – Scaling the texture map
Material Instances:
Material instances allow us to create parameters to alter existing materials, creating quick variations or even completely different materials.
We must apply the node we want to change “convert to parameter” within the original material nide. Then, right-click on the material to create a material instance.
Naming a new material: M_[Material name]. This is the industry standard.
Constant vectors:
1+Left Click (good for metallic, specular etc.)
2+Left Click
3+Left Click (for base colour etc.)
T+Left Click – Texture Sample
M+Left Click – Multiply
TAB -> to open all the nodes
To unlink: option+Left Click
The workshop activity:
During class, we needed to recreate 8 different materials of our choice.
We needed to use the following techniques & Material Inputs:
2. Simple Emmisive Material:
I created 2 constant vector nodes and 1 multiply node. Converted the 1 constant vector to a parameter and set the default value to 1.0. chose a colour for the 3 constant vector node. Attached both of them to the multiply node, and the multiply node, I connected to the emissive colour of the material.
Then I created a material instance out of the original material and changed the glow value to 14, so the material will be more shiny.
3. Emmisive Material with Lerp and Fresnel:tutorial
4. Emmisive Material with textures and Panner node (animation):
5. Opacity (Glass material):
Created a new material. Changed the blend mode to “Translucent” under the Material tab and the Lighting mode to “Surface Translucency volume” under the Translucency tab.
It was done in order to enable opacity. Also, on Material settings under the “Refraction” tab, change the “Refraction Method” from “None” to “2D Offset”.
6. Bricks Material with texture coordinate node: [to scale the uv]
7. Opacity Mask:
Changed the blend mode to “Masked” under the Material tab and ticked the “Two Sided” option. I uploaded the following chain link fence PNG.
I used the Texture coordinate node to repeat the uv.
8. Earth Hologram Texture:
I followed this tutorial to make the hologram texture.
The weekly activity:
Recreation of 4 different materials-
9. Micro Texture: Tutorial
I used this method to hide texture repetition.
10. Car Paint Material:
Under the material tab, I changed the blend mode to “Opaque” and the shading model to “Clear Coat”.
I created this noise texture map on photoshop:
Then applied the following links:
11. Water Material:
Under the material tab, I changed the shading model mode to “SingleLayerWater”.
To change to the colour of the water, we need to set the opposite colour of the one in the node we connect to the absorption (kind of the light colour that is not absorbed).
12. Macro and Micro Texture Grass for Landscapes:
The first Screenshot is a micro-texture (followed this tutorial), and the second screenshot is a macro texture (borrowed from the gold material)
Total of 12 materials:
Development Log:
I created 12 different materials. It helped me understand how to create different materials with different techniques and how different nodes behave.
Tutorials that I used:
Car Paint Tutorial
Water Tutorial
Earth Hologram Tutorial
Week 3 – Landscapes
What was covered in the lecture: Sliders Link
– How to get into the landscape mode and create a new landscape
– Sculpture tools that help build the landscape
Sculpt – Enables to raise and lower the height of the Landscape heightmap
Smooth – Soften the heightmaps painted values to give the Landscape a smoother flow
Flatten – Pushes or pulls all other parts of the heightmap to the level that is currently under the mouse when activated
Ramp – Enables to select two locations on the Landscape and create a flat ramp between the two points
Erosion – Uses a thermal erosion simulation to adjust the height of the Landscape heightmap
Hydro – Uses a hydraulic erosion simulation (erosion by water) to adjust the height of the Landscape heightmap
Noise – Applies a noise filter to produce variations in the surface of the Landscape heightmap
Retopologize – Automatically adjust Landscape vertices with an X/Y offset map to improve vertex density in areas that need it, like steep cliffs. It helps to prevent texture stretching by adding more points where needed, like in sparse areas
Visibility – Enables you to mask out (create holes) in parts of your Landscape, for areas such as caves
Mirror – Enables to mirror or rotate the existing Landscape heightmap geometry along the X or Y axis
– Painting on landscapes:
When creating the landscape material, we need to use a “Landscape Layer Blend” node. We need to create layers within this node so we could later paint the landscape.
Set the “Preview weight to 1.0.
Click on “+” icon to add a new layer.
Landscapes also have their own unique texture coordinate node.
Example of landscape material:
\
To avoid visible repetition on the landscape, we can use the Macro Texture Variation technique. We can copy it from the build in gold material. Connect the output of it to a multiply node, which is connected to the base colour.
Under the “Landcape” tab, we need to create layer info for each layer we wish to paint. Use “Weight-Blended Layer (normal)”.
– Brush settings:
We can change the brush size by using “[” and “]” hotkeys
We can adjust the brush settling on this window:
– Foliage:
To access “Foliage”
Foliage options and brush settings: (I usually use “Paint” and “Single”)
To add an object, open the “Content Drawer” and search for the object you wish to add under “Content”. Then drag it to the left side of the screen, as displayed on the screenshot below.
– Mesh Editing – Modeling tools:
To access “Modeling”
Creating a simple geometry-
We can access to more editing mesh options like bevel and extrude through the “PolyGroup Edit” under the model section.
– Geometry brushes.
The workshop activity:
Create a landscape and place foliage around the scene.
1. Created a new project and deleted the playground so it would look like this.
2. Switched to the “Landscape mode”, changed the “section size” to “31×31 quads”, and clicked on “Create” to create a new landscape.
3. sculpted a landscape
4. Imported “Infinity Blade: Grass Lands” and “Infinity Blade: Props” assets
5. Created the landscape material. In the “Landscape Layer Blend” node, I created 2 layers so I could later paint the landscape. Set the “Preview weight to 1.0.
Then, I copied the Macro Texture Variation technique from the gold material and connected it to the landscape material with multiply node.
6. Under the “Landcape” tab, I create layer info for each layer we wish to paint. Use “Weight-Blended Layer (normal)”.
7. Painted the landscape with these 2 different material
8. Added Foliage:
9. Moved the player start position so it would be above the ground:
Final Workshop activity screenshot and video:
The weekly activity:
Create a simple forest with a “cabin”
– Sculpted a Landscape:
– Created the landscape material:
– Painted the Landscape:
– Created Foliage objects: To make the foliage trees more random, under the “Painting” tab, I changed the Scale X max to 1.5 and lowered the paint density to 0.05. I also Turned off Aligned to normal so the trees’ angle won’t be affected by the landscape.
I followed this tutorial to understand how to model a tower inside UE5.
1. created a cylinder and adjusted its size
2. Under Xform, I clicked on bake transform so the new size of the shape will be saved.
3. Under “Model”, I entered the “PolyGroup Edit” mode and chose the upper face of the cylinder. Then, under the “Face Edit” tab, I chose “Inset” to create triangles within the chosen face.
4. Under the “Mesh” section, I chose the “Tri Select” option and chose the following triangles, selected “create a polygroup”, and clicked “Accept”.
I went back to polygroup edit, and then I was able to see my new group.
5. Extruded the faces up, the inner circle slightly down, and move down the outer edges to get a more stylized model.
6. Duplicated the shape (option + drag left) and then used the “Duplicate” method in order to delete the inputs of the new shape.
7. Under the “Model” subject, I applied the “Plain Cut” option.
8. I increased the radius of the shape and then chose the 2 shapes. Under the “XForm” tab, I clicked on align to align the 2 shapes.
9. I Adjusted the size of the new shape and then “XForm” -> “Bake Transform”. Then, I duplicated it and placed it on the original shape.
10. Duplicated the original shape again, applied the “Duplicate” function, then “Plain Cut” it. After, I applied the “Lattice” function and changed the resolution to 2x2x2. Then, I increased the radius of the bottom face of the new shape, aligned it to the original shape and made the original shape shorter.
11. Combined the 2 shapes by “XForm” -> “Merge”
12. Created a UV: “UVs” -> “Project UVs”
13. Created the castle material and assigned it to the castle
14. Final Tower:
Created a cabin using the methods I have learnt from the Tower modeling tutorial:
Final Result:
Development Log:
I created a landscape with a forest. Then, I followed a tutorial on how to model a tower so I would feel more comfortable to model a cabin, which was part of the weekly activity.
During this week, I learnt how to create a landscape, add foliage and model inside UE5.
Tutorials that I used this week:
Modelling in Unreal documentation
Foliage Randomness Tutorial
Rotate Texture Tutorial
Model a tower in UE5 Tutorial
Week 4 – Lighting & Reflections
What was covered in the lecture: Sliders Link
Very useful Unreal documentation
Lighting:
– Directional Light -Simulates light that is being emitted from a source that is infinitely far away. Like Sun.
– Point Light – Emits light in all directions from the light bulb, like a light bulb.
– Spot Light -Emits light from a single point in a cone-shape
– Rect Light -Emits light into the scene from a rectangular plane with a defined width and height. Good for TV or monitor screens and overhead lighting fixtures and wall sconces.
– Sky Light
Global Illumination Algorithm:
Global illumination algorithms enhance the realism of lighting in 3D scenes by considering both direct light from sources and light rays reflected by surfaces. Reflections, refractions, and shadows are all instances of global illumination as they demonstrate how one object influences the rendering of another.
– Lumen Global Illumination – is fully dynamic that works with all lights, emissive materials casting light and sky light occlusion.
– Screen Space Global Illumination – is a low cost dynamic illumination method, it is limited to information available on the screen
Reflections:
Reflection Capture Actors are objects strategically placed through the level and feed reflection data into the Reflection Environment. This is a low-cost solution.
There are two types, Box and Sphere, they work by capturing an image of the surrounding environment from their center, then mapping that to reflection capture shape.
Planar reflections are the dynamic solution using this system. It can provide accurate reflections.
Lumen:
Lumen also offers indirect specular or reflections (dynamic). It also supports single-layer water materials, with reflections forced to mirror.
Screen Space Reflection:
alters the reflection that appears on the screen view
The workshop activity:
Create or edit an existing example project to showcase different types of lighting.
– Directional Light:
– Point Light:
– Spot Light:
– Rect Light:
I created a mirror material following this tutorial:
– Convert an object into a static mesh:
– Convert a static mesh so it will be a solid object:
The weekly activity:
Continue to develop your forest using lighting (lanterns with a model and light source).
– Add a lake:
1. Added the water plugin
2. Placed “Water Body Lake” into the forest
3. Adjusted the size of the lake
– Skylight with moonlight settings:
Turned off the “Lighting” Folder and created “Lighting1” Folder.
Go to settings and enable “Show Engine Content”
Under the “Engine” folder, search and drag “BP_Sky_Sphere” to the scene.
Change the “Sun Hight” to -1 to get the night sky (without the light yet). Change the “Starts Brightness” parameter to 0.25.
Add a “Directional Light”. Change the intensity and the Light colour. Also, add “Sky Light’ without changing the parameters to add more details.
Add “Exponential Height Fog”. Change the “Fog Density” and the “Fog Inscattering Color”. Also, change the location (especially the height) of the fog.
Final Result:
Development Log:
I learnt different kinds of lights, understood how to deal with reflection, and explored more about modelling.
This week, I learnt how to add new light sources and adjust them, create a skylight with the moon and fog, and create a lake.
Tutorials that I used this week:
Super useful shadow documentation
Light documentation
How to create a mirror material Tutorial
How to create a night sky Tutorial
Week 5 – Sequencer, Cameras & Post Processing
Documentation link
What was covered in the lecture: Sliders Link
Sequencer:
Is used to create cinematics in Unreal. The sequencer can directly animate characters, cameras, properties, and other objects over time.
The full explanation of how to create and edit a sequence is under the workshop activity section.
Keyframe Tangents:
There are different types of keyframes with different functionality. We can convert existing keyframes tangent type by right-clicking it.
1. Cubic (Auto) – Move the camera smoothly.
2. Cubic (User) – Same as auto but is not editable.
3. Cubic (Break)- Can apply curves
4. Linear – fast at the end
5. Constant – Teleporting
Rendering:
The full explanation of how to render a sequence is under the workshop activity section.
Triggering Sequences:
The full explanation of how to create triggers in the sequence is under the workshop activity section.
Cameras:
Cameras in Unreal can be used independently and placed directly into a level. They can also be part of a blueprint to change perspective under certain conditions.
To create a new camera, drag a camera actor into the level.
However, when working with cinematic content in UE, we should use a Cine Camera Actor, which provides additional settings similar to real-life cameras.
We can also pilot cameras to keyframe in sequences or to get the right angle. The full explanation about cameras is under the workshop activity section.
Post Processing:
Post-processing effects enable designers to define the overall look and feel of a scene. Post-processing volumes can also only affect specific areas.
The workshop activity:
Create a new folder named “Sequence”. Click on “Add Level Sequence” and choose the folder we created. Name it LS_MySequence (Industry standard)
Create a sequence using a cine camera for an existing scene
Drag “Cine Camera Actor” to the level.
Right-click on “CineCameraActor” and choose “Pilot ‘CineCameraActor'”
Eject to exit this mode:
Click on “Track” and choose “Camers Cut Track” to open the sequence view.
Click “+” and choose “CineCameraActor”
Click on “+” and choose “Transform”
Choose the “Location”, “Rotation” and “Scale”. Enter into the “Pilot ‘CineCameraActor'” mode. Press enter to create a keyframe. Move the camera and create another keyframe.
Tracking an object:
Under Current Camera settings, tick “Enable Look at Tracking” and choose the actor you want to track by “Actor to Track” and select it.
Render the sequence:
Add the “Movie Render Queue” plugin. Choose the “Movie Render Queue” option. A new window will pop up. Choose “Render (Local)”. The sequence images will appear then in this path: ProjectName->Saved->MovieRenders.
Blueprint settings:
Open the level blueprint. A new window will appear.
Inside the window, press TAB and add “Event BeginPlay”
While the LS_MySequence is selected, right-click on the blueprint window and choose “Create a Reference to LS_Mysequence”.
Drag a line and choose “Play (SequencePlayer)”
Drag the output of the “Event BeginPlay” to the “Play” input.
Another option is to create a trigger box, so only when the player enters the trigger box area the sequence starts to play.
Dragg a “Trigger Box” to the level
While the trigger box is selected, go to the blueprint window, right click and under the “Collision” tab, choose “Add on Actor Begin Overlap”
The Result:
A “Post Process Volume” behaves like a trigger box. when the player enters the box area, something will change.
Drag a “Post Process Volume” into the level.
Under the “Global” tab, enable “Saturation” and change it (nothing will happen). When the player is inside the cube area, the saturation will change accordingly.
If you want to apply it to the whole level, you need to enable “Infinite Extent”
The weekly activity:
Move an actor inside a sequence that is not a camera.
Click “Track” and choose the object we would want to move.
Choose the Location, rotation and Scale options. Move the object and create keyframes.
Development Log:
I learnt how to create a sequence in UE5 and triggers, as well as how to deal with blueprints.
Week 6 – BluePrints
Documentation link
What was covered in the lecture: Sliders Link
What are blueprints:
Blueprints is a visual scripting system unique to Unreal Engine.
A Blueprint Class is an asset which allows creators to easily add functionality on top of existing gameplay classes. They can be created like any other asset and then placed inside a scene. We use C++ when we want things made faster.
Variables:
Very powerful tool! It is important to name the variable in very detailed
“Instance editable” – makes a variable available on the level screen.
There are different kinds of variables:
Events:
Events are essentially instructions which can be triggered under certain conditions.
Events:
Some Events Examples:
– Event Tick is an event which is called every single frame. The delta seconds is essentially time.
– Begin Play is an event which is executed when the scene starts. Or if the actors is spawned, it is called immediately.
– Actor Being Overlap is executed when an actor overlaps with another, this is useful for triggering certain logic in particular areas.
– Actor End Overlap is when the exact opposite is true, when an actor leaves the overlapped area.
We can create custom events as well. Custom Events are certain events that will have additional nodes; these are called parameters. These are used to pass necessary information for the event to function.
The most important thing:
Get = gets the information of the variable.
Set = Changes the information of the variable.
To straighten the lines – select all the nodes and press Q
Small printing exercise:
Open the level blueprint:
“Tab” to create a new node.
Create Event BeginPlay, 2 Print String and Delay (D+left click) nodes.
When we will press play, the texts will appear.
Create a Variables, set it to string, compile it, and then add the text.
Drag the variable, choose the “get” option and connect it to the “In String”.
Drag the variable and choose “set” this time. Change the information and connect it like so:
The workshop activity:
Create a Blueprint Actor, which can change the colour of a light when a player enters the area.
Create a blueprint Folder. Create a point light and a trigger box. Select the trigger box and click on the icon that converts it into a blueprint.
This window would appear. Change it from “Viewport” to “Event Graph”
Declare a variable and change it to Actor->Object Reference.
Drag it into the blueprint window and “Get”.
Create a “Cast to Pointlight” node. Drag from “As Point Light” and choose the “SetLightColor” node.
Drag from the “New Light Color” and create a new variable. Make sure “Instance Editable” is ticked.
Final Blueprint Result:
Drag the BP into the project and set the colour we want.
Mid Result:
Change the colour to back the original one when leaving the box:
Create an “Event ActorEndOverlap”, drag the Light variable and choose “Get”. Then, Create a “CastToPointLight” node.
Drag from “CastToPointLight” and create “Set Light Color”. From this node, drag “New Light Color” and promote it to variable. Rename to “Original Light Color.”
Go back to the “Event ActorBeginOverlap” node.
Drag the “Original Light Color” variable and choose “Set.”
Drag out from “As Point Light” and choose “Fet Light Color”
Connect the Return value of the “Get Light Color” to the “Original Light Color” of the “Set” node.
Final Result:
Final Result (first task):
BluePrint Link
Create a spinning ActorComponent:
Create a cube actor and create a blueprint from it.
Drag the static mesh to the board. Drag out from the static mesh component “getworld rotation”.
Drag out from the return value of the node “Combine Rotators.”
Drag a link from “B” to create a new variable and call it “AddToRotation”.
Create one more static mesh component. Drag a link from the static mesh and choose “Set World Rotation.”
Link the “Set World Rotation” node and the “Combine Rotators” node.
Link the “Event Tick” node to the “Set World Rotation” node. Make sure the AddToRotation “Instance Editble” is ticked.
Drag the blueprint into the level and change the rotation parameters. Make sure the Mobility is set on “Movable”.
Final Result (second task):
Blueprint Link
The weekly activity:
Create an actor which has an array of rotatable actors and randomise their rotation values.
Create a new blueprint, set it as an actor and name it “BP_RotManager.”
In the blueprint window, create a new variable, rename it to “MyCubes” and make it “Array”, and change its type to “BP_RotationCube” as a reference to the rotation blueprint we already made.
Drag “My Cubes” variable into the scene, choose the “get” option and turn on “Instance Editable” so we could pick several cubes inside the level. To do so, compile the blueprint and then drag it into the level. Create a couple of BP_RotationCube actors. Select “My Cubes” actor, click on “+”, and click on the colour picker icon to select a cube.
Go back to the blueprint window, drag a link from the “My Cubes” variable, and create a “For Each Loop” node. Link this node to the “Event BeginPlay” node.
(For Each Loop node goes to every single thing in the Array)
Drag a link from the “Array Element” of this node and create a “Set AddToRotation” node. Connect the “Loop Body” of the “For Each Loop” node to this node as well. Change the input of “Add to Rotation.” Now, all the actors we selected before will rotate in the same direction at the same time.
Create another actor which triggers the Randomiser to change the rotations when the player enters it.
To create randomness:
Create a “Random Float” node and connect it to a “Make Rotator” node. Make a link to X,Y, and Z. Create a link between the “Return Value” and the “Add to Rotation” of the “SET” node. Now, all the actors we selected before will rotate in random directions.
Blueprint Link
Create a “Custom Event” and name it “Set Random Rotation”. Link it to the “Exec” of “For Each Loop” node instead of the “Event BeginPlay” node.
Create a new trigger box, convert it to a blueprint and name it “BP_ChangeflotTrigger”.
In the blueprint window, create a new variable and set it’s kind to “BP_RotManager” and tick “Instance Editable”.
Drag it into the window, choose “Get” option and drag a link out of it to create “Set Random Rotation”. Link this node and”Event ActorBeginOverlap”.
Compile, go back to the level window, make sure the trigger box is selected, then under Default->NewVar choose the “BP_RotManager” we created before.
Now, every time the player gets into the trigger box area, the rotation direction will change.
Development Log:
I understand better what blueprints are.
I learnt how to create new blueprints, events and variables.
How to assign blueprints trigger boxes to make events change when entering and exciting the trigger box.
Week 7 – Advanced Materials & Shaders
Single Layer Water Material Documentation
Post Processing Documentation link
What was covered in the lecture: Sliders Link
What we covered in class:
We recapped the same subjects we learned in week 2 and week 6.
– Micro/Macro Textures
– Material Instances
– Panner and Lerp.
Shading models – control how your material reflects incoming light. They also control how the input data makes up the material, which is used to create the final look!
Subsurface – simulates subsurface scattering; this relies on a subsurface colour input, which defines the colour of the matter just beneath the surface of an object.
Post Processing – Enables artists and designers to define the overall look and feel of the scene through a combined selection of properties and features that affect coloring, tonemapping, lighting, and more. A special type of volume, called a Post-Process Volume, can be added to a Level to access these features. Multiple volumes can be placed to define the look of a specific area, or they can be set to affect the entire scene.
The Workshop Activity:
Create a simple single-layer water material.
Customise it with parameters to create 2 other unique water materials.
– A parameter to change the colour of the water.
– A parameter to change the speed of the waves.
Under the material tab, I changed the shading model mode to “SingleLayerWater”.
When converting the vector2, which is connected to the panner, to the parameter, it will change into a colour.
To change the colour of the water, we need to set the opposite colour of the one in the node we connect to the absorption (kind of the light colour that is not absorbed).
The Weekly Activity:
Create a simple toon shader post-processing material
Under the material tab, I changed the shading model mode to “Post Process”. Under “Post Process Material”->”Blendable Location” -> Change to “Before Tonemapping”
Click “Tab” and search for “SceneTexture”. On the left side of the screen, we could change the Scene texture ID.
Material Blueprint:
How to apply on the level?
Create a “Post Process Volume”
Tick “Infinite Extent”. Create a “Post Process Material” Array and assign “M_Toonshader”.
Final Result:
Without VS With:
Week 8 – Particle Effects
Documentation link
What was covered in the lecture: Sliders Link
Particle Effects:
There are two main particle systems in Unreal: cascade and Niagara.
Niagra Particle System
Systems are the container for everything you will need to build that effect; inside, you will have different building blocks that stack up.
Emitters are where the particles are generated. They control how particles are born, what happens to them as they age, additionally how they look and behave.
With Niagara, the idea is to create Systems out of emitters. So then a system could have a fire emitter and a smoke emitter.
Emitter Groups
– Emitter Spawn (Begin) – Defines what happens when an emitter is first created on the CPU.
– Emitter Update (Tick)—Defines what happens on every frame. This is useful when you want them to spawn continuously.
– Particle Spawn (Begin) – Called once per particle when it is first born.
– Particle Update (Tick) – Called per particle on each frame.
– Event Handler: This is Used to create and generate events in one or more emitters that define certain data. It is also used to listen in on other emitters that trigger behaviour.
– Render – Defines the display of the particle (mesh or material, etc).
You can create your emitters separately, such as systems. (with a template)
Modules are the basic building blocks; you can add them to groups, and they are run from top to bottom. They are just like Blueprint nodes, doing the math for the system.
Material Particle Expression (- the important part):
Particle Material Expressions are for creating materials for emitters in Particle Systems
1. Particle Colour: The “ParticleColor” expression ties into the current colour of a given particle based on any per-particle colour data defined within Cascade. This must be plugged into the appropriate channel (Emissive Color).
2. Particle Direction: The “ParticleDirection” expression outputs Vector3 data on a per-particle basis, representing the direction a given particle is currently traveling.
3. Particle Size: The Particle Size expression outputs the X and Y size of a particle sprite. This can then be used to drive some aspect of a Material.
The Workshop Activity:
Create a new Niagra System and choose “Create empty system”
Created a new Emitter by right-clicking the window. Choose whatever you wish. (In this case, I chose “Fountain”)
Under “Particle Spawn”-> “Initialize Particle”, you can choose the minimum/maximum size of the effect.
Under “Emitter Update” -> “Spawn Rate”, you can change the spawn rate:
Create a material, change the blend mode to “Translucent” and the shading model to “Unlit”
Create a texture node and assign “T_Brust_M” to it
Material Blueprint:
When creating materials for particles, switch the viewport of the material to plane view.
Assign the material we created to the particle under “Sprite Renderer”
Turn off the gravity and change the velocity from “cone” to “from point”. You can change the min/max velocity speed.
Change the particle colour under scale colour. Change the scale mode to “RGBA Linear Color Curve”
Add “Scale Sprite Size” by clicking the “+” button next to “Particle Update”
Drag the particle into the level. Make sure the “Auto Activate” is not ticked
While this particle is highlighted, open the level blueprint, then right-click and create a reference for the highlighted particle:
Drag and choose “Activate”
Create a trigger box inside the level.
Final Result:
Week 9 – Advanced Blueprints
What was covered in the lecture: Sliders Link
Operators: +,-,/,x and ==, >, >=, <, <=, !=
Conditions (Branch, Switch&Do)
The Branch node provides a straightforward method for generating decision-based flow based on a single true/false condition. Upon execution, the Branch node examines the incoming value of the connected Boolean and sends an execution pulse through the appropriate output pathway.
A switch node takes in data input and directs the execution flow to the corresponding (or optional default) output based on the input’s value. Different types of switches are available, including Int, String, Name, and Enum.
The DoN node triggers an execution pulse N times before pausing outgoing execution until a reset pulse is received. Similarly, the DoOnce node fires off an execution pulse only once and stops outgoing execution until reset. It’s essentially a DoN node with N = 1.
The FlipFlop node receives an execution output and alternates between two execution outputs. Initially, output A is triggered, followed by B on the next call, then back to A, and so forth. Additionally, the node provides a boolean output indicating when Output A has been activated.
There are more condition nodes with can be found on the sliders.
Casting:
Casting is a typical communication technique involving converting an Actor reference to a different class. If the conversion succeeds, Direct Actor communication allows access to the actor’s information and functionality.
Widgets: Creating UI on-screen elements
Widgets is Unreal’s UI system.
It can create health bars, dialogue messages, and entire menus.
The Workshop Activity:
Creating a Simple Health System – Blueprint Link
Go to Third person-> Blueprint-> BP_ThirdPersonCharacter
Click on “Add” -> “New Blueprint Script Component”. Choose “Actor Component”. Name it “BPC_Health”
Create 3 Variables:
MaximumHealth – integer – Instance is editable. Under “Default Value” set the Maximum Health” to 100
CurrentHealth – integer
IsDead – Boolean
Still under BPC_Health:
Create 2 custom events: “Remove Health” and “Add Health”
Click on the event and add inputs:
For “AddHealth”, create a “Health to Add” integer
For “RemoveHealth”, create “Health to Remove” integer
To add health:
To make sure it won’t add health above the maximum health:
(Branch runs a condition outcome)
From Branch->True, drag a link of “Set Current Health”. From Current Health drag a link to get “Maximum Health”
Final “AddHealth” blueprint”
Do the same to “RemoveHealth”, but instead of “+” do “-” and instead of “>=” do “<=”.
Create a branch and from “True” drag a link to “Set IsDead” and tick it.
Final “AddHealth” blueprint”
BPC_Health link
Under “BP_ThirdPersonCharacter”, go to “Event Graph”
Create “Event Tick”. Then drag “BPC_Health”. Link the BP_Health to “Get Is Dead”. Connect the “Is Dead” to the condition. Connect it to “Do Once” (so it would do it only once). Link “Do Once” to “Sequence”.
“Sequence” runs the events in top-to-bottom order.
Link “Then 0” to “Set Simulate Physics (Mesh)”
To Restart the current level:
Link “Then 1” to “Delay” and set the delay to 2 (seconds).
Link it to “Get Current Level Name” -> “Open Level (by name)”. Link between “Return Value” to “Level Name”.
Final Blueprint of the event tick:
To reduce the health with a keyboard shortcut:
Right click -> Keyboard (choose the keyboard shortcut).
From proceed create a link to “Remove Health”
Final Blueprint:
Final BP_ThirdPersonCharacter link
Create “Widget” folder. Right click-> User Interface – > Widget Blueprint. Name it “WBP_Health_Bar”
Open it. Drag “Canvas Panel” into the screen (it will show us the borders of the level).
Drag “Progress Bar”. You can adjust the look of it.
While the progress bar is highlighted. Details->Progress->Create Binding.
Create the following nodes in this order:
Get Player Pawn. Link it to “Cast To BP_ThirdPersonCharacter”
From Cast to BP…..-> “As BP Third Person Character” create a link to “Get BPC Health”
Create “get current health” and “get maximum health”. Convert them to float by linking it to “To Float (Integer)”. Connect both of them to “Divide” operator and then to “Return Value” of the “Return Node”.
Final Blueprint:
Final WBP_Health_Bar link
To display the health bar on the level:
Open BP_ThirdPersonCharacter
Under “Add Input Mapping” group, link “Add Mapping Context” to “Create Widget”.
Then choose “WBP_Health_Bar” to refer to our health bar. Link it to “Add to Viewport”
Connect it like so:
Final BP_ThirdPersonCharacter link
Video (pressing the shortcut to reduce the health):
Add a trigger box so that every time the player enters its zone, the health will be reduced:
Create a trigger box. Convert it to a BP and name it BP_Trap
Create “Damage” Variable, set it to integer and set the default damage value to 10.
Create the following links:
Video:
Add bomb effect to the trigger box:
Under BP_Trap. From “Other Actor” create a link to “Get Actor Location”.
From “Remove Health” create a link to “Spawn Emitter at Location”
Choose P_Explosion
Final BP_Trap blueprint
Video:
– BP_ThirdPersonCharacter link
– BPC_Health link
– WBP_Health_Bar link
– BP_Trap link
Week 10 – Animation
What was covered in the lecture: Sliders Link
Animation:
Animation Blueprints are visual scripts designed for creating and managing complex animation behaviours.
They specialize in controlling the animation of a Skeletal Mesh during simulation or gameplay. Within the Animation Blueprint Editor, users can blend animations, manipulate skeleton bones, and establish logic for defining the final animation pose per frame.
Skeletal Mesh Actors showcase animated meshes, which can be deformed via control points in animation sequences.
State Machines:
State Machines within Animation Blueprints are modular systems used to define specific animations and their conditions for playing. They are built within the Anim Graph by right-clicking and selecting State Machines > Add New State Machine, then connecting it to the Output Pose. These State Machines typically start with an entry point, often representing the default state, as character idles in locomotion setups.
Blend Spaces (BP):
Blend Spaces are assets that enable the blending of multiple animations or poses by plotting them on one—or two-dimensional graphs. They offer the ability to prioritize animation transitions, selecting the one with the smallest priority if multiple transitions are true simultaneously.
Animation nodes:
AnimBP nodes in the AnimGraph and EventGraph feature input and output pins for passing information. They also have property pins, including data values or variables modified by linked functions. Event graph nodes process incoming data, driving pose data in the Anim Graph, triggering playback, activating animations, and updating animation data. AnimGraph nodes, informed by EventGraph data, determine frame-by-frame poses for animating objects.
The Workshop Activity:
Create third-person character animation
Download animation from Mixamo
Create a new folder for the animation under content. Name it “PlayerMeshAssets”
Import the FBX file (only of the T-pose without the animation) by dragging it into the folder we created. Click on “Import All”
Right-click on “BlockMan” -> Create -> Anim Blueprint
Go to “ThirdPerson”->”Blueprints” and open “BP_ThirsPersonCharacter” in the viewport mode. Choose “Mesh” on the left side of the screen.
On the right side of the screen, under Mesh-> Skeletal Mesh Asset, choose “Blockman”
On the right side of the screen, under Animation-> Anim Class, choose “ABP_Blockman”
Create Animation->Blend Space and name it BS_LocomotionBlockman
All the animations will appear in the “BS_LocomotionBlockman” window because they are in the same folder. Drag the idle animation to the beginning of the graph, the walk animation in the middle, and the Run animation at the end of the graph. If we press “Command,” we can drag the green X that shows the animation.
On the left side of the screen, under “Horizontal Axis” change the name to “Velocity”
To make the animation smoother:
Change the “Maxumum Axis” to 200 and the “Smoothing” to 0.5.
We can adjust the “Walk” and “Run” animation settings here:
Under ABP_Blockman -> AnimGraph, Create a “State Machine” node. Rename it to “Locomotion”. Double-click on it.
Now drag BS_LocomotionBlockMan. Rename to “IdleWalkRun” and create a link between the Entry to this node.
Double-click on this node to open a new window.
Create the following nodes. At the end, from “Velocity”, drag out a link to promote it to a variable.
Now, under ABP_BlockMan Event Graph, create the following blueprint:
Video:
Run and jump animation:
Now, under ABP_BlockMan “Locomotion”, drag in “Jump” and “Fall” and create the following links:
Under ABP_BlockMan Event Graph, create “IsFalling” and “IsJumping” boolean variables.
Then drag a link from “Target Character Movement” to “Is Falling”
Create the following BP links:
Go to ABP_BlockMan “Locomotion”
Fall to IdleWalkRun:
IdleWalkRun to Fall:
Jump to Fall – don’t edit.
IdleWalkRun to Jump – don’t edit for now.
Final Result:
Adding Jump Animation:
Under Locomotion, IdleWalkRun to Jump:
Change IdleWalkRun to Fall “Priority Order” to 2.
On Jump to Fall tick “Automatic Rule…..”
Under BP_ThirdPersonCharacter go to the jump input section. Create a new boolean variable and name it “Is Jumping”.
Create the following links:
Under ABP_BlockMan EventGraph BP create the following links:
Final Video:
1st and 2nd Assessment Ideas:
Exterior: Crescent Island
Interior – Fire Lord Temple
Final Video – Interior and Exterior:
Documentation:
Created a 63×63 landscape and assigned a landscape material to it.
To get an accurate shape, I created a moon-shaped spline on a different landscape layer. Then, I added the Water plugin and created an ocean.
Added the “Landmass” Plugin. Turned off the moon-shaped spline. Under the sculpting tools, I chose “Blueprint” and created several “CustomBrush_Landmass” on a different landscape layer. I changed some of the settings and added effects to the custom brushes.
Landscape Layers and costume brush layers:
MountainbrushLeft – left mountains landmass
MountainbrushRight – right mountains landmass
MountainbrushVolcano -the volcano itself, sculpted with alpha brush.
MountainbrushFinishes – adjustments around the temple area.
MountainbrushTemple – the flat area next to the volcano.
MountainbrushLeft – the end of the left mountain landmass
Created a path using Spline:
Water Plugin: Duplicated the Water_Material_Ocean, Water_FarMeshOcean and the GerstnerWaves_Ocean (which can be found under “WaterBodyOcean”->Waves) so I could apply some changes.
I changed the A parameter to 3.0 so the watercolour will be darker on both Water_Material_Ocean1 and Water_FarMeshOcean1.
I applied to following changes to the Water_Material_Ocean1 material:
I applied to following changes to the GerstnerWaves_Ocean:
Water Ocean:
Adjusted the landscape texture’s colour to a slightly darker shade to create a more pronounced “volcanic” appearance.
I added Foliage materials around and on the volcano.
Added some rocks on the path to the temple:
Falling Ashed particle:
Lava Splash and smoke particles (placed inside the volcano):
Light settings:
I used the Ultra Dynamic Sky asset and adjusted the following settings.
Building the interior:
Building the temple itself using modular assets and BP of the modular dungeon pack.
Adding objects inside the temple:
Static mesh rubbles, long tables, different kinds of candles, statues and fire.
The fire of the candles are blueprints from the modular dungeon pack. I adjusted the size of the fire:
Placed point light inside the dragon’s head to achieve a more dramatic look.
Added rectangle light on the outside of the temple:
The temple surroundings:
I have lowered the saturation of some of the rocks so they would look darker and match the atmosphere I want to achieve.
Added static mesh rocks to the landscape from the “Brushify Underworld” pack. Added some burnt trees from Megascans.
Sequences, camera actors and rendering:
I made 5 different sequences. In each one, I used a new “Cine Camera” and added a transform option. I set all camera movements to Linear interpolation.
For the indoor sequence, I adjusted the focal length and aperture settings of the camera. When the camera moves horizontally, I focused it on the candles by changing the camera’s focus. To blur the background a bit in this scene, I lowered the aperture setting of the camera.
Render Settings:
I used the “Movie Render Queue” plugin. I changed the render setting to the following ones to get a 4K quality. The sequence output was EXR files.
Plugins:
– Water Plugin
– Landmass Plugin
– Movie Render Queue
Assets:
– Brushify: Volcano pack and Underworld pack
– Ultra Dynamic Sky (link)
– Megascans Lava Field (link)
– Modular Dungeon (used for the interior) (link)
– Dragon Temple (used for the interior) (link)