CGI Foundations
WEEK 1
Introduction to Unreal Engine
We learnt :
- How to create a New project and Save it.
- Camera Movement- Mouse Click + WASD.
- How to Select, Move, Rotate, and Resize.
- Actor control in the Scene level.
- Change parameters of objects.
- How to activate Real world Physics simulation for objects in level.
ASSIGNMENT
Creating an Obstacle Course
Research:
commands –
Spacebar | Play or Pause Playback for the selected sequence. |
Down Arrow | Plays the selected sequence. |
Up Arrow | Returns to the start of the of the assigned Playback Range. |
Left Arrow | Step backwards in the current sequence. |
Right Arrow | Step fowards in the current sequence. |
[ | Sets the start of Playback Range to the current time. |
] | Sets the end of Playback Range to the current time. |
Right-click Drag | Allows you to move around the Tracks Area. |
Ctrl + Mouse Wheel In/Out | Zoom in/out in the Tracks Area. |
Home | Resets the zoom/view range of the Tracks Area. |
– and = | Zoom into and out of the view range by 10%. |
, and . | Moves backwards and forwards between placed keyframes. |
Left-click Drag | Creates a selection box around keys in the window. |
Left-click on a key | Selects the key. |
Right-click on a key | Displays the Context Menu where you can define properties for the key. |
Middle Mouse | Creates a key at the mouse position. |
Enter | Set a key on the selected tracks at the current time. |
Ctrl + G | Go to a set time/frame in the sequence. |
I | Sets the start of Selection Range. |
O | Sets the end of Selection Range. |
M | Adds/Removes a Frame Marker at the current mouse location. |
Ctrl + Shift + , (comma key) | Jumps the timeline to the previous marker. |
Ctrl + Shift + . (period key) | Jumps the timeline to the next marker. |
Ctrl + Left Arrow | Move selected keys and sections 1 frame to the left. |
Ctrl + Right Arrow | Move selected keys and sections 1 frame to the right. |
_______________________________________________________________________________________
WEEK 2
Materials
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 in a 50/50 blend.
– If – is for things we want to change inside the scene.
– Multiply – Takes two inputs and, multiples them together and outputs the combined result.
– 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 manipulate existing materials, creating quick variations of the same material with the possibility to make entirely new materials.
We must apply the node we want to change “convert to parameter” within the original material node. Then, right-click on the material to create a material instance. This makes it possible to change individual parameters.
There are certain methods used in the industry, like the naming of 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 -> Opens all nodes
To unlink a connection: Option+Left Click on the connecting string.
Creating Materials
_______________________________________________________________________________________
WEEK 3
|Unreal Tools| Making a Landscape
_______________________________________________________________________________________
WEEK 4
|Lighting And Reflections|
Different types of lights available:
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 doors, screens, and overhead lighting fixtures and wall sconces.
Sky Light- simulating the light found in the real-world sky.
Reflections:
Reflection Capture Actors, are objects strategically placed through the level which feed reflection data into the Reflective 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 centre, then mapping it to the reflection capture shape.
Planar reflections are the dynamic solution using this system. It can provide more accurate reflections.
Screen Space Reflection:
This alters the reflection that appears on the screen view
Lumen:
Lumen also offers indirect specular or reflections (dynamic). It also supports single-layer water materials, with reflections forced to mirror objects.
_______________________________________________________________________________________
WEEK 5
|Sequencer & Post Processing|
_______________________________________________________________________________________
WEEK 6
|BluePrint|
_______________________________________________________________________________________
WEEK 7
|Advanced Materials & Shaders|
– 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.
CLASSWORK:
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).
_______________________________________________________________________________________
WEEK 8
|Particle System|
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:
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.
CLASSWORK:
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
_______________________________________________________________________________________
WEEK 9
|Advanced Blueprint|
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
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
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
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 connections:
Health Potion
_______________________________________________________________________________________
WEEK 10
|Animation|
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:
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:
_______________________________________________________________________________________
ASSESSMENT 1 & 2 (Interior and Exterior)
PROLOGUE:
For my Assessment, I made a “Forgotten Island” that has been long deserted. Only monsters and remains can be found.
There is a cave on this beautiful, but deserted island where treasure hunters who have survived the island, say they found treasures but never made it back to tell the tale, as not all who go there return. As far as all is concerned, it’s a MYTH. It is said that diabolical things happen on that island. They found giant remains, giant monsters and unknown technology that defied all logic.
_______________________________________________________________________________________
PROJECT CREATION
I start in Landscape Mode and click Create New after inputting my desired Landscape dimension settings.
To Create my mateiral, I create a New folder for my materials to keep it neat and tidy. Within the folder created, I Right click and select Material from the options.
I open the Material and go into its Blueprint to add textures and details.
Next I add Props, like rocks and trees and other items, and place some of them strategically, to cover the rough edges after making a hole in the mountain where I place the entrance to my Interior.
Finally I go into Foliage Mode, where I can place multiple shrubs, grasses, and even all sorts of trees too to populate the island.
In foliage mode, i select individual assets and I put in various settings individually to give the trees, shrubs and grasses varying heigths, alignment, and density.
I created a water Material for my River and then made an instance of it for my lake where the Crab-Like monster emerges from.
I finally create Fire using the Niagra System, and naming it “NS_firename” which is the industry standard for naming.
I then duplicated the Fire I made and changed its colour to purple for my second fire.
After placing all my props and design, I go create my Level Sequence where I shoot scenes from my created Island.
SIDE NOTE:
I used Post Processing Volumes on the island with “Infinite Unbound” checked to apply a consistent light through out the island. Then inside my cave I used another Post Processing Volume to make the light Red-ish for the dark gloom effect, transitioning from outside to inside.
_______________________________________________________________________________________
LEVEL SEQUENCE CREATION
To create my level sequence, i Add a level sequence, then name it using the industry standard starting with “LS_nameOfSequence”, and save it in a folder of my choice.
I then position my camera where I want my shoots to begin from and key the positions of the camera to capture my sequence video.
I also opened my Level Blueprint and created this to activate anytime I played my recorded sequence. This make it possible to watch recorded sequence with animation with my third person player viewed.
Below is a screen recording of me creating the rest of my sequence shots. the video is sped up to save time. I had to compress the video a whole lot, as the file size was humongous, hence, dropping the quality of the video.
_______________________________________________________________________________________
STILL-SHOT GALLERY
I took some still shots of my Level Scene.
_______________________________________________________________________________________
I combine my interior and exterior video shoot into one video, transitioning from exterior scenes straight into the interior of the mountain cave.
The final product is below.