Deborah R. Fowler
Unreal Notes for me
Posted on Dec 2018
Updated on Jan 3 2019
In general - this is a good starting point: https://docs.unrealengine.com/en-US/GettingStarted
This includes documentation and short tutorials on general topics. Below I explored blueprints further
This page mainly focuses on blueprints
For more info on:
Interface and Quick Tips
- select a wire type ALT to delete
- select an object and type F to focus camera on it
- 1 unit is 1 cm (Houdini is 1m) and y is out, z up (Houdini z is out, y up)
- import prefers fbx (turn off autogenerate collision, materials, textures)
- event graph - playable, construction script - doable
- ctrl W == ctrl C + ctrl V
- double click to get elbows on wires
- CTRL click to move elbows around
- style tip - align executable wires top priority
- ESC stops play
- create a Blank blueprint project without starter content for less bloat
More to explore for later - python can be used
inside unreal
*Style Guide - https://github.com/Allar/ue4-style-guide
- make content independent so you can migrate
- follow a style guide!
- map == level
- never ever use spaces! (this
is a good habit in CG in general)
- Blueprints are a container for content - hold components, scripts, data
- line up your node WIRES - white is execute and takes priority
- select and ?? Q did not work as documented? - because the keyboard shortcut is not set up by default (https://allarsblog.com/2015/11/11/align-nodes-like-a-pro/)
- "wiggly wires wear wits wickedly"
- uses PascalCase (like camelCase but begins with a capital)
- variables - nouns, functions - verbs and also prefix_base_suffix
- S_ static, M_ material, MI_ material instance ...
- compiled object-oriented visual scripting language
- C++ == blueprint
- Add New (green) and select blueprint to create one
- construction script for set up of levels to expose values (runs at start, also when editting), event graph for run
- blueprint function or macro library for storing shared functions
- add comments, select and hit C
- can collapse to function or macro or collapsed, double click to open (macros don't have input) Functions can be called externally, macros are internal usually, collapse is just to tidy. Functions can "call" multiple times, collapsed cannot
- blueprint type:
- level blueprint - one
of,
- actor blueprint
- copies work, modular
- animation blueprint - anim graph is the state machine, event graph
- widget blueprint - UI head up (HUD) display - event graph and designer tab
- and can have child blueprint (inherited class)
- cost for BP versus C++ because BP relies on a Virtual Machine to translate
- C++ will be faster and more powerful
- BP is Event Based
- blank project with starter content - chairs and table appear, without - grey tile floor
- define an CameraActor - create a level blueprint (blueprints/open level blueprint) that uses this as the camer
- controls are set up in the project settings
- action mappings
- axis mappings, for example (right click and search for node)
- forward
- w scale 1.0
- s scale -1.0
- split a struct by right clicking the pin
- right click to promote - epic fail - can't get the key to be active in the blueprint - scoured the forums and experimented - need to find out what makes WASD accessible in a blueprint even when project settings are set up with forward and the node shows up it is not giving the info (only works in the canned ThirdPerson Project set up - want to build it myself)
- After watching other tutorials figured out the missing piece -
drag mesh to root AND not default pawn but Auto Possess Player
player0
https://www.youtube.com/watch?v=7k1xLlOC7kM
(not very helpful)
- 2:38 introduction to blueprint
- If you hold mouse down, you can use wasd
- migrate used to transfer to a project
- don't use directly out of engine content, put a copy in your own content
***https://docs.unrealengine.com/en-US/Engine/Blueprints/QuickStart
(helpful)
- create a side scroller project with starter content
- create an empty actor and make a cube with a box collision on the ramp
- branch is an if/then statement in the flow control diagram
- variables - editable and expose on spawn (right click, promote parameter first) - or use eyeball on window list on left
- https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/Types/ClassBlueprint/Creation
- if you can't find a node try Window / palette / search in your blueprint
This is how I like to learn - building something familiar from the ground up - this tutorial was very useful and not something you find easily elsewhere. The key is to have a blueprint interact and game mode that doesn't have the default pawn. Briefly:
Two Pawn blueprints with the following
- Start with a New Project / Blueprint / Blank project with no starter content (you can delete all except floor)
- Setup the camera actor as per instruction above for a Static Camera (remember if you can't find a node use the blueprint menu Window / Palette and search there)
- Setup the input in your Settings / Project Settings / Input (Axis Mappings), Create two Pawn Blueprints, Create a Game Mode Blueprint, Create a Blueprint Interact (from the Content Add New green button). The blueprints are shown below. Be sure to set the "Auto Possess Player" in each pawn. Also, in Class settings of Pawn 2 Add the Blueprint Interact function to the class.
- The video creates two dynamic pawns, the one I created is just using forward/backward motion on two players for the moment.
Pawn One
Pawn Two (make sure that you have the class settings for the interface added or the event will not exist - see below)
It is important in each pawn to set the Auto Possess Player correctly
In addition you need a Blueprint Interface node (this allows you to set up the function CALL 2P so that the data can be used in pawn 2.
To create a Blueprint Interface node select it from the content browser Add New / Blueprint / Blueprint Interface
Add this interface to Pawn 2
It is also a good idea to include the Game Mode blueprint and point the game mode (settings/Game) to it in details
And of course, you need to set up your input in your Project Settings / Input
This allows you to control both players. I also set up a camera actor to provide a static camera as described above in the section on Static Camera.
NOTE: If you delete everything but the floor you will want to add a light when you rebuild.