Carnall | Unreal Engine 4.X By Example | E-Book | www.sack.de
E-Book

E-Book, Englisch, 506 Seiten

Carnall Unreal Engine 4.X By Example

An example-based practical guide to get you up and running with Unreal Engine 4.X
1. Auflage 2025
ISBN: 978-1-78588-924-0
Verlag: De Gruyter
Format: PDF
Kopierschutz: Adobe DRM (»Systemvoraussetzungen)

An example-based practical guide to get you up and running with Unreal Engine 4.X

E-Book, Englisch, 506 Seiten

ISBN: 978-1-78588-924-0
Verlag: De Gruyter
Format: PDF
Kopierschutz: Adobe DRM (»Systemvoraussetzungen)



With Unreal Engine 4 being made free to use, for any keen game developer it is quickly becoming the most popular game engine in today's development industry. The engine offers a rich feature set that can be customized and built upon through the use of C++. This book will cover how to work with Unreal Engine's tool set all the way from the basics of the editor and the visual scripting system blueprint to the in-depth low-level creation of content using C++.

This book will provide you with the skills you need to create feature-rich, captivating, and refined game titles with Unreal Engine 4. This book will take you through the creation of four unique game projects, designed so that you will be ready to apply the engine's rich development capabilities. You will learn not only to take advantage of the visual tools of the engine, but also the vast and powerful programming feature set of Unreal Engine 4.

Carnall Unreal Engine 4.X By Example jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


Creating a basic actor


At this point you should have a world that looks similar to this:

What we are going to do now is remove the table, statue, and chairs from our level and replace them with our own actor. The purpose of this is to show you how we can create new actors and add components from within the editor without having to navigate to other areas of the engine. You can remove actors by clicking on them and hitting the key, right-clicking on them and selecting Edit | Delete from the dropdown menu, or by finding the actor in the World Outliner and performing the same steps.

Once the table and chairs have been removed, we need to add an actor to the world that we wish to build upon. To do this we need to place an element from the Modes Panel in the top left-hand side of the window. As stated in the introductory tutorial, the Modes Panel is where you can find all of the tools that you will need to perform construction actions within the editor. The five tabs you can interact with are Place, Paint, Landscape, Foliage, and Geometry Editing.

These options will be explored during the course of this book but, for now, we are concerned with the Place tab. The Place tab is where you can find all of the editor objects that can be dragged and dropped into the level. Here you can find things such as basic geometry primitives, BSPs, visual effects, and numerous processing volumes.

Tip


If you wish to see detailed documentation for each of the editor objects, click the small question mark on the right-hand side of the object name.

From the list on the left-hand side of the panel, select Basic; this will show you a selection of simple objects that can be dragged into the world. We want to drag an Empty Actor into the world.

Objects, Actors, Pawns, and Characters


Unreal Engine utilizes a specific naming convention for the objects that can be created and built upon within the editor. There are Objects, Actors, Pawns, and Characters. Each name represents an expanded level of functionality. In general, you can think of Actors as whole items or entities such as a power up or boost pad, where an object is usually a small part or Component with specialized functionality. For example, a whole car could be an Actor but the engine within the car would be considered an Object. Pawns and Characters I will detail in later chapters. The term object(s) will be used to refer to things in our levels but when required I will use the capitalized Actor or Object when specification is required.

Select our new actor now by clicking on it within the viewport. With the Empty Actor selected in our world we are presented with a few new visual elements. The first is the transform widget; the transform widget provides us with the ability to translate, rotate, and scale objects within our world. You can swap the functionality of your transform widget by pressing the key for translation, the key for rotation, and the key for scale. Alternatively, in the top right-hand side of the Viewport panel you can click and select the appropriate transform icon. We can also select the globe icon in the same corner to swap between world and local space transformation. Simply put, world space transformation will present a transform axis in line with the world. Local space will present a transform axis in line with the object (based on the objects arbitrary forward).

Tip


If you are ever curious to see the world space axis, it can be found in the bottom left-hand side of the screen, denoted by a simple line widget. This can be used to orient yourself while using the 3D camera/building levels.

Adding components to your Actor


You will notice that, if you try to scale or rotate the empty actor, nothing happens. That is because, at this point, the empty actor only contains a component. A component is an Object that is owned by other Unreal Engine 4 objects (usually Actors, Pawns, or Characters) that provide different functionalities/features to the object. In this case our actor owns a component allowing us to translate, rotate, and scale the object.

Why then does scaling and rotating do nothing? Well, right now we have no 'visual' components included in our actor and by that I mean any components that contain geometry that will visually represent the object in the game world. Without a visual reference, the orientation or size of the empty actor has no context, only the location of the object in 3D space could be of any use, thus we have the ability to translate.

This brings me to the second visual element; on the right-hand side of the window is the Details panel. This panel is used to show all information about any selected object within our world. From the Details panel we can manipulate exposed member data, add and remove components, and edit component properties. There are a few other tricks the Details panel offers us but I will expand upon those later on in the book.

You can also change the name of objects in the details panel. Right now our object is called Actor, we should change this to a more specific name, let's use . Now we need to add a visual reference to our Hello Sphere. Under the Details panel you can see a green Add Component button; clicking this button will bring up a list of pre-built components we can add to our actor. We would like to add a Sphere to our actor, it can be found under the Basic Shapes section of the dropdown. You can either use the search bar provided to find specific components or scroll down the list until you find what you require.

The component hierarchy


Once you have added the sphere mesh to our actor you will see a new element in the Details Panel, component hierarchy. We still have our component but now, directly under it, we have our sphere mesh. This brings up a very important point: Component parenting.

Within the Details panel you will notice that the sphere mesh component is indented slightly and directly beneath our component.

This is called parenting; our sphere mesh is now a child component of our component. This means that any scaling, rotation, or translation we apply to our will be applied to our sphere as well. However, any transformations we enact on our sphere mesh will not be applied to our . You can change the hierarchy of an object's components by clicking and dragging them up and down the list. The top-most component will be the Root Component and will dictate the transform of all subsequent components.

Ignoring this can lead to disjointing of child components and can be fairly troublesome. I encourage you to now translate the with the selected in the details panel, then again with the component selected instead. You will notice that, upon the second translation, the Sphere Mesh maintains its relative distance from the location of the component. It is because of this that I would strongly advise to only apply transformations to child objects when you wish those transformations to remain constant, relative to the parent.

Tip


If you wish to move everything within an object instance you may select the (Instance) element within the hierarchy.

Modifying components


Now translate the Hello Sphere to the same location that the table and chairs originally occupied. We are going to add some to our . We are going to add two more components to the actor; a Text Render component and a Particle System component. We will then use the Details panel to modify the properties of these components to achieve our desired visual result.

First, let's modify the text. After adding a Text Render component, select it in the component hierarchy. You will see that the bottom section of the Details panel will change. This section is where you can modify the component's properties. You will notice that you can also get access to the component's transform properties here,...


Carnall Benjamin :

Benjamin Carnall is an enthusiastic and dedicated programmer whose love for problem solving led him to the world of game development. He relishes opportunities to learn new and interesting ways to create gameplay experiences for others. Ben began his journey with Game Development in 2012, after he graduated from Media Design School with a diploma in interactive gaming. He then went on to graduate from the same university with a bachelors of software engineering in 2014. Since then, Ben has immersed himself in the Game Development community of New Zealandstarting out as a programming contractor and working on various titles around Auckland. He then began to work as a lecturer at Media Design School and taught Graphics programming for games, Physics programming for games, and Sony PlayStation development at the bachelors level. Most recently, Ben has been working as a programmer for the studio Aroura44, developing a title called Ashen.



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.